Commit Graph

309 Commits

Author SHA1 Message Date
Laurent Destailleur
131d1390bc Debug v23 2025-09-28 22:20:44 +02:00
ldestailleur
4bc5892544 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-24 17:00:53 +02:00
Jean Traullé
5432834836 FIX #35425 (#35426)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-23 23:26:25 +02:00
kollibar
13767a614d [NEW] Add function to split a discount in 2 by API REST (#34786)
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 80e67e665a.

* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).

correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."

This reverts commit 12ccfa60fa.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 6fb35a6d2e.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* correction commit for phan

* Correction for Travis CI

* I forgot to correct a line

* Correction for phpcs

* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue

* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on

* spelling correction in comment that don't pass pre-commit check

* trailing whitespace forget

* Add function to split a discount in 2 by API REST

* correction for phan & php-stan

* correction for phan & php-stan

* correction for phan & php-stan

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 23:11:10 +02:00
Laurent Destailleur
27a0c984a9 Fix CI 2025-05-22 18:57:32 +02:00
Lucas Marcouiller
a0a0e2d0a4 fix #34182 regretion on api thridparty fetch (#34238) 2025-05-22 15:55:46 +02:00
William Mead
6d07c6336c Fixed get. Improved error message. (#34150) 2025-05-14 16:57:44 +02:00
Charlène Benke
4a58d0c640 allow empty mode (choice 0) on api call (#34142) 2025-05-14 12:50:45 +02:00
ldestailleur
1ec8036cc6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-05-07 11:32:25 +02:00
ldestailleur
b555aed819 The API to create a website account /idthirdparty/accounts/site is now
POST (instead of PUT) and to update is PUT (instead of PATCH).
2025-05-07 11:28:30 +02:00
William Mead
384a4f3984 QUAL Updated third party API PHPDoc (#34077)
* Updated and cleaned PHPDoc. Added contributor details.

* Updated and cleaned PHPDoc

* Cleaned PHPDoc

* Cleaned PHPDoc

* Cleaned PHPDoc

* Cleaned PHPDoc

* Cleaned PHPDoc

* Cleaned PHPDoc

* Added contributor details
2025-05-07 11:20:14 +02:00
MDW
f625f8de60 Qual: Fix api phan notices 2025-03-05 13:22:08 +01:00
MDW
eac44b164a Qual: Fix phpdoc index(), FIELDS 2025-03-05 13:21:05 +01:00
MDW
035ede5874 Qual: Fix phan notices in API classes 2025-03-02 20:49:46 +01:00
MDW
c02293a880 Qual: Add phpdoc for request_data param 2025-03-02 20:49:45 +01:00
Laurent Destailleur (aka Eldy)
fa9fe2efa7 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-20 15:02:37 +01:00
Laurent Destailleur (aka Eldy)
c9ab22782e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-01-20 14:57:45 +01:00
Laurent Destailleur (aka Eldy)
1f360ca498 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-20 12:28:49 +01:00
Laurent Destailleur (aka Eldy)
1b42078d1e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-20 10:24:30 +01:00
Alexandre Janniaux
63c991413e api_thirdparties: fix num_rows typo
$res->num_rows will not work on PostgreSQL. $db->num_rows() must be used
instead to execute the correct procedure depending on the database
backend.

But the call was not written properly and both were mixed up in commit
25741a618e which used $db->num_rows, and
then fixed in 72c443868c which used
$db->num_rows($result) where suited, except this location.
2025-01-16 14:48:08 +01:00
atm-florian
ba4e97f07b FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
+ security for Tickets API: disable updating rowid
2025-01-16 10:37:29 +01:00
Laurent Destailleur
bc83d330b6 Debug v21 2024-11-25 03:16:30 +01:00
Laurent Destailleur
4bdd848bbe Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-11-06 13:26:08 +01:00
iLLixM
c580e5fb5e FIX #30432 make thirdparty code_client and code_compta modifiable via API (#31668)
* make thirdparty code_client and code_compta modifiable via API

make code_client and code_compta modifiable via API call ( put /thirdparties/{id} ) for existing third parties

* fix: thirdparty code_client and code_compta modifiable via API (#30432)

make code_client and code_compta modifiable via API call ( put /thirdparties/{id} ) for existing third parties
2024-11-04 12:34:21 +01:00
Laurent Destailleur
830029dd05 NEW Iban is saved encrypted 2024-10-24 13:03:52 +02:00
MDW
f70c945931 Qual: Fix phan/stan notices (#31271)
# Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall

Fix notices in classes with UnknownObjectMethodCall notices or classes
related with these.
2024-10-05 18:55:36 +02:00
ptibogxiv
f74b072d72 NEW retrieve Thirdparty by account (#31283)
* NEW retreive Thirdparty by account

usefull for external link

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php
2024-10-05 18:46:16 +02:00
Frédéric FRANCE
a760fc0092 fix phpstan (#31189)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-29 21:51:51 +02:00
Frédéric FRANCE
d12fd8d175 fix phpstan (#30869)
* fix phpstan

* fix phpstan
2024-09-06 13:50:27 +02:00
MDW
e570f59e2d Qual: Phan fixes (mainly Initial type cannot be inferred) in popular changed classes (#30604)
* Update setValueFrom $id type to include null

* Only 2 arguments for ModeleNumRefMembers::getToolTip

* Fix PhanTypeConversionFromArray

* Only 6 args for PaymentSalary::addPaymentToBank

* Fix typing hints (array -> string)

* Fix uninitialized variables

* Add cssview to attributes phpdoc

* Avoid double typing specification (Phan notice)

* Qual: Ensure variable is defined (phan)

* Ensure phpdoc typing for verif method

* Ensure phpdoc typing for getNextValue method

* Add status as data key in cols array

* Ensure preg_replace operates on string (phan)

* Correct type for desiredstock

* Fix typing with casts (phan)

* Fix check that notification already exists

* Initialise fk_parent_id to fix typing issue

* Qual: Fix phan notices for Societe & related

* Qual: Fix typing for Facture and related

* Qual: Fix typing for Product & related

* Update baseline

* Fix new phpstan notices
2024-08-14 01:24:55 +02:00
Jon Bendtsen
8a35651b3f NEW: Create thirdparty notification by action code (#30541)
* based on createCompanyNotification, just trying to do it with code and not id number

* can now create notifications by action trigger code

* will now prevent duplications

* checks if request_data contains event or fk_action key because then it uses that and not the action code supplied as text

* checks if request_data contains event or fk_action key because then it uses that and not the action code supplied as text

* now requires a well formed request_data with an event key

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-08-11 00:20:45 +02:00
Jon Bendtsen
7fe990e972 FIX api call Get Notifications to make output more in line with what post notifications expects as input. This also removes duplicated fields (#30539)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-08-07 02:58:35 +02:00
Jon Bendtsen
a8d3586d4b FIX api call Get Notifications to make output more in line with what post notifications expects as input. This also removes duplicated fields (#30539)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-08-07 02:58:05 +02:00
Rémi Champlon
d2907b68c0 NEW : Add pagination data to some api routes (#29895)
* Add pagination date

* Spaces to tabs

* fix
2024-07-06 15:04:11 +02:00
Laurent Destailleur
93eded598e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-05-03 18:24:03 +02:00
Laurent Destailleur
e9f7a1996f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-05-03 18:18:39 +02:00
Laurent Destailleur
4fef808efa Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-05-03 18:16:58 +02:00
Florian Mortgat
cf6cbafa8c FIX: PUT /thirdparties/{id} and PUT /contacts/{id} should throw exception if update returns < 0 (#29596)
+ FIX some PHPDoc (types and throws)
+ FIX issue #29594: trigger should be called on contact update by API
2024-05-03 18:03:14 +02:00
Frédéric FRANCE
26da44e254 fix phpstan (#29431)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* remove params not used

* add WARNING
2024-04-27 12:45:50 +02:00
Jon Bendtsen
bd51fd5ffc FIX: Uncaught Error: Class 'Facture' not found in API GET thirdparties invoices for credit/replacement (#29426)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-04-21 09:49:13 +01:00
Laurent Destailleur
b5de782c6b Fix use the good HTTP code 2024-04-07 14:59:25 +02:00
Laurent Destailleur
36b34da2c2 Merge branch 'develop' into thirdparty_update_single_array_option_element 2024-04-02 14:54:54 +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
Jon Bendtsen
d20cb05a92 Merge branch 'develop' into thirdparty_update_single_array_option_element 2024-04-02 14:06:27 +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
Jon Bendtsen
3b418c5c92 will allow updating single complementary attribute using the put api 2024-04-01 23:05:49 +02:00
Laurent Destailleur
c92b5b90e9 Update api_thirdparties.class.php 2024-03-19 15:55:23 +01:00
Jon Bendtsen
cc0afd1558 Merge branch 'develop' into new_thirdparty_notification_api 2024-03-19 00:03:34 +01:00
Laurent Destailleur
28217c6dd5 Fix warning 2024-03-16 16:21:43 +01:00
Jon Bendtsen
158622dfb9 looking in git blame it seems people insert this for far less changes 2024-03-16 10:08:19 +01:00