Commit Graph

280 Commits

Author SHA1 Message Date
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
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
Jon Bendtsen
f10fd0cbc0 we do not use these fields which are null anyway 2024-03-13 23:52:18 +01:00
Jon Bendtsen
0c1add5f91 initialising the variable 2024-03-13 23:31:27 +01:00
Jon Bendtsen
864074804a removing the 2 unfinished functions 2024-03-13 23:15:50 +01:00
Jon Bendtsen
8dcd73e420 using the correct class 2024-03-13 23:14:49 +01:00
Jon Bendtsen
f884bb9a0a load Notify class 2024-03-13 23:06:39 +01:00
Jon Bendtsen
b55a0fbeb3 change is not big enough to warent copyright 2024-03-13 22:16:43 +01:00
Jon Bendtsen
35d41faa6d getNotifications now produces output 2024-03-13 22:13:57 +01:00
MDW
71e6cbf534 Fix PhanPluginDuplicateExpressionAssignment (NOOP assignment) 2024-03-12 22:25:38 +01:00
Jon Bendtsen
8eb805c433 working on Notifications, not accounts 2024-03-11 23:24:26 +01:00
Jon Bendtsen
dbc8f15d2f copy from bankaccount, then some edits to apply to notifications 2024-03-11 22:36:07 +01:00
Laurent Destailleur
6df4a5eded Use a better name for thirdparties site account 2024-03-08 16:42:49 +01:00
MDW
63b2fff4a7 Qual: Ignore false positive for suspicious param positions (#28693)
* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored

* Qual: Ignore suspicious param positions

# Qual: Ignore suspicious param positions

Add annotations to ignore false positives about suspicious parameter positions.
The cases that require more analysis or may be actual bad parameters positions
are not ignored
2024-03-07 20:16:48 +01:00
Laurent Destailleur
c159aff82f phpcs 2024-02-25 10:04:27 +01:00
Frédéric FRANCE
2cfeacbd1e fix phpstan (#28402) 2024-02-25 10:03:04 +01:00