Commit Graph

538 Commits

Author SHA1 Message Date
atm-lucas
bdd8dc0046 NEW - Add a new API "product lots" (#36243)
* Add new API product lots

* fix precommit
2025-11-14 16:06:59 +01:00
Laurent Destailleur
554354b151 Fi CI 2025-11-11 19:31:18 +01:00
Laurent Destailleur
d8656d523b Debug v23 2025-11-11 15:12:31 +01:00
Laurent Destailleur
9914e6280b WIP LNE 2025-11-11 15:06:57 +01:00
Laurent Destailleur
4c84650e39 NEW Add API for Holidays/Leaves 2025-10-29 18:58:06 +01:00
Bradley Jarvis
3464989848 Fix - Task event linked from task and event (#35888)
This patch fixes task events so that they are correctly displayed in the
task event list and that in the event the Linked Object referes back to
the task.

The issue was that the elementtype value in the database was being
referenced as both 'project_task' and 'task' by different parts of code

Co-authored-by: brad <brad@endurotags.com.au>
2025-10-23 14:47:27 +02:00
Regis Houssin
1e8b3e5d01 NEW possibility to define global entity in user param (#35908)
* NEW possibility to define global entity in user param

* FIX travis error
2025-10-23 13:43:53 +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
altairis-melina
592710868f FIX: Module name to show links of linked objects of expeditions (#35883)
Co-authored-by: Noé Cendrier <81741011+altairis-noe@users.noreply.github.com>
2025-10-22 18:00:07 +02:00
Frédéric FRANCE
cd3b74f092 NEW add api for members statistics (#35851)
* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* NEW add api for members statistics

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 02:05:51 +02:00
Laurent Destailleur
31989adc1f Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 21:38:13 +02:00
Laurent Destailleur
025aefb69c Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-14 21:18:09 +02:00
Lucas Marcouiller
96f119ffd9 Fix member doc gen (#35751)
Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
2025-10-14 18:47:57 +02:00
ldestailleur
31394457f1 Typo 2025-10-03 19:20:28 +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
c063eea63d Debug v23 2025-09-23 10:18:08 +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
f8d3713c1c clean code (#35343)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-15 16:16:32 +02:00
ldestailleur
92ffba11ca Remove old lang files that are too small (moved into other lang files) 2025-09-11 13:31:34 +02:00
ldestailleur
3e2b962c1d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-01 11:40:04 +02:00
ldestailleur
c1fb41e5d9 FIX setup of default doc template for supplier proposal when none. 2025-09-01 11:10:36 +02:00
ldestailleur
12743f30e4 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-09 14:09:21 +02:00
ldestailleur
f33cc75ead Fix CI 2025-08-09 13:52:31 +02:00
ldestailleur
567b60765e NEW User/Date in the Follow tab are more condensed. 2025-08-07 13:19:18 +02:00
Frédéric FRANCE
bb294eef95 NEW add hook getListOfModels (#34626)
* add hook getListOfModels

* Update functions2.lib.php

* Update functions2.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 02:59:19 +02:00
Charlène Benke
2bd22cc7c6 NEW : add api_paiements.class.php (#34756)
* NEW : add api_paiements.class.php

* Update functions2.lib.php

add payement api folder

* Update api_paiements.class.php

* Update api_paiements.class.php
2025-07-17 21:34:26 +02:00
ldestailleur
9b3f315c14 Add option MAIN_ALLOW_WYSIWYG_EVEN_ON_UNSECURED_EXTERNAL_HTTP_URL to
allow tests
2025-04-25 19:08:56 +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
2f4f82b013 Fix CI 2025-04-07 13:10:32 +02:00
ldestailleur
7e1ef5ee45 Fix warning 2025-04-07 12:41:13 +02:00
ldestailleur
30da60c955 Fix CI 2025-04-07 12:23:17 +02:00
ldestailleur
8c74643e5f PERF Optimization to get next ref when there is reset on first month. 2025-04-05 15:29:41 +02:00
ldestailleur
cd5a645acc Fix move default number to neon, argon has critical bug to fix first. 2025-04-05 14:09:47 +02:00
ldestailleur
10c0fba6b0 WIP Recurring events 2025-04-03 13:59:46 +02:00
Laurent Destailleur
67521e9c4f Clean code 2025-01-20 03:54:04 +01:00
Lucas Marcouiller
6b27108775 Fix bad values for dropdown css (#31824)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-11-14 23:26:18 +01:00
Frédéric FRANCE
1adc883b56 add baseline exclude for phpstan (#31632)
* add baseline exclude for phpstan

* update

* update

* update

* update

* update

* merge

* restore one filter

* delete old errors

* fix

* fix

* fix

* $moreforfilter can t be empty

* fix

* enable check

* refresh baseline

* add phpdoc

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
Laurent Destailleur
c70973c0c8 Merge v20 2024-10-19 14:44:55 +02:00
Laurent Destailleur
17c50368c1 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-10-19 14:32:08 +02:00
MDW
cee4535975 Qual: Fix phan notices in admin.lib and tax.lib + related (#31414)
* Qual: Fix admin.lib phpstan/phan notices

* Qual: Fix some argument types in Societe methods

* Fixup phpdoc

* Qual: Improve typing for static analysis

* Qual: Improve typing for static analysis

* Fix tax typing

* Qual: further phan/phpstan notice fixes in dol_generic_project_odt

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-17 03:08:38 +02:00
Can Arslan
84225c9077 fix: variable name (#31411) 2024-10-17 01:24:59 +02:00
Laurent Destailleur
916a906d9b Enhance the csvclean to support the charset encoding 2024-10-05 14:51:45 +02:00
Laurent Destailleur
e09d9df3ee QUAL Move function csvClean into functions2.lib.php 2024-10-03 21:36:39 +02:00
MDW
1834c37c16 Qual: Fix phan notices (#31212)
* Qual: Fix phan notices

# Qual: Fix phan notices

Fix several phan notices related to classes with UnknownObject
classes.

* Qual: Fix phan notices

* Qual: Fix phan notices

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-03 19:40:34 +02:00
MDW
42bb4fbf3e Qual: Enable & fix or ignore Invalid DimOffset (#31176)
* Qual: Enable & fix or ignore Invalid DimOffset

# Qual: Enable & fix or ignore Invalid DimOffset

The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.

This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later

* Nullable object typing in function signature not ok for 7.0/8.4

Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-29 21:52:31 +02:00
MDW
0da4d51003 Qual: Fix multiple phan notifications (#31151)
* Qual: Fix notifications multiple files

# Qual: Fix notifications multiple files

Fixes to files with UnknownObject notices, fixing other
notices in these files as well

* Improve boxes typing

* Qual: Extend accepted types to reduce notices

* Fix type for GET/POST arguments of GETPOST* calls
2024-09-28 12:09:35 +02:00
Frédéric FRANCE
2583190e4a fix phpstan (#31146)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-26 22:21:57 +02:00
MDW
9a9e851494 Qual: Fix new UndeclaredGlobalVariable notices & enable (#30963)
* Qual: 🛟 Fix typing

Qual: Fix typing

Fix some typing currently failing ci in develop.

* Fix typing for grabimages

* Qual: Fix new UndeclaredGlobalVariable notices & enable

# Qual: Fix new UndeclaredGlobalVariable notices & enable

This fixes several new notices regarding 'undeclared globals' which
mostly correspond to missing initialisations in views and some real
bugs where the variable name was incorrect.
Some less obvious cases are unsolved and ignored (adherents/list,
and fourn/commande/card).

This is in preparation of fixing the notices in the other files
where the baseline was already set to ignore them where most just
need a phan-var-force declaration which will help with verifying
type compatibity and object member verifications
2024-09-16 01:50:58 +02:00
MDW
f89245b354 Qual: Fix some CommonIncoterm/DocGenerator/People typings (#30940)
* Fix extraparams property typing

* Fix argument typing

* Fix 'status' argument type in calls to dolGetButtonTitle

* Fix argument2 for price to 1 (was 2)

* Fix deliveryreceipt argument

* Fix PHPDoc dol_sort_array

* Fix range for int argument

* Fix arg type for str_pad and add some PHPDoc

* Fix natsort value for dol_sort_array

* Fix arguments on calls to dol_sort_array

* Reduce phpstan exceptions

* Qual: Add type hints for Stripe objects

# Qual: Add type hints for Stripe objects

Suggest the more specific implementation of the StripObject.

* Typing, initialisation

* Qual: Fix undeclared variables

* Update phan baseline

* Update baseline

* Qual: Add type hints for Stripe objects

# Qual: Add type hints for Stripe objects

Suggest the more specific implementation of the StripObject.

* Add PHPDoc for host class properties

* Ignore false positive (phan) for deprecated property

* Improve typing

* Update baseline
2024-09-13 03:09:23 +02:00
Laurent Destailleur
b1ee18864f Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-12 01:43:43 +02:00