Compare commits

...

1999 Commits

Author SHA1 Message Date
Laurent Destailleur
3a4192a1f2 Fix CI. 2025-11-11 19:27:49 +01:00
Laurent Destailleur
2355a3b53b Merge branch 'fix_dev_mysql_workbench' of github.com:hregis/dolibarr into hregis-fix_dev_mysql_workbench 2025-11-11 17:59:54 +01:00
Laurent Destailleur
e1dffb015f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-11 17:47:33 +01:00
Laurent Destailleur
9b20da1475 Fix rename of function 2025-11-11 17:47:23 +01:00
Aksanti Bahiga tacite
228a91c923 [FEAT] Displaying the label instead of the id (#36210) 2025-11-11 17:44:39 +01:00
Frédéric FRANCE
89d4b29120 fix stock display in replenish (#36209) 2025-11-11 17:41:03 +01:00
Laurent Destailleur
d8656d523b Debug v23 2025-11-11 15:12:31 +01:00
Laurent Destailleur
2db13a49b9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-11 15:07:09 +01:00
Laurent Destailleur
9914e6280b WIP LNE 2025-11-11 15:06:57 +01:00
Norbert Penel
b30718ebfa Update ticket.class.php (#34932)
* Update ticket.class.php

bad init in class

* Update ticket.class.php

* Update ticket.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-11 11:18:50 +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
Frédéric FRANCE
538baecead display member photo with hash (#36205)
* display member photo with hash

* display member photo with hash

* display member photo with hash

* display member photo with hash
2025-11-11 08:58:29 +01:00
Regis Houssin
a00ff66f45 FIX member photo and thirdparty logo not deleted in documents directory (#36197)
* FIX member photo with web portal don't need login

* FIX member photo not deleted

* FIX pre-commit

* FIX phan error and uniformize code

* FIX pfffffff pre-commit

* FIX uniformize code

* FIX remove TODO

* FIX change const name

* FIX missing add in ECM during creation

* FIX add user photo in ecm

* FIX phan error
2025-11-11 08:56:33 +01:00
github-actions[bot]
1ee0c4f4ba PHPStan > Update baseline (#36208)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-11 08:52:46 +01:00
Laurent Destailleur
2df6fa0237 Add test on data decryption 2025-11-11 01:32:17 +01:00
Laurent Destailleur
78cb2e0294 Drop a not used column to simplify 2025-11-11 01:20:26 +01:00
Laurent Destailleur
cc7f297b47 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-11 01:00:27 +01:00
Laurent Destailleur
73cc0c1701 WIP LNE 2025-11-11 00:59:51 +01:00
Laurent Destailleur
35b0625a76 Fix regression 2025-11-11 00:27:18 +01:00
Laurent Destailleur
372487c30f Debug v23 2025-11-10 02:38:49 +01:00
Laurent Destailleur
933c90aa5e Clean language files 2025-11-10 02:19:32 +01:00
Laurent Destailleur
0076b1d276 Try to fix phpstan 2025-11-10 01:55:39 +01:00
Laurent Destailleur
50430d0a1b Debug v23 2025-11-10 00:41:20 +01:00
Laurent Destailleur
7b842b5028 Manage position of captcha modules. Fix responsive of setup page. 2025-11-10 00:28:38 +01:00
Laurent Destailleur
81790d0667 Debug v23 2025-11-09 23:12:34 +01:00
Laurent Destailleur
cca679c0a1 Add property parent 2025-11-09 21:57:56 +01:00
Laurent Destailleur
70f2836dbc Debug v23 2025-11-09 21:57:45 +01:00
Laurent Destailleur
a3c634affe Removed duplicated code 2025-11-09 21:29:28 +01:00
Laurent Destailleur
86b2db926f css 2025-11-09 21:26:54 +01:00
Charlène Benke
cb1b29dd6a Add sortorder parameter to selectForFormsList method (#36173)
there are a problem on many extrafields list : we can't sort list by decrease and sort from a specific fields since we have add an sql prevention on filter based on : separator (who is used to separate parameters)

@eldy  i propose to remplace on extrafields parameters the : in the sql injection prevention by another caracters, by exemple the ; or the § , and replace it after having explode all the parameters

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 21:23:32 +01:00
Laurent Destailleur
e25f213da1 Fix js not found 2025-11-09 21:09:23 +01:00
Laurent Destailleur
184c9ab6ad Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-09 20:42:58 +01:00
Laurent Destailleur
dfc5367f7f css 2025-11-09 20:42:47 +01:00
William Mead
6165c865bf NEW stock API GET movement (#36193)
* Added stock movement GET method

* Updated PHPDoc

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 20:16:28 +01:00
Vincent de Grandpré
9c73d4aa35 Fix 35017 accounts for local taxes 2 (#36160)
* FIX#35017 add locattaxes accounts to accounting defaults

* corr. libellés localtax pour afficher le bon pourcentage

* assurer la cohérence de la structure def_tva

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 20:15:27 +01:00
Laurent Destailleur
cd30258bec Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-09 20:05:19 +01:00
Laurent Destailleur
2880feaea5 Fix CI 2025-11-09 20:05:09 +01:00
William Mead
48defa3a87 Updated PHPDoc (#36191)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 19:59:10 +01:00
Regis Houssin
8c983073a3 FIX wrong path of libraries (#36194) 2025-11-09 19:58:50 +01:00
Aksanti Bahiga tacite
5a30ee1014 Add phone info in form public/members/new.php (#36119)
* Add phone info in form public/members/new.php

* Use GETPOST instead of GETPOSTISSET
2025-11-09 19:32:16 +01:00
Alexandre SPANGARO
61ddab5061 FIX Import/Export - Do not list imports or exports of Builder module backups of module descriptor files (#36192)
* FIX Import/Export - Do not list imports or exports of Builder module backups of module descriptor files

* FIX
2025-11-09 19:28:16 +01:00
Laurent Destailleur
9d70bcbf24 Doc 2025-11-09 19:19:49 +01:00
Laurent Destailleur
9d15e4e08e Fix CI 2025-11-09 19:12:24 +01:00
Laurent Destailleur
77930aaa3c css 2025-11-09 19:08:46 +01:00
Laurent Destailleur
f8e9d223f9 Clean code 2025-11-09 18:37:29 +01:00
Laurent Destailleur
ddb3ba4ece Removed PROPALE_ADDON_NOTE_PUBLIC_DEFAULT. Must use the generic feature
"default value feature"
2025-11-09 18:26:51 +01:00
Laurent Destailleur
abef925331 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-09 18:23:48 +01:00
Laurent Destailleur
a71194c4d4 Fix CI 2025-11-09 18:22:38 +01:00
Alexandre SPANGARO
69a22346eb NEW Dashboard - Add option in ihm to disable MRP thumb (#36185) 2025-11-09 18:07:57 +01:00
MDW
c39e87d703 Qual: Make $fields covariant, define type for $FIELDS in BankAccounts api (#36188)
* Qual: Make $fields covariant

* Qual: Update BankAccounts class phpDoc ($FIELDS)

# Qual: Update BankAccounts class phpDoc ($FIELDS)

Updated the documentation for the $FIELDS property.
2025-11-09 18:06:58 +01:00
Alexandre SPANGARO
472ad1d22c NEW Holiday - Allow to specify a specific mail address from (#36184)
* NEW Holiday - Allow to specify a specific mail address from

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 18:06:35 +01:00
Frédéric FRANCE
4334797588 clean code (#36179)
* clean code

* clean code

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 17:59:36 +01:00
MDW
0831c65913 Qual: Update Phan baseline.txt (#36190)
#Qual: Update Phan baseline.txt

Update the Phan baseline.txt file to reflect changes in the number of occurrences of specific issues.
2025-11-09 17:58:08 +01:00
Laurent Destailleur
533c32ff12 CSS 2025-11-09 16:41:14 +01:00
Laurent Destailleur
bd8b081a37 Debug v23 2025-11-09 16:37:11 +01:00
Laurent Destailleur
c42d783abe Fix regression 2025-11-09 14:53:09 +01:00
Laurent Destailleur
94ebf6e583 Debug v23 2025-11-09 13:42:45 +01:00
Laurent Destailleur
34145b8e45 Clean code 2025-11-09 12:43:04 +01:00
Laurent Destailleur
2ff17df01a Fix reset of budget 2025-11-09 04:29:02 +01:00
Laurent Destailleur
e41910b146 NEW add hourly rate in list of users 2025-11-09 04:19:18 +01:00
Laurent Destailleur
caad2bb2b9 Responsive 2025-11-09 04:04:12 +01:00
Laurent Destailleur
cf651c7544 Clean code 2025-11-09 03:58:55 +01:00
Laurent Destailleur
ff80a85962 css 2025-11-09 03:50:40 +01:00
Laurent Destailleur
8d21dda08b css 2025-11-09 03:29:20 +01:00
Laurent Destailleur
9d52e0b333 css 2025-11-09 03:24:27 +01:00
Laurent Destailleur
08c281b2e4 Fix date input on smartphone 2025-11-09 03:20:48 +01:00
Laurent Destailleur
e9229fd044 css 2025-11-09 03:04:29 +01:00
Laurent Destailleur
905173425f CSS 2025-11-09 03:00:37 +01:00
Laurent Destailleur
ddb1fd42fc Fix update of color when using HTML5 2025-11-09 02:40:40 +01:00
Frédéric FRANCE
114131d59d clean code (#36180)
* clean code

* clean code

* clean code
2025-11-09 01:34:33 +01:00
Frédéric FRANCE
eaf2b694c0 ticket progress nullable (#36178)
* ticket progress nullable

* ticket progress nullable
2025-11-09 01:32:47 +01:00
Jon Bendtsen
07f8b3c8f1 NEW Parent project column in list of projects (#36177)
* NEW Parent project column in list of projects

* you can now search on both ref and on label

* adding 2 warning icons when access is denied

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-11-09 01:31:51 +01:00
William Mead
7e8d32d0fc QUAL Stock movement API harmonize POST with GET (#36131)
* Harmonized POST input parameters names with GET output variable names. Updated changelog.

* Align with movement code

* Rename parameter 'label' to 'movement_label'

* Reduce regression cases

* Update api_stockmovements.class.php

* Rename inventorycode and movement_code properties

* Rename movement_code parameter to movementcode

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 01:22:16 +01:00
Frédéric FRANCE
b8c8bc4b01 fix fields doc (#36175)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 01:20:11 +01:00
Frédéric FRANCE
2be111c933 clean code (#36174)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 01:19:54 +01:00
Frédéric FRANCE
9491d880cf clean code (#36170)
* clean code

* Update bom.class.php

* Update commondocgenerator.class.php

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 01:19:31 +01:00
Frédéric FRANCE
ca0052e82d clean code (#36176)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-11-08 19:29:54 +01:00
Frédéric FRANCE
1e75d5a2d3 clean code (#36172)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-08 18:51:16 +01:00
Laurent Destailleur
a04e9c3e18 Fix CI 2025-11-08 18:43:40 +01:00
Laurent Destailleur
7b27b6b9c8 Fix CI 2025-11-08 18:38:56 +01:00
Laurent Destailleur
59dfe1423e Doc 2025-11-08 18:33:11 +01:00
Laurent Destailleur
6976d4a011 Fix phpunit test export 2025-11-08 18:09:48 +01:00
Laurent Destailleur
9f215b7b1d Debug v23 2025-11-08 17:12:41 +01:00
Laurent Destailleur
240352b89e Fix regression 2025-11-08 15:59:31 +01:00
Laurent Destailleur
e5c8ff5bc3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-08 15:52:37 +01:00
Laurent Destailleur
33f3fb5dbb Better implementation for #35929 2025-11-08 15:52:06 +01:00
github-actions[bot]
c2fcf5d697 PHPStan > Update baseline (#36171)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-08 14:02:08 +01:00
Frédéric FRANCE
e343b4ab1f clean code (#36166)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-11-08 14:01:19 +01:00
Laurent Destailleur
67ef39ff8d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-08 12:15:04 +01:00
Laurent Destailleur
0b8f8ee8a0 Clean code 2025-11-08 12:13:39 +01:00
Frédéric FRANCE
936b3cddfb fix common delete (#36167) 2025-11-08 11:57:22 +01:00
Frédéric FRANCE
4ee6aebbbf clean code (#36164) 2025-11-08 11:41:07 +01:00
Frédéric FRANCE
cbaf4e3791 clean code (#36163) 2025-11-08 11:40:51 +01:00
MDW
d4d06084a5 Qual: Add Typing, update language in CommonStickerGenerator class (#36161)
- Added type hints for phpstan
- Updated comments to English
- Improved some comments
2025-11-08 11:40:01 +01:00
Frédéric FRANCE
b54fd5ab02 clean code (#36162) 2025-11-08 11:39:24 +01:00
Frédéric FRANCE
223ce3fb84 clean code (#36157)
* clean code

* clean code
2025-11-08 11:31:09 +01:00
Laurent Destailleur
3afe861e34 css 2025-11-08 11:28:10 +01:00
Laurent Destailleur
1d1cd86c8e Trans 2025-11-08 11:22:24 +01:00
Laurent Destailleur
3c7b2f070d Trans 2025-11-08 11:12:47 +01:00
Laurent Destailleur
f221716a8a Doc 2025-11-08 10:56:45 +01:00
Laurent Destailleur
e67f1b8510 CSS 2025-11-07 20:15:39 +01:00
Laurent Destailleur
9ec5b94808 css 2025-11-07 20:02:16 +01:00
Laurent Destailleur
794ec7e880 Trans 2025-11-07 19:50:05 +01:00
Laurent Destailleur
4d2e51681f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-07 19:26:08 +01:00
Laurent Destailleur
dfbf173b17 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-07 19:25:42 +01:00
Charlène Benke
a8384403d3 Add project_task type to Categorie class 2/3 (#36152) 2025-11-07 18:46:42 +01:00
Frédéric FRANCE
cad3574179 common delete also files (#36146)
* common delete also files

* common delete also files

* common delete also files

* common delete also files

* common delete also files

* common delete also files
2025-11-07 18:44:14 +01:00
Frédéric FRANCE
a420e9a79a clean code (#36154)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-11-07 18:41:56 +01:00
github-actions[bot]
f70e12fc2b PHPStan > Update baseline (#36151)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-07 18:41:01 +01:00
Laurent Destailleur
7e4df12c3a Debug v23 2025-11-07 18:39:39 +01:00
Laurent Destailleur
cc63bedc4c Move UX/UI pae to Modulebuilder main page. Not a user setup of a
features so useless for an end user so moved into a dev area.
2025-11-07 18:24:15 +01:00
Laurent Destailleur
355092f6d7 Debug v23 2025-11-07 18:12:46 +01:00
Laurent Destailleur
544b145410 Look and feel v23 2025-11-07 16:11:07 +01:00
Laurent Destailleur
4a19407940 css 2025-11-07 15:52:42 +01:00
Laurent Destailleur
df57023546 CSS 2025-11-07 15:34:57 +01:00
Laurent Destailleur
bb502e5439 cs 2025-11-07 15:03:37 +01:00
Laurent Destailleur
f38eee5e49 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-07 13:58:40 +01:00
Laurent Destailleur
98382cb0bb Look and feel v23 2025-11-07 13:58:21 +01:00
Laurent Destailleur
87d69d6a0b Look and feel v23 2025-11-07 13:26:14 +01:00
Jessica-creat
3a4b11b824 NEW add timespent API endpoints for projects and tasks add also cascading assignment of contacts to tasks (#35897)
* demande d'ajout timespent

* feat(api): add timespent endpoints for projects and tasks

* add contact to product

* correction prettier

* revert

* feat(api): update timespent endpoints in api_projects and api_tasks

* Update api_projects.class.php

* Remove blank line before docblock in api_tasks.class.php

Removed unnecessary blank line before the docblock for the get contacts method.

* Update api_tasks.class.php

* Clarify return type in api_projects.class.php

Updated return type annotation for contact information array.

* Refine return type in get timespent method

Updated return type annotation for timespent method.

* Return raw contacts instead of cleaned data

* Update api_projects.class.php

* Return contacts array instead of cleaned data

Modified the return value to return the contacts array directly instead of cleaned data.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-07 00:09:14 +01:00
Vincent Maury
3284835892 Fix #35428 retained_warranty_date_limit not recorded (#36141)
* Fix #35428 retained_warranty_date_limit not recorded

* Fix #35428 retained_warranty_date_limit not recorded

---------

Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
2025-11-06 19:03:20 +01:00
Alexandre SPANGARO
20af12a806 FIX #36090 Accountancy - Inconsistent date on various journal (#36105)
* FIX #36090 Accountancy - Inconsistent date on various journal

* FIX CI

* Update
2025-11-06 17:25:18 +01:00
Alexandre SPANGARO
af4630c456 Typo (#36123) 2025-11-06 17:11:02 +01:00
sonikf
beddd5152a Add missing fk_project (#36128) 2025-11-06 17:10:28 +01:00
Frédéric FRANCE
ccc5707146 phpstan doc (#36129)
* phpstan doc

* Update html.form.class.php
2025-11-06 17:09:52 +01:00
sonikf
dc4a28cd0b NEW Add option to create standalone reception (#36134)
* Enable create menu for standalone reception

* Enable create menu for standalone reception

* Add Reception date

* Add option to create standalone reception

* fix pre-commit
2025-11-06 17:09:36 +01:00
sonikf
88241b30de NEW Add option to create simple standalone shipment of non origin (#35651)
* NEW Add option to create simple shipment of non origin

* Enable create menu for shipment

* Enable create menu for shipment

* Update sendings.lang

* fix phpstan

* fix syntax

* fix missing line

* Add validation for socid and update note display

* fix project

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-06 13:13:36 +01:00
Laurent Destailleur
c19f86a4bf Debug v23 2025-11-06 11:44:40 +01:00
Laurent Destailleur
1d2d7f04f2 Debug v23 2025-11-06 11:04:10 +01:00
Laurent Destailleur
2f898ff188 Debug v23 2025-11-06 10:50:31 +01:00
Laurent Destailleur
a1bc0dc27c css 2025-11-06 03:56:06 +01:00
Laurent Destailleur
b7213f0797 CSS 2025-11-06 03:48:31 +01:00
Laurent Destailleur
2e2ba8e144 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-06 03:10:30 +01:00
Laurent Destailleur
50ee4e2d72 CSS 2025-11-06 03:07:06 +01:00
Laurent Destailleur
3107435574 css 2025-11-06 03:03:50 +01:00
labiloute
382bc4e80e FIX: fetch LDAP members in LDAP sync sync_groups_ldap2dolibarr.php (#36117)
* FIX: Add missing left join to filter by extrafields (#36092)

Co-authored-by: Noé <noe@scopen.fr>

* FIX: fetch LDAP members in LDAP sync sync_groups_ldap2dolibarr.php

* Fix boolean parameter casing in fetch method

---------

Co-authored-by: noec764 <58433943+noec764@users.noreply.github.com>
Co-authored-by: Noé <noe@scopen.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-06 02:13:19 +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
Charlène Benke
933eeb7474 NEW : Implement listTimespent method in api_projects.class.php (#36093)
* Implement listTimespent method in api_projects.class.php

Added a new method to retrieve all timespent data with filtering options (with filter, sort, ...)

* Fix comment formatting and improve listTimespent method

* Fix comment formatting and adjust function definition

* Refactor response structure for pagination data

* Initialize obj_ret as an empty array
2025-11-06 02:10:53 +01:00
Laurent Destailleur
2c67389686 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-05 23:27:43 +01:00
Laurent Destailleur
19c6fb6f9b Fix categories 2025-11-05 23:27:31 +01:00
Charlène Benke
e5f71cd278 NEW Add contact tab on product service (#35914)
* Add contact tabs on product

* add contact type for product

* Implement contact management in contact.php

Add contact management functionality for products

* Insert product and service contact types

Added new contact types for products and services.

* Add help URL for product notes

phpstan alert
2025-11-05 22:50:38 +01:00
Laurent Destailleur
19ddd6e13a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-05 22:45:16 +01:00
Laurent Destailleur
5ff71267eb Fix regression 2025-11-05 22:45:05 +01:00
Vincent Maury
ba3603d5c9 NEW Show cron last result and output in info (#36028)
* Show cron last result and output in info

From now, last output and last result of a cron are only displayed in cron's list, and output isn't very convenient to read

This PR adds last output and last result in cron's info page

* Use dolPrintHTML to output the messages
2025-11-05 22:37:13 +01:00
Jon Bendtsen
31cc6a702a NEW qual fixes on api contract (#36066)
* QUAL: API contract: RestException update, check if thirdparty exists before creating contract

* using the entity of this contract

* Safer usage of getEntity

* using global ->entity

* testing if create with socid=0 should fail

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-11-05 22:35:25 +01:00
Frédéric FRANCE
36e90ab14e clean code (#36103)
* clean code

* Update card.php
2025-11-05 22:31:26 +01:00
Nasser
62eafb914a NEW: Currency for the Democratic Republic of Congo added. (#36104)
* NEW: Currency for the Democratic Republic of Congo added.

* FIX: Capitalize the first letter

* FIX: Adding Unicode.
2025-11-05 22:31:08 +01:00
Frédéric FRANCE
2cd881988e clean code (#36102)
* clean code

* Update bookmark.class.php
2025-11-05 22:26:54 +01:00
Laurent Destailleur
26c79375f1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-11-05 22:25:42 +01:00
Laurent Destailleur
afd9a21c16 Migration 2025-11-05 22:25:07 +01:00
Frédéric FRANCE
3a8b82ec0e clean workstation setup (#36100)
* clean workstation setup

* clean workstation setup

* clean setup
2025-11-05 22:24:02 +01:00
sonikf
39fa4dd720 New function to set reception date (#36101) 2025-11-05 22:23:24 +01:00
github-actions[bot]
0411367b8a PHPStan > Update baseline (#36108)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-05 22:22:43 +01:00
atm-lena
4e67dd3a81 Payment Mode for Thirdparty : Move tinyint to smallint (#36114)
* M

* Update 22.0.0-23.0.0.sql

* Change mode_reglement type from smallint to integer

---------

Co-authored-by: atm-lena <lena.papazian@atm-consulting.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-05 22:19:57 +01:00
Frédéric FRANCE
59789a8f02 add class_element_line (#36115) 2025-11-05 22:18:02 +01:00
Laurent Destailleur
4e001e0fba Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-05 22:16:44 +01:00
Laurent Destailleur
ed734ffeb9 Debug v23 2025-11-05 21:45:50 +01:00
Laurent Destailleur
37a0918393 CSS 2025-11-05 21:37:27 +01:00
Laurent Destailleur
4d2aea5ed7 CSS 2025-11-05 21:29:23 +01:00
Laurent Destailleur
6df93d0fb9 Debug v23 2025-11-05 21:24:19 +01:00
Laurent Destailleur
c5cf6f58a6 Doc 2025-11-05 20:47:14 +01:00
Laurent Destailleur
85ceba6b36 Add module name in tooltip 2025-11-05 20:04:49 +01:00
Laurent Destailleur
361a88a1c5 Add field email_sent_counter 2025-11-05 19:43:27 +01:00
Laurent Destailleur
0e3fdfe204 Add option MAIN_SETUP_MODULES_DESC 2025-11-05 15:42:33 +01:00
Laurent Destailleur
fb7a3edc64 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-05 14:26:53 +01:00
Laurent Destailleur
2aea630ac2 Add column access hours for users 2025-11-05 14:26:42 +01:00
Laurent Destailleur
15aa0fe0b0 Doc 2025-11-05 14:24:14 +01:00
Frédéric FRANCE
b3c7c1e0eb clean code (#36099) 2025-11-05 12:11:00 +01:00
Laurent Destailleur
c8ed79b905 Fix CI 2025-11-04 22:00:59 +01:00
Laurent Destailleur
655c8eb2db Debug v23 2025-11-04 21:55:56 +01:00
Laurent Destailleur
e072b171b7 CSS 2025-11-04 21:43:21 +01:00
Laurent Destailleur
b418e8e1e5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-04 21:34:54 +01:00
Laurent Destailleur
04b4d6bee3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-11-04 21:28:42 +01:00
github-actions[bot]
10cee8f51b PHPStan > Update baseline (#36075)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-04 18:46:36 +01:00
Frédéric FRANCE
13bc1e2e16 clean code (#36098)
* clean code

* clean baseline
2025-11-04 18:46:24 +01:00
Frédéric FRANCE
cbe8c660ab clean code (#36097) 2025-11-04 18:45:58 +01:00
Frédéric FRANCE
dbeb192f8b clean code (#36096) 2025-11-04 18:45:50 +01:00
Frédéric FRANCE
2993b4eb69 clean code (#36095) 2025-11-04 18:45:34 +01:00
Frédéric FRANCE
2ad3be3959 clean code (#36094) 2025-11-04 18:45:15 +01:00
Frédéric FRANCE
5bf4022200 enhance check for dol_now parameters (#36089)
* enhance check for dol_now parameters

* enhance check for dol_now parameters

* enhance check for dol_now parameters

* enhance check for dol_now parameters
2025-11-04 18:42:32 +01:00
Frédéric FRANCE
39f54ca1d0 test phpstan (#36069)
* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* test phpstan

* clean baseline

* test

* test
2025-11-04 18:41:36 +01:00
MDW
b925dd6c37 Qual: Make $fields type covariant (phpstan) (#36084)
# Qual: Make $fields type covariant (phpstan)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-04 14:16:17 +01:00
MDW
3b04eacf98 Qual: Fix multiple phpstan notices (#36083)
* Qual: Fix phpstan - type casting in treasuryjournal.php

Added explicit type casting to float calculations.

* Qual: Fix phpstan by testing possibly undefined $def_tva in VAT label generation

* Qual: Add null initialization for static analysis

Initialize $save_link_by_element and $save_element_by_link with null values to satisfy static analysis requirements (phpstan) and avoid possibly undefined notices.

* Qual:(accountingjournal): Ignore line for phpstan

phpstan can not see that $pre_data_info['error'] might be set.

* Qual: Removed redundant tests

Removed some redundant tests (detected by phpstan)

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-04 14:15:38 +01:00
Jon Bendtsen
a35fac2d9f New: Clickable links from PROFIT section (#36081)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-04 14:14:52 +01:00
Mathieu Pellegrin
2d06e4af70 TakePOS Cash Control report: Fix incorrect float approximation and string/float mix on test (#36003)
* Fix incorrect float approximation and string/float mix on equality test

* Replace price function with price2num for comparisons

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-04 13:08:18 +01:00
Laurent Destailleur
0c76fc1003 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-04 13:05:47 +01:00
Laurent Destailleur
0b4e2f3b90 Fix CI 2025-11-04 13:02:32 +01:00
Laurent Destailleur
6584ed2d6d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-04 12:53:39 +01:00
Laurent Destailleur
f355bff45a Fix scc 2025-11-04 12:50:17 +01:00
Laurent Destailleur
05d41cfd0f Fix pgsql seems v14 now. 2025-11-04 12:32:04 +01:00
Laurent Destailleur
6a98306eca Add column vatexemptcode 2025-11-03 18:32:22 +01:00
Laurent Destailleur
776e5b9088 Add column vatexemptcode 2025-11-03 18:30:37 +01:00
Laurent Destailleur
c75484d6be Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-03 16:12:19 +01:00
Laurent Destailleur
146980e440 Fix CI 2025-11-03 16:12:10 +01:00
Jessica-creat
0900f69936 NEW Add contact support on products in REST API (#35925)
* demande d'ajout timespent

* prettier

* revert modif

* revert

* feat(api): update product contact endpoints in api_products

* Fix

* Fix

* Fix

* Fix PHPDoc return type syntax in api_products.class.php

* Fix PHPDoc parameter types in api_products.class.php

* Update api_products.class.php

* Update api_products.class.php

* Fix return type annotation in API documentation

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-03 15:51:43 +01:00
Laurent Destailleur
be009f0418 Use fontawesome picto for phone instead of png 2025-11-03 14:42:39 +01:00
Laurent Destailleur
ab4e7d1e92 Fix picto 2025-11-03 14:40:03 +01:00
Laurent Destailleur
c5a2960cbd Fix phone picto 2025-11-03 14:39:09 +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
4a6c6ef725 FIX Clear filter 2025-11-03 13:44:25 +01:00
Laurent Destailleur
aa33c2254d Max length by default should be 0 2025-11-03 12:33:53 +01:00
Laurent Destailleur
21da38b935 Tooltips 2025-11-03 12:17:16 +01:00
Laurent Destailleur
8ac52ae91a Trans 2025-11-03 11:51:36 +01:00
Charlène Benke
36b3ddb883 NEW : Add task categories 1/3 (#35848)
* Create llx_categorie_project_task table

* Add primary key and indexes to llx_categorie_project_task

* Add project_task type to category class

* Implement setCategories method in task class

Added setCategories method to manage task categories.

* Add llx_categorie_project_task table with constraints

Create llx_categorie_project_task table and add constraints

* Update copyright and remove setCategories method

Updated copyright year for Charlene Benke and removed the setCategories method.

* Remove project_task constant and related mappings

* Modify primary key for llx_categorie_project_task

Updated primary key constraint for llx_categorie_project_task table.

* Rename llx_categorie_project_task.key.sql to llx_categorie_project_task-project.key.sql

* Rename llx_categorie_project_task.sql to llx_categorie_project_task-project.sql
2025-11-03 10:30:31 +01:00
sonikf
6743c38463 New prepare for standalone reception (#35869)
* New prepare for standalone reception

* New prepare for standalone reception

* fix line indentation

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-03 10:27:11 +01:00
Charlène Benke
49e74b07fe NEW : add conditional supplier price display (#35900)
* add conditional supplier price display

conditional display of supplier price information based on advanced user permissions.

* Remove unnecessary blank lines in card.php
2025-11-03 10:21:40 +01:00
Laurent Destailleur
3f45882d80 Debug v23 2025-11-03 03:48:14 +01:00
Laurent Destailleur
6ced6e2622 Trans 2025-11-03 02:17:35 +01:00
Laurent Destailleur
21f27ce45c CSS 2025-11-03 02:12:10 +01:00
Laurent Destailleur
70d4461c1d QUAL Add phpunit test to avoid a bad code sequence 2025-11-03 02:00:01 +01:00
Frédéric FRANCE
e4e2e06306 clean code (#36071)
* clean code

* Update blockedlog_list.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-03 01:32:15 +01:00
Frédéric FRANCE
93a305faa7 clean code (#36072)
$modecompta not empty here

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 21:49:34 +01:00
Laurent Destailleur
20fba19fca Fix warning 2025-11-02 21:40:34 +01:00
Laurent Destailleur
65a983c2d7 Fix warning 2025-11-02 21:40:02 +01:00
Laurent Destailleur
813adaa7b1 Move tool for file integrity into the blockedlog module. 2025-11-02 18:56:14 +01:00
Laurent Destailleur
fe07914d89 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-02 18:28:52 +01:00
Laurent Destailleur
64a09cd635 WIP LNE 2025-11-02 17:58:22 +01:00
MDW
c4712cbca7 Qual: Fix PhanTypeComparisonFromArray in pertype.php and peruser.php (#36068)
# Qual: Fix PhanTypeComparisonFromArray in pertype.php and peruser.php

- Update pertype.php and peruser.php to resolve PhanTypeComparisonFromArray notices.
When an array value is set, it's already an array so comparing to '' is
useless and invalid.
- Update baseline.txt to reflect reduced occurrences of phan issues.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 16:56:31 +01:00
Laurent Destailleur
71b4612a47 Remove module 2025-11-02 16:34:12 +01:00
Laurent Destailleur
78a2bfcef8 Removed module ExternalSite 2025-11-02 16:07:24 +01:00
Laurent Destailleur
54fd942a9f Fix warning 2025-11-02 15:34:10 +01:00
Laurent Destailleur
4b08955478 Trans 2025-11-02 14:59:01 +01:00
Laurent Destailleur
6ab539fe54 Fix url or module provider 2025-11-02 14:48:56 +01:00
Laurent Destailleur
d763a46fd3 Fix picto of modules 2025-11-02 14:26:46 +01:00
Laurent Destailleur
7f7518b389 Move status of modules 2025-11-02 14:21:29 +01:00
Laurent Destailleur
9a91513fc1 Enhance the method find in product batch 2025-11-02 13:47:29 +01:00
Laurent Destailleur
f295746f7d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-02 13:30:33 +01:00
Regis Houssin
b6c27f8052 NEW add the option to not synchronize thirdparty <--> member (#36033)
* NEW add possibility to not synchronize thirdparty <--> member

* FIX more simple

* Change getDolGlobalString to getDolGlobalInt

* Change getDolGlobalString to getDolGlobalInt

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 13:28:09 +01:00
MDW
436b270b0d Fix: SQL compatibility, increase size for incoterms/code (#36049)
* Fix: SQL compatibility, increase size for incoterms/code

- Modify llx_c_incoterms table to increase code field length
- Use `INSERT IGNORE` or `ON CONFLICT` depending on db type

* Simple sql INSERTs instead of INSERT IGNORE

* Qual: Update Incoterms code field in table definition

Updated the llx_c_incoterms table to modify the code field length, and removed modification in the data file.
2025-11-02 13:26:50 +01:00
Jyhere
f13172ee98 CHANGE: ExpenseReport::periodExists() rewrite (#36015)
* CHANGE: ExpenseReport::periodExists() rewrite

* Fix SQL query date condition formatting

* Change SQL condition to include date range

* Update expensereport.class.php

* Rename parameter in periodExists method

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 13:16:20 +01:00
Jon Bendtsen
154e5801a9 replacing variable MAIN_MODULE_OPENIDCONNECT with MAIN_AUTHENTICATION_OIDC_ON because openidconnect is no longer a module (#36051)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-11-02 13:07:46 +01:00
MDW
be588ee1be Qual: Update TVA intra field reference in quadri_detail.php (#36064)
- Changed reference from 'tva_intra' to 'company_tva_intra' in multiple locations
- Updated baseline.txt to reflect reduced occurrences of PhanTypeArraySuspiciousNull and PhanPluginUndeclaredVariableIsset
2025-11-02 13:06:34 +01:00
MDW
2de1724786 Qual: Fix donation notices (#36058)
* Qual: Fix missing abstract isEnabled for ModeleDon

# Qual: Fix missing abstract isEnabled for ModeleDon

* Qual: Fix donation list fields

# Qual: Fix donation list fields

Fixes PhanTypeMismatchProperty issues in don/list.php by typecasting and
adding d.ref field to query & using it.

* Fix: Fix call to ModeleDon::write_file

- Refactored write_file method in don.class.php to extraneous parameters
- Removed PhanParamTooMany warning from baseline.txt

* Qual: Remove duplicate assignment in list.php

Removed redundant assignment of projectstatic.id.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 12:58:12 +01:00
Frédéric FRANCE
6e1f01a942 fix a little warning (#36062) 2025-11-02 12:50:23 +01:00
MDW
6c5cd1c7b0 Fix: Uniform assign_values method signatures (#36063)
# Fix: Uniform `assign_values` method signatures

`Canvas` is calling `assign_values` with three arguments, so all methods
must have three arguments.

- Modified `actions_adherentcard_common.class.php` and `actions_contactcard_common.class.php` to add object reference parameter
- Updated `actions_adherentcard_default.class.php` and `actions_contactcard_default.class.php` to pass reference parameter to parent class
- Updated Phan baseline to reflect changes in canvas classes
2025-11-02 12:49:33 +01:00
Frédéric FRANCE
3963002486 fix show_optional with null (#36065) 2025-11-02 12:48:29 +01:00
Jon Bendtsen
20a428e2de QUAL: API contract: RestException update, check if thirdparty exists before creating/updating contract (#36007)
* QUAL: API contract: RestException update, check if thirdparty exists before creating contract

* also checking if socid exists during put

* using the entity of this contract

* also fixing entity during post

* some hurl tests of contract api

* check if contract id is 0, because that is not possible

* check (un)activate permissions and getEntity()

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 22:47:18 +01:00
MDW
7655c259f8 FIX: Define keyCodeForEnter before first use (takepos) (#36060)
# FIX: Define keyCodeForEnter before first use (takepos)

Move the code to get the keyCodeForEnter from the bottom of the file closer to the top.
This ensure that the variable is defined before first use.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 22:43:24 +01:00
Frédéric FRANCE
dd58e49736 clean code (#36057)
* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 22:42:12 +01:00
Laurent Destailleur
fe2cf18f52 Add warning in setup of openidconnect 2025-11-01 22:40:21 +01:00
Laurent Destailleur
a4fe30aded Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-01 22:26:54 +01:00
Laurent Destailleur
d93ccee00e Introduce global option MAIN_AUTHENTICATION_OIDC_ON to disable globaly
OIDC
2025-11-01 22:26:38 +01:00
MDW
808eaa8cfc Fix: Correct fields (takepos/receipt) (#36056)
# Fix: Correct fields (takepos/receipt)

- Use invoice date (not unavailable date_c);
- Correct ifprod1 to idprof1.
2025-11-01 21:57:34 +01:00
Laurent Destailleur
31b4e093cb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-01 19:37:25 +01:00
Laurent Destailleur
b1c7b1154f Debug v23 - Translation not loaded when it should 2025-11-01 19:36:35 +01:00
Mathieu Pellegrin
963deab290 Fix #35970 (#35971)
* Fix #35970

* Add test for invoice status
2025-11-01 18:57:54 +01:00
Frédéric FRANCE
91af13069a fix strict check (#36055) 2025-11-01 18:55:28 +01:00
Laurent Destailleur
b39902a4b4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-01 18:33:15 +01:00
Laurent Destailleur
2c16fffa38 WIP LNE 2025-11-01 18:33:05 +01:00
Frédéric FRANCE
ff7a684a0a clean code (#36054)
* clean code

* clean code

* avoid obj to be false

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-11-01 17:48:18 +01:00
MDW
073426d97e Qual: Fix multiple phan notices, update baseline (#36022)
* Qual: Fix phan notice with copy of attribute

* Qual: Fix phan notices with cast and updated param definition

* Qual: Fix phan notice with cast

* Qual: Update parameter type hint in utf8_check function

The parameter type hint for the $str parameter in the utf8_check function has been updated to include nullable types (string or int).

* Qual: Update User parameter type to nullable in call_trigger methods

The User parameter in call_trigger methods has been updated to be nullable to accommodate cases where the user object might not be available. This change ensures better flexibility and robustness in the codebase.

* Qual: Update phan baseline

* Qual: phpstan compatible type

* Qual: Add missing type hints for phan

- Add missing type hints for phan
- Fix indentation issues
- Improved consistency in code structure

* Qual: Update field configuration for backward compatibility

Enhanced the field configuration for backward compatibility by adding expected properties to the 'ref' field array.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 17:47:28 +01:00
Frédéric FRANCE
0a3d2c7ddc clean code (#36053)
* clean code

* clean code
2025-11-01 17:47:13 +01:00
Frédéric FRANCE
f4b91c40a1 fix dol_print_date (#36050)
* fix dol_print_date

* Update box_members_last_subscriptions.php
2025-11-01 17:46:30 +01:00
Frédéric FRANCE
60e2fec850 better debug (#36052) 2025-11-01 17:45:18 +01:00
Laurent Destailleur
79c672fda8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-01 13:32:56 +01:00
Laurent Destailleur
c599c114fe WIP LNE 2025-11-01 13:32:45 +01:00
Pierre Ardoin
9c66964104 NEW Add user permission for create/edit/delete supplier prices (#35940)
* Add copyright notice for Pierre Ardoin

* Update permissions for supplier prices management

* Add permissions for supplier purchase prices

* Enhance supplier price permissions

Added advanced permission checks for supplier price management.

* fix tabs&spaces

* fix tab@spaces

* Remove unnecessary blank lines in price_suppliers.php

* Remove unauthorized access checks for supplier prices

Removed access control checks for unauthorized supplier price creation and editing.

* Remove unnecessary blank line in price_suppliers.php

* Refactor user permission checks for supplier prices

replace $usercanwritesupplierprice with $usercancreate

* Refactor edit and remove links for supplier prices

* Update price_suppliers.php
2025-11-01 03:27:25 +01:00
Charlène Benke
e86aa52d83 Modify supplier reputation options in API products (#36029)
Updated supplier reputation parameter options.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 03:24:59 +01:00
Alexandre SPANGARO
2883a7d47a NEW Accountancy - Add reconcile on general accounting account - SQL part (#35994)
* NEW Accountancy - Add reconcile on general accounting account - SQL part

* Copyright

* Change term lettering for matching

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 03:17:27 +01:00
Lucas Marcouiller
d4cb81508d NEW Can update value of timespent with last task hourly rate (#36018)
* NEw update task hourly rate

* fix Ci

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 03:16:17 +01:00
Frédéric FRANCE
e00559b242 fix CI after file rename (#36021)
* fix CI after file rename

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 03:12:58 +01:00
Charlène Benke
211514c85e Fix assignment of public property in task class (#36011)
* Fix assignment of public property in task class

* Rename 'public' to 'project_public' in task class

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 02:58:27 +01:00
Bahfir Abbes
f2b0873e26 New module part webportallogin to allow login method definition by external modules in Dolibarr webportal (#36037)
* New module part webportallogin to allow login method definition by external modules in Dolibarr webportal

* Update webportal.main.inc.php

add WEBPORTAL_LOGIN_BY_MODULE to enable disable login by modules

* Fix condition check for web portal login module

---------

Co-authored-by: abb <contact@ab1consult.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 02:46:52 +01:00
Frédéric FRANCE
a2c1bc77c2 clean code (#36010) 2025-11-01 02:38:43 +01:00
Frédéric FRANCE
df5588b3e1 clean code (#36009) 2025-11-01 02:38:29 +01:00
MDW
2030b6a338 NEW: Update Incoterms to 2025 standards and add new terms (#36041)
- Updated existing Incoterms descriptions to reflect 2025 standards
- Added new Incoterms (DTP, DPP, DTP(DHL))
- Added migration script to handle existing installations

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 02:37:58 +01:00
Frédéric FRANCE
38a62ca163 clean code (#36012) 2025-11-01 02:37:42 +01:00
Maxime Kohlhaas
fe9a55259a NEW : add global search for resource object (#36043)
* NEW : add global search for resource object

* Update comment for quick search resource field

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 01:38:44 +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
05b14fb762 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-11-01 00:53:45 +01:00
Frédéric FRANCE
ef0f2ee4ee clean code (#36014) 2025-11-01 00:32:45 +01:00
Frédéric FRANCE
f1a418f042 clean code (#36016)
* clean code

* clean code

* clean code
2025-11-01 00:31:43 +01:00
Charlène Benke
0707b849fd Add French holiday translations to hrm.lang (#36035) 2025-11-01 00:30:43 +01:00
Laurent Destailleur
9562b68f7f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-31 18:32:34 +01:00
Laurent Destailleur
64854482d8 Doc 2025-10-31 18:25:49 +01:00
ThomasNgr-OpenDSI
1cd82c88cb Develop fix STOCK_MUST_BE_ENOUGH_FOR_(PROPAL|ORDER|INVOICE) (#33517)
* Manage STOCK_MUST_BE_ENOUGH_FOR_(PROPAL|ORDER|INVOICE) with new attribute stockable_product

* Use static properties for product types. Controle product type service.

* simpler condition for STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL
2025-10-31 17:15:18 +01:00
Laurent Destailleur
63ec276f5c Add DOLAPIENTITY into allowed http headers 2025-10-31 17:01:07 +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
cb7d856aa1 Doc 2025-10-31 16:28:21 +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
8cd3abb78d Can add a category without removing the others 2025-10-31 04:05:45 +01:00
Laurent Destailleur
bbd01729b6 Fix css 2025-10-31 03:29:24 +01:00
Laurent Destailleur
ee84fadd1c Comment 2025-10-31 02:22:14 +01:00
Laurent Destailleur
beb33d2f62 Fix trans 2025-10-30 23:06:34 +01:00
Laurent Destailleur
96ab49b80d Doc 2025-10-30 23:02:53 +01:00
Laurent Destailleur
e21139558a Debug v23 2025-10-30 22:34:34 +01:00
Laurent Destailleur
9152e86c5a Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-30 22:30:47 +01:00
Laurent Destailleur
2686238fe9 Clean code. select2 component need less code in html page 2025-10-30 22:21:12 +01:00
Laurent Destailleur
ee2db13af7 Trans 2025-10-30 17:45:20 +01:00
Laurent Destailleur
31f14faa0f Debug v23 2025-10-30 17:40:54 +01:00
Laurent Destailleur
9eee6b187f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-30 14:42:09 +01:00
Laurent Destailleur
187840dbb3 NEW Can add info of main IT service provider in setup. 2025-10-30 14:41:37 +01:00
Laurent Destailleur
8e9290abd6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-30 02:59:33 +01:00
Laurent Destailleur
cd86879db3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-30 02:20:20 +01:00
Laurent Destailleur
305aced04b FIX #35247 FIX #35950 Using same option for landing page and home page
leads to fatal errors with admin that is blocked.
Only the "Landing page" feature seems stable, so we keep it and use
another constant for the unstable "Home page" option.
2025-10-30 02:19:34 +01:00
VIAL-GOUTEYRON Quentin
c616e27274 New Hooks propals/orders (#35989)
* Add hook manager support for appending custom filter clauses across various SQL queries.

* Add hook manager support for custom SQL filters across multiple modules.

* Remove obsolete test code from api_proposals.class.php

* Remove unnecessary blank lines in card.php

* Remove unnecessary blank lines in card.php

* Remove unused object initialization and 'boxcode' parameter in product class

* Update api_proposals.class.php

* Initialize hooks for order API access

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-30 01:51:29 +01:00
Charlène Benke
f6f9f1214d NEW Add auto-reference generation for tasks (like in project) in API (#35981)
* Add auto-reference generation for tasks (like in project)

* Fix phan-var-force annotation for modTask
2025-10-30 01:15:40 +01:00
kollibar
414c6927be NEW Add accounting export mode for ISTEA (#36006)
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 80e67e665a.

* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).

correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."

This reverts commit 12ccfa60fa.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 6fb35a6d2e.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* correction commit for phan

* Correction for Travis CI

* I forgot to correct a line

* Correction for phpcs

* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue

* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on

* spelling correction in comment that don't pass pre-commit check

* trailing whitespace forget

* Add function to split a discount in 2 by API REST

* correction for phan & php-stan

* correction for phan & php-stan

* correction for phan & php-stan

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

* Add accounting export mode for ISTEA

* Add accounting export mode for ISTEA

* add english translation

* Add accounting export mode for ISTEA

* Add accounting export mode for ISTEA

* Add accounting export mode for ISTEA

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-30 01:13:14 +01:00
Laurent Destailleur
59e0320984 Clean code 2025-10-30 00:28:49 +01:00
Laurent Destailleur
1a8d91eee2 Fix CI 2025-10-30 00:07:50 +01:00
Laurent Destailleur
0f56916173 Clean comment 2025-10-29 23:46:55 +01:00
Laurent Destailleur
f319f32452 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-29 23:39:54 +01:00
Laurent Destailleur
786449d633 Translation: french "Lettrage" is "Matching" in English. "Reconcile"
seems mostly used for "Rapprochement bancaire"
2025-10-29 23:38:37 +01:00
Mathieu Pellegrin
6a9d50513f Fix incorrect total discount (missing loop after GROUP BY query) (#36000)
* Fix incorrect total discount (missing loop after GROUP BY query)

* Make phpcs happy

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-29 23:19:47 +01:00
Laurent Destailleur
a42ea407f2 NEW date function related to holiday can accept country id in addition
to country code
2025-10-29 23:14:15 +01:00
Frédéric FRANCE
bda086bf0e add missing translation and clean code (#35956)
* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add doc

* add doc
2025-10-29 22:25:23 +01:00
Frédéric FRANCE
3b61b77b79 fix fetch extraparams (#35986)
* fix fetch extraparams

* fix

* fix

* Update FactureTest.php
2025-10-29 22:19:07 +01:00
Charlène Benke
006c9dcc99 Add progress parameter to api task addTimeSpent method (#35992)
Added optional progress parameter to addTimeSpent method.
2025-10-29 22:10:25 +01:00
Frédéric FRANCE
77a06a6cfd fix CI (#35995)
* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update societe.class.php

* Update societe.class.php
2025-10-29 22:07:14 +01:00
Laurent Destailleur
99d311402d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-29 19:05:33 +01:00
Laurent Destailleur
4c84650e39 NEW Add API for Holidays/Leaves 2025-10-29 18:58:06 +01:00
Laurent Destailleur
f32aeac947 NEW Show warning on banner when an email is not valid 2025-10-29 17:00:55 +01:00
Laurent Destailleur
d0c4d2d8b4 NEW Output of category tag is nicer for long subcategories. 2025-10-29 16:50:09 +01:00
Laurent Destailleur
4fd6894210 Fix capital when value is 0 2025-10-29 14:32:51 +01:00
Laurent Destailleur
7b44d610d4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-29 13:29:03 +01:00
Laurent Destailleur
d0123c3795 Clean code 2025-10-29 13:28:53 +01:00
Alexandre SPANGARO
e68cb0fc00 NEW Accountancy - Add accounting for discounts (#35977)
* NEW Accountancy - Add accounting for discounts - Update menu

* NEW Accountancy - Add accounting for discounts - Setup

* NEW Accountancy - Add accounting for discounts - Language

* NEW Accountancy - Add accounting for discounts - Setup

* NEW Accountancy - Add accounting for discounts - Language

* NEW Accountancy - Add accounting for discounts - Function

* FIX CI

* FIX CI

* Fix CI

* FIX CI
2025-10-29 10:54:14 +01:00
Laurent Destailleur
870ee50729 Fix pos_print_counter 2025-10-28 23:35:42 +01:00
Frédéric FRANCE
db9ac18451 fix typo (#35983) 2025-10-28 19:21:21 +01:00
Laurent Destailleur
ab56e3a2c1 Clean code. Removed not working and duplicate feature of post phone
interface (standard interface works better).
2025-10-28 16:57:49 +01:00
Laurent Destailleur
cf18a71a75 WIP LNE 2025-10-28 15:12:45 +01:00
Laurent Destailleur
8e005b19c0 WIP LNE 2025-10-28 15:07:49 +01:00
Laurent Destailleur
e47925af7c WIP LNE 2025-10-28 14:14:28 +01:00
Laurent Destailleur
541e5fefdc Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-28 13:33:06 +01:00
Laurent Destailleur
9214ee5d2a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-28 13:07:31 +01:00
Laurent Destailleur
a1b4d1a06e WIP LNE 2025-10-28 13:07:19 +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
Charlène Benke
e69f56acbe New Add color fields on user group (#35646)
* Add color column to llx_usergroup table

* Add color column to llx_usergroup table

* Add color property to user group class

* Add color attribute to user group card

* Add ColorGroup translation to users.lang

* Add ColorGroup translation in French language file

* Fix SQL syntax for adding color column in llx_usergroup

* Fix SQL syntax for adding color column in llx_usergroup

* Fix color column addition in llx_usergroup table

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-28 02:26:49 +01:00
Mathieu Pellegrin
88cf4654b4 FIX #35884 (#35885)
Change GETPOST method for password fields to use "password" instead of "alpha".

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-28 02:22:15 +01:00
Frédéric FRANCE
34a1c824b7 NEW public pages donation, ticket and member use captcha setup (#35913)
* donation use captcha setup

* donation use captcha setup

* member use captcha setup

* member use captcha setup

* member use captcha setup

* member use captcha setup

* member use captcha setup

* ticket use captcha setup

* ticket use captcha setup

* clean

* clean
2025-10-28 02:21:06 +01:00
Frédéric FRANCE
8cbe1b55af add dolBuildUrl (#35947)
* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* clean
2025-10-28 01:40:02 +01:00
Frédéric FRANCE
7342a58044 clean phpstan baseline for supplier invoice class (#35945)
* clean phpstan baseline for supplier invoice class

* clean phpstan baseline for supplier invoice class
2025-10-28 01:25:46 +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
e37c7678a4 FIX avoid warning if NOREQUIRETRAN is defined (eg ajax) (#35954) 2025-10-28 01:24:02 +01:00
Regis Houssin
cac1058caf NEW add extraparams field in llx_categorie (#35975) 2025-10-28 01:22:02 +01:00
Frédéric FRANCE
972295ea3c add missing translation (#35958) 2025-10-28 01:13:14 +01:00
Frédéric FRANCE
a487ce4923 add missing translation (#35959)
* add missing translation

* add missing translation

* clean missing
2025-10-28 01:12:45 +01:00
dependabot[bot]
8ac1fca761 Bump actions/upload-artifact from 4 to 5 (#35960)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 01:12:07 +01:00
sonikf
8ed78a31b1 Add tpl files for standalone reception (#35966)
* Add tpl for standalone reception

* try to fix phan
2025-10-28 01:10:11 +01:00
Regis Houssin
210328dd33 FIX avoid php warnings (#35967) 2025-10-28 01:07:22 +01:00
Jyhere
ce7e9f4027 FIX: warning on invoice list when no extrafield (#35968) 2025-10-28 01:05:34 +01:00
Frédéric FRANCE
9b512f565f try to make new checks (#35976)
* try to make new checks

* try to make new checks

* try to make new checks

* try to make new checks

* try to make new checks

* try to make new checks
2025-10-28 00:57:01 +01:00
Laurent Destailleur
df5c3a8084 Clean code 2025-10-27 22:18:20 +01:00
Laurent Destailleur
342120f893 Debug v23 2025-10-27 21:42:21 +01:00
Laurent Destailleur
de2641c842 Trans 2025-10-27 21:08:28 +01:00
Laurent Destailleur
a7a3ad2352 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-27 20:59:21 +01:00
Laurent Destailleur
bf4140e8f8 Doc 2025-10-27 20:59:11 +01:00
Charlène Benke
9a9eec75fc add hook on printColDescContent (#35741)
* add hook on printColDescContent

Allow to add more informations on pdf description with hook management.

sample hook use : 
	public function printColDescContent($parameters, &$object, &$action)
	{
		$pdf = $parameters['pdf'];
		if ($object->name == 'sponge mydiscount') {
			//var_dump($parameters, $object, $action); exit;
			$pdf->MultiCell(0, 3, "xxxxx", 0, 'L', 0, 1, '', '', true);
			return 1;
		}
	}

* Add hook support to printColDescContent method
2025-10-26 14:43:40 +01:00
Regis Houssin
24f1aa1f63 FIX youhou 2025-10-26 04:50:21 +01:00
Regis Houssin
fb7b8f6c28 Revert "FIX modeste"
This reverts commit a268f6265f.
2025-10-26 04:49:59 +01:00
Regis Houssin
a268f6265f FIX modeste 2025-10-26 04:47:21 +01:00
Regis Houssin
52d714865c FIX Brian is in the kitchen 2025-10-26 03:10:40 +01:00
Regis Houssin
8900b8e7bd FIX Mister D 2025-10-26 03:03:38 +01:00
Regis Houssin
58942df61e FIX add apple 2025-10-26 02:52:01 +01:00
Regis Houssin
cdcbc60ec2 NEW add link to mac api rest client for test 2025-10-26 02:37:01 +01:00
Regis Houssin
b6ce064641 QUAL update mysql workbench 2025-10-26 02:53:36 +02:00
Frédéric FRANCE
48d2dd8956 clean code (#35915)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-25 23:09:16 +02:00
Pierre Ardoin
4d69d875f0 FIX Token issue when deleting a line (#35935)
* Sécurisation du jeton CSRF pour la suppression de transfert de stock

* Sécuriser les actions de suppression de transfert de stock

* Corriger l'indentation du lien de suppression de ligne

* Supprimer les commentaires français des protections CSRF

* Remove CSRF token check for delete actions

Removed CSRF token validation for delete actions.
2025-10-25 23:05:52 +02:00
Frédéric FRANCE
a31a02dbe5 Update setup_conf.sh (#35937)
* Update setup_conf.sh

* Update setup_conf.sh
2025-10-25 23:04:44 +02:00
Frédéric FRANCE
d07de98ad8 Update makepack-dolibarr.pl (#35938) 2025-10-25 23:04:15 +02:00
Frédéric FRANCE
e67651f5bc Update github_commits_byversion.sh (#35939) 2025-10-25 23:02:55 +02:00
Alexandre SPANGARO
658770a449 FIX Accountancy - Not propose to write operation on draft asset (#35943) 2025-10-25 22:57:13 +02:00
Frédéric FRANCE
4ac3c3f8b6 clean phpstan baseline of supplier order class (#35942)
* clean phpstan baseline of supplier order class

* clean phpstan baseline of supplier order class

* clean phpstan baseline of supplier order class

* clean phpstan baseline of supplier order class

* clean phpstan baseline of supplier order class

* clean phpstan baseline of supplier order class
2025-10-25 22:55:06 +02:00
Alexandre SPANGARO
c0cfd77cb9 FIX - Accountancy - Wrong length apply when various operation are proposed (#35944) 2025-10-25 22:54:46 +02:00
Frédéric FRANCE
675ec205f4 clean phpstan baseline (#35946) 2025-10-25 22:53:09 +02:00
Regis Houssin
591395f44b QUAL uniformize and globalize accesskey/stringforfirstkey + for Mac OS this is "CTRL + Option + key" (#35948)
* QUAL uniformize en globalize accesskey/stringforfirstkey + Mac os is
CTRL + Option + key

* FIX pre-commit error
2025-10-25 22:52:55 +02:00
github-actions[bot]
21a933bd2e PHPStan > Update baseline (#35949)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-25 20:39:40 +02:00
Laurent Destailleur
729e19cecb Fix warning 2025-10-24 23:05:49 +02:00
Laurent Destailleur
cd2f4bb7d2 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-24 19:46:38 +02:00
Frédéric FRANCE
16371177ac fix doc (#35923) 2025-10-24 18:29:27 +02:00
github-actions[bot]
d4905ca777 PHPStan > Update baseline (#35926)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-24 18:28:50 +02:00
Frédéric FRANCE
f807b77c25 add captcha on recrutiment public page (#35931)
* add captcha on recrutiment public page

* add captcha on recrutiment public page

* add captcha on recruitment public page
2025-10-24 18:24:12 +02:00
Frédéric FRANCE
d22b6abe59 update hash in windows-ci.yml (#35932) 2025-10-24 18:21:16 +02:00
Laurent Destailleur
eec7c592c0 FIX dol_print_date with param gmt when server is not UTC. 2025-10-24 15:30:02 +02:00
Laurent Destailleur
c6c968374a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-24 11:42:53 +02:00
Laurent Destailleur
b3d8e7078e Trans 2025-10-24 11:40:38 +02:00
John BOTELLA
bbec4721a4 UIUX : webportal css style PART 03 : allow select login form theme for webportal (#35849)
* WIP : add theme selection

* final style

* fix class

* fix css

* fix comment

* PHP stan

* PHP stan

* PHP stan

* PHP stan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-24 11:19:13 +02:00
Laurent Destailleur
1e1d8de59a Try to use hint index only when not counter productive. 2025-10-24 03:34:18 +02:00
Laurent Destailleur
ba4878b490 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-24 03:20:17 +02:00
Laurent Destailleur
fe71668d0d Replace use of DISTINCT with WHERE EXISTS 2025-10-24 03:15:51 +02:00
Regis Houssin
de62f22493 QUAL avoid to calling "closeTopMenuLoginDropdown" after all click (#35898)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-23 16:38:07 +02:00
Laurent Destailleur
c03026a41d Debug v23 2025-10-23 14:59:19 +02:00
Laurent Destailleur
23fcfd233c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-23 14:48:00 +02: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
Laurent Destailleur
69060a6f49 Complete #35888 2025-10-23 14:47:20 +02:00
Frédéric FRANCE
8e0566a33b add ajax tooltip for recruitment candidature (#35910)
* add ahax tooltip for recruitment candidature

* add ajax tooltip for recruitment candidature
2025-10-23 14:32:45 +02:00
Laurent Destailleur
0346d901be Clean code 2025-10-23 14:31:45 +02:00
Laurent Destailleur
1e84852825 Clean code 2025-10-23 14:26:47 +02:00
Laurent Destailleur
628aacd7fe Clean code 2025-10-23 14:14:53 +02:00
Frédéric FRANCE
f89cc919b8 clean code (#35894)
* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-23 14:05:59 +02:00
Jon Bendtsen
802e4b6491 NEW API user/groups/ POST, PUT, DELETE + some hurl tests (#35903)
* NEW API user/groups/ POST, PUT, DELETE + some hurl tests

* indent fix

* saving note_private (Ryan) during create and detect if we call ourselves?

* fix call with wrong arguments

* Reshow array's in the json output

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-23 13:56:22 +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
Frédéric FRANCE
f203eace15 make jobposition ajaxtooltip (#35899)
* make jobposition ajaxtooltip

* make jobposition ajaxtooltip

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-23 13:26:25 +02:00
Laurent Destailleur
c42f2e4c88 Doc 2025-10-23 01:44:43 +02:00
Laurent Destailleur
57670bd45e Comment to prepare use of specific VAT code for vat exemption 2025-10-23 01:41:33 +02:00
Laurent Destailleur
2f38d267b3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-23 01:01:09 +02:00
Laurent Destailleur
713eeeacf2 Revert option
MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL
into MAIN_USE_VAT_ZERO_FOR_COMPANIES_IN_EEC_EVEN_IF_VAT_ID_UNKNOWN
2025-10-23 01:00:24 +02:00
Laurent Destailleur
ea0fcd193c Fix CI 2025-10-22 22:31:51 +02:00
Laurent Destailleur
412a224d90 Fix CI 2025-10-22 22:28:55 +02:00
Laurent Destailleur
73d3067b16 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-22 22:09:49 +02:00
Laurent Destailleur
ec109fa7ea Fix default fields for POS 2025-10-22 22:09:15 +02:00
Laurent Destailleur
52ea569239 Fix default fields for POS 2025-10-22 22:07:17 +02:00
Laurent Destailleur
93bb6035b8 FIX Column Terminal is forbidden in POS context 2025-10-22 21:11:04 +02:00
Laurent Destailleur
2efff17837 Fix deprecation 2025-10-22 20:06:24 +02:00
Laurent Destailleur
7f04762b17 Fix merge pb 2025-10-22 18:56:05 +02:00
Laurent Destailleur
c465a5c8da Fix CI 2025-10-22 18:28:00 +02:00
Laurent Destailleur
2f64e56ef2 Fix CI 2025-10-22 18:26:31 +02:00
Laurent Destailleur
4bae3f6eec Must use StudlyCaps or PascalCase for class name 2025-10-22 18:15:27 +02:00
Laurent Destailleur
7db8a7eadc Fix regression 2025-10-22 18:12:10 +02:00
Laurent Destailleur
c1831b76a3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-22 18:04:57 +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
Laurent Destailleur
e314c075a7 Removed property that seems not used. 2025-10-22 17:59:51 +02:00
Alexandre SPANGARO
d6b2b12419 #35859 Review data of payment term by default (#35870)
* #35859 Review data of payment term by default

* Restore rowid

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 17:57:25 +02:00
Alexandre SPANGARO
8f51b05a57 NEW Accountancy - Add field centralized on import/export (#35872)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 17:44:36 +02:00
Vincent Maury
27ed249561 NEW : add supplier payment mail template (#35877)
* Fix 35865 no formail displayed in supplier payment

* - add possibility to create custom mail template for supplier invoices payment
- add a default template
- add 2 new substitutions keys : __SUPPLIER_PAYMENT_INVOICES_LIST__ and  __SUPPLIER_PAYMENT_INVOICES_TOTAL__

* - add possibility to create custom mail template for supplier invoices payment
- add a default template
- add 2 new substitutions keys : __SUPPLIER_PAYMENT_INVOICES_LIST__ and  __SUPPLIER_PAYMENT_INVOICES_TOTAL__

---------

Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 17:44:01 +02:00
William Mead
29eabe9a75 Added stock movement API data pagination (#35875)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 17:43:24 +02:00
Laurent Destailleur
33e27947ca WIP LNE 2025-10-22 16:31:47 +02:00
Laurent Destailleur
7fa99f6e15 QUAL Moved structure of table printer_receipt into sql instead of php 2025-10-22 15:36:16 +02:00
Laurent Destailleur
c82a709ff3 FIX Printers can have duplicate names 2025-10-22 15:27:48 +02:00
Laurent Destailleur
8de37232d8 Debug v23 2025-10-22 14:41:35 +02:00
Laurent Destailleur
95741170ab WIP LNE 2025-10-22 14:31:04 +02:00
Laurent Destailleur
e3ff9e5c2d Clean code 2025-10-22 14:17:04 +02:00
Laurent Destailleur
2c1ab9b40a Clean code 2025-10-22 14:14:58 +02:00
Laurent Destailleur
8d50b69bce Add a test if command not found 2025-10-22 13:30:36 +02:00
Laurent Destailleur
43aa97edcc Move method 2025-10-22 12:40:56 +02:00
Laurent Destailleur
3bc8d435a4 WIP LNE 2025-10-22 12:35:30 +02:00
Laurent Destailleur
2c71ce566f Doc 2025-10-22 12:17:14 +02:00
Laurent Destailleur
165242c0fb Move version info into a dedicated file 2025-10-22 12:16:09 +02:00
Laurent Destailleur
481f3f1a9e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-22 11:06:14 +02:00
Laurent Destailleur
be351614e2 NEW DEV Can set color of the on/off button. 2025-10-22 11:05:59 +02:00
Frédéric FRANCE
e274a9c31c do not check in htdocs/includes (#35886)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 02:47:05 +02:00
Laurent Destailleur
bc20306426 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-22 02:45:08 +02:00
Laurent Destailleur
f6004f22ff Add missing index file 2025-10-22 02:44:48 +02:00
Vincent Maury
0ddd2b194f Fix 35865 no formail displayed in supplier payment (#35867)
Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-22 02:32:36 +02:00
Laurent Destailleur
74455fd391 FIX #35887 2025-10-22 02:21:52 +02:00
Laurent Destailleur
58abe1291c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-22 02:05:19 +02:00
Laurent Destailleur
7724e58d6d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-22 02:05:18 +02:00
Laurent Destailleur
aca82c627f FIX dol_eval when having " !(...)" 2025-10-22 02:04:40 +02:00
Frédéric FRANCE
acb1bc22c4 add upload on recruitment job and fix CI (#35880)
* add upload on recruitment job

* add upload on recruitment job

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2025-10-22 00:48:28 +02:00
Laurent Destailleur
73c559b9d5 Complete llx_oauth_token 2025-10-21 20:22:11 +02:00
Laurent Destailleur
bbb96e3c14 Fix migration of token 2025-10-21 20:16:15 +02:00
Laurent Destailleur
3975453a75 Move some part of code from filefunc into master. 2025-10-21 19:08:24 +02:00
Laurent Destailleur
0fe5b9c52b Trans 2025-10-21 16:54:42 +02:00
Laurent Destailleur
a0411e6725 Doc 2025-10-21 14:54:56 +02:00
Laurent Destailleur
f35536712f WIP LNE 2025-10-21 14:41:42 +02:00
Laurent Destailleur
d8b63e6fa6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-21 10:35:24 +02:00
Laurent Destailleur
bf6e7d80e0 Fix edit mode 2025-10-21 10:35:11 +02:00
Alexandre SPANGARO
02f949c4b7 NEW Accountancy - Manuel input - Add script to greyed out subledger_account if general ledger is not centralized (#35855)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 02:13:38 +02:00
Lucas Marcouiller
ad67faa01d New all project contact in task creation (#35862)
Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 02:13:10 +02:00
Alexandre SPANGARO
cdd4dde166 NEW Accountancy - Various payment - Add script to greyed out subledger_account if general ledger is not centralized (#35842)
* NEW Accountancy -  Add data-centralized in select_account()

* NEW Accountancy - Add script to greyed out subledger_account if general ledger is not centralized

* Fix phan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 02:08:19 +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
William Mead
8b47aadb1c Added warehouse api data pagination (#35866)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 02:04:51 +02:00
Laurent Destailleur
4799705cd8 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-21 02:03:34 +02:00
Alexandre SPANGARO
ffa489ee59 NEW Accountancy - Transaction - Add verification on centralized account (#35824)
* NEW Accountancy - Transaction - Add verification on centralized account

* Fix phan

* Fix phan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 01:06:21 +02:00
Frédéric FRANCE
894e73e9cf add new elements properties magic (#35861)
* add new elements properties magic

* add new elements properties magic
2025-10-21 01:04:53 +02:00
Frédéric FRANCE
7d01503c46 clean code (#35856)
* fix CI

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-21 01:03:55 +02:00
Jon Bendtsen
56bcd57fc6 QUAL: polishing up the API's for usergroups (#35854)
* note_private=note + cleaning json output when getting a usergroup

* better comment text

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-21 00:36:44 +02:00
Laurent Destailleur
0cb4679757 Fix CI 2025-10-21 00:05:22 +02:00
Laurent Destailleur
655286f3b3 Fix CI 2025-10-20 23:55:59 +02:00
Laurent Destailleur
9ee8006f17 Fix CI 2025-10-20 23:50:32 +02:00
Laurent Destailleur
294309dbd4 Fix CI 2025-10-20 23:48:37 +02:00
Laurent Destailleur
ab6aae51dd Allow boolean on yn() 2025-10-20 23:42:20 +02:00
Laurent Destailleur
a202d1e60d Debug v23 2025-10-20 20:51:20 +02:00
Laurent Destailleur
dab2bcbd90 Debug v23 2025-10-20 20:44:17 +02:00
Laurent Destailleur
6f88b841e0 Add vat field 2025-10-20 17:57:22 +02:00
Laurent Destailleur
7792a397d3 Clean code 2025-10-20 16:46:36 +02:00
Laurent Destailleur
5604df683d Backup/Restore is cleaner 2025-10-20 15:12:35 +02:00
Laurent Destailleur
2835ec5c3d Add BLOCKEDLOG_LAST_RECORD_FINGERPRINT at install 2025-10-20 04:31:42 +02:00
Laurent Destailleur
a84cff56a7 Clean screen 2025-10-20 03:35:12 +02:00
Laurent Destailleur
dc6c6b281e Dev Loi Finance 2025-10-20 02:58:42 +02:00
Laurent Destailleur
606de1688e Dev Loi Finance 2025-10-20 02:35:55 +02:00
Laurent Destailleur
9fb7805e4f Fix typeof pad in takepos 2025-10-20 01:54:37 +02:00
Laurent Destailleur
4fe22fad9e Show terminal on ticket 2025-10-20 01:47:43 +02:00
Laurent Destailleur
0d2b4faee2 Prepare code for LNE 2025-10-20 00:45:59 +02:00
Laurent Destailleur
2a155bff70 Debug 2025-10-19 23:34:12 +02:00
Laurent Destailleur
d539010e3f Fix CI 2025-10-19 23:28:44 +02:00
Laurent Destailleur
0fa7da21f1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-19 23:14:52 +02:00
PsyCrow
277ca022f2 Remove unnecessary type casting for VAT rates (#35830)
vat_rate could be string so should not be casted to float

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-19 23:13:53 +02:00
Laurent Destailleur
2076c44618 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-19 23:13:26 +02:00
Laurent Destailleur
ad00c73028 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-19 21:23:46 +02:00
Laurent Destailleur
f97028a764 Test change for ci to use php min 7.2 2025-10-19 21:09:45 +02:00
Laurent Destailleur
2c04ca3979 NEW Minimal version of PHP is now 7.2 2025-10-19 21:03:50 +02:00
PsyCrow
893b6525ab Remove unnecessary type casting for VAT rate (#35831)
vat_rate could be string should not be float casting

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-19 18:50:25 +02:00
Frédéric FRANCE
f729b421a5 move sql in stats class (#35850)
* move sql in stats class

* move sql in stats class

* move sql in stats class

* move sql in stats class

* move sql in stats class

* move sql in stats class

* PHPStan > Update baseline (#35844)

Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>

* move sql in stats class

* move sql in stats class

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-19 18:50:09 +02:00
PsyCrow
d36bfd0f3e Refactor updateline call to remove type casting (#35833)
Removed unnecessary type casting for vatrate in updateline method.
2025-10-19 18:48:16 +02:00
PsyCrow
2b93b8a66a Remove unnecessary type casting for VAT rates (#35834)
vat_rate could be string and should not be casted to float

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-19 18:47:43 +02:00
Laurent Destailleur
e7672cd9e5 Fix critical regression in cast 2025-10-19 18:47:20 +02:00
Laurent Destailleur
a66164d0f7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-19 18:40:41 +02:00
Laurent Destailleur
3aa920be4a Fix critical regression when casting vat rate 2025-10-19 18:40:26 +02:00
PsyCrow
4f3b2fe8de Fix type casting for TVA tax in addline method (#35832)
tva_tx should not be casting to float

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-19 18:38:55 +02:00
Laurent Destailleur
738b85abcd Fix PHP doc regression 2025-10-19 18:38:10 +02:00
Laurent Destailleur
2c65efad96 Fix php doc 2025-10-19 18:32:25 +02:00
Laurent Destailleur
8d91557b17 Fix doc 2025-10-19 18:23:04 +02:00
Laurent Destailleur
a1f4fb9810 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-19 18:19:37 +02:00
Laurent Destailleur
b6353d06ae Fix doc 2025-10-19 18:19:28 +02:00
Laurent Destailleur
01eb4510f7 Fix doc 2025-10-19 18:18:56 +02:00
github-actions[bot]
4be6bd93cb PHPStan > Update baseline (#35844)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-19 18:12:31 +02:00
Laurent Destailleur
bbeaadb14a Fix picto module zapier 2025-10-19 18:11:00 +02:00
Laurent Destailleur
c5b4faffe7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-19 17:56:22 +02:00
Laurent Destailleur
68a8631cb5 Doc 2025-10-19 17:56:12 +02:00
Laurent Destailleur
02216080f6 Fix picto 2025-10-19 17:54:52 +02:00
Frédéric FRANCE
1e329f2325 clean code (#35843)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-19 17:09:54 +02:00
Frédéric FRANCE
db4d73ed50 clean baseline phpstan (#35840) 2025-10-19 03:35:21 +02:00
MDW
8a84fad171 Qual: Fix misuse of Mo->error (#35841)
# Qual: Fix misuse of Mo->error

Phan identified that ++ was performed on Mo->error which is a string.
This fixes that by using a local $error variable (as in another
function).
2025-10-19 03:35:04 +02:00
Frédéric FRANCE
9193aa889a clean phpstan baseline (#35839) 2025-10-19 03:34:22 +02:00
Frédéric FRANCE
8f7931eb49 clean phpstan baseline (#35837)
* clean phpstan baseline

* clean phpstan baseline

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-19 03:34:09 +02:00
Laurent Destailleur
9a8820b9c6 NEW Add column title in emailing and add more filters 2025-10-19 03:33:09 +02:00
Frédéric FRANCE
ed4b7ce58d clean phpstan baseline (#35838)
* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* fix
2025-10-19 01:58:11 +02:00
Frédéric FRANCE
4bc77ebcda clean phpstan baseline (#35836)
* clean phpstan baseline

* clean phpstan baseline
2025-10-19 01:56:26 +02:00
MDW
66683105f1 Qual: Fix phan notices (#35827)
# Qual: Fix phan notices

Some type hints updates + correction to get week from date (action/pertype.php)
+ check that value is not null (pdf_* classes).
2025-10-18 19:10:43 +02:00
Frédéric FRANCE
05e6c8ce11 Fix phpstan (#35828)
* clean phpstan baseline

* clean baseline

* clean baseline

* clean baseline

* clean baseline
2025-10-18 19:09:52 +02:00
Laurent Destailleur
dabda44e8d Add more method in setup factory 2025-10-18 13:56:33 +02:00
Laurent Destailleur
836696847e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-18 11:54:26 +02:00
Guido Schratzer
78aefbaa2e FIX #35766: Update buying price INT Float (#35769)
* FIX #35766: Update buying price INT Float
loose Decimals

.

* Fix: keep fk_product_fournisseur_price as int; treat buying price as float (no truncation) [#35766]

* Updated per feedback: keep fk_product_fournisseur_price as ?int (rowid) and  as float.
Adjusted FactureRec::updateline PHPDoc to ?int  and float|''  (model still normalizes via price2num).
Tested on a recurring line: decimals preserved, FK stored as int, CI green. Minor adjustments before v22 backport

* Delete .hooktest

* Delete dev/tools/pre-commit/README.md

* Delete test/phpunit/phpunit.xml

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-18 11:54:09 +02:00
Laurent Destailleur
0df13aedcb Ignore file to avoid commiting it 2025-10-18 11:53:37 +02:00
Frédéric FRANCE
3d852682ec clean baseline (#35822)
* clean baseline

* clean baseline

* clean baseline

* clean baseline

* clean baseline

* clean baseline
2025-10-18 11:20:54 +02:00
Vincent Maury
b28b94821f NEW #35700 : Throw an error when validating a propal, order, supplier with a product no more in sale/purchase… (#35709)
* Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)

* Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)

* Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)

* Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)

* Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy)

* Update commonobject.class.php

* Refactor checkActiveProductInLines method

* Fix comment formatting in commonobject.class.php

* Update commonobject.class.php

---------

Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-18 11:19:31 +02:00
Laurent Destailleur
f0c61790eb Clean code 2025-10-17 23:43:28 +02:00
Laurent Destailleur
384d40ca01 phpunit more complete 2025-10-17 19:39:45 +02:00
Laurent Destailleur
993f821a3b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 18:44:26 +02:00
Laurent Destailleur
b6171202db Trans 2025-10-17 18:35:16 +02:00
Christophe Battarel
e81cca858e NEW: import subscriptions (#35612)
* NEW: import subscriptions

* remove bad code

* FIX: already declared property is not needed

* Update subscription.class.php

* FIX: change format to please php-stan

* ENH: DolibarrModules::$import_convertvalue_array value format

---------

Co-authored-by: Christophe Battarel <christophe@altairis.fr>
Co-authored-by: Noé Cendrier <noe.cendrier@altairis.fr>
Co-authored-by: Noé Cendrier <81741011+altairis-noe@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 18:24:40 +02:00
Laurent Destailleur
9430078409 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 18:18:30 +02:00
Laurent Destailleur
493630eb4f Add expire at into token table. SQL part of #35804 2025-10-17 18:18:19 +02:00
Lucas Marcouiller
8fb42b0061 New fetch member to redirect to membership payment (#35808)
* New fetch member to redirect to membership payment

* add constant

* fix CI

* Update new.php

* Fix formatting of conditional check for member search

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 18:13:39 +02:00
Vincent Maury
54a2335d79 Display error message when impossible to create user from contact (#35807)
Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD>
2025-10-17 15:56:17 +02:00
William Mead
3c5d6b9649 NEW: Option to clone parent categories on variant creation (#35806)
* Added option to clone parent categories on product variant creation

* Updated PHPDoc
2025-10-17 15:52:42 +02:00
Josep Lluís
0245482bc6 NEW Add configuration for default timesheet menu (#35805)
* Add configuration for default timesheet menu

Using PROJECT_OPEN_ALWAYS_ON_TIMESHEET config, you can use variables "perweek" (default), "perday" or "permonth"

* Update eldy.lib.php

* Fix default value for optionTimesheet variable

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 15:50:47 +02:00
github-actions[bot]
9447f04876 PHPStan > Update baseline (#35810)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-17 15:46:08 +02:00
William Mead
276f792e9a Fixed return object for expense report API (#35813) 2025-10-17 15:45:59 +02:00
Laurent Destailleur
c48d4db3a5 Trans 2025-10-17 15:43:48 +02:00
Laurent Destailleur
93a03691e1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 13:45:12 +02:00
Laurent Destailleur
d87d6d10a4 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 13:44:54 +02:00
John BOTELLA
b1854b7d4f UIUX : webportal css style PART 02 (#35774)
* Add css

* FIX CSS and UX

* fix php doc

* Fix missing badge for status

* fix download link css

* change space on comment
2025-10-17 12:22:20 +02:00
Laurent Destailleur
be803918dd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 03:50:50 +02:00
Laurent Destailleur
5da33763d2 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 03:50:31 +02:00
Alexandre SPANGARO
88607b2eda QUAL Accountancy - Use xxx_prepare_head() on accounting transaction (#35778)
* QUAL Accountancy - Use xxx_prepare_head() on accounting transaction

* Fix phpstan

* Fix phpstan

* Fix according to Frederic

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 03:46:20 +02:00
Laurent Destailleur
b395cee7c8 Use position on each numbering module 2025-10-17 03:33:54 +02:00
Christophe Battarel
6e184d4195 NEW : add free numbering module for members (#35636)
* NEW : add free numbering module for members

* fix next value

* fix codesniffer

* fix phan

* fix missing class declaration

* rename module

---------

Co-authored-by: Christophe Battarel <christophe@altairis.fr>
2025-10-17 03:29:57 +02:00
Laurent Destailleur
fefc2ef466 CSS 2025-10-17 03:28:23 +02:00
Laurent Destailleur
c0e395ee11 Clean code 2025-10-17 02:53:01 +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
Frédéric FRANCE
90a0d3cc28 clean phpstan baseline (#35798)
* fix missing translation

* fix missing translation

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

* clean phpstan baseline

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 02:01:47 +02:00
MDW
fa266e7fd7 Qual: Update phan baseline, set return value for anonymous functions (#35775)
* Qual: Update baseline regarding fixed phan notices

# Qual: Update baseline regarding fixed phan notices

* Qual: Fix phan notice (return type of anonymous function

# Qual: Fix phan notice (return type of anonymous function
2025-10-17 01:57:37 +02:00
Leander Cain Slotosch
174a38b48b ADD new german forme juridique (#35799)
* Add new eGbR forme juridique for Germany

* Add more missing forme juridique for Germany
2025-10-17 01:55:27 +02:00
John BOTELLA
0d8647975d Uiux : Data for invoices & Orders status badges (#35781)
* New data for invoices status badges

* add orders

* add module builder
2025-10-17 01:55:11 +02:00
github-actions[bot]
70a7554f87 PHPStan > Update baseline (#35789)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 01:52:46 +02:00
Laurent Destailleur
67428766a2 FIX #35784 2025-10-17 01:48:32 +02:00
Laurent Destailleur
4c5a256088 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-17 01:03:06 +02:00
John BOTELLA
f8988d3874 UIUX : webportal css style PART 01 (#35773)
* Add css

* FIX CSS and UX

* fix php doc
2025-10-17 00:48:25 +02:00
Frédéric FRANCE
3f72cf2576 add facility to upload odt template (#35790)
* add facility to upload odt template

* add facility to upload odt

* add facility to upload odt

* add facility to upload odt
2025-10-17 00:45:05 +02:00
Mohamed DAOUD
15bd28fefb ignore master inc file for export website (#35791) 2025-10-17 00:42:29 +02:00
Leander Cain Slotosch
b87922dbd7 Fix typo in table name in bankjournal.php (#35800) 2025-10-17 00:32:32 +02:00
Laurent Destailleur
412fe1df32 Fix regression 2025-10-16 21:26:35 +02:00
Laurent Destailleur
9d24127f37 Clean code 2025-10-16 20:15:06 +02:00
Laurent Destailleur
5228c9827e Fix CI 2025-10-16 19:46:46 +02:00
Laurent Destailleur
793f48dbff Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-16 19:42:43 +02:00
Laurent Destailleur
c45ab5c387 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-15 20:03:54 +02:00
Laurent Destailleur
14f63d1ca2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-15 18:58:24 +02:00
Laurent Destailleur
fc7f9058af Fix ci 2025-10-15 18:58:12 +02:00
Frédéric FRANCE
82010e7a60 fix CI payment_salary.php (#35767)
* fix CI payment_salary.php

* Update baseline.txt

* Update phpstan-baseline.neon
2025-10-15 18:56:13 +02:00
Laurent Destailleur
f0d53c7dc6 Fix pr 2025-10-15 12:55:43 +02:00
Laurent Destailleur
04eecafa78 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-15 11:52:03 +02:00
Laurent Destailleur
d13ebdef2f Update doc 2025-10-15 11:51:55 +02:00
Marc de Lima Lucio
12bcdd0e80 QUAL: stop support of run_trigger (#34373)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 11:49:55 +02:00
Laurent Destailleur
f8bb32eb97 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-15 11:49:30 +02:00
Charlène Benke
520d44e808 New : add public and private note on contract list (#34252)
* New : add public and private note on contract list

* Update list.php

* Update list.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 11:43:21 +02:00
Mathieu Pellegrin
c09ae7c3fb Fix #35703 (#35734)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 11:34:51 +02:00
lvessiller-opendsi
f8218fe64b NEW const MENU_HIDE_EMAIL_TEMPLATES to hide email templates setup in Tools menu (#35739)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 11:33:48 +02:00
Laurent Destailleur
578cd6ca0f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-15 11:31:38 +02:00
Laurent Destailleur
9a99139d85 Fix status of salary 2025-10-15 11:31:28 +02:00
John BOTELLA
d04e40dea3 Fix missing cursor for copy action (#35765) 2025-10-15 11:31:10 +02:00
John BOTELLA
37ff735a80 Fix css badge pill definition (#35763)
* fix css badge pill definition

* fix css badge pill definition
2025-10-15 11:30:24 +02:00
Frédéric FRANCE
5367d63a56 clean code page phpinfo.php (#35762)
* clean code page phpinfo.php

* Update check.php

* Update phpinfo.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 11:28:47 +02:00
Laurent Destailleur
7853a33560 No need of token for action=create 2025-10-15 11:22:11 +02:00
Laurent Destailleur
dbc0905e79 Renamed salaries/paiement_salary.php into salaries/payment_salary.php 2025-10-15 11:19:00 +02:00
Laurent Destailleur
56997cc06c FIX The IBAN into EPC qr code must use the default bank account if not
forced
2025-10-15 05:02:34 +02:00
Laurent Destailleur
80700179be Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-15 04:36:25 +02:00
Laurent Destailleur
cfd17372f4 Debug v23 2025-10-15 04:36:06 +02:00
Jon Bendtsen
a9b468bbcd New: Adding linked project to mass mailing card (#35723)
* New: Adding linked project to mass mailing card

* modify project on mailing card

* mailing card load fk_project pre commit fix

* only fetch projects with id>0

* fix PHPstan errors regarding mesg

* projects related to mass mailings does not have a soc or socid

* remove last trace of soc and socid

* checking if mesg is set before using it

* just loading all projects, because maybe you have a mailing list with workers for a thirdparty? think company party

* showing the project during edit

* given that action is already something else, it will never not be classify

* making PHPstan happy

* Adding project column to list of mass mailings. Search, order and click able

* pasted the wrong place

* no need to check for filtermail

* x now also clears project search

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 03:19:45 +02:00
Jon Bendtsen
387a42c9ea Api member createSubscription, not all possible RestException numbers was mentioned (#35748)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-15 02:31:08 +02:00
Jon Bendtsen
153dadf6aa FIX #35318 better array check fields_label (#35750)
* FIX #35318 better array check fields_label

* Update html.formwebportal.class.php

* Update extrafields.class.php

* Update commonobject.class.php

* Update ajaxextrafield.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 02:30:48 +02:00
Laurent Destailleur
c50d511d7e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-15 02:25:40 +02:00
Laurent Destailleur
51c2103c3e Close #35754 - Better fix in 1 POST. 2025-10-15 02:25:05 +02:00
Laurent Destailleur
c1a8172347 Fix #35754 2025-10-15 01:29:38 +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
Frédéric FRANCE
51629b1949 clean code (#35736)
* clean code

* no element line

* no element line

* no element line

* no element line

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 01:06:26 +02:00
Laurent Destailleur
dc5bc7204b Clean code 2025-10-15 00:37:47 +02:00
Laurent Destailleur
58110719cc Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 23:39:00 +02:00
Laurent Destailleur
2d75809b9f Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 23:29:38 +02:00
Clément Jaunay
1e788d14f5 fix: conditionally include extrafields for filtering (#35742)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-14 23:18:43 +02:00
Laurent Destailleur
870ad12100 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 22:23:33 +02:00
Laurent Destailleur
9894886ba9 Fix CI 2025-10-14 22:22:41 +02:00
Charlène Benke
e9d1e719e6 warning error if realpath is not empty before use (#35740) 2025-10-14 22:13:43 +02:00
Laurent Destailleur
94b113273e Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 21:56:38 +02:00
Laurent Destailleur
862ea4e15c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 21:51:24 +02:00
Jon Bendtsen
aa67ad50bc Mass mailing list: make title a clickable link (#35746)
* Mass mailing list: make title a clickable link

* Update list.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-14 21:50:34 +02:00
Jon Bendtsen
58f516ef18 api_products purchase_prices: Adjust RestException with missing numbers (#35749)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-14 21:49:03 +02:00
Laurent Destailleur
8851025eb2 Fix trans 2025-10-14 21:48:46 +02:00
Jon Bendtsen
49b8f4a590 Fix: 3 modules where list.php redirected to /mymodule/myobject_card.php (#35732)
* Fix: 3 modules where list.php redirected to /mymodule/myobject_card.php

* remove an commented segment of the code which did the same kind of dolbuildpath to /mymodule/myobject_card.php which is obviously wrong, since it was a comment anyway, no risk

* remove an commented line of the code which did the same kind of dolbuildpath to /mymodule/myobject_card.php which is obviously wrong, since it was a comment anyway, no risk

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-14 21:41: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
f0bebb4ee8 Fix CI 2025-10-14 21:11:08 +02:00
Laurent Destailleur
eb80551a51 Fi CI 2025-10-14 21:07:45 +02:00
Laurent Destailleur
2e4c0715c4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-14 21:05:34 +02:00
Laurent Destailleur
f62b83df1d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-14 21:05:07 +02:00
Laurent Destailleur
81e5b0da1b Doc 2025-10-14 21:04:56 +02:00
Alexandre SPANGARO
eb91e09a50 NEW Accountancy - Add a protection on various payment for auxiliary account on general account not centralized (#35720) 2025-10-14 20:57:01 +02:00
Esteban Thilliez
2d62fc3c59 CLOSE #35716 Supplier invoices API endpoint to mark invoice as paid or unpaid (#35717)
Supplier invoices API endpoints to mark invoice as paid or unpaid, implemented exactly the same way it is implemented for client invoices.
2025-10-14 19:58:33 +02:00
Frédéric FRANCE
3c597c263d clean code (#35710)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* clean code
2025-10-14 19:58:04 +02:00
github-actions[bot]
e8418543f7 PHPStan > Update baseline (#35715)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-14 19:56:55 +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
Frédéric FRANCE
1ad2d24a4b fix img_pictos (#35722)
* fix img_pictos

* fix img_pictos

* fix img_pictos

* fix img_pictos

* fix img_pictos

* fix img_pictos

* fix img_pictos

* fix img_pictos
2025-10-14 19:31:06 +02:00
Frédéric FRANCE
6f83be9cf4 clean code in movement_list.php (#35731)
* clean code in movement_list.php

* Update externalModules.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-14 18:47:36 +02:00
Laurent Destailleur
8c699b6103 Debug v23 2025-10-14 18:43:23 +02:00
Laurent Destailleur
9d4af43760 Better message 2025-10-14 18:17:31 +02:00
Laurent Destailleur
c7ab7cd83d FIX Bad label for column title on multicurency 2025-10-14 16:27:31 +02:00
Laurent Destailleur
62e53b2774 Clean code 2025-10-14 16:06:04 +02:00
Laurent Destailleur
d37b717844 Debug v23 2025-10-13 21:57:19 +02:00
Laurent Destailleur
a74147f146 Fix ci 2025-10-13 21:13:50 +02:00
Laurent Destailleur
099a7b650c Clean setup pages 2025-10-13 21:11:09 +02:00
Laurent Destailleur
6595b1aa66 Clean setup pages 2025-10-13 21:03:14 +02:00
Laurent Destailleur
bb073c6fd1 Clean setup to reduce puplicate pages 2025-10-13 20:33:05 +02:00
Laurent Destailleur
68560aa946 Clean setup pages 2025-10-13 20:25:03 +02:00
Laurent Destailleur
ef9e74c4d4 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-13 19:55:25 +02:00
Laurent Destailleur
938e6e0b77 PERF Remove distinct and join in list of agenda events 2025-10-13 13:14:08 +02:00
Laurent Destailleur
b78f30e8af Debug v23 2025-10-13 11:49:07 +02:00
Laurent Destailleur
cba68f31bb Debug v23 2025-10-13 11:39:08 +02:00
Laurent Destailleur
394e35d00b Clean code 2025-10-13 11:34:57 +02:00
Laurent Destailleur
580d0d4fa8 Replace function img_pdf with img_picto 2025-10-13 11:12:30 +02:00
Laurent Destailleur
d57bb824d7 Fix CSS regression. The arrow was no more visible with image using font
awesome.
2025-10-12 22:01:16 +02:00
Laurent Destailleur
85fbc62222 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-12 21:32:09 +02:00
Laurent Destailleur
bc2049c93d Trans 2025-10-12 21:31:54 +02:00
Laurent Destailleur
de1c933a9b css 2025-10-12 21:30:58 +02:00
Laurent Destailleur
8a0dde736b Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-12 20:24:44 +02:00
Laurent Destailleur
15acc37e62 Fix the price in module browser 2025-10-12 19:33:45 +02:00
Laurent Destailleur
bdfab3c467 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-12 18:50:02 +02:00
ldestailleur
62a3d7242d Debug the embeded dolistore search tool 2025-10-12 15:47:16 +02:00
ldestailleur
67c1960483 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-12 14:12:24 +02:00
ldestailleur
951c3a36cc Fix look and feel 2025-10-12 14:12:15 +02:00
ldestailleur
435d10b887 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-12 13:57:49 +02:00
Laurent Destailleur
3e1a6edd84 Update security.txt 2025-10-12 03:16:45 +02:00
atm-corentin
049fe9f201 Fix : Display supplier prices for shared products in multicompany context (#35600)
* Update SQL join condition for supplier prices to respect multi-entity context.

* Update SQL join condition for product supplier prices to use correct entity.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-11 17:58:19 +02:00
ldestailleur
ae39bedf27 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-11 15:31:48 +02:00
ldestailleur
bbec15ee91 Fix regression in accounting transfer 2025-10-11 15:31:32 +02:00
Philippe Grand
c4abb3f8c3 Fix: prevent "Cannot access offset of type string on string" in param_ihm.php (#35702)
* Fix: prevent "Cannot access offset of type string on string" in param_ihm.php

- Added validation to handle cases where $tmparray items are strings instead of arrays
- Normalized entries to ensure each item has a 'label' and 'picto' key
- Defaulted 'picto' to "generic" when missing
- Prevents fatal error under PHP 8 when accessing $val['label'] or $val['picto']

* fix codesniffer issue

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-11 15:30:52 +02:00
ldestailleur
92b158d1fc Fix img picto 2025-10-11 14:58:23 +02:00
ldestailleur
e0c2fe14f9 Trans 2025-10-11 14:53:14 +02:00
ldestailleur
4dec03b9f9 Clean ci workflow files 2025-10-11 14:27:37 +02:00
ldestailleur
c363096d36 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-11 14:13:57 +02:00
ldestailleur
5824cc3449 Fix regression 2025-10-11 14:13:45 +02:00
Wilson
e3ad771149 NEW Allow omission of ODT template name when generating ODT and PDF (#35701)
Presently, Invoice PDF/ODT is generated with template name just before file extension.
This creates an issue where Mass Actions is also unable to perform Send By Email, or PDF Merge.
This pull request is inspired by this forum post:

https://www.dolibarr.org/forum/t/how-to-remove-omit-odt-templete-name-from-auto-document-generated/22735

Co-authored-by: Wilson <wilson@Wilsons-MacBook-Air.local>
2025-10-11 14:03:54 +02:00
ldestailleur
617d6e677f Try to reduce conflict and compatiblity pb by keeping old function name 2025-10-11 13:55:16 +02:00
ldestailleur
042f4c8822 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-11 13:53:33 +02:00
webmaster67
fad11836ff NEW: Add directory navigation to Web Portal Shared Documents (#35443)
* Create documentlist.controller.class.php

Intégration de mon portail client personnalisé avec GED
attention 
class/sontext.class.php devra aussi être modifier.

* Update context.class.php

ajout du ged 
pour les fichiers joints par tiers.

* Update context.class.php

ajout d'accès à fichiers joints du tiers.

* Update menu.tpl.php

ajout du menu accès au GED

* Update README.md

* Update README.md

* Update README.md

* Add files via upload

document utile sert a partager via le GED de dolibarr des fichiers avec tous les clients utilisateur du webportal.

* Update context.class.php

ajout dans le menu de deux controleur suplémentaire.

* Update menu.tpl.php

ajoute des deux chapitre dans le menu

* Update README.md

* Update README.md

* Update menu.tpl.php

document format change

* Add files via upload

mises à jour et normalisation fichiers

* Add files via upload

ajout webportal.lang

* Update README.md

* Delete htdocs/webportal/documentutile.controller.class.php

* Update menu.tpl.php

* Update README.md

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update menu.tpl.php

* Update menu.tpl.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update README.md

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update README.md

* Create webportal.lang

* Update webportal.lang

* Update webportal.lang

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update website.lang

* Delete htdocs/langs/fr_FR/webportal.lang

* Delete htdocs/langs/en_US/webportal.lang

* Update README.md

* Update README.md

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Create abstractdocument.controller.class.php

* Update website.lang

* Update website.lang

* Update website.lang

* Update README.md

* Update README.md

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update README.md

* Update context.class.php

* Update README.md

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update menu.tpl.php

* Update documentlist.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update menu.tpl.php

* Update menu.tpl.php

* Update README.md

* Update context.class.php

* Update documentlist.controller.class.php

* Update menu.tpl.php

* Update menu.tpl.php

* Update context.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

taking into account subfolders in shareddocuments

* Update abstractdocument.controller.class.php

support for subfolders and addition of a breadcrumb trail for navigation through subfolders

* Update website.lang

* Update website.lang

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update website.lang

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update documentlist.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

it's ready Boss
@eldy

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

correction get post faite

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

french comment removed sorry

* Update shareddocuments.controller.class.php

french comment traductions ok !

* Update documentlist.controller.class.php

* Update documentlist.controller.class.php

tabs corrected

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

oubli d'un @

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-11 13:53:23 +02:00
sonikf
0d10df9065 Fix accountancy pdfs (#35686)
* Add missing translation

* fix translation for non latin languages and add space

* Add missing translation

* Add translations 

DebitShort and CreditShort

* fix space

* fix translation for non latin languages

* fix translation for non latin languages

* fix trans

* fix missing separator line

* Add missing separator line

* fix translation for non latin languages

* Add missing translation

* Update pdf_balance.modules.php

* check if translation for AccountancyGroupXXX exists

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-11 13:50:14 +02:00
ldestailleur
99aea6fdea Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-11 13:49:19 +02:00
ldestailleur
ae759ee6af Trans 2025-10-11 13:45:59 +02:00
Charlène Benke
b14892043f Add api document upload for knowledge management module (#35704) 2025-10-11 13:39:43 +02:00
Frédéric FRANCE
3bcb82428f PERF Add index to optimize fetch ecm_files by src_object_type and src_object_id (#35708)
* Update 22.0.0-23.0.0.sql

* Update llx_ecm_files.key.sql
2025-10-11 13:39:02 +02:00
ldestailleur
115da282e3 Fix warning 2025-10-11 13:37:00 +02:00
ldestailleur
efe851ec92 Fix warning 2025-10-11 13:33:55 +02:00
ldestailleur
4e95109429 Fix warning 2025-10-11 13:30:12 +02:00
ldestailleur
47ba906291 Fix warning 2025-10-11 13:27:16 +02:00
ldestailleur
755c616dfd Try fix warning 2025-10-11 13:21:04 +02:00
ldestailleur
7f180687a1 Fix warning 2025-10-11 13:08:16 +02:00
ldestailleur
ed28193e27 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-11 13:02:15 +02:00
ldestailleur
13313f56be NEW The check file feature can limit check on unalterable files only 2025-10-11 13:01:49 +02:00
Frédéric FRANCE
1e0548468e clean code expensereport class (#35697) 2025-10-11 06:27:40 +02:00
ldestailleur
5aee279f5a Clean code 2025-10-10 14:47:31 +02:00
ldestailleur
77d7d17d4c Removed function getImgPictoNameList from functions.lib.php (useless) 2025-10-10 14:45:07 +02:00
ldestailleur
c24ebe2122 Complete label and picto in type of blockedlog events 2025-10-10 12:04:11 +02:00
ldestailleur
87e8eddb65 Complete label of fields in popup of blocked log detail 2025-10-10 11:49:12 +02:00
ldestailleur
049ab546be Trans 2025-10-10 10:30:44 +02:00
ldestailleur
fa650e4d5d Trans 2025-10-10 10:27:19 +02:00
ldestailleur
3403bbe869 NEW Enhance the system for warnings on module activation 2025-10-10 10:16:33 +02:00
ldestailleur
a162de2455 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-09 18:47:52 +02:00
ldestailleur
076ab14c47 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-09 18:41:49 +02:00
ldestailleur
c7f75a9a52 Fix test 2025-10-09 18:41:34 +02:00
Jon Bendtsen
e8a347f89e NEW API for handling mass mailing targets (#35603)
* NEW API for handling mailing targets

* fix PHP Codesniffer

* adding return values to make phpstan happy

* Update function actually updates

* defining mailing_target public function create

* using a different language translation

* mailing_target - phpstan fixes

* mailing target - no check properties body

* mailing target int typecast fk_mailing

* mailing target - just 1 parameter

* mailing_target phpstan fixes

* mailing_target setting labelStatus

* mailing target class public function delete

* reveal the list of status name for the Mass mailing object in the API

* set tms to now when it is set to draft

* functions to set the mailing target status

* hurl testing api mailings

* hurl test - exit run script at first error

* hurl test mailings - should cover all endpoints

* using self:: in front of the CONST

* Trying to find out which line evaluates to noting

* API mailings can now get the targets of a mailing

* Protected method name "Mailings::_cleanTargetDatas" must not be prefixed with an underscore

* give me fk_project

* API endpoints for: Get all targets of a mass mailing + Get information about a specific target id

* API endpoint to update a mailing target

* telling pre-commit check to ignore, just like done in the function I copied

* be more explicit about for GUI tests we need username and password

* Prevent updating fk_mailing value

* API endpoint deleteTarget

* post to create a mailing target does work, but need slight more testing after work

* correct indent

* fixing some build errors

* More comprehensive hurl test of creation of a target

* adding status_dest to mailing targets json

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-09 18:38:13 +02:00
sonikf
140d2aa1cd Add required fields for standalone reception and e-reporting (#35694)
* Add required fields for e-reporting

* Add required fields for e-reporting
2025-10-09 18:35:18 +02:00
Alexandre R
edda95d07f fixed rate conversion to int rather than float on supplier's invoices (#35696)
Co-authored-by: A.R <alexandre.rivas69@gmail.com>
2025-10-09 18:23:14 +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
44981cde29 bad left menu name for mrp (#35695) 2025-10-09 18:20:14 +02:00
MDW
72f6422804 Qual: Update baseline, fix new notice. (#35689)
# Qual: Update baseline, fix new notice.

Fix small new notice and update baseline with regards to other fixes.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-09 18:18:49 +02:00
ldestailleur
05d0bba2a0 Update field denormalized_lower_planned_end_date in contract table. 2025-10-09 18:16:57 +02:00
ldestailleur
9bc45a5e89 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-09 16:55:10 +02:00
ldestailleur
eeacbac425 Code comment 2025-10-09 16:54:54 +02:00
Kusco
100ba8e060 FIX Module-builder modMyModule.class.php (#35684)
* Update modMyModule.class.php

Fix an error that generates errors in the logs.
dol_eval try/catch error : Undefined constant "mymodule"

* Update modMyModule.class.php
2025-10-09 15:40:16 +02:00
ldestailleur
58b524d98c Modules 2025-10-09 15:38:30 +02:00
ldestailleur
8c85a8a0e6 Fix module 2025-10-09 15:37:11 +02:00
ldestailleur
a5a4dd1add Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-09 15:19:11 +02:00
ldestailleur
5245289ef8 Setup page 2025-10-09 15:19:02 +02:00
ldestailleur
d4082e1560 Setup page 2025-10-09 15:18:23 +02:00
ldestailleur
21e06d8fb5 Add redirect if setup not complete on other page 2025-10-09 15:10:25 +02:00
ldestailleur
ca11daa0bb Move the test if setup is complete into an inc.php file 2025-10-09 15:07:38 +02:00
ldestailleur
091787d65d Clean setup info 2025-10-09 14:54:05 +02:00
ldestailleur
e78cb01ce6 Debu v23 2025-10-09 06:51:16 +02:00
ldestailleur
cc1d3c431d Can add, update ref_ext of a member 2025-10-09 06:27:11 +02:00
ldestailleur
94ee91a051 NEW Add column ref_ext and note_private for membership 2025-10-09 06:18:45 +02:00
ldestailleur
01fe82e726 NEW Add column ref_ext and note_private for membership 2025-10-09 06:13:50 +02:00
ldestailleur
56c616d65a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-09 05:59:53 +02:00
ldestailleur
6dd6760d24 Doc 2025-10-09 05:59:37 +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
b99464eb80 clean code (#35687)
* clean code

* clean code member setup

* clean code member setup

* clean code member setup

* clean code member setup
2025-10-09 05:38:40 +02:00
Daksh Amalseda
be3f10e6d2 Added spellcheck="false" on form field that does not need spellchecking (#35682)
* fixed bug

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-08 22:23:43 +02:00
ldestailleur
44ef4d5860 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-08 22:17:33 +02:00
ldestailleur
aa0f3f2d60 Look and feel embedded dolistore 2025-10-08 22:17:24 +02:00
ldestailleur
adf03f7168 Look and feel embedded dolistore 2025-10-08 22:17:08 +02:00
ldestailleur
51492f25f2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-08 21:40:32 +02:00
ldestailleur
62a16aadff Trans 2025-10-08 21:35:25 +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
ldestailleur
8e3a185af5 Fix CI 2025-10-08 20:38:23 +02:00
ldestailleur
e36f3f4e9d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-08 20:28:58 +02:00
ldestailleur
47dc800efb Fix CI 2025-10-08 19:52:25 +02:00
ldestailleur
07c1391ffd Fix CI 2025-10-08 19:40:30 +02:00
ldestailleur
7c20dc8333 Fix: if ref is too large, no way to create an index and we need index
one
2025-10-08 16:40:41 +02:00
ldestailleur
6dd2f31012 NEW The flag "Dispute open" make the status in Red. 2025-10-08 16:35:17 +02:00
ldestailleur
49b432436b Work on modulebuilderization 2025-10-08 15:31:31 +02:00
ldestailleur
0d73eaf179 Clean code 2025-10-08 13:48:47 +02:00
ldestailleur
51be9b6a44 Label 2025-10-08 13:38:55 +02:00
ldestailleur
341ec9d71d Clean code 2025-10-08 12:53:51 +02:00
ldestailleur
8dd55d5a33 FIX Concat of PDF to invoices 2025-10-08 12:28:35 +02:00
ldestailleur
7b4a17e000 NEW Add setup page to concat natively files on invoice PDF. 2025-10-08 12:20:51 +02:00
ldestailleur
68459f54ab Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-08 11:39:14 +02:00
ldestailleur
6ef0ec5b9e Doc 2025-10-08 11:39:04 +02:00
PsyCrow
91fec9d807 FIX TCPDI deprecated callables #35194 (#35669)
PHP 8.1+ deprecates the sintaxis of callables ["Class", "Class::method"]
Upgraded sintaxis fixes PHP Warnings

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-08 11:38:47 +02:00
Pichinov-Valentin
f796dc9f67 New/Re add Custom module messaging (#35469)
* feat(core): Isolate changes from functions.lib.php

* feat(core): Isolate changes from functions.lib.php (UPDATE)

* update rebase

* feat(core): Isolate changes from functions.lib.php

* feat(core): Isolate changes from functions.lib.php (UPDATE)

* update branche

* update function.lib.php

* Update show_actions_messaging to make custom module compatible

* check if the field ref exists

* missing test && array_key_exists('ref', filterobj->fields)

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-08 11:37:07 +02:00
ldestailleur
58a84827d5 CSS 2025-10-08 11:30:13 +02:00
Charlène Benke
3ff7e43648 Add parameters 'source' and 'notrigger' to postContact (#35678)
* Add parameters to postContact method

allow to add internal contact

* Add parameters 'source' and 'notrigger' to postContact
2025-10-08 10:58:01 +02:00
ldestailleur
cec620563e Fix waning 2025-10-08 10:56:38 +02:00
sonikf
f3bfcfe7c2 fix translation of unit piece (#35679)
* fix translation of unit piece

* fix translation of unit piece

* fix translation of unit piece
2025-10-08 10:40:02 +02:00
ldestailleur
ca000b77f6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-08 09:46:20 +02:00
ldestailleur
0d04a879a1 Fix warning 2025-10-08 09:46:04 +02:00
Frédéric FRANCE
152cc48585 clean code (#35677)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-07 23:30:13 +02:00
Lenin Rivas
d67db1e685 NEW Add Transfer Number (#35665)
* NEW Add Transfer Number

* NEW Add Transfer Number

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 23:26:43 +02:00
Charlène Benke
0c2f6ea9b0 add getContacts method on invoice api (#35656)
* add getContacts method on invoice api

Add the getContacts method to fetch both external and internal contacts for a given invoice.

* Change return type from Object to array in API docs

Updated return type in the documentation for the get contacts method.

* Update api_invoices.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 20:51:07 +02:00
Charlène Benke
07518a6865 Refactor contact deletion logic in API proposals (#35668)
* Refactor contact deletion logic in API proposals

* Fix formatting issue in delete contact logic

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 20:50:45 +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
Mohamed DAOUD
7626de3ff1 enhance isPaymentOK hook (#35674)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 20:47:55 +02:00
Nicolas Domenech
41f5804a92 Fix remove double logo in page subscriptionok (#35672)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 20:46:38 +02:00
Frédéric FRANCE
f2e80fead5 fix backtopage (#35662)
* fix backtopage

* fix backtopage

* fix backtopage

* fix backtopage

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 19:37:17 +02:00
Fabian Volkers
7faab635c4 Enable filtering by supplier order in /receptions API endpoint (#35601)
* 🐛 Use reception email templates for receptions

*  LEFT JOIN reception with element_elemnt to allow filtering by supplier_order

* 📝 Document supplier order filter for receptions endpoint

* 🐛 Check for presence of el filter using regex to avoid duplicate lines

* Update api_receptions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-07 19:36:22 +02:00
Frédéric FRANCE
da46bc5517 FIX mo production with dlc dluo (#35676)
* fix mo production with dlc dluo

* fix mo production with dlc dluo

* fix mo production with dlc dluo

* fix mo production with dlc dluo

* fix mo production with dlc dluo

* fix mo production with dlc dluo
2025-10-07 19:35:17 +02:00
ldestailleur
8335e264be Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-07 19:00:00 +02:00
ldestailleur
e348a89ccf Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-07 18:59:50 +02:00
Frédéric FRANCE
175c90f658 fix CI (#35663)
* fix CI

* Rename llx_accounting_bookkeeping.key-accounting.sql to llx_accounting_bookkeeping-accounting.key.sql
2025-10-07 18:58:55 +02:00
ldestailleur
447d8b7a64 Show info on tooltip 2025-10-07 15:47:54 +02:00
ldestailleur
1225aee5e0 Fix IDE false error 2025-10-07 14:56:19 +02:00
ldestailleur
53b5af0efa spellcheck war 2025-10-07 14:53:37 +02:00
ldestailleur
dd4f55ca0a Fix cancel button 2025-10-07 14:40:15 +02:00
ldestailleur
f815571248 Code comment 2025-10-07 13:37:47 +02:00
ldestailleur
f22838782a Fix duplicate instruction 2025-10-07 12:51:56 +02:00
ldestailleur
26a2d47bec Doc 2025-10-07 12:45:33 +02:00
ldestailleur
570c7b2255 Doc 2025-10-07 11:04:10 +02:00
ldestailleur
0aaf06d07b NEW Can urlencode substition variable of constants 2025-10-07 09:32:08 +02:00
ldestailleur
6b6ebe7a43 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-07 08:56:29 +02:00
ldestailleur
8dd9ed56a1 spellcheck war 2025-10-07 08:56:18 +02:00
Frédéric FRANCE
2078610328 add dolBuildUrl with examples of use (#35549)
* add dol_buildurl with examples of use

* add dol_buildurl with examples of use

* add dol_buildurl with examples of use

* add dol_buildurl with examples of use

* wip

* wip

* add more example

* add more example

* add more example

* add more example

* add more example

* add more example

* add more example

* add example

* add example

* add example

* add example

* add example

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* add example

* add example

* add example

* add example

* add example

* add example

add example

add example

add example

add example

* add example

* add example

add example

add example

add example

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* wip

* wip

* clean code
2025-10-06 18:17:02 +02:00
ldestailleur
10deeef770 Rename table to have them created at module activation 2025-10-06 18:08:02 +02:00
Alexandre SPANGARO
89db077280 SQL Accountancy - Add a table to manage transaction (#35642)
* SQL Accountancy - Add a table to manage transaction

* fix PR

* Update 22.0.0-23.0.0.sql

* Update llx_accounting_bookkeeping_piece.key.sql

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-06 18:04:11 +02:00
Benhamid
37270fdca0 Update remx.php (#35657)
Fixed URL issue: a duplicated '?' character caused incorrect query parameters when creating a new discount.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-06 18:02:52 +02:00
ldestailleur
77d4a16778 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-06 18:01:13 +02:00
ldestailleur
38180ab43c Use the semi-detached COCOMO model 2025-10-06 13:11:38 +02:00
ldestailleur
adb02003f5 Fix CI 2025-10-06 11:29:03 +02:00
ldestailleur
0e79c7817f Try to make a request in 2 part with union for better performance 2025-10-06 03:10:09 +02:00
ldestailleur
26123a6f84 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-06 02:50:45 +02:00
ldestailleur
3f91f3f1fc Debug v23 2025-10-06 02:50:07 +02:00
Jon Bendtsen
1cb221efe9 Make hurl tests work on GUI page requiring login (#35652)
* Adding hurl tests to Dolibarr

* modifying run.sh to get it past commit checks

* change the APIHEADER to be read from the environment

* spell fix

* test to see if build system will accept this file

* deleting script method that doesn't work

* beginning to make hurl tests accept environment variables for the location

* Add GUI login to hurl tests

* Fix CI

* clean code (#35640)

* 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

* Fix warning

* Clean code

* PHPStan > Update baseline (#35644)

Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>

* NEW Can drag and drop in BOM card

* WIP Upload files

* WIP Upload files

* Adding hurl tests to Dolibarr

* using hostnport variable for all remaining tests

* Add some asserts and gui login tests

* double quotes around shell variables

* adding -r to read

* expand mass mail gui test with all 6 columns in the table

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: ldestailleur <eldy@destailleur.fr>
Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-06 01:38:44 +02:00
ldestailleur
2da06f9fb1 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-06 01:37:53 +02:00
ldestailleur
efc15d7d1f WIP Upload file page 2025-10-06 01:27:48 +02:00
ldestailleur
7c400a1e12 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-05 20:40:01 +02:00
ldestailleur
a9bf93afd1 WIP Upload files 2025-10-05 20:39:05 +02:00
ldestailleur
dcee71db77 WIP Upload files 2025-10-05 20:13:05 +02:00
ldestailleur
ef22546aa6 NEW Can drag and drop in BOM card 2025-10-05 20:12:52 +02:00
Jon Bendtsen
c1aceed820 Adding hurl tests to Dolibarr (#35643)
* Adding hurl tests to Dolibarr

* modifying run.sh to get it past commit checks

* change the APIHEADER to be read from the environment

* spell fix

* test to see if build system will accept this file

* deleting script method that doesn't work

* beginning to make hurl tests accept environment variables for the location

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-05 18:08:10 +02:00
ldestailleur
9a67f45847 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-05 17:02:33 +02:00
ldestailleur
e471e0fb31 Clean code 2025-10-05 17:02:22 +02:00
ldestailleur
2d4a30fd58 Fix warning 2025-10-05 17:01:14 +02:00
github-actions[bot]
f721985162 PHPStan > Update baseline (#35644)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-10-05 16:57:05 +02:00
ldestailleur
0ef9acd8ae Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-05 16:56:25 +02:00
ldestailleur
419e208a77 Fix CI 2025-10-05 16:56:09 +02:00
Frédéric FRANCE
78ca88f4fc clean code (#35640)
* 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
2025-10-05 16:51:29 +02:00
Jon Bendtsen
76916ad1cf Add fk_project to Mass Emailings (#35635)
* Add fk_project to Mass Emailings

* Mass Mailing fk_project SQL definition dispre

* mailing typecasting fk_project

* mailing using correct variable name

* more type casting to fix phpstan errors related to fk_project in mass mailing

* mailing fk_project NULL better default in DB

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-04 20:08:27 +02:00
MDW
234fa7690f Qual: Update phan baseline & minor fix (#35638)
# Qual: Update phan baseline & minor fix

Fix new phan notice using cast of potential null value.
Remove unneeded exceptions from baseline.
2025-10-04 20:03:38 +02:00
Frédéric FRANCE
a15c3a4ff2 fix members cards (#35639)
* fix members cards

* fix

* fix members cards
2025-10-04 20:02:49 +02:00
Charlène Benke
d1e0efc466 NEW Add getcontacts on api of interventional and proposal (#35589)
* Add getContacts method to retrieve contact information

* Implement getContacts method for proposals

Added a method to retrieve contacts associated with a proposal, including access checks and data cleaning.

* Implement getContacts method for invoices

Added a method to retrieve contacts associated with a specific invoice, including access checks and error handling.

* Update api_proposals.class.php

* Update api_invoices.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

* Add method to set invoice as draft

* Return contacts directly instead of cleaned data

* Return raw contacts instead of cleaned data

* Combine external and internal contacts in order list

Merge external and internal contacts for orders.

* Change return type from Object to array in API doc

Updated return type in API documentation for contact information.

* Change return type in api_orders.class.php docblock

Updated return type in docblock to reflect array return.

* Change return type from Object to array in API doc

* Update api_orders.class.php

* Update api_interventions.class.php

* Update api_proposals.class.php

* Update api_orders.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

* Update api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-04 20:01:57 +02:00
ldestailleur
900fa67c9e Clean code 2025-10-04 15:12:02 +02:00
ldestailleur
8ba14e9e18 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-04 14:13:08 +02:00
ldestailleur
fbfeb5c978 Clean code 2025-10-04 14:12:46 +02:00
Frédéric FRANCE
6afec608a3 fix CI (#35631)
* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-04 13:29:57 +02:00
ldestailleur
597088f030 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-04 02:33:41 +02:00
ldestailleur
783dbd5ccf Fix missing where on rowid 2025-10-04 02:33:28 +02:00
sonikf
bc9199e58f NEW Add tpl files for standalone shipment (#35624)
* NEW Add option to create simple shipment of non origin

* try to fix phan

* try to fix phan

* fix phan
2025-10-04 01:14:14 +02:00
ldestailleur
8b0d4f82a5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-04 00:51:06 +02:00
ldestailleur
62d05df912 Look and feel v23 2025-10-04 00:50:49 +02:00
Frédéric FRANCE
ebca8345b0 add tables missing (#35628)
* add tables missing

* add tables missing

* add tables missing

* add tables missing

* add tables missing

* add tables missing

* Update 22.0.0-23.0.0.sql
2025-10-04 00:08:32 +02:00
Frédéric FRANCE
a90c222f73 clean code (#35626)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-04 00:07:24 +02:00
Frédéric FRANCE
a20fac32a6 enhance setup captcha (#35627)
* enhance setup captcha

* add oddeven
2025-10-04 00:07:15 +02:00
ldestailleur
b9daf82a44 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-03 19:20:40 +02:00
ldestailleur
31394457f1 Typo 2025-10-03 19:20:28 +02:00
Vincent Maury
66e88bc761 NEW Add tasks card hooks (#35616)
* Hooks missing in some task cards

* Add  hook in contact of task card

* Update contact.php

* Some hook missing

* Update contact.php

* Update document.php

* Update contact.php

* Update document.php

* Update contact.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-03 19:07:29 +02:00
Frédéric FRANCE
ac7fe765ae add doc (#35625) 2025-10-03 19:06:34 +02:00
sonikf
86578bd625 NEW Create simple shipment of non origin (#35604)
* NEW Add option to create simple shipment of non origin

* NEW Add option to create simple shipment of non origin

* avoid 2nd update and revert origin change

* remove 2nd update
2025-10-03 19:06:01 +02:00
Alexandre R
01d854e44e FIX invoices payments on multicurrencies being converted as int (#35622)
* fix invoices payments on multicurrencies being converted as int

* Update paiement.php

---------

Co-authored-by: A.R <alexandre.rivas69@gmail.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-03 19:03:52 +02:00
Mohamed DAOUD
5e94b60916 fix cat warning (#35623) 2025-10-03 19:01:52 +02:00
ldestailleur
406f722cf9 Removed confirmation to close task 2025-10-03 18:39:48 +02:00
ldestailleur
e203684464 Fix ip if '' 2025-10-03 17:29:54 +02:00
ldestailleur
21ff19cec3 Add another way to know if local ta must be used or not. 2025-10-03 15:43:55 +02:00
ldestailleur
e903cf122c CSS 2025-10-03 14:40:30 +02:00
ldestailleur
456530c6c8 Fix CSS 2025-10-03 13:56:53 +02:00
ldestailleur
14d5666477 Add ref in create form 2025-10-03 13:48:31 +02:00
ldestailleur
9d4391f581 Missing table in migration 2025-10-03 13:39:56 +02:00
ldestailleur
8b82ff4fd1 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-03 13:01:15 +02:00
ldestailleur
e0df46e5c4 Comment to discourage use of always_enabled to true. 2025-10-03 12:39:33 +02:00
ldestailleur
00143a8368 Fix constant 2025-10-03 11:59:27 +02:00
ldestailleur
6a009f95dc Add a error log but does not block if trigger name is wrong 2025-10-03 11:27:39 +02:00
ldestailleur
16ee8858b4 Fix trigger PAYMENTONLINE 2025-10-03 10:46:40 +02:00
ldestailleur
88825c460b Spellcheck 2025-10-03 10:22:58 +02:00
ldestailleur
84f9065881 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-03 10:11:04 +02:00
ldestailleur
c6bf35779f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-03 10:04:50 +02:00
ldestailleur
658741c072 Fix avoid rolback when no transaction open 2025-10-03 09:41:49 +02:00
emilisev
6054cd6311 NEW execute hook addMoreActionsButtons on bank card (#35598)
* execute hook addMoreActionsButtons on bank card

* fix code formatting

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-03 09:23:09 +02:00
Frédéric FRANCE
9ff1bc423d clean code (#35602)
* clean code

* clean code

* clean code

* clean code and baseline

* clean code and baseline

* clean code and baseline
2025-10-03 09:20:09 +02:00
Francis Appels
9b071f22c2 Use trigger prefix product also for supplier product. (#35566)
* Use trigger prefix product also for supplier product.

* Add explication TRIGGER_PREFIX for developers
2025-10-03 09:00:39 +02:00
Laurent Destailleur
ae11ad4e72 Fix duplicate test 2025-10-02 18:23:59 +02:00
Laurent Destailleur
049eb31665 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-02 18:11:50 +02:00
Laurent Destailleur
2cb9f21259 Fix space 2025-10-02 17:54:37 +02:00
Laurent Destailleur
65f997585b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-02 17:39:26 +02:00
Laurent Destailleur
b0636bf78c Fix CI 2025-10-02 17:38:39 +02:00
Yoan Mollard
81894fa6ac Restore the accountancy report by project to the eldy menu (#35596)
* Restore the accountancy report by project to the menus

* Side menu: show by-project view only if isModEnabled('comptabilite')

* tabs fix
2025-10-02 16:39:05 +02:00
Frédéric FRANCE
c18c6fe8dc use TRIGGER_PREFIX if available when updating notes (#35585) 2025-10-02 16:14:27 +02:00
Laurent Destailleur
ba2466a008 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-02 16:00:44 +02:00
ldestailleur
0ef81c4c0e PERF Avoid SQL on localtax in list of project 2025-10-02 13:58:32 +02:00
ldestailleur
dec9d861bf PERF Reduce number of SQL call to get local tax. 2025-10-02 13:50:47 +02:00
ldestailleur
3c8ea21911 Removed size="" 2025-10-02 12:49:00 +02:00
ldestailleur
9743be92cb NEW Add column thirdparty ref_customer and ref_supplier in project list 2025-10-02 12:28:27 +02:00
ldestailleur
6856b66d85 Clean code 2025-10-02 10:56:12 +02:00
ldestailleur
da79b3bc4c Add tms field into table llx_document_model 2025-10-02 10:35:28 +02:00
ldestailleur
af371b828f Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-02 02:17:55 +02:00
ldestailleur
4ed605e31e Fix error message 2025-10-02 01:47:05 +02:00
ldestailleur
869aab8960 Removed no more required file 2025-10-01 20:02:36 +02:00
ldestailleur
fcb55feb50 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-01 19:57:33 +02:00
ldestailleur
8d7052ee50 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-01 19:57:24 +02:00
Pierre Ardoin
30d66bcdd8 UIUX adds a new permission that restricts the user to seeing their salaries and only those. (#35293)
* Update admin.lang

Add translate "Permission511=Lire les salaires et leur paiement (les vôtres et ceux de vos subordonnées)" and move old 511->512 and 512->513.

* Update modSalaries.class.php

Add the new permission 'Read employee salaries and payments (yours only)'

* Update list.php

add the new permission filter "read child"

* Update payments.php

Add the new permission "readchild"

* Update index.php

Add support off new permission

* Update index.php

* Update index.php

* Update index.php

* Update list.php

* Update list.php

* Update list.php

* Update payments.php
2025-10-01 17:49:35 +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
Yamil Esteban Garcia
fc1364db56 NEW add tags on proposals and supplier proposals and in statistics (#35553)
* add own supplier invoice tag filter and bulk insert

add own supplier invoice tag filter and bulk insert

* Update list.php

change format

* Bulk edit commande tags

Bulk edit commande tags

* Label filter orders and supplier order statistics

Label filter orders and supplier order statistics

* Supplier Order Label Filter and Mass Action for Supplier Order Labels

Supplier Order Label Filter and Mass Action for Supplier Order Labels

* Update index.php

change format

* Update list.php

change format

* Update index.php

change format

* Update index.php

change format

* create categories proposal and supplier proposal

create categories proposal and supplier proposal

* adds category insertion to budget

adds category insertion to budget

* Create  table llx_categorie_propal

Create  table llx_categorie_propal

* setCategories method


setCategories method

* bulk add tag and filter tag actions

bulk add tag and filter tag actions

* labels in supplier budget statistics and budgets

labels in supplier budget statistics and budgets

* change format

* adds category insertion to supplier budget

* create supplier budget category table

create supplier budget category table

* create setCategories method

create setCategories method

* add tags in bulk and filter tag actions

add tags in bulk and filter tag actions

* Update card.php

* Update card.php

* Update propal.class.php

* Update index.php

* Update index.php

* Update card.php

* Update supplier_proposal.class.php

* Update list.php

* Update supplier_proposal.class.php

* Update supplier_proposal.class.php

* Update list.php

* Update list.php

* Update card.php

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 17:37:08 +02:00
ldestailleur
54dc4452aa Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-01 17:27:12 +02:00
ldestailleur
b0406165ae Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-01 17:07:38 +02:00
ldestailleur
7eb18a140f By default an extrafields is not on on PDF 2025-10-01 17:07:27 +02:00
ldestailleur
62c009d440 Code comment 2025-10-01 17:04:30 +02:00
David Beniamine
7419604955 Allow search on date in don (#35581)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 16:21:28 +02:00
Frédéric FRANCE
0c176bc5df clean code (#35579) 2025-10-01 15:02:42 +02:00
Mohamed DAOUD
7d55a1a41a NEW Paymentok validate invoice if not already done (#35564)
* paymentok validate invoice

* add test
2025-10-01 14:51:20 +02:00
Frédéric FRANCE
1280d404ab check if file exists before include (#35570)
* check if file exists before include

* check if file exists before include

* fix
2025-10-01 13:58:20 +02:00
Frédéric FRANCE
573f951ac9 clean code (#35541)
* 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
2025-10-01 13:44:36 +02:00
Mohamed DAOUD
cb23873769 NEW Public donation page (#35565)
* public page invoice

* trans keys

* FIX CI

* FIX phpstan

* fix CI

* fix stan
2025-10-01 13:40:41 +02:00
Frédéric FRANCE
3785dd2d17 clean code (#35567)
* clean code

* clean code

* clean code
2025-10-01 13:30:02 +02:00
ldestailleur
3bab3fd349 NEW Can show both currency code and symbol into the select of currency 2025-09-30 19:02:15 +02:00
ldestailleur
54eaa1f106 More spellcheck 2025-09-30 18:30:59 +02:00
ldestailleur
9458392ae1 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-30 02:50:38 +02:00
ldestailleur
9fd37b308e CSS install 2025-09-30 02:36:47 +02:00
ldestailleur
d372f0d1f8 Look and feel v23 2025-09-30 01:20:25 +02:00
ldestailleur
d6a579f437 CSS 2025-09-30 00:43:18 +02:00
Florian Mortgat
89757d5cbf NEW: hooks showInputExtraField and showOutputExtraField to override ExtraFields::show(Input|Output)Field (#35496)
* NEW: hooks `showInputExtraField` and `showOutputExtraField` to override `ExtraFields::showInputField` and `ExtraFields::showOutputField`

* Fix inter-hook interference with 'showOptionals' because resPrint isn't output right after calling executeHooks

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-29 23:31:26 +02:00
Norbert Penel
d96de728ea Update project selection with additional parameters (#35542)
Fix #35500
2025-09-29 23:19:04 +02:00
Charlène Benke
420f4ff416 add MAIN_DOCUMENTS_LIST_IN_TWOCOLUMNS params (#35532)
* add MAIN_DOCUMENTS_LIST_IN_TWOCOLUMNS params

Display documents lists on two columns instead two following table

* Update document_actions_post_headers.tpl.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-29 21:45:10 +02:00
Charlène Benke
a91cf6086a Add hook on expense api (#35438)
* Add hook on expense api

* Fix SQL query construction in api_shipments.class.php

* Add global hookmanager declaration in api_shipments

* Remove unnecessary blank lines in api_shipments.class.php

* Remove unnecessary blank lines in api_shipments.class.php

* Update api_shipments.class.php

* Update api_shipments.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-29 21:26:41 +02:00
Mohamed DAOUD
c222bf1f85 ip protection for invoice creation (#35557) 2025-09-29 21:13:01 +02:00
Frédéric FRANCE
925d6f450d add country and custom code in fetch line (#35554)
* add country and custom code in fetch line

* add country and custom code in fetch line

* add country and custom code in fetch line

* add country and custom code in fetch line

* add country and custom code in fetch line

* add country and custom code in fetch line

* add country and custom code in fetch line

* add country and custom code in fetch line

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-29 21:09:06 +02:00
Frédéric FRANCE
dd67cab64f fix set project for actioncomm (#35543) 2025-09-29 21:07:00 +02:00
kkhelifa-opendsi
b84969a548 NEW : Add missing parameters for menus on webportal hook (#35550) 2025-09-29 20:44:13 +02:00
Frédéric FRANCE
700463596e verify if file exists before trying to include (#35548)
* verify if file exists before trying to include

* verify if file exists before trying to include
2025-09-29 20:42:44 +02:00
Frédéric FRANCE
e0fd1bdd3e clean code (#35545) 2025-09-29 20:41:32 +02:00
kkhelifa-opendsi
341a88f48a FIX : Fix variable typos in Context class or webportal (#35551) 2025-09-29 20:41:20 +02:00
Frédéric FRANCE
4657b5f02c fix CI (#35556) 2025-09-29 20:40:36 +02:00
ldestailleur
d2e101bafe css 2025-09-29 19:13:57 +02:00
ldestailleur
5bbfc5e025 Hide phpinfo link during upgrade process (already forbidden) 2025-09-29 16:06:16 +02:00
ldestailleur
e8aac4e17d Trans 2025-09-29 15:19:37 +02:00
ldestailleur
efd5e48f78 NEW The PHP info is in a popup in install page. 2025-09-29 13:56:43 +02:00
ldestailleur
c05004415b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-29 12:27:23 +02:00
ldestailleur
254924712d Better error messgae 2025-09-29 12:04:56 +02:00
Frédéric FRANCE
164f2c4414 clean code (#35539)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-28 23:19:33 +02:00
Laurent Destailleur
e73ca1d749 Better error management 2025-09-28 23:17:26 +02:00
Laurent Destailleur
3c57870e31 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-28 22:44:37 +02:00
Charlène Benke
277c01a432 Implement CRUD operations for interventional lines and contacts (#35457)
* Implement CRUD operations for interventional lines and contacts

Added methods to manage interventional lines and contacts.

* Update api_interventions.class.php

* Fix variable references in api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-28 22:41:42 +02:00
Frédéric FRANCE
f5dab1a3b6 clean code (#35535)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-28 22:27:15 +02:00
Jon Bendtsen
f3a62ae0b1 If the number of categories are smaller than the limit and the page is not 0, then we should not return anything (#35509)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-09-28 22:26:48 +02:00
Laurent Destailleur
131d1390bc Debug v23 2025-09-28 22:20:44 +02:00
Laurent Destailleur
0564b44678 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-28 21:47:12 +02:00
Laurent Destailleur
4de515c4df Debug v23 2025-09-28 21:45:37 +02:00
Frédéric FRANCE
29db95a8b3 clean code (#35538)
* clean code

* clean code

* clean code
2025-09-28 21:44:41 +02:00
Frédéric FRANCE
c4068211c5 add missing translation (#35536)
* add missing translation

* add missing translation
2025-09-28 20:59:52 +02:00
Frédéric FRANCE
a8b4ae7dfb clean code (#35534)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-28 20:58:18 +02:00
Frédéric FRANCE
7fb7d38ffc clean code (#35533) 2025-09-28 20:56:54 +02:00
Laurent Destailleur
38a7524846 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-28 20:01:36 +02:00
Laurent Destailleur
f30fb7a6a5 Test 2025-09-28 19:01:48 +02:00
Günter Lukas
4cb5fba913 NEW #31723 - Improve project overview: Hide paid orders (#35524)
* Add PaidHidden and PaidShown language entries

* Add functionality to show/hide paid lines

* Add copyright notice for Guenter Lukas

* Fix spelling of 'Guenter' to 'Günter' in copyright

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-28 14:40:06 +02:00
ldestailleur
824e35fe04 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-28 14:25:40 +02:00
ldestailleur
bd217b025f Fix CSS 2025-09-28 14:25:28 +02:00
Frédéric FRANCE
8fa1df6560 clean code (#35518)
* clean code

* fix

* fix

* clean code
2025-09-28 13:58:30 +02:00
Joachim Kueter
d286de5684 odd optional column for VAT reverse charge flag (#35530) 2025-09-28 13:57:36 +02:00
MDW
a161c5fb67 Qual: Fix phan notices, update baseline (#35528)
# Qual: Fix phan notices, update baseline

Fix some new phan notices and update baseline
2025-09-28 13:55:39 +02:00
Frédéric FRANCE
6441c42323 clean code (#35529)
* clean code

* clean code

* clean code
2025-09-28 13:54:39 +02:00
Laurent Destailleur
1466698553 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-28 01:43:10 +02:00
Laurent Destailleur
65a04831a9 Fix height 2025-09-28 01:42:50 +02:00
Anthony Damhet
c17f13316a UIUX - More intuitive select table (#35485)
* More intuitive select table

Added for objects:
- Members
- ActionComm
- Mailing
- Bank Accounts
- Various Payments
- Cash Control
- Paiement
- Contacts
- VAT
- Contracts
- Cron
- Gifts (Dons)
- Expedition
- Expense Reports
- FichInter
- Supplier Proposals
- Supplier Orders
- Supplier Invoices
- Supplier Paiements
- Products and supplier products
- Holidays
- Knowledge record
- Partnership
- Inventory
- Stock
- Projects
- Tasks
- Tickets
- Societes
- Salaries
- Resource
- Users

* Add Status message on documentation

* Remove intuitive select experimetns

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-28 01:21:40 +02:00
Frédéric FRANCE
33ca6820a2 add doc (#35516)
* add doc

* add doc

* add doc

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-27 22:08:13 +02:00
Laurent Destailleur
d3bef6ee32 Debug v23 2025-09-27 18:28:35 +02:00
ldestailleur
e45fe1f988 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-27 15:57:27 +02:00
ldestailleur
4906ad29d6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-27 15:38:07 +02:00
ldestailleur
488b7d88a2 Enhance output for unalterable logs 2025-09-27 15:37:53 +02:00
Frédéric FRANCE
0afc7eed80 clean code (#35515)
* clean code

* add doc

* add doc
2025-09-27 12:28:31 +02:00
Frédéric FRANCE
c2210c542f clean code (#35514) 2025-09-27 12:23:48 +02:00
Alexandre SPANGARO
b4a88253eb UIUX - More intuitive select table - Module builder (#35490)
Module builder

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-27 12:10:48 +02:00
Norbert Penel
5c043937f3 fix webhook with bad MRP trigger call (#35507)
* fix webhook with bad MRP trigger call

fix #35258

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-27 04:04:38 +02:00
ldestailleur
bf21674d27 Fix search in website pages 2025-09-27 03:26:23 +02:00
ldestailleur
3f1709123c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-27 02:29:07 +02:00
ldestailleur
8696b0ab6f Try to add PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE to restore
an old behaviour.
2025-09-27 02:28:41 +02:00
ldestailleur
7e77994cec Rename hidden constant for a better understanding 2025-09-27 02:20:40 +02:00
kkhelifa-opendsi
21af311344 NEW : Change the path for the mailing files (#34878)
* NEW : Change the path for the mailing files because if you have more than 100 mailing you have the files of the previous mailing show in the newest.
Only activate if the global MAILING_USE_NEW_PATH_FOR_FILES is set to 1.
Add a script for move files to new path.

* Place migration script into repair.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: tnegre <tnegre@open-dsi.fr>
2025-09-27 00:08:56 +02:00
kkhelifa-opendsi
a9cd1d2bb9 New : Copy support of the deposit percent of the payment mode found in customer proposal, customer order and customer invoice to supplier proposal, order and invoice (#35432)
* New : Copy support of the deposit percent of the payment mode found in customer proposal, customer order and customer invoice to supplier proposal, order and invoice

* Correction pre-commit / travis CI

* Correction pre-commit / travis CI

* Correction pre-commit / travis CI

* Correction pre-commit / travis CI
2025-09-26 23:59:51 +02:00
Charlène Benke
a633c1db81 NEW Add contact management on project Api (#35459)
* Add contact management on project Api

* Update api_projects.class.php

* Update api_projects.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-26 23:56:51 +02:00
Frédéric FRANCE
3ed79a2055 Fix warning in mo_production.php if no extrafields (#35482) 2025-09-26 23:56:23 +02:00
Frédéric FRANCE
55f4c8f7ae clean code (#35486)
* clean code

* clean baseline
2025-09-26 23:55:58 +02:00
John BOTELLA
f8b9748d49 New doc for intuitive table line selection (#35491)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-26 23:55:43 +02:00
Vincent Maury
2aa57c3ce2 Add mp4 and webm to previews (#35494)
So simple to do ...

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-26 23:54:19 +02:00
Frédéric FRANCE
01b917c0a1 clean code (#35505) 2025-09-26 23:53:49 +02:00
Frédéric FRANCE
5ae9e3fc51 add TRIGGER_PREFIX in workstation.class.php (#35508) 2025-09-26 23:52:51 +02:00
Frédéric FRANCE
6b433afab1 clean code (#35510) 2025-09-26 23:52:29 +02:00
Frédéric FRANCE
680f4b6c31 fix CI (#35481)
* fix CI

* Update paymentsalary.class.php

* clean phpstan baseline

* clean code

* clean code
2025-09-26 20:47:34 +02:00
Frédéric FRANCE
343e05efc5 update phpstan (#35487) 2025-09-26 20:46:46 +02:00
Laurent Destailleur
4284d147bf Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-26 19:17:09 +02:00
ldestailleur
a43bf46a75 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-26 01:27:00 +02:00
Charlène Benke
debdeb071d add current date link on Date Delivery Planned (#29876)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-25 12:24:09 +02:00
Marc de Lima Lucio
8428a5ccfa NEW: extrafields: add field to link a field to a module (#34416)
* NEW: extrafields: add field to link a field to a module

* Update 22.0.0-23.0.0.sql

* Update llx_extrafields.sql

* Update 22.0.0-23.0.0.sql

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-25 12:20:46 +02:00
Norbert Penel
4bcb7e16da FIX price.php (#32181)
* FIX price.php

https://github.com/Dolibarr/dolibarr/issues/32180

* Update price.php

* Update price.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-25 12:07:36 +02:00
ldestailleur
46900b8a37 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-25 11:53:53 +02:00
ldestailleur
a4d9b335ce Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-25 11:53:03 +02:00
VIAL-GOUTEYRON Quentin
049cbbfb4d Fix MRP: Add hook calculateCostsBomAfter to alter BOM costs (#35465)
* fix doc (#35416)

* fix doc

* Update commonobject.class.php

* Update mo.class.php

* FIX missing entity filter (#35461)

* Add post-processing hook `calculateCostsBomAfter` in BOM cost calculations

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Regis Houssin <regis.houssin@inodbox.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-25 11:48:19 +02:00
ldestailleur
023e3081a4 Fix link to ref of salary payment 2025-09-25 11:09:00 +02:00
ldestailleur
9dd0c922da Fix CI 2025-09-24 18:53:58 +02:00
ldestailleur
38082f52c5 Doc 2025-09-24 18:25:08 +02:00
ldestailleur
4bc5892544 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-24 17:00:53 +02:00
ldestailleur
3b5d1eb315 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-24 16:35:44 +02:00
ldestailleur
77d956ce92 Clean code 2025-09-24 16:35:25 +02:00
Bradley Jarvis
4f81ffb308 FIX: Error on add contact (#35460)
* FIX: Error on add contact

Trigger COMMANDE_ADD_CONTACT causing error when adding a contact to and
order, this fix updates the COMMANDE prefix to ORDER

* FIX: delete contact

This fixes the trigger call for delete contact on orders

* FIX: Update patch

Updated to reflect recent PR to add TRIGGER_PREFIX to commande class

* Update commonobject.class.php

Reduce risk of regression

---------

Co-authored-by: brad <brad@endurotags.com.au>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-24 16:33:40 +02:00
ldestailleur
75925aee71 Debug v23 2025-09-24 12:05:30 +02:00
ldestailleur
20875dead9 Use fields into the list of events 2025-09-24 12:01:52 +02:00
ldestailleur
0351057ef2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-24 11:13:43 +02:00
ldestailleur
16a7431168 Add fields for actioncomm to fix #35422 2025-09-24 11:13:24 +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
Laurent Destailleur
e85c2d70b9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-24 00:56:29 +02:00
Frédéric FRANCE
bb9899085e clean code (#35451)
* clean code

apiroute is interventions

* Update api_interventions.class.php

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix bad condition

* 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-23 23:22:57 +02:00
Alexandre SPANGARO
5df20007bc NEW API User - Remove user from group (#35453)
* NEW API User - Remove user from group

* Update api_users.class.php

* Update api_users.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-23 23:22:38 +02:00
ldestailleur
ce6bd7146b NEW Make the public contact form with experimental status 2025-09-23 23:15:13 +02:00
ldestailleur
55fe8b09e3 NEW Make the public contact form with experimental status 2025-09-23 23:13:42 +02:00
ldestailleur
79cf1410b3 Test CI 2025-09-23 22:10:57 +02:00
ldestailleur
6f15fcc66c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-23 22:03:24 +02:00
ldestailleur
2a7ce987c3 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-23 22:03:09 +02:00
Charlène Benke
cd03e9fc36 Add check for invoice status before line deletion (#35456)
* Add check for invoice status before line deletion

* Change invoice status check from fk_statut to status
2025-09-23 21:44:47 +02:00
Charlène Benke
496fef63a3 contact deletion in api_orders class for internal and external (#35455)
* contact deletion in api_orders class for internal and external

* Update api_orders.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-23 21:43:39 +02:00
Frédéric FRANCE
ca8a6c9c45 clean code (#35447)
* clean code

* clean code

* clean code
2025-09-23 21:42:20 +02:00
kaantopkaya
985b6f258a new: add otherCurlOptions to getURLContent (#35454) 2025-09-23 21:41:32 +02:00
github-actions[bot]
d5c61d07ba PHPStan > Update baseline (#35452)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-23 21:39:51 +02:00
ldestailleur
ad830a346e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-23 16:50:17 +02:00
ldestailleur
bde100bf9d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-23 10:18:26 +02:00
ldestailleur
c063eea63d Debug v23 2025-09-23 10:18:08 +02:00
Frédéric FRANCE
c08c7170d2 clean code (#35427)
* 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-22 22:25:00 +02:00
Anthony Damhet
1df61bbd98 Add intuitive table selection (#35444)
Add intuitive table selection with class .row-with-select
Added to propal, order and invoice list
2025-09-22 22:20:52 +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
github-actions[bot]
21100454f6 PHPStan > Update baseline (#35433)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-22 20:32:02 +02:00
Frédéric FRANCE
a7cebb70a9 fix usage of recipient translation (#35437)
* fix usage of recipient translation

* fix usage of recipient translation

* fix usage of recipient translation
2025-09-22 20:30:23 +02:00
ldestailleur
17d3a35a51 Fix select technical id 2025-09-22 13:38:27 +02:00
ldestailleur
6ddc9eb796 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-22 11:56:18 +02:00
ldestailleur
f4d3c63332 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-22 10:50:45 +02:00
ldestailleur
401d1dcdc0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-22 10:42:52 +02:00
ldestailleur
f6ac3eda7d spellcheck war 2025-09-22 10:33:50 +02:00
Bradley Jarvis
6c8b4da445 FIX - MRP MO Product to Consume (#35424)
* FIX - MRP MO Product to Consume

Fixes MO Product to Consume when recursive BOM's are used, the product
to consume only includes the BOM line items instead of BOM product

* fix php-stan errors

* fix phan analysis errors

* fix phan analysis errors take 2

---------

Co-authored-by: brad <brad@endurotags.com.au>
2025-09-22 10:18:14 +02:00
Laurent Destailleur
7ef5b4d427 Code comment 2025-09-22 02:39:45 +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
Vincent Maury
1abb76dc2e Fix 34301 Project selector on supplier proposal filters incorrectly by thirdparty, ignoring global constant (#34498)
* Fix 34301

* Fix issue #34301

* Fix issue #34301

* Update card.php

* Update card.php

---------

Co-authored-by: vmaury <vmaury@vmaury-ThinkPad-X240>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 23:49:46 +02:00
Charlène Benke
e02991ed7f NEW Add hook initialization for interventions API (#35203)
* NEW Add hook initialization for interventions API

the goal is to enhance the search function on the api (by sample add linked contact or user name)

* Clean up whitespace in api_interventions.class.php

* Fix parameter reference in executeHooks call

* Update api_interventions.class.php

* Update action name in API intervention hooks

* Add 'apimethod' to parameters in API hook

* Update api_interventions.class.php

* Update api_interventions.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 23:23:39 +02:00
Frédéric FRANCE
8fd4d0332d clean code (#35423)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-21 23:22:33 +02:00
ldestailleur
6a97704644 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-21 17:11:03 +02:00
ldestailleur
1008b0f3e4 Fix CI 2025-09-21 17:10:53 +02:00
ldestailleur
137d3e579b CSS 2025-09-21 17:10:07 +02:00
ChristosK.
45336e50a4 Update recap-fourn.php (#35417)
* Update recap-fourn.php

The key improvement is that now the balance calculation works correctly with descending order of movements. The balance will show the most recent transaction with the cumulative total of all transactions, and older transactions will show their respective balances as of that time.
This implementation now matches the behavior of compta\recap-compta.php where the balance is calculated from bottom to top when the movements are displayed in descending order.

* Update recap-fourn.php

The key improvement is that now the balance calculation works correctly with descending order of movements. The balance will show the most recent transaction with the cumulative total of all transactions, and older transactions will show their respective balances as of that time.
This implementation now matches the behavior of compta\recap-compta.php where the balance is calculated from bottom to top when the movements are displayed in descending order.

* Update recap-fourn.php

fix reordering by date column

* Update recap-fourn.php

* Update recap-fourn.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 16:52:43 +02:00
ldestailleur
fdf3b9057a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-21 16:51:32 +02:00
ldestailleur
31b9e008fe Fix color of status 2025-09-21 16:51:20 +02:00
ldestailleur
13b3e15503 Fix CI 2025-09-21 16:04:29 +02:00
github-actions[bot]
e169718b4c PHPStan > Update baseline (#35420)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-21 15:32:44 +02:00
Frédéric FRANCE
86f20799bc clean code (#35419)
* clean code

* clean code
2025-09-21 15:32:34 +02:00
ldestailleur
b783743b10 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-21 15:31:55 +02:00
ldestailleur
700cbfb19c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-21 15:28:41 +02:00
ldestailleur
842f57b866 Fix hack to avoid infinite loop in restler when xdebug is on 2025-09-21 15:26:47 +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
ldestailleur
27c725f5ca Clean code 2025-09-21 14:29:34 +02:00
ldestailleur
e45352bd11 Clean code. Replace property with local variable. 2025-09-21 14:21:38 +02:00
Charlène Benke
9e3d909570 add getTimespent on api task (#35263)
* add getTimespent on api task

* Fix return statement in api_tasks.class.php

* Fix return statement in api_tasks.class.php

* Fix formatting and spacing in getTimespent method

* Fix formatting of if statement in getTimespent method

* Update api_tasks.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 12:30:48 +02:00
ldestailleur
35e720354e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-21 12:22:19 +02:00
ldestailleur
82917d2b75 Complete parameter for api hook 2025-09-21 12:22:08 +02:00
Frédéric FRANCE
8753595903 fix translation member (#35415) 2025-09-21 12:12:29 +02:00
Frédéric FRANCE
e7ddb684e0 clean code (#35387)
* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 12:12:09 +02:00
Frédéric FRANCE
5c2344cca8 clean code (#35396)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-21 12:11:36 +02:00
ldestailleur
bf98e2b1d5 Debug setup reminders v23 2025-09-20 19:33:05 +02:00
ldestailleur
8390a19d59 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-20 19:13:26 +02:00
ldestailleur
297d43d514 Debug v23 2025-09-20 19:12:43 +02:00
webmaster67
7dd1e5a95f NEW More webportal fonctions - Can add shared files and thirdparty documents (#35391)
* Create documentlist.controller.class.php

Intégration de mon portail client personnalisé avec GED
attention 
class/sontext.class.php devra aussi être modifier.

* Update context.class.php

ajout du ged 
pour les fichiers joints par tiers.

* Update context.class.php

ajout d'accès à fichiers joints du tiers.

* Update menu.tpl.php

ajout du menu accès au GED

* Update README.md

* Update README.md

* Update README.md

* Add files via upload

document utile sert a partager via le GED de dolibarr des fichiers avec tous les clients utilisateur du webportal.

* Update context.class.php

ajout dans le menu de deux controleur suplémentaire.

* Update menu.tpl.php

ajoute des deux chapitre dans le menu

* Update README.md

* Update README.md

* Update menu.tpl.php

document format change

* Add files via upload

mises à jour et normalisation fichiers

* Add files via upload

ajout webportal.lang

* Update README.md

* Delete htdocs/webportal/documentutile.controller.class.php

* Update menu.tpl.php

* Update README.md

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update menu.tpl.php

* Update menu.tpl.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update README.md

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update README.md

* Create webportal.lang

* Update webportal.lang

* Update webportal.lang

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update website.lang

* Delete htdocs/langs/fr_FR/webportal.lang

* Delete htdocs/langs/en_US/webportal.lang

* Update README.md

* Update README.md

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Create abstractdocument.controller.class.php

* Update website.lang

* Update website.lang

* Update website.lang

* Update README.md

* Update README.md

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update README.md

* Update context.class.php

* Update README.md

* Update abstractdocument.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update menu.tpl.php

* Update documentlist.controller.class.php

* Update abstractdocument.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update shareddocuments.controller.class.php

* Update documentlist.controller.class.php

* Update menu.tpl.php

* Update menu.tpl.php

* Update README.md

* Update context.class.php

* Update documentlist.controller.class.php

* Update menu.tpl.php

* Update menu.tpl.php

* Update context.class.php

* Update documentlist.controller.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-20 19:11:31 +02:00
ldestailleur
73f1b50ea1 Fix default mode is edit 2025-09-20 18:47:10 +02:00
Frédéric FRANCE
b9776e8a83 fix reminders sms (#35398)
* fix reminders sms

* fix reminders sms

* fix reminders sms

* fix reminders sms

* fix durations

* fix durations

* fix durations

* fix durations

* fix durations

* fix durations

* fix durations

* fix durations

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-20 18:38:10 +02:00
Carlos Herrera
10c7a67ac1 Problem in Gantt view. Tasks in project (#35412)
Fixes #35411
2025-09-20 16:53:32 +02:00
ldestailleur
f9cd8367ad Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-20 16:23:22 +02:00
ldestailleur
02809d5901 Fix syntax 2025-09-20 16:00:51 +02:00
MDW
b3228aa7ce Qual: Fix phan notices (#35406)
* fix CI

* fix

* Qual: Fix newly appeard phan notices

# Qual: Fix newly appeard phan notices

Fix notices that appearce sin a previous phan report - some of these
notices are masked by the current baseline.

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Frédéric FRANCE <frederic.france@free.fr>
2025-09-20 15:59:05 +02:00
Frédéric FRANCE
d1572fc3ea fix CI (#35409)
* fix CI

* fix
2025-09-20 15:57:39 +02:00
ldestailleur
d3de333f54 Trans 2025-09-20 15:56:19 +02:00
ldestailleur
acd694914b FIX Bad management of carriage return when requesting IA API. 2025-09-20 15:24:45 +02:00
ldestailleur
caac9a5218 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-20 15:01:36 +02:00
ldestailleur
34a34efec5 Enhance AI setup and log report 2025-09-20 15:01:26 +02:00
ldestailleur
9148dcfe45 Enhance AI setup and log report 2025-09-20 14:58:04 +02:00
ldestailleur
53e1d3630f Clean code 2025-09-20 12:13:24 +02:00
ldestailleur
0b93c10df9 Clean code 2025-09-20 12:12:28 +02:00
ldestailleur
706b9f47d8 Move doc for git commit template 2025-09-20 03:10:33 +02:00
ldestailleur
e4d10caf33 Trans 2025-09-20 02:53:00 +02:00
ldestailleur
5ac469634e Clean code for PDF invoices 2025-09-20 02:48:27 +02:00
Carlos Herrera
57157db2b7 Cehojac/issue35362 (#35364)
* intervencions api call dont show the objects relations
Fixes #35362

* feat: add loadlinkedobjects parameter to control linked object loading in interventions API

thank you for the recomendarion @eldy !!!!
2025-09-20 01:11:19 +02:00
ldestailleur
cb2d22e016 Fix roundind using stock accuracy ('MS') 2025-09-20 01:08:54 +02:00
Bradley Jarvis
7e712cd368 Fix sub BOM quantities (#35371)
* FIX: reqursive bom quantities

Correctly handle quantities on BOM recursion. Current behavior is that
sub BOM total quantity is multiplied by parent quantity for that line,
the expected behaviour is that the parent BOM would be including sub BOM
on a per unit base.

* Simplified code

* Update objectline_view.tpl.php

* Update bom.class.php

* Update bom.class.php

* Update bom.class.php

* Update bom.class.php

---------

Co-authored-by: brad <brad@endurotags.com.au>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-20 01:00:39 +02:00
Vincent de Grandpré
2d76f12dae Repair recalculateinvoicetotal (#35381)
* PHPStan > Update baseline

* FIX#33963 - Enabling foreign key field to allow mandatory parameter saving

* Added author to copyright

* Correction calcul du total des taxes

* Travis

* code format

* espaces superflus

* bis

* Update repair.php

* Update repair.php

* PHPStan > Update baseline

* set paid = 1 when total_ttc equals sum of payments

* current upstream file

---------

Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-20 00:49:52 +02:00
Yamil Esteban Garcia
8037974241 NEW add supplier invoice, order and supplier order tag filter and bulk insert and statistics order and supplier order (#35399)
* add own supplier invoice tag filter and bulk insert

add own supplier invoice tag filter and bulk insert

* Update list.php

change format

* Bulk edit commande tags

Bulk edit commande tags

* Label filter orders and supplier order statistics

Label filter orders and supplier order statistics

* Supplier Order Label Filter and Mass Action for Supplier Order Labels

Supplier Order Label Filter and Mass Action for Supplier Order Labels

* Update index.php

change format

* Update list.php

change format

* Update index.php

change format

* Update index.php

change format

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-20 00:46:32 +02:00
MDW
decd14c735 Qual: Update phan baseline (#35405) 2025-09-20 00:45:43 +02:00
Carlos Herrera
b732fd2ed7 feat: add contact list parameter to ticket API endpoints to control contact data retrieval (#35404) 2025-09-20 00:45:30 +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
Charlène Benke
ad4f4fb619 Refactor VAT array handling in PDF generation (#35395)
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] is present on 2 part of the if
2025-09-20 00:01:19 +02:00
Frédéric FRANCE
3adedc23d9 fix CI 🐛 (#35392)
* add picto

* fix padding

* fix CI

* Update user.class.php

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2025-09-19 23:38:52 +02:00
ldestailleur
daa98872eb Fix trans 2025-09-19 16:09:43 +02:00
ldestailleur
25a59cb869 Doc 2025-09-19 13:33:37 +02:00
ldestailleur
43cf29d2e1 Clean corrupted data 2025-09-19 12:20:22 +02:00
ldestailleur
b292c3d631 Add constant MAIN_USE_TITLE_FOR_USER to show a property that is not used 2025-09-18 22:28:14 +02:00
ldestailleur
2a6064b755 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-18 21:49:58 +02:00
ldestailleur
958bca6223 Fix bad var 2025-09-18 16:30:30 +02:00
ldestailleur
4a363478ae Clean code with rector 2025-09-18 16:26:38 +02:00
ldestailleur
02ec4cf421 Test 2025-09-18 15:41:47 +02:00
ldestailleur
b30aa97ba9 Clean code 2025-09-18 15:00:47 +02:00
ldestailleur
f665a0301e Clean code 2025-09-18 14:52:39 +02:00
ldestailleur
a441b412cc Clean code 2025-09-18 14:04:48 +02:00
ldestailleur
6c8e2a1320 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-18 13:54:44 +02:00
ldestailleur
8bd82c0b67 Clean code 2025-09-18 13:54:23 +02:00
ldestailleur
65f865b843 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-18 13:33:54 +02:00
ldestailleur
09240c30c7 FIX CI 2025-09-18 13:33:32 +02:00
VIAL-GOUTEYRON Quentin
1874deef49 FIX delivery triggers and mail templates: correct inconsistencies in email triggers and templates` (#35264)
* `fix(delivery): correct inconsistencies in email triggers and templates`

**Body:**
- Adjusted email trigger names from `RECEPTION_*` to `SHIPPING_*`.
- Updated parameters and placeholders for shipment email tracking.
- Removed redundant `reception_send` entry in mail templates for shipping.

* `fix(delivery): update email triggers and templates for deliveries`

**Body:**
- Replaced email trigger `SHIPPING_SENTBYMAIL` with `DELIVERY_SENTBYMAIL`.
- Updated template references from `shipping_*` to `delivery_*` for consistency.
- Modified tracking ID format from `shi` to `del` in `card.php`.
- Added `MailToSendDelivery` language entry for email labels.
- Adjusted mail templates to include `delivery_send` entries.
2025-09-18 13:23:57 +02:00
ldestailleur
42edd8f22d Clean code 2025-09-18 12:19:29 +02:00
Yamil Esteban Garcia
6329e03c7d add filter by invoice categories in the statistics module (#35388)
add filter by invoice categories in the statistics module
2025-09-18 12:09:39 +02:00
ldestailleur
6ed764bedf Clean code 2025-09-18 11:40:56 +02:00
Frédéric FRANCE
d6dce86061 clean code (#35379)
* clean code

* clean code

* clean code

* clean code
2025-09-18 11:08:06 +02:00
Frédéric FRANCE
af47262f4f fix missing translation (#35378) 2025-09-18 10:52:47 +02:00
ldestailleur
333e977bf9 Allowed commit 2025-09-17 23:25:33 +02:00
ldestailleur
cd0fd6f466 CSS 2025-09-17 23:24:25 +02:00
ldestailleur
2572847b2a Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-17 18:29:07 +02:00
Frédéric FRANCE
2505c3755b clean code (#35367)
* 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-17 18:18:16 +02:00
Bahfir Abbes
93973e13c5 Fix:prevent handling update action by generic include of actions_addupdatedelete.inc.php (#35369)
* Fix:prevent handling update action by  generic include of actions_addupdatedelete.inc.php

Fix:
To prevent handling update action by generic post update action in inventories at /core/actions_addupdatedelete.inc.php, we need to unset $action variable, otherwise $object fileds are filled with with empty values.

* Update inventory.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-17 15:11:09 +02:00
ldestailleur
073f7f3620 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-17 15:04:35 +02:00
ldestailleur
4e83087e28 Fix complete #35368 2025-09-17 15:04:01 +02:00
Yamil Esteban Garcia
161b73bf7b FIX The write_file function should return -1 if an error exists (#35368)
* Error: When creating an invoice for a supplier order with a negative value #30516

Error: When creating an invoice for a supplier order with a negative value #30516

* Update html.form.class.php

Modifications made related to the issue
Search for variants by EAN #34567

* Update html.form.class.php

I change :

if(getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')){
with
if (getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')) {

and 

SEARCH_VARIANTS_OF_EAN13
into
PRODUIT_ATTRIBUTES_HIDECHILD_BUT_ALLOW_SEARCH_IN_EAN13

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* added tag mass action

added tag mass action

* Update list.php

* Update pdf_crabe.modules.php

The write_file function as its own documentation describes returns 1 0 a value minus 0 if an error exists. Therefore, if there is an error in the hook more than saving the error, it must return 0 since an error occurred

* Update pdf_crabe.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-17 14:59:51 +02:00
ldestailleur
41dd77959a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-17 14:45:48 +02:00
ldestailleur
1cea5220da Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-17 14:25:15 +02:00
Frédéric FRANCE
c8458c22e8 clean code (#35358)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-17 14:22:58 +02:00
ldestailleur
f2f5f23f8f Fix syntax error 2025-09-17 14:22:53 +02:00
atm-GregM
c84d4c53e5 New develop import export product customer price (#35349)
* NEW import/export product customer price

* back travis and more

* back travis 2
2025-09-17 14:19:36 +02:00
ldestailleur
f5d7d165b0 Debug script 2025-09-17 14:17:29 +02:00
Frédéric FRANCE
be6c3df029 fix CI (#35361)
* fix CI

* Update msg-commit

* Update ruleset.xml
2025-09-17 14:12:39 +02:00
Frédéric FRANCE
078da229c8 clean code (#35352)
* 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

* Clean code

* Clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-17 14:11:32 +02:00
Frédéric FRANCE
612248a9e9 clean code (#35365)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-17 14:10:48 +02:00
ldestailleur
e0073b000d Debug v23 2025-09-17 14:03:09 +02:00
ldestailleur
c7407473c1 Fix try to work on multientity even if cron disable don entity 1. 2025-09-17 13:54:21 +02:00
ldestailleur
5df4a90edb Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-17 13:43:23 +02:00
ldestailleur
f2ff34d573 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-17 12:59:19 +02:00
ldestailleur
760a808a5d Fix warnings 2025-09-16 12:03:37 +02:00
ldestailleur
067d4e332e CSS 2025-09-16 11:59:01 +02:00
ldestailleur
d121d7e173 Try git commit 2025-09-16 11:42:39 +02:00
ldestailleur
29ccbb43d5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-16 11:17:22 +02:00
ldestailleur
111e319be8 Fix changelog 2025-09-16 11:16:54 +02:00
ldestailleur
142fbf93b0 QUAL: The library timepicker.js has been removed. Was not used by
Dolibarr.
2025-09-16 11:16:34 +02:00
Frédéric FRANCE
4c4b344510 fix CI (#35359)
* fix CI

* Update card.php
2025-09-16 10:16:09 +02:00
Laurent Destailleur
ea7152a818 Fix phan 2025-09-16 01:23:16 +02:00
Laurent Destailleur
2142860685 Fix warning 2025-09-16 01:14:43 +02:00
Laurent Destailleur
a55a57d0ce Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-16 00:57:09 +02:00
Laurent Destailleur
8e1cf72de0 Debug v23 2025-09-16 00:56:18 +02:00
Frédéric FRANCE
83407ec49f clean code (#35355) 2025-09-16 00:55:58 +02:00
Frédéric FRANCE
f03f54d406 clean code (#35350)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-16 00:54:59 +02:00
Laurent Destailleur
b757f3392f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-15 23:29:19 +02:00
Laurent Destailleur
7d7994aa1d Clean code 2025-09-15 23:28:18 +02:00
Frédéric FRANCE
d685f1e529 fix CI (#35353)
* fix CI

* Update header.tpl.php

* Update style.css.php

* Update webportal.main.inc.php

* Update files.lib.php
2025-09-15 22:45:42 +02:00
Laurent Destailleur
8a87de9112 CSS 2025-09-15 22:44:11 +02:00
Laurent Destailleur
9095bc46ef Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-15 22:26:56 +02:00
Laurent Destailleur
31c97e3991 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-15 22:26:54 +02:00
Laurent Destailleur
0b605bffba CSS 2025-09-15 22:26:19 +02:00
ldestailleur
818f6b1555 Fix warning 2025-09-15 19:36:49 +02:00
ldestailleur
e8d2095816 NEW dol_sort_array can be used with 2 sorting criteria. 2025-09-15 19:28:38 +02:00
ldestailleur
761804ce55 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-15 18:14:29 +02:00
ldestailleur
74cc569329 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-15 18:14:11 +02:00
Yamil Esteban Garcia
fde6056176 added tag mass action (#35347)
* Error: When creating an invoice for a supplier order with a negative value #30516

Error: When creating an invoice for a supplier order with a negative value #30516

* Update html.form.class.php

Modifications made related to the issue
Search for variants by EAN #34567

* Update html.form.class.php

I change :

if(getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')){
with
if (getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')) {

and 

SEARCH_VARIANTS_OF_EAN13
into
PRODUIT_ATTRIBUTES_HIDECHILD_BUT_ALLOW_SEARCH_IN_EAN13

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* added tag mass action

added tag mass action

* Update list.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-15 16:19:36 +02:00
Frédéric FRANCE
a6c98599ec clean code (#35346)
* clean code

* clean code
2025-09-15 16:18:51 +02:00
Frédéric FRANCE
eda0b8950b add doc (#35345)
* clean code

* clean code
2025-09-15 16:18:01 +02:00
github-actions[bot]
9d3799f337 PHPStan > Update baseline (#35342)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-15 16:17:42 +02:00
Charlène Benke
175eea301f NEW add private and public note on ticket (#35303)
* Update copyright and add note fields in SQL

* Add note_public and note_private columns to llx_ticket

* Implement notes tab in ticket details

* Add fk_user_modif column to llx_ticket table

* Add fk_user_modif column to llx_ticket table

* Add files via upload

* Add private and public note fields to ticket class

* Update ticket.class.php

* Update ticket.class.php

* Update note.php

* Update note.php

* Update note.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-15 16:17:28 +02:00
Frédéric FRANCE
924e024db3 clean code (#35344)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-15 16:16:42 +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
Frédéric FRANCE
21d50f1a58 clean code expedition class (#35327)
* clean code expedition class

* clean code expedition class

* clean code expedition class

* clean code expedition class

* clean code expedition class

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* clean code
2025-09-15 16:16:22 +02:00
Frédéric FRANCE
4c80eee890 clean code (#35341)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-15 16:15:49 +02:00
ldestailleur
e69ff3428b css 2025-09-15 16:05:42 +02:00
ldestailleur
6ee8db9f3f Fix css 2025-09-15 16:05:35 +02:00
ldestailleur
c12764e81f Debug webportal 2025-09-15 15:38:42 +02:00
ldestailleur
33ed1b2f1a Fix bad recording of custom CSS in webportal 2025-09-15 15:33:15 +02:00
ldestailleur
361169b896 Fix bad tab underlined in display setup 2025-09-15 15:16:36 +02:00
ldestailleur
db32812476 css 2025-09-15 14:45:02 +02:00
ldestailleur
b87f18cb4f css 2025-09-15 14:42:21 +02:00
ldestailleur
8456749135 Clean code. Removed octicons directory. 2025-09-15 14:40:34 +02:00
ldestailleur
e1e47034d5 FIX webportal must not use resources out public dir neither external
files.
2025-09-15 13:26:47 +02:00
ldestailleur
bf3a2c1e01 CSS 2025-09-14 23:45:49 +02:00
ldestailleur
0958108721 Fix date update 2025-09-14 20:29:14 +02:00
ldestailleur
fa935c8820 bcmath is used by swiftmail authent, not implemented. 2025-09-14 20:13:11 +02:00
ldestailleur
cf5caa80b2 FIX Debug bad path used into webportal. Missing http headers in login. 2025-09-14 19:45:41 +02:00
ldestailleur
a3881ef67b Clean code 2025-09-14 12:01:35 +02:00
Frédéric FRANCE
933ce868df add check in dolibarr phpinfo page (#35332)
* add check in phpinfo page

* Update phpinfo.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-14 11:59:26 +02:00
Frédéric FRANCE
f14bc0bfbe clean code (#35340)
* clean code

* clean code

* clean code
2025-09-14 11:57:52 +02:00
Frédéric FRANCE
62a7756a43 fix civility_id for webportal member (#35339)
* fix civility_id for webportal member

* Update html.formcardwebportal.class.php

* fix

* fix

* fix

* fix date

* fix translation

* add doc
2025-09-14 11:17:01 +02:00
Frédéric FRANCE
e1931b2967 clean code (#35338)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-14 11:14:34 +02:00
Frédéric FRANCE
063a6b8938 fix pictos (#35337) 2025-09-13 21:00:01 +02:00
Frédéric FRANCE
c500febdc4 fix pictos (#35335) 2025-09-13 20:59:52 +02:00
github-actions[bot]
e5ed2c83f0 PHPStan > Update baseline (#35336)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-13 20:57:42 +02:00
Frédéric FRANCE
207d13c365 fix pictos (#35334) 2025-09-13 20:57:35 +02:00
Frédéric FRANCE
c25aa82fc6 clean code (#35333)
* clean code

* clean code

* clean code
2025-09-13 20:57:27 +02:00
Frédéric FRANCE
ec23fc54f8 add picto (#35329)
* add picto

* fix padding
2025-09-12 18:57:23 +02:00
Frédéric FRANCE
1bc100a082 fix missing translation (#35323)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-12 18:56:54 +02:00
kkhelifa-opendsi
f580bb85a5 NEW : Add hooks in webportal (#35326) 2025-09-12 15:20:32 +02:00
Frédéric FRANCE
9f90c9d371 Fix missing translation (#35322)
* fix missing translation

* fix missing translation

* fix missing translation

* fix missing translation
2025-09-12 15:17:18 +02:00
Bradley Jarvis
75c306c05d FIX: Update order line (#35321)
Co-authored-by: brad <brad@endurotags.com.au>
2025-09-12 15:17:05 +02:00
Frédéric FRANCE
7986c02711 fix CI (#35328)
* fix CI

* Update interfaces.class.php

* Update interfaces.class.php

* Update interfaces.class.php

* Update interfaces.class.php

* Update interfaces.class.php

* fix

* fix
2025-09-12 15:16:42 +02:00
Lucas Marcouiller
d0b7e27ca5 NEW Feature to merge duplicate members (#35308)
* New merge members

* fix fields

* add trans

* fix CI

* fix Ci

* fix Ci

* fix CI

* Fix CI

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-12 15:14:45 +02:00
Frédéric FRANCE
1bbbd96690 clean code (#35317)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-12 15:12:55 +02:00
ldestailleur
8b57bb2e41 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-12 13:30:12 +02:00
ldestailleur
13407fe5ee Prepare code for Loi Finance 2025-09-12 13:29:19 +02:00
Laurent Destailleur
59dadae226 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-12 03:08:32 +02:00
Laurent Destailleur
320f02ed27 Prepare ci for tag check 2025-09-12 03:05:48 +02:00
Bradley Jarvis
89dda279a0 FIX: setShippingMethod tigger throwing error (#35320)
* FIX: setShippingMethod tigger throwing error

* Update commonobject.class.php

---------

Co-authored-by: brad <brad@endurotags.com.au>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-12 02:49:58 +02:00
Frédéric FRANCE
554d2baa32 clean code adherent (member) class (#35259)
* clean code adherent (member) class

* 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

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-12 02:40:35 +02:00
Frédéric FRANCE
408ea58858 fix fatal error (#35284)
* fix fatal error

* Update card.php

* Update product.class.php
2025-09-12 02:34:17 +02:00
Fabian Volkers
934fe08921 🐛 Use reception email templates for receptions (#35310) 2025-09-12 02:30:24 +02:00
ThomasNgr-OpenDSI
acc3a47272 NEW add fields usage_opportunity, usage_task, usage_bill_time for project import (#35301) 2025-09-12 02:29:43 +02:00
Eric - CAP-REL
1f8b5db2c7 exit code must be >= 0 (#35311) 2025-09-12 02:29:23 +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
Eric - CAP-REL
607e13b83f makepack : exit if filelist fail (#35312) 2025-09-12 01:53:22 +02:00
Frédéric FRANCE
53e7810db4 fix missing translations (#35315)
* fix missing translations

* fix missing translations
2025-09-12 01:52:45 +02:00
Frédéric FRANCE
b7d9342992 fix translation missing (#35316)
* fix translation missing

* fix translation missing
2025-09-12 01:52:31 +02:00
Frédéric FRANCE
e4cafd3428 fix missing translation (#35314) 2025-09-12 01:52:18 +02:00
github-actions[bot]
97bd4852af PHPStan > Update baseline (#35305)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-12 01:34:58 +02:00
ldestailleur
e3bf8bcb47 FIX Edit of email in emailing. Property messtype not set. 2025-09-11 16:40:20 +02:00
ldestailleur
89f36faced NEW public and private note can be shown on contact list 2025-09-11 16:03:25 +02:00
ldestailleur
19feb7c533 Clean code 2025-09-11 15:42:12 +02:00
ldestailleur
5fdfa79e56 Fix missing field migration, fix select2 2025-09-11 15:35:23 +02:00
ldestailleur
5e74b622bd Fix size of popup 2025-09-11 15:10:01 +02:00
ldestailleur
333c96ddd6 Sync transifex 2025-09-11 14:17:35 +02:00
ldestailleur
0919cc37e0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-11 13:32:00 +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
Liammer
d55551ee3c Add "__EVENT_DESCRIPTION__" variable (#35302)
To be able to add the event's description in reminder emails.
2025-09-11 12:52:22 +02:00
ldestailleur
2760f0a6d9 Fix do not show value of last activation module if na 2025-09-11 12:48:52 +02:00
ldestailleur
24f7903123 Fix trans in list of technical services of a module 2025-09-11 12:43:52 +02:00
ldestailleur
b4a2e14fa8 Clean code 2025-09-11 12:32:01 +02:00
ldestailleur
6586feb3ef Clean code 2025-09-11 12:30:19 +02:00
ldestailleur
4416bcb3ee Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-11 12:25:34 +02:00
ldestailleur
702d91c65d Clean code 2025-09-11 12:25:22 +02:00
Frédéric FRANCE
0e79fa36ee clean code contact class (#35260)
* clean code contact class

* clean code contact class

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2025-09-11 12:14:53 +02:00
HENRY Florian
6ee966d64d feat: Subtotal module (#35290) 2025-09-11 12:14:32 +02:00
Frédéric FRANCE
fd2ea78e9b clean code bookcal class (#35279)
* clean code bookcal class

* clean code bookcal class

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2025-09-11 12:12:53 +02:00
github-actions[bot]
13dbe2ea58 PHPStan > Update baseline (#35285)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-11 12:12:32 +02:00
Fabian Volkers
db103f37df Add POST /supplierorders/{id}/line endpoint to REST API (#35286)
* ✏️ Fix spelling

*  Add postLine endpoint to supplier_orders

* 🐛 Fix accessing this->commande instead of this->order
2025-09-11 12:12:18 +02:00
Frédéric FRANCE
a44fc7d843 clean code (#35295)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* fix

* fix

* fix

* fix
2025-09-11 12:08:29 +02:00
Frédéric FRANCE
6378a99e5a add src and id when create ecmfiles (#35292) 2025-09-11 11:22:11 +02:00
ldestailleur
af74f2c057 Lang file paybox is too small for deprecated moduel. Moved inside
stripe.
2025-09-11 11:20:13 +02:00
Frédéric FRANCE
d81baf8f53 add source for subtotals lang file (#35296) 2025-09-11 11:11:06 +02:00
Frédéric FRANCE
1263054fba fix doc (#35298) 2025-09-11 11:10:45 +02:00
Frédéric FRANCE
a64b36cec4 add doc (#35294)
* add doc

* clean code
2025-09-11 11:10:24 +02:00
ldestailleur
b667bc0f13 Fix missing __THIRDPARTY_URL__ 2025-09-10 12:57:29 +02:00
ldestailleur
05e29b5ae6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-10 11:53:39 +02:00
ldestailleur
46276ba216 Doc 2025-09-10 11:53:17 +02:00
ldestailleur
fd08708d6a Doc 2025-09-10 11:50:46 +02:00
ldestailleur
8ee974488b SQL 2025-09-10 11:49:09 +02:00
Frédéric FRANCE
e81d5378cd clean code contract class (#35245)
* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code

* clean code

* clean code

* clean code

* clean code

* fix typo

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2025-09-10 11:13:18 +02:00
Nicolas Domenech
1583d69cda #35271 [SQL] add: mandatory signature fields (#35273)
* #35271 [SQL] add: mandatory signature fields

Data model for add feature we want add checkbox on for tell who c can sign in contact
Ex: On contract card we want 2/3 signatories
-- Later we add feature for link external signature link with mandatory signautre fields on contact.

* Update llx_element_contact.sql

* Update 22.0.0-23.0.0.sql

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-10 11:12:26 +02:00
MDW
caf6363995 Qual: Update phan baseline (#35261)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-10 10:54:26 +02:00
Frédéric FRANCE
ddbae0f6ad Add TRIGGER_PREFIX in order (commande) class (#35268)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-10 10:53:54 +02:00
Frédéric FRANCE
e1f9eee9a5 Add TRIGGER_PREFIX in delivery class (#35267)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-10 10:53:39 +02:00
Frédéric FRANCE
0f7c375df7 fix CI (#35269)
* fix CI

* Update mod_codeproduct_elephant.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-10 10:53:28 +02:00
Charlène Benke
5bdfbdceab Fix ID reference in extrafield lines area (#35276) 2025-09-10 10:53:14 +02:00
Frédéric FRANCE
04f3568d4a fix missing translations (#35282)
* fix missing translations

* fix missing translations
2025-09-10 10:52:02 +02:00
Frédéric FRANCE
a2df638c34 fix missing translations (#35280)
* fix missing translations

* fix missing translations
2025-09-10 10:51:42 +02:00
ldestailleur
328058c571 Fix ci 2025-09-09 19:36:08 +02:00
ldestailleur
d634d3fc4c Fix ci 2025-09-09 19:33:27 +02:00
ThomasNgr-OpenDSI
eb64e83563 FIX right to modify a product price by customer (#35256)
IF the user has the right to create/modify a product, they have the right to add a product price by customer (if parameter is set).
BUT they don't have the right to edit the product price by customer (the 'edit') button is not displayed.

This commit fixes this.
2025-09-09 19:22:02 +02:00
ldestailleur
bce059e2fa Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-09 19:21:41 +02:00
ldestailleur
42e59c9370 Fix ci 2025-09-09 19:21:29 +02:00
github-actions[bot]
6b3602c3eb PHPStan > Update baseline (#35255)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-09 19:17:43 +02:00
Frédéric FRANCE
03fe13d93d fix template and fix CI (#35254)
* fix adminnotification

* Update notify.class.php

* Update html.formmail.class.php

* fix

* fix

* fix
2025-09-09 19:17:32 +02:00
ldestailleur
be97a6ccee Fix css 2025-09-09 13:46:32 +02:00
ldestailleur
cbf63e5e93 Fix CSS 2025-09-09 13:39:03 +02:00
ldestailleur
05937c43ca Update doc 2025-09-09 03:04:49 +02:00
ldestailleur
bdef24de08 Avoid false positive 2025-09-09 03:03:08 +02:00
ldestailleur
1ea9614877 Sync transifex 2025-09-09 02:59:44 +02:00
ldestailleur
cdbf362096 Sync transifex 2025-09-09 02:54:42 +02:00
ldestailleur
8dc1ac2cdc Fix order of product templates 2025-09-09 02:16:06 +02:00
ldestailleur
bc61123efe Trans 2025-09-09 01:58:29 +02:00
ldestailleur
5490afcf72 FIX invoice not set to closed when we add a credit note to close it 2025-09-08 15:24:47 +02:00
ldestailleur
0afe735cdc Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-08 13:25:37 +02:00
ldestailleur
ef15577d40 Add br 2025-09-08 13:25:28 +02:00
ldestailleur
6428028305 Clean visible value 2025-09-08 13:11:12 +02:00
Alexandre SPANGARO
bacdee81a8 NEW Accountancy - Analytical axis (SQL Structure) (#34738)
* NEW Accountancy - Analytical axis (SQL Structure)

* Add analytic account & distribution

* Remove UNIQUE

* Update unique Index

* Rename

* Error on REFERENCES of CONTRAINT

* Remove _c

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 12:50:54 +02:00
Frédéric FRANCE
f9a93552b2 fix adminnotification (#35252) 2025-09-08 12:45:27 +02:00
ldestailleur
e2c317a7cd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-08 12:15:20 +02:00
ldestailleur
8fb71ef010 Clean setup page 2025-09-08 12:15:01 +02:00
ldestailleur
d27940dd8b NEW Can have a tooltip picto on title of column and keep autotruncation
of label. Tooltip is show at begin of text.
2025-09-08 11:58:32 +02:00
dependabot[bot]
2d7579c6e2 Bump actions/setup-python from 5 to 6 (#35251)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 11:05:10 +02:00
R0ck3n
6334fa5bea NEW: Add prepare() method to DoliDB class (rebuild) (#35249)
* feat:prepared sql for mysqli and postgres

* refactor:remove whitespace

* Update DoliDB.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 02:37:42 +02:00
PsyCrow
686de5271a Update admin.lib.php (#35246)
Fix PHP Error:
Undefined array key "login" (/admin/tools/listsessions.php:161)

The error is triggered when the user name conatins '_' or '.'

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 02:12:00 +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
42ce30fab7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-08 01:48:02 +02:00
Laurent Destailleur
148574fe4e Fix CI 2025-09-08 01:47:44 +02:00
Lenin Rivas
2fbda7b4f4 NEW line input multicurrency price with tax (#35064)
* Multicurrency input price with tax

* Multicurrency input price with tax

* Multicurrency input price with tax - line tittle

* Multicurrency input price with tax - line view

* PriceUTTCCurrency in lang

* Multicurrency input price with tax - line view

* Multicurrency input price with tax - line edit

* Update objectline_edit.tpl.php

* Update objectline_view.tpl.php

* Update objectline_edit.tpl.php

* Update objectline_title.tpl.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 01:37:33 +02:00
Laurent Destailleur
51a4c97c46 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-08 01:29:45 +02:00
Laurent Destailleur
8beb61ef7f Set mysoc 2025-09-08 01:27:38 +02:00
Frédéric FRANCE
59afaf1d70 clean code (#35211)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* test

* test

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 01:04:57 +02:00
Frédéric FRANCE
140da6caa7 fix CI (#35242) 2025-09-08 01:03:48 +02:00
Frédéric FRANCE
1596fe56ae fix warnings (#35244)
* fix warnings

* fix warnings
2025-09-08 01:01:24 +02:00
Frédéric FRANCE
73073a5bf0 Knowledge tms (#35243)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-08 01:00:43 +02:00
Laurent Destailleur
21d28a745f Fix warning 2025-09-08 00:57:29 +02:00
Laurent Destailleur
68fa305655 Better detection of duplicates 2025-09-08 00:51:42 +02:00
ldestailleur
f095528260 Clean code 2025-09-07 19:58:59 +02:00
ldestailleur
73eea16744 Better detection of duplicate 2025-09-07 19:33:22 +02:00
ldestailleur
e460fffcf9 Better detection of duplicate 2025-09-07 19:32:24 +02:00
ldestailleur
870906daac Better detection of duplicate 2025-09-07 19:28:32 +02:00
ldestailleur
e8fed29ed0 Better detection of duplicate 2025-09-07 19:20:03 +02:00
ldestailleur
5efd3264c7 Fix merging of similar CVE on same line in security report 2025-09-07 19:16:31 +02:00
ldestailleur
dd9d92013b Fix merging of similar CVE on same line in security report 2025-09-07 19:04:28 +02:00
ldestailleur
97d5025c08 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-07 18:51:58 +02:00
ldestailleur
63dc33617f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-05 17:20:14 +02:00
ldestailleur
d048766373 NEW Can sort on employee in holiday balance. Add link to go to history. 2025-09-05 17:20:00 +02:00
github-actions[bot]
6e13f4fc6a PHPStan > Update baseline (#35240)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-05 15:42:19 +02:00
Frédéric FRANCE
1b83c39cc0 NEW Add sms reminder in reminder of agenda events (#35239)
* add reminder by sms

* fix url dolistore

* add cron task to send sms reminder

* add cron task to send sms reminder

* add cron task to send sms reminder

* add cron task to send sms reminder

* Update sms.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-05 15:38:15 +02:00
ldestailleur
0f08412e7a CSS 2025-09-05 15:31:21 +02:00
ldestailleur
0d51fd9b6f Add link to category edit page from picto 2025-09-05 15:20:50 +02:00
ldestailleur
2a1c7a91da Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-05 14:54:12 +02:00
ldestailleur
2dbc0db9dd Clean code 2025-09-05 14:54:01 +02:00
Pratush Raj
4d23d3f77c #35230 (#35231)
* #35230

* Update massstockmove.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-05 14:33:09 +02:00
ldestailleur
17f35be9c9 Better name for var 2025-09-05 14:32:41 +02:00
ldestailleur
cd7de255bc Fix CI 2025-09-05 14:03:42 +02:00
ldestailleur
343ec2684b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-05 12:08:25 +02:00
ldestailleur
300b840311 Fix warning 2025-09-05 12:08:13 +02:00
MDW
71423292e0 Qual: Update phan baseline (#35237)
# Qual: Update phan baseline
2025-09-05 12:04:03 +02:00
Frédéric FRANCE
a1be1ff6bd add reminder by sms (#35236)
* add reminder by sms

* fix url dolistore
2025-09-05 12:03:14 +02:00
Frédéric FRANCE
617e922a3a fix broken workflows (#35226)
* fix broken workflows

* Update ci-on-push.yml

* Update fournisseur.commande.class.php

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-05 12:01:57 +02:00
ldestailleur
93cc83ec4c Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 21:07:09 +02:00
ldestailleur
94d24d48d9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 20:57:28 +02:00
ldestailleur
e17a179467 Fix warning 2025-09-04 20:57:13 +02:00
ldestailleur
fc04023095 Fix warning 2025-09-04 20:57:06 +02:00
ldestailleur
05f2232b72 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 17:58:02 +02:00
ldestailleur
cd24808bbf Fix label of tooltip not complete 2025-09-04 17:54:29 +02:00
ldestailleur
2fb0cc7414 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 17:33:02 +02:00
ldestailleur
d7204bbb19 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 17:32:58 +02:00
ldestailleur
5977e95200 Rename github workflow files 2025-09-04 15:10:23 +02:00
ldestailleur
2791d3ccf5 Fix warning 2025-09-04 14:44:23 +02:00
ldestailleur
cef6eb34c1 Remove warnings 2025-09-04 14:39:41 +02:00
ldestailleur
68544e9bf7 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 14:39:08 +02:00
Frédéric FRANCE
6f763f4d16 add value to make update of object easier (#35222) 2025-09-04 14:28:26 +02:00
Frédéric FRANCE
df7538a42f fix modulebuilder editorconfig (#35221)
to be the same than in dolibarr root
2025-09-04 14:27:23 +02:00
MDW
40ea0fd469 Qual: Update phan baseline (#35214)
# Qual: Update phan baseline

Update phan baseline by removing fixed exceptions

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-04 14:20:49 +02:00
ldestailleur
c5eb60da97 Avoid phpstan warning 2025-09-04 14:08:37 +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
Frédéric FRANCE
006a12d191 fix CI (#35215)
* fix CI

* Update fournisseur.commande.class.php
2025-09-04 13:22:32 +02:00
ldestailleur
74a775f0e1 Fix CI 2025-09-04 13:22:00 +02:00
ldestailleur
1ea5683cfc Fix CI warnings 2025-09-04 13:16:55 +02:00
ldestailleur
f35e7f6c4c Fix CI 2025-09-04 11:51:10 +02:00
ldestailleur
5f6e8b98b1 Try to fix ci 2025-09-04 11:44:45 +02:00
ldestailleur
e4c8d91d69 Fix CI warnings 2025-09-04 11:34:45 +02:00
ldestailleur
0262da0d20 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-04 11:30:51 +02:00
ldestailleur
3b668903b5 Clean code. Show how to use TRIGGER_PREFIX in modulebuilder template. 2025-09-04 11:30:24 +02:00
Frédéric FRANCE
f88f7136c3 clean code (#35210) 2025-09-03 22:33:43 +02:00
Frédéric FRANCE
87c94e1a31 fix parameters (#35209) 2025-09-03 22:33:25 +02:00
ldestailleur
8a1ec5634f Clean code between subprice/pu_ht and subprice_ttc/pu_ttc 2025-09-03 22:29:36 +02:00
ldestailleur
f84f01af30 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-03 21:53:53 +02:00
ldestailleur
d6fa374d84 QUAL: Removed no more used deprecated code 2025-09-03 21:53:43 +02:00
Frédéric FRANCE
5b104f4625 clean test code (#35205)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 21:43:23 +02:00
ldestailleur
ca1c3d3781 Enhance template to allow hook printFieldListWhere 2025-09-03 19:46:05 +02:00
ldestailleur
7e6b37fcd4 Fix CI 2025-09-03 19:29:26 +02:00
ldestailleur
b62c6fa8a9 Fix CI 2025-09-03 19:27:50 +02:00
ldestailleur
d7a59530de Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-03 19:24:39 +02:00
ldestailleur
0ab63de622 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-03 19:00:35 +02:00
ldestailleur
7fbbb99ef8 Fix trans 2025-09-03 19:00:25 +02:00
Frédéric FRANCE
d4601a26ff fix CI (#35204) 2025-09-03 18:58:06 +02:00
ldestailleur
564d245d23 Fix phpunit 2025-09-03 18:54:48 +02:00
ldestailleur
61a10cf58d NEW Can view/list/edit the dispute status of an invoice 2025-09-03 18:27:40 +02:00
ldestailleur
648fd1e809 Doc 2025-09-03 16:33:09 +02:00
ldestailleur
f5d71fac3f Doc 2025-09-03 16:31:30 +02:00
Lucas Marcouiller
5fa3ecd41a Fix impossibility to validate objects (#35202)
* Fix impossibility to validate objects

* fix pre commit

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
2025-09-03 16:28:10 +02:00
ldestailleur
3ba272b2fb Try CI fix 2025-09-03 16:26:54 +02:00
ldestailleur
b7135a24e5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-03 16:09:40 +02:00
ldestailleur
0255512c1c The signature of the Sale order ->cancel() method and shipment
->cancel() has been modified to introduce the $user param like for other
methods that modify a status.
2025-09-03 16:08:09 +02:00
Mathieu Pellegrin
582151ad82 FIX #35007 (#35010)
* Fix #35007

* Update pay.php

* Update pay.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 15:44:16 +02:00
MDW
d57d471a9f Qual: remove fixed phan notice from exceptions (#35201)
# Qual: remove fixed phan notice from exceptions

The pdf.lib.php has one type of exception less.
2025-09-03 15:39:54 +02:00
Frédéric FRANCE
974f4e273e clean code (#35191)
* 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-03 14:50:09 +02:00
Frédéric FRANCE
bce53ec123 clean code (#35180)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix display

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 14:49:11 +02:00
github-actions[bot]
07f2760dbd PHPStan > Update baseline (#35200)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-03 14:46:43 +02:00
Frédéric FRANCE
a1d7b11324 fix doc (#35196) 2025-09-03 12:54:17 +02:00
ldestailleur
cc6f43493c Clean code 2025-09-03 12:53:38 +02:00
ldestailleur
a5a947a570 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-03 12:44:59 +02:00
ldestailleur
78618f8771 Clean code 2025-09-03 12:44:49 +02:00
Pierre Ardoin
bc90498ecd FIX MULTICOMPANY Error (#35195)
Without it, We have a "error 500" on this tab when Multicomany is active.
2025-09-03 12:44:19 +02:00
Pratush Raj
3291d78de8 #35192 (#35193) 2025-09-03 12:41:11 +02:00
Frédéric FRANCE
d8b167851c add a combining character in dol_string_unaccent test (#35153)
* add a combining character in dol_string_unaccent test

* fix
2025-09-03 12:14:33 +02:00
ldestailleur
abd736e632 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-03 12:06:58 +02:00
ldestailleur
9dd5307c1b Clean code 2025-09-03 12:06:29 +02:00
Alexandre SPANGARO
2ec41b630e NEW Accountancy - Add hook on export filename (#35188)
* NEW Accountancy - Add hook on export filename

* FIX CI
2025-09-03 11:54:37 +02:00
Frédéric FRANCE
d4b93b662c clean code (#35189)
* clean code

* clean code
2025-09-03 11:53:37 +02:00
hermans
d7761168ea Improve setOrigin on Receipt for line_id_object_src & line_id_object_origin (#35091)
In Receipt validate, close... we have setOrigin that not set data line_id_object_src & line_id_object_origin, that variable is very important when we working with custom hook. I checked also on shipment it already implemented.
2025-09-03 00:29:45 +02:00
Jyhere
2e8bf5eb94 NEW: add combining characters (accents, cedilla...) codes in dol_string_unaccent() (#35130)
* NEW: add combining characters (accents, cedilla...) codes in dol_string_unaccent()

* NEW: add combining characters (accents, cedilla...) codes in dol_string_unaccent()
2025-09-03 00:28:49 +02:00
Clément
69850016d9 FIX Quick search sellist extrafield (#35070)
* FIX Quick search sellist extrafield

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 00:03:09 +02:00
atm-lucas
88699a02cd FIX - Return False with return code 200 on API (#35172)
* Return false in API

* Update api_contracts.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 00:02:21 +02:00
MDW
8042d15e3e Qual: Update phan baseline (#35174)
# Qual: Update phan baseline

Remove exceptions that were fixed

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-02 23:59:32 +02:00
ldestailleur
eb20f6f009 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 23:59:09 +02:00
ldestailleur
1bd94582be FIX color of late warning for nb of bank account reconciliation lines 2025-09-02 23:38:56 +02:00
ldestailleur
dbf686d0ba Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 23:21:52 +02:00
ldestailleur
149d4974a9 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 23:21:36 +02:00
Frédéric FRANCE
4aeda8adcf add doc (#35185)
* add doc

* add doc

* add doc

* add doc

* add doc

* add doc
2025-09-02 22:55:29 +02:00
Frédéric FRANCE
7e9d2a94f4 clean code (#35170)
* clean code

* clean code
2025-09-02 22:52:11 +02:00
Frédéric FRANCE
568c65568a clean code (#35175)
* 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-02 22:51:34 +02:00
github-actions[bot]
04d2e19bc0 PHPStan > Update baseline (#35176)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-09-02 22:50:25 +02:00
MDW
cab15ca58e Fix: Fix typo in user_modifcation_id (#35179)
# Fix: Fix typo in user_modifcation_id

Thes fixes the modification id initialisation.
2025-09-02 22:50:15 +02:00
Frédéric FRANCE
76a399abf2 add doc (#35182) 2025-09-02 22:49:53 +02:00
ldestailleur
c07bc61aad Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 22:49:22 +02:00
ldestailleur
fc1af7b87e Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 22:49:15 +02:00
Frédéric FRANCE
24bd6d918a clean code (#35183)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-09-02 22:46:55 +02:00
ldestailleur
5b4295912e Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 22:39:16 +02:00
ldestailleur
dc38a0a84d Better virtual host file 2025-09-02 22:30:29 +02:00
ldestailleur
b5de7be8a8 Clean code 2025-09-02 17:32:38 +02:00
ldestailleur
62f761ac71 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-02 12:07:15 +02:00
ldestailleur
3ff7e03ddf NEW Button to create a proposal and sale order from a contract always on 2025-09-01 23:17:56 +02:00
Noé Cendrier
887e7442d9 NEW: generate renewal proposal for contracts (#35120)
* NEW: generate renewal proposal for contracts

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-01 23:10:44 +02:00
Frédéric FRANCE
bc92afe403 add doc (#35168)
* add doc

* add doc

* add doc

* add doc

* add doc

* add doc

* add doc
2025-09-01 22:27:36 +02:00
Frédéric FRANCE
d8ec14bc46 clean code (#35167)
* clean code

* clean code
2025-09-01 22:26:41 +02:00
Frédéric FRANCE
f9bf9d4888 add doc (#35166)
* add doc

* add doc

* add doc
2025-09-01 22:26:11 +02:00
ldestailleur
f60dac9a62 Comment 2025-09-01 21:33:45 +02:00
ldestailleur
49ef8e87ea Fix HTML escaping 2025-09-01 21:26:02 +02:00
ldestailleur
eb47c73001 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-01 20:01:25 +02:00
ldestailleur
dd667a30b2 Fix warning 2025-09-01 20:01:14 +02:00
ldestailleur
c2b7c8712f Fix warning 2025-09-01 20:00:58 +02:00
Frédéric FRANCE
a643a8456b fix Variable $statut might not be defined (#35161) 2025-09-01 19:35:53 +02:00
sonikf
4fd4f0e1d9 fix grammar (#35158)
* Update company birth date label to establishment date

* Simplify default bank account description

* Fix wording in discount split labels

* fix grammar

* Fix typo
2025-09-01 19:32:46 +02:00
Frédéric FRANCE
c6145d7723 clean code (#35151)
* clean code

* Update mod_barcode_thirdparty_standard.php

* Update mod_barcode_product_standard.php
2025-09-01 19:32:03 +02:00
Frédéric FRANCE
58d2ba225d clean code (#35148)
* clean code

* fix

* fix

* fix
2025-09-01 19:24:57 +02:00
Frédéric FRANCE
34498d3437 fetch greatest tms for user and fix user creation and modification (#35145)
* fetch greatest tms for user and fix user creation and modification

* fetch greatest tms for user and fix user creation and modification

* fetch greatest tms for user and fix user creation and modification

* fetch greatest tms for user and fix user creation and modification

* fetch greatest tms for user and fix user creation and modification

* fetch greatest tms for user and fix user creation and modification
2025-09-01 19:21:54 +02:00
ldestailleur
44ccc0f284 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-01 11:40:14 +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
Thatoo
5338607237 auto_subscription_member_form_types_nature (#35033) 2025-08-31 11:52:53 +02:00
github-actions[bot]
2d809652bd PHPStan > Update baseline (#35146)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-30 18:06:54 +02:00
ldestailleur
1fe5099f1e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-30 17:15:20 +02:00
ldestailleur
f729d33dcc Clean setup of antivirus 2025-08-30 17:14:57 +02:00
ldestailleur
aadaf44ec1 Trans 2025-08-30 16:49:05 +02:00
HENRY Florian
644cb00136 new: add fitid columnin llx_bank_import (#35128) 2025-08-30 15:36:55 +02:00
John BOTELLA
b25814cb58 fix experimental intuitive select (#35131) 2025-08-30 15:35:48 +02:00
Frédéric FRANCE
c567e55b5e fetch greatest tms for members (#35133)
* fetch greatest tms for members

* fetch greatest tms for members
2025-08-30 15:34:39 +02:00
Frédéric FRANCE
96130d7562 wip workstation tms (#35126)
* wip workstation tms

* wip workstation tms

* setup

* setup

* setup

* setup

* setup
2025-08-29 17:20:20 +02:00
github-actions[bot]
b09cfab271 PHPStan > Update baseline (#35134)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-29 17:19:36 +02:00
ldestailleur
1443f35cf1 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-29 02:20:14 +02:00
ldestailleur
d4ff562fc2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-29 02:20:05 +02:00
ldestailleur
4f40278987 Fix bad index 2025-08-29 02:19:47 +02:00
lemmings67
35c101ff9a fix #35118 (#35119)
OpenID doesn't work when $dolibarr_main_authentication contains "ldap"

Co-authored-by: Pascal EISELE <peisele@appligos.fr>
2025-08-28 23:10:27 +02:00
Frédéric FRANCE
e6cb3039c0 fetch greatest tms (#35123)
* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms
2025-08-28 23:07:51 +02:00
ldestailleur
c0274e4e5a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 22:54:50 +02:00
ldestailleur
f44a243cc9 Add icon for apple-touch-icon.png 2025-08-28 22:54:40 +02:00
Frédéric FRANCE
252b68cbcf fetch greatest tms (#35122)
* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms

* fetch greatest tms
2025-08-28 19:28:48 +02:00
ldestailleur
2efb61dbd1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 19:24:01 +02:00
ldestailleur
6f1ebfb69e NEW add a limit to avoid too many answer in agenda view. Add warning if
limit has been reached.
2025-08-28 19:23:51 +02:00
Frédéric FRANCE
1648b43481 fix box_last_modified_ticket.php (#35121) 2025-08-28 17:31:33 +02:00
ldestailleur
4a3383e46c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 16:40:57 +02:00
ldestailleur
ae20554a4d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 16:40:48 +02:00
Mohamed DAOUD
4637214644 Prepare SEPA payments for supplier invoices via Stripe (#35078)
* preparation for supplier invoice payment via SEPA Stripe

* use stripe cynematic

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 16:33:54 +02:00
Frédéric FRANCE
ab4d49af61 Translation fields (#35114)
* translations fields

* translations fields
2025-08-28 14:55:24 +02:00
ldestailleur
68baff6630 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 14:53:56 +02:00
ldestailleur
5ffb29d21c Fix reposition 2025-08-28 14:53:38 +02:00
ldestailleur
affaa5da9b FIX #35071 2025-08-28 14:50:44 +02:00
Frédéric FRANCE
b4e01be091 translations fields (#35112) 2025-08-28 13:51:30 +02:00
Frédéric FRANCE
d63e68bbcb Update box_last_modified_ticket.php (#35111) 2025-08-28 13:51:07 +02:00
Charlène Benke
8fa13f68bf fix translation of $fields on interventional (#35106)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 13:49:34 +02:00
Frédéric FRANCE
37aaad6810 avoid untranslated dol_print_error (#35104)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 04:04:41 +02:00
github-actions[bot]
8cfe643e68 PHPStan > Update baseline (#35102)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 04:04:16 +02:00
Laurent Destailleur
f30b2ef8aa NEW More index for memberships table 2025-08-28 04:02:16 +02:00
Laurent Destailleur
058b87fe29 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 03:22:47 +02:00
Laurent Destailleur
2619ee7696 FIX #35105 2025-08-28 03:22:17 +02:00
Frédéric FRANCE
7d04067b4e fix CI (Travis) (#35099)
* fix test

* fix test

* fix test

* fix test

* fix test

* fix

* fix

* fix
2025-08-28 02:15:41 +02:00
Laurent Destailleur
0582694eb3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 02:12:37 +02:00
Laurent Destailleur
d16a66f269 Better management of how we store localtax vat rate for customer price. 2025-08-28 02:11:53 +02:00
ldestailleur
b512daf798 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-27 20:59:22 +02:00
ldestailleur
819dd701fe Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-27 19:32:45 +02:00
ldestailleur
77ab826478 Increase period for alert to 6 monthes. 2025-08-27 19:32:33 +02:00
Frédéric FRANCE
c5f9f35ea9 add doc (#35095)
* add doc

* add doc
2025-08-27 03:12:48 +02:00
Frédéric FRANCE
aa8ddce4d8 can use DOL_DATA_ROOT in geoipmaxmind config (#35085) 2025-08-27 03:10:23 +02:00
Frédéric FRANCE
cd80cbc632 add doc (#35067)
* add doc

* add doc

* add doc

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-27 03:08:15 +02:00
Frédéric FRANCE
103bfd9051 update user_modification_id when updating invoice (#35082) 2025-08-27 03:07:17 +02:00
Frédéric FRANCE
d5591e3cbf fix warning in box_actions_future.php (#35087) 2025-08-27 03:05:57 +02:00
Frédéric FRANCE
b8c66a650e add doc (#35094) 2025-08-27 03:03:58 +02:00
Frédéric FRANCE
a3839a69a2 add doc (#35093) 2025-08-27 03:03:23 +02:00
Frédéric FRANCE
0074e1ab58 add doc (#35092) 2025-08-27 03:03:06 +02:00
github-actions[bot]
22b90515ec PHPStan > Update baseline (#35089)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-27 03:02:30 +02:00
ldestailleur
38f1f77c70 Fix error on captcha when function GD does not exists 2025-08-27 02:49:52 +02:00
ldestailleur
16e1890130 Debug v23 2025-08-27 02:26:38 +02:00
ldestailleur
1fc8d3dcb5 Debug v23 2025-08-27 01:33:55 +02:00
ldestailleur
0bbbdabea4 Debug v23 2025-08-27 01:31:34 +02:00
ldestailleur
f357e61773 Debug v23 2025-08-27 01:30:01 +02:00
ldestailleur
1f32b88f68 Debug v23 2025-08-27 01:25:48 +02:00
ldestailleur
791046c6bf Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-27 01:08:20 +02:00
ldestailleur
ccc26d0ad0 Doc 2025-08-27 01:08:10 +02:00
Laurent Destailleur
6745e086d3 Fix CI 2025-08-26 05:49:08 +02:00
Laurent Destailleur
21fca23b1d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-26 05:47:11 +02:00
Laurent Destailleur
81fe80c509 Fix CI 2025-08-26 05:40:24 +02:00
Laurent Destailleur
ff00f13c8f Fix travis 2025-08-26 05:33:23 +02:00
Laurent Destailleur
4932cd5f7e Execute phpunit for functionsbe in all tests 2025-08-26 05:27:02 +02:00
Laurent Destailleur
4a30325361 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-26 05:21:51 +02:00
Laurent Destailleur
cfbafcc31f Fix CI 2025-08-26 05:20:54 +02:00
Laurent Destailleur
571e436f2f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-26 05:12:25 +02:00
Laurent Destailleur
438b7d2eb0 Fix CI 2025-08-26 05:12:04 +02:00
Frédéric FRANCE
8de7d4dd94 add doc (#35068) 2025-08-26 04:51:12 +02:00
Laurent Destailleur
b19ac8c38c Clean code 2025-08-26 04:49:15 +02:00
Laurent Destailleur
834c0dc1dd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-26 04:37:40 +02:00
Laurent Destailleur
88e3dd1d5d Fix concat 2025-08-26 04:37:20 +02:00
Frédéric FRANCE
fc2786cd35 fix missing fetch entity in don.class.php (#35075) 2025-08-26 04:34:21 +02:00
Frédéric FRANCE
1a630cef85 fix missing fetch entity in loan.class.php (#35074) 2025-08-26 04:33:57 +02:00
Frédéric FRANCE
3a23318ed8 add doc (#35079)
* add doc

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-26 04:33:05 +02:00
Laurent Destailleur
af68f7c8a5 Fix CI 2025-08-26 04:20:30 +02:00
Laurent Destailleur
336c3bce3f Debug Fix CI 2025-08-26 04:12:51 +02:00
Laurent Destailleur
ac5156d81f Fix CI 2025-08-26 02:44:34 +02:00
Laurent Destailleur
2be336da69 Fix CI 2025-08-25 23:42:27 +02:00
Mathieu Pellegrin
3b422177f5 Fix #33374 (#35066) 2025-08-25 23:11:42 +02:00
ldestailleur
6e435f6be8 Fix CI 2025-08-25 22:26:15 +02:00
ldestailleur
5fe445c0da Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-25 21:53:35 +02:00
ldestailleur
7e2f7e0296 Doc 2025-08-25 21:22:00 +02:00
ldestailleur
c63090fee7 Fix warning 2025-08-25 20:13:23 +02:00
ldestailleur
82ac5b3ea2 Clean code 2025-08-25 20:12:20 +02:00
ldestailleur
2e925dfa40 Fix CI 2025-08-25 14:49:13 +02:00
ldestailleur
b3d3a7176f Clean code 2025-08-25 14:27:07 +02:00
ldestailleur
f12d6d3a8e Fix CI 2025-08-25 14:20:35 +02:00
ldestailleur
8725024f29 Fix CI 2025-08-25 14:15:39 +02:00
ldestailleur
0003b64b93 Fix warnings 2025-08-25 14:13:17 +02:00
ldestailleur
49ecc3f00a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-25 12:46:48 +02:00
ldestailleur
7a15aababa NEW Better navigation and report into database admin tools 2025-08-25 12:46:32 +02:00
Charlène Benke
a954c3e338 Remove fetchObjectLinked calls in expense report methods (#35063)
they are no link on expense report
2025-08-24 20:25:03 +02:00
Charlène Benke
8a3b0d3eda Change permission checks from 'expensereport' to 'holiday' (#35062)
error on class holiday
2025-08-24 20:22:46 +02:00
Frédéric FRANCE
b58ea39b87 fix warnings (#35056) 2025-08-24 20:22:13 +02:00
Frédéric FRANCE
3b3274e15e Fix asset (#35058)
* fix missing field definition

* fix warnings

* fix warnings

* fix warnings
2025-08-24 20:21:21 +02:00
Frédéric FRANCE
26e3f864cc fix warnings (#35055)
* fix warnings

* fix warnings

* fix warnings
2025-08-24 20:20:55 +02:00
Frédéric FRANCE
a860e7b70e add doc (#35049) 2025-08-24 20:20:21 +02:00
Frédéric FRANCE
0ae86c8d12 add doc (#35048) 2025-08-24 20:20:07 +02:00
Frédéric FRANCE
5c4b15965b add doc (#35047) 2025-08-24 20:19:53 +02:00
Frédéric FRANCE
b7fb3d5136 fix warning (#35045) 2025-08-24 20:19:06 +02:00
Frédéric FRANCE
0960243a43 add optional elements linked block (#35042) 2025-08-24 20:18:46 +02:00
github-actions[bot]
e2d38e788b PHPStan > Update baseline (#35044)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-24 20:14:50 +02:00
Frédéric FRANCE
e39a7a5dbc add doc (#35043) 2025-08-24 19:53:39 +02:00
Frédéric FRANCE
0bb5efe027 add doc (#35040)
* add doc

* add doc

* add doc

* add doc

* add doc
2025-08-24 19:53:22 +02:00
ldestailleur
d41ce132f3 Save more information into exp_payment_id for Stripe payments. 2025-08-24 19:50:38 +02:00
ldestailleur
9c24707a90 FIX link to stripe dashboard in stripe payment 2025-08-24 16:42:39 +02:00
ldestailleur
ba941876ed FIX link to stripe dashboard in stripe payment 2025-08-24 16:41:33 +02:00
ldestailleur
bd25b293b4 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-22 16:31:20 +02:00
ldestailleur
f5ae12fb4d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-22 15:31:37 +02:00
ldestailleur
1246eaee17 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-22 05:22:32 +02:00
ldestailleur
9c582ba76d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-22 04:50:20 +02:00
ldestailleur
a9469b0410 NEW Upgrade ACE editor to 1.43.12 2025-08-21 23:54:11 +02:00
Frédéric FRANCE
cd5df0bd68 try to fix doc (#35036)
* try to fix doc

* try to fix doc

* try to fix doc

* try to fix doc

* try to fix doc

* try to fix doc

* try to fix doc

* try to fix doc

* try to fix doc
2025-08-21 23:13:00 +02:00
ldestailleur
c95ecef559 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 21:45:46 +02:00
ldestailleur
ffce43a808 Fix json 2025-08-21 21:45:38 +02:00
Frédéric FRANCE
1f232edc2f add doc (#35035) 2025-08-21 21:33:19 +02:00
ldestailleur
7b4d21e353 Fix dependabot 2025-08-21 21:25:18 +02:00
ldestailleur
4604f14ca6 Fix json file 2025-08-21 21:14:25 +02:00
ldestailleur
66030b6c9e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-08-21 21:11:10 +02:00
ldestailleur
b6a3d871b1 Update dependabot 2025-08-21 21:10:33 +02:00
Laurent Destailleur
2b73f8e678 Update dependabot.yml 2025-08-21 21:05:42 +02:00
ldestailleur
a9c6069478 Implement Strict-Transport-Security and Permissions-Policy for
backoffice pages.
2025-08-21 20:52:07 +02:00
Laurent Destailleur
fb515cdf2d Update dependabot.yml 2025-08-21 19:57:49 +02:00
Frédéric FRANCE
daa71f89f2 add doc (#35034)
* add doc

* add doc

* add doc
2025-08-21 19:36:58 +02:00
Frédéric FRANCE
7b5e9faa83 clean code (#35032) 2025-08-21 19:36:30 +02:00
Frédéric FRANCE
5652a01f59 Expensereport linkedobject tpl (#35027)
* add doc

* add doc

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-21 19:36:04 +02:00
ldestailleur
d4cc80f18d Debug the printing of TakePos. Disabe custom receipt print in some
cases.
2025-08-21 19:34:10 +02:00
ldestailleur
7d09790261 FIX Disable the auto print on setup page of TakePOS 2025-08-21 18:25:52 +02:00
ldestailleur
8f95698dfd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 17:33:48 +02:00
ldestailleur
1253086c8b Fix print on printer IP when port not defined. 2025-08-21 17:33:32 +02:00
Frédéric FRANCE
455831d00e add doc (#35031)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-21 17:20:51 +02:00
ldestailleur
118d5aee35 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 16:12:13 +02:00
ldestailleur
b0db2c604a Fix CI 2025-08-21 16:12:03 +02:00
Frédéric FRANCE
af4db51885 add doc (#35026)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-21 15:49:45 +02:00
ldestailleur
2ccd961f97 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 15:49:19 +02:00
ldestailleur
1578615cf5 Fix CI 2025-08-21 15:49:05 +02:00
Frédéric FRANCE
b51468f556 fix resource agenda (#35028)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-21 15:46:02 +02:00
Frédéric FRANCE
9f87233a61 add doc (#35025) 2025-08-21 15:42:04 +02:00
Frédéric FRANCE
aa33a71c62 add doc (#35024) 2025-08-21 15:41:42 +02:00
Frédéric FRANCE
78f14f525f add doc (#35023) 2025-08-21 15:41:24 +02:00
ldestailleur
83d55d4f23 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 15:41:00 +02:00
ldestailleur
c93d94e2a5 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 15:07:19 +02:00
ldestailleur
6d7dc74cab WIP Page to edit credentials like TOTP, APi key, ... 2025-08-21 14:20:27 +02:00
ldestailleur
61f907c347 NEW Add option API_ENABLE_COUNT_CALLS 2025-08-21 13:05:47 +02:00
ldestailleur
385efad2a4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 11:20:18 +02:00
ldestailleur
a1661e35e4 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 11:12:35 +02:00
Laurent Destailleur
80590f4118 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-21 00:05:10 +02:00
ldestailleur
6e62ccc62f Table for variant module must be created at module activation only 2025-08-20 20:36:02 +02:00
ldestailleur
1751358fe4 FIX Option low memory mode in backup was broken 2025-08-20 20:08:58 +02:00
ldestailleur
1f7a3b156d FIX Option low memory mode in backup was broken 2025-08-20 20:07:19 +02:00
ldestailleur
eb43a9378a Fix spellcheck 2025-08-20 19:49:24 +02:00
kevin147147
9c8e7e5ab6 Update commondocgenerator.class.php (#35019) 2025-08-20 19:05:07 +02:00
Frédéric FRANCE
83b42a024a add doc (#35018) 2025-08-20 19:04:01 +02:00
Frédéric FRANCE
cc03c92614 fix update resource (#35015)
* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource

* fix update resource
2025-08-20 19:02:08 +02:00
Frédéric FRANCE
926defb22c add more parameters to restrictedArea hook (#35013)
* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook
2025-08-20 18:57:52 +02:00
Frédéric FRANCE
b9d02e16cc fix parameters (#35012) 2025-08-20 18:51:55 +02:00
ldestailleur
73823bbe35 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-20 18:50:41 +02:00
ldestailleur
3557c7efa9 Trans 2025-08-20 18:25:24 +02:00
ldestailleur
f2d33716f6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-20 17:17:18 +02:00
ldestailleur
27ceadeaf6 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-08-20 17:17:03 +02:00
Frédéric FRANCE
013d8c6c91 clean code (#35009) 2025-08-20 17:05:35 +02:00
github-actions[bot]
55fb75dadd PHPStan > Update baseline (#35004)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-20 17:02:22 +02:00
Kusco
8075cb8dba FIX Updated rights management in ModuleBuilder Tabs (#34989)
* Update modMyModule.class.php

Actualisation de la gestion des droits dans les Tabs du ModuleBuilder

* Update modMyModule.class.php

* Update modMyModule.class.php

* Update modMyModule.class.php

* Update modMyModule.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-20 17:02:09 +02:00
Frédéric FRANCE
55a4b23217 clean module subtotal (#35003)
* clean module subtotal

* Update commonsubtotal.class.php

* Update subtotals.php
2025-08-20 17:00:13 +02:00
Frédéric FRANCE
b31e85f00a clean code (#35002) 2025-08-20 16:59:17 +02:00
ldestailleur
ef5f825667 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-20 16:52:22 +02:00
Frédéric FRANCE
ac17198af6 clean module subtotal (#35001) 2025-08-19 13:14:11 +02:00
atm-lucas
cfd64ff70a FIX - Removal of accents in searches via comboxbox (#34933)
* accents and lower case on combobox

* Fix type

* adding conf

* remove comment

---------

Co-authored-by: ldestailleur <eldy@destailleur.fr>
2025-08-19 11:50:44 +02:00
sonikf
481e3108a1 remove duplicate (#35000) 2025-08-19 11:44:18 +02:00
Frédéric FRANCE
1d5af9200a add doc (#34997) 2025-08-19 11:43:18 +02:00
Frédéric FRANCE
b70418100e add doc (#34996) 2025-08-19 11:42:59 +02:00
Frédéric FRANCE
96464b9130 add doc (#34995)
* add doc

* Update linkedobjectblock.tpl.php
2025-08-19 11:42:38 +02:00
Frédéric FRANCE
b8010a63c2 clean module subtotal (#34991)
* clean module subtotal

* clean module subtotal
2025-08-19 11:40:31 +02:00
Frédéric FRANCE
0189c5cb0c clean module subtotal (#34990) 2025-08-19 11:40:16 +02:00
Frédéric FRANCE
e0861b922f normalise doc (#34987)
* normalise doc

* normalise doc

* normalise doc
2025-08-19 11:24:38 +02:00
dependabot[bot]
790377c0bc Bump actions/checkout from 4 to 5 (#34985)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-19 11:23:40 +02:00
Frédéric FRANCE
c992ac8955 clean code (#34984) 2025-08-19 11:23:12 +02:00
ldestailleur
1285e79c50 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-18 16:35:13 +02:00
ldestailleur
1d8b31b06c Clean code 2025-08-18 16:35:01 +02:00
Frédéric FRANCE
7fb6fc7e62 can set extrafields in project elements (#34923)
* can set extrafields in project elements

* can set extrafields in project elements

* Update element.php

* test

* test

* test

* test

* test

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-18 15:52:11 +02:00
github-actions[bot]
9e1c0a0a29 PHPStan > Update baseline (#34988)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-18 15:50:37 +02:00
github-actions[bot]
7ce6b2ce54 PHPStan > Update baseline (#34983)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-18 03:39:00 +02:00
Charlène Benke
e70357c63b FIX : add map_type_title_area on category class hook (#34971)
* add map_type_title_area on category class hook

need on new categorie feature if we use specific categories on external module

* Update categorie.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-18 03:38:21 +02:00
ldestailleur
3ac25e9581 Fix phpunit 2025-08-17 17:43:20 +02:00
ldestailleur
2629119365 Fix missing defaultvalue 2025-08-17 17:12:54 +02:00
ldestailleur
2a9f9960f0 Fix warnings 2025-08-17 17:03:55 +02:00
ldestailleur
17cf416489 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-17 16:58:43 +02:00
ldestailleur
b188c89f74 NEW Add the "Dispute status" in list of invoice. 2025-08-17 16:58:29 +02:00
Frédéric FRANCE
8e0b1eb606 fix object reference (#34928)
* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* merge

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-17 16:32:09 +02:00
ldestailleur
1f8486611c Better log 2025-08-17 16:29:03 +02:00
ldestailleur
4dd00f5370 Disable a test that may be wrong to manage charge back 2025-08-17 16:25:21 +02:00
ldestailleur
2d97709644 Fix var name 2025-08-17 16:22:21 +02:00
ldestailleur
2ebb814b67 More logs 2025-08-17 16:14:36 +02:00
ldestailleur
b1b1504111 Enhance the stripe IPN on dispute 2025-08-17 16:10:14 +02:00
ldestailleur
c041ce5f41 Add field dispute_status to follow invoice in dispute mode 2025-08-17 16:06:28 +02:00
ldestailleur
ff5fd02913 Clean code to fix CI 2025-08-17 13:19:24 +02:00
ldestailleur
82d477f4df Fix CI 2025-08-17 04:02:17 +02:00
ldestailleur
8aa82857f0 Fix depraceted var 2025-08-17 03:56:48 +02:00
ldestailleur
4aea1c00c8 Fix CI 2025-08-17 03:48:43 +02:00
ldestailleur
225b839e71 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-17 03:46:15 +02:00
ldestailleur
f07206b6c0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-17 03:45:53 +02:00
ldestailleur
9ccede6c90 Removed the deprecated array $MAP_ID_TO_CODE that was a duplicate of
array "array_flip($categ->MAP_ID)"
2025-08-17 03:45:36 +02:00
ldestailleur
f436a1da0b Clean code comment 2025-08-17 02:29:45 +02:00
ldestailleur
2d848e5512 Parameters $maxlen and $notooltip of Contract have been inverted to
follow the standard.
2025-08-17 02:20:52 +02:00
Frédéric FRANCE
1c6a40acbe Contact statut -> status (#34968)
* deprecate contact statut for status

* deprecate contact statut for status

* fix

* fix
2025-08-17 02:00:29 +02:00
github-actions[bot]
a51d9d2398 PHPStan > Update baseline (#34980)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-17 01:58:28 +02:00
Frédéric FRANCE
83259d9ddc clean code (#34979) 2025-08-17 01:58:17 +02:00
ldestailleur
5e7d50a312 Add option PDF_PURCHASE_INVOICE_HIDE_PRICE_EXCL_TAX and
PDF_PURCHASE_INVOICE_SHOW_PRICE_INCL_TAX
2025-08-17 01:56:53 +02:00
ldestailleur
86e10756f9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-17 01:54:38 +02:00
ldestailleur
d74fa57b6c NEW Add option PDF_PURCHASE_INVOICE_HIDE_VAT 2025-08-17 01:54:28 +02:00
Frédéric FRANCE
c6b8f88f18 clean code (#34977) 2025-08-17 01:47:48 +02:00
ldestailleur
8d5c3b1246 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-17 01:45:46 +02:00
ldestailleur
01d168afb7 Add doc comment, and add field date_reception in commande_fournisseur
for #34975
2025-08-17 01:45:34 +02:00
Frédéric FRANCE
b8561b40d1 fix conf global replacement (#34972) 2025-08-17 01:29:53 +02:00
Frédéric FRANCE
73c1868384 typo in doc (#34976) 2025-08-17 01:29:01 +02:00
ldestailleur
a9c827d811 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-08-17 01:08:10 +02:00
ldestailleur
01861c26b9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-16 22:14:47 +02:00
ldestailleur
273e82a566 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-16 22:14:23 +02:00
Laurent Destailleur
6fd796d5bf NEW More information on the user credential section 2025-08-16 05:22:04 +02:00
Laurent Destailleur
6cf4174b22 Prepare to allow management of different credentials 2025-08-16 04:21:40 +02:00
Laurent Destailleur
21f6e25242 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-16 03:07:16 +02:00
Laurent Destailleur
1487a1fd72 Fix warning 2025-08-16 03:06:44 +02:00
Frédéric FRANCE
98e9dc2e47 add doc (#34950) 2025-08-16 02:41:48 +02:00
Laurent Destailleur
2931aad17e Fix CI 2025-08-16 02:14:52 +02:00
ldestailleur
c8e1749d5a Trans 2025-08-15 19:05:34 +02:00
ldestailleur
ad61c9312a Trans 2025-08-15 18:57:53 +02:00
ldestailleur
a49e11c7b8 Debug v23 2025-08-15 18:50:26 +02:00
ldestailleur
e8d4ef4115 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-15 18:46:02 +02:00
ldestailleur
ee52d31f18 NEW On invoice, show also nb of credit notes notyet converted for
consumption
2025-08-15 18:43:58 +02:00
Frédéric FRANCE
e98fc8feb9 deprecate contact statut for status (#34967) 2025-08-15 17:31:44 +02:00
Frédéric FRANCE
51034c05f9 clean code (#34966) 2025-08-15 17:31:07 +02:00
github-actions[bot]
ab546b123f PHPStan > Update baseline (#34963)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-15 17:28:33 +02:00
Frédéric FRANCE
18ddceb65f fix doc (#34962)
* fix doc

* ref_client doesn't exists on Ticket

* no lines in Ticket
2025-08-15 17:28:21 +02:00
Frédéric FRANCE
03c6352505 clean code (#34961) 2025-08-15 17:27:37 +02:00
Frédéric FRANCE
fd970ed5a9 add doc (#34960) 2025-08-15 17:27:18 +02:00
ldestailleur
4edb50855f Enhance datapoliciy module 2025-08-15 17:20:28 +02:00
ldestailleur
478245a138 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-15 16:05:16 +02:00
ldestailleur
f4ae5136c8 Debug v23 2025-08-15 16:05:05 +02:00
Frédéric FRANCE
e2fea4b17a fix doc (#34958) 2025-08-15 00:14:30 +02:00
Frédéric FRANCE
980b50dd8d add doc (#34956) 2025-08-15 00:14:05 +02:00
Frédéric FRANCE
905ee464eb add doc and fix CI (#34955)
* add doc

* fix

* fix

* fix
2025-08-14 19:27:14 +02:00
Frédéric FRANCE
515fc47422 can insert import_key at order create (#34954)
* can insert import_key at order create

* Update commande.class.php
2025-08-14 19:11:03 +02:00
Frédéric FRANCE
110ff324da fix doc (#34953) 2025-08-14 19:08:56 +02:00
Frédéric FRANCE
6b4ec088cf fix doc (#34952) 2025-08-14 19:08:12 +02:00
github-actions[bot]
b362abdd43 PHPStan > Update baseline (#34951)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-14 19:07:42 +02:00
Frédéric FRANCE
e0f1a334e2 add doc (#34949) 2025-08-14 19:06:00 +02:00
ldestailleur
275040b2cb Doc 2025-08-14 17:51:49 +02:00
ldestailleur
b0d218c1c6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-14 15:26:45 +02:00
ldestailleur
54439b6fcd Clean code 2025-08-14 15:26:32 +02:00
ldestailleur
4b9ebb0e6a Fix #26682 and complete #34396 2025-08-14 15:26:13 +02:00
ldestailleur
aab6d0085d Fix bad tab 2025-08-14 14:51:21 +02:00
Frédéric FRANCE
73e5f5dcb3 add phpdoc (#34948) 2025-08-14 13:51:35 +02:00
thomasjulie
997e548a58 NEW We added a hook to allow us to modify the Prospect Customer drop down… (#25635)
* We added a hook to allow us to modify the Prospect Customer drop down list in Third Party

* modification of the hook on third party card and adding hooks on third party list

---------

Co-authored-by: root <root@dolibarr17.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 05:06:18 +02:00
Laurent Destailleur
2d8a187e5d Debug v23 2025-08-14 04:46:03 +02:00
Laurent Destailleur
7c917ef07c Trans 2025-08-14 04:34:26 +02:00
Charlène Benke
9019e10971 NEW Display company logo on kanban view (#34520)
* Display company logo on kanban view

(like product)

* Update societe.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 04:32:31 +02:00
Lucas Marcouiller
cbd600ec8c NEW Add a page to edit http security headers of application (#34941)
* New main http security headers page

* fix CI

* Fix CI

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 04:06:11 +02:00
Francis Appels
5ee1d43db0 FIx virtual stock when stock decrease on invoice validate. (#34925)
* FIx virtual stock when stock decrease on invoice validate if product in invoice but not in linked order.

* $this->db->prefix()

* Replace join by exists

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 03:52:03 +02:00
MDW
df40738195 Qual: Use new phan output target "github" (#34943)
# Use new phan output target "github"

Using checkstyle is no longer needed, "github" is now available as an
output printer.
This PR uses that, cs2pr is no longer needed.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 03:34:22 +02:00
MDW
9c4aa4aea7 Qual: Update phan baseline (#34944)
# Qual: Update phan baseline

Remove solved exceptions from the phan baseline.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 03:33:36 +02:00
ldestailleur
0722a11e25 Fix versions detection of phan 2025-08-14 01:48:19 +02:00
ldestailleur
4a13db91e7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-14 01:41:57 +02:00
ldestailleur
e1732a675e Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-14 01:41:49 +02:00
seyfcom
5ae7f53ef4 fix undefine $line with php 8.1 (#34938)
Co-authored-by: Audio Media Assist sarl <licences@a-m-a.ch>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-14 01:37:44 +02:00
ldestailleur
a9a0aaec41 Add phan version 2025-08-14 01:14:33 +02:00
ldestailleur
c339254a6b Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-14 00:54:22 +02:00
ldestailleur
c407609695 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-14 00:28:39 +02:00
ldestailleur
c4ca358e25 Debug v23 2025-08-13 23:36:17 +02:00
ldestailleur
cda2717155 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-13 19:54:21 +02:00
ldestailleur
d4ee3a2122 Doc 2025-08-13 18:51:45 +02:00
ldestailleur
fcd4150696 Fix size of image popup for small images 2025-08-13 15:37:46 +02:00
ldestailleur
b9230e00c0 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-12 13:48:48 +02:00
ldestailleur
7f6faf309d Clean removed permissions 2025-08-12 05:23:39 +02:00
Lucas Marcouiller
74fee3403d Fix webhook trigger history implementation (#34748)
* Fix webhook trigger hioistory implementation

* add lang + fix Ci

* fix Ci

* fix CI

* add param comment

* Fix CI

* Fix CI

* try fix CI

* Fix CI phan

* fix phan

* fix phan

* fix CI

* fix CI

* Fix phpstan

* fix stan

* fix stan on,card

* fix CI

* Update admin.lang

* Update admin.lang

* Fix CI

* fix CI

* Fix permissions of webhook + Webhook trigger history tooltip

* Fix CI

* fix php-stan=

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-12 05:18:23 +02:00
ldestailleur
a6627d7612 Add entity in llx_webhook_target table - #34748 2025-08-12 04:54:55 +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
ldestailleur
ddbe0427b7 Doc 2025-08-11 19:36:44 +02:00
ldestailleur
85076f856b Picto 2025-08-11 19:19:30 +02:00
ldestailleur
4a66837536 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-11 19:15:03 +02:00
Charlène Benke
aac2ff7b5b add ticket on list document by api (#34909) 2025-08-11 19:09:12 +02:00
Frédéric FRANCE
0bb025a733 clean code (#34913)
* clean code

* Update box_funnel_of_prospection.php

* Update box_funnel_of_prospection.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-11 19:05:21 +02:00
ldestailleur
3ac1e54b29 Add error code in message 2025-08-11 19:05:05 +02:00
Lucas Marcouiller
c74080f689 Fix phan and stan errors in develop (#34917)
* FIx phan and stan errors

* fix stan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-11 19:03:02 +02:00
Frédéric FRANCE
69b3235b3f clean code (#34916) 2025-08-11 18:46:09 +02:00
Frédéric FRANCE
cc0a0e7492 clean code (#34915) 2025-08-11 18:44:58 +02:00
Frédéric FRANCE
f05353705e clean code (#34914) 2025-08-11 18:44:25 +02:00
ldestailleur
4155233ad6 Fix warning 2025-08-11 18:43:02 +02:00
ldestailleur
e4c023b3c4 Clean setup pages 2025-08-11 15:14:16 +02:00
ldestailleur
cebc46c42a Make setup of pdf concat easier on proposal and order setup 2025-08-11 15:01:31 +02:00
ldestailleur
d5db70b887 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-11 12:29:20 +02:00
ldestailleur
c083499a35 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-11 03:38:57 +02:00
ldestailleur
f77be4a072 CSS 2025-08-11 03:38:45 +02:00
Laurent Destailleur
654d3eda8a Fix error message 2025-08-11 00:25:37 +02:00
ldestailleur
5671ef55ff NEW Add event when installing a module in the security event list. 2025-08-10 19:30:58 +02:00
ldestailleur
80d269f24d NEW Show the link to download the zip of a module on module setup 2025-08-10 17:18:25 +02:00
ldestailleur
0957ad7dab Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-10 16:11:41 +02:00
ldestailleur
34ef499da4 Clean code 2025-08-10 12:17:50 +02:00
ldestailleur
92542ac528 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-10 12:02:27 +02:00
ldestailleur
9153a938ed NEW Add the widget funnel of opportunities 2025-08-10 12:01:27 +02:00
Yamil Esteban Garcia
2823b9d0d6 Modifications made to allow search by EAN even when selecting in the product variants module to hide product variants #34567 (#34612)
* Error: When creating an invoice for a supplier order with a negative value #30516

Error: When creating an invoice for a supplier order with a negative value #30516

* Update html.form.class.php

Modifications made related to the issue
Search for variants by EAN #34567

* Update html.form.class.php

I change :

if(getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')){
with
if (getDolGlobalString('SEARCH_VARIANTS_OF_EAN13')) {

and 

SEARCH_VARIANTS_OF_EAN13
into
PRODUIT_ATTRIBUTES_HIDECHILD_BUT_ALLOW_SEARCH_IN_EAN13

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

* Update html.form.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-10 10:31:26 +02:00
ldestailleur
0f69530cb4 Fix phpstan rules 2025-08-10 03:52:56 +02:00
ldestailleur
aa0e5c57a0 Fix CI 2025-08-10 03:49:12 +02:00
ldestailleur
1ae767d8a6 Fix warnings 2025-08-10 03:42:27 +02:00
ldestailleur
7cbe50d926 More complete phpstan rule 2025-08-10 03:35:30 +02:00
ldestailleur
6bcc159d8a Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-10 03:29:25 +02:00
ldestailleur
aca71e1573 Standardize code 2025-08-10 03:22:19 +02:00
ldestailleur
8dbd59a71b Look and feel v23 - Add an arrow back to module page 2025-08-09 20:44:30 +02:00
ldestailleur
1ac9179323 NEW Enhanced layout feature for emailing 2025-08-09 19:39:03 +02:00
ldestailleur
f852e32393 Rename the route 2025-08-09 17:37:48 +02:00
ldestailleur
20805044b6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-09 17:30:54 +02:00
ldestailleur
8fb9ca9488 Fix deprecated var 2025-08-09 17:30:28 +02:00
Charlène Benke
025e478945 bank api : add direct fetch on accountline (#34885)
* bank api : add direct fetch on accountline

* Update api_bankaccounts.class.php

* Update api_bankaccounts.class.php

* Update api_bankaccounts.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-09 17:28:55 +02:00
ldestailleur
ab700b1601 Removed a TODO to add a DDOS protection 2025-08-09 17:27:40 +02:00
ldestailleur
2bdf8b7d07 Fix warnings 2025-08-09 17:15:50 +02:00
ldestailleur
dc0e28d9c5 Removed not valid copyright line (missing email, name and date) 2025-08-09 17:13:57 +02:00
ldestailleur
598ce78b06 Fix warning 2025-08-09 17:10:42 +02:00
ldestailleur
929dbe94e7 Fix CI warnings 2025-08-09 16:53:09 +02:00
ldestailleur
963beef90f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-09 16:23:50 +02:00
ldestailleur
0ad2e968e8 Doc 2025-08-09 16:23:39 +02:00
Pichinov-Valentin
ea4c964ed8 Add messaging to ordersupplier and fix info.php (#34900)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-09 15:30:43 +02:00
Frédéric FRANCE
170c44317b clean code (#34899)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-09 15:18:46 +02:00
ldestailleur
9c47f00a81 Fix warnings 2025-08-09 14:29:47 +02:00
ldestailleur
50e4e9fa2f Fix warnings 2025-08-09 14:27:52 +02:00
ldestailleur
7506fd006e Fix CI 2025-08-09 14:24:59 +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
1390c34a23 Fix CI 2025-08-09 14:02:49 +02:00
ldestailleur
6ad20950a7 Fix trans 2025-08-08 15:59:02 +02:00
ldestailleur
35d52b0fb2 Add a field format to allow a different format per line in the
blockedlog.
2025-08-08 15:35:42 +02:00
ldestailleur
3c0ecfc916 FIX bad consistency on test on permission to disable service 2025-08-08 12:15:17 +02:00
ldestailleur
ec337a8847 FIX Missing a column on group permissions 2025-08-08 12:03:34 +02:00
ldestailleur
48ae4d4a10 Drop deprecated column egroupware_id 2025-08-08 11:35:03 +02:00
ldestailleur
394bde1da1 Clean code 2025-08-08 02:43:36 +02:00
ldestailleur
556959e824 Fix remove non expected column 2025-08-08 01:27:28 +02:00
ldestailleur
dea09e6e36 Clean code 2025-08-08 01:03:34 +02:00
ldestailleur
3abad41f87 Clean code 2025-08-07 23:50:05 +02:00
ldestailleur
4252d54268 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-07 20:03:42 +02:00
ldestailleur
040f67e393 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-07 20:03:30 +02:00
kkhelifa-opendsi
e85e15b4fd FIX - The test for fetch the third party is not necessary because the thirdparty is not required on a event and it's not required for send the reminder by email to the user. (#34731)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-07 16:22:35 +02:00
Frédéric FRANCE
ba09a8ee84 add trigger prefix in reception class (#34888)
* add trigger prefix in reception class

* add trigger prefix in reception class

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-07 15:54:21 +02:00
ldestailleur
267871e805 Prepare code for simplification 2025-08-07 15:26:57 +02:00
ldestailleur
c7edb6af2f Fix CI warnings 2025-08-07 14:38:30 +02:00
ldestailleur
06991a4e85 Fix undef var in CLI context 2025-08-07 13:50:47 +02:00
ldestailleur
3af041a5b2 Standardize code 2025-08-07 13:42:11 +02:00
ldestailleur
567b60765e NEW User/Date in the Follow tab are more condensed. 2025-08-07 13:19:18 +02:00
ldestailleur
a19aaf8aa7 Fix debug 2025-08-07 12:32:54 +02:00
Pichinov-Valentin
49a6995fa1 NEW(propal): Add messaging and agenda features to proposals (#34883) 2025-08-07 12:28:09 +02:00
kollibar
13767a614d [NEW] Add function to split a discount in 2 by API REST (#34786)
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 80e67e665a.

* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).

correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."

This reverts commit 12ccfa60fa.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 6fb35a6d2e.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* correction commit for phan

* Correction for Travis CI

* I forgot to correct a line

* Correction for phpcs

* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue

* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on

* spelling correction in comment that don't pass pre-commit check

* trailing whitespace forget

* Add function to split a discount in 2 by API REST

* correction for phan & php-stan

* correction for phan & php-stan

* correction for phan & php-stan

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

* Update api_thirdparties.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 23:11:10 +02:00
Maxime Kohlhaas
43227d215f Fix : missing value in form of new birth field (#34874)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 22:18:05 +02:00
Frédéric FRANCE
944cc36b9c clean code (#34886)
* clean code

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 22:01:32 +02:00
ldestailleur
5599b72603 Fix CI 2025-08-06 20:44:25 +02:00
ldestailleur
08c868e041 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-06 20:22:46 +02:00
ldestailleur
2a91c86d12 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-06 20:21:31 +02:00
ldestailleur
bd999c21a2 Fix CI 2025-08-06 19:49:31 +02:00
Frédéric FRANCE
e95235b977 clean code (#34882)
* clean code

* clean code

* clean code

* clean code

* clean code
2025-08-06 19:25:15 +02:00
ldestailleur
f54e684e98 Fix trans 2025-08-06 19:22:22 +02:00
ldestailleur
d03af36d95 Fix use of const trigger to avoid compatibility pb in future. 2025-08-06 19:08:01 +02:00
ldestailleur
285e697e6c Doc on TRIGGER_PREFIX 2025-08-06 18:47:21 +02:00
ldestailleur
8bf946dab0 Doc on TRIGGER_PREFIX 2025-08-06 18:47:18 +02:00
ldestailleur
e06e53a2b2 Fix color on graph and label in legend 2025-08-06 17:49:07 +02:00
ldestailleur
635e010cd6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-06 16:46:17 +02:00
ldestailleur
4c05d48117 NEW Save the BAN and RUM for SEPA into database not just file. 2025-08-06 16:45:53 +02:00
Laurent Destailleur
1a3397071f fix: dev/examples/zapier/package.json to reduce vulnerabilities (#34877)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-FORMDATA-10841150

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2025-08-06 15:35:08 +02:00
ldestailleur
539761c90e Fix CI 2025-08-06 14:37:01 +02:00
ldestailleur
829054a653 Fix phan error 2025-08-06 14:30:59 +02:00
ldestailleur
fe8c21c2d4 Fix warnings 2025-08-06 13:46:55 +02:00
ldestailleur
2bd0ab34b4 Try to fix warning 2025-08-06 13:33:15 +02:00
ldestailleur
16e7c54947 Fix warnings 2025-08-06 13:19:01 +02:00
ldestailleur
96708d985b Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-06 12:47:55 +02:00
ldestailleur
9e4eb43dbc Fix CI 2025-08-06 12:46:49 +02:00
ldestailleur
a8173ff888 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-08-06 12:39:32 +02:00
ldestailleur
86b0457d34 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-06 12:31:37 +02:00
ldestailleur
e7228fc213 Complete list of file for unalterable process. 2025-08-06 12:30:04 +02:00
Charlène Benke
9cef7814d1 php warning error (use old $conf->global ...) (#34879)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 04:23:56 +02:00
Laurent Destailleur
99ac7bcfa9 Fix prefix of table 2025-08-06 04:10:02 +02:00
ldestailleur
f4c0cfa4e3 Rewrite SQL to match Dolibarr best practices 2025-08-06 03:55:16 +02:00
ldestailleur
5a39714ce3 Enhance generation script 2025-08-06 02:40:21 +02:00
ldestailleur
8766b34dac Fix php warnings 2025-08-06 01:48:18 +02:00
ldestailleur
101f1f271f Clean code 2025-08-06 01:28:49 +02:00
ldestailleur
3298062561 Fix regression 2025-08-06 01:20:57 +02:00
ldestailleur
982850b160 Fix CI warning 2025-08-05 15:28:13 +02:00
ldestailleur
969f0315df Clean code 2025-08-05 13:47:44 +02:00
ldestailleur
866effcad2 Fix warnings 2025-08-05 13:25:18 +02:00
ldestailleur
48ddff1b2c FIX Filter on the balance of leave 2025-08-05 13:05:56 +02:00
ldestailleur
a06c0b444c Doc 2025-08-05 12:43:42 +02:00
ldestailleur
1d00912fed Fix MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY 2025-08-05 12:19:53 +02:00
Maxime Kohlhaas
1a4226ff64 NEW : add extrafield option "empty on clone" (#34866)
* NEW : add extrafield option "empty on clone"

* NEW : empty extrafield value on clone

* Fix : missing parameter in function call

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 16:48:11 +02:00
Maxime Kohlhaas
b954bc7386 New update country list (#34873)
* NEW : update country list

* Update llx_00_c_country.sql

* Update 22.0.0-23.0.0.sql

* Update llx_00_c_country.sql

* Update 22.0.0-23.0.0.sql

* Fix : forget to remove eec update after country list update

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 16:46:43 +02:00
ldestailleur
a486c64387 Move common trigger code into a dedicated file 2025-08-04 16:32:44 +02:00
ldestailleur
c1affcc070 Fix upgrade to v22 2025-08-04 15:08:15 +02:00
ldestailleur
30be3f9c49 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-04 14:58:04 +02:00
ldestailleur
80999ed6fd QUAL: Clean/Standardize hook response of hook printFieldListHaving 2025-08-04 14:57:44 +02:00
github-actions[bot]
c5c656a1ba PHPStan > Update baseline (#34871)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-04 14:12:12 +02:00
ldestailleur
1e386099ff Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-04 13:55:27 +02:00
ldestailleur
3b8df77a86 Clean code 2025-08-04 13:54:40 +02:00
Maxime Kohlhaas
edd2f599cc NEW : add company date birth (UI) (#34861)
* NEW : add company date birth (SQL structure)

* NEW : add company date birth (UI)

* Rename date_birth in birth

* Rename date_birth in birth (UI)

* Update societe.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 13:50:05 +02:00
ldestailleur
b0925c7e5f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-04 13:18:21 +02:00
ldestailleur
a132cabd4c Add upgrade for v23 2025-08-04 13:17:58 +02:00
Pichinov-Valentin
db1552e27d NEW Added Messaging and agenda tabs on order and shipments (#34859)
* feat: Messaging and agenda core modifications

* feat: Core modifications for messaging and agenda

* fix(expedition): Décris ici la correction ou l'ajout fait à card.php

* Update company.lib.php

---------

Co-authored-by: Lou31 <valentingrimal2@gmail.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 13:12:22 +02:00
sonikf
30b4796385 NEW: PDF Show customer balance on invoice date (#34800)
* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* NEW: PDF Invoice show customer balance

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix PhanPluginDuplicateExpressionAssignmentOperation

* fix PhanPluginDuplicateExpressionAssignmentOperation

* fix PhanPluginDuplicateExpressionAssignmentOperation

* fix Travis CI

* fix Travis CI

* fix Travis CI

* fix Travis CI

* fix Travis CI

* fix Travis CI

* remove global $db

* remove global $db

* remove global $db

* fix $multicurrency_tx (array<float>|float) in isset() is not nullable.

* fix $multicurrency_tx (array<float>|float) in isset() is not nullable.
2025-08-04 13:11:57 +02:00
ldestailleur
293b2b17d1 Doc 2025-08-04 13:06:33 +02:00
Maxime Kohlhaas
1692430ed4 NEW : update country list (#34865)
* NEW : update country list

* Update llx_00_c_country.sql

* Update 22.0.0-23.0.0.sql

* Update llx_00_c_country.sql

* Update 22.0.0-23.0.0.sql

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 12:24:42 +02:00
ldestailleur
17c48207c4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-04 12:22:19 +02:00
ldestailleur
1477d95ada Fix warning 2025-08-04 12:22:10 +02:00
Artem Chernitsov
4d7c836e37 Fix multi-currency payments and holiday events in Agenda (#34821)
* fix calendar holiday link

* fix bug with multicurrency payments, change GETPOSTINT() to GETPOSTFLOAT() function

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 12:07:58 +02:00
ldestailleur
22c7da02e3 Doc 2025-08-04 12:06:44 +02:00
ldestailleur
de4bb424a6 Add region 2025-08-04 11:53:10 +02:00
ldestailleur
00101c0e9c Countries already as Regions not enabled by default 2025-08-04 11:46:16 +02:00
ldestailleur
6363022c6b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-08-04 11:17:18 +02:00
ldestailleur
24d2e83be1 Doc 2025-08-04 11:15:06 +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
Lenin Rivas
c67e5f70c0 Forever update user and date modified (#34862) 2025-08-04 11:08:53 +02:00
Maxime Kohlhaas
705e7a602b NEW : add company date birth (SQL structure) (#34854)
* NEW : add company date birth (SQL structure)

* Rename date_birth in birth

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-04 10:41:36 +02:00
ldestailleur
e9b50374d6 Add birth place 2025-08-04 10:40:52 +02:00
github-actions[bot]
af758b0bff PHPStan > Update baseline (#34863)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-08-04 10:36:13 +02:00
ldestailleur
b04c7c3fbd Doc 2025-08-04 05:38:31 +02:00
ldestailleur
b402bf6b19 Rename dir 2025-08-03 00:09:00 +02:00
ldestailleur
7eeef6b77a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-02 00:56:02 +02:00
ldestailleur
37afaf6bf8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-08-02 00:55:51 +02:00
Maxime Kohlhaas
f16c550016 NEW : add hidden const to get response header in geturlcontent function (#34781) (#34824)
Co-authored-by: x <x@x.x>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:49:19 +02:00
noec764
cff91b03d2 FIX: SQL query too heavy (#34250)
* FIX: Too heavy sql query

* FIX: Add index in user table and update SQL for user::fetchall()

* FIX: Add also index on llx_user on migrate

---------

Co-authored-by: Noé <noe@scopen.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:42:03 +02:00
atm-lucas
0c044c8349 NEW - Add a boolean for lines in api and $properties (#34293)
* Add a boolean for lines in api

* Upgrade
2025-08-02 00:35:16 +02:00
Clément
5e38c5ab38 FIX Bug isTimestamp (#34365)
* FIX Bug

* Update validate.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:32:48 +02:00
Marc de Lima Lucio
883933c73c QUAL: stop supporting old tab entries (#34377)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:28:48 +02:00
Aurélien BISOTTI
2635c20b53 NEW add shipping address to propal (#34441)
* Update pdf_cyan.modules.php

* Update pdf_other.php

* Update propal.lang

traduction en_us

* Update propal.lang

* Update propal.lang

pb de copié collé

* Update pdf_other.php

* Update pdf_other.php

removed blank space

* Update pdf_cyan.modules.php

remove blank space

* Update propal.lang

ajout PROPOSAL_SHOW_SHIPPING_ADDRESSMore

* Update propal.lang

add PROPOSAL_SHOW_SHIPPING_ADDRESSMore

* Update pdf_cyan.modules.php

test declaration variable shipp_shift

* Update pdf_cyan.modules.php

test declaration variable shipp_shift

* Update pdf_cyan.modules.php

shipp_shift

* Update pdf_cyan.modules.php

shipp_shift

* Update pdf_cyan.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:26:39 +02:00
moreauftheobald
6bc70788ba replace $conf->module->XXX->gwarning_delay by new function getwarning… (#34452)
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay

* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay

* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay

* Update card.php

update typo

---------

Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
2025-08-02 00:25:41 +02:00
Chloe-Moreau-2009
bcbc940cb6 QUAL replace $conf->XXX->dir_output by getMultidiroutput (#34455)
* 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-08-02 00:25:10 +02:00
Florian Mortgat
e8cb259d05 NEW hook allowing external modules to replace the behavior of fetchObjectLinked() (#34724)
Note: if subclasses overload fetchObjectLinked, adding the same hook should be considered as well if deemed useful.
2025-08-02 00:21:53 +02:00
Frédéric FRANCE
eba8736515 fix #34792 (#34848)
* fix #34792

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-02 00:01:06 +02:00
Frédéric FRANCE
5029b95078 fix translation (#34855)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-01 19:38:21 +02:00
Laurent Destailleur
9793eb17df Fix warning 2025-08-01 19:11:25 +02:00
Laurent Destailleur
18089bbdb7 Fix case of ismultientitymanaged that is key@table 2025-08-01 18:49:05 +02:00
Laurent Destailleur
602b9c26ae Fix case of ismultientitymanaged that is key@table 2025-08-01 18:37:20 +02:00
Laurent Destailleur
e8a17bd1e3 Fix warning 2025-08-01 17:42:58 +02:00
Laurent Destailleur
6ff0a3c2d8 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-01 17:24:02 +02:00
ldestailleur
95ae04c26f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-01 14:53:46 +02:00
ldestailleur
50da1f64a0 Move tool 2025-08-01 14:53:33 +02:00
Laurent Destailleur
8581d9a7b3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-01 00:15:23 +02:00
Laurent Destailleur
179af48c51 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-01 00:14:43 +02:00
Sébastien NASSIET
73d7f755c1 NEW Add tpl loader for discounts.tpl.php (#34798)
* Add tpl loader for discounts.tpl.php

* Update card.php
2025-07-31 22:28:45 +02:00
Laurent Destailleur
d929240ed0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-31 22:14:20 +02:00
Laurent Destailleur
82098594a6 Fix warning 2025-07-31 22:13:45 +02:00
atm-GregM
e081e3be33 NEW ADD Send mail for reception / Delivery (#34829)
* Send mail for reception

* back pre-commit

* empty reshook
2025-07-31 21:59:35 +02:00
Frédéric FRANCE
94ec228978 use same modulepart on card and document (#34834) 2025-07-31 21:58:26 +02:00
Frédéric FRANCE
9b071a5153 translation (#34832) 2025-07-31 21:55:47 +02:00
cephos
5d934fdcb3 Added Swiss KMU Accounting Plan (#34841)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-31 21:53:16 +02:00
github-actions[bot]
5a6654890c PHPStan > Update baseline (#34838)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-07-31 21:49:42 +02:00
Laurent Destailleur
d6e0d9ad34 Fix dolPrintHTML 2025-07-31 21:44:09 +02:00
Laurent Destailleur
f40649c068 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-31 21:17:24 +02:00
ldestailleur
499dd4a153 Trans 2025-07-30 16:39:22 +02:00
ldestailleur
be17a2a106 Debug 2025-07-30 16:34:34 +02:00
ldestailleur
bc1de6d6b8 Debug sql 2025-07-30 16:33:08 +02:00
ldestailleur
9b65140632 Debug v22 2025-07-30 16:25:21 +02:00
ldestailleur
871672983b Debug compare 2025-07-30 16:10:36 +02:00
ldestailleur
f9a867b294 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-30 15:43:22 +02:00
ldestailleur
7d3b88cc16 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-30 15:43:12 +02:00
ldestailleur
3db8ca05f0 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-30 15:37:57 +02:00
ldestailleur
6ce78d0961 Debug v23 2025-07-30 15:37:44 +02:00
ldestailleur
423c52b07c Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-30 15:11:32 +02:00
ldestailleur
974039423a Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-30 14:51:31 +02:00
boudet jean pascal
3b560cfa4a New add printFieldListWhere hook in checkmargin.php (#34828)
* add where hook on checkmargin.php

* remove global

* change hookName

* add rector

* clean code

* mend

---------

Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
2025-07-29 21:09:29 +02:00
Frédéric FRANCE
935c326eee Update box_produits.php (#34827) 2025-07-29 21:09:07 +02:00
Mohamed DAOUD
3fdc9de178 fix use delivery date (#34830) 2025-07-29 21:08:24 +02:00
Frédéric FRANCE
7f173724ef NEW can admin payments extrafields (#34822)
* add admin for payments extrafields

* add admin for payments extrafields

* add admin for payments extrafields

* add admin for payments extrafields

* add admin for payments extrafields
2025-07-29 13:51:58 +02:00
ldestailleur
0860e8886c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-29 13:36:43 +02:00
ldestailleur
bdddb38878 Debug v22 2025-07-29 13:36:33 +02:00
Sébastien NASSIET
f4c6e2495c Hook for getAvailableDiscounts (#34799)
* Update discount.class.php

Add a hook to change the sql request in function getAvailableDiscounts

* Update discount.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-29 13:25:07 +02:00
ldestailleur
8c155ab728 Fix warnings 2025-07-29 13:05:29 +02:00
ldestailleur
f9a72ba2ac Add info into database to track api or token usage 2025-07-29 12:51:42 +02:00
ldestailleur
c791ea205e Fix warnings 2025-07-29 12:33:49 +02:00
ldestailleur
31d8bbc75c Fix CI 2025-07-29 12:03:53 +02:00
ldestailleur
6d791919ea Fix CI 2025-07-29 11:49:03 +02:00
ldestailleur
af1948b681 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-29 11:34:16 +02:00
ldestailleur
d34e0b5305 Try fix CI 2025-07-29 11:04:32 +02:00
Laurent Destailleur
5cf504fa90 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-29 02:24:47 +02:00
Laurent Destailleur
835cb2b244 Debug v22 2025-07-29 02:22:20 +02:00
Laurent Destailleur
149869ca5b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-07-29 01:51:08 +02:00
Laurent Destailleur
f64848921c Fix regression on pass encryption in conf 2025-07-29 01:46:04 +02:00
Laurent Destailleur
53badefb2d Fix regression on pass encryption in conf 2025-07-29 01:14:42 +02:00
Laurent Destailleur
dc7ad394ab Add tool to unobfuscate conf file. 2025-07-29 00:22:06 +02:00
Laurent Destailleur
9fe51c656a Add tool to unobfuscate conf file. 2025-07-29 00:00:53 +02:00
ldestailleur
5ea9be671c Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-28 18:42:58 +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
96e38e6584 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-27 14:03:22 +02:00
ldestailleur
7b8c2c5e9c Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-26 13:16:15 +02:00
ldestailleur
cfba25b857 Total prices 2025-07-26 11:10:38 +02:00
ldestailleur
2f8b5b805f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-26 10:46:04 +02:00
iouston
03e4da4a42 Update holiday.lang (#34806) 2025-07-25 21:35:12 +02:00
Anthony Damhet
3399a6dad5 add links to home info-box (#34803) 2025-07-25 21:34:54 +02:00
Anthony Damhet
b66fd8daef UIUX Add titles to documentation (#34801) 2025-07-25 21:20:26 +02:00
ldestailleur
cd938aea5e Doc 2025-07-25 21:14:42 +02:00
ldestailleur
ea47bc4548 Doc 2025-07-25 21:05:33 +02:00
ldestailleur
7ea3c419aa Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-25 17:00:22 +02:00
ldestailleur
33301fa762 css 2025-07-25 10:17:01 +02:00
ldestailleur
1f1e41ae7f Parenthesis 2025-07-25 01:45:15 +02:00
ldestailleur
9d32a5218e Add log 2025-07-25 01:37:48 +02:00
ldestailleur
c4633cfe76 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-24 19:20:34 +02:00
ldestailleur
d66811e473 CSS 2025-07-24 19:20:24 +02:00
Lenin Rivas
14dd86d75d NEW Withholdingtax how VatRefund (#34649)
* Withholdingtax VatRefund

* Withholdingtax VatRefund

* Withholding save VatRefund

* Use $this->db->escape() label in Where

* Use GETPOSTFLOAT of resteapayer

* Fix Whitespace

* Update card.php

* Update card.php

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 19:18:06 +02:00
ldestailleur
c3fa113305 NEW Module datapolicy moved as stable (for anonimization features) 2025-07-24 18:34:17 +02:00
ldestailleur
7002897dab QUAL: Removed a not/never used table 2025-07-24 18:30:21 +02:00
ldestailleur
cc132ba9e5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-24 17:58:12 +02:00
ldestailleur
5157ae2bd6 Move action code to change ustomer at the good place. 2025-07-24 17:57:48 +02:00
Yannis Hoareau
7f7923c24f New: SQL for api rest tokens (#34671)
* feat: query to import old user token to new implement with perms

* feat: replaced sql migration file by php upgrade2

* feat: leave state field empty

* Update upgrade2.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 16:11:43 +02:00
ldestailleur
d8eebcafda Fix regression 2025-07-24 15:39:37 +02:00
ldestailleur
03165e5cae Remove duplicate definition table. 2025-07-24 14:42:45 +02:00
ldestailleur
ab8b4feca0 Enhance module datapolicy 2025-07-24 12:35:41 +02:00
ldestailleur
6b0f6f4b3a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-24 12:22:08 +02:00
ldestailleur
e4662d0e5c Debug v23 2025-07-24 12:21:39 +02:00
Anthony Damhet
3e0df45f30 NEW | Discount split more than two parts (#34782)
* Discount split more than two parts

* fix spaces

* remove set action split and type variables

* Condition if javascript is disabled

* Update remx.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:53:11 +02:00
ldestailleur
724cb85c9a Fix trans 2025-07-24 11:45:43 +02:00
ldestailleur
5841cee655 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-07-24 11:45:13 +02:00
VIAL-GOUTEYRON Quentin
5cf613a269 NEW : Major overhaul of DataPolicyCron and add Recruitment policy (#34704)
* refactor(datapolicy): redesign setup and logic for GDPR compliance

- Introduced a data-driven configuration structure for setup.php.
- Added support for a new "recruitment" GDPR datapolicy configuration.
- Streamlined code for managing anonymization and deletion delays.
- Enhanced dropdown generation logic to improve maintainability.
- Simplified data anonymization and deletion methods in cron execution.

This change provides more flexibility and modularity while ensuring compliance with GDPR standards.

* refactor(datapolicy): enhance data cleaning logic and add modular handlers

- Refactored `cleanDataForDataPolicy` method for better readability and efficiency.
- Implemented modular handlers for deletion and anonymization (_handleDelete and _handleAnonymize).
- Added dynamic argument building for method calls based on policy configurations.
- Improved SQL query preparation with placeholders for better database compatibility.
- Enhanced error handling and outcome recording in data processing.

This update simplifies extensibility and ensures robust handling of datapolicies.

* fix precommit

* fix

* fix(datapolicy): resolve uninitialized langs object and improve type hints

- Added a check to ensure `$langs` object is properly initialized, preventing runtime errors.
- Improved type hints in `datapolicycron.class.php` for stronger type checking and clarity.
- Replaced `empty` checks with `isset` for better null safety in setup.php dropdown logic.
- Adjusted SQL placeholders to cast values as strings for compatibility.

These changes enhance code robustness, type safety, and error handling.

* fix(datapolicy): improve type hints and streamline dropdown logic

- Added precise type hints (`string`, `array`) to enhance code clarity and type safety.
- Removed redundant condition in dropdown generation for improved maintainability.
- Added type specification for `$paramName` in `array_map` to strengthen type checking.
- Inserted missing class docblock for `CommonObject` in `datapolicycron.class.php`.

These updates lead to cleaner, safer, and more robust code.

* fix(datapolicy): improve type hints and streamline form submission logic

- Added return type hints (`: int`, `: void`, `: array`) in `datapolicycron.class.php` for better type safety and clarity.
- Simplified loop structures in `setup.php` by removing unnecessary variables.
- Revised `buttonsSaveCancel` method usage to eliminate redundant cancel parameter logic.
- Enhanced maintainability through refactoring `_processPolicyAction`, `_handleDelete`, and `_handleAnonymize` methods.

These refinements improve code readability, maintainability, and robustness.

* refactor(datapolicy): replace custom dropdown generation with `Form::selectarray`

- Removed the custom `$generateSelectHtml` function, simplifying code by using the existing `Form::selectarray` method.
- Updated dropdown generation for 'anonymize' and 'delete' actions to align with Dolibarr's standard practices.
- Enhances maintainability by leveraging built-in utilities and reducing custom logic.

* Update datapolicycron.class.php

* Try to fix CI

* Update datapolicycron.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:41:05 +02:00
MDW
dff2bd9d7c qual: Update FTP stub for phan (#34796)
# qual: Update FTP stub for phan

Phan did not find the FTP/Connection type, so updated the ftp stub for phan
which fixes some notices that were new

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:30:54 +02:00
MDW
15924c3a14 qual: Update phan baseline (#34795)
Update phan baseline with regards to exceptions that were fixed.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:25:14 +02:00
ldestailleur
256b1b705e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-24 11:17:44 +02:00
ldestailleur
d83dcb98f3 Fix warnings 2025-07-24 11:17:32 +02:00
brice.l
789293c78a Update contrat.class.php (#34784)
* Update contrat.class.php

Fix the function getListOfContracts with a missing LEFT JOIN when using $line_status

* Update contrat.class.php

add the left join in both cases and the inner join only for the product_categorie filter

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:01:32 +02:00
ldestailleur
6a18353eb0 Fix CI 2025-07-24 11:00:42 +02:00
ldestailleur
0187d1fcfc Fix CI 2025-07-23 16:31:09 +02:00
ldestailleur
2aa30381c6 FIX warning for too many %s 2025-07-23 14:48:32 +02:00
ldestailleur
3844c65e89 NEW Enhance popup for image preview (show size in title, can restore
small view, always show the Rotate button).
2025-07-23 14:43:51 +02:00
ldestailleur
8f3b65976a Fix emailcollector 2025-07-22 03:43:10 +02:00
ldestailleur
453c0bff06 Fix missing update of replyto 2025-07-22 01:54:01 +02:00
ldestailleur
af321bab80 Debug v22 - FIX Message-ID not set with SMTPs 2025-07-22 01:25:40 +02:00
ldestailleur
fb32860001 Debug v22 - FIX Message-ID not set with SMTPs 2025-07-22 01:23:28 +02:00
ldestailleur
4fa7e0f610 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-22 00:59:25 +02:00
ldestailleur
fe9ca39253 css 2025-07-22 00:45:11 +02:00
ldestailleur
5f7424bfed CSS 2025-07-22 00:42:58 +02:00
ldestailleur
0ea94b2a5f Clean code 2025-07-22 00:40:10 +02:00
ldestailleur
795ee53c88 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-21 23:27:15 +02:00
ldestailleur
4d0aad7d48 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-21 23:20:42 +02:00
ldestailleur
7a076eead2 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-21 22:14:38 +02:00
ldestailleur
4d74dc6380 NEW Show full date with seconds in the tooltip of date of event 2025-07-21 19:56:43 +02:00
ldestailleur
fa12e7ddeb Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-21 18:47:46 +02:00
ldestailleur
5beab40b92 CSS 2025-07-21 18:25:53 +02:00
ldestailleur
04ce65c613 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-20 21:05:24 +02:00
ldestailleur
c9cef40a2b Add ip and user_agent into order table 2025-07-20 21:04:57 +02:00
moreauftheobald
d4f9fd424f QUAL: OpenID Setup fused in Security Setup + Module removed -- WIP (#34422)
* FIX: OpenID Setup fused in Security Setup + Module removed...

* FIX: OpenID Setup fused in Security Setup + Module removed... WIP

* FIX: OpenID Setup fused in Security Setup + Module removed... WIP

---------

Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
2025-07-20 20:09:53 +02:00
ldestailleur
0277aff89d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-07-20 20:05:40 +02:00
ldestailleur
9195f9be36 Debug getWarningDelay 2025-07-20 19:57:15 +02:00
moreauftheobald
6c86ad3eae FIX-Develop correct getwarningdelay (#34497)
* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay

* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay

* replace $conf->module->XXX->gwarning_delay by new function getwarningdelay

* FIX- Correct function GetwarningDelay

---------

Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
2025-07-20 19:54:06 +02:00
Charlène Benke
348b562e95 NEW Can force_install_dolibarrpassword for automatic installation (#34537)
* add force_install_dolibarrpassword for automatised install

* Update install.forced.sample.php

* Update step4.php
2025-07-20 18:50:26 +02:00
Yannis Hoareau
c9073e95c7 NEW : search all facture rec (#34563)
* feat: new search all in facture rec

* feat: search all working without distinct

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-20 18:47:57 +02:00
github-actions[bot]
dd80eab17c PHPStan > Update baseline (#34772)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-07-20 17:15:58 +02:00
ldestailleur
4c14b35602 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-20 17:15:31 +02:00
ldestailleur
449109d0ba FIX use of a google print oauth token restored. No more conflict with
other tokens.
2025-07-20 17:15:14 +02:00
kollibar
87cb738eb5 Correction for the generation of the bankjournal for a paiement for different third parties (#34760)
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 80e67e665a.

* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).

correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."

This reverts commit 12ccfa60fa.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 6fb35a6d2e.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* correction commit for phan

* Correction for Travis CI

* I forgot to correct a line

* Correction for phpcs

* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue

* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on

* spelling correction in comment that don't pass pre-commit check

* trailing whitespace forget
2025-07-20 15:41:11 +02:00
ldestailleur
689ca56d8f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-19 18:23:47 +02:00
ldestailleur
4d22a52afb Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-19 18:20:46 +02:00
github-actions[bot]
ee5e558812 PHPStan > Update baseline (#34763)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-07-19 00:16:52 +02:00
Lenin Rivas
5aa5f88997 NEW Constant ORDER_MASS_ACTION_BILLED_LINK_EXPEDITIONS (#34617)
* NEW Constant ORDER_MASS_ACTION_BILLED_LINK_EXPEDITIONS

* NEW Constant ORDER_MASS_ACTION_BILLED_LINK_EXPEDITIONS

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 03:04:42 +02:00
Charlène Benke
54b359ab8a NEW implement box on product and interventional index page (#34629)
* implement box on product and interventional index page

* Update index.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 03:01:36 +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
ldestailleur
6339eaf879 Fix date variables must be in UTC in memory. 2025-07-18 02:57:49 +02:00
VIAL-GOUTEYRON Quentin
7f9b477401 Fix(core): Ensure tms field is always updated in updateCommon (#34723)
* fix(commonobject): ensure `tms` field is updated with current timestamp

- Added logic to automatically update the `tms` field with the current timestamp when it exists in `$fieldvalues`.
- Aligns `tms` behavior with other timestamp fields like `date_modification`.

Improves consistency in timestamp handling across the codebase.

* fix(commonobject): set timezone for `dol_now()` call

- Updated `dol_now()` to use the user's timezone (`tz_user`).
- Ensures timestamps are consistent with user-specific settings.

* fix(commonobject): correct parameter for `dol_now()` function

- Updated `dol_now()` to use 'tzuser' instead of 'tz_user'.
- Fixes incorrect parameter causing potential timezone inconsistencies.

* fix(commonobject): respect `MAIN_DISABLE_AUTO_UPDATE_OF_TMS_FIELDS` setting

- Added a check for `MAIN_DISABLE_AUTO_UPDATE_OF_TMS_FIELDS` in the logic updating the `tms` field.
- Ensures the `tms` field is not auto-updated when this global setting is enabled.
- Retains the update behavior for `date_modification` and `fk_user_modif` fields.

Improves flexibility by honoring user-defined global settings for timestamp management.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 02:54:07 +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
ldestailleur
5b6eb72f4a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-18 02:44:03 +02:00
ldestailleur
30b1827317 Trans 2025-07-18 02:41:31 +02:00
Charlène Benke
1df5ea8456 NEW Add thirdparty search on api list (#34634)
* Add thirdparty search on api list

this change allow to seach element with filter on thirdparty (ex : list of bill of with name of thidparty)

* Update api_orders.class.php

* Update api_invoices.class.php

* Update api_contracts.class.php

* Update api_shipments.class.php

* Update api_interventions.class.php

* Update api_projects.class.php

* Update api_tickets.class.php

* Update api_tickets.class.php

* Update api_projects.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 02:35:50 +02:00
Charlène Benke
dbd5912658 NEW Add Sign feature on shipments (#34640)
* Add Sign feature on shipping

* Update card.php

* Update sendings.lang

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 02:29:54 +02:00
splohmer
f369730adc Make mail id more unique (#34683)
The current solutions only uses time() which is a timestamp based on seconds. In some scenarios like automizing mails this is not enough. Even with the mt_rand there could be more likely collisions of the ids which is not allowed as it should be overall unique.
The newly used uniqid used a timestamp based on milliseconds and adds additionally a bit randomness which reduces the collision changes much more.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-18 01:33:24 +02:00
Alexandre SPANGARO
b4914420fa NEW Accountancy - Accounting by payment type (#34729)
* NEW Accountancy - Accounting by payment type

* Better SQL request
2025-07-18 01:01:28 +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
F-Node-Karlsruhe
e59f2447e7 fix purchase order refernece key in pdf generation (#34757)
* fix refernece key in pdf generation

Signed-off-by: F-Node-Karlsruhe <christian.fries@eecc.de>

* Update pdf.lib.php

---------

Signed-off-by: F-Node-Karlsruhe <christian.fries@eecc.de>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-17 22:20:45 +02:00
ldestailleur
de8c7f3c6e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 21:48:55 +02:00
ldestailleur
487633c117 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 21:48:46 +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
080585aca1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 19:26:34 +02:00
ldestailleur
fd36861c17 Fix doc 2025-07-17 19:26:24 +02:00
ldestailleur
66c8f356e9 Sync transifex 2025-07-17 19:26:24 +02:00
ldestailleur
79acce8711 Update makepack 2025-07-17 19:26:24 +02:00
ldestailleur
d365595685 Fix link 2025-07-17 19:26:24 +02:00
ldestailleur
42c0e26b3b Fix link 2025-07-17 19:26:24 +02:00
ldestailleur
beea58cae6 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 19:26:24 +02:00
ldestailleur
c7edba6b80 Sync transifex 2025-07-17 19:26:24 +02:00
ldestailleur
6bd29ed4d6 Prepare dev for v23 2025-07-17 19:26:24 +02:00
ldestailleur
66ceb9911d Debug v22 - Fix bad trans and setup for Cash acocunting. 2025-07-17 19:26:24 +02:00
ldestailleur
03bd45a505 Debug 2025-07-17 19:26:24 +02:00
ldestailleur
5940007f00 Debug v22 2025-07-17 19:26:24 +02:00
ldestailleur
d9c56d586b Simplify regex 2025-07-17 19:26:24 +02:00
ldestailleur
144846eef5 Debug v22 2025-07-17 19:26:24 +02:00
ldestailleur
65fabdaf38 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 19:26:24 +02:00
ldestailleur
e8b2664921 Debug v22 2025-07-17 19:26:24 +02:00
ldestailleur
5f4ff4d472 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 19:26:24 +02:00
Alexandre SPANGARO
478ac4a1b4 UX Repair install script (#34663)
* UX Repair install script

* Presentation

* Fix language

* FIX CI
2025-07-17 19:26:24 +02:00
ldestailleur
a0dc36b613 Debug v22 2025-07-17 19:26:24 +02:00
ldestailleur
1f6a9d54e8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 19:26:24 +02:00
ldestailleur
f1cef8ec80 FIX mass action "Merge PDF" with high number of objects. 2025-07-17 19:26:24 +02:00
ldestailleur
d8a07f6fd6 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 19:26:24 +02:00
ldestailleur
24fcc2803f Fix warning 2025-07-17 19:26:24 +02:00
ldestailleur
43b05c56b6 Debug v22 2025-07-17 19:26:24 +02:00
ldestailleur
462090421f Trans 2025-07-17 19:26:24 +02:00
ldestailleur
890f5e1c7b Clean code 2025-07-17 19:26:24 +02:00
ldestailleur
acb3e1d397 Trans 2025-07-17 19:26:24 +02:00
ldestailleur
f0a0aeb3a4 FIX #34746 - More complete fix for CVE-2024-40137 2025-07-17 19:26:24 +02:00
ldestailleur
df88659105 Fix doc 2025-07-17 19:03:39 +02:00
ldestailleur
28545de94f Sync transifex 2025-07-17 18:56:16 +02:00
ldestailleur
4409b188ab Fix link 2025-07-17 18:55:28 +02:00
ldestailleur
92f12873d0 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 18:32:58 +02:00
ldestailleur
fd4d0b4b11 Prepare dev for v23 2025-07-17 16:43:14 +02:00
ldestailleur
a94f99a8a5 Debug 2025-07-17 16:41:02 +02:00
ldestailleur
c3bdf64b86 Simplify regex 2025-07-17 16:17:48 +02:00
ldestailleur
3867da9ace Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 16:17:00 +02:00
ldestailleur
d1aa8aa235 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 16:16:50 +02:00
Alexandre SPANGARO
013e8fd8c9 UX Repair install script (#34663)
* UX Repair install script

* Presentation

* Fix language

* FIX CI
2025-07-17 11:06:29 +02:00
ldestailleur
755bde63b5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 02:07:52 +02:00
ldestailleur
2950084ac9 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-17 02:07:45 +02:00
Noé Cendrier
241a919da1 NEW: New hook mergePdf (#34707)
* ADD: New hook mergePdf (#32)

* Update actions_massactions.inc.php

* Rename hook

---------

Co-authored-by: altairis-melina <91946767+altairis-melina@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-15 18:48:01 +02:00
ldestailleur
1832675c96 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-15 18:44:45 +02:00
ldestailleur
8a79e957c6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-15 17:20:13 +02:00
ldestailleur
1dd83c65aa Doc 2025-07-15 16:15:59 +02:00
Frédéric FRANCE
12781d7ccd add tables for paiement extrafields (#34695)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-15 15:43:21 +02:00
Clément
1e6b70a09a NEW Customized step in duration select (#34652)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-15 15:41:23 +02:00
ldestailleur
daf901dfed Doc 2025-07-15 15:36:54 +02:00
ldestailleur
4a696a6dba Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-15 15:22:52 +02:00
ldestailleur
deb758f023 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-15 12:54:06 +02:00
ldestailleur
034804aa42 Doc 2025-07-15 12:36:15 +02:00
Francis Appels
55567c9e8e WebPortal: Make controller form objects accessable in hookPrintPageView (#34742)
* Make formList public in list controller to allow modify properties by hook.

* WebPortal: Make controller form objects accessable in hookPrintPageView
2025-07-15 11:44:08 +02:00
Alexandre SPANGARO
6cd43995f8 FIX Fiscal year - Translation error on status (#34743) 2025-07-15 11:41:20 +02:00
Noé Cendrier
8ccb6634c9 FIX: we should ensure Commande::$lines array contains OrderLine objects (#34727) 2025-07-15 06:20:06 +02:00
github-actions[bot]
af61bc7644 PHPStan > Update baseline (#34734)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-07-15 06:16:56 +02:00
ldestailleur
091b9c4f8c Comment 2025-07-11 14:24:22 +02:00
ldestailleur
5362770117 Clean code 2025-07-11 09:20:21 +02:00
ldestailleur
ecb4762a0b Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-10 19:49:35 +02:00
ldestailleur
7c305761ae Fix CI 2025-07-10 17:48:36 +02:00
ldestailleur
3d5f6b820f Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-10 17:45:35 +02:00
Francis Appels
6e96cd2118 fix takepos console error (#34709)
* fix console error

* exit early

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-10 16:45:26 +02:00
ldestailleur
94abc07a1f Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-07-10 15:21:51 +02:00
Lucas Marcouiller
d060962bae Fix bad value fourn paiement process (#34722)
* Fix bad value  fourn paiement process

* best fix
2025-07-10 14:54:29 +02:00
Deefaze
f21b5290f4 Update functions.lib.php (#34718)
Add __MYCOMPANY_URL__ & __MYCOMPANY_PHONEMOBILE__ in getCommonSubstitutionArray
2025-07-10 14:54:04 +02:00
ldestailleur
d5db68430c Fix name of option for supplier 2025-07-10 14:49:45 +02:00
3622 changed files with 88498 additions and 384243 deletions

View File

@@ -1,6 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
allow:
# Allow production updates only (can do a AND, several entries are doing a OR)
- dependency-type: "production"
#- dependency-type: "direct"
exclude-paths:
- 'dev'
- 'tests/acceptance'
- 'tests/selenium'

View File

@@ -20,10 +20,10 @@ See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workf
The other worklows are:
-----------------------
- stale-issues-safe to autoclose old issues.
- phpstan_baseline to update the phpstan baseline file.
- cache-clean-pr to clean cache when closing a PR.
- ci-stale-issues-safe to autoclose old issues.
- ci-phpstan_baseline to update the phpstan baseline file.
- ci-cache-clean-pr to clean cache when closing a PR.
- ci-test to make CI tests
Some tests workflows are:
------------------------

View File

@@ -6,6 +6,8 @@ on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
@@ -16,7 +18,7 @@ jobs:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache

View File

@@ -1,6 +1,7 @@
name: "CI-PULL-REQUEST"
on: [pull_request]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml

View File

@@ -1,6 +1,7 @@
name: "CI-PUSH"
on: [push]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
@@ -25,15 +26,15 @@ jobs:
uses: ./.github/workflows/windows-ci.yml
with:
gh_event: ${{ github.event_name }}
#gh-travis: # Runs travis script on github runner (not on travis)
# if: false
# # needs: [pre-commit, phan]
# # needs: [windows-ci]
# secrets: inherit
# needs: [pre-commit, phan, phpstan]
# uses: ./.github/workflows/gh-travis.yml
# with:
# gh_event: ${{ github.event_name }}
# gh-travis: # Runs travis script on github runner (not on travis)
# if: false
# # needs: [pre-commit, phan]
# # needs: [windows-ci]
# secrets: inherit
# needs: [pre-commit, phan, phpstan]
# uses: ./.github/workflows/gh-travis.yml
# with:
# gh_event: ${{ github.event_name }}
# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one fails, the following action may help

View File

@@ -33,7 +33,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:

View File

@@ -0,0 +1,45 @@
# Action to prepare the github action
# Go on Dolibarr Organization - Settings - Developer settings - GitHub App (https://github.com/organizations/Dolibarr/settings/apps)
# Create an App: Enter a name + In Home page URL use https://github.com/Dolibarr/dolibarr + Disable webhook
# Set Permissions (see other app for list of permissions)
# Click on generate the private keys
# Click on Install application - choose the repository of the bot
# Go on Organisation - Secret and variables and create a secret PR_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
# Go on Organisation - Secret and variables and create a variable PR_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
#
name: Set the tag with devcamp label during the session of a devcamp
on:
pull_request_target:
types: [opened]
permissions:
pull-requests: write
issues: write
jobs:
add-label-devcamp:
runs-on: ubuntu-latest
steps:
#- name: Install GitHub CLI
# run: sudo apt-get install gh
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_SECRET_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Assign label
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
url: ${{ github.event.pull_request.html_url }}
run: |
echo "env.url=${{env.url}}"
gh pr edit "${{env.url}}" --add-label "Event: DevCamp 2025 XXX"

View File

@@ -0,0 +1,24 @@
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: "Check tag branch"
on:
push:
tags:
- "18.*"
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify tag is on main
run: |
TAG_COMMIT=$(git rev-list -n 1 $GITHUB_REF)
if ! git branch --contains $TAG_COMMIT | grep -q "18.0"; then
echo "The tag must be on branch 18.0"
exit 1
fi

View File

@@ -28,14 +28,14 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version:
php-version:
# # PHPStan requires PHP >= 7.2.
# #- "7.2"
- "8.2"
- "8.2"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout travis file
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Run .travis.yml build script
uses: ktomk/run-travis-yml@v1
with:

View File

@@ -1,4 +1,7 @@
---
# This is a basic workflow to check code with PHPSTAN tool
name: Phan
on:
# workflow called by the parent workflow ci.yml
workflow_call:
@@ -12,15 +15,15 @@ on:
concurrency:
group: phan-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
PHAN_CONFIG: dev/tools/phan/config.php
PHAN_BASELINE: dev/tools/phan/baseline.txt
PHAN_MIN_PHP: 7.0
PHAN_MIN_PHP: 7.2
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
name: phan
jobs:
phan:
name: Run phan
@@ -30,26 +33,14 @@ jobs:
github.repository == 'Dolibarr/dolibarr'
|| github.event.schedule == false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none # disable xdebug, pcov
tools: cs2pr,phan
tools: phan
- name: Run Phan analysis
run: |
# shellcheck disable=2086
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
- name: Add results to PR
if: ${{ always() }}
run: |
cs2pr --prepend-filename --prepend-source --notices-as-warnings _phan.xml
- name: Provide phan log as artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: phan-srcrt
# path: ${{ github.workspace }}/phan.log
path: ${{ github.workspace }}/_phan.xml
retention-days: 2
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=github

View File

@@ -1,6 +1,7 @@
---
# This is a basic workflow to check code with PHPSTAN tool
name: PHPStan
# Controls when the workflow will run
on:
# workflow called by the parent workflow ci.yml
@@ -13,8 +14,9 @@ on:
workflow_dispatch:
concurrency:
group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: phpstan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
@@ -35,7 +37,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/checkout@v5
# Get PHP and addons
- name: Setup PHP
id: setup-php
@@ -79,7 +81,7 @@ jobs:
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
github.run_id }}
- name: Provide phpstan log as artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
if: ${{ always() }}
with:
name: phpstan-srcrt

View File

@@ -1,5 +1,6 @@
---
name: pre-commit
on:
# workflow called by the parent workflow ci.yml
workflow_call:
@@ -16,6 +17,7 @@ concurrency:
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
jobs:
pre-commit:
runs-on: ubuntu-latest
@@ -28,7 +30,7 @@ jobs:
# if: false
# Checkout git sources to analyze
- uses: actions/checkout@v4
- uses: actions/checkout@v5
# Try to get the list of modified files into steps.changed-php.outputs.all_changed_files
#- name: Get changed files
@@ -66,7 +68,7 @@ jobs:
run: |-
[ -r requirements.txt ] || [ -r pyproject.toml ] || touch requirements.txt
# Install python and pre-commit tool
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
cache: pip
python-version: "3.11"
@@ -164,7 +166,7 @@ jobs:
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
# Upload result log files of precommit into the Artifact shared store
- name: Provide log as artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
if: ${{ ! cancelled() }}
with:
name: precommit-logs

View File

@@ -1,5 +1,6 @@
---
name: Win CI
# yamllint disable-line rule:truthy
on:
# workflow called by the parent workflow ci.yml
@@ -25,6 +26,7 @@ env:
PHP_INI_SCAN_DIR: C:\myphpini
CKEY: win-ci-2
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
jobs:
win-test:
strategy:
@@ -35,7 +37,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
@@ -57,7 +59,7 @@ jobs:
id: cache
uses: actions/cache/restore@v4
env:
HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php') }}
HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php', 'htdocs/version.inc.php') }}
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
@@ -171,7 +173,7 @@ jobs:
in: ${{ env.PHPUNIT_LOG }}
- name: Provide dolibarr and phpunit logs as artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
if: ${{ ! cancelled() }}
with:
name: win-ci-logs

1
.gitignore vendored
View File

@@ -52,6 +52,7 @@ dev/build/node_modules/
node_modules/
vendor/
php-vendor
tmp/
#yarn

View File

@@ -137,6 +137,8 @@ repos:
files: \.(php)$
args: [--standard=dev/setup/codesniffer/ruleset.xml]
- id: php-cs
exclude: |
(?x)^(htdocs/includes/.*)$
files: \.(php)$
args:
[

View File

@@ -41,10 +41,10 @@ jobs:
include:
- stage: PHP min and max
if: type = push
php: '7.1'
php: '7.2'
env:
- DB=postgresql
- TRAVIS_PHP_VERSION=7.1
- TRAVIS_PHP_VERSION=7.2
- stage: PHP min and max
if: type = pull_request OR type = push
php: '8.4'
@@ -85,6 +85,9 @@ before_install:
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo apt install unzip apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
fi
if [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
sudo apt install unzip apache2 php7.2 php7.2-cli php7.2-curl php7.2-mysql php7.2-pgsql php7.2-gd php7.2-imap php7.2-intl php7.2-ldap php7.2-xml php7.2-mbstring php7.2-xml php7.2-zip libapache2-mod-php7.2
fi
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
fi
@@ -109,8 +112,8 @@ before_install:
#ps fauxww | grep postgres
ls /etc/postgresql/13/main/
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf
sudo cat /etc/postgresql/13/main/pg_hba.conf
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
sudo cat /etc/postgresql/14/main/pg_hba.conf
sudo service postgresql restart
@@ -131,6 +134,9 @@ install:
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo update-alternatives --set php /usr/bin/php7.1
fi
if [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
sudo update-alternatives --set php /usr/bin/php7.2
fi
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo update-alternatives --set php /usr/bin/php8.1
fi
@@ -522,6 +528,9 @@ script:
php upgrade.php 21.0.0 22.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade21002200.log || cat $TRAVIS_BUILD_DIR/upgrade21002200.log
php upgrade2.php 21.0.0 22.0.0 > $TRAVIS_BUILD_DIR/upgrade21002200-2.log || cat $TRAVIS_BUILD_DIR/upgrade21002200-2.log
php step5.php 21.0.0 22.0.0 > $TRAVIS_BUILD_DIR/upgrade21002200-3.log || cat $TRAVIS_BUILD_DIR/upgrade21002200-3.log
php upgrade.php 22.0.0 23.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade22002300.log || cat $TRAVIS_BUILD_DIR/upgrade22002300.log
php upgrade2.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-2.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-2.log
php step5.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-3.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-3.log
set +e
echo

View File

@@ -44,12 +44,6 @@ source_file = htdocs/langs/en_US/blockedlog.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:bookmarks]
file_filter = htdocs/langs/<lang>/bookmarks.lang
source_file = htdocs/langs/en_US/bookmarks.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:boxes]
file_filter = htdocs/langs/<lang>/boxes.lang
source_file = htdocs/langs/en_US/boxes.lang
@@ -104,12 +98,6 @@ source_file = htdocs/langs/en_US/datapolicy.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:deliveries]
file_filter = htdocs/langs/<lang>/deliveries.lang
source_file = htdocs/langs/en_US/deliveries.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:dict]
file_filter = htdocs/langs/<lang>/dict.lang
source_file = htdocs/langs/en_US/dict.lang
@@ -146,12 +134,6 @@ source_file = htdocs/langs/en_US/exports.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:help]
file_filter = htdocs/langs/<lang>/help.lang
source_file = htdocs/langs/en_US/help.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:holiday]
file_filter = htdocs/langs/<lang>/holiday.lang
source_file = htdocs/langs/en_US/holiday.lang
@@ -284,12 +266,6 @@ source_file = htdocs/langs/en_US/partnership.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:paybox]
file_filter = htdocs/langs/<lang>/paybox.lang
source_file = htdocs/langs/en_US/paybox.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:paypal]
file_filter = htdocs/langs/<lang>/paypal.lang
source_file = htdocs/langs/en_US/paypal.lang
@@ -380,6 +356,12 @@ source_file = htdocs/langs/en_US/stripe.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:subtotals]
file_filter = htdocs/langs/<lang>/subtotals.lang
source_file = htdocs/langs/en_US/subtotals.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:supplier_proposal]
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
source_file = htdocs/langs/en_US/supplier_proposal.lang

View File

@@ -53,7 +53,7 @@ TCPDI 1.1.0 LGPL-3+ / Apache 2.0 Yes
bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
JS libraries:
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
Ace 1.43.12 BSD Yes JS library to get code syntaxique coloration in a textarea (Must take src dir into https://github.com/ajaxorg/ace-builds/).
ChartJS 3.7.1 MIT License Yes JS library for graph
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
jQuery 3.6.4 MIT License Yes JS library

View File

@@ -2,6 +2,39 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 23.0.0 compared to 22.0 *****
For users:
----------
For developers:
---------------
* Introducing the TRIGGER_PREFIX property to force developers to use unique triggerkey per business object, limit also code to business CRUD events and identity when it is not.
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The deprecated column egroupware_id has been dropped.
* The property $sumpayed (duplicated 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).
* Parameters $maxlen and $notooltip of Contract have been inverted to follow the standard. It was breaking the common use of getNomUrl() but if you were using the parameter
maxlen (rare) by using the old signature, result may be a tooltip that is no more visible on ref printed by you module.
* Removed array $MAP_ID_TO_CODE that was a duplicate of array "array_flip($categ->MAP_ID)"
* The signature of the Sale order ->cancel() method and shipment ->cancel() has been modified to introduce the $user param like for other methods that modify a status.
* Adding new document templates must be done by adding files into the mymodule/core/modules/xxx/doc directory. Adding files into custom directory with the
same path than the core path without using a mymodule directory is now forbidden.
* The directory theme/common/octicons has been removed
* The library timepicker.js has been removed. Was not used by Dolibarr.
* Because of new TRIGGER_PREFIX property triggers SUPPLIER_PRODUCT_BUYPRICE_XXX are renamed to PRODUCT_BUYPRICE_XXX.
* Function img_pdf() has been removed. Replace it with img_picto('', 'pdf.png') if you were using it.
* The method run_trigger() was deprecated 10+ years ago in favor of runTrigger(). It has been removed. Change your trigger file if you still use it.
* Property ->picto of module descriptors must contains the image extension if it is not a font awesome tag. Example: $this->picto="mymoduleimg.png";
* Stock movement API GET method output variable names have been harmonized with POST input parameter names
***** ChangeLog for 22.0.2 compared to 22.0.1 *****
@@ -63,6 +96,8 @@ FIX: Missing a column on group permissions
FIX: several minor troubles with modulebuilder
FIX: Test on mandatory product or thirdparty barcode
FIX: trigger mailmanspip when un/linking categories
FIX: Security when using Advanced Target page of emailing (feature hidden in v21, default in v22+). Possible
SQL injection by users with permission to make and send mass emailing.
***** ChangeLog for 22.0.0 compared to 21.0 *****
@@ -181,7 +216,7 @@ NEW: Add note public and private on order export
NEW: Finish dev for API_ENABLE_COUNT_CALLS (count of API use is visible on user API key field)
For developers:
----------
---------------
NEW: Add an API endpoint to get properties of a single line of an order (#34045)
NEW: add const to not include default CSS in top_htmlhead with DISABLE_CSS_DEFAULT_THEME
NEW: add const to not include default lib_head.js in top_htmlhead with DISABLE_LIB_HEAD_JS
@@ -208,7 +243,6 @@ NEW: expense report API deny
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The use of GETPOST function is not allowed inside extrafields conditions or any strings that contains dynamic code evaluated with dol_eval().
* The deprecated variable $trigger_name (duplicate of variable $triggersendname) has been removed. You must use $triggersendname everywhere now.
@@ -257,7 +291,6 @@ FIX: trigger mailmanspip when un/linking categories
SEC: Remove functions accepting callable params - Reported by phdwg1410 - CVE-2024-40137
***** ChangeLog for 21.0.2 compared to 21.0.1 *****
FIX: 21.0: $height and $width can be ints, but also 'auto' (#34636)

View File

@@ -1,9 +1,9 @@
# How to use it ?
# How to use or run Dolibarr with Docker (for a development environment) ?
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the
current workspace with Docker. This docker image is intended for **development usage**.
For a production usage you should consider official packages on https://hub.docker.com/r/dolibarr/dolibarr.
The docker-compose.yml file is a sample of a config file to use to build and run
Dolibarr in the current workspace with Docker. This docker image is intended for
**development usage**. For production usage you should consider other
contributor reference like https://hub.docker.com/r/dolibarr/dolibarr.
Before build/run, define the variable HOST_USER_ID as following:
@@ -22,18 +22,13 @@ or
docker compose -f docker-compose.yml -f postgres.yml up
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
In the case of PostgreSQL, only Dolibarr, MailDev and the PostgreSQL database
will be running.
This will run the following Docker containers : Dolibarr, MariaDB, MailDev.
In the case of PostgreSQL, only Dolibarr, MailDev and the PostgreSQL database will be running.
The URL to go to the Dolibarr is :
The URL to go to the installed Dolibarr is :
http://0.0.0.0
The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080
In Dolibarr configuration Email let PHP mail function, To see all mail send by
Dolibarr go to maildev
@@ -42,6 +37,7 @@ Dolibarr go to maildev
Setup the database connection during the installation process, please use
mariadb or postgres (name of the database container) as database host.
## Setup your custom modules
You can setup your own modules from your development folder by using volume
@@ -61,8 +57,4 @@ will automatically be synced with your development environment.
Then, you can start by extending one of the commands above, for instance for
mariadb:
docker compose \
-f docker-compose.yml \
-f postgres.yml \
-f yourmodule.yml \
up
docker compose -f docker-compose.yml -f postgres.yml -f yourmodule.yml up

View File

@@ -1,18 +1,21 @@
# How to use run Dolibarr with docker ?
# How to use or run Dolibarr with Docker ?
## For a fast run of a demo of the local version, you can build the docker image from this current repository by running
## For a fast run of a demo of the local version, you can build the docker image from the source repository by running
git clone https://github.com/Dolibarr/dolibarr.git dolibarr
cd dolibarr/docker
sudo docker-compose build
sudo docker-compose build
sudo -s
sudo -s
export HOST_USER_ID=$(id -u)
export HOST_GROUP_ID=$(id -g)
export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
docker-compose up -d
export HOST_USER_ID=$(id -u)
export HOST_GROUP_ID=$(id -g)
export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
docker-compose up -d
Warning: There is no persistency of data. This process is for dev purpose only.
@@ -20,4 +23,6 @@ Warning: There is no persistency of data. This process is for dev purpose only.
## For a more robust or a production usage
If you want to execute an official Docker package, you can find it and read the doc on ihttps://hub.docker.com/r/dolibarr/dolibarr
If you want to execute an official Docker package, you can find it and read the doc on
*https://hub.docker.com/r/dolibarr/dolibarr*

View File

@@ -3,11 +3,8 @@
DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP).
It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also all prerequisites like the web server, and the database in one auto-install process.
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
to be distributed (for Windows).
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:")
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr, or want to use Dolibarr with a different technical layer (PostgreSQL instead of MariaDB for exemple), you should not use this auto-installer assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (the .zip file).
!!! See file ../../makepack-howto.md
This directory contains files used by *makepack-dolibarr.pl* script to build DoliWamp, the all-in-one .EXE package of Dolibarr, ready to be distributed on Windows (See file ../../makepack-howto.md)
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (search line starting with "; Value OK:")

View File

@@ -49,9 +49,20 @@ $includecustom = 0;
$includeconstants = array();
$buildzip = 0;
print '***** '.$script_file.' *****'."\n";
if (empty($argv[1])) {
print "Usage: ".$script_file." release=auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=ES:CONST_XX_IS_ON includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
print "\n";
print "Generate the file filelist-x.y.z[-mybuild].xml with signature of files. ";
print "The file always includes the 3 sections:\n";
print "- dolibarr_htdocs_dir\n";
print "- dolibarr_scripts_dir\n";
print "- dolibarr_unalterable_files (only files inside the scope of the unalterable module)\n";
print "and if a specific setup/parameter need to be included into the signature for check:\n";
print "- dolibarr_constants\n";
print "\n";
exit(1);
}
@@ -68,20 +79,17 @@ while ($i < $argc) {
if (!empty($result["includecustom"])) {
$includecustom = $result["includecustom"];
}
if (!empty($result["includeconstant"])) {
$includeconstants[$i] = $result["includeconstant"];
}
if (!empty($result["buildzip"])) {
$buildzip = 1;
}
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
if (count($tmp) != 3) {
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
exit -1;
exit(1);
}
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
}
if (!empty($result["buildzip"])) {
$buildzip = 1;
}
$i++;
}
@@ -97,7 +105,7 @@ $savrelease = $release;
$tmpver = explode('-', $release, 2);
if ($tmpver[0] == 'auto') {
$release = DOL_VERSION;
if ($tmpver[1] && $tmpver[0] == 'auto') {
if (!empty($tmpver[1]) && $tmpver[0] == 'auto') {
$release .= '-'.$tmpver[1];
}
}
@@ -126,10 +134,10 @@ if (empty($includecustom)) {
}
}
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Release : ".$release."\n";
print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : ";
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Release : ".$release."\n";
print "Include custom dir in signature : ".(empty($includecustom) ? 'no' : 'yes')."\n";
print "Include constants in signature : ".(empty($includeconstants) ? 'none' : '');
foreach ($includeconstants as $countrycode => $tmp) {
foreach ($tmp as $constname => $constvalue) {
print $constname.'='.$constvalue." ";
@@ -155,9 +163,12 @@ $gitcommit = 'seetag';
$branchname = preg_replace('/^(\d+\.\d+)\..*$/', '\1', $release); // Keep only x.y into x.y.z
$fileforgit = dirname(dirname(dirname(__FILE__))).'/.git/refs/heads/'.$branchname;
print "Try to get last commit ID from file ".$fileforgit."\n";
$fileforgitcontent = file_get_contents($fileforgit);
$fileforgitcontent = '';
if (file_exists($fileforgit)) {
$fileforgitcontent = file_get_contents($fileforgit);
}
if (empty($fileforgitcontent)) {
print "Failed to get the last commit ID. Are you on the branch for the release (branch name '.$branchname.') ?\n";
print "Failed to get the last commit ID (are you on the branch for the release branch name ".$branchname." ?). We will use an empty value for gitcommit.\n";
}
$gitcommit = trim($fileforgitcontent);
@@ -180,7 +191,7 @@ fputs($fp, '<dolibarr_htdocs_dir includecustom="'.$includecustom.'">'."\n");
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|escpos-php\/example|escpos-php\/test|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';
@@ -263,82 +274,75 @@ $checksumconcat = array();
fputs($fp, '<dolibarr_unalterable_files version="'.$release.'">'."\n");
$regextoinclude = '(\.php|\.sql)$';
$regextoexclude = ''; // Exclude dirs
$files = dol_dir_list(dirname(__FILE__).'/../../htdocs/blockedlog', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
if ($newdir != $dir) {
// Array of dir/files to include in the section
$arrayofunalterablefiles = array(
array('dir' => dirname(__FILE__).'/../../htdocs/', 'file' => 'version.inc.php'),
array('dir' => dirname(__FILE__).'/../../htdocs/blockedlog', 'file' => 'all', 'regextoinclude' => '(\.php|\.sql)$', 'regextoexclude' => ''),
array('dir' => dirname(__FILE__).'/../../htdocs/install/mysql/tables', 'file' => 'all', 'regextoinclude' => 'llx_blockedlog.*(\.php|\.sql)$', 'regextoexclude' => ''),
array('dir' => dirname(__FILE__).'/../../htdocs/core/triggers', 'file' => 'interface_50_modBlockedlog_ActionsBlockedLog.class.php'),
array('dir' => dirname(__FILE__).'/../../htdocs/core/class', 'file' => 'all', 'regextoinclude' => '(interfaces.class.php|commontrigger.class.php)$', 'regextoexclude' => ''),
array('dir' => dirname(__FILE__).'/../../htdocs/takepos', 'file' => 'receipt.php')
);
foreach ($arrayofunalterablefiles as $entry) {
if ($entry['file'] == 'all') {
$regextoinclude = $entry['regextoinclude'];
$regextoexclude = $entry['regextoexclude'];
$files = dol_dir_list($entry['dir'], 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
if ($newdir != $dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
// Add the SQL file
$regextoinclude = 'llx_blockedlog.*(\.php|\.sql)$';
$regextoexclude = ''; // Exclude dirs
$files = dol_dir_list(dirname(__FILE__).'/../../htdocs/install/mysql/tables', 'files', 0, $regextoinclude, $regextoexclude, 'fullname');
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
if ($newdir != $dir) {
} else {
$file = $entry['dir'].'/'.$entry['file'];
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
if (!file_exists($file)) {
print "Error file ".$file." does not exists.";
exit(1);
}
if ($newdir != $dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
// Add the trigger file
$file = dirname(__FILE__).'/../../htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php';
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
if ($newdir != $dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
$needtoclose = 0;
}
fputs($fp, '</dolibarr_unalterable_files>'."\n");
asort($checksumconcat); // Sort list of checksum
@@ -353,22 +357,26 @@ fputs($fp, '</dolibarr_unalterable_files_checksum>'."\n\n");
fputs($fp, '</checksum_list>'."\n");
fclose($fp);
print "\n";
if (empty($buildzip)) {
print "File ".$outputfile." generated\n";
print "File ".$outputfile." generated.\n";
} else {
if ($buildzip == '1' || $buildzip == 'zip') {
$result = dol_compress_file($outputfile, $outputfile.'.zip', 'zip');
if ($result > 0) {
dol_delete_file($outputfile);
print "File ".$outputfile.".zip generated\n";
print "File ".$outputfile.".zip generated.\n";
}
} elseif ($buildzip == '2' || $buildzip == 'gz') {
$result = dol_compress_file($outputfile, $outputfile.'.gz', 'gz');
if ($result > 0) {
dol_delete_file($outputfile);
print "File ".$outputfile.".gz generated\n";
print "File ".$outputfile.".gz generated.\n";
}
}
}
print "\n";
exit(0);

View File

@@ -163,14 +163,14 @@ $BUILDROOT="$TEMP/buildroot";
# Get version $MAJOR, $MINOR and $BUILD
$result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
$result = open( IN, "<" . $SOURCE . "/htdocs/version.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/version.inc.php\n"; }
while (<IN>) {
if ( $_ =~ /define\('DOL_VERSION',\s*'([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
}
close IN;
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
if ($MINOR eq '') { die "Error can't detect version into ".$SOURCE . "/htdocs/filefunc.inc.php"; }
if ($MINOR eq '') { die "Error can't detect version into ".$SOURCE . "/htdocs/version.inc.php"; }
# Set vars for packaging
$FILENAME = "$PROJECT";
@@ -446,6 +446,15 @@ if ($nboftargetok) {
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/dev/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/dev/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
my $retcode=$?;
if ($retcode!=0)
{
print "Error running generate_filelist_xml.php please check\n";
print $ret;
print "Canceled.\n";
exit;
}
print $ret."\n";
# Copy to final dir
$NEWDESTI=$DESTI;

View File

@@ -24,10 +24,9 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
- Add path to ISCC.exe into the PATH windows var (You can do this by launching wine cmd, then regedit and add entry int `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH`)
- To manually build the .exe from Windows :
- To manually build the .exe from Windows (Note: running from makepack-dolibarr.pl script is however recommended):
Note: running from makepack-dolibarr.pl script is however recommended
open file dev/build/exe/doliwamp.iss and click on button "Compile".
Open the file dev/build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
@@ -58,7 +57,8 @@ Prerequisites to build autoexe DoliWamp package from Windows:
This section describes steps made by Dolibarr packaging team to make a beta version of Dolibarr, step by step.
- Check all files are committed.
- Check that all files on local working repository are committed.
- Update version/info in ChangeLog, for this you can:
To generate a changelog of a **major new version** x.y.0 (from a repo on branch develop), you can do
@@ -92,7 +92,7 @@ git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //
- Run `makepack-dolibarr.pl` to check the generation of all packages. No need to publish them.
- Post a news message on dolibarr.org about the freeze by cloning a past news + relay the news url on social networks
- Post a news message on dolibarr.org about the freeze by cloning a past news + relay the news url on social networks. Include the content of the previously generated ChangeLog file into the news.
- Create a branch x.y (but only when version seems stable enough).
@@ -108,18 +108,18 @@ We suppose the branch x.y has already been created during the beta (see previous
- Check there is no pending open security issue: List can be found here: https://github.com/Dolibarr/dolibarr/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Priority%20-%20Critical%20or%20Security%22
- Check all files are committed.
- Check that all files on local working repository are committed.
- Update version/info in ChangeLog, for this:
To generate a changelog of a **major new version** x.0.0 (from a repo on branch develop), you can do
To generate a changelog of a **major new version** x.0.0 (from a repo on branch develop or x.y):
```
cd ~/git/dolibarr
git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/changelogtocopy
```
To generate a changelog of a **intermediate new version** x.y.0 (from a repo on branch x.y), you can do
To generate a changelog of a **intermediate new version** x.y.0 (from a repo on branch x.y);
```
cd ~/git/dolibarr_x.y

File diff suppressed because it is too large Load Diff

View File

@@ -234,7 +234,7 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
PHP TCPDI:
----------
Add file fpdf_tpl.php 1.2
Add file fpdf_tpl.php 1.2.3
Add file tcpdi.php

View File

@@ -15,7 +15,7 @@
"npm": ">=5.6.0"
},
"dependencies": {
"zapier-platform-core": "15.0.1"
"zapier-platform-core": "17.5.0"
},
"devDependencies": {
"mocha": "^5.2.0",

View File

@@ -26,7 +26,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path = dirname(__FILE__).'/';
// Test si mode batch
$sapi_type = php_sapi_name();
@@ -41,12 +41,26 @@ require __DIR__. '/../../htdocs/master.inc.php';
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
// Global variables
$version = DOL_VERSION;
/*
* Parameters
* Main
*/
define('GEN_NUMBER_FACTURE', $argv[1] ?? 1);
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',', $argv));
if (empty($argv[1])) {
print "Usage: $script_file nbofrecord\n";
print "Usage: $script_file 100\n";
print "\n";
exit(1);
}
define('GEN_NUMBER_FACTURE', ((int) $argv[1]) ?? 1);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
@@ -100,7 +114,7 @@ $dates = array(mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 12, 13, $year),
);
$ret=$user->fetch('', 'admin');
$ret = $user->fetch('', 'admin');
if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;

View File

@@ -27,7 +27,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path = dirname(__FILE__).'/';
// Test si mode batch
$sapi_type = php_sapi_name();
@@ -47,12 +47,28 @@ include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
// Global variables
$version = DOL_VERSION;
/*
* Parameter
* Main
*/
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',', $argv));
if (empty($argv[1])) {
print "Usage: $script_file nbofrecord\n";
print "Usage: $script_file 100\n";
print "\n";
exit(1);
}
define('GEN_NUMBER_COMMANDE', ((int) $argv[1]) ?? 10);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
@@ -106,7 +122,7 @@ $dates = array(mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 12, 13, $year),
);
$ret=$user->fetch('', 'admin');
$ret = $user->fetch('', 'admin');
if ($ret <= 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;

View File

@@ -27,7 +27,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path = dirname(__FILE__).'/';
// Test si mode batch
$sapi_type = php_sapi_name();
@@ -46,15 +46,28 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
// Global variables
$version = DOL_VERSION;
/*
* Parameters
* Main
*/
define('GEN_NUMBER_PRODUIT', $argv[1] ?? 100);
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',', $argv));
if (empty($argv[1])) {
print "Usage: $script_file nbofrecord\n";
print "Usage: $script_file 100\n";
print "\n";
exit(1);
}
$ret=$user->fetch('', 'admin');
define('GEN_NUMBER_PRODUIT', ((int) $argv[1]) ?? 100);
$ret = $user->fetch('', 'admin');
if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
@@ -106,15 +119,22 @@ if ($resql) {
print "Generates ".GEN_NUMBER_PRODUIT." products\n";
for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
print "Product ".$s;
$produit = new Product($db);
$produit->type = mt_rand(0, 1);
$produit->status = 1;
$produit->status = mt_rand(0, 1);
$produit->status_buy = mt_rand(0, 1);
$produit->finished = mt_rand(0, 1);
$produit->stockable_product = mt_rand(0, 1);
$produit->ref = ($produit->type ? 'S' : 'P').time().$s;
$produit->label = 'Label '.time().$s;
$produit->description = 'Description '.time().$s;
$produit->description = 'This is a long description of '.$produit->ref;
$produit->price = mt_rand(1, 999.99);
$produit->tva_tx = "20.0";
$ret=$produit->create($user);
$ret = $produit->create($user);
if ($ret < 0) {
print "Error $ret - ".$produit->error."\n";
} else {

View File

@@ -27,7 +27,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
$path = dirname(__FILE__).'/';
// Test si mode batch
$sapi_type = php_sapi_name();
@@ -44,11 +44,27 @@ require_once DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php";
require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
// Global variables
$version = DOL_VERSION;
/*
* Parameters
* Main
*/
define('GEN_NUMBER_PROPAL', $argv[1] ?? 10);
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',', $argv));
if (empty($argv[1])) {
print "Usage: $script_file nbofrecord\n";
print "Usage: $script_file 100\n";
print "\n";
exit(1);
}
define('GEN_NUMBER_PROPAL', ((int) $argv[1]) ?? 10);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
@@ -102,7 +118,7 @@ $dates = array(mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 12, 13, $year),
);
$ret=$user->fetch('', 'admin');
$ret = $user->fetch('', 'admin');
if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;

View File

@@ -49,15 +49,29 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$listoftown = array("Auray","Baden","Vannes","Pirouville","Haguenau","Souffelweiersheim","Illkirch-Graffenstaden","Lauterbourg","Picauville","Sainte-Mère Eglise","Le Bono");
$listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Dorothee","Saby","Brigitte","Karine","Jose-Anne","Celine","Virginie");
// Global variables
$version = DOL_VERSION;
/*
* Parameter
* Main
*/
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',', $argv));
if (empty($argv[1])) {
print "Usage: $script_file nbofrecord\n";
print "Usage: $script_file 100\n";
print "\n";
exit(1);
}
define('GEN_NUMBER_SOCIETE', ((int) $argv[1]) ?? 10);
$ret=$user->fetch('', 'admin');
$ret = $user->fetch('', 'admin');
if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;

View File

@@ -41,15 +41,15 @@ require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$delimiter=',';
$enclosure='"';
$linelength=10000;
$escape='/';
$delimiter = ',';
$enclosure = '"';
$linelength = 10000;
$escape = '/';
// Global variables
$version=DOL_VERSION;
$confirmed=1;
$error=0;
$version = DOL_VERSION;
$confirmed = 1;
$error = 0;
/*
@@ -71,15 +71,15 @@ if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) |
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n";
print "\n";
exit(-1);
exit(1);
}
if (! file_exists($filepath)) {
print "Error: File ".$filepath." not found.\n";
print "\n";
exit(-1);
exit(1);
}
$ret=$user->fetch('', 'admin');
$ret = $user->fetch('', 'admin');
if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;

View File

@@ -41,15 +41,15 @@ require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$delimiter=',';
$enclosure='"';
$linelength=10000;
$escape='/';
$delimiter = ',';
$enclosure = '"';
$linelength = 10000;
$escape = '/';
// Global variables
$version=DOL_VERSION;
$confirmed=1;
$error=0;
$version = DOL_VERSION;
$confirmed = 1;
$error = 0;
/*
@@ -71,15 +71,15 @@ if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) |
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv 2 1002\n";
print "\n";
exit(-1);
exit(1);
}
if (! file_exists($filepath)) {
print "Error: File ".$filepath." not found.\n";
print "\n";
exit(-1);
exit(1);
}
$ret=$user->fetch('', 'admin');
$ret = $user->fetch('', 'admin');
if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;

View File

@@ -41,15 +41,15 @@ require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$delimiter=',';
$enclosure='"';
$linelength=10000;
$escape='/';
$delimiter = ',';
$enclosure = '"';
$linelength = 10000;
$escape = '/';
// Global variables
$version=DOL_VERSION;
$confirmed=1;
$error=0;
$version = DOL_VERSION;
$confirmed = 1;
$error = 0;
/*
@@ -71,12 +71,12 @@ if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) |
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv 2 1002\n";
print "\n";
exit(-1);
exit(1);
}
if (! file_exists($filepath)) {
print "Error: File ".$filepath." not found.\n";
print "\n";
exit(-1);
exit(1);
}
$ret=$user->fetch('', 'admin');

View File

@@ -32,7 +32,7 @@ $path=__DIR__.'/';
// Test si mode batch
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit(-1);
exit(1);
}
// Recupere root dolibarr
@@ -187,13 +187,13 @@ if (empty($mode) || ! in_array($mode, array('test','confirm'))) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option can be ".implode(',', array_keys($sqls))."\n";
exit(-1);
exit(1);
}
if (empty($option)) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option must be defined with a value in list ".implode(',', array_keys($sqls))."\n";
exit(-1);
exit(1);
}
if ($option != 'all') {
$listofoptions=explode(',', $option);
@@ -202,7 +202,7 @@ if ($option != 'all') {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option '".$cursoroption."' must be in list ".implode(',', array_keys($sqls))."\n";
exit(-1);
exit(1);
}
}
}
@@ -211,7 +211,7 @@ if (empty($date) || (! preg_match('/\d\d\d\d\-\d\d\-\d\d$/', $date) && $date !=
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "date can be 'all' or 'YYYY-MM-DD' to delete record before YYYY-MM-DD\n";
exit(-1);
exit(1);
}
if ($date == 'all') {

View File

@@ -84,7 +84,7 @@ if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile
print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n";
print "Return code: 0 if success, <>0 if error\n";
print "Warning, this script may take a long time.\n";
exit(-1);
exit(1);
}
@@ -106,7 +106,7 @@ $connection = ssh2_connect($server, 22);
if ($connection) {
if (!@ssh2_auth_password($connection, $login, $password)) {
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR);
exit(-5);
exit(5);
} else {
//$stream = ssh2_exec($connection, '/usr/bin/php -i');
/*
@@ -143,7 +143,7 @@ if ($connection) {
}
} else {
print 'Failed to connect to ssh2 to '.$server;
exit(-6);
exit(6);
}

View File

@@ -72,7 +72,7 @@ print "Update dates to current year for database name = ".$db->database_name."\n
if (empty($confirm)) {
print "Usage: $script_file confirm\n";
print "Return code: 0 if success, <>0 if error\n";
exit(-1);
exit(1);
}

View File

@@ -2,33 +2,33 @@
#php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
#php_admin_value mail.force_extra_parameters "-f postmaster@mydomain.com"
#php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f postmaster@mydomain.com"
php_admin_value open_basedir /tmp/:/home/.../htdocs:/home/.../dolibarr_documents:
# Add this to use a custom apparmor profile when using apache php handler
<IfModule mod_apparmor.c>
AADefaultHatName sellyoursaas-instances
</IfModule>
# The URLs of the web site
ServerName myvirtualalias
ServerAlias myvirtualalias
UseCanonicalName On
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 20
AddDefaultCharset UTF-8
# Detect if we are using DoliDroid
#SetEnvIf User-Agent DoliDroid dolidroid
# The directory and permissions for the web site
DocumentRoot "/home/.../htdocs"
<Directory /home/.../htdocs/>
@@ -36,24 +36,19 @@
Options -Indexes -MultiViews +FollowSymLinks -ExecCGI
Require all granted
# To restrict access by a HTTP basic auth
# To restrict access by a HTTP basic auth
#AuthType Basic
#AuthName "Authenticate to backoffice"
#AuthUserFile /etc/apache2/.htpasswd
#require valid-user
</Directory>
# Leaving /public and /api, /dav, .well_known but also wrappers for document, viewimage and public json/img accessible to everyone
# Leaving /public, /dav and /.well_known directory accessible to everyone
<Directory /home/admin/wwwroot/dolibarr/htdocs/public/>
AuthType None
Satisfy any
Require all granted
</Directory>
<Directory /home/admin/wwwroot/dolibarr/htdocs/api/>
AuthType None
Satisfy any
Require all granted
</Directory>
<Directory /home/admin/wwwroot/dolibarr/htdocs/dav/>
AuthType None
Satisfy any
@@ -64,6 +59,14 @@
Satisfy any
Require all granted
</Directory>
# You may also want to allow access to everyone to wrappers for api, document, viewimage, manifest and public json/img
# but if you can avoid it, it is better.
<Files /home/admin/wwwroot/dolibarr/htdocs/api/index.php>
AuthType None
Satisfy any
Require all granted
</Files>
<Files ~ "(document\.php|viewimage\.php|\.js\.php|\.json\.php|\.js|\.css\.php|\.css|\.gif|\.png|\.svg|\.woff2|favicon\.ico)$">
AuthType None
Satisfy any
@@ -71,11 +74,11 @@
</Files>
# Log directives
# Log directives
ErrorLog /var/log/apache2/myvirtualalias_error_log
TransferLog /var/log/apache2/myvirtualalias_access_log
# Compress is done on resources of type php pages, text file export, css and javascript
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
AddType text/javascript .jgz
@@ -92,21 +95,21 @@
ExpiresByType text/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/javascript A2592000
# To enable the SSL if the certificate file exists
<IfFile "/etc/letsencrypt/live/www.mydomain.com/cert.pem">
SSLEngine On
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem
#RewriteEngine on
#RewriteCond %{SERVER_PORT} ^80$
#RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
</IfFile>
</VirtualHost>

View File

@@ -28,8 +28,15 @@
<rule ref="Internal.NoCodeFound" />
<!-- Rules from Generic Standard -->
<!--
<rule ref="PSR12.Files.OpenTag">
<properties>
<property name="ignoreIndent" value="true"/>
</properties>
</rule>
<exclude name="PSR12.WhiteSpace.ScopeIndent"/>
-->
<!-- We want to allow empty statement: It allows to put some code comments into the else for examples -->
<rule ref="Generic.CodeAnalysis.EmptyStatement">

5
dev/setup/git/README.md Normal file
View File

@@ -0,0 +1,5 @@
To enable a default git commit template:
git config --local commit.template gitmessage
To enable the git hook pre-commit, to make CI validation at commit:
See the file pre-commit/README.md

12
dev/setup/git/hooks/msg-commit Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
# Hook to force a prefix on commits
commit_msg_file=$1
first_line=$(head -n1 "$commit_msg_file")
if echo "$first_line" | grep -Eqi '^(QUAL|SEC|PERF|FIX|CLOSE|NEW|Clean code|Debug[CSS)'; then
exit 0
else
echo "The commit message must start with QUAL, SEC, PERF, FIX, CLOSE, NEW, Clean code, Debug, CSS ..."
exit 1
fi

View File

@@ -12,10 +12,10 @@ HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" 1>&2
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" 1>&2
elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}" 1>&2
exec pre-commit "${ARGS[@]}" 1>&2
else
echo 'pre-commit not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
echo 'pre-commit not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
fi

View File

@@ -0,0 +1,12 @@
# Example of logrotate file to put into /etc/logrotate.d to make the rotation of
# the dolibarr log files.
/home/admin/wwwroot/dolibarr_documents/*.log {
su admin www-data
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 660 admin www-data
}

View File

@@ -44,10 +44,10 @@ function save_db_cache() (
# DETERMINE VERSION
cd "${TRAVIS_BUILD_DIR}/htdocs/install" || exit 1
# Get the target version from the filefunc.inc.php file
target_version=$(sed -n "s/.*define('DOL_VERSION',[[:space:]]*'\\([0-9.]*\\).*/\\1/p" ../filefunc.inc.php) ; echo $target_version
# Get the target version from the version.inc.php file
target_version=$(sed -n "s/.*define('DOL_VERSION',[[:space:]]*'\\([0-9.]*\\).*/\\1/p" ../version.inc.php) ; echo $target_version
# Default in case that failed
target_version=${target_version:=20.0.0}
target_version=${target_version:=22.0.0}
# Sequence of versions for upgrade process (to be completed)
VERSIONS=("3.5.0" "3.6.0" "3.7.0" "3.8.0" "3.9.0")

View File

@@ -0,0 +1,33 @@
README (English)
--------------------------------
##############
RapidAPI
##############
RapidAPI for Mac is a full-featured HTTP client that let's you test and describe the APIs you build or consume.
It has a beautiful native macOS interface to compose requests, inspect server responses, generate client code and export API definitions.
https://paw.cloud/
@@@
(@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@%
@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,
@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
(@@@@@@( @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@* @@@@@@@@@@@. /@@@@@@@@@@@@@@@@@(
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@* @@@@@@@@@@@. @@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ /@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@# @@@@@@@@@@@ @@@@@@@@@@@@&
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ &@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ &@@@@@@@@@@@@@@@@@@@@/
@@@@@@@@@@@@@@@@@@@@@@@@@@& .@@@@@@@@@@@ &@@@@@@@@@@@@@@@@@@/
(@@@@@@@@@@@@@@@@@@@@@@@ .@@@@@@@@@@@ &@@@@@@@@@@@@@@@(
@@@@@ @@@@@ .@@@@@@@@@@@ @@@@@@@@@@@*

View File

@@ -124,28 +124,28 @@ $urlgit = 'https://github.com/Dolibarr/dolibarr/blob/develop/';
$output_arrproj = array();
$output_arrdep = array();
if ($dirscc != 'disabled') {
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/includes,htdocs/custom,htdocs/theme/common/fontawesome-5,htdocs/theme/common/octicons';
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/custom,htdocs/includes,htdocs/public/includes,htdocs/theme/common/fontawesome-5,htdocs/public/theme/common/fontawesome-5 --cocomo-project-type semi-detached';
print 'Execute SCC to count lines of code in project: '.$commandcheck."\n";
$resexecproj = 0;
exec($commandcheck, $output_arrproj, $resexecproj);
// Count lines of code of dependencies
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/theme/common/fontawesome-5 htdocs/theme/common/octicons';
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/public/includes htdocs/theme/common/fontawesome-5 htdocs/public/theme/common/fontawesome-5 --cocomo-project-type semi-detached';
print 'Execute SCC to count lines of code in dependencies: '.$commandcheck."\n";
$resexecdep = 0;
exec($commandcheck, $output_arrdep, $resexecdep);
}
// Get technical debt with PHPStan
$output_arrtd = array();
$output_arrver = array();
if ($dirphpstan != 'disabled') {
$commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --version';
print 'Execute PHPStan to get the version: '.$commandcheck."\n";
$resexectd = 0;
exec($commandcheck, $output_arrtd, $resexectd);
$resexecver = 0;
exec($commandcheck, $output_arrver, $resexecver);
}
$phpstanversion = $output_arrtd[0];
$phpstanversion = $output_arrver[0];
$output_arrtd = array();
if ($dirphpstan != 'disabled') {
@@ -156,6 +156,15 @@ if ($dirphpstan != 'disabled') {
}
// Get technical debt with Phan
$output_arrverphan = array();
if ($dirphpstan != 'disabled') {
$commandcheck = ($dir_phan ? $dir_phan.DIRECTORY_SEPARATOR : '') .'phan --version';
print 'Execute Phan to get the version: '.$commandcheck."\n";
$resexecverphan = 0;
exec($commandcheck, $output_arrverphan, $resexecverphan);
}
$phpphanversion = $output_arrverphan[0];
$output_phan_json = array();
$res_exec_phan = 0;
if ($dir_phan != 'disabled') {
@@ -212,13 +221,13 @@ foreach (array('proj', 'dep') as $source) {
$arrayofmetrics[$source]['Bytes'] = $reg[1];
}
if (preg_match('/^(.*)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$/', $line, $reg)) {
$arrayoflineofcode[$source][$reg[1]]['Files'] = $reg[2];
$arrayoflineofcode[$source][$reg[1]]['Lines'] = $reg[3];
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = $reg[4];
$arrayoflineofcode[$source][$reg[1]]['Comments'] = $reg[5];
$arrayoflineofcode[$source][$reg[1]]['Code'] = $reg[6];
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = $reg[7];
if (preg_match('/^(.*)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)$/', $line, $reg)) {
$arrayoflineofcode[$source][$reg[1]]['Files'] = str_replace(array(',', ' '), array('', ''), $reg[2]);
$arrayoflineofcode[$source][$reg[1]]['Lines'] = str_replace(array(',', ' '), array('', ''), $reg[3]);
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = str_replace(array(',', ' '), array('', ''), $reg[4]);
$arrayoflineofcode[$source][$reg[1]]['Comments'] = str_replace(array(',', ' '), array('', ''), $reg[5]);
$arrayoflineofcode[$source][$reg[1]]['Code'] = str_replace(array(',', ' '), array('', ''), $reg[6]);
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = str_replace(array(',', ' '), array('', ''), $reg[7]);
}
}
@@ -245,19 +254,20 @@ foreach (array('proj', 'dep') as $source) {
}
// Get stats on nb of commits
/*
$nbofmonth = 2;
$delay = (3600 * 24 * 30 * $nbofmonth);
// Get stats on nb of commits
$commandcheck = "git log --all --shortstat --no-renames --no-merges --use-mailmap --pretty=".escapeshellarg('format:%cI;%H;%aN;%aE;%ce;%s')." --since=".dol_print_date(dol_now() - $delay, '%Y-%m-%d'); // --since= --until=...
print 'Execute git log to get list of commits: '.$commandcheck."\n";
$output_arrglpu = array();
$resexecglpu = 0;
//exec($commandcheck, $output_arrglpu, $resexecglpu);
*/
// Get git information for security alerts
$nbofmonth = 3;
$nbofmonth = 6;
$delay = (3600 * 24 * 30 * $nbofmonth);
$arrayofalerts = array();
@@ -266,14 +276,14 @@ print 'Execute git log to get commits related to security: '.$commandcheck."\n";
$output_arrglpu = array();
$resexecglpu = 0;
exec($commandcheck, $output_arrglpu, $resexecglpu);
foreach ($output_arrglpu as $val) {
foreach ($output_arrglpu as $valgitlog) { // The most recent lines are first.
// Parse the line to split interesting data
$tmpval = cleanVal2($val);
$tmpval = cleanVal2($valgitlog);
if (preg_match('/(#yogosha|CVE|Sec:|Sec\s|Sec$)/i', $tmpval['title'])) { // Recommended git comment: "Sec: Fix #..."
if (preg_match('/(#yogosha|CVE[\s\-]*\d|Sec:|Sec\s|Sec$)/i', $tmpval['title'])) { // Recommended git comment: "Sec: Fix #..."
$alreadyfound = '';
$alreadyfoundcommitid = '';
foreach ($arrayofalerts as $val) {
foreach ($arrayofalerts as $val) { // Loop on already found alerts
if ($val['issueidyogosha'] && $val['issueidyogosha'] == $tmpval['issueidyogosha']) { // Already in list
$alreadyfound = 'yogosha';
$alreadyfoundcommitid = $val['commitid'];
@@ -289,7 +299,9 @@ foreach ($output_arrglpu as $val) {
$alreadyfoundcommitid = $val['commitid'];
break;
}
if ($val['title'] && $val['title'] == $tmpval['title']) { // Already in list
if ($val['title'] && $tmpval['title'] &&
(strpos($val['title'], $tmpval['title']) === 0 || strpos($val['title'], $tmpval['title']) > 0
|| strpos($tmpval['title'], $val['title']) === 0 || strpos($tmpval['title'], $val['title']) > 0)) { // Already in list
$alreadyfound = 'title';
$alreadyfoundcommitid = $val['commitid'];
break;
@@ -337,70 +349,22 @@ foreach ($output_arrglpu as $val) {
/*var_dump($tmpval['commitid'].' '.$alreadyfoundcommitid);
var_dump($arrayofalerts[$alreadyfoundcommitid]['branch']);
var_dump($tmpval);*/
$arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; // Concat the new commitid to the list of commitidbis array of the already found case.
if (empty($arrayofalerts[$alreadyfoundcommitid]['issueid']) && !empty($tmpval['issueid'])) { // If not Github was defined, we set it.
$arrayofalerts[$alreadyfoundcommitid]['issueid'] = $tmpval['issueid'];
}
if ($arrayofalerts[$alreadyfoundcommitid]['title'] != $tmpval['title']) { // Concat label of the new line to the already found one (if it differs)
$arrayofalerts[$alreadyfoundcommitid]['title'] .= ', '.preg_replace('/\.$/', '', $tmpval['title']);
}
$arrayofalerts[$alreadyfoundcommitid]['branch'] = array_merge($arrayofalerts[$alreadyfoundcommitid]['branch'], $tmpval['branch']);
$arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid'];
}
}
}
/*
//$urlgit = 'https://api.github.com/search/issues?q=is:pr+repo:Dolibarr/dolibarr+created:>'.dol_print_date(dol_now() - $delay, "%Y-%m");
$urlgit = 'https://api.github.com/search/commits?q=repo:Dolibarr/dolibarr+yogosha+created:>'.dol_print_date(dol_now() - $delay, "%Y-%m");
// Count lines of code of application
$newurl = $urlgit.'+CVE';
$result = getURLContent($newurl);
print 'Execute GET on github for '.$newurl."\n";
if ($result && $result['http_code'] == 200) {
$arrayofalerts1 = json_decode($result['content']);
foreach ($arrayofalerts1->items as $val) {
$tmpval = cleanVal($val);
if (preg_match('/CVE/i', $tmpval['title'])) {
$arrayofalerts[$tmpval['number']] = $tmpval;
}
}
} else {
print 'Error: failed to get github response';
exit(-1);
}
$newurl = $urlgit.'+yogosha';
$result = getURLContent($newurl);
print 'Execute GET on github for '.$newurl."\n";
if ($result && $result['http_code'] == 200) {
$arrayofalerts2 = json_decode($result['content']);
foreach ($arrayofalerts2->items as $val) {
$tmpval = cleanVal($val);
if (preg_match('/yogosha:/i', $tmpval['title'])) {
$arrayofalerts[$tmpval['number']] = $tmpval;
}
}
} else {
print 'Error: failed to get github response';
exit(-1);
}
$newurl = $urlgit.'+Sec:';
$result = getURLContent($newurl);
print 'Execute GET on github for '.$newurl."\n";
if ($result && $result['http_code'] == 200) {
$arrayofalerts3 = json_decode($result['content']);
foreach ($arrayofalerts3->items as $val) {
$tmpval = cleanVal($val);
if (preg_match('/Sec:/i', $tmpval['title'])) {
$arrayofalerts[$tmpval['number']] = $tmpval;
}
}
} else {
print 'Error: failed to get github response';
exit(-1);
}
*/
$timeend = time();
@@ -724,12 +688,6 @@ $html .= <<<END
END;
$html .= '<!-- ';
foreach ($output_arrglpu as $line) {
$html .= $line."\n";
}
$html .= ' -->';
$html .= '</div>';
$html .= '</section>'."\n";
@@ -784,19 +742,19 @@ $html .= '</div>';
$html .= '</section>'."\n";
// Project value
// Project value (COCOMO Model, use Basic / Semi-detached
$html .= '<section class="chapter" id="projectvalue">'."\n";
$html .= '<h2><span class="fas fa-dollar-sign pictofixedwidth"></span>Project value</h2>'."\n";
$html .= '<div class="boxallwidth">'."\n";
$html .= '<div class="box inline-box back1">';
$html .= 'COCOMO value<br><span class="small opacitymedium">(Basic organic model)</span><br>';
$html .= 'COCOMO value<br><span class="small opacitymedium">(Basic/Semi-detached model)</span><br>';
$html .= '<b>$'.formatNumber((empty($arraycocomo['proj']['currency']) ? 0 : $arraycocomo['proj']['currency']) + (empty($arraycocomo['dep']['currency']) ? 0 : $arraycocomo['dep']['currency']), 2).'</b>';
$html .= '</div>';
if (array_key_exists('proj', $arraycocomo)) {
$html .= '<div class="box inline-box back2">';
$html .= 'COCOMO effort<br><span class="small opacitymedium">(Basic organic model)</span><br>';
$html .= 'COCOMO effort<br><span class="small opacitymedium">(Basic/Semi-detached model)</span><br>';
$html .= '<b>'.formatNumber($arraycocomo['proj']['people'] * $arraycocomo['proj']['effort'] + $arraycocomo['dep']['people'] * $arraycocomo['dep']['effort']);
$html .= ' months people</b>';
$html .= '</div>';
@@ -877,7 +835,7 @@ if (count($output_phan_json) != 0) {
$title_security_short = "Last security issues";
$title_security = ($project ? "[".$project."] " : "").$title_security_short;
$html .= '<section class="chapter" id="linesofcode">'."\n";
$html .= '<section class="chapter" id="securityalerts">'."\n";
$html .= '<h2><span class="fas fa-code pictofixedwidth"></span>'.$title_security_short.' <span class="opacitymedium">(last '.($nbofmonth != 1 ? $nbofmonth.' months' : 'month').')</span></h2>'."\n";
$html .= '<div class="boxallwidth">'."\n";
@@ -953,7 +911,7 @@ foreach ($arrayofalerts as $key => $alert) {
}
$html .= '</td>';
// Description
// Title - Description
$html .= '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($alert['title']).'">'.dol_escape_htmltag($alert['title']).'</td>';
// Branches
@@ -974,7 +932,7 @@ $html .= '</div>';
$html .= '</div>';
$html .= '<br>';
$html .= 'Note:Search is done in git repository on regexstring #yogosha|CVE|Sec:|Sec\s<br>';
$html .= 'Note:Search is done in git repository on regex string "#yogosha|CVE[\s\-]*\d|Sec:|Sec\s" (not case sensitive)<br>';
$html .= 'You can use this URL for RSS notifications: <a href="/'.$outputfilerss.'">'.$outputfilerss.'</a><br><br>';
$html .= '</section>';
@@ -1082,7 +1040,7 @@ if ($dir_phan != 'disabled') {
]});
';
$html .= '<section class="chapter" id="technicaldebtphan">'."\n";
$html .= '<h2><span class="fas fa-book-dead pictofixedwidth"></span>Technical debt <span class="opacitymedium">(PHAN '.$phan_nblines.' warnings)</span></h2>'."\n";
$html .= '<h2><span class="fas fa-book-dead pictofixedwidth"></span>Technical debt <span class="opacitymedium">('.$phpphanversion.' -> '.$phan_nblines.' warnings)</span></h2>'."\n";
$html .= '<div class="boxallwidth">'."\n";
$html .= '<div class="div-table-responsive">'."\n";
@@ -1179,7 +1137,7 @@ function cleanVal2($val)
$tmpval['issueid'] = '';
$tmpval['issueidyogosha'] = '';
$tmpval['issueidcve'] = '';
$tmpval['title'] = array_key_exists(5, $tmp) ? $tmp[5] : '';
$tmpval['title'] = array_key_exists(5, $tmp) ? preg_replace('/\.$/', '', $tmp[5]) : '';
$tmpval['created_at'] = array_key_exists(0, $tmp) ? $tmp[0] : '';
$tmpval['updated_at'] = '';
@@ -1188,7 +1146,7 @@ function cleanVal2($val)
$tmpval['issueid'] = $reg[1];
}
if (preg_match('/CVE([0-9\-\s]+)/', $tmpval['title'], $reg)) {
$tmpval['issueidcve'] = preg_replace('/^\-/', '', trim($reg[1]));
$tmpval['issueidcve'] = preg_replace('/^\-/', '', preg_replace('/\s+/', '-', trim($reg[1])));
}
if (preg_match('/#yogosha(\d+)/i', $tmpval['title'], $reg)) {
$tmpval['issueidyogosha'] = $reg[1];

View File

@@ -13,7 +13,7 @@ zar
# Need as part of some PHP keys for some array variables
referer
# Name of contributores
# Name of contributors
noe
udo
tim
@@ -90,7 +90,7 @@ espace
methode
datee
# Some string found because it is part text that is html entities escaped into files
# Some string found because it is part of text that is html entities escaped into files
tre
activ

View File

@@ -32,8 +32,8 @@ fi
# Determine release to check
Releases=("3.9" "4.0" "5.0" "6.0" "7.0" "8.0" "9.0" "10.0" "11.0" "12.0" "13.0" "14.0" "15.0" "16.0" "17.0" "18.0" "19.0" "20.0")
target_version=$(sed -n "s/.*define('DOL_VERSION',[[:space:]]*'\\([0-9]*\\.[0-9]*\\).*/\\1/p" htdocs/filefunc.inc.php)
Releases=("3.9" "4.0" "5.0" "6.0" "7.0" "8.0" "9.0" "10.0" "11.0" "12.0" "13.0" "14.0" "15.0" "16.0" "17.0" "18.0" "19.0" "20.0" "21.0" "22.0")
target_version=$(sed -n "s/.*define('DOL_VERSION',[[:space:]]*'\\([0-9]*\\.[0-9]*\\).*/\\1/p" htdocs/version.inc.php)
# Default target version in case getting it from filefunc.inc failed
target_version=${target_version:=20.0}

View File

@@ -9,66 +9,39 @@
*/
return [
// # Issue statistics:
// PhanUndeclaredProperty : 440+ occurrences
// PhanUndeclaredProperty : 420+ occurrences
// PhanTypeMismatchProperty : 100+ occurrences
// PhanUndeclaredGlobalVariable : 90+ occurrences
// PhanTypeMismatchArgument : 85+ occurrences
// PhanTypeMismatchArgumentNullable : 30+ occurrences
// PhanTypeExpectedObjectPropAccess : 20+ occurrences
// PhanTypeInvalidDimOffset : 20+ occurrences
// PhanTypeMismatchDimFetch : 15+ occurrences
// PhanUndeclaredConstant : 15+ occurrences
// PhanTypeMismatchArgumentProbablyReal : 9 occurrences
// PhanUndeclaredMethod : 9 occurrences
// PhanPossiblyUndeclaredGlobalVariable : 6 occurrences
// PhanTypeArraySuspiciousNull : 6 occurrences
// PhanTypeComparisonFromArray : 6 occurrences
// PhanPluginUndeclaredVariableIsset : 5 occurrences
// PhanParamTooMany : 4 occurrences
// PhanTypeMismatchArgument : 65+ occurrences
// PhanUndeclaredGlobalVariable : 60+ occurrences
// PhanTypeMismatchArgumentNullable : 20+ occurrences
// PhanTypeInvalidDimOffset : 15+ occurrences
// PhanTypeMismatchDimFetch : 10+ occurrences
// PhanUndeclaredMethod : 7 occurrences
// PhanTypeArraySuspiciousNull : 5 occurrences
// PhanTypeExpectedObjectPropAccess : 5 occurrences
// PhanPluginDuplicateArrayKey : 4 occurrences
// PhanPluginDuplicateExpressionBinaryOp : 4 occurrences
// PhanTypeMismatchDimAssignment : 2 occurrences
// PhanTypeMismatchReturn : 2 occurrences
// PhanTypeSuspiciousStringExpression : 2 occurrences
// PhanPluginUndeclaredVariableIsset : 2 occurrences
// PhanPossiblyUndeclaredGlobalVariable : 2 occurrences
// PhanTypeMismatchArgumentProbablyReal : 2 occurrences
// PhanParamTooMany : 1 occurrence
// PhanPossiblyUndeclaredVariable : 1 occurrence
// PhanTypeExpectedObjectPropAccessButGotNull : 1 occurrence
// PhanTypeMismatchArgumentNullableInternal : 1 occurrence
// PhanTypeMismatchReturn : 1 occurrence
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/api/class/api_setup.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchReturn'],
'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeInvalidDimOffset'],
'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanTypeInvalidDimOffset'],
'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'],
'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/bom/bom_card.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
'htdocs/bom/tpl/objectline_create.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/bookcal/availabilities_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/bookcal/calendar_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
'htdocs/categories/viewcat.php' => ['PhanUndeclaredProperty'],
'htdocs/collab/index.php' => ['PhanUndeclaredProperty'],
'htdocs/comm/action/index.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'],
'htdocs/comm/action/pertype.php' => ['PhanTypeComparisonFromArray', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchDimFetch'],
'htdocs/comm/action/peruser.php' => ['PhanTypeComparisonFromArray', 'PhanTypeMismatchArgument'],
'htdocs/comm/action/pertype.php' => ['PhanTypeExpectedObjectPropAccess'],
'htdocs/comm/action/peruser.php' => ['PhanTypeMismatchArgument'],
'htdocs/comm/card.php' => ['PhanTypeMismatchArgument'],
'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'],
'htdocs/comm/mailing/targetemailing.php' => ['PhanUndeclaredProperty'],
'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'],
'htdocs/comm/propal/list.php' => ['PhanUndeclaredProperty'],
'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/commande/class/api_orders.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/commande/class/commande.class.php' => ['PhanUndeclaredProperty'],
'htdocs/commande/customer.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/commande/list.php' => ['PhanUndeclaredProperty'],
'htdocs/commande/list_det.php' => ['PhanTypeInvalidDimOffset'],
'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/compta/bank/class/account.class.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/bank/class/paymentvarious.class.php' => ['PhanTypeMismatchArgument'],
@@ -76,16 +49,12 @@ return [
'htdocs/compta/bank/various_payment/card.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/bank/various_payment/document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/compta/bank/various_payment/info.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/compta/clients.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/compta/facture/card-rec.php' => ['PhanTypeMismatchArgument'],
'htdocs/compta/facture/card.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/localtax/card.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/compta/localtax/clients.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgument'],
'htdocs/compta/localtax/index.php' => ['PhanTypeMismatchArgument'],
'htdocs/compta/localtax/list.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/compta/paiement/card.php' => ['PhanUndeclaredProperty'],
@@ -99,26 +68,24 @@ return [
'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/tva/clients.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument'],
'htdocs/compta/tva/index.php' => ['PhanTypeMismatchArgument'],
'htdocs/compta/tva/quadri_detail.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument'],
'htdocs/contrat/card.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
'htdocs/compta/tva/quadri_detail.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanUndeclaredProperty'],
'htdocs/core/actions_massactions.inc.php' => ['PhanUndeclaredProperty'],
'htdocs/core/actions_sendmails.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/core/actions_sendmails.inc.php' => ['PhanUndeclaredProperty'],
'htdocs/core/ajax/ajaxdirtree.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
'htdocs/core/ajax/selectobject.php' => ['PhanTypeMismatchArgumentNullable'],
'htdocs/core/class/CMailFile.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/class/canvas.class.php' => ['PhanParamTooMany', 'PhanUndeclaredMethod'],
'htdocs/core/class/canvas.class.php' => ['PhanUndeclaredMethod'],
'htdocs/core/class/ccountry.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/cgenericdic.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/conf.class.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'],
'htdocs/core/class/conf.class.php' => ['PhanTypeMismatchProperty'],
'htdocs/core/class/ctyperesource.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/dolgraph.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/emailsenderprofile.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/extrafields.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/class/html.formcompany.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/html.formfile.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/class/html.formmail.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/class/openid.class.php' => ['PhanTypeMismatchArgument'],
@@ -128,16 +95,13 @@ return [
'htdocs/core/lib/company.lib.php' => ['PhanTypeMismatchArgumentNullable'],
'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'],
'htdocs/core/lib/functions2.lib.php' => ['PhanUndeclaredProperty'],
'htdocs/core/lib/pdf.lib.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
'htdocs/core/lib/pdf.lib.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
'htdocs/core/lib/product.lib.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/lib/project.lib.php' => ['PhanUndeclaredProperty'],
'htdocs/core/lib/xcal.lib.php' => ['PhanUndeclaredProperty'],
'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
@@ -155,7 +119,7 @@ return [
'htdocs/core/modules/holiday/mod_holiday_immaculate.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchProperty'],
'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanTypeMismatchProperty'],
'htdocs/core/modules/member/modules_cards.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanUndeclaredProperty'],
@@ -174,7 +138,6 @@ return [
'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanPluginDuplicateArrayKey'],
'htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php' => ['PhanTypeMismatchArgumentNullable'],
'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanUndeclaredProperty'],
'htdocs/core/multicompany_page.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanUndeclaredProperty'],
@@ -185,14 +148,7 @@ return [
'htdocs/core/tpl/resource_view.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanUndeclaredProperty'],
'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'],
'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'],
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
'htdocs/don/document.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/don/info.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/don/list.php' => ['PhanTypeMismatchProperty'],
'htdocs/don/note.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'],
'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgument'],
@@ -200,19 +156,14 @@ return [
'htdocs/expedition/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/expedition/class/expedition.class.php' => ['PhanUndeclaredProperty'],
'htdocs/expensereport/card.php' => ['PhanUndeclaredProperty'],
'htdocs/expensereport/class/expensereport.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
'htdocs/expensereport/payment/card.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/expensereport/class/expensereport.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fichinter/card-rec.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fichinter/class/api_interventions.class.php' => ['PhanUndeclaredProperty'],
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'],
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/filefunc.inc.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanUndeclaredProperty'],
'htdocs/fourn/commande/card.php' => ['PhanTypeMismatchDimAssignment', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredProperty'],
'htdocs/fourn/commande/card.php' => ['PhanUndeclaredProperty'],
'htdocs/fourn/facture/card-rec.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/fourn/facture/card.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'],
'htdocs/fourn/facture/rapport.php' => ['PhanTypeMismatchArgument'],
@@ -220,7 +171,6 @@ return [
'htdocs/holiday/card_group.php' => ['PhanTypeMismatchArgument'],
'htdocs/holiday/list.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/hrm/class/evaluation.class.php' => ['PhanUndeclaredProperty'],
'htdocs/hrm/class/evaluationdet.class.php' => ['PhanUndeclaredProperty'],
'htdocs/hrm/class/job.class.php' => ['PhanUndeclaredProperty'],
'htdocs/hrm/class/position.class.php' => ['PhanUndeclaredProperty'],
'htdocs/hrm/class/skill.class.php' => ['PhanUndeclaredProperty'],
@@ -237,7 +187,6 @@ return [
'htdocs/loan/document.php' => ['PhanUndeclaredProperty'],
'htdocs/loan/note.php' => ['PhanUndeclaredProperty'],
'htdocs/loan/payment/payment.php' => ['PhanUndeclaredProperty'],
'htdocs/mrp/class/mo.class.php' => ['PhanTypeMismatchProperty'],
'htdocs/mrp/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/multicurrency/class/api_multicurrencies.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/multicurrency/class/multicurrency.class.php' => ['PhanTypeExpectedObjectPropAccess'],
@@ -254,8 +203,7 @@ return [
'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'],
'htdocs/product/stock/info.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/list.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/product/stock/movement_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/product/stock/movement_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredProperty'],
'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/stats/expedition.php' => ['PhanUndeclaredProperty'],
@@ -263,16 +211,12 @@ return [
'htdocs/product/stock/stats/reception.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/projet/admin/project.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/projet/card.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/projet/tasks.php' => ['PhanTypeMismatchArgument'],
'htdocs/projet/tasks/time.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'],
'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/public/eventorganization/subscriptionok.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/members/new.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/payment/newpayment.php' => ['PhanUndeclaredProperty'],
'htdocs/public/payment/paymentok.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/project/suggestbooth.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/suggestconference.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/viewandvote.php' => ['PhanUndeclaredGlobalVariable'],
@@ -280,7 +224,7 @@ return [
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/reception/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/reception/class/reception.class.php' => ['PhanUndeclaredProperty'],
'htdocs/reception/list.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
'htdocs/reception/list.php' => ['PhanUndeclaredProperty'],
'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanUndeclaredProperty'],
'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanUndeclaredProperty'],
'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanUndeclaredProperty'],
@@ -293,7 +237,7 @@ return [
'htdocs/recruitment/recruitmentjobposition_card.php' => ['PhanUndeclaredProperty'],
'htdocs/recruitment/recruitmentjobposition_document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/salaries/paiement_salary.php' => ['PhanUndeclaredProperty'],
'htdocs/salaries/payment_salary.php' => ['PhanUndeclaredProperty'],
'htdocs/salaries/virement_request.php' => ['PhanUndeclaredProperty'],
'htdocs/societe/ajax/company.php' => ['PhanUndeclaredProperty'],
'htdocs/societe/class/societe.class.php' => ['PhanTypeMismatchProperty'],
@@ -301,7 +245,6 @@ return [
'htdocs/supplier_proposal/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanUndeclaredProperty'],
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanUndeclaredProperty'],
'htdocs/takepos/index.php' => ['PhanPluginUndeclaredVariableIsset'],
'htdocs/takepos/invoice.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset'],
'htdocs/ticket/card.php' => ['PhanUndeclaredProperty'],
@@ -319,19 +262,7 @@ return [
'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanUndeclaredProperty'],
'htdocs/webportal/class/webportalpropal.class.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_actioncomm.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_category.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_contact.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_invoice.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_order.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredProperty'],
'htdocs/webservices/server_payment.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_productorservice.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_project.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_supplier_invoice.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_thirdparty.php' => ['PhanUndeclaredProperty'],
'htdocs/webservices/server_user.php' => ['PhanUndeclaredProperty'],
'htdocs/website/websiteaccount_card.php' => ['PhanUndeclaredProperty'],
'internal' => ['PhanUndeclaredConstant'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This is the phan config file used by .github/workflows/phan.yml
*/

View File

@@ -1,53 +1,93 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension ftp@7.4.12
namespace {
function ftp_alloc($ftp, $size, &$response = null) {}
function ftp_append($ftp, $remote_file, $local_file, $mode = null) {}
function ftp_cdup($ftp) {}
function ftp_chdir($ftp, $directory) {}
function ftp_chmod($ftp, $mode, $filename) {}
function ftp_close($ftp) {}
function ftp_connect($host, $port = null, $timeout = null) {}
function ftp_delete($ftp, $file) {}
function ftp_exec($ftp, $command) {}
function ftp_fget($ftp, $fp, $remote_file, $mode = null, $resumepos = null) {}
function ftp_fput($ftp, $remote_file, $fp, $mode = null, $startpos = null) {}
function ftp_get($ftp, $local_file, $remote_file, $mode = null, $resume_pos = null) {}
function ftp_get_option($ftp, $option) {}
function ftp_login($ftp, $username, $password) {}
function ftp_mdtm($ftp, $filename) {}
function ftp_mkdir($ftp, $directory) {}
function ftp_mlsd($ftp, $directory) {}
function ftp_nb_continue($ftp) {}
function ftp_nb_fget($ftp, $fp, $remote_file, $mode = null, $resumepos = null) {}
function ftp_nb_fput($ftp, $remote_file, $fp, $mode = null, $startpos = null) {}
function ftp_nb_get($ftp, $local_file, $remote_file, $mode = null, $resume_pos = null) {}
function ftp_nb_put($ftp, $remote_file, $local_file, $mode = null, $startpos = null) {}
function ftp_nlist($ftp, $directory) {}
function ftp_pasv($ftp, $pasv) {}
function ftp_put($ftp, $remote_file, $local_file, $mode = null, $startpos = null) {}
function ftp_pwd($ftp) {}
function ftp_quit($ftp) {}
function ftp_raw($ftp, $command) {}
function ftp_rawlist($ftp, $directory, $recursive = null) {}
function ftp_rename($ftp, $src, $dest) {}
function ftp_rmdir($ftp, $directory) {}
function ftp_set_option($ftp, $option, $value) {}
function ftp_site($ftp, $cmd) {}
function ftp_size($ftp, $filename) {}
function ftp_ssl_connect($host, $port = null, $timeout = null) {}
function ftp_systype($ftp) {}
const FTP_ASCII = 1;
const FTP_AUTORESUME = -1;
const FTP_AUTOSEEK = 1;
const FTP_BINARY = 2;
const FTP_FAILED = 0;
const FTP_FINISHED = 1;
const FTP_IMAGE = 2;
const FTP_MOREDATA = 2;
const FTP_TEXT = 1;
const FTP_TIMEOUT_SEC = 0;
const FTP_USEPASVADDRESS = 2;
const FTP_ASCII = 1;
const FTP_TEXT = 1;
const FTP_BINARY = 2;
const FTP_IMAGE = 2;
const FTP_AUTORESUME = -1;
const FTP_TIMEOUT_SEC = 0;
const FTP_AUTOSEEK = 1;
const FTP_USEPASVADDRESS = 2;
const FTP_FAILED = 0;
const FTP_FINISHED = 1;
const FTP_MOREDATA = 2;
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
function ftp_login(FTP\Connection $ftp, string $username, #[\SensitiveParameter] string $password): bool {}
function ftp_pwd(FTP\Connection $ftp): string|false {}
function ftp_cdup(FTP\Connection $ftp): bool {}
function ftp_chdir(FTP\Connection $ftp, string $directory): bool {}
function ftp_exec(FTP\Connection $ftp, string $command): bool {}
/**
* @return array<int, string>|null
*/
function ftp_raw(FTP\Connection $ftp, string $command): ?array {}
function ftp_mkdir(FTP\Connection $ftp, string $directory): string|false {}
function ftp_rmdir(FTP\Connection $ftp, string $directory): bool {}
function ftp_chmod(FTP\Connection $ftp, int $permissions, string $filename): int|false {}
/** @param string $response */
function ftp_alloc(FTP\Connection $ftp, int $size, &$response = null): bool {}
/**
* @return array<int, string>|false
*/
function ftp_nlist(FTP\Connection $ftp, string $directory): array|false {}
/**
* @return array<int, string>|false
*/
function ftp_rawlist(FTP\Connection $ftp, string $directory, bool $recursive = false): array|false {}
/**
* @return array<int, array>|false
*/
function ftp_mlsd(FTP\Connection $ftp, string $directory): array|false {}
function ftp_systype(FTP\Connection $ftp): string|false {}
/** @param resource $stream */
function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
/** @param resource $stream */
function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {}
function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
function ftp_nb_continue(FTP\Connection $ftp): int {}
/** @param resource $stream */
function ftp_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {}
/** @param resource $stream */
function ftp_nb_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_append(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
function ftp_nb_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
function ftp_size(FTP\Connection $ftp, string $filename): int {}
function ftp_mdtm(FTP\Connection $ftp, string $filename): int {}
function ftp_rename(FTP\Connection $ftp, string $from, string $to): bool {}
function ftp_delete(FTP\Connection $ftp, string $filename): bool {}
function ftp_site(FTP\Connection $ftp, string $command): bool {}
function ftp_close(FTP\Connection $ftp): bool {}
function ftp_quit(FTP\Connection $ftp): bool {}
/** @param int|bool $value */
function ftp_set_option(FTP\Connection $ftp, int $option, $value): true {}
function ftp_get_option(FTP\Connection $ftp, int $option): int|bool {}
}
namespace FTP {
/**
* @strict-properties
* @not-serializable
*/
final class Connection
{
}
}

View File

@@ -66,8 +66,14 @@ parameters:
reportMagicMethods: false
reportMagicProperties: false
treatPhpDocTypesAsCertain: false
# if you want to exclude something, generate the baseline to do that, add here give only pattern that does not give the opportunity to introduce new errors
# or pattern to avoid false positive of some bugged or allowed phpstan checks
ignoreErrors:
- '#.*phan-var#'
- '#^Expression "''…" on a separate line does not do anything#'
- '#Empty array passed to foreach#'
- '#Unable to resolve the template type T#'
- '#in empty\(\) always exists and is always falsy#'
- '#is always#'
internalErrorsCountLimit: 50
cache:

View File

@@ -16,15 +16,15 @@ composer install
#### Usage
##### To make changes (Add --dry-run for test mode only)
##### To make changes (remove --dry-run for real run)
```shell
cd dev/tools/rector
./vendor/bin/rector process --dry-run
./vendor/bin/rector process --debug --dry-run
```
##### To make changes on a given directory
```shell
cd dev/tools/rector
./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/
./vendor/bin/rector process --debug [--dry-run] [--clear-cache] ../../../htdocs/core/
```

View File

@@ -18,7 +18,7 @@
/**
* \file dev/tools/rector/rector.php
* \ingroup core
* \brief Toolt to run rector
* \brief Tool to run rector
*
* cd dev/tools/rector
* ./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/
@@ -33,17 +33,22 @@ use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersion::PHP_71);
//$rectorConfig->indent(' ', 4);
$rectorConfig->indent(' ', 4);
// Traits seems not supported correctly by rector without declaring them as bootstrapFiles
$arrayoftraitfiles = array(
__DIR__ . '/../../../htdocs/core/class/commonincoterm.class.php',
__DIR__ . '/../../../htdocs/core/class/commonpeople.class.php',
__DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php'
__DIR__ . '/../../../htdocs/core/class/commonsignedobject.class.php',
__DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php',
__DIR__ . '/../../../htdocs/core/class/commontrigger.class.php',
__DIR__ . '/../../../htdocs/core/class/doldeprecationhandler.class.php',
__DIR__ . '/../../../htdocs/subtotals/class/commonsubtotal.class.php',
);
$rectorConfig->bootstrapFiles($arrayoftraitfiles);
$rectorConfig->paths([
__DIR__ . '/../../../dev/',
__DIR__ . '/../../../htdocs/',
__DIR__ . '/../../../scripts/',
__DIR__ . '/../../../test/phpunit/',
@@ -54,7 +59,8 @@ return static function (RectorConfig $rectorConfig): void {
'**/custom/**',
'**/vendor/**',
'**/rector/**', // Disable this line to test the "test.php" file.
__DIR__ . '/../../../htdocs/custom/',
__DIR__ . '/../../../dev/tools/phan/stubs/*',
__DIR__ . '/../../../htdocs/custom/*',
__DIR__ . '/../../../htdocs/install/doctemplates/*'
//'test.php',
]);
@@ -82,12 +88,18 @@ return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyUserRightsToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\GlobalToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\UserRightsToFunction::class);
//$rectorConfig->rule(Dolibarr\Rector\Renaming\UsePositiveExit::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\UsePositiveExit::class);
// This fix <> into != but it breaks other rules, so added at end.
$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class);
//$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class);
/*
$rectorConfig->skip([
Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class,
Dolibarr\Rector\Renaming\GlobalToFunction::class
]);
*/
// Add all predefined rules to migrate to up to php 71.
// Warning this break tab spacing of arrays on several lines

View File

@@ -63,7 +63,7 @@ class GlobalToFunction extends AbstractRector
'Change $conf->global to getDolGlobal in context (1) conf->global Operator Value or (2) function(conf->global...)',
[new CodeSample(
'$conf->global->CONSTANT',
'getDolGlobalInt(\'CONSTANT\')'
'getDolGlobalString|Int(\'CONSTANT\')'
)]
);
}
@@ -228,14 +228,36 @@ class GlobalToFunction extends AbstractRector
return new Concat($leftConcat, $rightConcat);
}
// If a && b and a or b is conf->global, we replace a or/and b
if ($node instanceof BooleanAnd) {
$nodes = $this->resolveTwoNodeMatch($node);
if (!isset($nodes)) {
return;
// Transformation sur le nœud gauche
$changedone = 0;
if ($this->isGlobalVar($node->left)) {
$constName = $this->getConstName($node->left);
if (empty($constName)) {
return;
}
$node->left = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
$changedone++;
}
if ($this->isGlobalVar($node->right)) {
$constName = $this->getConstName($node->right);
if (empty($constName)) {
return;
}
$node->right = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
$changedone++;
}
/** @var Equal $node */
$node = $nodes->getFirstExpr();
if ($changedone) {
return $node;
}
}
@@ -270,9 +292,42 @@ class GlobalToFunction extends AbstractRector
return;
}
// Now we process a comparison
$isconfglobal = $this->isGlobalVar($node->left);
if (!$isconfglobal) {
// The left side is not conf->global->xxx, so we leave
$isconfglobal = $this->isGlobalVar($node->right);
if (!$isconfglobal) {
// The left side and right side is not conf->global->xxx, so we leave
return;
}
// Right side is conf->global->xxx, but we can't know if we must use getDolGlobalInt or String,
// so we use getDolGlobalString if comparison is ==
if ($typeofcomparison == 'Equal') {
$constName = $this->getConstName($node->right);
if (empty($constName)) {
return;
}
// Test the type after the comparison conf->global->xxx to know the name of function
$typeleft = $node->left->getType();
switch ($typeleft) {
case 'Scalar_LNumber':
$funcName = 'getDolGlobalInt';
break;
case 'Scalar_String':
$funcName = 'getDolGlobalString';
break;
default: // Can be Expr_FuncCall
$funcName = 'getDolGlobalString';
break;
}
$node->right = new FuncCall(
new Name($funcName),
[new Arg($constName)]
);
return $node;
}
return;
}
@@ -360,36 +415,6 @@ class GlobalToFunction extends AbstractRector
}
}
/**
* Get nodes with check empty
*
* @param BooleanAnd $booleanAnd A BooleandAnd
* @return TwoNodeMatch|null
*/
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
{
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
$booleanAnd,
// Function to check if we are in the case $conf->global->... == $value
function (Node $node): bool {
if (!$node instanceof Equal) {
return \false;
}
return $this->isGlobalVar($node->left);
},
// !empty(...) || isset(...)
function (Node $node): bool {
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
return $this->isGlobalVar($node->expr->expr);
}
if (!$node instanceof Isset_) {
return $this->isGlobalVar($node);
}
return \true;
}
);
}
/**
* Check if node is a global access with format conf->global->XXX
*

View File

@@ -24,6 +24,10 @@ DATAPOLICY_TIERS_NIPROSPECT_NICLIENT
DATAPOLICY_TIERS_PROSPECT
DATAPOLICY_TIERS_PROSPECT_CLIENT
#
TOKEN_EXPIRE_AT
TOKEN_EXPIRED
# fournisseur
CodePaymentTerm
IdPaymentTerm
@@ -36,6 +40,15 @@ Reservation
CompletePage
PortionOfPage
#
AccountancyGroupCAPIT
AccountancyGroupEXPENSE
AccountancyGroupFINAN
AccountancyGroupIMMO
AccountancyGroupINCOME
AccountancyGroupSTOCK
AccountancyGroupTHIRDPARTY
# Others
ACCOUNTING_ACCOUNT_CUSTOMER
ACCOUNTING_ACCOUNT_CUSTOMER_Desc
@@ -95,6 +108,14 @@ ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT
ACCOUNTING_VAT_PAY_ACCOUNT
ACCOUNTING_VAT_SOLD_ACCOUNT
ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT
AI_API_MODEL_AUDIO
AI_API_MODEL_IMAGE
AI_API_MODEL_TEXT
AI_API_MODEL_TRANSCRIPT
AI_API_MODEL_TRANSLATE
AI_API_MODEL_VIDEO
AGENDA_EVENT_CURRENT_COLOR
AGENDA_EVENT_FUTURE_COLOR
AGENDA_EVENT_PAST_COLOR

View File

@@ -96,8 +96,6 @@ AADE_WEBSERVICE_USER
API
Accept
AccountancyErrorMismatchLetteringCode
AccountingAccount
AccountingCode
AccountingJournalType
ActionAC_
ActionAC_ALL_
@@ -147,14 +145,12 @@ Banque
Barcode
BarcodeDesc
BarcodeStickersMask
BatchInformationNotfound
BillOfMaterialsLine
BlockLogNeedAmountsValue
BlockLogNeedElement
BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote
BlockedLogAuthorityUrl
BlockedLogSetup
BookCalSystem
Bookings
BoxTitleLast
BoxTitleLatest
@@ -179,7 +175,6 @@ Child of
ClassNotFound
Clear
ClickToDial
Clients
Clone
CloneAffectation
CloneChanges
@@ -202,8 +197,6 @@ ConfirmActionMyObject
ConfirmActionTarget
ConfirmCloneMyObject
ConfirmCloneTask
ConfirmCreateAdherent
ConfirmDeleteAdherent
ConfirmDeleteIndividual
ConfirmDeleteReport
ConfirmDeleteWebsiteAccount
@@ -267,7 +260,6 @@ Dictionaries
DictionaryEmpty
DictionaryNameUpdated
Directory
DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND
Document
Documentation
Dolibarr
@@ -291,7 +283,6 @@ EmailcollectorFilter
EmailingTargetSelector
Empty
End
EnterAnIP
EnterNameOfDictionnaryToDeleteDesc
Entries
ErrSCAAuthentication
@@ -309,7 +300,6 @@ ErrorBadSocialNetworkValue
ErrorBadStatus
ErrorBadValue
ErrorBadValueForBatch
ErrorBadValueForDate
ErrorCanNotDeleteDir
ErrorCantSplitAUsedDiscount
ErrorChartOfAccountSystemNotSelected
@@ -334,7 +324,6 @@ ErrorFailedToGetListOfNotificationsToSend
ErrorFailedToLoadBankAccount
ErrorFailedToLoadDiscount
ErrorFailedToSetNewPassword
ErrorFaviconMustBeASquaredImage
ErrorFileNameInvalid
ErrorImportOfChartLimitedToCurrentChart
ErrorMAIN_ROUNDING_RULE_TOTCanMAIN_MAX_DECIMALS_TOT
@@ -362,7 +351,6 @@ ErrorTechnicalError
ErrorThirdPartyIdIsMandatory
ErrorTicketIsNotValid
ErrorTitreAlreadyExists
ErrorUpdatingUsersCP
ErrorUserFetch
ErrorValueMustBeInteger
ErrorValueTooHigh
@@ -412,7 +400,6 @@ Filename
FilteredFrom
Flashy
ForcedByGlobalSetup
Form for public lead registration has not been enabled
Free
FreeLegalTextOnReceptions
FrequencyPer_
@@ -619,7 +606,6 @@ PaymentCondition
PaymentConditionShort
PaymentDonation
PaymentHigherThanReminderToPaySupplier
PaymentSalary
PaymentSendToStripeTerminal
PaymentType
PaymentTypeShort
@@ -636,17 +622,13 @@ Poll
Posts
PredefinedInterventional
PrevRangeToThisRange
PreviousFingerprint
Print
PrintDriver
PrintModule
PrintUserConfDesc
PrinterId
PrinterIdEmpty
PrinterLocation
PrinterNameEmpty
PrinterParameterEmpty
Printers
Printing
ProductCodeDesc
ProductFournisseurPrice
@@ -810,7 +792,6 @@ Templates
TestPrinterTemplate
TestTemplateToPrinter
Theme
ThirdpartyHasNoDefaultBanAccount
ThisIsInformationOnDocumentToSign
ThisScreenAllowsYouToSignDocFrom
TicketCategoryShort
@@ -820,7 +801,6 @@ TicketTypeShort
TimeOnly
Timezone
ToGetBack
ToPay
Token
Tooltip
TooltipEditAndRevertStockMovement
@@ -847,8 +827,6 @@ UpdateUser
UpgradeHasBeenUnlocked
Url
Use of API for currency update is disabled by option MULTICURRENCY_DISABLE_SYNC_CURRENCYLAYER
UserRemovedFromGroup
UserSetInGroup
VCard
Vacant
ValidateAndSign
@@ -874,7 +852,6 @@ Widgets
Windows
WorkingBoard
Workload
WrongAmount
XDebug
XmlCorrupted
Y
@@ -1031,10 +1008,6 @@ PDF/A-3b
PartnershipSentByEMail
PdfTitle
ProcessingError
PurchaseOrder
PurchaseOrders
ReceptionSentByEMail
ReceptionValidated
Recruited
Ref. Product
RefNewContract
@@ -1042,7 +1015,6 @@ Stable
Suggested
TicketMessageMailSignatureText
TicketSetupPage
Tiers
Timeline
Transfer
TryAnotherConnectionMode

View File

@@ -1,6 +1,7 @@
#!/bin/bash
#
# Find unused translations pretty fast...
# Go into the root of the git directory, then launch the shell.
#
# Principle:
#
@@ -35,7 +36,7 @@ DYNAMIC_KEYS_FILE=${TMP}/dynamic_keys
MISSING_AND_UNUSED_FILE=${TMP}/missing_and_unused
MISSING_FILE=${TMP}/missing
UNUSED_FILE=${TMP}/unused
EXPECTED_REGEX='(Country..|ExportDataset_.*|Language_.._..|MonthVeryShort\d\d|PaperFormat.*||Permission.*|ProfId\d(..)?|unit.*)'
EXPECTED_REGEX='(Country..|ExportDataset_.*|Language_.._..|MonthVeryShort\d\d|PaperFormat.*||Permission.*|ProfId\d(..)?|TypeContact_shipping_external_.*|unit.*)'
DYNAMIC_KEYS_SRC_FILE=${MYDIR}/dynamic_translation_keys.lst
EXCLUDE_KEYS_SRC_FILE=${MYDIR}/ignore_translation_keys.lst
DUPLICATE_KEYS_SRC_FILE=${MYDIR}/duplicate_translation_keys.lst

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2013-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ $search_import_key = GETPOST('search_import_key', 'alpha');
$search_reconcilable = GETPOST("search_reconcilable", 'int');
$search_centralized = GETPOST("search_centralized", 'int');
$search_active = GETPOST("search_active", 'int');
$toselect = GETPOST('toselect', 'array');
$toselect = GETPOST('toselect', 'array:int');
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
$confirm = GETPOST('confirm', 'alpha');
@@ -98,20 +98,22 @@ if (!$sortorder) {
$sortorder = "ASC";
}
$object = new AccountingAccount($db);
$arrayfields = array(
'aa.account_number' => array('label' => "AccountNumber", 'checked' => '1'),
'aa.label' => array('label' => "Label", 'checked' => '1'),
'aa.labelshort' => array('label' => "LabelToShow", 'checked' => '1'),
'aa.labelshort' => array('label' => "ShortLabel", 'checked' => '1'),
'aa.account_parent' => array('label' => "Accountparent", 'checked' => '1'),
'aa.pcg_type' => array('label' => "Pcgtype", 'checked' => '1', 'help' => 'PcgtypeDesc'),
'categories' => array('label' => "AccountingCategories", 'checked' => '-1', 'help' => 'AccountingCategoriesDesc'),
'aa.reconcilable' => array('label' => "Reconcilable", 'checked' => '1'),
'aa.centralized' => array('label' => "Centralized", 'checked' => '1'),
'aa.centralized' => array('label' => "Centralized", 'checked' => '1', 'help' => 'CentralizedAccountHelp'),
'aa.import_key' => array('label' => "ImportId", 'checked' => '-1', 'help' => ''),
'aa.active' => array('label' => "Activated", 'checked' => '1')
);
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
if (!getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) {
unset($arrayfields['categories']);
unset($arrayfields['aa.reconcilable']);
}
@@ -350,7 +352,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}
@@ -429,7 +431,7 @@ if ($resql) {
$newcardbutton = dolGetButtonTitle($langs->trans('Addanaccount'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/accountancy/admin/card.php?action=create', '', $permissiontoadd);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
if ($optioncss != '') {
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
}
@@ -557,12 +559,10 @@ if ($resql) {
}
// Reconcilable
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print '<td class="liste_titre center">';
print $form->selectyesno('search_reconcilable', $search_reconcilable, 1, false, 1, 1, 'search_status onrightofpage width75');
print '</td>';
}
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print '<td class="liste_titre center">';
print $form->selectyesno('search_reconcilable', $search_reconcilable, 1, false, 1, 1, 'search_status onrightofpage width75');
print '</td>';
}
// Centralized
@@ -574,10 +574,11 @@ if ($resql) {
// Active
if (!empty($arrayfields['aa.active']['checked'])) {
print '<td class="liste_titre center">';
print '<td class="liste_titre center parentonrightofpage">';
print $form->selectyesno('search_active', $search_active, 1, false, 1, 1, 'search_status onrightofpage width75');
print '</td>';
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center maxwidthsearch">';
@@ -614,12 +615,14 @@ if ($resql) {
print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
$totalarray['nbfield']++;
}
// Main group
if (!empty($arrayfields['aa.pcg_type']['checked'])) {
print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1);
print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, 'right ', $arrayfields['aa.pcg_type']['help'].'::-1', 1);
$totalarray['nbfield']++;
}
// Number of custom groups
if (!empty($arrayfields['categories']['checked'])) {
print_liste_field_titre($arrayfields['categories']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '', $arrayfields['categories']['help'], 1);
print_liste_field_titre($arrayfields['categories']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '', $arrayfields['categories']['help'].'::-1', 1);
$totalarray['nbfield']++;
}
@@ -629,21 +632,19 @@ if ($resql) {
print $hookmanager->resPrint;
if (!empty($arrayfields['aa.import_key']['checked'])) {
print_liste_field_titre($arrayfields['aa.import_key']['label'], $_SERVER["PHP_SELF"], 'aa.import_key', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.import_key']['help'], 1);
print_liste_field_titre($arrayfields['aa.import_key']['label'], $_SERVER["PHP_SELF"], 'aa.import_key', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.import_key']['help'].'::-1', 1);
$totalarray['nbfield']++;
}
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.centralized']['checked'])) {
print_liste_field_titre($arrayfields['aa.centralized']['label'], $_SERVER["PHP_SELF"], 'aa.centralized', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['aa.centralized']['label'], $_SERVER["PHP_SELF"], 'aa.centralized', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.centralized']['help'].'::-1', 1);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.active']['checked'])) {
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
// Action column
@@ -759,7 +760,7 @@ if ($resql) {
}
// Custom accounts
if (!empty($arrayfields['categories']['checked'])) {
print "<td>";
print '<td class="right">';
// TODO Get all custom groups labels the account is in
print dol_escape_htmltag($obj->fk_accounting_category);
print "</td>\n";
@@ -783,23 +784,21 @@ if ($resql) {
}
}
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
// Activated or not reconciliation on a general accounting account
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print '<td class="center">';
if (empty($obj->reconcilable)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=1&token='.newToken().'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=1&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
// Activated or not reconciliation on an accounting account
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print '<td class="center">';
if (empty($obj->reconcilable)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=1&token='.newToken().'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=1&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}

View File

@@ -12,7 +12,7 @@
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -92,6 +92,8 @@ $search_country_id = GETPOST('search_country_id', 'int');
if ($user->socid > 0) {
accessforbidden();
}
$permissiontoeditchart = $user->hasRight('accounting', 'chartofaccount');
if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden();
}
@@ -142,8 +144,6 @@ $tabrowid[31] = "";
$tabhelp = array();
$tabhelp[31] = array('pcg_version' => $langs->trans("EnterAnyCode"));
$permissiontoeditchart = $user->hasRight('accounting', 'chartofaccount');
/*
* Actions
@@ -199,32 +199,15 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd', 'alpha')) {
$newid = 0;
if ($tabrowid[$id]) {
// Get free id for insert
$sql = "SELECT MAX(".$db->sanitize($tabrowid[$id]).") as newid FROM ".$db->sanitize($tabname[$id]);
$result = $db->query($sql);
if ($result) {
$obj = $db->fetch_object($result);
$newid = ($obj->newid + 1);
} else {
dol_print_error($db);
}
}
// Add new entry
$sql = "INSERT INTO ".$db->sanitize($tabname[$id])." (";
// List of fields
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
$sql .= $db->sanitize($tabrowid[$id]).",";
}
$sql .= $db->sanitize($tabfieldinsert[$id]);
$sql .= ",active)";
$sql .= " VALUES(";
// List of values
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
$sql .= $newid.",";
}
$i = 0;
foreach ($listfieldinsert as $f => $value) {
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
@@ -260,19 +243,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify', 'alpha')) {
if ($tabrowid[$id]) {
$rowidcol = $tabrowid[$id];
} else {
$rowidcol = "rowid";
}
// Modify entry
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET ";
// Modifie valeur des champs
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
$sql .= $db->sanitize($tabrowid[$id])." = ";
$sql .= "'".$db->escape($rowid)."', ";
}
$i = 0;
foreach ($listfieldmodify as $field) {
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
@@ -291,7 +265,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
}
$i++;
}
$sql .= " WHERE ".$rowidcol." = ".((int) $rowid);
$sql .= " WHERE rowid = ".((int) $rowid);
dol_syslog("actionmodify", LOG_DEBUG);
//print $sql;
@@ -302,14 +276,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
}
}
if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontoeditchart) { // @phpstan-ignore-line
if ($tabrowid[$id]) {
$rowidcol = $tabrowid[$id];
} else {
$rowidcol = "rowid";
}
$sql = "DELETE from ".$db->sanitize($tabname[$id])." WHERE ".$db->sanitize($rowidcol)." = ".((int) $rowid);
// delete
if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontoeditchart) {
$sql = "DELETE from ".$db->sanitize($tabname[$id])." WHERE rowid = ".((int) $rowid);
dol_syslog("delete", LOG_DEBUG);
$result = $db->query($sql);
@@ -323,7 +292,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontoeditchart)
}
// activate
if ($action == 'activate' && $permissiontoeditchart) { // @phpstan-ignore-line
if ($action == 'activate' && $permissiontoeditchart) {
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET active = 1 WHERE rowid = ".((int) $rowid);
$result = $db->query($sql);
if (!$result) {
@@ -332,7 +301,7 @@ if ($action == 'activate' && $permissiontoeditchart) { // @phpstan-ignore
}
// disable
if ($action == $acts[1] && $permissiontoeditchart) { // @phpstan-ignore-line
if ($action == $acts[1] && $permissiontoeditchart) {
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET active = 0 WHERE rowid = ".((int) $rowid);
$result = $db->query($sql);
if (!$result) {
@@ -360,7 +329,7 @@ print load_fiche_titre($titre, $linkback, 'title_accountancy');
// Confirmation de la suppression de la ligne
if ($action == 'delete') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.urlencode((string) ($page)).'&' : '').'sortfield='.urlencode((string) ($sortfield)).'&sortorder='.urlencode((string) ($sortorder)).'&rowid='.urlencode((string) ($rowid)).'&code='.urlencode((string) ($code)).'&id='.urlencode((string) ($id)), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
print $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['page'=> $page, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'rowid' => $rowid, 'code' => $code, 'id' => $id]), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
}
@@ -608,36 +577,34 @@ if ($resql) {
}
}
// Can an entry be erased or disabled ?
$iserasable = 1;
$canbedisabled = 1;
$canbemodified = 1; // true by default
// $url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : '');
// $url .= '&'.$param.'&';
$url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : '');
$url .= '&'.$param.'&';
$query = [];
// decode and add param to query
parse_str($param, $query);
$query = array_merge($query, [
'action' => '',
'page' => $page,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'rowid' => (!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')),
'code' => $obj->code,
]);
// Active
print '<td class="center nowrap">';
if ($canbedisabled) {
print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
} else {
print $langs->trans("AlwaysActive");
}
$query['action'] = $acts[$obj->active];
print '<a href="'.dolBuildUrl($_SERVER["PHP_SELF"], $query, true).'">'.$actl[$obj->active].'</a>';
print "</td>";
// Modify link
if ($canbemodified) {
print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
} else {
print '<td>&nbsp;</td>';
}
$query['action'] = 'edit';
print '<td class="center"><a class="reposition editfielda" href="'.dolBuildUrl($_SERVER["PHP_SELF"], $query, true).'">'.img_edit().'</a></td>';
// Delete link
if ($iserasable) {
print '<td class="center"><a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a></td>';
} else {
print '<td>&nbsp;</td>';
}
$query['action'] = 'delete';
print '<td class="center"><a href="'.dolBuildUrl($_SERVER["PHP_SELF"], $query, true).'">'.img_delete().'</a></td>';
print "</tr>\n";
}
@@ -701,16 +668,8 @@ function fieldListAccountModel($fieldlist, $obj = null, $tabname = '', $context
print '</td>';
}
} elseif ($fieldlist[$field] == 'type_cdr') {
if ($fieldlist[$field] == 'type_cdr') {
print '<td class="center">';
} else {
print '<td>';
}
if ($fieldlist[$field] == 'type_cdr') {
print $form->selectarray($fieldlist[$field], array(0 => $langs->trans('None'), 1 => $langs->trans('AtEndOfMonth'), 2 => $langs->trans('CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : ''));
} else {
print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : ''), 1);
}
print '<td class="center">';
print $form->selectarray($fieldlist[$field], array(0 => $langs->trans('None'), 1 => $langs->trans('AtEndOfMonth'), 2 => $langs->trans('CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : ''));
print '</td>';
} elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
print '<td><input type="text" class="flat" value="'.(!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : '').'" size="10" name="'.$fieldlist[$field].'"></td>';

View File

@@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ if (GETPOST('cancel', 'alpha')) {
exit;
}
if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) {
if ($action == 'add' /* && $user->hasRight('accounting', 'chartofaccount') // already checked */) {
if (!$cancel) {
if (!$account_number) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors');
@@ -132,7 +132,7 @@ if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) {
}
}
}
} elseif ($action == 'edit' && $user->hasRight('accounting', 'chartofaccount')) {
} elseif ($action == 'edit' /* && $user->hasRight('accounting', 'chartofaccount') // already checked */) {
if (!$cancel) {
if (!$account_number) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors');
@@ -245,7 +245,7 @@ if ($action == 'create') {
print '<td><input name="label" size="70" value="'.$object->label.'"></td></tr>';
// Label short
print '<tr><td>'.$langs->trans("LabelToShow").'</td>';
print '<tr><td>'.$langs->trans("ShortLabel").'</td>';
print '<td><input name="labelshort" size="70" value="'.$object->labelshort.'"></td></tr>';
// Account parent
@@ -314,15 +314,15 @@ if ($action == 'create') {
// Account number
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("AccountNumber").'</span></td>';
print '<td><input name="account_number" size="30" value="'.$object->account_number.'"></td></tr>';
print '<td><input class="minwidth300" name="account_number" value="'.$object->account_number.'"></td></tr>';
// Label
print '<tr><td><span class="fieldrequired">'.$langs->trans("Label").'</span></td>';
print '<td><input name="label" size="70" value="'.$object->label.'"></td></tr>';
print '<td><input class="minwidth500" name="label" value="'.$object->label.'"></td></tr>';
// Label short
print '<tr><td>'.$langs->trans("LabelToShow").'</td>';
print '<td><input name="labelshort" size="70" value="'.$object->labelshort.'"></td></tr>';
print '<tr><td>'.$langs->trans("ShortLabel").'</td>';
print '<td><input class="minwidth300" name="labelshort" value="'.$object->labelshort.'"></td></tr>';
// Account parent
print '<tr><td>'.$langs->trans("Accountparent").'</td>';
@@ -386,7 +386,7 @@ if ($action == 'create') {
print '<td colspan="2">'.$object->label.'</td></tr>';
// Label to show
print '<tr><td class="titlefield">'.$langs->trans("LabelToShow").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("ShortLabel").'</td>';
print '<td colspan="2">'.$object->labelshort.'</td></tr>';
// Account parent
@@ -419,11 +419,11 @@ if ($action == 'create') {
*/
print '<div class="tabsAction">';
if ($user->hasRight('accounting', 'chartofaccount')) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&token='.newToken().'&id='.$object->id.'">'.$langs->trans('Modify').'</a>';
} else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
}
// if ($user->hasRight('accounting', 'chartofaccount')) { // already checked
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&token='.newToken().'&id='.$object->id.'">'.$langs->trans('Modify').'</a>';
// } else {
// print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
// }
// Delete
$permissiontodelete = $user->hasRight('accounting', 'chartofaccount');

View File

@@ -7,6 +7,7 @@
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 Vincent de Grandporé <vincent@de-grandpre.quebec>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -102,9 +103,20 @@ $list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT';
$list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT';
$list_account[] = 'ACCOUNTING_LT1_SOLD_ACCOUNT';
$list_account[] = 'ACCOUNTING_LT1_BUY_ACCOUNT';
$list_account[] = 'ACCOUNTING_LT1_PAY_ACCOUNT';
$list_account[] = 'ACCOUNTING_LT2_SOLD_ACCOUNT';
$list_account[] = 'ACCOUNTING_LT2_BUY_ACCOUNT';
$list_account[] = 'ACCOUNTING_LT2_PAY_ACCOUNT';
if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) {
$list_account[] = 'ACCOUNTING_VAT_BUY_REVERSE_CHARGES_CREDIT';
$list_account[] = 'ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT';
$list_account[] = 'ACCOUNTING_LT1_BUY_REVERSE_CHARGES_CREDIT';
$list_account[] = 'ACCOUNTING_LT1_BUY_REVERSE_CHARGES_DEBIT';
$list_account[] = 'ACCOUNTING_LT2_BUY_REVERSE_CHARGES_CREDIT';
$list_account[] = 'ACCOUNTING_LT2_BUY_REVERSE_CHARGES_DEBIT';
}
if (isModEnabled('bank')) {
$list_account[] = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH';
@@ -124,6 +136,11 @@ if (isModEnabled('loan')) {
$list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE';
}
$list_account[] = 'ACCOUNTING_ACCOUNT_SUSPENSE';
if (isModEnabled('invoice') || isModEnabled('supplier_invoice')) {
$list_account[] = '---Discounts---';
$list_account[] = 'ACCOUNTING_ACCOUNT_DISCOUNT_GRANTED';
$list_account[] = 'ACCOUNTING_ACCOUNT_DISCOUNT_RECEIVED';
}
if (isModEnabled('societe')) {
$list_account[] = '---Deposits---';
}
@@ -280,8 +297,14 @@ foreach ($list_account as $key) {
print img_picto('', 'service', 'class="pictofixedwidth"');
} elseif (preg_match('/^ACCOUNTING_VAT_PAY_ACCOUNT/', $key)) {
print img_picto('', 'payment_vat', 'class="pictofixedwidth"');
} elseif (preg_match('/^ACCOUNTING_LT1_PAY_ACCOUNT/', $key)) {
print img_picto('', 'payment_vat', 'class="pictofixedwidth"');
} elseif (preg_match('/^ACCOUNTING_LT2_PAY_ACCOUNT/', $key)) {
print img_picto('', 'payment_vat', 'class="pictofixedwidth"');
} elseif (preg_match('/^ACCOUNTING_VAT/', $key)) {
print img_picto('', 'vat', 'class="pictofixedwidth"');
} elseif (preg_match('/^ACCOUNTING_LT/', $key)) {
print img_picto('', 'vat', 'class="pictofixedwidth"');
} elseif (preg_match('/^ACCOUNTING_ACCOUNT_CUSTOMER/', $key)) {
print img_picto('', 'bill', 'class="pictofixedwidth"');
} elseif (preg_match('/^LOAN_ACCOUNTING_ACCOUNT/', $key)) {

View File

@@ -131,7 +131,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}
@@ -202,7 +202,7 @@ if ($result) {
if (getDolGlobalString('ACCOUNTANCY_FISCALYEAR_DEFAULT') == (int) $fiscalyearstatic->ref) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdefault&token='.newToken().'&value='.urlencode($fiscalyearstatic->ref).'&label='.urlencode($fiscalyearstatic->label).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').'</a>';
print '<a class="reposition" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['action' => 'setdefault', 'value' => $fiscalyearstatic->ref, 'label'=>$fiscalyearstatic->label], true).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').'</a>';
}
print '</td>';

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2014-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -82,7 +82,7 @@ $permissiontoadd = $user->hasRight('accounting', 'fiscalyear', 'write');
if ($user->socid > 0) {
accessforbidden();
}
if (!$permissiontoadd) {
if (!$permissiontoadd) { // after this test $permissiontoadd is always true
accessforbidden();
}
@@ -97,7 +97,7 @@ if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) {
if ($action == 'confirm_delete' && $confirm == "yes" /* && $permissiontoadd // always true */) {
$result = $object->delete($user);
if ($result >= 0) {
header("Location: fiscalyear.php");
@@ -105,7 +105,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) {
} else {
setEventMessages($object->error, $object->errors, 'errors');
}
} elseif ($action == 'add' && $permissiontoadd) {
} elseif ($action == 'add' /* && $permissiontoadd // always true */) {
if (!GETPOST('cancel', 'alpha')) {
$error = 0;
@@ -147,7 +147,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) {
header("Location: ./fiscalyear.php");
exit();
}
} elseif ($action == 'update' && $permissiontoadd) {
} elseif ($action == 'update' /* && $permissiontoadd // always true */) {
// Update record
if (!GETPOST('cancel', 'alpha')) {
$result = $object->fetch($id);
@@ -169,7 +169,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) {
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
exit();
}
} elseif ($action == 'reopen' && $permissiontoadd && getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD')) {
} elseif ($action == 'reopen' /* && $permissiontoadd // always true */ && getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD')) {
$result = $object->fetch($id);
$object->status = GETPOSTINT('status');
@@ -202,7 +202,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-fis
if ($action == 'create') {
print load_fiche_titre($title, '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
@@ -334,7 +334,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// ------------------------------------------------------------
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/fiscalyear.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
dol_banner_tab($object, 'label', $linkback, 1, 'label', 'label', $morehtmlref);
print '<div class="fichecenter">';
@@ -342,6 +342,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">'."\n";
// Id
print "<tr>";
print '<td class="titlefield">'.$langs->trans("Id").'</td><td>';
print $object->id;
print '</td></tr>';
// Label
print '<tr><td class="tdtop">';
print $form->editfieldkey("Label", 'label', $object->label, $object, 0, 'alpha:32');

View File

@@ -238,11 +238,9 @@ if ($action == 'update_export') {
// Export options
$modelcsv = GETPOSTINT('ACCOUNTING_EXPORT_MODELCSV');
if (!$error) {
// reload
$configuration = $accountancyexport->getTypeConfig();
$listparam = $configuration['param'];
}
// reload
$configuration = $accountancyexport->getTypeConfig();
$listparam = $configuration['param'];
if (!empty($modelcsv)) {
if (!dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
@@ -337,6 +335,34 @@ if ($action == 'setdisablebindingonexpensereports') {
}
}
if ($action == 'setdisabletransferonassets') {
$setdisabletransferonassets = GETPOSTINT('value');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_TRANSFER_ON_ASSETS", $setdisabletransferonassets, 'yesno', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisabletransferondiscounts') {
$setdisabletransferondiscounts = GETPOSTINT('value');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS", $setdisabletransferondiscounts, 'yesno', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setenablelettering') {
$setenablelettering = GETPOSTINT('value');
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_LETTERING", $setenablelettering, 'yesno', 0, '', $conf->entity);
@@ -522,7 +548,7 @@ foreach ($list_binding as $key) {
1=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece"),
2=>$langs->trans("ThirdPartyName")
);
print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200');
print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width300');
} else {
print '<input type="text" class="maxwidth100" id="'.$key.'" name="'.$key.'" value="'.getDolGlobalString($key).'">';
}
@@ -570,6 +596,32 @@ if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS')) {
}
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_TRANSFER_ON_ASSETS").'</td>';
if (getDolGlobalString('ACCOUNTING_DISABLE_TRANSFER_ON_ASSETS')) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisabletransferonassets&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisabletransferonassets&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS").'</td>';
if (getDolGlobalString('ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS')) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisabletransferondiscounts&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisabletransferondiscounts&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
if (!getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS')) {
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTANCY_ER_DATE_RECORD").'</td>';
@@ -766,7 +818,7 @@ if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) {
print '<input class="flat right" name="ACCOUNTING_LETTERING_NBLETTERS" id="ACCOUNTING_LETTERING_NBLETTERS" value="' . $nbletter . '" type="number" step="1" min="2" max="3" >' . "\n";
print '</tr>';
// Auto Lettering when transfer in accountancy is realized
// Auto matching when transfer in accountancy is realized
print '<tr class="oddeven">';
print '<td>';
print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING_DESC")) . '</td>';
@@ -817,6 +869,7 @@ print '</div>';
print '<div class="center"><input type="submit" class="button button-edit reposition" name="button" value="'.$langs->trans('Save').'"></div>';
print '</form>';
print '<br><br>';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2017-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -366,12 +366,9 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-adm
$titre = $langs->trans("DictionarySetup");
$linkback = '';
if ($id) {
$titre .= ' - '.$langs->trans($tablib[$id]);
$titlepicto = 'title_accountancy';
} else {
$titlepicto = '';
}
$titre .= ' - '.$langs->trans($tablib[$id]);
$titlepicto = 'title_accountancy';
print load_fiche_titre($titre, $linkback, $titlepicto);
@@ -384,309 +381,297 @@ if ($action == 'delete') {
/*
* Show a dictionary
*/
if ($id) {
// Complete requete recherche valeurs avec critere de tri
$sql = $tabsql[$id];
$sql .= " WHERE a.entity = ".((int) $conf->entity);
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') {
$sortfield = 'country_code';
}
$sql .= $db->order($sortfield, $sortorder);
$sql .= $db->plimit($listlimit + 1, $offset);
// Complete requete recherche valeurs avec critere de tri
$sql = $tabsql[$id];
$sql .= " WHERE a.entity = ".((int) $conf->entity);
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') {
$sortfield = 'country_code';
}
$sql .= $db->order($sortfield, $sortorder);
$sql .= $db->plimit($listlimit + 1, $offset);
$fieldlist = explode(',', $tabfield[$id]);
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from', 'alpha')).'">';
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
// Form to add a new line
if ($tabname[$id]) {
$fieldlist = explode(',', $tabfield[$id]);
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from', 'alpha')).'">';
// Line for title
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value) {
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$valuetoshow = ucfirst($fieldlist[$field]); // By default
$valuetoshow = $langs->trans($valuetoshow); // try to translate
$class = "left";
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
}
if ($fieldlist[$field] == 'nature') {
$valuetoshow = $langs->trans("NatureOfJournal");
}
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
// Form to add a new line
if ($tabname[$id]) {
$fieldlist = explode(',', $tabfield[$id]);
// Line for title
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value) {
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$valuetoshow = ucfirst($fieldlist[$field]); // By default
$valuetoshow = $langs->trans($valuetoshow); // try to translate
$class = "left";
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
}
if ($fieldlist[$field] == 'nature') {
$valuetoshow = $langs->trans("NatureOfJournal");
if ($valuetoshow != '') {
print '<td class="'.$class.'">';
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
print '<a href="'.$tabhelp[$id][$value].'">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
} elseif (!empty($tabhelp[$id][$value])) {
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
} else {
print $valuetoshow;
}
print '</td>';
}
}
if ($valuetoshow != '') {
print '<td class="'.$class.'">';
if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
print '<a href="'.$tabhelp[$id][$value].'">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
} elseif (!empty($tabhelp[$id][$value])) {
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
} else {
print $valuetoshow;
print '<td>';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '</tr>';
// Line to enter new values
print '<tr class="oddeven nodrag nodrop nohover">';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd', 'alpha')) {
foreach ($fieldlist as $key => $val) {
if (GETPOST($val) != '') {
$obj->$val = GETPOST($val);
}
}
}
$tmpaction = 'create';
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
if (empty($reshook)) {
fieldListJournal($fieldlist, $obj, $tabname[$id], 'add');
}
print '<td colspan="4" class="right">';
print '<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
print '<tr><td colspan="7">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$param = '&id='.((int) $id);
if ($search_country_id > 0) {
$param .= '&search_country_id='.urlencode((string) ($search_country_id));
}
$paramwithsearch = $param;
$paramwithsearch .= '&sortorder='.$sortorder;
$paramwithsearch .= '&sortfield='.$sortfield;
if (GETPOST('from', 'alpha')) {
$paramwithsearch .= '&from='.GETPOST('from', 'alpha');
}
// There is several pages
if ($num > $listlimit) {
print '<tr class="none"><td class="right" colspan="'.(3 + count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print '</td></tr>';
}
// Title line with search boxes
/*print '<tr class="liste_titre_filter liste_titre_add">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
*/
// Title of lines
print '<tr class="liste_titre liste_titre_add">';
foreach ($fieldlist as $field => $value) {
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$class = "left";
$sortable = 1;
$valuetoshow = '';
/*
$tmparray=getLabelOfField($fieldlist[$field]);
$valuetoshow=$tmp['valuetoshow'];
$align=$tmp['align'];
$sortable=$tmp['sortable'];
*/
$valuetoshow = ucfirst($fieldlist[$field]); // By default
$valuetoshow = $langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
}
if ($fieldlist[$field] == 'nature') {
$valuetoshow = $langs->trans("NatureOfJournal");
}
// Affiche nom du champ
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, "", $sortfield, $sortorder, $class.' ');
}
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, 'center ');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
if ($num) {
// Lines with values
while ($i < $num) {
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
$tmpaction = 'edit';
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
// Show fields
if (empty($reshook)) {
fieldListJournal($fieldlist, $obj, $tabname[$id], 'edit');
}
print '<td class="center" colspan="4">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
print '</td>';
} else {
$tmpaction = 'view';
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
if (empty($reshook)) {
$langs->load("accountancy");
foreach ($fieldlist as $field => $value) {
$class = "left";
$tmpvar = $fieldlist[$field];
$valuetoshow = $obj->$tmpvar;
if ($valuetoshow == 'all') {
$valuetoshow = $langs->trans('All');
} elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$key = $langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]});
} elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$valuetoshow = $langs->trans($obj->label);
}
$class = 'tddict';
// Show value for field
print '<!-- '.$fieldlist[$field].' --><td class="'.$class.'">'.dol_escape_htmltag($valuetoshow).'</td>';
}
}
// Can an entry be erased or disabled ?
$iserasable = 1;
$canbedisabled = 1;
$canbemodified = 1; // true by default
if (isset($obj->code) && $id != 10) {
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) {
$iserasable = 0;
$canbedisabled = 0;
}
}
$canbemodified = $iserasable;
$url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : '');
$url .= '&'.$param;
$url .= '&';
// Active
print '<td class="nowrap center">';
if ($canbedisabled) {
print '<a href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
} else {
print $langs->trans("AlwaysActive");
}
print "</td>";
// Modify link
if ($canbemodified) {
print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
} else {
print '<td>&nbsp;</td>';
}
// Delete link
if ($iserasable) {
print '<td class="center">';
if ($user->admin) {
print '<a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a>';
}
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>';
} else {
print '<td>&nbsp;</td>';
}
print '<td></td>';
print '</td>';
}
print "</tr>\n";
$i++;
}
print '<td>';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '</tr>';
// Line to enter new values
print '<tr class="oddeven nodrag nodrop nohover">';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd', 'alpha')) {
foreach ($fieldlist as $key => $val) {
if (GETPOST($val) != '') {
$obj->$val = GETPOST($val);
}
}
}
$tmpaction = 'create';
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
if (empty($reshook)) {
fieldListJournal($fieldlist, $obj, $tabname[$id], 'add');
}
print '<td colspan="4" class="right">';
print '<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
print '<tr><td colspan="7">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$param = '&id='.((int) $id);
if ($search_country_id > 0) {
$param .= '&search_country_id='.urlencode((string) ($search_country_id));
}
$paramwithsearch = $param;
if ($sortorder) {
$paramwithsearch .= '&sortorder='.$sortorder;
}
if ($sortfield) {
$paramwithsearch .= '&sortfield='.$sortfield;
}
if (GETPOST('from', 'alpha')) {
$paramwithsearch .= '&from='.GETPOST('from', 'alpha');
}
// There is several pages
if ($num > $listlimit) {
print '<tr class="none"><td class="right" colspan="'.(3 + count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print '</td></tr>';
}
// Title line with search boxes
/*print '<tr class="liste_titre_filter liste_titre_add">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
*/
// Title of lines
print '<tr class="liste_titre liste_titre_add">';
foreach ($fieldlist as $field => $value) {
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield = 1; // By default
$class = "left";
$sortable = 1;
$valuetoshow = '';
/*
$tmparray=getLabelOfField($fieldlist[$field]);
$showfield=$tmp['showfield'];
$valuetoshow=$tmp['valuetoshow'];
$align=$tmp['align'];
$sortable=$tmp['sortable'];
*/
$valuetoshow = ucfirst($fieldlist[$field]); // By default
$valuetoshow = $langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
}
if ($fieldlist[$field] == 'nature') {
$valuetoshow = $langs->trans("NatureOfJournal");
}
// Affiche nom du champ
if ($showfield) {
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, "", $sortfield, $sortorder, $class.' ');
}
}
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, 'center ');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
if ($num) {
// Lines with values
while ($i < $num) {
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
$tmpaction = 'edit';
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
// Show fields
if (empty($reshook)) {
fieldListJournal($fieldlist, $obj, $tabname[$id], 'edit');
}
print '<td class="center" colspan="4">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
print '</td>';
} else {
$tmpaction = 'view';
$parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
if (empty($reshook)) {
$langs->load("accountancy");
foreach ($fieldlist as $field => $value) {
$showfield = 1;
$class = "left";
$tmpvar = $fieldlist[$field];
$valuetoshow = $obj->$tmpvar;
if ($valuetoshow == 'all') {
$valuetoshow = $langs->trans('All');
} elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$key = $langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]});
} elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$valuetoshow = $langs->trans($obj->label);
}
$class = 'tddict';
// Show value for field
if ($showfield) {
print '<!-- '.$fieldlist[$field].' --><td class="'.$class.'">'.dol_escape_htmltag($valuetoshow).'</td>';
}
}
}
// Can an entry be erased or disabled ?
$iserasable = 1;
$canbedisabled = 1;
$canbemodified = 1; // true by default
if (isset($obj->code) && $id != 10) {
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) {
$iserasable = 0;
$canbedisabled = 0;
}
}
$canbemodified = $iserasable;
$url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : '');
if ($param) {
$url .= '&'.$param;
}
$url .= '&';
// Active
print '<td class="nowrap center">';
if ($canbedisabled) {
print '<a href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
} else {
print $langs->trans("AlwaysActive");
}
print "</td>";
// Modify link
if ($canbemodified) {
print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
} else {
print '<td>&nbsp;</td>';
}
// Delete link
if ($iserasable) {
print '<td class="center">';
if ($user->admin) {
print '<a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a>';
}
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>';
} else {
print '<td>&nbsp;</td>';
}
print '<td></td>';
print '</td>';
}
print "</tr>\n";
$i++;
}
}
} else {
dol_print_error($db);
}
print '</table>';
print '</div>';
print '</form>';
} else {
dol_print_error($db);
}
print '</table>';
print '</div>';
print '</form>';
print '<br>';
// End of page

View File

@@ -28,6 +28,14 @@
* \brief To define accounting account on product / service
*/
require '../../main.inc.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Societe $mysoc
* @var Translate $langs
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
@@ -39,15 +47,6 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Societe $mysoc
* @var Translate $langs
* @var User $user
*/
// Load translation files required by the page
$langs->loadLangs(array("companies", "compta", "accountancy", "products"));
@@ -199,15 +198,13 @@ if ($action == 'update' && $permissiontobind) {
}
if (!empty($toselect) && $massaction === 'changeaccount') {
//$msg = '<div><span class="accountingprocessing">' . $langs->trans("Processing") . '...</span></div>';
$ok = 0;
$ko = 0;
$msg = '';
$sql = '';
if (!empty($toselect) && in_array($accounting_product_mode, $accounting_product_modes)) {
if (!empty($toselect) && in_array($accounting_product_mode, $accounting_product_modes)) { // @phpstan-ignore-line Bug phpstan thinking that empty(array()) is always true
$accounting = new AccountingAccount($db);
//$msg .= '<div><span class="accountingprocessing">' . count($toselect) . ' ' . $langs->trans("SelectedLines") . '</span></div>';
$arrayofdifferentselectedvalues = array();
$cpt = 0;
@@ -424,7 +421,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -41,15 +41,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("accountancy", "admin", "bills", "compta", "errors", "hrm", "salaries"));
$mesg = '';
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$id = GETPOSTINT('id');
$rowid = GETPOSTINT('rowid');
$massaction = GETPOST('massaction', 'aZ09');
$optioncss = GETPOST('optioncss', 'alpha');
$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountingsubaccountlist'; // To manage different context of search
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
$id = GETPOSTINT('id');
$rowid = GETPOSTINT('rowid');
$search_subaccount = GETPOST('search_subaccount', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
@@ -298,7 +299,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}
@@ -335,7 +336,7 @@ if ($resql) {
// List of mass actions available
$arrayofmassactions = array();
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
if ($optioncss != '') {
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
}

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -318,7 +318,7 @@ if ($action != 'export') {
setEventMessages($object->error, $object->errors, 'errors');
}
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" id="action" value="list">';
print '<input type="hidden" name="export_type" id="export_type" value="">';

View File

@@ -198,6 +198,11 @@ if (empty($reshook)) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action = '';
}
$subledger_account_str = is_array($subledger_account) ? reset($subledger_account) : (string) $subledger_account;
if (!checkGeneralAccountAllowsAuxiliary($db, $accountingaccount_number, $subledger_account_str)) {
$error++;
setEventMessages($langs->trans("ErrorAccountNotCentralized"). ". " . $langs->trans("RemoveSubsidiaryAccountOrAdjustTheGeneralAccount"), null, 'errors');
}
if (!$error) {
if (GETPOSTINT('doc_datemonth') && GETPOSTINT('doc_dateday') && GETPOSTINT('doc_dateyear')) {
@@ -490,6 +495,29 @@ if ($action == 'delete') {
print $formconfirm;
}
// Update fields properties in realtime
if (!empty($conf->use_javascript_ajax)) {
print "\n" . '<script type="text/javascript">';
print '$(document).ready(function () {
function toggleSubledger() {
var isCentral = $("#accountingaccount_number option:selected").data("centralized");
console.log("the selected general ledger account is centralised?", isCentral);
if (isCentral) {
$("#subledger_account, #subledger_label").prop("disabled", false);
} else {
$("#subledger_account, #subledger_label").prop("disabled", true);
}
}
toggleSubledger();
$("#accountingaccount_number").on("change", toggleSubledger);
$("#accountingaccount_number").on("select2:select", toggleSubledger);
';
print ' });' . "\n";
print ' </script>' . "\n";
}
if ($action == 'create') {
print load_fiche_titre($title);
@@ -576,6 +604,25 @@ if ($action == 'create') {
print load_fiche_titre($langs->trans("UpdateMvts"), $backlink);
}*/
$head = accounting_transaction_prepare_head($object, $mode, $type, $backtopage);
print dol_get_fiche_head($head, 'transaction', '', -1);
//$object->label = $object->doc_ref;
if ($mode == '_tmp') {
$object->context['mode'] = $mode;
$object->next_prev_filter = '1=0'; // Add a test always false to disable navigation into the dol_banner_tab. In tmp mode, we just want to create/edit lines of bank transaction.
}
$object->label = $object->ref;
$morehtmlref = '<div style="clear: both;"></div>';
$morehtmlref .= '<div class="refidno opacitymedium">';
$morehtmlref .= $object->label;
$morehtmlref .= '</div>';
dol_banner_tab($object, 'ref', $backlink, 1, 'piece_num', 'piece_num', $morehtmlref);
if ($action == 'clonebookkeepingwriting' && $confirm != 'yes' && $permissiontoadd) {
$piece_num = GETPOST('piece_num', 'alpha');
$formaccounting = new FormAccounting($db);
@@ -614,28 +661,6 @@ if ($action == 'create') {
);
}
$head = array();
$h = 0;
$head[$h][0] = DOL_URL_ROOT."/accountancy/bookkeeping/card.php".'?piece_num='.((int) $object->piece_num).($mode ? '&mode='.$mode : '').($type ? '&type='.$type : '').'&backtopage='.urlencode($backtopage);
$head[$h][1] = $langs->trans("Transaction");
$head[$h][2] = 'transaction';
$h++;
print dol_get_fiche_head($head, 'transaction', '', -1);
//$object->label = $object->doc_ref;
if ($mode == '_tmp') {
$object->context['mode'] = $mode;
$object->next_prev_filter = '1=0'; // Add a test always false to disable navigation into the dol_banner_tab. In tmp mode, we just want to create/edit lines of bank transaction.
}
$object->label = $object->ref;
$morehtmlref = '<div style="clear: both;"></div>';
$morehtmlref .= '<div class="refidno opacitymedium">';
$morehtmlref .= $object->label;
$morehtmlref .= '</div>';
dol_banner_tab($object, 'ref', $backlink, 1, 'piece_num', 'piece_num', $morehtmlref);
print '<div class="fichecenter">';
@@ -1009,7 +1034,7 @@ if ($action == 'create') {
print '<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
}
// Add also input for subledger label
print '<br><input type="text" class="maxwidth150" name="subledger_label" value="'.(GETPOSTISSET("subledger_label") ? GETPOST("subledger_label", "alpha") : $line->subledger_label).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
print '<br><input type="text" class="maxwidth150" name="subledger_label" id="subledger_label" value="'.(GETPOSTISSET("subledger_label") ? GETPOST("subledger_label", "alpha") : $line->subledger_label).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
print '</td>';
print '<td><input type="text" class="minwidth200" name="label_operation" value="'.(GETPOSTISSET("label_operation") ? GETPOST("label_operation", "alpha") : $line->label_operation).'"></td>';
print '<td class="right"><input type="text" class="right width50" name="debit" value="'.(GETPOSTISSET("debit") ? GETPOST("debit", "alpha") : price($line->debit)).'"></td>';
@@ -1036,7 +1061,7 @@ if ($action == 'create') {
} else {
print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccount")) . '">';
}
print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccountLabel")) . '">';
print '<br><input type="text" class="maxwidth150" name="subledger_label" id="subledger_label" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccountLabel")) . '">';
print '</td>';
print '<td><input type="text" class="minwidth200" name="label_operation" value="' . dol_escape_htmltag($label_operation) . '"/></td>';
print '<td class="right"><input type="text" class="right width50" name="debit" value=""/></td>';

View File

@@ -55,7 +55,7 @@ $langs->loadLangs(array("accountancy", "compta"));
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$toselect = GETPOST('toselect', 'array:int');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookkeepinglist';
$socid = GETPOSTINT('socid');
@@ -764,7 +764,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
dol_print_error($db);
}
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}
@@ -877,7 +877,7 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
$arrayofmassactions = array();
$massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="list">';
if ($optioncss != '') {
@@ -1046,7 +1046,7 @@ if (!empty($arrayfields['t.credit']['checked'])) {
print '<input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'">';
print '</td>';
}
// Lettering code
// Matching code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.dol_escape_htmltag($search_lettering_code).'"/>';
@@ -1399,7 +1399,7 @@ while ($i < min($num, $limit)) {
$totalarray['val']['totalcredit'] += $line->credit;
}
// Lettering code
// Matching code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="center">'.$line->lettering_code.'</td>';
if (!$i) {

View File

@@ -63,8 +63,8 @@ $massdate = dol_mktime(0, 0, 0, GETPOSTINT('massdatemonth'), GETPOSTINT('massdat
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookkeepinglist';
$toselect = GETPOST('toselect', 'array:int');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php'));
// Search Parameters
$search_mvt_num = GETPOST('search_mvt_num', 'alpha');
@@ -785,7 +785,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
dol_print_error($db);
}
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}
@@ -853,7 +853,7 @@ if (GETPOSTINT('nomassaction') || in_array($massaction, array('preunletteringaut
}
$massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="list">';
if ($optioncss != '') {
@@ -1055,7 +1055,7 @@ if (!empty($arrayfields['t.credit']['checked'])) {
print '<input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'">';
print '</td>';
}
// Lettering code
// Matching code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.dol_escape_htmltag($search_lettering_code).'"/>';
@@ -1306,6 +1306,7 @@ while ($i < min($num, $limit)) {
// Document ref
$modulepart = ''; // may be used by include*.tpl.php
if (!empty($arrayfields['t.doc_ref']['checked'])) {
$documentlink = '';
$objectstatic = null;
if ($line->doc_type === 'customer_invoice') {
@@ -1317,7 +1318,7 @@ while ($i < min($num, $limit)) {
//$modulepart = 'facture';
$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->invoice->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
} elseif ($line->doc_type === 'supplier_invoice') {
@@ -1436,7 +1437,7 @@ while ($i < min($num, $limit)) {
$totalarray['val']['totalcredit'] += $line->credit;
}
// Lettering code
// Matching code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="center">'.$line->lettering_code.'</td>';
if (!$i) {

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Nicolas Barrouillet <nicolas@pragma-tech.fr>
*
@@ -60,7 +60,7 @@ $socid = GETPOSTINT('socid');
$mode = (GETPOST('mode', 'alpha') ? GETPOST('mode', 'alpha') : 'customer'); // Only for tab view
$massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$toselect = GETPOST('toselect', 'array:int');
$type = GETPOST('type', 'alpha');
if ($type == 'sub') {
$context_default = 'bookkeepingbysubaccountlist';
@@ -866,7 +866,7 @@ if (GETPOSTINT('nomassaction') || in_array($massaction, array('preunletteringaut
}
$massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="list">';
if ($optioncss != '') {
@@ -908,7 +908,7 @@ if (empty($reshook)) {
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=create'.(!empty($type) ? '&type=sub' : '').'&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
}
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
if ($contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
if ($limit > 0 && $limit != $conf->liste_limit) {
@@ -1010,16 +1010,8 @@ if ($type == 'sub') {
}
if (empty($socid)) {
$stringforfirstkey = $langs->trans("KeyboardShortcut");
if ($conf->browser->name == 'chrome') {
$stringforfirstkey .= ' ALT +';
} elseif ($conf->browser->name == 'firefox') {
$stringforfirstkey .= ' ALT + SHIFT +';
} else {
$stringforfirstkey .= ' CTL +';
}
$moreforfilter .= '&nbsp;&nbsp;&nbsp;<a id="previous_account" accesskey="p" title="' . $stringforfirstkey . ' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>';
$moreforfilter .= '&nbsp;&nbsp;&nbsp;<a id="next_account" accesskey="n" title="' . $stringforfirstkey . ' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>';
$moreforfilter .= '&nbsp;&nbsp;&nbsp;<a id="previous_account" accesskey="p" title="' . $conf->browser->stringforfirstkey . ' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>';
$moreforfilter .= '&nbsp;&nbsp;&nbsp;<a id="next_account" accesskey="n" title="' . $conf->browser->stringforfirstkey . ' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>';
$moreforfilter .= <<<SCRIPT
<script type="text/javascript">
jQuery(document).ready(function() {
@@ -1110,7 +1102,7 @@ if (!empty($arrayfields['t.doc_ref']['checked'])) {
if (!empty($arrayfields['t.label_operation']['checked'])) {
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="'.dol_escape_htmltag($search_label_operation).'"/></td>';
}
// Lettering code
// Matching code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
@@ -1534,7 +1526,7 @@ while ($i < min($num, $limit)) {
}
}
// Lettering code
// Matching code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="center">'.dol_escape_htmltag((string) $line->lettering_code).'</td>';
if (!$i) {

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -69,47 +69,47 @@ class AccountancyCategory // extends CommonObject
public $id;
/**
* @var string Accountancy code
* @var ?string Accountancy code
*/
public $code;
/**
* @var string Accountancy Category label
* @var ?string Accountancy Category label
*/
public $label;
/**
* @var string Accountancy range account
* @var ?string Accountancy range account
*/
public $range_account;
/**
* @var int Sens of the account: 0: credit - debit, 1: debit - credit
* @var ?int Sens of the account: 0: credit - debit, 1: debit - credit
*/
public $sens;
/**
* @var int Category type of accountancy
* @var ?int Category type of accountancy
*/
public $category_type;
/**
* @var string Formula
* @var ?string Formula
*/
public $formula;
/**
* @var int Position
* @var ?int Position
*/
public $position;
/**
* @var int country id
* @var ?int country id
*/
public $fk_country;
/**
* @var int Is active
* @var ?int Is active
*/
public $active;
@@ -399,7 +399,6 @@ class AccountancyCategory // extends CommonObject
*/
public function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error = 0;
$sql = "DELETE FROM ".$this->db->prefix().$this->table_element;
@@ -438,6 +437,7 @@ class AccountancyCategory // extends CommonObject
public function display($id)
{
global $conf;
$sql = "SELECT t.rowid, t.account_number, t.label";
$sql .= " FROM ".$this->db->prefix()."accounting_account as t";
$sql .= " WHERE t.fk_accounting_category = ".((int) $id);

View File

@@ -85,6 +85,8 @@ class AccountancyExport
public static $EXPORT_TYPE_GESTIMUMV5 = 135;
/** @var int */
public static $EXPORT_TYPE_ISUITEEXPERT = 200;
/** @var int */
public static $EXPORT_TYPE_ISTEA = 205;
// Generic FEC after that
/** @var int */
public static $EXPORT_TYPE_FEC = 1000;
@@ -161,6 +163,7 @@ class AccountancyExport
self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinumv3'),
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinumv5'),
self::$EXPORT_TYPE_ISUITEEXPERT => 'Export iSuite Expert',
self::$EXPORT_TYPE_ISTEA => $langs->trans('Modelcsv_ISTEA'),
);
$listofgenericformatexport = array(
@@ -223,6 +226,7 @@ class AccountancyExport
self::$EXPORT_TYPE_FEC => 'fec',
self::$EXPORT_TYPE_FEC2 => 'fec2',
self::$EXPORT_TYPE_ISUITEEXPERT => 'isuiteexpert',
self::$EXPORT_TYPE_ISTEA => 'istea',
);
global $hookmanager;
@@ -317,6 +321,10 @@ class AccountancyExport
'label' => 'iSuite Expert',
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
),
self::$EXPORT_TYPE_ISTEA => array(
'label' => 'ISTEA',
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
),
),
'cr' => array(
'1' => $langs->trans("Unix"),
@@ -539,6 +547,9 @@ class AccountancyExport
case self::$EXPORT_TYPE_ISUITEEXPERT:
$this->exportiSuiteExpert($TData, $exportFile);
break;
case self::$EXPORT_TYPE_ISTEA:
$this->exportISTEA($TData, $exportFile);
break;
default:
global $hookmanager;
$parameters = array('format' => $formatexportset, 'exportFile' => $exportFile);
@@ -1345,6 +1356,63 @@ class AccountancyExport
}
}
/**
* Export format : ISTEA
*
* @param BookKeepingLine[] $objectLines data
* @param ?resource $exportFile [=null] File resource to export or print if null
* @return void
*/
public function exportISTEA($objectLines, $exportFile = null)
{
global $conf;
$separator = ';';
$end_line = "\n";
// parcours du tableau pour recuperation des numero de compte des tiers pour pouvoir les fournir dans la bonne ligne pour istea
$tiers = [];
foreach ($objectLines as $line) {
if ($line->subledger_account && substr($line->subledger_account, 0, 1) == '4') {
$tiers[$line->piece_num] = $line->subledger_label;
}
}
foreach ($objectLines as $line) {
$date_document = dol_print_date($line->doc_date, '%d/%m/%Y');
/*** preparation du champ label operation pour istea ***/
// retrecissement du champs car ISTEA n'affiche pas bcp de caract<63>re.
$search = array('Paiement fournisseur ', 'Virement ', 'Paiement ');
$replace = array('Paiemt fourn ','Virt ','Paiemt ');
$label_operation = str_replace($search, $replace, $line->label_operation);
// encadrement par des ' si le champs contient le separateur
$label_operation = preg_match('/'.$separator.'/', $label_operation) ? "'".$label_operation."'" : $label_operation;
$tab = array();
// export configurable
$tab[] = $line->piece_num; // colonne 1 : numero de piece ISTEA
$tab[] = $date_document; // colonne 2 : date ISTEA
$tab[] = $line->doc_ref; // colonne 3 : reference piece ISTEA
$tab[] = array_key_exists($line->piece_num, $tiers) ? $tiers[$line->piece_num] : ''; // colonne 4 : nom tiers ISTEA
$tab[] = length_accountg(($line->subledger_account && (substr($line->subledger_account, 0, 2) == substr($line->numero_compte, 0, 2))) ? $line->subledger_account : $line->numero_compte); // colonne 5 : numero de compte ISTEA
$tab[] = length_accountg($line->subledger_account ? $line->subledger_account : $line->numero_compte); // colonne 6 : numero de compte
$tab[] = length_accountg($line->subledger_account ? $line->numero_compte : ''); // G // colonne 7 : numero de compte principal (divers paiement ou 40100000 ou 41100000)
$tab[] = ($line->doc_type == 'bank') ? $label_operation : ($line->subledger_account ? $line->subledger_label : $line->label_compte); // colonne 8 : label de l'operation ISTEA
$tab[] = $label_operation; // colonne 9 : label de l'operation (semble non prise en compte par ISTEA)
$tab[] = price2num($line->debit); // colonne 10 : debit ISTEA
$tab[] = price2num($line->credit); // colonne 11 : credit ISTEA
$tab[] = $line->code_journal; // colonne 12 : journal ISTEA
$output = mb_convert_encoding('"'.implode('"'.$separator.'"', $tab).'"'.$this->end_line, 'ISO-8859-1');
if ($exportFile) {
fwrite($exportFile, $output);
} else {
print $output;
}
}
}
/**
* Export format : FEC
* Last review for this format : 2023/10/12 Alexandre Spangaro (aspangaro@open-dsi.fr)
@@ -1406,20 +1474,21 @@ class AccountancyExport
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
$refInvoice = '';
$invoice = null;
if ($line->doc_type == 'customer_invoice') {
// Customer invoice
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$invoice = new Facture($this->db);
$invoice->fetch($line->fk_doc);
$refInvoice = $invoice->ref;
$refInvoice = (string) $invoice->ref;
} elseif ($line->doc_type == 'supplier_invoice') {
// Supplier invoice
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$invoice = new FactureFournisseur($this->db);
$invoice->fetch($line->fk_doc);
$refInvoice = $invoice->ref_supplier;
$refInvoice = (string) $invoice->ref_supplier;
}
$tab = array();
@@ -1508,10 +1577,9 @@ class AccountancyExport
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_EXPENSEREPORT_SOURCE_FILE')) {
$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
}
} elseif ($line->doc_type == 'supplier_invoice') {
} elseif ($line->doc_type == 'supplier_invoice' && $invoice instanceof FactureFournisseur) {
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_SUPPLIERINVOICE_SOURCE_FILE')) {
'@phan-var-force FactureFournisseur $invoice';
/** @var FactureFournisseur $invoice */
$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
$objectDirPath .= '/' . rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
}
@@ -1626,20 +1694,21 @@ class AccountancyExport
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
$refInvoice = '';
$invoice = null;
if ($line->doc_type == 'customer_invoice') {
// Customer invoice
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$invoice = new Facture($this->db);
$invoice->fetch($line->fk_doc);
$refInvoice = $invoice->ref;
$refInvoice = (string) $invoice->ref;
} elseif ($line->doc_type == 'supplier_invoice') {
// Supplier invoice
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$invoice = new FactureFournisseur($this->db);
$invoice->fetch($line->fk_doc);
$refInvoice = $invoice->ref_supplier;
$refInvoice = (string) $invoice->ref_supplier;
}
$tab = array();
@@ -1728,10 +1797,9 @@ class AccountancyExport
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_EXPENSEREPORT_SOURCE_FILE')) {
$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
}
} elseif ($line->doc_type == 'supplier_invoice') {
} elseif ($line->doc_type == 'supplier_invoice' && $invoice instanceof FactureFournisseur) {
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_SUPPLIERINVOICE_SOURCE_FILE')) {
'@phan-var-force FactureFournisseur $invoice';
/** @var FactureFournisseur $invoice */
$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
$objectDirPath .= '/' . rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
}

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
/* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -66,22 +67,22 @@ class AccountancyReport // extends CommonObject
public $id;
/**
* @var string Accountancy code
* @var ?string Accountancy code
*/
public $code;
/**
* @var string Accountancy Category label
* @var ?string Accountancy Category label
*/
public $label;
/**
* @var int country id
* @var ?int country id
*/
public $fk_country;
/**
* @var int Is active
* @var ?int Is active
*/
public $active;
@@ -229,7 +230,6 @@ class AccountancyReport // extends CommonObject
*/
public function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error = 0;
// Clean parameters

View File

@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -80,17 +80,17 @@ class AccountingAccount extends CommonObject
public $datec;
/**
* @var string pcg version
* @var ?string pcg version
*/
public $fk_pcg_version;
/**
* @var string pcg type
* @var ?string pcg type
*/
public $pcg_type;
/**
* @var string account number
* @var ?string account number
*/
public $account_number;
@@ -115,12 +115,12 @@ class AccountingAccount extends CommonObject
public $status;
/**
* @var string Label of account
* @var ?string Label of account
*/
public $label;
/**
* @var string Label short of account
* @var ?string Label short of account
*/
public $labelshort;
@@ -358,7 +358,7 @@ class AccountingAccount extends CommonObject
$sql = "UPDATE " . $this->db->prefix() . $this->table_element;
$sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null");
$sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null");
$sql .= " , pcg_type = '" . $this->db->escape($this->pcg_type) . "'";
$sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'";
$sql .= " , account_parent = " . (int) $this->account_parent;
$sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "''");
@@ -436,16 +436,14 @@ class AccountingAccount extends CommonObject
if ($result > 0) {
$this->db->begin();
if (!$error) {
$sql = "DELETE FROM " . $this->db->prefix() . $this->table_element;
$sql .= " WHERE rowid=" . ((int) $this->id);
$sql = "DELETE FROM " . $this->db->prefix() . $this->table_element;
$sql .= " WHERE rowid=" . ((int) $this->id);
dol_syslog(get_class($this) . "::delete sql=" . $sql);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = "Error " . $this->db->lasterror();
}
dol_syslog(get_class($this) . "::delete sql=" . $sql);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = "Error " . $this->db->lasterror();
}
// Commit or rollback
@@ -737,7 +735,7 @@ class AccountingAccount extends CommonObject
* @param FactureLigne|SupplierInvoiceLine $factureDet Facture Det
* @param array<string,int> $accountingAccount Array of Accounting account
* @param string $type Customer / Supplier
* @return array{suggestedaccountingaccountbydefaultfor:string,suggestedaccountingaccountfor:string,suggestedid:?int,code_l:string,code_p:string,code_t:string}|int<-1,-1> Array of accounting accounts suggested or < 0 if technical error.
* @return array{suggestedaccountingaccountbydefaultfor:''|'eec'|'eecwithoutvatnumber'|'eecwithvat'|'export',suggestedaccountingaccountfor:'deposit'|'eec'|'eecwithoutvatnumber'|'eecwithvat'|'export'|'prodserv'|'thirdparty',suggestedid:?int,code_l:string,code_p:?string,code_t:string}|int<-1,-1> Array of accounting accounts suggested or < 0 if technical error.
* 'suggestedaccountingaccountbydefaultfor'=>Will be used for the label to show on tooltip for account by default on any product
* 'suggestedaccountingaccountfor'=>Is the account suggested for this product
*/
@@ -889,10 +887,10 @@ class AccountingAccount extends CommonObject
return -1;
}
$code_l = $accountdeposittoventilated->ref;
$code_l = (string) $accountdeposittoventilated->ref;
$code_p = '';
$code_t = '';
$suggestedid = $accountdeposittoventilated->rowid;
$suggestedid = (int) $accountdeposittoventilated->rowid;
$suggestedaccountingaccountfor = 'deposit';
}
@@ -908,10 +906,10 @@ class AccountingAccount extends CommonObject
} elseif ($type == 'supplier') {
$accountdeposittoventilated->fetch(0, getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'), 1);
}
$code_l = $accountdeposittoventilated->ref;
$code_l = (string) $accountdeposittoventilated->ref;
$code_p = '';
$code_t = '';
$suggestedid = $accountdeposittoventilated->rowid;
$suggestedid = (int) $accountdeposittoventilated->rowid;
$suggestedaccountingaccountfor = 'deposit';
}
}

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2017-2022 OpenDSI <support@open-dsi.fr>
/* Copyright (C) 2017-2022 OpenDSI <support@open-dsi.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Alexandre Janniaux <alexandre.janniaux@gmail.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Alexandre Janniaux <alexandre.janniaux@gmail.com>
* Copyright (C) 2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -217,7 +218,7 @@ class AccountingJournal extends CommonObject
$result = '';
$url = DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35';
$url = dolBuildUrl(DOL_URL_ROOT.'/accountancy/admin/journals_list.php', ['id' => 35]);
$label = '<u>'.$langs->trans("ShowAccountingJournal").'</u>';
if (!empty($this->code)) {
@@ -375,7 +376,24 @@ class AccountingJournal extends CommonObject
} elseif (empty($reshook)) {
switch ($this->nature) {
case 1: // Various Journal
$data = $this->getAssetData($user, $type, $date_start, $date_end, $in_bookkeeping);
if (isModEnabled('asset') && !getDolGlobalInt('ACCOUNTING_DISABLE_TRANSFER_ON_ASSETS')) {
$tmp = $this->getAssetData($user, $type, $date_start, $date_end, $in_bookkeeping);
if (is_array($tmp)) {
$data = array_merge($data, $tmp);
}
}
if (isModEnabled('invoice') && !getDolGlobalInt('ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS')) {
$tmp = $this->getDiscountCustomer($user, $type, $date_start, $date_end, $in_bookkeeping);
if (is_array($tmp)) {
$data = array_merge($data, $tmp);
}
}
if (isModEnabled('supplier_invoice') && !getDolGlobalInt('ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS')) {
$tmp = $this->getDiscountSupplier($user, $type, $date_start, $date_end, $in_bookkeeping);
if (is_array($tmp)) {
$data = array_merge($data, $tmp);
}
}
break;
// case 2: // Sells Journal
// case 3: // Purchases Journal
@@ -429,6 +447,7 @@ class AccountingJournal extends CommonObject
$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation as ad";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "asset as a ON a.rowid = ad.fk_asset";
$sql .= " WHERE a.entity IN (" . getEntity('asset', 0) . ')'; // We don't share object for accountancy, we use source object sharing
$sql .= " AND a.status > 0";
if ($in_bookkeeping == 'already') {
$sql .= " AND EXISTS (SELECT iab.fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS iab WHERE iab.fk_docdet = ad.rowid AND doc_type = 'asset')";
} elseif ($in_bookkeeping == 'notyet') {
@@ -507,7 +526,7 @@ class AccountingJournal extends CommonObject
$element = array(
'ref' => dol_trunc($element_static->ref, 16, 'right', 'UTF-8', 1),
'error' => array_key_exists('error', $pre_data_info) ? $pre_data_info['error'] : '',
'error' => array_key_exists('error', $pre_data_info) ? $pre_data_info['error'] : '', // @phpstan-ignore-line
'blocks' => array(),
);
@@ -524,7 +543,7 @@ class AccountingJournal extends CommonObject
$account_infos = $this->getAccountingAccountInfos($account);
if ($type == 'view') {
$account_to_show = length_accounta($account);
$account_to_show = length_accountg($account);
if (($account_to_show == "") || $account_to_show == 'NotDefined') {
$account_to_show = '<span class="error">' . $langs->trans("AssetInAccountNotDefined") . '</span>';
}
@@ -644,7 +663,7 @@ class AccountingJournal extends CommonObject
$account_infos = $this->getAccountingAccountInfos($account);
if ($type == 'view') {
$account_to_show = length_accounta($account);
$account_to_show = length_accountg($account);
if (($account_to_show == "") || $account_to_show == 'NotDefined') {
$account_to_show = '<span class="error">' . $langs->trans("AssetInAccountNotDefined") . '</span>';
}
@@ -711,6 +730,614 @@ class AccountingJournal extends CommonObject
return $journal_data;
}
/**
* Get customer discount (escompte) data for various journal
*
* @param User $user User who get infos
* @param 'view'|'bookkeeping'|'csv' $type Type data returned ('view', 'bookkeeping', 'csv')
* @param ?int $date_start Filter 'start date'
* @param ?int $date_end Filter 'end date'
* @param 'already'|'notyet' $in_bookkeeping Filter 'in bookkeeping' ('already', 'notyet')
* @return int<-1,-1>|array<int,array{ref:string,error:?string,blocks:array<array<array{date:string,piece:string,account_accounting:string,subledger_account:string,label_operation:string,debit:string,credit:string}|array{doc_date:''|int,date_lim_reglement:string,doc_ref:string,date_creation:int,doc_type:string,fk_doc:int|string,fk_docdet:int|string,thirdparty_code:string,subledger_account:string,subledger_label:string,numero_compte:string,label_compte:string,label_operation:string,montant:string,sens:string,debit:int|float|string,credit:int|float|string,code_journal:string,journal_label:string,piece_num:string,import_key:string,fk_user_author:string,entity:string}>>}> Return integer <0 if KO, array
*/
public function getDiscountCustomer(User $user, $type = 'view', $date_start = null, $date_end = null, $in_bookkeeping = 'notyet')
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
$langs->loadLangs(array('bills'));
// Clean parameters
if (empty($type)) {
$type = 'view';
}
if (empty($in_bookkeeping)) {
$in_bookkeeping = 'notyet';
}
// Build SQL - Customer invoices closed by discount
$sql = "SELECT f.rowid, f.ref, f.datef, f.fk_soc, f.total_ttc";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql .= " WHERE f.entity IN (".getEntity('invoice', 0).')'; // We don't share object for accountancy, we use source object sharing
$sql .= " AND f.fk_statut > 0";
if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { // Non common setup
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
} else {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
}
$sql .= " AND f.close_code = 'discount_vat'";
if ($date_start && $date_end) {
$sql .= " AND f.datef >= '".$this->db->idate($date_start)."' AND f.datef <= '".$this->db->idate($date_end)."'";
}
if (getDolGlobalString('ACCOUNTING_DATE_START_BINDING')) {
$sql .= " AND f.datef >= '".$this->db->idate(getDolGlobalInt('ACCOUNTING_DATE_START_BINDING'))."'";
}
if ($in_bookkeeping == 'already') {
$sql .= " AND EXISTS (SELECT 1 FROM ".MAIN_DB_PREFIX."accounting_bookkeeping ab";
$sql .= " WHERE ab.doc_type = 'customer_invoice' AND ab.fk_doc = f.rowid AND ab.piece_num LIKE 'OD-ESC-%')";
} elseif ($in_bookkeeping == 'notyet') {
$sql .= " AND NOT EXISTS (SELECT 1 FROM ".MAIN_DB_PREFIX."accounting_bookkeeping ab";
$sql .= " WHERE ab.doc_type = 'customer_invoice' AND ab.fk_doc = f.rowid AND ab.piece_num LIKE 'OD-ESC-%')";
}
$sql .= " ORDER BY f.datef";
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->errors[] = $this->db->lasterror();
return -1;
}
$journal = $this->code;
$journal_label_formatted = $langs->transnoentities($this->label);
$now = dol_now();
$journal_data = array();
$invoice_static = new Facture($this->db);
$customer_static = new Societe($this->db);
// Accounting accounts
$acc_disc_granted = getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_GRANTED');
$acc_vat_coll_def = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT'); // Normal to apply vat default account for buy with customer's discount
while ($obj = $this->db->fetch_object($resql)) {
if ($invoice_static->fetch((int) $obj->rowid) <= 0) {
continue;
}
$customer_static->fetch($invoice_static->socid);
$account_customer_general = !empty($customer_static->accountancy_code_customer_general) ? $customer_static->accountancy_code_customer_general : getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER');
$account_customer_subsidiary = !empty($customer_static->code_compta_client) ? $customer_static->code_compta_client : '';
$piece_link = $invoice_static->getNomUrl(1, 'withlabel');
// Discounted amount including tax
$paid = (float) price2num($invoice_static->getSommePaiement(), 'MT');
$usedcn = (float) price2num($invoice_static->getSumOfCreditNotesUsed(), 'MT');
$useddep = (float) price2num($invoice_static->getSumDepositsUsed(), 'MT');
$ttc_inv = (float) price2num($invoice_static->total_ttc, 'MT');
$escompte_ttc = (float) price2num(max(0, $ttc_inv - $paid - $usedcn - $useddep), 'MT');
if ($escompte_ttc <= 0) {
continue;
}
$bookkeeping_static = new BookKeeping($this->db);
$label_discount = $bookkeeping_static->accountingLabelForOperation($customer_static->getNomUrl(1, 'customer'), $invoice_static->ref, $langs->trans('DiscountGranted'));
// Distribution including VAT by rate
$ttcByRate = array();
$totalTTC = 0.0;
foreach ((array) $invoice_static->lines as $li) {
$ttc = (float) $li->total_ttc;
if (!$ttc) {
continue;
}
$key = number_format((float) $li->tva_tx, 3, '.', '');
if (!isset($ttcByRate[$key])) {
$ttcByRate[$key] = 0.0;
}
$ttcByRate[$key] += $ttc;
$totalTTC += $ttc;
}
if ($totalTTC <= 0) {
$ttcByRate = array("0.000" => $escompte_ttc);
$totalTTC = $escompte_ttc;
}
$element = array(
'ref' => dol_trunc($invoice_static->ref, 16, 'right', 'UTF-8', 1),
'error' => '',
'blocks' => array(),
);
$docdate = $this->db->jdate($obj->datef);
$docdate_fmt = dol_print_date($docdate, 'day');
$sumTTC = 0.0;
$i = 0;
$n = count($ttcByRate);
foreach ($ttcByRate as $rateStr => $ttcRateOnInvoice) {
$i++;
$rate = (float) $rateStr;
$ttc_part = (float) $escompte_ttc * ($ttcRateOnInvoice / $totalTTC);
if ($i == $n) {
$ttc_part = (float) price2num($escompte_ttc - $sumTTC, 'MT');
} else {
$ttc_part = (float) price2num($ttc_part, 'MT');
$sumTTC = (float) price2num($sumTTC + $ttc_part, 'MT');
}
if ($rate > 0) {
$ht_part = (float) price2num($ttc_part / (1 + $rate / 100), 'MT');
$tva_part = (float) price2num($ttc_part - $ht_part, 'MT');
} else {
$ht_part = $ttc_part;
$tva_part = 0.0;
}
// VAT deductible account (by rate if available)
// TODO write function to search the same vat code like the invoice
$acc_vat_coll = $acc_vat_coll_def;
$lines_view = array();
$lines_book = array();
// Discount granted
$acc_info_discountgranted = $this->getAccountingAccountInfos($acc_disc_granted);
if ($type == 'view') {
$lines_view[] = array(
'date' => $docdate_fmt,
'piece' => $piece_link,
'account_accounting' => length_accountg($acc_disc_granted),
'subledger_account' => '',
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('HT') . " (".$rateStr."%)",
'debit' => price($ht_part),
'credit' => '',
);
} elseif ($type == 'bookkeeping' && $acc_info_discountgranted['found']) {
$lines_book[] = array(
'doc_date' => $docdate,
'date_lim_reglement' => '',
'doc_ref' => $invoice_static->ref,
'date_creation' => $now,
'doc_type' => 'customer_invoice',
'fk_doc' => $invoice_static->id,
'fk_docdet' => 0,
'thirdparty_code' => $customer_static->code_client,
'subledger_account' => '',
'subledger_label' => '',
'numero_compte' => $acc_disc_granted,
'label_compte' => $acc_info_discountgranted['label'],
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('HT') . " (".$rateStr."%)",
'montant' => $ht_part,
'sens' => 'D',
'debit' => $ht_part,
'credit' => 0,
'code_journal' => $journal,
'journal_label' => $journal_label_formatted,
'piece_num' => 'OD-ESC-'.$invoice_static->ref,
'import_key' => '',
'fk_user_author' => $user->id,
'entity' => $conf->entity,
);
}
// VAT
if ($tva_part > 0) {
$acc_info_vatbuy = $this->getAccountingAccountInfos($acc_vat_coll);
if ($type == 'view') {
$lines_view[] = array(
'date' => $docdate_fmt,
'piece' => $piece_link,
'account_accounting' => length_accountg($acc_vat_coll),
'subledger_account' => '',
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('VAT') . " (".$rateStr."%)",
'debit' => price($tva_part),
'credit' => '',
);
} elseif ($type == 'bookkeeping' && $acc_info_vatbuy['found']) {
$lines_book[] = array(
'doc_date' => $docdate,
'date_lim_reglement' => '',
'doc_ref' => $invoice_static->ref,
'date_creation' => $now,
'doc_type' => 'customer_invoice',
'fk_doc' => $invoice_static->id,
'fk_docdet' => 0,
'thirdparty_code' => $customer_static->code_client,
'subledger_account' => '',
'subledger_label' => '',
'numero_compte' => $acc_vat_coll,
'label_compte' => $acc_info_vatbuy['label'],
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('VAT') . " (".$rateStr."%)",
'montant' => $tva_part,
'sens' => 'D',
'debit' => $tva_part,
'credit' => 0,
'code_journal' => $journal,
'journal_label' => $journal_label_formatted,
'piece_num' => 'OD-ESC-'.$invoice_static->ref,
'import_key' => '',
'fk_user_author' => $user->id,
'entity' => $conf->entity,
);
}
}
// Thirdparty
$acc_info_customeraccount = $this->getAccountingAccountInfos($account_customer_general);
if ($type == 'view') {
$lines_view[] = array(
'date' => $docdate_fmt,
'piece' => $piece_link,
'account_accounting' => length_accountg($account_customer_general),
'subledger_account' => length_accounta($account_customer_subsidiary),
'label_operation' => $label_discount.' - '.$langs->transnoentitiesnoconv('Customer'),
'debit' => '',
'credit' => price($ttc_part),
);
$element['blocks'][] = $lines_view;
} elseif ($type == 'bookkeeping' && $acc_info_customeraccount['found']) {
$lines_book[] = array(
'doc_date' => $docdate,
'date_lim_reglement' => '',
'doc_ref' => $invoice_static->ref,
'date_creation' => $now,
'doc_type' => 'customer_invoice',
'fk_doc' => $invoice_static->id,
'fk_docdet' => 0,
'thirdparty_code' => $customer_static->code_client,
'subledger_account' => $account_customer_subsidiary,
'subledger_label' => $customer_static->name,
'numero_compte' => $account_customer_general,
'label_compte' => $acc_info_customeraccount['label'],
'label_operation' => $label_discount.' - '.$langs->transnoentitiesnoconv('Customer'),
'montant' => $ttc_part,
'sens' => 'C',
'debit' => 0,
'credit' => $ttc_part,
'code_journal' => $journal,
'journal_label' => $journal_label_formatted,
'piece_num' => 'OD-ESC-'.$invoice_static->ref,
'import_key' => '',
'fk_user_author' => $user->id,
'entity' => $conf->entity,
);
$element['blocks'][] = $lines_book;
} else { // CSV
$element['blocks'][] = array(
$docdate, // Date
$invoice_static->ref, // Piece
length_accountg($acc_disc_granted), // Account
$label_discount." (".$rateStr."%)", // Label
price($ht_part), // Debit
'', // Credit
);
if ($tva_part > 0) {
$element['blocks'][] = array(
$docdate, $invoice_static->ref, length_accountg($acc_vat_coll), $label_discount." ". $langs->transnoentitiesnoconv('VAT') . " (".$rateStr."%)", price($tva_part), ''
);
}
$element['blocks'][] = array(
$docdate, $invoice_static->ref, length_accountg($account_customer_general), $label_discount.' - '.$langs->transnoentitiesnoconv('Customer'), '', price($ttc_part)
);
}
}
$journal_data[(int) $invoice_static->id] = $element;
}
return $journal_data;
}
/**
* Get supplier discount (escompte) data for various journal
*
* @param User $user User who get infos
* @param 'view'|'bookkeeping'|'csv' $type Type data returned ('view', 'bookkeeping', 'csv')
* @param ?int $date_start Filter 'start date'
* @param ?int $date_end Filter 'end date'
* @param 'already'|'notyet' $in_bookkeeping Filter 'in bookkeeping' ('already', 'notyet')
* @return int<-1,-1>|array<int,array{ref:string,error:?string,blocks:array<array<array{date:string,piece:string,account_accounting:string,subledger_account:string,label_operation:string,debit:string,credit:string}|array{doc_date:''|int,date_lim_reglement:string,doc_ref:string,date_creation:int,doc_type:string,fk_doc:int|string,fk_docdet:int|string,thirdparty_code:string,subledger_account:string,subledger_label:string,numero_compte:string,label_compte:string,label_operation:string,montant:string,sens:string,debit:int|float|string,credit:int|float|string,code_journal:string,journal_label:string,piece_num:string,import_key:string,fk_user_author:string,entity:string}>>}> Return integer <0 if KO, array
*/
public function getDiscountSupplier(User $user, $type = 'view', $date_start = null, $date_end = null, $in_bookkeeping = 'notyet')
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
$langs->loadLangs(array('suppliers'));
// Clean parameters
if (empty($type)) {
$type = 'view';
}
if (empty($in_bookkeeping)) {
$in_bookkeeping = 'notyet';
}
// SQL - Supplier invoices closed by discount
$sql = "SELECT ff.rowid, ff.ref, ff.datef, ff.fk_soc, ff.total_ttc";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
$sql .= " WHERE ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
$sql .= " AND ff.fk_statut > 0";
if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
$sql .= " AND ff.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")";
} else {
$sql .= " AND ff.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")";
}
$sql .= " AND ff.close_code = 'discount_vat'";
if ($date_start && $date_end) {
$sql .= " AND ff.datef >= '".$this->db->idate($date_start)."' AND ff.datef <= '".$this->db->idate($date_end)."'";
}
if (getDolGlobalString('ACCOUNTING_DATE_START_BINDING')) {
$sql .= " AND ff.datef >= '".$this->db->idate(getDolGlobalInt('ACCOUNTING_DATE_START_BINDING'))."'";
}
if ($in_bookkeeping == 'already') {
$sql .= " AND EXISTS (SELECT 1 FROM ".MAIN_DB_PREFIX."accounting_bookkeeping ab";
$sql .= " WHERE ab.doc_type = 'supplier_invoice' AND ab.fk_doc = ff.rowid AND ab.piece_num LIKE 'OD-ESC-FRS-%')";
} elseif ($in_bookkeeping == 'notyet') {
$sql .= " AND NOT EXISTS (SELECT 1 FROM ".MAIN_DB_PREFIX."accounting_bookkeeping ab";
$sql .= " WHERE ab.doc_type = 'supplier_invoice' AND ab.fk_doc = ff.rowid AND ab.piece_num LIKE 'OD-ESC-FRS-%')";
}
$sql .= " ORDER BY ff.datef";
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->errors[] = $this->db->lasterror();
return -1;
}
$journal = $this->code;
$journal_label_formatted = $langs->transnoentities($this->label);
$now = dol_now();
$journal_data = array();
$invoicesupplier_static = new FactureFournisseur($this->db);
$supplier_static = new Societe($this->db);
// Accounting accounts
$acc_disc_recv = getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_RECEIVED');
$acc_vat_ded_def = getDolGlobalString('ACCOUNTING_VAT_SOLD_ACCOUNT'); // Normal to apply vat default account for sold with supplier's discount
while ($obj = $this->db->fetch_object($resql)) {
if ($invoicesupplier_static->fetch((int) $obj->rowid) <= 0) {
continue;
}
$supplier_static->fetch($invoicesupplier_static->socid);
$account_supplier_general = !empty($supplier_static->accountancy_code_supplier_general) ? $supplier_static->accountancy_code_supplier_general : getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER');
$account_supplier_subsidiary = !empty($supplier_static->code_compta_fournisseur) ? $supplier_static->code_compta_fournisseur : '';
$piece_link = $invoicesupplier_static->getNomUrl(1, 'withlabel');
// Discounted amount including tax
$paid = (float) price2num($invoicesupplier_static->getSommePaiement(), 'MT');
$usedcn = (float) price2num($invoicesupplier_static->getSumOfCreditNotesUsed(), 'MT');
$useddep = (float) price2num($invoicesupplier_static->getSumDepositsUsed(), 'MT');
$ttc_inv = (float) price2num($invoicesupplier_static->total_ttc, 'MT');
$escompte_ttc = (float) price2num(max(0, $ttc_inv - $paid - $usedcn - $useddep), 'MT');
if ($escompte_ttc <= 0) {
continue;
}
$bookkeeping_static = new BookKeeping($this->db);
$label_discount = $bookkeeping_static->accountingLabelForOperation($supplier_static->getNomUrl(1, 'supplier'), $invoicesupplier_static->ref, $langs->trans('DiscountReceived'));
// Distribution including VAT by rate
$ttcByRate = array();
$totalTTC = 0.0;
foreach ((array) $invoicesupplier_static->lines as $li) {
$ttc = (float) $li->total_ttc;
if (!$ttc) {
continue;
}
$key = number_format((float) $li->tva_tx, 3, '.', '');
if (!isset($ttcByRate[$key])) {
$ttcByRate[$key] = 0.0;
}
$ttcByRate[$key] += $ttc;
$totalTTC += $ttc;
}
if ($totalTTC <= 0) {
$ttcByRate = array("0.000" => $escompte_ttc);
$totalTTC = $escompte_ttc;
}
$element = array(
'ref' => dol_trunc($invoicesupplier_static->ref, 16, 'right', 'UTF-8', 1),
'error' => '',
'blocks' => array(),
);
$docdate = $this->db->jdate($obj->datef);
$docdate_fmt = dol_print_date($docdate, 'day');
$sumTTC = 0.0;
$i = 0;
$n = count($ttcByRate);
foreach ($ttcByRate as $rateStr => $ttcRateOnInvoice) {
$i++;
$rate = (float) $rateStr;
$ttc_part = $escompte_ttc * ($ttcRateOnInvoice / $totalTTC);
if ($i == $n) {
$ttc_part = (float) price2num($escompte_ttc - $sumTTC, 'MT');
} else {
$ttc_part = (float) price2num($ttc_part, 'MT');
$sumTTC = (float) price2num($sumTTC + $ttc_part, 'MT');
}
if ($rate > 0) {
$ht_part = (float) price2num($ttc_part / (1 + $rate / 100), 'MT');
$tva_part = (float) price2num($ttc_part - $ht_part, 'MT');
} else {
$ht_part = $ttc_part;
$tva_part = 0.0;
}
// VAT collected account (by rate if available)
// TODO write function to search the same vat code like the supplier invoice
$acc_vat_ded = $acc_vat_ded_def;
$lines_view = array();
$lines_book = array();
// Thirdparty
$acc_info_supplieraccount = $this->getAccountingAccountInfos($account_supplier_general);
if ($type == 'view') {
$lines_view[] = array(
'date' => $docdate_fmt,
'piece' => $piece_link,
'account_accounting' => length_accountg($account_supplier_general),
'subledger_account' => length_accounta($account_supplier_subsidiary),
'label_operation' => $label_discount.' - '.$langs->transnoentitiesnoconv('Supplier'),
'debit' => price($ttc_part),
'credit' => '',
);
} elseif ($type == 'bookkeeping' && $acc_info_supplieraccount['found']) {
$lines_book[] = array(
'doc_date' => $docdate,
'date_lim_reglement' => '',
'doc_ref' => $invoicesupplier_static->ref,
'date_creation' => $now,
'doc_type' => 'supplier_invoice',
'fk_doc' => $invoicesupplier_static->id,
'fk_docdet' => 0,
'thirdparty_code' => $supplier_static->code_fournisseur,
'subledger_account' => $account_supplier_subsidiary,
'subledger_label' => $supplier_static->name,
'numero_compte' => $account_supplier_general,
'label_compte' => $acc_info_supplieraccount['label'],
'label_operation' => $label_discount.' - '.$langs->transnoentitiesnoconv('Supplier'),
'montant' => $ttc_part,
'sens' => 'D',
'debit' => $ttc_part,
'credit' => 0,
'code_journal' => $journal,
'journal_label' => $journal_label_formatted,
'piece_num' => 'OD-ESC-FRS-'.$invoicesupplier_static->ref,
'import_key' => '',
'fk_user_author' => $user->id,
'entity' => $conf->entity,
);
}
// Discount received
$acc_info_discountreceived = $this->getAccountingAccountInfos($acc_disc_recv);
if ($type == 'view') {
$lines_view[] = array(
'date' => $docdate_fmt,
'piece' => $piece_link,
'account_accounting' => length_accountg($acc_disc_recv),
'subledger_account' => '',
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('HT') . " (".$rateStr."%)",
'debit' => '',
'credit' => price($ht_part),
);
} elseif ($type == 'bookkeeping' && $acc_info_discountreceived['found']) {
$lines_book[] = array(
'doc_date' => $docdate,
'date_lim_reglement' => '',
'doc_ref' => $invoicesupplier_static->ref,
'date_creation' => $now,
'doc_type' => 'supplier_invoice',
'fk_doc' => $invoicesupplier_static->id,
'fk_docdet' => 0,
'thirdparty_code' => $supplier_static->code_fournisseur,
'subledger_account' => '',
'subledger_label' => '',
'numero_compte' => $acc_disc_recv,
'label_compte' => $acc_info_discountreceived['label'],
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('HT') . " (".$rateStr."%)",
'montant' => $ht_part,
'sens' => 'C',
'debit' => 0,
'credit' => $ht_part,
'code_journal' => $journal,
'journal_label' => $journal_label_formatted,
'piece_num' => 'OD-ESC-FRS-'.$invoicesupplier_static->ref,
'import_key' => '',
'fk_user_author' => $user->id,
'entity' => $conf->entity,
);
}
// VAT
if ($tva_part > 0) {
$acc_info_vatbuy = $this->getAccountingAccountInfos($acc_vat_ded);
if ($type == 'view') {
$lines_view[] = array(
'date' => $docdate_fmt,
'piece' => $piece_link,
'account_accounting' => length_accountg($acc_vat_ded),
'subledger_account' => '',
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('VAT') . " (".$rateStr."%)",
'debit' => '',
'credit' => price($tva_part),
);
$element['blocks'][] = $lines_view;
} elseif ($type == 'bookkeeping' && $acc_info_vatbuy['found']) {
$lines_book[] = array(
'doc_date' => $docdate,
'date_lim_reglement' => '',
'doc_ref' => $invoicesupplier_static->ref,
'date_creation' => $now,
'doc_type' => 'supplier_invoice',
'fk_doc' => $invoicesupplier_static->id,
'fk_docdet' => 0,
'thirdparty_code' => $supplier_static->code_fournisseur,
'subledger_account' => '',
'subledger_label' => '',
'numero_compte' => $acc_vat_ded,
'label_compte' => $acc_info_vatbuy['label'],
'label_operation' => $label_discount." - " .$langs->transnoentitiesnoconv('VAT') . " (".$rateStr."%)",
'montant' => $tva_part,
'sens' => 'C',
'debit' => 0,
'credit' => $tva_part,
'code_journal' => $journal,
'journal_label' => $journal_label_formatted,
'piece_num' => 'OD-ESC-FRS-'.$invoicesupplier_static->ref,
'import_key' => '',
'fk_user_author' => $user->id,
'entity' => $conf->entity,
);
$element['blocks'][] = $lines_book;
}
} else {
// si TVA = 0, pousser les 2 lignes view/bookkeeping déjà constituées
if ($type == 'view') {
$element['blocks'][] = $lines_view;
} elseif ($type == 'bookkeeping') {
$element['blocks'][] = $lines_book;
} else { // csv
$element['blocks'][] = array($docdate, $invoicesupplier_static->ref, length_accountg($account_supplier_general), $label_discount.' - '.$langs->transnoentitiesnoconv('Supplier'), price($ttc_part), '');
$element['blocks'][] = array($docdate, $invoicesupplier_static->ref, length_accountg($acc_disc_recv), $label_discount.' ('.$rateStr.'%)', '', price($ht_part));
}
}
// CSV
if ($type == 'csv') {
$element['blocks'][] = array(
$docdate, $invoicesupplier_static->ref, length_accountg($acc_vat_ded), $label_discount." ". $langs->transnoentitiesnoconv('VAT') . " (".$rateStr."%)", '', $tva_part > 0 ? price($tva_part) : ''
);
}
}
$journal_data[(int) $invoicesupplier_static->id] = $element;
}
return $journal_data;
}
/**
* Write bookkeeping
*
@@ -986,7 +1613,7 @@ class AccountingJournal extends CommonObject
self::$accounting_account_cached[$account] = array(
'found' => true,
'label' => $accountingaccount->label,
'code_formatted_1' => length_accounta(html_entity_decode($account)),
'code_formatted_1' => length_accountg(html_entity_decode($account)),
'label_formatted_1' => mb_convert_encoding(dol_trunc($accountingaccount->label, 32), 'ISO-8859-1'),
'label_formatted_2' => dol_trunc($accountingaccount->label, 32),
);
@@ -994,7 +1621,7 @@ class AccountingJournal extends CommonObject
self::$accounting_account_cached[$account] = array(
'found' => false,
'label' => '',
'code_formatted_1' => length_accounta(html_entity_decode($account)),
'code_formatted_1' => length_accountg(html_entity_decode($account)),
'label_formatted_1' => '',
'label_formatted_2' => '',
);

View File

@@ -49,11 +49,6 @@ class BookKeeping extends CommonObject
*/
public $table_element = 'accounting_bookkeeping';
/**
* @var int Entity
*/
public $entity;
/**
* @var BookKeepingLine[] Lines
*/
@@ -75,27 +70,27 @@ class BookKeeping extends CommonObject
public $date_lim_reglement;
/**
* @var string Doc type
* @var ?string Doc type
*/
public $doc_type;
/**
* @var string Doc ref
* @var ?string Doc ref
*/
public $doc_ref;
/**
* @var int ID
* @var ?int ID
*/
public $fk_doc;
/**
* @var int ID
* @var ?int ID
*/
public $fk_docdet;
/**
* @var string Thirdparty code
* @var ?string Thirdparty code
*/
public $thirdparty_code;
@@ -110,69 +105,69 @@ class BookKeeping extends CommonObject
public $subledger_label;
/**
* @var string doc_type
* @var ?string doc_type
*/
public $numero_compte;
/**
* @var string label compte
* @var ?string label compte
*/
public $label_compte;
/**
* @var string label operation
* @var ?string label operation
*/
public $label_operation;
/**
* @var float FEC:Debit
* @var ?float FEC:Debit
*/
public $debit;
/**
* @var float FEC:Credit
* @var ?float FEC:Credit
*/
public $credit;
/**
* @var float FEC:Amount (Not necessary)
* @var ?float FEC:Amount (Not necessary)
* @deprecated No more used (we have info into debit/credit and sens)
*/
public $montant;
/**
* @var float FEC:Amount (Not necessary)
* @var ?float FEC:Amount (Not necessary)
* @deprecated No more used (we have info into debit/credit and sens)
*/
public $amount;
/**
* @var string FEC:Sens (Not necessary)
* @var ?string FEC:Sens (Not necessary)
*/
public $sens;
/**
* @var int ID
* @var ?int ID
*/
public $fk_user_author;
/**
* @var string key for import
* @var ?string key for import
*/
public $import_key;
/**
* @var string code journal
* @var ?string code journal
*/
public $code_journal;
/**
* @var string label journal
* @var ?string label journal
*/
public $journal_label;
/**
* @var int accounting transaction id
* @var ?int accounting transaction id
*/
public $piece_num;
@@ -600,7 +595,8 @@ class BookKeeping extends CommonObject
$label .= '<br>';
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$this->piece_num;
$baseurl = DOL_URL_ROOT.'/accountancy/bookkeeping/card.php';
$query = ['piece_num' => $this->piece_num];
if ($option != 'nolink') {
// Add param to save lastsearch_values or not
@@ -609,9 +605,10 @@ class BookKeeping extends CommonObject
$add_save_lastsearch_values = 1;
}
if ($add_save_lastsearch_values) {
$url .= '&save_lastsearch_values=1';
$query += ['save_lastsearch_values' => 1];
}
}
$url = dolBuildUrl($baseurl, $query);
$linkclose = '';
if (empty($notooltip)) {
@@ -1060,7 +1057,7 @@ class BookKeeping extends CommonObject
$sql .= " AND t.subledger_account IS NOT NULL";
$sql .= " AND t.subledger_account <> ''";
$sortfield = 't.subledger_account'.($sortfield ? ','.$sortfield : '');
$sortorder = 'ASC'.($sortfield ? ','.$sortfield : '');
$sortorder = 'ASC'.($sortorder ? ','.$sortorder : '');
} else {
$sortfield = 't.numero_compte'.($sortfield ? ','.$sortfield : '');
$sortorder = 'ASC'.($sortorder ? ','.$sortorder : '');
@@ -1421,16 +1418,15 @@ class BookKeeping extends CommonObject
$sql .= " AND t.subledger_account <> ''";
$sql .= " GROUP BY t.numero_compte, t.subledger_account, t.subledger_label";
$sortfield = 't.subledger_account'.($sortfield ? ','.$sortfield : '');
$sortorder = 'ASC'.($sortfield ? ','.$sortfield : '');
$sortorder = 'ASC'.($sortorder ? ','.$sortorder : '');
} else {
$sql .= ' GROUP BY t.numero_compte';
$sortfield = 't.numero_compte'.($sortfield ? ','.$sortfield : '');
$sortorder = 'ASC'.($sortorder ? ','.$sortorder : '');
}
if (!empty($sortfield)) {
$sql .= $this->db->order($sortfield, $sortorder);
}
$sql .= $this->db->order($sortfield, $sortorder);
if (!empty($limit)) {
$sql .= $this->db->plimit($limit + 1, $offset);
}
@@ -1828,7 +1824,7 @@ class BookKeeping extends CommonObject
$this->db->begin();
// Call triggers
if (! $error && ! $notrigger) {
if (!$notrigger) {
$result = $this->call_trigger('BOOKKEEPING_DELETE', $user);
if ($result < 0) {
$error++;
@@ -2301,14 +2297,12 @@ class BookKeeping extends CommonObject
}
}
} elseif ($direction == 1) {
if (!$error) {
$sql = 'DELETE FROM '.$this->db->prefix().$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = 'Error '.$this->db->lasterror();
dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
}
$sql = 'DELETE FROM '.$this->db->prefix().$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = 'Error '.$this->db->lasterror();
dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
}
if (!$error) {

View File

@@ -557,7 +557,7 @@ class Lettering extends BookKeeping
$group_error++;
}
// Lettering/Unlettering the group of bookkeeping lines
// Matching/Unmatching the group of bookkeeping lines
if (!$group_error && $do_it) {
if ($unlettering) {
$result = $this->deleteLettering($bookkeeping_lines);
@@ -929,6 +929,10 @@ class Lettering extends BookKeeping
// Save list when is the first step of the recursive recursive function
$save_link_by_element = $link_by_element;
$save_element_by_link = $element_by_link;
} else {
// To satisfy static analysis (phpstan)
$save_link_by_element = null;
$save_element_by_link = null;
}
do {

View File

@@ -146,7 +146,7 @@ if (empty($reshook)) {
if ($result > 0) {
setEventMessages($langs->trans("AllMovementsWereRecordedAsValidated"), null, 'mesgs');
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
exit;
} else {
setEventMessages($langs->trans("NotAllMovementsCouldBeRecordedAsValidated"), null, 'errors');
@@ -176,7 +176,7 @@ if (empty($reshook)) {
} else {
setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
exit;
}
}
@@ -192,7 +192,7 @@ if (empty($reshook)) {
} else {
setEventMessages($langs->trans("AccountancyClosureInsertAccountingReversalSuccessfully"), null, 'mesgs');
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
exit;
}
}
@@ -345,7 +345,7 @@ $fiscal_period_nav_text = $langs->trans("FiscalPeriod");
$fiscal_period_nav_text .= '&nbsp;<a href="' . (isset($last_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $last_fiscal_period['id'] : '#" class="disabled') . '">' . img_previous() . '</a>';
$fiscal_period_nav_text .= '&nbsp;<a href="' . (isset($next_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $next_fiscal_period['id'] : '#" class="disabled') . '">' . img_next() . '</a>';
if (!empty($current_fiscal_period)) {
$fiscal_period_nav_text .= $current_fiscal_period['label'].' &nbsp;(' . (isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day') . '&nbsp;-&nbsp;' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')' : '');
$fiscal_period_nav_text .= $current_fiscal_period['label'].' &nbsp;(' . dol_print_date($current_fiscal_period['date_start'], 'day') . '&nbsp;-&nbsp;' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')';
}
print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy');

View File

@@ -49,6 +49,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("bills", "compta", "accountancy", "productbatch", "products"));
$action = GETPOST('action');
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$account_parent = GETPOST('account_parent');
@@ -112,6 +113,7 @@ $contextpage = 'accountancycustomerlines';
$hookmanager->initHooks([$contextpage ]);
$formaccounting = new FormAccounting($db);
$object = new stdClass();
$arrayfields = array(
'fd.rowid' => array('label' => "LineId", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
@@ -129,6 +131,7 @@ $arrayfields = array(
// @phpstan-ignore-next-line
$arrayfields = dol_sort_array($arrayfields, 'position');
/*
* Actions
*/
@@ -355,7 +358,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -29,7 +29,14 @@
* \brief Ventilation page from customers invoices
*/
require '../../main.inc.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Societe $mysoc
* @var Translate $langs
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
@@ -40,14 +47,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Societe $mysoc
* @var Translate $langs
* @var User $user
*/
// Load translation files required by the page
$langs->loadLangs(array("bills", "companies", "compta", "accountancy", "other", "productbatch", "products"));
@@ -55,15 +54,12 @@ $langs->loadLangs(array("bills", "companies", "compta", "accountancy", "other",
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$toselect = GETPOST('toselect', 'array:aZ09'); // Value can be 'X_Y'
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancycustomerlist'; // To manage different context of search
$optioncss = GETPOST('optioncss', 'alpha');
$default_account = GETPOSTINT('default_account');
// Select Box
$mesCasesCochees = GETPOST('toselect', 'array');
// Search Getpost
$search_societe = GETPOST('search_societe', 'alpha');
$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100'
@@ -206,21 +202,20 @@ if (empty($reshook)) {
if ($massaction == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
$msg = '';
//print '<div><span style="color:red">' . $langs->trans("Processing") . '...</span></div>';
if (!empty($mesCasesCochees)) {
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'</div>';
if (!empty($toselect)) {
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($toselect).'</div>';
$msg .= '<div class="detail">';
$cpt = 0;
$ok = 0;
$ko = 0;
foreach ($mesCasesCochees as $maLigneCochee) {
foreach ($toselect as $maLigneCochee) {
$maLigneCourante = explode("_", $maLigneCochee);
$monId = $maLigneCourante[0];
$monCompte = GETPOSTINT('codeventil'.$monId);
if ($monCompte <= 0) {
$msg .= '<div><span style="color:red">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'</span></div>';
$msg .= '<div><span class="error">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'</span></div>';
$ko++;
} else {
$sql = " UPDATE ".MAIN_DB_PREFIX."facturedet";
@@ -401,7 +396,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -298,7 +298,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -51,14 +51,10 @@ $langs->loadLangs(array("bills", "companies", "compta", "accountancy", "other",
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$toselect = GETPOST('toselect', 'array:aZ09'); // Value can be 'X_Y'
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancyexpensereportlist'; // To manage different context of search
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
// Select Box
$mesCasesCochees = GETPOST('toselect', 'array');
// Search Getpost
$search_login = GETPOST('search_login', 'alpha');
$search_lineid = GETPOST('search_lineid', 'alpha');
@@ -199,14 +195,14 @@ if (empty($reshook)) {
if ($massaction == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
$msg = '';
if (!empty($mesCasesCochees)) {
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'</div>';
if (!empty($toselect)) {
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($toselect).'</div>';
$msg .= '<div class="detail">';
$cpt = 0;
$ok = 0;
$ko = 0;
foreach ($mesCasesCochees as $maLigneCochee) {
foreach ($toselect as $maLigneCochee) {
$maLigneCourante = explode("_", $maLigneCochee);
$monId = $maLigneCourante[0];
$monCompte = GETPOSTINT('codeventil'.$monId);
@@ -330,7 +326,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -196,6 +196,21 @@ if ($only_rappro == 2) {
$sql .= " ORDER BY b.datev";
//print $sql;
// Preload payment account codes by payment type from c_paiement
$accountancy_code_by_payment = array();
$sql2 = "SELECT code, accountancy_code";
$sql2 .= " FROM ".MAIN_DB_PREFIX."c_paiement";
$sql2 .= " WHERE entity IN (".getEntity('c_paiement').")";
$sql2 .= " AND active = 1";
$resql = $db->query($sql2);
if ($resql) {
while ($objp = $db->fetch_object($resql)) {
if (!empty($objp->code) && !empty($objp->accountancy_code)) {
$accountancy_code_by_payment[$objp->code] = $objp->accountancy_code;
}
}
}
$object = new Account($db);
$paymentstatic = new Paiement($db);
$paymentsupplierstatic = new PaiementFourn($db);
@@ -295,6 +310,11 @@ if ($result) {
// Set accountancy code for bank
$compta_bank = $obj->account_number;
// Determining the bank account by payment method
if (!empty($obj->fk_type) && !empty($accountancy_code_by_payment[$obj->fk_type])) {
$compta_bank = $accountancy_code_by_payment[$obj->fk_type];
}
// Set accountancy code for thirdparty (example: '411CU...' or '411' if no subledger account defined on customer)
$compta_soc = 'NotDefined';
$accountancy_code_general = 'NotDefined';
@@ -362,6 +382,32 @@ if ($result) {
$amounttouse = $obj->amount_main_currency;
}
// in case option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on, payment could be for more than one third-partie
// so we have to find which part of the payment is affected to each third-parties
// (because in this case $obj-amount = the total of the paiement and not the paiement for each third-parties)
if (getDolGlobalString('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS') && ($lineisapurchase == 1 || $lineisasale == 1) ) {
if ($lineisapurchase == 1) {
$sqlamount = "SELECT SUM(pf.amount) as amount";
$sqlamount .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn AS pf";
$sqlamount .= " INNER JOIN ".MAIN_DB_PREFIX."paiementfourn AS p ON pf.fk_paiementfourn = p.rowid";
$sqlamount .= " RIGHT JOIN ".MAIN_DB_PREFIX."facture AS f ON pf.fk_facturefourn = f.rowid";
$sqlamount .= " WHERE p.fk_bank = ".((int) $obj->rowid);
$sqlamount .= " AND f.fk_soc = ".((int) $obj->socid);
} else {
$sqlamount = "SELECT SUM(pf.amount) as amount";
$sqlamount .= " FROM ".MAIN_DB_PREFIX."paiement_facture AS pf";
$sqlamount .= " INNER JOIN ".MAIN_DB_PREFIX."paiement AS p ON pf.fk_paiement = p.rowid";
$sqlamount .= " RIGHT JOIN ".MAIN_DB_PREFIX."facture AS f ON pf.fk_facture = f.rowid";
$sqlamount .= " WHERE p.fk_bank = ".((int) $obj->rowid);
$sqlamount .= " AND f.fk_soc = ".((int) $obj->socid);
}
$resultamount = $db->query($sqlamount);
if ($resultamount) {
$objamount = $db->fetch_object($resultamount);
if (!empty($objamount->amount)) $amounttouse = $objamount->amount;
}
}
// get_url may return -1 which is not traversable
if (is_array($links) && count($links) > 0) {
// Test if entry is for a social contribution, salary or expense report.
@@ -427,10 +473,17 @@ if ($result) {
$societestatic->email = $tabcompany[$obj->rowid]['email'];
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
if ($compta_soc) {
if (empty($tabtp[$obj->rowid][$compta_soc])) {
$tabtp[$obj->rowid][$compta_soc] = $amounttouse;
} else {
$tabtp[$obj->rowid][$compta_soc] += $amounttouse;
// because we are in 2 loop (loop on the line from the sql queries and loop on $links)
// and in case of option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on,
// we will pass here n times for each payment line
// so we have to add $amoutouse only if the line $links[$key] correspond to the payment line we are in used ( socid correspondinf at the payment line $links)
// if FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is off we add $amounttouse
if (!getDolGlobalString('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS') || $obj->socid == $links[$key]['url_id']){
if (empty($tabtp[$obj->rowid][$compta_soc])) {
$tabtp[$obj->rowid][$compta_soc] = $amounttouse;
} else {
$tabtp[$obj->rowid][$compta_soc] += $amounttouse;
}
}
}
} elseif ($links[$key]['type'] == 'user') {
@@ -626,7 +679,7 @@ if ($result) {
}
// If no links were found to know the amount on thirdparty, we try to guess it.
// This may happens on bank entries without the links lines to 'company'.
// This may happen on bank entries without the links lines to 'company'.
if (empty($tabtp[$obj->rowid]) && !empty($tabmoreinfo[$obj->rowid]['withdraw'])) { // If we don't find 'company' link because it is an old 'withdraw' record
foreach ($links as $key => $val) {
if ($links[$key]['type'] == 'payment') {

View File

@@ -583,7 +583,7 @@ if ($action == 'exportcsv' && !$error) { // ISO and not UTF8 !
print '"'.$date.'"'.$sep;
print '"'.$val["ref"].'"'.$sep;
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("VAT").implode($def_tva[$key][$k]).' %')).'"'.$sep;
print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("VAT").(isset($def_tva[$key]) ? implode($def_tva[$key][$k]) : '').' %')).'"'.$sep;
print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep;
print '"'.($mt < 0 ? price(-$mt) : '').'"';
print "\n";

View File

@@ -9,6 +9,7 @@
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018 Eric Seigne <eric.seigne@cap-rel.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Vincent de Grandporé <vincent@de-grandpre.quebec>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -139,7 +140,7 @@ if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))
}
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle as label, f.ref_supplier, f.date_lim_reglement as dlr, f.close_code, f.vat_reverse_charge,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code, fd.info_bits,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.localtax1_tx, fd.localtax2_tx, fd.total_ttc, fd.vat_src_code, fd.info_bits,";
$sql .= " p.default_vat_code AS product_buy_default_vat_code, p.tva_tx as product_buy_vat, p.localtax1_tx as product_buy_localvat1, p.localtax2_tx as product_buy_localvat2,";
$sql .= " co.code as country_code, co.label as country_label,";
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.fk_pays,";
@@ -225,6 +226,12 @@ $cptfour = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER', 'NotDefined');
$cpttva = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT', 'NotDefined');
$rcctva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined');
$rcdtva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined');
$cptlocaltax1 = getDolGlobalString('ACCOUNTING_LT1_BUY_ACCOUNT', 'NotDefined');
$rcclocaltax1 = getDolGlobalString('ACCOUNTING_LT1_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined');
$rcdlocaltax1 = getDolGlobalString('ACCOUNTING_LT1_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined');
$cptlocaltax2 = getDolGlobalString('ACCOUNTING_LT2_BUY_ACCOUNT', 'NotDefined');
$rcclocaltax2 = getDolGlobalString('ACCOUNTING_LT2_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined');
$rcdlocaltax2 = getDolGlobalString('ACCOUNTING_LT2_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined');
$noTaxDispatchingKeepWithLines = getDolGlobalInt('ACCOUNTING_PURCHASES_DO_NOT_DISPATCH_TAXES'); //If enabled, Tax will NOT get split off from the base entry and credited to a separate tax account (good for non-VAT countries like USA)
$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
@@ -257,13 +264,19 @@ if ($result) {
$vatdata_cache[$tax_id] = $vatdata;
}
$compta_tva = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax1 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax2 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax1 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cptlocaltax1);
$compta_localtax2 = (!empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cptlocaltax2);
$compta_counterpart_tva_npr = getDolGlobalString('ACCOUNTING_COUNTERPART_VAT_NPR', 'NotDefined');
// Define an array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || !empty($obj->vat_src_code)) {
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '')] = (vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
if ($obj->localtax1_tx > 0.0) {
$def_tva[$obj->rowid][$compta_localtax1][vatrate($obj->localtax1_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '').' LT1'] = (vatrate($obj->localtax1_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
}
if ($obj->localtax2_tx > 0.0) {
$def_tva[$obj->rowid][$compta_localtax2][vatrate($obj->localtax2_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '').' LT2'] = (vatrate($obj->localtax2_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
}
}
//$line = new SupplierInvoiceLine($db);
@@ -301,10 +314,10 @@ if ($result) {
$rcvatdata = getTaxesFromId($obj->product_buy_vat . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''), $mysoc, $mysoc, 0);
$rcc_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
$rcd_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva);
$rcc_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
$rcd_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva);
$rcc_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
$rcd_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva);
$rcc_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcclocaltax1);
$rcd_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdlocaltax1);
$rcc_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcclocaltax2);
$rcd_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdlocaltax2);
if (price2num($obj->product_buy_vat) || !empty($obj->product_buy_default_vat_code)) {
$vat_key = vatrate($obj->product_buy_vat) . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : '');
$val_value = $vat_key;

View File

@@ -10,6 +10,7 @@
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Vincent de Grandporé <vincent@de-grandpre.quebec>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -140,7 +141,7 @@ if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))
}
$sql = "SELECT f.rowid, f.ref, f.type, f.situation_cycle_ref, f.datef as df, f.ref_client, f.date_lim_reglement as dlr, f.close_code, f.retained_warranty, f.revenuestamp, f.situation_final,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.situation_percent, fd.vat_src_code, fd.info_bits,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.localtax1_tx, fd.localtax2_tx, fd.total_ttc, fd.situation_percent, fd.vat_src_code, fd.info_bits,";
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur,";
if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
$sql .= " spe.accountancy_code_customer_general,";
@@ -223,6 +224,8 @@ $vatdata_cache = array();
// Variables
$cptcli = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER', 'NotDefined');
$cpttva = getDolGlobalString('ACCOUNTING_VAT_SOLD_ACCOUNT', 'NotDefined');
$cptlocaltax1 = getDolGlobalString('ACCOUNTING_LT1_SOLD_ACCOUNT', 'NotDefined');
$cptlocaltax2 = getDolGlobalString('ACCOUNTING_LT2_SOLD_ACCOUNT', 'NotDefined');
$result = $db->query($sql);
if ($result) {
@@ -262,12 +265,18 @@ if ($result) {
$vatdata_cache[$tax_id] = $vatdata;
}
$compta_tva = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
$compta_localtax1 = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
$compta_localtax2 = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
$compta_localtax1 = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cptlocaltax1);
$compta_localtax2 = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cptlocaltax2);
// Define the array to store the detail of each vat rate and code for lines
if (price2num($obj->tva_tx) || !empty($obj->vat_src_code)) {
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '')] = (vatrate($obj->tva_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
if ($obj->localtax1_tx > 0.0) {
$def_tva[$obj->rowid][$compta_localtax1][vatrate($obj->localtax1_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '').' LT1'] = (vatrate($obj->localtax1_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
}
if ($obj->localtax2_tx > 0.0) {
$def_tva[$obj->rowid][$compta_localtax2][vatrate($obj->localtax2_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '').' LT2'] = (vatrate($obj->localtax2_tx).($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''));
}
}
// Create a compensation rate for situation invoice.

View File

@@ -10,6 +10,7 @@
* Copyright (C) 2017-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2025 Hannes Hieronimi <hannes@innwerk.org>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1206,15 +1207,15 @@ if ($action == 'writebookkeeping' /* && $user->hasRight('accounting', 'bind', 'w
$accountingAccountInfos = $tabaccountingaccount[$accountancy_code];
if ($idx < $nb_operation) {
$amount = price2num($payment_total_ht * $operation['total_ht'] / $objectInfos['total_ht'], 'MT');
$total_operation += $amount;
$total_operation += (float) $amount;
} else {
$amount = $payment_total_ht - $total_operation;
}
$total_check -= $amount;
$total_check -= (float) $amount;
$bookkeepingToCreate = new BookKeeping($db);
//$result = $bookkeepingToCreate->createFromValues($payment["date"], $objectInfos['ref'], 'bank', $payment_id, $objectInfos['id'], $accountancy_code, $accountingAccountInfos['label'], (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), -$amount, $journal, $journal_label, '');
$result = $bookkeepingToCreate->createFromValues($payment["date"], $objectInfos['ref'], 'bank', $payment_id, 0, $accountancy_code, $accountingAccountInfos['label'], (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), -$amount, $journal, $journal_label, '');
$result = $bookkeepingToCreate->createFromValues($payment["date"], $objectInfos['ref'], 'bank', $payment_id, 0, $accountancy_code, $accountingAccountInfos['label'], (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), - (float) $amount, $journal, $journal_label, '');
if ($result < 0) {
$errorforline++;
@@ -1482,11 +1483,11 @@ if (empty($action) || $action == 'view') {
if (!empty($operation['total_ht'])) {
if ($idx < $nb_operation) {
$value = price2num($payment_total_ht * $operation['total_ht'] / $objectInfos['total_ht'], 'MT');
$total_operation += $value;
$total_operation += (float) $value;
} else {
$value = $payment_total_ht - $total_operation;
}
FormAccounting::printJournalLine($langs, $date, $objectInfos['url'], $accountancy_code, (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), $payment['type_payment'], -$value);
FormAccounting::printJournalLine($langs, $date, $objectInfos['url'], $accountancy_code, (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), $payment['type_payment'], - (float) $value);
}
$idx++;
}

View File

@@ -28,6 +28,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
/**
* @var Conf $conf

View File

@@ -355,7 +355,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -56,15 +56,12 @@ $langs->loadLangs(array("bills", "companies", "compta", "accountancy", "other",
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$toselect = GETPOST('toselect', 'array:aZ09'); // Value can be 'X_Y'
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancysupplierlist'; // To manage different context of search
$optioncss = GETPOST('optioncss', 'alpha');
$default_account = GETPOSTINT('default_account');
// Select Box
$mesCasesCochees = GETPOST('toselect', 'array');
// Search Getpost
$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100'
$search_societe = GETPOST('search_societe', 'alpha');
@@ -212,14 +209,14 @@ if (empty($reshook)) {
if ($massaction == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
$msg = '';
if (!empty($mesCasesCochees)) {
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'</div>';
if (!empty($toselect)) {
$msg = '<div>'.$langs->trans("SelectedLines").': '.count($toselect).'</div>';
$msg .= '<div class="detail">';
$cpt = 0;
$ok = 0;
$ko = 0;
foreach ($mesCasesCochees as $maLigneCochee) {
foreach ($toselect as $maLigneCochee) {
$maLigneCourante = explode("_", $maLigneCochee);
$monId = $maLigneCourante[0];
$monCompte = GETPOSTINT('codeventil'.$monId);
@@ -409,7 +406,7 @@ $nbtotalofrecords = '';
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}

View File

@@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2015-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2022 Progiseize <a.bisotti@progiseize.fr>
/* Copyright (C) 2015-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2022 Progiseize <a.bisotti@progiseize.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var int $formatexportset
* @var string $type_export
* @var string $filename
@@ -89,6 +90,38 @@ if ((substr($accountancyexport->getFormatCode($formatexportset), 0, 3) == 'fec')
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
}
// --- Hook: allow external modules to override export filename ---
if (is_object($hookmanager)) {
// Dedicated context (non-blocking if other hooks are already initialized)
$hookmanager->initHooks(array('accountancyexportfilename'));
$parameters = array(
'type_export' => $type_export ?? '',
'format' => $format ?? '',
'format_code' => $accountancyexport->getFormatCode($formatexportset),
'code' => $code ?? '',
'prefix' => $prefix ?? '',
'filename' => $filename ?? '',
'period_start' => $startaccountingperiod ?? '',
'period_end' => $endaccountingperiod ?? '',
'siren' => $siren ?? '',
'ndate_in_filename' => $nodateexport ?? 0,
'now_datetime' => $date_export,
// Value by default
'defaultfilename' => $completefilename
);
// Hook called by modules: setExportFilename
$reshook = $hookmanager->executeHooks('setExportFilename', $parameters, $accountancyexport, $action);
if ($reshook > 0) {
if (!empty($hookmanager->resArray['filename'])) {
$completefilename = $hookmanager->resArray['filename'];
} elseif ($hookmanager->resPrint !== '') {
$completefilename = $hookmanager->resPrint;
}
}
}
if (empty($downloadMode)) {
header('Content-Disposition: attachment;filename=' . $completefilename);
}

Some files were not shown because too many files have changed in this diff Show More