Commit Graph

739 Commits

Author SHA1 Message Date
William Mead
0ea4a4d071 Added stock warehouse document upload 2025-12-18 09:41:43 +01:00
Laurent Destailleur
cf828d6223 Merge pull request #36691 from W1W1-M/new-document-api-builddoc-intervention
NEW document API build doc intervention
2025-12-17 19:15:44 +01:00
William Mead
b0e10d67b6 Added intervention document generation 2025-12-17 16:59:04 +01:00
William Mead
c8b4ad24bd Fixed expense report document generation. Cleaned error messages. 2025-12-17 13:41:41 +01:00
Laurent Destailleur
0c2b34be80 Merge pull request #36683 from W1W1-M/new-document-api-generate-builddoc-warehouse
NEW document API builddoc warehouse
2025-12-17 13:24:16 +01:00
William Mead
c0503d1e89 Updated modulepart check 2025-12-17 09:08:00 +01:00
William Mead
46cc35faff Added warehouse document generation 2025-12-17 09:07:32 +01:00
William Mead
7ab079d0f0 Added stock warehouse documents 2025-12-17 08:39:46 +01:00
Laurent Destailleur
124c304677 Update api_documents.class.php 2025-12-15 13:59:56 +01:00
Laurent Destailleur
6f88117ab8 Merge branch 'develop' into new-document-api-builddoc-expense-report 2025-12-15 13:59:15 +01:00
Laurent Destailleur
9dde4495f0 Merge pull request #36643 from W1W1-M/fix-document-api-post-third-party
FIX document API third party document POST
2025-12-15 13:56:31 +01:00
William Mead
f7078da238 Updated PHPDoc 2025-12-14 18:21:39 +01:00
William Mead
117aedfede Added product document generation 2025-12-14 18:20:29 +01:00
William Mead
aa3f357064 Cleaned code 2025-12-14 13:47:53 +01:00
William Mead
fa6e85fbed Cleaned code 2025-12-14 13:19:02 +01:00
William Mead
96b8515b3d Fixed type 2025-12-14 12:49:34 +01:00
William Mead
905040e5ab Updated PHPDoc 2025-12-14 12:06:41 +01:00
William Mead
8885393940 Fixed document upload for third party 2025-12-14 11:54:09 +01:00
William Mead
af55f4efe7 Added expense report to document API builddoc 2025-12-13 17:44:14 +01:00
Charlène Benke
dc6c593187 Fix permission check from 'lire' to 'read' 2025-12-03 09:29:48 +01:00
Regis Houssin
8621eb21fa FIX multicompany dictionary sharing 2025-11-25 14:58:33 +01:00
Charlène Benke
712da5b172 NEW : api setup - Add dictionnary holiday lists (#36402)
* Add methods to retrieve holiday and public holiday lists

* Fix SQL query formatting in api_setup.class.php

* Add user permission checks for API access

Added permission checks for user access rights before fetching data for expense reports, holidays, and HR public holidays.
2025-11-25 14:21:58 +01:00
Laurent Destailleur
7b351e1df8 Fix CI 2025-11-21 01:29:45 +01:00
Laurent Destailleur
99b656c3c2 Fix CI 2025-11-21 01:19:14 +01:00
Laurent Destailleur
09da2b2365 Merge manually to close #34719. Need to add API_IN_TOKEN_TABLE=1 for the
transition to use several API tokens per user.
2025-11-20 23:51:37 +01:00
Laurent Destailleur
b77e3a4cca Merge branch 'develop' into new-api-rest-tokens 2025-11-20 21:31:20 +01:00
Frédéric FRANCE
46d6714fe0 clean code (#36317)
* clean code

* clean code

* clean doc

* clean doc

* clean doc

* clean doc

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-20 01:47:46 +01:00
Laurent Destailleur
71fd5f2f62 Merge branch 'develop' into new-api-rest-tokens 2025-11-19 21:26:41 +01:00
Frédéric FRANCE
d07e8c03a0 avoid changing object after call (#36159)
* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* clean code

* clean code

* clean code

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* clean code

* clean

* clean

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-12 09:44:39 +01:00
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
Laurent Destailleur
634e27d1f1 Merge branch 'develop' into new-api-rest-tokens 2025-10-15 03:41:05 +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