Commit Graph

675 Commits

Author SHA1 Message Date
Laurent Destailleur
8beb61ef7f Set mysoc 2025-09-08 01:27:38 +02:00
ldestailleur
9085f37593 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 14:01:51 +02:00
ldestailleur
8089334670 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-04 14:01:27 +02:00
ldestailleur
05f3111134 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-09-04 13:51:56 +02:00
ldestailleur
5ae358d5b5 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-09-04 13:49:07 +02:00
ldestailleur
258fe1124b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-04 13:38:03 +02:00
lvessiller-opendsi
adbbf9e3b2 FIX set global mysoc and load langs in API access (#35041)
* FIX set global mysoc and load langs in API access

* FIX reset mysoc and langs only if entity of API has changed
2025-08-28 02:50:38 +02:00
ldestailleur
2427553211 The property $sumpayed (duplicate of $totalpaid), $sumdeposit
(duplicate of $totaldeposits) and $sumcreditnote (duplicate of
$totalcreditnotes) has been removed (there are replaced with the
property that was a duplication of (same for $sumpayed_multicurrency,
$sumdeposit_multicurrency, $sumcreditnote_multicurrency).
2025-08-12 04:08:38 +02:00
ldestailleur
bb27ff9707 Clean code 2025-08-11 19:48:03 +02:00
Charlène Benke
aac2ff7b5b add ticket on list document by api (#34909) 2025-08-11 19:09:12 +02:00
ldestailleur
969f0315df Clean code 2025-08-05 13:47:44 +02:00
Charlène Benke
7c3168e95a Add contact on list document api (#34864)
* Add contact on list document api

* Update api_documents.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 11:10:49 +02:00
ldestailleur
d96d61d161 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-28 15:27:25 +02:00
ldestailleur
fe7eda2a4c Move api counter at a better place 2025-07-28 14:31:17 +02:00
ldestailleur
72636dde06 Add API_COUNTER_ENABLED to track pb with api abuse. 2025-07-28 12:18:50 +02:00
ldestailleur
e3f4a66695 Add API_COUNTER_ENABLED to track pb with api abuse. 2025-07-28 12:16:38 +02:00
ldestailleur
3c24c200d1 Add API_COUNTER_ENABLED to track pb with api abuse. 2025-07-28 12:15:07 +02:00
ldestailleur
2e1ae56054 Add API_COUNTER_ENABLED to track pb with api abuse. 2025-07-28 12:13:51 +02:00
Charlène Benke
4ef0c91006 NEW add upload api feature for shipment (#34639)
* add upload api feature for shipment

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 02:45:38 +02:00
Jyhere
91dd2e87ee NEW: API GET endpoint for thirdparties types listing (c_typent) (#34751)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 00:56:10 +02:00
Laurent Destailleur
fae0093b51 Debug v22 2025-06-30 15:47:49 +02:00
Lucas Marcouiller
cde9632622 Fix some phan warnings (#34650)
* Fix some phan warnings

* Update defaultvalues.php

* Update hookmanager.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-28 16:46:52 +02:00
ldestailleur
6af890f7f2 Fix CI 2025-06-25 21:36:36 +02:00
Charlène Benke
642f045fd2 add api document feature on interventional (#34609)
add get feature 
update upload feature (fichinter not reconized, we need ficheinter instread)
2025-06-25 19:25:57 +02:00
William Mead
cff522928c Updated PHPDoc (#34429) 2025-06-13 11:44:10 +02:00
Charlène Benke
cf967185d5 Add getConfs call to get all const in one call (#34385)
* Add getConfs call to get all const in one call

* Update api_setup.class.php

* Update api_setup.class.php
2025-06-10 16:25:24 +02:00
Laurent Destailleur
221c27c091 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-09 18:15:59 +02:00
Laurent Destailleur
326c75dc51 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-09 17:58:54 +02:00
Laurent Destailleur
473ddbc53a Merge remote-tracking branch 'origin/19.0' into 20.0 2025-06-09 17:42:02 +02:00
Laurent Destailleur
c444fe3c1f Merge remote-tracking branch 'origin/18.0' into 19.0 2025-06-09 17:25:03 +02:00
William Mead
1aaa29ad9e Fixed expense report permission. Added contributor details. (#34368) 2025-06-08 14:37:23 +02:00
ptibogxiv
ce455f1236 NEW More options in api_documents.class.php (#34329)
* More options in api_documents.class.php

add pagination et filter by mime content type

* Update api_documents.class.php

* Update api_documents.class.php

* Update api_documents.class.php
2025-06-04 11:10:59 +02:00
ldestailleur
36b00c5951 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-02 14:59:18 +02:00
ldestailleur
14c2db425d Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-02 14:53:12 +02:00
ldestailleur
ca11136092 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-06-02 14:37:54 +02:00
ldestailleur
11d357b79e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-02 14:31:05 +02:00
William Mead
4fb79ba8a1 FIX API expense report line comments (v18+) (#34297)
* Fixed API expense report line comments

* Added contributor details
2025-05-27 15:57:48 +02:00
Laurent Destailleur
0f4bf91fcd Fix default value of dol_move 2025-05-19 09:45:31 +02:00
Laurent Destailleur
88c4669d19 FIX missing thumbs when uploading image files with API 2025-05-15 02:51:45 +02:00
Charlène Benke
0fe942983e FIX api fail dictionary/contact_types when use type parameters (#34010)
* api fail dictionary/contact_types when use type parameters

* Update api_setup.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-29 07:07:14 +02:00
Jon Bendtsen
9142dbb4d2 FIX BUG: default value not changed when updating an extrafield using API #33949 (#33950)
* FIX BUG: default value not changed when updating an extrafield #33949

Update can now change default value for extrafields and fixes #33949

* Also use $default in updateExtrafields

The previous commit changed postExtrafields, but that is okay, because both needs to be changed

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-24 02:33:32 +02:00
ldestailleur
7db8252225 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-04-21 13:52:25 +02:00
ptibogxiv
f1fbb98acd Fix api_setup.class.php (#33930) 2025-04-20 18:55:35 +02:00
Frédéric FRANCE
255300a29e test fix phan (#33879)
* test fix phan

* test fix phan

* test fix phan

* test fix phan

* test fix phan
2025-04-16 19:55:44 +02:00
Jon Bendtsen
772337d162 redoing PR Api objectlinks #33738 (#33781)
* redoing PR Api objectlinks #33738

* loading objectlinks api from main api folder

* bringing $FIELDS up to develop branch standard

* trying to tell phan the expected array types

* phan return and input type specifications

* trying to fix 'Method ObjectLink::_makeobject() should return int but return statement is missing.'

* trying to return an ObjecTLink

* get returns an ObjectLink object

* making sure that function _makeobject always has an return

* making sure deleteByValues always has a return statement

* remove empty line

* making sure getByValues always has a return value

* trying to fix phan for _validate

* no < around objectlink

* trying to fix some phan and phan-stan errors

* public variable target should be fk_target

* making TRIGGER_PREFIX more like in core/class/commonobject.class.php

* trying to save and use the notrigger value

* typecast objectlink fk_source and fk_target to string in the hope that they are later made correctly to int

* whitespace to trigger a build of my branch

* back to being int - because that is what they are

* trying to typecast

* trying to help PHPStan to validate fk_source and fk_target

* trying to use  the same way as  are used

* splitting  over multiple lines

* Fix: update ObjectLink return type in API methods

### FIX: Update ObjectLink return type in API methods

- Updated the return type of several methods from `ObjectLink` to `Object` to reflect a return type compatible with Luracast/Restler

* fix: refactor field setting in ObjectLinks class

# Fix: Refactor field setting in ObjectLinks class

- Removed the static `$INTFIELDS` array and moved its logic to a new private
method `_setObjectLinkField`.
- Updated `create`, `getByValues`, and `deleteByValues` methods to use
`_setObjectLinkField` for setting fields.
- Cleaned up the code by removing redundant field validation and type casting
logic.

* noting that relation type can both be string and null

* escaping strings before parsing them to the database

* -> not global

* trying to fix phpstan errors by flipping so the string part is first

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: MDW <mdeweerd@users.noreply.github.com>
2025-04-16 14:49:39 +02:00
ldestailleur
1325b249b0 Clean code to fix some phan warnings 2025-04-01 09:36:36 +02:00
ldestailleur
1726312fc3 Fix travis 2025-03-24 18:23:31 +01:00
ldestailleur
461cf5616e Clean code. WIP To manage permission on extrafields. 2025-03-18 14:55:37 +01:00
MDW
f625f8de60 Qual: Fix api phan notices 2025-03-05 13:22:08 +01:00
MDW
6b9361d252 Fix phpstan notices 2025-03-02 20:49:48 +01:00