Commit Graph

294 Commits

Author SHA1 Message Date
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
Jon Bendtsen
6810cb487f api can create notification 2024-03-16 09:46:32 +01:00
Jon Bendtsen
5c98d38061
remove caller because it failed in phpstan 2024-03-16 00:41:45 +01:00
Jon Bendtsen
eb92e5a678 fetch does not take 4 arguments, only 3, and we don't need more than 2 2024-03-16 00:14:59 +01:00
Jon Bendtsen
c6c6bec2e7 based on update company bank account 2024-03-15 23:50:01 +01:00
Jon Bendtsen
6090e3efe7 modified just like deleteCompanyBankAccount in #28887 2024-03-15 22:40:43 +01:00
Jon Bendtsen
a25ac083d8 Merge branch 'fix_delete_company_bank_account' into new_thirdparty_notification_api 2024-03-15 22:37:14 +01:00
Jon Bendtsen
db18ba99bd writing why it is not allowed 2024-03-15 22:30:55 +01:00
Jon Bendtsen
cda2fd03af adding the rowid as the notification id 2024-03-15 22:28:51 +01:00
Jon Bendtsen
8625fc717d Merge branch 'develop' into new_thirdparty_notification_api 2024-03-15 22:05:51 +01:00
Jon Bendtsen
081b5a256f 403 when loggin is ok but permission are wrong. 2024-03-15 21:52:59 +01:00
Jon Bendtsen
434d4d2a0d using the type casted variable in if 2024-03-15 20:07:56 +01:00
Jon Bendtsen
5f0c13b73b only if supplied 'account' numbers match will we actually delete, else return 416. Return 401 when not authorized 2024-03-15 20:04:03 +01:00
Laurent Destailleur
16e5d08b36 FIX #yogosha21416 2024-03-14 23:40:46 +01:00
Laurent Destailleur
fd4fa05313 FIX #yogosha21416 2024-03-14 23:39:16 +01:00
Jon Bendtsen
390a190094 Merge branch 'develop' into new_thirdparty_notification_api 2024-03-13 23:56:39 +01:00