Commit Graph

905 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
74cc41c460 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-03 14:27:58 +01:00
Laurent Destailleur
94d1a25d67 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-03 14:10:57 +01:00
ldestailleur
62760d6195 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-11-03 14:05:58 +01:00
Maxime Kohlhaas
24952c3916 Fix : CI feedbacks (#36045)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 01:01:10 +01:00
Laurent Destailleur
63ec276f5c Add DOLAPIENTITY into allowed http headers 2025-10-31 17:01:07 +01:00
Laurent Destailleur
6145bcc449 FIX Error 500 on api if cache is on and directory does not exists 2025-10-31 16:59:09 +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
e660f0f35a Enhance log 2025-10-31 16:10:06 +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
Regis Houssin
6e5f044e31 FIX check if service is activated only for api product (#35911) 2025-10-23 16:36:42 +02: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
Frédéric FRANCE
29b3880e6c add dolBuildUrl (#35664)
* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* clean baseline

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 02:31:07 +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
Jon Bendtsen
8f52485172 NEW Api mass emailing (#35531)
* adding function to set it to draft mode

* New API endpoint for controlling mass mailings

* report which id we could not find + unset some fields not on this object + write that source was com/propal/class/api_propal.class.php

* extending the fetch function for the mailing object so the API can show all columns in the database

* filling more data into the object and don't unset it later

* adding notrigger to clone creation

* still some cleaning up from when cloning api_proposals.class.php

* do not unset the ID, because we want the ID so we can use it

* adding endpoint to clone a mass mailing

* extending count function with 'all' that just returns all rows, no matter the status

* API endpoints to delete all targets of a mass mailing

* setting which http method to use

* pretty print clone endpoint in API explorer

* endpoint resetTargetsStatus of mass mailing

* Typo receipients fixed

* Update api_mailings.class.php

* Update api_mailings.class.php

* Update api_mailings.class.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 17:37:43 +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
137d3e579b CSS 2025-09-21 17:10:07 +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
74596bbdc2 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:27:11 +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
ldestailleur
60f0813520 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-12 23:05:15 +02:00
ldestailleur
20c189b55c Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-09-12 19:28:03 +02:00
ldestailleur
70d5454bfb Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-09-12 19:27:04 +02:00
ldestailleur
a54c5fcdcb Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-12 19:26:28 +02:00
Laurent Destailleur
8e689c1479 Complete #35313 2025-09-12 02:26:21 +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