2
0
forked from Wavyzz/dolibarr
Commit Graph

82 Commits

Author SHA1 Message Date
Charlène Benke
d1e0efc466 NEW Add getcontacts on api of interventional and proposal (#35589)
* Add getContacts method to retrieve contact information

* Implement getContacts method for proposals

Added a method to retrieve contacts associated with a proposal, including access checks and data cleaning.

* Implement getContacts method for invoices

Added a method to retrieve contacts associated with a specific invoice, including access checks and error handling.

* Update api_proposals.class.php

* Update api_invoices.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

* Add method to set invoice as draft

* Return contacts directly instead of cleaned data

* Return raw contacts instead of cleaned data

* Combine external and internal contacts in order list

Merge external and internal contacts for orders.

* Change return type from Object to array in API doc

Updated return type in API documentation for contact information.

* Change return type in api_orders.class.php docblock

Updated return type in docblock to reflect array return.

* Change return type from Object to array in API doc

* Update api_orders.class.php

* Update api_interventions.class.php

* Update api_proposals.class.php

* Update api_orders.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-04 20:01:57 +02:00
Charlène Benke
277c01a432 Implement CRUD operations for interventional lines and contacts (#35457)
* Implement CRUD operations for interventional lines and contacts

Added methods to manage interventional lines and contacts.

* Update api_interventions.class.php

* Fix variable references in api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-28 22:41:42 +02:00
Frédéric FRANCE
7fb7d38ffc clean code (#35533) 2025-09-28 20:56:54 +02:00
Frédéric FRANCE
bb9899085e clean code (#35451)
* clean code

apiroute is interventions

* Update api_interventions.class.php

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix bad condition

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-23 23:22:57 +02:00
Charlène Benke
e02991ed7f NEW Add hook initialization for interventions API (#35203)
* NEW Add hook initialization for interventions API

the goal is to enhance the search function on the api (by sample add linked contact or user name)

* Clean up whitespace in api_interventions.class.php

* Fix parameter reference in executeHooks call

* Update api_interventions.class.php

* Update action name in API intervention hooks

* Add 'apimethod' to parameters in API hook

* Update api_interventions.class.php

* Update api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 23:23:39 +02:00
Carlos Herrera
57157db2b7 Cehojac/issue35362 (#35364)
* intervencions api call dont show the objects relations
Fixes #35362

* feat: add loadlinkedobjects parameter to control linked object loading in interventions API

thank you for the recomendarion @eldy !!!!
2025-09-20 01:11:19 +02:00
ldestailleur
702d91c65d Clean code 2025-09-11 12:25:22 +02:00
ldestailleur
1443f35cf1 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-29 02:20:14 +02:00
William Mead
83898f9454 Fixed intervention line duration add (#35117) 2025-08-28 17:29:04 +02:00
Charlène Benke
1df5ea8456 NEW Add thirdparty search on api list (#34634)
* Add thirdparty search on api list

this change allow to seach element with filter on thirdparty (ex : list of bill of with name of thidparty)

* Update api_orders.class.php

* Update api_invoices.class.php

* Update api_contracts.class.php

* Update api_shipments.class.php

* Update api_interventions.class.php

* Update api_projects.class.php

* Update api_tickets.class.php

* Update api_tickets.class.php

* Update api_projects.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 02:35:50 +02:00
Jyhere
787bd1d278 CHANGE: ternary simplification (#34675) 2025-07-01 20:34:09 +02:00
William Mead
394ef6329d Fix SwaggerUI (#34124) 2025-05-13 11:49:26 +02:00
William Mead
22298c1f83 NEW pagination data for interventions API get (#34113)
* Added get interventions pagination data

* Fixed PHPDoc

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-05-12 20:06:38 +02:00
ldestailleur
d13cd0f47a Fix CI 2025-05-05 04:36:28 +02:00
ldestailleur
e4e5b1e597 Clean code 2025-05-05 02:22:02 +02:00
ldestailleur
2736a4b382 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-05-05 00:07:09 +02:00
ldestailleur
d85cea32c0 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-05-05 00:03:49 +02:00
ldestailleur
f70cfeb6d3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-05-05 00:03:09 +02:00
William Mead
2925bb6481 Cleaned PHPDoc. Added contributor info. (#34026) 2025-05-04 11:24:38 +02:00
William Mead
c3b35d4da5 Fixed PHPDoc. Added contributor details. (#33988) 2025-04-29 06:40:04 +02:00
William Mead
e8bf0e183d NEW reopen for interventions API (#33982)
* Added intervention post reopen API route

* Updated PHPDoc

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-26 04:21:37 +02:00
William Mead
333007c004 FIX intervention API get contacts ids (#33919)
* Fixed PHPDoc

* Added an array of contact ids to get and index methods

* Adjusted contact_type parameter to empty by default

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-20 19:00:04 +02:00
Charlène Benke
93de32e153 add fichinter put call for update data (#33836)
* add fichinter put call for update data

* Update api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-16 01:05:03 +02:00
MDW
c02293a880 Qual: Add phpdoc for request_data param 2025-03-02 20:49:45 +01:00
MDW
991afe2b21 Qual: Fix notices in api_interventions, phpstan notice 2025-02-02 01:26:42 +01:00
MDW
bea27b0be4 Qual: Fix phan notices 2025-02-02 01:26:41 +01:00
Laurent Destailleur
b5de782c6b Fix use the good HTTP code 2024-04-07 14:59:25 +02:00
Laurent Destailleur
7715513ac9 Some API HTTP return code were moved from 401 to 403 to better follow
REST specification.
2024-04-02 14:47:49 +02:00
Laurent Destailleur
990216b13f NEW Api parameters are sanitized by the WAF, same code than GET/POST 2024-04-02 13:07:13 +02:00
MDW
7b54824d49 Fix #28071 - New branch to fix bad merge (#28083)
* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Qual: Introduce getDataToShowPhoto to prepare generic code

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix missing trans

* Fix langs

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Remove useless files in web templates

* Clean code

* Fix duplicate translation key

* Fix duplicate translation key

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix duplicate key

* Fix $object

* Debug v19

* WIP SMSing

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* WIP EMAILINGS_SUPPORT_ALSO_SMS

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* WIP SMSing

* Debug the "validate" feature

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Clean code

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Enhance rector to fix empty($user->rights->modulex->perm1)

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Fix template to use v19 dev rules

* Fix use v19 dev rules

* Fix phpunit

* Debug v19

* Clean code

* Use rector to convert user->rights into user->hasRight

* Clean code

* Use rector to convert user->rights into user->hasRight

* Use rector to convert user->rights into user->hasRight

* Clean code

* Fix phpcs

* add editorconfig for sql files (#27999)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* add model_pdf field in llx_ticket-ticket.sql (#27996)

* add model_pdf field in llx_ticket-ticket.sql

* Update 19.0.0-20.0.0.sql

* Update 19.0.0-20.0.0.sql

* Improve wording in README (#27994)

* fix phpstan (#27989)

* fix phpstan

* Update UserRightsToFunction.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* Qual: Fix spelling/working in datapolicy translations (#28006)

# Qual: Fix spelling/wording in datapolicy translations

Fixed some spelling and wording in datapolicy translations.

* qual: phpstan for htdocs/ticket/class/ticketstats.class.php (#27986)

htdocs/ticket/class/ticketstats.class.php	98	Parameter #1 $year (string) of method TicketStats::getNbByMonth() should be compatible with parameter $year (int) of method Stats::getNbByMonth()

* Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix user with readonly perm on email template must be able to read.

* Fix doc

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Better message

* Add missing fields in merge of thirdparty

* Debug v19 selection of ticket printer per terminal

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Use constant

* NEW: Adding a recipient on emails sent, change status to sent partialy.

* fix travis (#28052)

* fix travis

* Update partnership.class.php

* fix php doc (#28047)

* fix undefined array key (#28048)

* Add region and departament for Cuba (#28046)

* Update llx_10_c_regions.sql

Add Cuba Regions (id_country=77)

* Update llx_20_c_departements.sql

Add Provinces Cuba (id country=77)

* Find the typo (#28050)

* Find the typo

* clean code

* add last_main_doc field to product (#28045)

* add las_main_doc field to product

* add field fetch

* NEW Add Categorie filter for ActionComm (#28041)

* New Add Categorie filter for ActionComm

New Add Categorie filter for ActionComm

* Fix space errors

Fix space errors

* Fix space errors 2

Fix space errors 2

* Update cunits.class.php (#28056)

FIX: error SQL when creating a Cunit

* Update codespell-lines-ignore.txt to avoid PR merge conflict

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: thibdrev <thibault.drevet@gmail.com>
Co-authored-by: sonikf <93765174+sonikf@users.noreply.github.com>
Co-authored-by: Ikarus <44511582+LeKarSol@users.noreply.github.com>
Co-authored-by: Anthony Damhet <73399671+EchoLoGeek@users.noreply.github.com>
Co-authored-by: Quentin-Seekness <72733832+Quentin-Seekness@users.noreply.github.com>
2024-02-09 15:58:49 +01:00
Laurent Destailleur
c9823f2b8d Move 401 to 403 2024-02-01 19:34:13 +01:00
MDW
bd002480ce Qual: Spelling htdocs/[d-k]* (#27427)
Highlights:

- htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php

  Potential functional change (fix) because toekn was changed to token:
   `<input type=hidden name=toekn`

- htdocs/install/upgrade2.php
  $filles changed to $children

- htdocs/intracommreport/class/intracommreport.class.php
  Local $enveloppe changed to $envelope.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-13 19:48:41 +01:00
Laurent Destailleur
e2f49c407f Clean sql request to use exist instead of left join 2024-01-09 10:44:50 +01:00
Fabian Heinz
b78632a20e api fixes
According to [RFC2616](https://www.rfc-editor.org/rfc/rfc2616#section-10.2), APIs should return 2xx status codes if the request was correct.
The response should be status 200 with an empty result array.
2023-12-31 14:11:05 +01:00
Laurent Destailleur
d92c65ad91 FIX infinite loop in API call/trigger by adding a caller 2023-12-15 12:15:33 +01:00
Laurent Destailleur
a7125280bc Fix with php-cs-fixer 2023-12-04 12:12:12 +01:00
Frédéric FRANCE
93b925a0d2 fix phpstan (#26847) 2023-11-26 15:52:05 +01:00
Laurent Destailleur
e6eb34a8db Fiw warnings: The private array ->status_short, ->statuts and
->status_long are now array ->labelStatusShort and ->labelStatus
everywhere.
2023-11-24 10:10:24 +01:00
pascal
80f060c771 fix tab indentation 2023-09-26 18:43:25 +02:00
pascal
871f896962 implementation of properties filter 2023-09-26 18:04:48 +02:00
VMR Global Solutions
926aa6fec7 API add / fix filter on extrafields in index()
Add / change in api_xxx.class.php files the ability to filter on extrafields when missing in the public functions index()
by changing the SQL query with the pattern 
" FROM ".MAIN_DB_PREFIX"xxxx AS t LEFT JOIN ".MAIN_DB_PREFIX."xxxx_extrafields AS ef ON (ef.fk_object = t.rowid)
2023-04-28 09:31:33 +02:00
Laurent Destailleur
60fe730a48 Look and feel v18 2023-03-12 13:56:15 +01:00
Laurent Destailleur
ed5c890769 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-02-25 20:12:48 +01:00
Laurent Destailleur
cbb6ca071a Fix #yogosha15157 2023-02-25 19:51:05 +01:00
FLIO
0080b0a80f fix (qodana) fix condlicts 2023-02-01 23:38:49 +01:00
FLIO
c4521efa57 fix(qodana) fix function comment bad return 2023-01-23 16:31:14 +01:00
Laurent Destailleur
a33603b6ae Doxygen 2023-01-18 23:58:26 +01:00
Laurent Destailleur
0387b9922e FIX error message on sqlfilter in API 2021-12-20 20:49:32 +01:00
Laurent Destailleur
1c95e2b7c7 FIX #17453 2021-05-03 14:58:29 +02:00
Laurent Destailleur
667481acd5 Fix #yogosha5832 - Missin test on permission for /index routes on APIs 2021-04-08 19:05:28 +02:00