Commit graph

154212 commits

Author SHA1 Message Date
Alexandre SPANGARO
0c16f4ea94
FIX #37019 Adherent - Retablish no-email field (#38423)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-26 05:16:22 +02:00
Laurent Destailleur
af08694e9d More complete return value. 2026-05-26 03:54:31 +02:00
Laurent Destailleur
6cb08d00d9 css 2026-05-26 03:47:49 +02:00
Vincent Penel
28f1fbb11f
NEW add external contacts on the tickets event (#37870)
* add external contacts on the tickets event

* add hook createTicketMessageExternalContacts

* type

* opti

* delete result

* move hook

* Retour PR
2026-05-25 23:32:29 +02:00
Laurent Destailleur
3428b8a027 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-25 15:56:05 +02:00
Laurent Destailleur
2f226300f3 FIX Pagination in dictionary and email template list 2026-05-25 15:55:50 +02:00
VIAL-GOUTEYRON Quentin
fefbe81380
NEW : Replace MyObject MyModule occurences (#38370)
* [COREMB] Centralize myobject/mymodule substitutions via NamingContract value object

Introduce NamingContract (immutable value object) and NamingContractValidator
to replace 6 scattered ad-hoc $arrayreplacement blocks across index.php and
modulebuilder.lib.php. Fixes a critical bug where MYOBJECT token was commented
out in initobject, leaving generated class files with unsubstituted placeholders.

- NamingContract: canonical ordered substitution map (12 tokens with object,
  7 module-only), applyTo() via str_replace (not make_substitutions, to avoid
  processing Dolibarr __(key)__ patterns in raw templates), applyToFilename()
  for lowercase-only filename substitution
- StrictNamingContractValidator: post-generation scan for residual myobject/
  mymodule tokens, skipping /* BEGIN/END MODULEBUILDER */ structural markers
- modulebuilderValidateGeneratedFile() helper: non-blocking warnings with
  XSS-safe output via dol_escape_htmltag()
- Collision guard: InvalidArgumentException if module === object name
  (case-insensitive), wrapped in try-catch at all instantiation sites
- 24 PHPUnit tests, 52 assertions

* fix(initobject): apply object substitution to all module PHP files

After initmodule creates the module structure, files like index.php,
lib/module.lib.php, admin/setup.php and class/api_module.class.php
still contain myobject/mymodule placeholders. initobject now scans
ALL PHP files in the module directory and applies the full NamingContract
substitution, and deletes the orphan stats/myobject_index.php placeholder.

* fix(initmodule): prevent array_merge from renumbering the '500000' key

PHP casts numeric string keys like '500000' to int(500000) internally.
array_merge() then renumbers integer keys starting from 0, turning
'500000' into key 0. make_substitutions() then calls str_replace(0, ...)
which casts 0 to the string '0', replacing EVERY zero digit in every
generated file with the idmodule value.

Fix: replace the bare '500000' key with '$this->numero = 500000' so that
array_merge sees a non-numeric string key and preserves it as-is.

* Fix initapi: apply header substitution after addObjectsToApiFile

addObjectsToApiFile substitutes properties/constructor/includes via regex
but leaves PHPDoc header and class declaration with mymodule/myobject tokens.
Fix: apply $arrayreplacement (minus 'MYOBJECT' uppercase key) after
addObjectsToApiFile to resolve the remaining residuals.

'MYOBJECT' is excluded to preserve the /* BEGIN MODULEBUILDER API MYOBJECT */
placeholder that addObjectsToApiFile relies on for future object additions.

* Move NamingContractTest to core test directory

NamingContract and NamingContractValidator are core modulebuilder classes;
their tests belong alongside other Dolibarr core tests in test/phpunit/,
not in htdocs/modulebuilder/test/phpunit/ (the custom-module pattern).

Updated require_once paths accordingly.

* fix useless file

* fix(phpcs): add missing @param descriptions and function docblocks

- NamingContract: merge adjacent string literals in exception message,
  add description to @param $content in applyTo()
- NamingContractValidator: add descriptions to all bare @param tags
  in interface and StrictNamingContractValidator methods
- NamingContractTest: add /** @return void */ docblocks to all test
  methods, merge unnecessary string concat on template variable

* fix(phan/phpstan): remove readonly, add baselines for test file

- NamingContract: replace readonly properties with plain public string
  (readonly requires PHP 8.1, phan minimum target is PHP 7.2)
- dev/tools/phan/baseline.txt: add NamingContractTest.php suppression
  for PhanUndeclaredMethod (PHPUnit stubs not available in phan scope)
- NamingContractTest.php: add @phpstan-ignore class.notFound on class
  declaration and method.notFound on each assertion call (PHPUnit not
  in phpstan bootstrap, consistent with CommonClassTest.class.php)

* fix(phan/phpstan): suppress typed property warnings, NoopNew, class.notFound

- baseline.txt: add PhanCompatibleTypedProperty for NamingContract.class.php
  (typed properties require PHP 7.4, phan min target is 7.2 — warning only
  but phan exits 1 on any issue including warnings)
- baseline.txt: add PhanNoopNew for NamingContractTest.php (constructor
  called for exception side-effect in guard tests is intentional)
- NamingContractTest.php: move @phpstan-ignore class.notFound to inline
  comment on class declaration (docblock placement not picked up by phpstan)

* fix(phan/phpstan): add missing phan suppress on index.php l.574, fix phpstan class docblock

- index.php l.574: add @phan-suppress-next-line PhanPluginSuspiciousParamPosition
  (same pattern as l.577 and l.587 for identical dolReplaceInFile calls
  where local variable name $destfile matches parameter #3 of the function)
- NamingContractTest.php: use standalone /** @phpstan-ignore class.notFound */
  docblock before class declaration (inline // comment not picked up by phpstan
  on class declarations; separate docblock matches CommonClassTest.class.php pattern)

* Update baseline.txt

* fix(phan): add phan-file-suppress on NamingContractTest for PHPUnit undeclared methods

* fix(phan): suppress PhanNoopNew on expectException patterns in NamingContractTest

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-25 14:52:38 +02:00
MDW
80d8a459e1
Qual: Fix Hookmanager::executeHooks() notices with extended type (#38416)
# Qual: Fix Hookmanager::executeHooks() notices with extended type

Add int as possible key type to array corrects multiple notices.
2026-05-25 14:43:57 +02:00
MDW
180088d1ee
Qual: Add missing sqlite3 stub for Phan (#38426)
# Qual: Add missing sqlite3 stub for Phan

About 43 Phan notices on https://cti.dolibarr.org are present
because of missing information about SQLite3.
This stub and configuration change adds the information.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-25 13:30:24 +02:00
Jon Bendtsen
c1a4f3c181
NEW UXUI add helptext to function formconfirm (#38435)
* Qual public function formconfirm - replace spaces with tabs

* NEW add helptext to function formconfirm

* Semi hiding flex box

* fix broken html

* Remove height adjustment when helptext because helptext parameter is supplied after height, meaning caller will already know

* restore image help to form question

* no bold question

* Remove duplicate tr tag

* remove redundant height 1px since border-top is 2px

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-25 13:29:45 +02:00
Jon Bendtsen
abfce25afc
Qual public function formconfirm - replace spaces with tabs (#38430)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-25 13:28:57 +02:00
Alexandre SPANGARO
3569dd622a
Update VAT reduced rate of Bulgaria (#38434)
* Update VAT reduced rate of Bulgaria

* rate
2026-05-25 13:26:43 +02:00
Alexandre SPANGARO
3afd80b674
Poland - Update VAT Rate reduced 1 (#38433) 2026-05-25 13:25:42 +02:00
Alexandre SPANGARO
084ac8c1fb
ADD VAT rate of Hungary (#38432) 2026-05-25 13:25:13 +02:00
Jon Bendtsen
a0012b5d9c
Qual add deletion of product_fournisseur_price_log rows to ProductFournisseurPrice->delete() (#38418)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-25 02:43:28 +02:00
Jon Bendtsen
3444ee5630
Fix Product::delete() leaves orphan rows in product_fournisseur_price_log (#38419)
* Qual add deletion of product_fournisseur_price_log rows to ProductFournisseurPrice->delete()

* Fix #38383 Product::delete() leaves orphan rows in product_fournisseur_price_log

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-25 02:42:53 +02:00
Jon Bendtsen
3e7dfdc02b
NEW API endpoint for getting product price logs (#38420)
* New API endpoint for getting product price logs

* phan fixes build #16498 PR #38420

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-25 02:41:33 +02:00
Laurent Destailleur
f647b232d6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-25 02:35:30 +02:00
Laurent Destailleur
1e87370587 Debug v24 2026-05-25 02:32:09 +02:00
Jon Bendtsen
d022828fab
Qual Product api endpoint: get, put, delete - handle when id is 0 (#38417)
* QUAL hurl tests for API endpoints products

* Product api endpoint: get, put, delete - handle when id is 0

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-25 02:29:17 +02:00
Laurent Destailleur
31167b4b65 css 2026-05-25 02:28:29 +02:00
MDW
ccd7623c32
Fix CI: Fix PHPStan notices (#38415) 2026-05-25 02:28:18 +02:00
Laurent Destailleur
58608c5f8c NEW Add column einvoice_vate on VAT dictionary 2026-05-25 02:22:58 +02:00
Laurent Destailleur
655db3d3d5 Trans 2026-05-25 01:15:35 +02:00
Laurent Destailleur
b045de9e9b Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-25 01:09:03 +02:00
Laurent Destailleur
f32a4884e8 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-25 01:07:38 +02:00
Laurent Destailleur
bd97fbd653 Fix debian package 2026-05-25 01:01:08 +02:00
Laurent Destailleur
e67c919850 Prepare 22.0.5 2026-05-24 21:30:14 +02:00
Laurent Destailleur
fecaafb11f Better default limit for lists. 2026-05-24 21:23:15 +02:00
Laurent Destailleur
d9b75914a5 Fix tooltip and css 2026-05-24 00:35:26 +02:00
Laurent Destailleur
f0c1c9b9d9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-23 04:14:47 +02:00
Laurent Destailleur
f9ae664691 css 2026-05-23 04:14:35 +02:00
MDW
f55e7998cc
Qual: Fix Phan notices, set PHP min to 7.2 to avoid some (#38400)
* Qual: Fix Phan notices, set PHP min to 7.2 to avoid some

* Qual: Fix Phan and PHPStan notices

* Update apstats.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-23 04:09:56 +02:00
MDW
a7da46e5c8
Fix CI: Fix PHPStan notices (#38406) 2026-05-23 04:09:17 +02:00
Jon Bendtsen
03d8f4d8b5
NEW link to conferenceOrBoothAttendee from Proposal (#38359)
* 2 new functions makeAddLinkToObject and makeAddLinkToAttendee

* Add conferenceorboothattendee to possiblelinks

* Use the 2 new functions to present the objects to link to

* IF source object for link has fk_project, only show attendees with the same fk_project else rely on fk_soc #38359

* Pre-commit fix indent #38359

* pre-commit missing php doc #38359 #16309

* PHPStan fixes for build #16310 in PR #38359

* move date last

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-23 04:09:01 +02:00
Laurent Destailleur
b02f45e31a Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-23 01:47:29 +02:00
Laurent Destailleur
0e87c73107 Fix type 2026-05-23 01:46:54 +02:00
Laurent Destailleur
bef491fb9a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-23 01:40:29 +02:00
Laurent Destailleur
2d062713ef Clean code 2026-05-23 01:40:18 +02:00
Laurent Destailleur
248e479ac9 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-05-23 01:39:46 +02:00
Laurent Destailleur
32a6a95c34 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-23 01:33:56 +02:00
Laurent Destailleur
a2eadd7ed0 FIX out of dynamically recalculated unit price inc tax was missing
relative discount.
2026-05-23 01:33:38 +02:00
daraelmin
4aff1a7741
FIX: GDPR cron job false positive errors and birth date format (#38218)
- Fixed false positive error logging in `_recordActionResult`: an `update()` returning 0 (no rows affected) is no longer treated as an error (changed `<= 0` to `< 0`).
- Fixed `birth` date data type for Adherent anonymization: replaced the static string '1900-01-01' with a UNIX timestamp using `dol_mktime()` to comply with Dolibarr Core standards and prevent silent DAL failures.
2026-05-22 21:46:09 +02:00
John BOTELLA
a979542c09
New html attribute for batch table (#38342)
* New html attribute for batch table

* Add flag

* use dolPrintHTMLForAttribute

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 21:34:40 +02:00
John BOTELLA
fc2902a0fd
Add conf to disable add contract btn on order card (#38346)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 21:33:39 +02:00
Zakaria Boushaba
d0209abc43
NEW|New Add delivery date in supplier order linked object block (#38351)
* Feat: Add delivery date in supplier order linked object block

* Fix indents

---------

Co-authored-by: Zakaria Boushaba <z.boushaba@vold.africa>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 21:24:05 +02:00
Charlène Benke
951a73b79f
New add tcheck_file fields for controling expense report line (#38369)
* Add tcheck_file column to llx_expensereport_det table

* Add tcheck_file column to llx_expensereport_det

* Add tcheck_file property and update SQL queries

Added a new property 'tcheck_file' to track the check status of attached files and updated SQL queries to include this field.

* Update expensereportline.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 21:21:15 +02:00
Jon Bendtsen
c7801e611f
Fix #38397 Add contribution button fails badly on member contribution page has no token in url (#38399)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-22 21:20:25 +02:00
Frédéric FRANCE
ea0f00b37b
clean code (#38394)
* clean code

* clean code

* clean code

* clean code
2026-05-22 21:17:48 +02:00
MDW
f6cc55454e
Qual: Update Phan baseline and config using global variables for dolibarr_* (#38395)
# Qual: Update Phan baseline and config using global variables for dolibarr_*

- Add new global variables to config.php to improve static analysis
- Remove dolibarr_* global variable references in filefunc.inc.php
- Update Phan baseline
2026-05-22 14:19:29 +02:00