Commit Graph

703 Commits

Author SHA1 Message Date
Jon Bendtsen
df4cd2fc65 FIX adding tms and datec to email templates (#36189)
* NEW: adding tms and datec to email templates

* Escaping a timestamp string I just generated myself

* switching single and double quotes in escape line for tms and datec to make the build system happy?

* Add an id to the table

* showing better names than tms and datec

* Changing code to label to fix #29116

* using hregis advice to use idate not escape the string with date

* requested changes

* forgot to add my name to editors

* had to make class changes for API to work

* setting datec back to int|string

* removing unused code lines and using idate in the api file

* no tms in create or update, but select. No datec in update

* expanding hurl tests to prevent post with id or tms, put with id or datec

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-11-11 09:02:57 +01:00
Charlène Benke
c3f8a2b2e6 NEW add api List VAT (#35920)
* NEW add api List VAT 

Enhance getListOfVAT method with SQL filters and pagination.

* Update parameter type for fk_country in docblock

* Ensure integer casting for SQL parameters

Cast variables to integers for SQL query safety.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-06 02:11:37 +01:00
Laurent Destailleur
5a61116497 Debug v23 2025-10-31 16:55:48 +01:00
Laurent Destailleur
6e14377ba4 FIX avoid error 500 on api when cache dir does not exists 2025-10-31 16:44:29 +01:00
Laurent Destailleur
88aeae24da Add more logs 2025-10-31 16:22:53 +01:00
Laurent Destailleur
4c84650e39 NEW Add API for Holidays/Leaves 2025-10-29 18:58:06 +01:00
Jon Bendtsen
982e0ed64e NEW: API endpoint for getting products in a warehouse (#35918)
* mostly updating fetch with all the fields and adding 2 missing variables

* adding throw RestException numbers, @url and a test for if you try with id=0

* Adding hurl file that do some testing og warehouses API endpoints

* Class for API prevented ever seeing model_pdf in API json

* Check for auth before doing other tests on the request

* New function list Products in warehouse. Work done by defrance, revived by JonB

* API PUT/update now allows for more database fields

* hurl tests for the new list products in warehouse endpoint

* also rejecting warehouse_id in a post

* pre-commit fix api warehouses

* copy paste error from api_usergroup

* Just return the lines, no cleaning needed

* PHAN fixes

* trying to fix PHAN error

* fix api update so it returns error when error, and fix object->update with import_key

* this->db not global db

* Advice from hregis

* Typo this d not dB

* Array of strings

* Changed listProducts in warehouse, uses api_product->get with variables from that

* hurl tests for API warehouses, and the new function get products in warehouse

* some STAN fixes

* more phan fixes

* changes revealed necessary by hurl testing

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-28 10:23:06 +01:00
Frédéric FRANCE
03ea0cda01 clean code class commondict (#35952)
* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* clean code
2025-10-28 01:25:30 +01:00
Laurent Destailleur
4bae3f6eec Must use StudlyCaps or PascalCase for class name 2025-10-22 18:15:27 +02:00
Jon Bendtsen
1f47cfd583 NEW API for getting, adding, deleting and/or modifying email templates (#35853)
* NEW API for getting, adding, deleting and/or modifying email templates

* removing duplicate class formmail which has been moved to a separate file

* hurl file for testing the emailtemplates api

* more comprehensive tests of posting a new email template, all required fields and making sure that ID is rejected

* first GUI test of email templates

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 18:04:39 +02:00
Charlène Benke
e8fc2c0f0e Modify getListOfContactTypes for expedition type (#35726)
* Modify getListOfContactTypes for expedition type

Adjust the contact type based on shipping settings.

* Update api_setup.class.php

* Update api_setup.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 01:16:49 +02:00
Jon Bendtsen
7fc9b253bf Reviving some old PR with API get, activate and disable modules (#35718)
* Reviving some old PR with API get, activate and disable modules

* expanding hurl test for setup wih some module tests

* return array, not object

* fix PHPStan on getmodules

* typecasting module functions to string

* instiating class DolibarrModule into an object so we can call functions on it

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-14 19:33:40 +02:00
Charlène Benke
b14892043f Add api document upload for knowledge management module (#35704) 2025-10-11 13:39:43 +02:00
Esteban Thilliez
cdcfb93eb5 FIX wrong documents path for supplier_invoice module in documents api (#35692)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-09 18:20:28 +02:00
Charlène Benke
e9a9c7ac61 add societe and ticket on api upload document (#35681)
* Add support for 'societe' modules on api upload document

* Add ticket module handling in API documents class

* Update api_documents.class.php

* Update api_documents.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-09 05:45:01 +02:00
Frédéric FRANCE
2ed9f1ea98 clean code (#35683)
* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-08 21:32:49 +02:00
Carlos Herrera
345a256ef6 API get documents dont support "projects_tasks" (#35671)
* API get documents dont support "projects_tasks"
Fixes #35650

* fix: add missing whitespace formatting in api_documents class

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 20:48:58 +02:00
ldestailleur
77d956ce92 Clean code 2025-09-24 16:35:25 +02:00
Frédéric FRANCE
e65b5575b9 clean code (#35462)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-24 10:37:26 +02:00
Frédéric FRANCE
00fe10a75f clean code (#35442)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-22 22:16:20 +02:00
Chloe-Moreau-2009
f8376320aa QUAL replace $conf->XXX->dir_output by getMultidiroutput (#34446)
* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

* replace $conf->XXX->dir output by GetMultidir0utput

---------

Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-22 00:53:15 +02:00
ldestailleur
49051ff165 Removed deprecated property ->projet (replace with ->project) 2025-09-21 15:08:56 +02:00
ldestailleur
15f34dbbb0 QUAL: Removed deprecated properties user_valid, user->creation,
user_modification replaced with user_ceation_id, user_validation_id and
user_modification_id.
2025-09-21 14:58:38 +02:00
Frédéric FRANCE
318e0362c4 fix Objectlink api (#35402)
* fix objectlink api

* fix objectlink api

* fix objectlink api

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-20 00:26:38 +02:00
ldestailleur
4a363478ae Clean code with rector 2025-09-18 16:26:38 +02:00
Laurent Destailleur
a0116f6cd8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-12 02:23:13 +02:00
Laurent Destailleur
d8fc4d4ceb Fix exclusion of files is not consistent 2025-09-12 02:22:42 +02:00
Frédéric FRANCE
0e1478206a clean code (#35229)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* 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-08 01:48:52 +02:00
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