2
0
forked from Wavyzz/dolibarr

Compare commits

...

850 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
Laurent Destailleur
ff1e31d239 Merge 2025-11-07 18:53:37 +01:00
Laurent Destailleur
88bc1ea328 Keep same behaviour by default. 2025-11-07 18:50:34 +01:00
atm-adrien
817e7a826c FIX : Can approuve holidays when negative balance (#36144)
* FIX : Can approuve holidays when negative balance

* FIX : PR returns
2025-11-07 18:48:58 +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
splohmer
b2ab49a7c0 Fix: sql error if LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED is used (#36135)
* Fix: sql error if LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED is used

* Refactor SQL order and limit handling

* Update SQL query to limit qualified invoices

* Update facture.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-06 19:04:35 +01:00
HENRY Florian
c4b9eff72f fix: menu Group User with Auguria (#36145) 2025-11-06 19:04:05 +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
5e69bb3b3d FIX Invoice Situation - Octopus - Show remaintopay at bottom (#36121) 2025-11-06 17:22:49 +01:00
Alexandre SPANGARO
025dda60dd FIX Invoice Situation - Octopus - Column offset for amounts greater than 5 digits (#36124) 2025-11-06 17:22:31 +01:00
Alexandre SPANGARO
5c54b86786 FIX Invoice Situation - Octopus - Shipping block overlap issue (#36122) 2025-11-06 17:11:32 +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
HENRY Florian
e55fc378d3 FIX: doubled display of PRoduct Stokable checkbox when STOCK_SUPPORTS_SERVICES on service edit card (#36138) 2025-11-06 17:01:44 +01:00
HENRY Florian
7855469d5f FIX: in shippement creation with SHIPMENT_SUPPORTS_SERVICES and/or STOCK_DISALLOW_NEGATIVE_TRANSFER and/or stockable_product there are inconsistancies (#36140)
* FIX: in shippement creation with SHIPMENT_SUPPORTS_SERVICES and/or STOCK_DISALLOW_NEGATIVE_TRANSFER and/or stockable_product there was inconsistancies

* FIX: in shippement creation with SHIPMENT_SUPPORTS_SERVICES and/or STOCK_DISALLOW_NEGATIVE_TRANSFER and/or stockable_product there was inconsistancies
2025-11-06 17:01:25 +01:00
HENRY Florian
93a0b1f0e2 FIX: In shipment creation process, if product is not manage in stock, Dolibarr should not display a "low stock warning" (#36139)
* fix: In shipment, if product is not stockable, Dolibarr should not display a warning

* fix: In shipment, if product is not stockable, Dolibarr should not display a warning

* fix: In shipment, if product is not stockable, Dolibarr should not display a warning
2025-11-06 16:59:19 +01:00
Regis Houssin
430fc664fa FIX avoid link problem with employee list context (#36125) 2025-11-06 13:17:57 +01:00
Regis Houssin
fa10fc0f94 FIX avoid NULL value (#36126) 2025-11-06 13:15:03 +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
3cc6f830d2 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-05 23:32:07 +01:00
Laurent Destailleur
2d0beece5c Trans 2025-11-05 23:31:50 +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
Regis Houssin
0fd19787e2 FIX #36113 (#36116) 2025-11-05 22:47:51 +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
Regis Houssin
2dc94a0244 FIX missing entity field (#36086) 2025-11-05 22:33:36 +01:00
HENRY Florian
afd44449c1 FIX: MAIN_AUTOFILL_DATE in supplier invoice display 01/01/1970 (#36087)
* FIX: MAIN_AUTOFILL_DATE in supplier invoice display 01/01/1970

* fix: php8 warning

* fix: review

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-05 22:32:02 +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
atm-adrien
d221d5eb6d FIX : Wrong cast on TVA rate when updating supplier order lines (#36106)
* FIX : Wrong cast on TVA rate when updating supplier order lines

* FIX : indent
2025-11-05 22:26:30 +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
Frédéric FRANCE
2b0c118601 fix phpdoc for tva in fournisseur.commande.class.php (#36109) 2025-11-05 22:22:32 +01:00
Regis Houssin
8d72cd0269 FIX wrong number of categories by entity (#36111)
* FIX wrong number of categories by entity

* FIX missing category class parameters

* FIX remove debug
2025-11-05 22:22:07 +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
9cc747d020 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-05 22:13:35 +01:00
Laurent Destailleur
f20b847197 Fix output textarea 2025-11-05 22:13:25 +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
Marc de Lima Lucio
445366c4f5 FIX: product stock lists: prevent SQL error when filtering on physical stock (#36038)
* FIX: product stock lists: prevent SQL error when filtering on physical stock

* FIX: product stock lists: prevent SQL error when filtering on physical stock, part 2 (more portable fix)

* FIX: product stock lists: prevent SQL error when filtering on physical stock, part 3 (clearer field placeholder)
2025-11-04 18:48:56 +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
HENRY Florian
e7b390bceb fix: php8 warning (#36088)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-04 14:15:18 +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
a11b045ca5 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-04 13:05:30 +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
8859dbdb79 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-04 12:53:15 +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
Frédéric FRANCE
c8d42248c2 fix CI V21 (#36078)
* Update phpstan.neon.dist

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update index.php

* Update facture.class.php

* Update facture.class.php
2025-11-04 12:25:24 +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
94d1a25d67 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-03 14:10:57 +01:00
ldestailleur
62760d6195 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-11-03 14:05:58 +01:00
Laurent Destailleur
d8d77a8e51 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-11-03 13:57:49 +01:00
Laurent Destailleur
af13e3354b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-03 13:57:15 +01:00
Laurent Destailleur
e7a1e58ebf Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-11-03 13:51:38 +01:00
Laurent Destailleur
534d4ed4bc Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-11-03 13:49:06 +01:00
Laurent Destailleur
50b90d795c Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-11-03 13:48:51 +01:00
Laurent Destailleur
3209eb4bd8 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-11-03 13:46:49 +01:00
Laurent Destailleur
3deaf8731b FIX Clear filter 2025-11-03 13:46:30 +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
Alexandre SPANGARO
6978cecc0d FIX Accountancy - Problem with general setup (#36067)
* FIX Accountancy - Problem with general setup

* FIX
2025-11-03 01:32:39 +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
Frédéric FRANCE
34d95eeac1 fix parameter of getpost in inventory.php (#36070) 2025-11-02 21:33:21 +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
7ebb809547 Fix url or module provider 2025-11-02 14:49:34 +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
Alexandre SPANGARO
3d0703d5c6 FIX #36025 Accountancy - Error when cloning directly from accounting entry (#36034)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 21:58:04 +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
Alexandre SPANGARO
f4d725bd09 FIX Knowledge management - Button ReOpen show in draft mode (#36008)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 18:55:55 +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
atm-corentin
a199a7ded9 Fix : performance issues on select bom (#36017)
* optimize SQL query in BOM dropdown by joining product table directly and removing redundant Product object creation

* Change JOIN to INNER JOIN in SQL query

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 17:48:50 +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
PsyCrow
a0da0850a3 Add isextrafieldmanaged property to salary class (#36047)
FIX #36046 enabling extrafieldmanaged to enable deletion of records from the llx_salay_extrafields table
2025-11-01 17:47:52 +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
Regis Houssin
17bb284e0c FIX missing "printFieldListValue" hook (#35990)
* FIX missing "printFieldListValue" hook

* FIX add action paramter

* FIX remove duplicate object
2025-11-01 03:28:51 +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
Regis Houssin
aa89439179 FIX muticompany compatibility (wrong sharing name) (#36013) 2025-11-01 03:01:00 +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
atm-adrien
5f23325eb2 FIX : Allow decimals on services duration (#36031) 2025-11-01 01:05:32 +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
Maxime Kohlhaas
ca4619f769 Fix #36019 : bank account count was wrong on thirdparty card (#36044) 2025-11-01 00:35:50 +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
Florian Mortgat
dc024fef27 FIX 20.0 ajax_constantonoff + FormSetup were ignoring custom css class (cssClass / $morecss) (#36039) 2025-11-01 00:29:43 +01:00
Maxime Kohlhaas
e3fc45b6c8 Fix : missing left column actions on resource list (#36040) 2025-11-01 00:28:44 +01:00
Maxime Kohlhaas
f5b56e5ea3 Fix : resource list was inaccessible if only one resource (#36042) 2025-11-01 00:26:54 +01:00
Frédéric FRANCE
6540c1cb1f fix missing property declaration (#36026) 2025-10-31 23:38:36 +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
6145bcc449 FIX Error 500 on api if cache is on and directory does not exists 2025-10-31 16:59:09 +01:00
Laurent Destailleur
5a61116497 Debug v23 2025-10-31 16:55:48 +01:00
Laurent Destailleur
6e14377ba4 FIX avoid error 500 on api when cache dir does not exists 2025-10-31 16:44:29 +01:00
Laurent Destailleur
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
57e1c22753 Fix log of upgrade2 2025-10-31 00:20:13 +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
2e838f7f1b Fix bad link not yet available 2025-10-30 22:28:21 +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
9b5d4791cf Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-30 17:13:34 +01:00
Laurent Destailleur
bd510c090d FIX filter on note lost when sorting company list 2025-10-30 17:13:24 +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
af6358a441 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 03:03:24 +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
4f3aca359d 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:21:33 +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
Alexandre SPANGARO
2053ccf197 FIX Accountancy - Return on wrong page on y/n button (#35978) 2025-10-29 22:19:38 +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
atm-corentin
3f2f676e58 Fix : Add 'printFieldListGroupBy' hook to stockatdate.php for module flexibility (#35996)
* Refactor stock SQL query logic to enhance readability, support hook extensibility, and maintain DRY principles.

* Pass `$object` and `$action` to hookmanager in stock listing queries for improved hook extensibility.
2025-10-29 22:12:42 +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
ebdf77bbde Better error management 2025-10-29 20:41:25 +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
440c2d238a Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-29 19:03:09 +01:00
Laurent Destailleur
ae16c8ccba Fix dir 2025-10-29 19:02:32 +01:00
Laurent Destailleur
4c84650e39 NEW Add API for Holidays/Leaves 2025-10-29 18:58:06 +01:00
atm-adrien
68fc03caae FIX : Situation percent set as 0 when adding line on situation invoices (#35999) 2025-10-29 17:05:43 +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
boudet jean pascal
c49066640e Previously, the function correctly returned the error code, but $this->errors (the error array of the main object, e.g., the invoice) was not updated. The end-user would see a generic failure message without knowing why closing the shipment failed (e.g., "Invalid status," "Stock not sufficient," etc.). (#35980)
Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
2025-10-28 19:22:06 +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
Regis Houssin
2524ab424c FIX avoid php warning (#35953) 2025-10-28 02:03:40 +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
atm-lucas
7b4def5e99 Display warnings invoice situation (#35972) 2025-10-28 00:55:41 +01:00
Laurent Destailleur
f3931b386a Fix left join is not complete 2025-10-27 22:27:36 +01:00
Laurent Destailleur
df5c3a8084 Clean code 2025-10-27 22:18:20 +01:00
Laurent Destailleur
aa6bc46141 FIX Hide AWP if product has no stock managed 2025-10-27 21:55:49 +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
Laurent Destailleur
c625ef121a Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-27 15:21:59 +01:00
Laurent Destailleur
5efdee9094 css 2025-10-27 15:21:48 +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 a268f6265f9d5bb9cafa4e8d5317ff8236092b3e.
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
jonathan-stimactiv
6333f32c9c FIX: #35922 Lines of orders - Status filter unexpected beahavior (#35924) 2025-10-25 23:08:33 +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
sonikf
9b48b2347b Remove customer price handling from objectline_create.tpl.php (#35941) 2025-10-25 23:00:50 +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
Frédéric FRANCE
24335dd8c7 fix unicity check for "code_compta_client" (#35951) 2025-10-25 20:39:27 +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
Laurent Destailleur
9f2c33aa75 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-24 19:39:15 +02:00
Laurent Destailleur
04bd68c493 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-24 19:36:45 +02:00
Laurent Destailleur
e98fe358d3 Fix responsive 2025-10-24 19:36:34 +02:00
Regis Houssin
5b7d358c4e FIX #35634 (#35912)
* FIX #35634

* FIX phan error
2025-10-24 18:46:20 +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
Regis Houssin
5259819fc5 FIX access problem when label is used for next/prev (#35933) 2025-10-24 18:22:30 +02:00
Frédéric FRANCE
d22b6abe59 update hash in windows-ci.yml (#35932) 2025-10-24 18:21:16 +02:00
Laurent Destailleur
1fc5590934 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-24 17:15:33 +02:00
Laurent Destailleur
f3b8e64ec0 Fix translation of label in export 2025-10-24 17:11:35 +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
Regis Houssin
6e5f044e31 FIX check if service is activated only for api product (#35911) 2025-10-23 16:36:42 +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
Regis Houssin
80c1fe6ae0 FIX broken feature ! (#35906)
* FIX broken feature !

* FIX Enhance SQL query with conditional entity filtering

Added conditional filtering for usergroup entity in SQL query based on MULTICOMPANY_TRANSVERSE_MODE setting.

* Update perms.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-23 14:32:07 +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
Pierre Ardoin
f54b5618fb Update invoice stats query to filter by entity (#35904) 2025-10-22 22:25:36 +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
Florian Mortgat
ae711c02f3 FIX: my previous fix was incompatible with Thomas' fix from PR#35590 (#35890) 2025-10-22 17:45:15 +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
atm-lena
6df379c62a FIX MAIN_SEE_SUBORDONATES sql request errror (#35896)
Co-authored-by: atm-lena <lena.papazian@atm-consulting.fr>
2025-10-22 17:42:58 +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
Benjamin Chanudet
4c5e17f7e6 allow deactivation of document models on Donation module (#35882) 2025-10-22 02:30:58 +02:00
Regis Houssin
d37cf4b38a FIX wrong socpeople id when multiple assigned + avoid php warnings (#35878) 2025-10-22 02:29:05 +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
VIAL-GOUTEYRON Quentin
7aa9633901 FIX : Perf for bom select (#35871)
* ADD: Option to optimize BOM combo list performance with search-based loading

* FIX: Remove debug backtrace and exit statement in security.lib.php

* FIX: Use dynamic database prefix in BOM combo list query

* FIX: Correct spacing issue in 'elseif' condition in bom.php
2025-10-22 00:58:55 +02:00
Regis Houssin
c04359f995 FIX missing entity filters + wrong widget name (#35873) 2025-10-22 00:56:57 +02:00
Florian Mortgat
111dcd174f FIX: no emails sent when closing a ticket (#35874) 2025-10-22 00:56:01 +02:00
Frédéric FRANCE
c80858e712 fix CI branch v21 (#35876)
* fix CI

* add same fix than in develop
2025-10-22 00:51:20 +02:00
Regis Houssin
4d88608f1f FIX check if zip file of website exists (#35879) 2025-10-22 00:50:34 +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
Ryad ABANI
3be9f0e9cc FIX: notification email not sent : NOTIFICATION_EMAIL_FROM is replaced with MAIN_MAIL_EMAIL_FROM if it's empty (#35881)
Co-authored-by: Ryad ABANI <ryad.abani@scopen.fr>
2025-10-22 00:45:15 +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
noec764
8aabe1efb7 Fix load all line unecessary (#35783)
* FIX: Unecessary load of all order lines

* FIX: Unecessary load of all order lines

* FIX: Tabs indent instead of space

---------

Co-authored-by: Noé <noe@scopen.fr>
2025-10-21 02:16:49 +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
Laurent Destailleur
d49426ef30 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-21 01:49:53 +02:00
Laurent Destailleur
3fca1d8cb1 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-10-21 01:46:46 +02:00
Laurent Destailleur
f82675c729 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-10-21 01:40:55 +02:00
Laurent Destailleur
700b89d578 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-21 01:35:08 +02:00
Laurent Destailleur
a4b78f8230 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-21 01:34:22 +02:00
Eric - CAP-REL
88db5b4bd7 fix task file path for download (#35793)
* fix task file path for download

* better fix thanks to regis for multicompany support
2025-10-21 01:33:38 +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
Regis Houssin
b8f8e2b785 FIX missing entity filter (#35857) 2025-10-20 23:54:00 +02:00
Marc de Lima Lucio
1f65548836 FIX: notifications: correctly report email delivery errors (#35864) 2025-10-20 23:53:07 +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
330d1aa778 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-20 15:00:31 +02:00
Laurent Destailleur
8e43cea541 css 2025-10-20 14:19:58 +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
Frédéric FRANCE
18c29d0e40 fix tva can be sometimes string instead float (#35835) 2025-10-18 19:12:01 +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
3a8bab63cd Trans 2025-10-18 11:56:33 +02:00
Laurent Destailleur
1b4afcea4b Ignore file to avoid commiting it 2025-10-18 11:56:07 +02:00
Guido Schratzer
ea2543e9e4 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:55:58 +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
17e78c99a2 Fix responsive 2025-10-17 23:50: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
74d38106b9 Column must be shown by default if option PRODUCT_USE_SUPPLIER_PACKAGING
on
2025-10-17 19:28:02 +02:00
Laurent Destailleur
f711fe9900 FIX Must show unit price when price is not for quantity 1 2025-10-17 18:59:32 +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
2139fdd9a2 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-17 18:44:05 +02:00
Laurent Destailleur
6691441468 Fix position 2025-10-17 18:43:53 +02:00
Laurent Destailleur
3fb0dddd65 Fix default status of column 2025-10-17 18:39:42 +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
Regis Houssin
da32ca9228 FIX wrong entity alias (#35821) 2025-10-17 18:11:29 +02:00
Marc de Lima Lucio
0d1b1703cc FIX: missing prospect/customer category translation (#35814) 2025-10-17 16:15: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
lvessiller-opendsi
5de1fcca2f FIX extra-field list depend on parent extra-filed list on direct edit (#35803) 2025-10-17 15:48:40 +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
0fb8688b7c FIX clone of cron tasks 2025-10-17 15:10:33 +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
Laurent Destailleur
c902b2eeed Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-17 13:41:12 +02:00
Laurent Destailleur
c4528e39e3 Fix allowed styles in ckeditor 2025-10-17 13:41:01 +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
ThomasNgr-OpenDSI
e801a7602c FIX day of ticket on takePOS. Backport 6abdb6e. (#35745) 2025-10-17 02:28:38 +02:00
Alexandre SPANGARO
54f8ac4153 FIX Accountancy - Missing subledger information on mass cloning (#35777)
* FIX Accountancy - Missing subledger information on mass cloning

* Clarify - Add date_creation / Remove doc_type, fk_doc, fk_docdet

* Last fix

* Fix phan on user->Id

* Update bookkeeping.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 02:15:33 +02:00
Laurent Destailleur
a504be0258 FIX #35780 2025-10-17 02:03:37 +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
Laurent Destailleur
c4207d7b45 FIX #35782 2025-10-17 02:00:52 +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
2dbf41e058 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-17 01:51:37 +02:00
Laurent Destailleur
c7a61226fb FIX #35784 2025-10-17 01:50:10 +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
Laurent Destailleur
bce1f5e7ed Fix CI 2025-10-17 00:58:18 +02:00
noec764
70e0132baa FIX: Performance Problem on load stats command (#35785)
Co-authored-by: Noé <noe@scopen.fr>
2025-10-17 00:51:34 +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
c6dd95e6d2 fix upload in doc_generic_reception_odt.modules.php (#35794) 2025-10-17 00:45:34 +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
5d3c80e0af FIx try a better fo for #35792 2025-10-16 21:19:00 +02:00
Laurent Destailleur
ef44576079 Fix bad test on non existing $result 2025-10-16 21:13:00 +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
65a57465f9 Fix var_dump 2025-10-16 19:35:30 +02:00
Laurent Destailleur
fa166d62a8 Fix duplicates answers 2025-10-16 19:34:59 +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
Regis Houssin
f85108b8ac FIX check if category module is enabled (#35770) 2025-10-15 18:59:33 +02:00
Regis Houssin
e84ea68218 FIX wrong getEntiy element name (#35771) 2025-10-15 18:58:53 +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
4fdf50752f doc 2025-10-15 12:31:30 +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
5a53c19ad5 fix css badge pill definition (#35764) 2025-10-15 11:30:47 +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
f33ed7a702 FIX The IBAN into EPC qr code must use the default bank account if not
forced
2025-10-15 05:03:29 +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
atm-corentin
a4822e466a remove redundant price2num calls in cost calculations to simplify code (#35743)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 00:46:57 +02:00
Alexandre SPANGARO
86610810ca FIX Accountancy - General setup - Missing form on UpdateMask (#35735)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 00:43:54 +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
55591abedf Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-14 23:37:31 +02:00
Laurent Destailleur
63480f0318 Fix CI 2025-10-14 23:36:37 +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
Laurent Destailleur
d343c75aac Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-14 23:28:46 +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
Frédéric FRANCE
f6db1af7a8 fix CI v21 html.formmail.class.php (#35760) 2025-10-14 22:53:25 +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
5454512d95 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-14 21:53:33 +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
Frédéric FRANCE
2e644b8420 add missing translation in V21which breaks CI (#35759) 2025-10-14 21:51:07 +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
025aefb69c Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-14 21:18:09 +02:00
Laurent Destailleur
d0634c5b93 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-10-14 21:12:47 +02:00
Laurent Destailleur
ee08f8a0b6 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-10-14 21:12:24 +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
Alexandre SPANGARO
0572d947aa FIX Accountancy - Admin personalized report - Remove duplicate button (#35721) 2025-10-14 19:56:40 +02:00
noec764
7faa7e81f2 FIX: Email template fetching (#35738)
* FIX: Email template fetching

* Change to oneline condition

* FIX Space instead of tabs

---------

Co-authored-by: Noé <noe@scopen.fr>
2025-10-14 19:56:03 +02:00
Alexandre SPANGARO
59009d67a5 FIX Accountancy - Printing the subsidiary ledger returns the general ledger (#35719)
* Update listbyaccount to transfer type="sub" information

* Detail by subsidiary account

* Fix typo
2025-10-14 19:53:08 +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
61b70cfbe5 fix CI v22 (#35737)
* fix CI v22

* $error is already checked
2025-10-14 19:30:09 +02:00
Regis Houssin
a8da70e116 FIX avoid php warning (#35756) 2025-10-14 18:48:20 +02:00
Lucas Marcouiller
96f119ffd9 Fix member doc gen (#35751)
Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
2025-10-14 18:47:57 +02:00
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
Regis Houssin
cc22f978cd FIX wrong field name (#35728) 2025-10-14 18:45:26 +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
1a4a0e14d4 FIX Bad label for column title on multicurency 2025-10-14 16:30:54 +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
a021b9fb52 FIX link to sort of target email page 2025-10-14 15:03:44 +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
53537873c4 Add anchor 2025-10-13 19:53:08 +02:00
Laurent Destailleur
4b4bb7faf6 FIX Status if thirdparty not synchronized with status WON of
opportunity.
2025-10-13 15:21:24 +02:00
Laurent Destailleur
470f1b4aa9 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-13 15:08:16 +02:00
Laurent Destailleur
9f6f781e01 FIX The status of customer was not synchronized with opportunity status 2025-10-13 15:07:45 +02:00
Laurent Destailleur
ac164d4ee2 FIX Missing begin transaction, The status of customer was not
synchronized with opportunity status
2025-10-13 15:00:26 +02:00
Laurent Destailleur
41634d08ca NEW Add option PROJECT_CAN_ALWAYS_LINK_TO_ALL_CUSTOMERS 2025-10-13 14:30:45 +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
7e910ae975 Fix responsive 2025-10-12 20:24:28 +02:00
Laurent Destailleur
a510a70350 Fix the price in module browser 2025-10-12 19:35:21 +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
538fc37242 FIX prices must be HT in dolistore browser 2025-10-12 17:12:00 +02:00
ldestailleur
4cac3d3544 Fix embedded tool to search module 2025-10-12 15:54:27 +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
ldestailleur
2d805806b3 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-10-12 13:54:14 +02:00
ldestailleur
ae0d3b4133 FIX Deletion of a donation. Button was disabled. 2025-10-12 13:53:41 +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
Alexandre SPANGARO
b77850521b FIX Accountancy - Print subledger balance return general balance (#35712)
* FIX Accountancy - Print subledger balance return general balance

* Update pdf_balance.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-11 15:31:04 +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
9e24aed800 Fix CI 2025-10-11 14:16:27 +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
ATM-NicolasV
1afb65a042 ### Fixed (#35705)
- Fixed an SQL syntax error on the contract services list when sorting or paginating.
2025-10-11 13:03:09 +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
Regis Houssin
6c8fde377c FIX add possibility to override authoritative dns (#35699) 2025-10-10 22:25:03 +02:00
VIAL-GOUTEYRON Quentin
de6a6ef039 Fix: [Import] Prevents $keyfield variable overwrite when processing hidden fields (#35693)
* FIX: prevent duplicate key fields and improve field handling in import_xlsx and import_csv modules

* FIX: remove leftover debug statement in import_xlsx module
2025-10-09 18:22:32 +02:00
Regis Houssin
cb3d3c09c4 FIX wrong entity filter (#35691)
* FIX wrong entity filter

* FIX travis error
2025-10-09 15:26:22 +02:00
atm-corentin
c01ca1cc14 Fix : Display supplier prices for shared products in multicompany context #35600 (#35690)
* Update SQL join to handle multientity conditions properly

* Fix entity reference in SQL join for product supplier price
2025-10-09 11:26:42 +02:00
lvessiller-opendsi
50afc9682b FIX create invoice from order using API and multi-entity (#35654)
* FIX create invoice from order using API and multi-entity

* FIX API not allow to access order in other entity on creating invoice from order

* Update api_invoices.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-06 13:56:50 +02:00
1210 changed files with 24786 additions and 15739 deletions

View File

@@ -6,6 +6,8 @@ on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest

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

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

@@ -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

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 }}
@@ -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
@@ -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:
@@ -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

View File

@@ -30,6 +30,10 @@ The following changes may create regressions for some external modules, but were
* 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 *****

View File

@@ -49,16 +49,20 @@ $includecustom = 0;
$includeconstants = array();
$buildzip = 0;
print '***** '.$script_file.' *****'."\n";
if (empty($argv[1])) {
print '***** '.$script_file.' *****'."\n";
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=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 "This includes the 3 sections:\n";
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";
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";
exit(1);
}
@@ -75,12 +79,6 @@ 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) {
@@ -89,6 +87,9 @@ while ($i < $argc) {
}
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
}
if (!empty($result["buildzip"])) {
$buildzip = 1;
}
$i++;
}
@@ -167,7 +168,7 @@ 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);
@@ -273,127 +274,72 @@ $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) {
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) {
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;
}
// Add the interfaces.class.php file
$file = dirname(__FILE__).'/../../htdocs/core/class/interfaces.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; // close will be done in next filethat is in same dir
}
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 commontrigger.class.php file
$file = dirname(__FILE__).'/../../htdocs/core/class/commontrigger.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;
}
// 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')
);
$needtoclose = 1; // This is the last file
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;
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;
}
} 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;
}
}
}
@@ -411,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";

View File

@@ -112,14 +112,14 @@ We suppose the branch x.y has already been created during the beta (see previous
- 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

@@ -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

@@ -221,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]);
}
}

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

@@ -11,32 +11,30 @@ return [
// # Issue statistics:
// PhanUndeclaredProperty : 420+ occurrences
// PhanTypeMismatchProperty : 100+ occurrences
// PhanTypeMismatchArgument : 70+ occurrences
// PhanUndeclaredGlobalVariable : 65+ occurrences
// PhanTypeMismatchArgumentNullable : 40+ occurrences
// PhanTypeMismatchArgument : 65+ occurrences
// PhanUndeclaredGlobalVariable : 60+ occurrences
// PhanTypeMismatchArgumentNullable : 20+ occurrences
// PhanTypeInvalidDimOffset : 15+ occurrences
// PhanTypeMismatchDimFetch : 15+ occurrences
// PhanUndeclaredMethod : 9 occurrences
// PhanPossiblyUndeclaredGlobalVariable : 6 occurrences
// PhanTypeArraySuspiciousNull : 6 occurrences
// PhanTypeComparisonFromArray : 6 occurrences
// PhanTypeMismatchDimFetch : 10+ occurrences
// PhanUndeclaredMethod : 7 occurrences
// PhanTypeArraySuspiciousNull : 5 occurrences
// PhanTypeExpectedObjectPropAccess : 5 occurrences
// PhanTypeMismatchArgumentProbablyReal : 5 occurrences
// PhanPluginDuplicateArrayKey : 4 occurrences
// PhanParamTooMany : 3 occurrences
// PhanPluginUndeclaredVariableIsset : 3 occurrences
// PhanPluginUndeclaredVariableIsset : 2 occurrences
// PhanPossiblyUndeclaredGlobalVariable : 2 occurrences
// PhanTypeMismatchArgumentProbablyReal : 2 occurrences
// PhanParamTooMany : 1 occurrence
// PhanPossiblyUndeclaredVariable : 1 occurrence
// PhanTypeExpectedObjectPropAccessButGotNull : 1 occurrence
// PhanTypeMismatchReturn : 1 occurrence
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
'htdocs/categories/viewcat.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'],
@@ -54,7 +52,6 @@ return [
'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/localtax/card.php' => ['PhanUndeclaredGlobalVariable'],
@@ -71,20 +68,19 @@ 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', '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'],
@@ -106,7 +102,6 @@ return [
'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'],
'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'],
@@ -124,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'],
@@ -143,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'],
@@ -155,12 +149,6 @@ return [
'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanUndeclaredProperty'],
'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'],
@@ -168,9 +156,8 @@ 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/class/expensereport.class.php' => ['PhanTypeMismatchArgument'],
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
'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'],
@@ -200,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'],
@@ -217,7 +203,7 @@ return [
'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'],
'htdocs/product/stock/info.php' => ['PhanUndeclaredProperty'],
'htdocs/product/stock/list.php' => ['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'],
@@ -230,9 +216,7 @@ return [
'htdocs/projet/tasks.php' => ['PhanTypeMismatchArgument'],
'htdocs/projet/tasks/time.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'],
'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/public/members/new.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/payment/newpayment.php' => ['PhanUndeclaredProperty'],
'htdocs/public/payment/paymentok.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/public/project/suggestbooth.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/suggestconference.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/viewandvote.php' => ['PhanUndeclaredGlobalVariable'],
@@ -253,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'],
@@ -261,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'],

View File

@@ -175,7 +175,6 @@ Child of
ClassNotFound
Clear
ClickToDial
Clients
Clone
CloneAffectation
CloneChanges
@@ -261,7 +260,6 @@ Dictionaries
DictionaryEmpty
DictionaryNameUpdated
Directory
DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND
Document
Documentation
Dolibarr
@@ -326,7 +324,6 @@ ErrorFailedToGetListOfNotificationsToSend
ErrorFailedToLoadBankAccount
ErrorFailedToLoadDiscount
ErrorFailedToSetNewPassword
ErrorFaviconMustBeASquaredImage
ErrorFileNameInvalid
ErrorImportOfChartLimitedToCurrentChart
ErrorMAIN_ROUNDING_RULE_TOTCanMAIN_MAX_DECIMALS_TOT
@@ -403,7 +400,6 @@ Filename
FilteredFrom
Flashy
ForcedByGlobalSetup
Form for public lead registration has not been enabled
Free
FreeLegalTextOnReceptions
FrequencyPer_
@@ -626,7 +622,6 @@ Poll
Posts
PredefinedInterventional
PrevRangeToThisRange
PreviousFingerprint
Print
PrintDriver
PrintModule
@@ -806,7 +801,6 @@ TicketTypeShort
TimeOnly
Timezone
ToGetBack
ToPay
Token
Tooltip
TooltipEditAndRevertStockMovement

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
@@ -431,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.'">';
}
@@ -788,11 +788,11 @@ if ($resql) {
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&mode=1&token='.newToken().'">';
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&mode=1&token='.newToken().'">';
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>';
}
@@ -806,11 +806,11 @@ if ($resql) {
if (!empty($arrayfields['aa.centralized']['checked'])) {
print '<td class="center">';
if (empty($obj->centralized)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=2&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=2&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&mode=2&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=2&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
@@ -824,11 +824,11 @@ if ($resql) {
if (!empty($arrayfields['aa.active']['checked'])) {
print '<td class="center">';
if (empty($obj->active)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=0&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&page='.$page.'&mode=0&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&mode=0&token='.newToken().'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&page='.$page.'&mode=0&token='.newToken().'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2024 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
@@ -909,7 +909,6 @@ if ($resql) {
print '<td class="center" class="nowrap">';
if ($canbedisabled) {
print '<a class="reposition" href="'.$url.'action='.urlencode($acts[$obj->active]).'&token='.newToken().'">'.$actl[$obj->active].'</a>';
print '<a class="reposition" href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
} else {
print $langs->trans("AlwaysActive");
}

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

@@ -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

@@ -8,7 +8,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.fr>
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024-2025 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
@@ -69,7 +69,6 @@ $formSetup = new FormSetup($db);
// Main options
$formSetup->newItem('BANK_DISABLE_DIRECT_INPUT')->setAsYesNo();
$formSetup->newItem('ACCOUNTANCY_COMBO_FOR_AUX')->setAsYesNo();
$item = $formSetup->newItem('ACCOUNTING_MANAGE_ZERO')->setAsYesNo();
@@ -177,20 +176,27 @@ if ($action == 'updatemode') {
}
}
if ($action == 'update2') {
if ($action == 'update') {
$error = 0;
foreach ($list as $constname) {
$constvalue = GETPOST($constname, 'alpha');
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
if ($error) {
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
if ($action == 'update_binding') {
$error = 0;
// option in section binding
foreach ($list_binding as $constname) {
$constvalue = GETPOST($constname, 'alpha');
@@ -203,16 +209,39 @@ if ($action == 'update2') {
}
}
// options in section other
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
if ($action == 'update_advanced') {
$error = 0;
if (GETPOSTISSET('ACCOUNTING_LETTERING_NBLETTERS')) {
if (!dolibarr_set_const($db, 'ACCOUNTING_LETTERING_NBLETTERS', GETPOST('ACCOUNTING_LETTERING_NBLETTERS'), 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
if ($action == 'update_export') {
$error = 0;
// Export options
$modelcsv = GETPOSTINT('ACCOUNTING_EXPORT_MODELCSV');
// reload
$configuration = $accountancyexport->getTypeConfig();
$listparam = $configuration['param'];
if (!empty($modelcsv)) {
if (!dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
$error++;
@@ -243,12 +272,6 @@ if ($action == 'update2') {
}
}
if (!$error) {
// reload
$configuration = $accountancyexport->getTypeConfig();
$listparam = $configuration['param'];
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@@ -312,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);
@@ -455,20 +506,19 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1) {
print '</form>';
print '<br><br><br>';
print '<br><br>';
}
// Show form for main parameters
// Show form main options
print $formSetup->generateOutput(true);
print '<br><br><br>';
print '<br><br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update2">';
print '<input type="hidden" name="action" value="update_binding">';
print '<input type="hidden" name="page_y" value="">';
// Binding params
@@ -546,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>';
@@ -577,12 +653,11 @@ print '</tr>';
print '</table>';
print '</div>';
print '<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans('Save')).'" name="button"></div>';
print '<div class="center"><input type="submit" class="button button-edit reposition" name="button" value="'.dol_escape_htmltag($langs->trans('Save')).'"></div>';
print '</form>';
// Show numbering options
print '<br><br><br>';
print '<br><br>';
// Accountancy Numbering model
$dirmodels = array_merge(array('/'), $conf->modules_parts['models']);
@@ -694,13 +769,17 @@ foreach ($arrayofmodules as $module) {
}
print '</table>';
print '</div>';
print '</form>';
// Show advanced options
print '<br><br><br>';
print '<br><br>';
// Advanced params
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update_advanced">';
print '<input type="hidden" name="page_y" value="">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
@@ -739,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>';
@@ -788,12 +867,17 @@ 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><br>';
print '<br><br>';
// Export options
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update_export">';
print '<input type="hidden" name="page_y" value="">';
print "\n".'<script type="text/javascript">'."\n";
print 'jQuery(document).ready(function () {'."\n";
@@ -839,8 +923,6 @@ print ' });'."\n";
print '})'."\n";
print '</script>'."\n";
// Main Options
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans('ExportOptions').'</td>';
@@ -902,7 +984,6 @@ if ($num2) {
print '<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans('Save')).'" name="button"></div>';
print '</form>';
// 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"));

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
@@ -336,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')) {
@@ -446,44 +451,14 @@ if (empty($reshook)) {
}
}
if ($action == 'clonebookkeepingwriting' && $permissiontoadd) {
if ($action == 'clonebookkeepingwriting' && $confirm == "yes" && $permissiontoadd) {
// Reread the values sent by the validated form
$piece_num = GETPOST('piece_num', 'alpha');
$formaccounting = new FormAccounting($db);
$journal_code = GETPOST('code_journal', 'alpha');
$form = new Form($db);
$input1 = $form->selectDate('', 'clonedate', 0, 0, 0, "create_mvt", 1, 1);
$input2 = $formaccounting->select_journal($journal_code, 'code_journal', 0, 0, 1, 1).'</td>';
$inputHidden = '<input type="hidden" name="piece_num_hidden" id="piece_num_hidden" value="'.$piece_num.'">';
// Reconstruct the selected date
$clonedate = dol_mktime(0, 0, 0, GETPOSTINT('clonedatemonth'), GETPOSTINT('clonedateday'), GETPOSTINT('clonedateyear'));
$formquestion = array(
array(
'type' => 'date',
'name' => 'clonedate',
'label' => '<span class="fieldrequired">' . $langs->trans("Docdate") . '</span>',
'value' => $input1
)
);
if (getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL')) {
$formquestion[] = array(
'type' => 'text',
'name' => 'code_journal',
'label' => '<span class="fieldrequired">' . $langs->trans("Codejournal") . '</span>',
'value' => $input2
);
}
print $form->formconfirm(
$_SERVER["PHP_SELF"],
$langs->trans("ConfirmMassCloneBookkeepingWriting"),
$langs->trans("ConfirmMassCloneBookkeepingWritingQuestion", count($toselect)),
"clonebookkeepingwriting",
$formquestion,
'', 0, 300, 1000, 1
);
}
if ($action == 'preclonebookkeepingwriting' && $confirm == "yes" && $permissiontoadd) {
$result = $object->newClone($piece_num, $journal_code, $clonedate);
if ($result == -1) {
@@ -492,7 +467,7 @@ if (empty($reshook)) {
if (!$error) {
$db->commit();
header("Location: " . $_SERVER['PHP_SELF'] . "?piece_num=" . $object->getNextNumMvt() - 1);
header("Location: " . $_SERVER['PHP_SELF'] . "?piece_num=" . ($object->getNextNumMvt() - 1));
exit();
} else {
$db->rollback();
@@ -520,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);
@@ -606,12 +604,7 @@ if ($action == 'create') {
print load_fiche_titre($langs->trans("UpdateMvts"), $backlink);
}*/
$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++;
$head = accounting_transaction_prepare_head($object, $mode, $type, $backtopage);
print dol_get_fiche_head($head, 'transaction', '', -1);
@@ -629,6 +622,46 @@ if ($action == 'create') {
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);
$form = new Form($db);
$input1 = $form->selectDate('', 'clonedate', 0, 0, 0, "", 1, 1);
$input2 = $formaccounting->select_journal($journal_code, 'code_journal', 0, 0, 1, 1);
$formquestion = array(
array(
'type' => 'other',
'name' => 'clonedate',
'label' => '<span class="fieldrequired">' . $langs->trans("Docdate") . '</span>',
'value' => $input1
)
);
$formquestion[] = array('type' => 'hidden', 'name' => 'piece_num', 'value' => $piece_num);
if (getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL')) {
$formquestion[] = array(
'type' => 'text',
'name' => 'code_journal',
'label' => '<span class="fieldrequired">' . $langs->trans("Codejournal") . '</span>',
'value' => $input2
);
}
print $form->formconfirm(
$_SERVER["PHP_SELF"],
$langs->trans("ConfirmMassCloneBookkeepingWriting"),
$langs->trans("ConfirmMassCloneBookkeepingWritingQuestion", 1),
"clonebookkeepingwriting",
$formquestion,
'', 0, 300, 1000, 0
);
}
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
@@ -1001,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>';
@@ -1028,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

@@ -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

@@ -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).'"/>';
@@ -1437,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>
*
@@ -463,11 +463,17 @@ if (empty($reshook)) {
// Actions
if ($action === 'exporttopdf' && $permissiontoadd) {
$object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
if ($type == "sub") {
$object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter, 'AND', 1);
} else {
$object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
}
require_once DOL_DOCUMENT_ROOT . '/core/modules/accountancy/doc/pdf_ledger.modules.php';
$pdf = new pdf_ledger($db);
$pdf->fromDate = $search_date_start;
$pdf->toDate = $search_date_end;
$pdf->ledgerType = $type;
$result = $pdf->write_file($object, $langs);
if ($result < 0) {
@@ -860,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 != '') {
@@ -895,7 +901,7 @@ if (empty($reshook)) {
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly'));
}
}
$newcardbutton .= dolGetButtonTitle($langs->trans('ExportToPdf'), '', 'fa fa-file-pdf paddingleft', $_SERVER['PHP_SELF'] . '?action=exporttopdf&' . $url_param, '', 1, array('morecss' => 'marginleftonly'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ExportToPdf'), '', 'fa fa-file-pdf paddingleft', $_SERVER['PHP_SELF'] . '?action=exporttopdf'.(!empty($type) ? '&type=sub' : '').'&' . $url_param, '', 1, array('morecss' => 'marginleftonly'));
$newcardbutton .= dolGetButtonTitleSeparator();
@@ -1004,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() {
@@ -1104,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.'"/>';
@@ -1528,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

@@ -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,6 +1474,7 @@ 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';
@@ -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,6 +1694,7 @@ 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';
@@ -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,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

@@ -595,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
@@ -604,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)) {
@@ -3539,7 +3541,7 @@ class BookKeeping extends CommonObject
*/
public function newCloneMass($toselect, $code_journal, $docdate)
{
global $langs;
global $langs, $user;
$error = 0;
$this->db->begin();
@@ -3593,22 +3595,55 @@ class BookKeeping extends CommonObject
if ($bookKeeping->fetch($toselectid)) {
$code_journal = getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL') ? $code_journal : $bookKeeping->code_journal;
$journal_label = getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL') ? $accountingJournal->label : $bookKeeping->journal_label;
$sql = "SELECT piece_num, label_operation, numero_compte, label_compte, doc_type, code_journal, fk_user_author, doc_ref, fk_doc, fk_docdet, debit, credit, journal_label, sens, montant ";
$sql .= "FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE rowid = " . ((int) $toselectid);
$sql = "SELECT piece_num, label_operation, numero_compte, label_compte, subledger_account, subledger_label, doc_type, code_journal, fk_user_author, doc_ref, fk_doc, fk_docdet, debit, credit, journal_label, sens, montant";
$sql .= " FROM ".$this->db->prefix()."accounting_bookkeeping WHERE rowid = " . ((int) $toselectid);
$resql = $this->db->query($sql);
if ($resql) {
while ($obj = $this->db->fetch_object($resql)) {
$docRef = $langs->trans("CloneOf", $obj->doc_ref);
$sql_insert = "INSERT INTO ".$this->db->prefix()."accounting_bookkeeping";
$sql_insert .= " (piece_num, label_operation, numero_compte, label_compte, doc_type, code_journal, doc_date,";
$sql_insert .= " fk_user_author, doc_ref, fk_doc, fk_docdet, debit, credit, journal_label, sens, montant";
$sql_insert = "INSERT INTO ".$this->db->prefix()."accounting_bookkeeping (";
$sql_insert .= " piece_num";
$sql_insert .= ", label_operation";
$sql_insert .= ", numero_compte";
$sql_insert .= ", label_compte";
$sql_insert .= ", subledger_account";
$sql_insert .= ", subledger_label";
$sql_insert .= ", doc_type";
$sql_insert .= ", code_journal";
$sql_insert .= ", doc_date";
$sql_insert .= ", date_creation";
$sql_insert .= ", fk_user_author";
$sql_insert .= ", doc_ref";
$sql_insert .= ", fk_doc";
$sql_insert .= ", fk_docdet";
$sql_insert .= ", debit";
$sql_insert .= ", credit";
$sql_insert .= ", journal_label";
$sql_insert .= ", sens";
$sql_insert .= ", montant";
$sql_insert .= ")";
$sql_insert .= " VALUES (" . ((int) $pieceNumNext) . ", '" . $this->db->escape($obj->label_operation) . "', '" . $this->db->escape($obj->numero_compte) . "',";
$sql_insert .= " '" . $this->db->escape($obj->label_compte) . "', '" . $this->db->escape($obj->doc_type) . "', '" . $this->db->escape($code_journal) . "', '" . $this->db->idate($docdate)."',";
$sql_insert .= " '" . $this->db->escape($obj->fk_user_author) . "', '" . $this->db->escape($docRef) . "', " . ((int) $obj->fk_doc) . ", " . ((int) $obj->fk_docdet) . ",";
$sql_insert .= " " . (float) $obj->debit . ", " . (float) $obj->credit . ", '" . $this->db->escape($journal_label) . "', '" . $this->db->escape($obj->sens) . "', " . (float) $obj->montant;
$sql_insert .= " VALUES (";
$sql_insert .= $pieceNumNext;
$sql_insert .= ", '" . $this->db->escape($obj->label_operation) . "'";
$sql_insert .= ", '" . $this->db->escape($obj->numero_compte) . "'";
$sql_insert .= ", '" . $this->db->escape($obj->label_compte) . "'";
$sql_insert .= ", '" . $this->db->escape($obj->subledger_account) . "'";
$sql_insert .= ", '" . $this->db->escape($obj->subledger_label) . "'";
$sql_insert .= ", ''";
$sql_insert .= ", '" . $this->db->escape($code_journal) . "'";
$sql_insert .= ", '" . $this->db->idate($docdate)."'";
$sql_insert .= ", '" . $this->db->idate($now)."'";
$sql_insert .= ", ".($user->id > 0 ? ((int) $user->id) : "NULL");
$sql_insert .= ", '" . $this->db->escape($docRef) . "'";
$sql_insert .= ", 0";
$sql_insert .= ", 0";
$sql_insert .= ", " . (float) $obj->debit;
$sql_insert .= ", " . (float) $obj->credit;
$sql_insert .= ", '" . $this->db->escape($journal_label) . "'";
$sql_insert .= ", '" . $this->db->escape($obj->sens) . "'";
$sql_insert .= ", " . (float) $obj->montant;
$sql_insert .= ")";
$resqlInsert = $this->db->query($sql_insert);

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

@@ -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:int');
$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:int');
// 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";

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:int');
$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:int');
// 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);

View File

@@ -388,7 +388,7 @@ if ($result) {
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."paiementfounr_facturefourn AS pf";
$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);

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

@@ -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:int');
$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:int');
// 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);

View File

@@ -293,7 +293,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_M
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup');
@@ -367,12 +367,13 @@ foreach ($arrayofmodules as $file => $modCodeMember) {
print '<td>'.$modCodeMember->info($langs).'</td>'."\n";
print '<td class="nowrap">'.$modCodeMember->getExample().'</td>'."\n";
if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == "$file") {
if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON', 'mod_member_simple') == "$file") {
print '<td class="center">'."\n";
print img_picto($langs->trans("Activated"), 'switch_on');
print "</td>\n";
} else {
$disabled = isModEnabled('multicompany') && ((is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity));
$isshareonotherentity = (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity); // @phpstan-ignore-line
$disabled = (isModEnabled('multicompany') && $isshareonotherentity);
print '<td class="center">';
if (!$disabled) {
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodemember&token='.newToken().'&value='.urlencode($file).'">';

View File

@@ -150,7 +150,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_M
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_emails');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup');

View File

@@ -76,7 +76,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_M
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup');

View File

@@ -79,7 +79,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_M
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_type_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup');

View File

@@ -129,7 +129,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_M
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_website');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($title, $linkback, 'title_setup');
@@ -312,6 +312,13 @@ if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) {
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE", $listofval, getDolGlobalString('MEMBER_NEWFORM_PAYONLINE'), 0);
print "</td></tr>\n";
// Search a member after member creation form
print '<tr class="oddeven" id="trpayment"><td>';
print $langs->trans("MEMBER_SEARCH_MEMBER_PUBLIC_FORM_CREATE");
print '</td><td>';
print $form->selectyesno("MEMBER_SEARCH_MEMBER_PUBLIC_FORM_CREATE"); // Reverse the logic "hide -> show" for retrocompatibility
print "</td></tr>\n";
print '</table>';
print '</div>';

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.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
@@ -155,10 +155,10 @@ if ($object->id > 0) {
print dol_get_fiche_head($head, 'agenda', $langs->trans("Member"), -1, 'user');
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['restore_lastsearch_values' => 1]).'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/vcard.php', ['id' => $object->id]).'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
@@ -181,13 +181,13 @@ if ($object->id > 0) {
$newcardbutton = '';
$messagingUrl = DOL_URL_ROOT.'/adherents/messaging.php?rowid='.$object->id;
$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/messaging.php', ['rowid' => $object->id]);
$newcardbutton .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1);
$messagingUrl = DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id;
$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/agenda.php', ['id' => $object->id]);
$newcardbutton .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2);
if (isModEnabled('agenda')) {
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).($object->id > 0 ? '?id='.$object->id : '').'&origin=member&originid='.$id);
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', dolBuildUrl(DOL_URL_ROOT.'/comm/action/card.php', ['action' => 'create', 'backtopage' => dolBuildUrl($_SERVER['PHP_SELF'], ['id' => $object->id, 'origin' => 'member', 'originid' => $id])]));
}
if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {

View File

@@ -93,11 +93,12 @@ abstract class ActionsAdherentCardCommon
/**
* Set content of ->tpl array, to use into template
*
* @param string $action Type of action
* @param string $action Type of action
* @param int $id Id
* @param string $ref Object ref (if id not provided) / Unused here
* @return void
*/
public function assign_values(&$action, $id)
public function assign_values(&$action, $id, $ref = '')
{
// phpcs:enable
global $conf, $langs, $user, $canvas;

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 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
@@ -78,11 +79,12 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
/**
* Assign custom values for canvas
*
* @param string $action Type of action
* @param int $id Id
* @param string $action Type of action
* @param int $id Id
* @param string $ref Object ref (if id not provided) / Unused here
* @return void
*/
public function assign_values(&$action, $id)
public function assign_values(&$action, $id, $ref = '')
{
// phpcs:enable
global $conf, $db, $langs, $user;
@@ -90,7 +92,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
$ret = $this->getObject($id);
parent::assign_values($action, $id);
parent::assign_values($action, $id, $ref);
$this->tpl['title'] = $this->getTitle($action);
$this->tpl['error'] = $this->error;

View File

@@ -33,6 +33,14 @@
// Load Dolibarr environment
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/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
@@ -48,16 +56,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.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", "bills", "members", "users", "other", "paypal"));
@@ -88,6 +86,7 @@ if (isModEnabled('mailmanspip')) {
$object = new Adherent($db);
$extrafields = new ExtraFields($db);
$upload_dir = null;
// fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@@ -134,7 +133,7 @@ if ($id) {
$permissiontoeditextra = $canaddmember;
if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) {
// For action 'update_extras', is there a specific permission set for the attribute to update
$permissiontoeditextra = dol_eval($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')]);
$permissiontoeditextra = dol_eval((string) $extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')]);
}
// Security check
@@ -372,11 +371,15 @@ if (empty($reshook)) {
//$object->note = trim(GETPOST("comment", "restricthtml"));
$object->morphy = GETPOST("morphy", 'alpha');
if (GETPOST('deletephoto', 'alpha')) {
$object->photo = '';
} elseif (!empty($_FILES['photo']['name'])) {
$current_photo = '';
if (!empty($_FILES['photo']['name'])) {
$current_photo = $object->photo;
$object->photo = dol_sanitizeFileName($_FILES['photo']['name']);
}
if (GETPOST('deletephoto')) {
$current_photo = $object->photo;
$object->photo = '';
}
// Get status and public property
$object->statut = GETPOSTINT("statut");
@@ -415,7 +418,9 @@ if (empty($reshook)) {
}
if (!$error) {
$result = $object->update($user, 0, $nosyncuser, $nosyncuserpass);
$nosyncthirdparty = getDolGlobalInt('MEMBER_NO_SYNC_LINKED_THIRDPARTY');
$result = $object->update($user, 0, $nosyncuser, $nosyncuserpass, $nosyncthirdparty);
if ($result >= 0 && !count($object->errors)) {
$categories = GETPOST('memcats', 'array');
@@ -424,16 +429,21 @@ if (empty($reshook)) {
// Logo/Photo save
$dir = $conf->member->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos';
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
if (GETPOST('deletephoto') && $current_photo) {
$fileimg = $dir.'/'.$current_photo;
$dirthumbs = $dir.'/thumbs';
dol_delete_file($fileimg);
dol_delete_dir_recursive($dirthumbs);
}
if ($file_OK) {
if (GETPOST('deletephoto')) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$fileimg = $conf->member->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos/'.$object->photo;
$dirthumbs = $conf->member->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos/thumbs';
dol_delete_file($fileimg);
dol_delete_dir_recursive($dirthumbs);
}
if (image_format_supported($_FILES['photo']['name']) > 0) {
if ($current_photo != $object->photo) {
$fileimg = $dir.'/'.$current_photo;
$dirthumbs = $dir.'/thumbs';
dol_delete_file($fileimg);
dol_delete_dir_recursive($dirthumbs);
}
dol_mkdir($dir);
if (@is_dir($dir)) {
@@ -443,6 +453,15 @@ if (empty($reshook)) {
} else {
// Create thumbs
$object->addThumbs($newfile);
// Index file in database
if (getDolGlobalString('MEMBER_PHOTO_ALLOW_EXTERNAL_DOWNLOAD')) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// the dir dirname($newfile) is directory of logo, so we should have only one file at once into index, so we delete indexes for the dir
deleteFilesIntoDatabaseIndex(dirname($newfile), '', '', $object);
// now we index the uploaded logo file
addFileIntoDatabaseIndex(dirname($newfile), basename($newfile), '', 'uploaded', 1, $object);
}
}
}
} else {
@@ -1085,8 +1104,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$listetype_natures_json = json_encode($listetype_natures);
print '<tr><td class="fieldrequired">'.$langs->trans("MemberNature")."</td><td>\n";
print '<span id="spannature1" class="nonature-back spannature paddinglarge marginrightonly"><label for="phisicalinput" class="valignmiddle">'.$morphys["phy"].'<input id="phisicalinput" class="flat checkforselect marginleftonly valignmiddle" type="radio" name="morphy" value="phy"'.($checkednature == "phy" ? ' checked="checked"' : '').'></label></span>';
print '<span id="spannature2" class="nonature-back spannature paddinglarge marginrightonly"><label for="moralinput" class="valignmiddle">'.$morphys["mor"].'<input id="moralinput" class="flat checkforselect marginleftonly valignmiddle" type="radio" name="morphy" value="mor"'.($checkednature == "mor" ? ' checked="checked"' : '').'></label></span>';
print '<span id="spannature1" class="nonature-back spannature paddinglarge marginrightonly"><label for="phisicalinput" class="spanlabel">'.$morphys["phy"].'</label><input id="phisicalinput" class="flat checkforselect marginleftonly valignmiddle" type="radio" name="morphy" value="phy"'.($checkednature == "phy" ? ' checked="checked"' : '').'></span>';
print '<span id="spannature2" class="nonature-back spannature paddinglarge marginrightonly"><label for="moralinput" class="spanlabel">'.$morphys["mor"].'</label><input id="moralinput" class="flat checkforselect marginleftonly valignmiddle" type="radio" name="morphy" value="mor"'.($checkednature == "mor" ? ' checked="checked"' : '').'></span>';
// Add JS to manage the background of nature
if ($conf->use_javascript_ajax) {
@@ -1167,7 +1186,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print "</td>\n";
// Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td>'.img_picto('', 'company', 'class="pictofixedwidth"').'<input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $soc->name).'"></td></tr>';
print '<tr><td id="tdcompany">'.$langs->trans("Company").' / '.$langs->trans("Organization").'</td><td>'.img_picto('', 'company', 'class="pictofixedwidth"').'<input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $soc->name).'"></td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
@@ -1679,7 +1698,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
$subject = (string) $arraydefaultmessage->topic;
$msg = (string) $arraydefaultmessage->content;
$msg = (string) $arraydefaultmessage->content;
}
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
@@ -1878,10 +1897,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$rowspan++;
}
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['restore_lastsearch_values' => 1]).'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/vcard.php', ['id' => $object->id]).'" class="refid valignmiddle">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
@@ -2076,7 +2095,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Send
if (empty($user->socid)) {
if (Adherent::STATUS_VALIDATED == $object->status) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'presend', 'mode' => 'init'], true).'#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
}
}
@@ -2096,7 +2115,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Modify
if ($user->hasRight('adherent', 'creer')) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'edit'], true).'">'.$langs->trans("Modify").'</a>'."\n";
} else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
}
@@ -2104,7 +2123,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Validate
if (Adherent::STATUS_DRAFT == $object->status) {
if ($user->hasRight('adherent', 'creer')) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=valid&token='.newToken().'">'.$langs->trans("Validate").'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'valid'], true).'">'.$langs->trans("Validate").'</a>'."\n";
} else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</span>'."\n";
}
@@ -2113,7 +2132,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Reactivate
if (Adherent::STATUS_RESILIATED == $object->status || Adherent::STATUS_EXCLUDED == $object->status) {
if ($user->hasRight('adherent', 'creer')) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=valid&token='.newToken().'">'.$langs->trans("Reenable")."</a>\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'valid'], true).'">'.$langs->trans("Reenable")."</a>\n";
} else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable").'</span>'."\n";
}
@@ -2122,7 +2141,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Resiliate
if (Adherent::STATUS_VALIDATED == $object->status) {
if ($user->hasRight('adherent', 'supprimer')) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=resiliate&token='.newToken().'">'.$langs->trans("Resiliate")."</a></span>\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'resiliate'], true).'">'.$langs->trans("Resiliate")."</a></span>\n";
} else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Resiliate").'</span>'."\n";
}
@@ -2131,7 +2150,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Exclude
if (Adherent::STATUS_VALIDATED == $object->status) {
if ($user->hasRight('adherent', 'supprimer')) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=exclude&token='.newToken().'">'.$langs->trans("Exclude")."</a></span>\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'exclude'], true).'">'.$langs->trans("Exclude")."</a></span>\n";
} else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Exclude").'</span>'."\n";
}
@@ -2141,7 +2160,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (isModEnabled('societe') && !$object->socid) {
if ($user->hasRight('societe', 'creer')) {
if (Adherent::STATUS_DRAFT != $object->status) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.((int) $object->id).'&action=create_thirdparty&token='.newToken().'" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'create_thirdparty'], true).'" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
} else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
}
@@ -2154,7 +2173,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!$user->socid && !$object->user_id) {
if ($user->hasRight('user', 'user', 'creer')) {
if (Adherent::STATUS_DRAFT != $object->status) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.((int) $object->id).'&action=create_user&token='.newToken().'" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrLoginDesc")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'create_user'], true).'" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrLoginDesc")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n";
} else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n";
}
@@ -2168,19 +2187,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$isinspip = $mailmanspip->is_in_spip($object);
if ($isinspip == 1) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=del_spip&token='.newToken().'">'.$langs->trans("DeleteIntoSpip").'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'del_spip'], true).'">'.$langs->trans("DeleteIntoSpip").'</a>'."\n";
}
if ($isinspip == 0) {
print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=add_spip&token='.newToken().'">'.$langs->trans("AddIntoSpip").'</a>'."\n";
print '<a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'add_spip'], true).'">'.$langs->trans("AddIntoSpip").'</a>'."\n";
}
}
// Merge
print dolGetButtonAction($langs->trans('MergeMembers'), $langs->trans('Merge'), 'danger', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=merge&token='.newToken(), '', $user->hasRight('adherent', 'supprimer'));
print dolGetButtonAction($langs->trans('MergeMembers'), $langs->trans('Merge'), 'danger', dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'merge'], true), '', $user->hasRight('adherent', 'supprimer'));
// Delete
if ($user->hasRight('adherent', 'supprimer')) {
print '<a class="butActionDelete" href="card.php?rowid='.((int) $object->id).'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a>'."\n";
print '<a class="butActionDelete" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'delete'], true).'">'.$langs->trans("Delete").'</a>'."\n";
} else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Delete").'</span>'."\n";
}
@@ -2239,9 +2258,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$MAXEVENT = 10;
$morehtmlcenter = '';
$messagingUrl = DOL_URL_ROOT.'/adherents/messaging.php?rowid='.$object->id;
$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/messaging.php', ['id' => $object->id]);
$morehtmlcenter .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1);
$morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id);
$morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dolBuildUrl(DOL_URL_ROOT.'/adherents/agenda.php', ['id' => $object->id]));
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';

View File

@@ -314,7 +314,6 @@ class Adherent extends CommonObject
*/
public $invoice;
/**
* 'type' field format:
* 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',
@@ -712,23 +711,20 @@ class Adherent extends CommonObject
$id = $this->db->last_insert_id(MAIN_DB_PREFIX."adherent");
if ($id > 0) {
$this->id = $id;
if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == '') {
// keep old numbering
$this->ref = (string) $id;
} else {
// auto code
$modfile = dol_buildpath('core/modules/member/'.getDolGlobalString('MEMBER_CODEMEMBER_ADDON').'.php', 0);
try {
require_once $modfile;
$modname = getDolGlobalString('MEMBER_CODEMEMBER_ADDON');
$modCodeMember = new $modname();
'@phan-var-force ModeleNumRefMembers $modCodeMember';
/** @var ModeleNumRefMembers $modCodeMember */
$this->ref = $modCodeMember->getNextValue($mysoc, $this);
} catch (Exception $e) {
dol_syslog($e->getMessage(), LOG_ERR);
$error++;
}
$modulenum = getDolGlobalString('MEMBER_CODEMEMBER_ADDON', 'mod_member_simple');
$modfile = dol_buildpath('core/modules/member/'.$modulenum.'.php', 0);
try {
require_once $modfile;
$modname = $modulenum;
$modCodeMember = new $modname();
'@phan-var-force ModeleNumRefMembers $modCodeMember';
/** @var ModeleNumRefMembers $modCodeMember */
$this->ref = $modCodeMember->getNextValue($mysoc, $this);
} catch (Exception $e) {
dol_syslog($e->getMessage(), LOG_ERR);
$error++;
}
// Update minor fields
@@ -2778,10 +2774,10 @@ class Adherent extends CommonObject
$warning_delay = getWarningDelay('member', 'subscription') / 60 / 60 / 24;
$label = $langs->trans("MembersWithSubscriptionToReceive");
$labelShort = $langs->trans("MembersWithSubscriptionToReceiveShort");
$url = DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&amp;statut='.self::STATUS_VALIDATED.'&amp;filter=outofdate';
$url = dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['mainmenu' => 'members', 'statut' => self::STATUS_VALIDATED, 'filter' => 'outofdate']);
} elseif ($mode == 'shift') {
$warning_delay = getWarningDelay('member', 'subscription') / 60 / 60 / 24;
$url = DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&amp;statut='.self::STATUS_DRAFT;
$url = dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['mainmenu' => 'members', 'statut' => self::STATUS_DRAFT]);
$label = $langs->trans("MembersListToValid");
$labelShort = $langs->trans("ToValidate");
}

View File

@@ -68,11 +68,11 @@ class AdherentStats extends Stats
/**
* Constructor
* Constructor
*
* @param DoliDB $db Database handler
* @param int $socid Id third party
* @param int $userid Id user for filter
* @param DoliDB $db Database handler
* @param int $socid Id third party
* @param int $userid Id user for filter
*/
public function __construct($db, $socid = 0, $userid = 0)
{
@@ -97,11 +97,11 @@ class AdherentStats extends Stats
/**
* Return the number of proposition by month for a given year
* Return the number of members by month for a given year
*
* @param int $year Year
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array of nb each month
* @param int $year Year
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array of nb each month
*/
public function getNbByMonth($year, $format = 0)
{
@@ -136,7 +136,7 @@ class AdherentStats extends Stats
*
* @param int $year Year
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values by month
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values by month
*/
public function getAmountByMonth($year, $format = 0)
{
@@ -193,8 +193,6 @@ class AdherentStats extends Stats
*/
public function countMembersByTypeAndStatus($numberYears = 0)
{
global $user;
$now = dol_now();
$endYear = (int) date('Y');
$startYear = $endYear - $numberYears;
@@ -268,8 +266,6 @@ class AdherentStats extends Stats
*/
public function countMembersByTagAndStatus($numberYears = 0)
{
global $user;
$now = dol_now();
$endYear = (int) date('Y');
$startYear = $endYear - $numberYears;
@@ -338,4 +334,62 @@ class AdherentStats extends Stats
return $MembersCountArray;
}
/**
* Return array of last modified members
*
* @param int $max Max Number of result
* @return array<int,array{id:int,ref:string,firstname:string,lastname:string,company:string,fk_soc:?int,datec:int|'',datem:int|'',status:int,date_end_subscription:int|'',photo:null|string,email:string,gender:string,morphy:string,typeid:int,need_subscription:0|1|null,subscription:'0'|'1'|null,label:string}> Array of last modified members
*/
public function getLastModifiedMembers($max = 0)
{
$lastModifiedMembers = [];
$sql = "SELECT a.rowid, a.ref, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql .= " a.datec, GREATEST(a.tms, aef.tms) as datem, a.statut as status, a.datefin as date_end_subscription,";
$sql .= ' a.photo, a.email, a.gender, a.morphy,';
$sql .= " t.rowid as typeid, t.subscription, t.libelle as label";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'adherent_extrafields as aef ON aef.fk_object = a.rowid';
$sql .= ", ".MAIN_DB_PREFIX."adherent_type as t";
$sql .= " WHERE a.entity IN (".getEntity('member').")";
$sql .= " AND a.fk_adherent_type = t.rowid";
$sql .= " ORDER BY datem DESC";
$sql .= $this->db->plimit($max, 0);
$result = $this->db->query($sql);
if ($result) {
$num = $this->db->num_rows($result);
$line = 0;
while ($line < $num) {
$objp = $this->db->fetch_object($result);
$lastModifiedMembers[] = [
'id' => (int) $objp->rowid,
'ref' => (string) $objp->ref,
'lastname' => (string) $objp->lastname,
'firstname' => (string) $objp->firstname,
'company' => (string) $objp->company,
'fk_soc' => $objp->fk_soc ? (int) $objp->fk_soc : null,
'datec' => $this->db->jdate($objp->datec),
'datem' => $this->db->jdate($objp->datem),
'status' => (int) $objp->status,
'date_end_subscription' => $this->db->jdate($objp->date_end_subscription),
'photo' => isset($objp->photo) ? (string) $objp->photo : null,
'email' => $objp->email,
'gender' => $objp->gender,
'morphy' => $objp->morphy,
'typeid' => $objp->typeid,
'need_subscription' => isset($objp->subscription) ? ($objp->subscription ? 1 : 0) : null,
'subscription' => isset($objp->subscription) ? ($objp->subscription ? '1' : '0') : null,
'label' => (string) $objp->label,
];
$line++;
}
$this->db->free($result);
}
return $lastModifiedMembers;
}
}

View File

@@ -26,6 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherentstats.class.php';
/**
@@ -44,6 +45,11 @@ class Members extends DolibarrApi
'typeid'
);
/**
* @var AdherentStats
*/
public $memberstats;
/**
* Constructor
*/
@@ -51,6 +57,7 @@ class Members extends DolibarrApi
{
global $db;
$this->db = $db;
$this->memberstats = new AdherentStats($this->db, DolibarrApiAccess::$user->socid, DolibarrApiAccess::$user->id);
}
/**
@@ -655,6 +662,7 @@ class Members extends DolibarrApi
*
* @throws RestException 403 Access denied
* @throws RestException 404 Member not found
* @throws RestException 422 Malformed data
*/
public function createSubscription($id, $start_date, $end_date, $amount, $label = '')
{
@@ -981,6 +989,91 @@ class Members extends DolibarrApi
);
}
/**
* Return an array with the number of members by month for a given year
*
* @param int $year Year
* @param int $format 0=Label of abscissa is a translated text
* 1=Label of abscissa is month number
* 2=Label of abscissa is first letter of month
* @return array Array of statistics for last modified members
* @phan-return array<int<0,11>,array{0:int<1,12>,1:int}> Array of nb each month
* @phpstan-return array<int<0,11>,array{0:int<1,12>,1:int}> Array of nb each month
*
* @url GET stats/nbbymonth
* @throws RestException 403 Access denied
*/
public function getNbByMonth($year, $format = 0)
{
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
throw new RestException(403);
}
return $this->memberstats->getNbByMonth($year, $format);
}
/**
* Return an array with the number of subscriptions by year
*
* @return array Array of statistics for last modified members
* @phan-return array<array{0:int,1:int}> Array of nb each year
* @phpstan-return array<array{0:int,1:int}> Array of nb each year
*
* @url GET stats/nbbyyear
* @throws RestException 403 Access denied
*/
public function getNbByYear()
{
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
throw new RestException(403);
}
return $this->memberstats->getNbByYear();
}
/**
* Return the number of subscriptions by month for a given year
*
* @param int $year Year
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array of statistics for last modified members
* @phan-return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values by month
* @phpstan-return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values by month
*
* @url GET stats/amountbymonth
* @throws RestException 403 Access denied
*/
public function getAmountByMonth($year, $format = 0)
{
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
throw new RestException(403);
}
return $this->memberstats->getAmountByMonth($year, $format);
}
/**
* Last Modified Members
*
* Get an array of statistics for last modified members
*
* @param int $max Max numbers of members
* @return array Array of statistics for last modified members
* @phan-return array<int,array{id:int,ref:string,firstname:string,lastname:string,company:string,fk_soc:?int,datec:int|'',datem:int|'',status:int,date_end_subscription:int|'',photo:null|string,email:string,gender:string,morphy:string,typeid:int,need_subscription:0|1|null,subscription:'0'|'1'|null,label:string}>
* @phpstan-return array<int,array{id:int,ref:string,firstname:string,lastname:string,company:string,fk_soc:?int,datec:int|'',datem:int|'',status:int,date_end_subscription:int|'',photo:null|string,email:string,gender:string,morphy:string,typeid:int,need_subscription:0|1|null,subscription:'0'|'1'|null,label:string}>
*
* @url GET stats/lastmodifiedmembers
* @throws RestException 403 Access denied
*/
public function getLastModifiedMembers($max)
{
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
throw new RestException(403);
}
return $this->memberstats->getLastModifiedMembers($max);
}
/**
* Validate fields before creating an object
*

View File

@@ -98,7 +98,7 @@ class Subscription extends CommonObject
public $fk_bank;
/**
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>,searchmulti?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
@@ -113,6 +113,7 @@ class Subscription extends CommonObject
'fk_type' => array('type' => 'integer', 'label' => 'MemberType', 'enabled' => 1, 'visible' => -1, 'position' => 55),
'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => 1, 'visible' => -2, 'position' => 60),
'fk_user_valid' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserValidation', 'enabled' => 1, 'visible' => -1, 'position' => 65),
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 805),
);
@@ -144,6 +145,11 @@ class Subscription extends CommonObject
$now = dol_now();
// Clean parameters
if (isset($this->import_key)) {
$this->import_key = trim($this->import_key);
}
// Check parameters
if ($this->datef <= $this->dateh) {
$this->error = $langs->trans("ErrorBadValueForDate");
@@ -165,7 +171,7 @@ class Subscription extends CommonObject
$type = $this->fk_type;
}
$sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note, note_private, ref_ext, fk_user_creat)";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note, note_private, ref_ext, fk_user_creat, import_key)";
$sql .= " VALUES (".((int) $this->fk_adherent).", '".$this->db->escape((string) $type)."', '".$this->db->idate($now)."',";
$sql .= " '".$this->db->idate($this->dateh)."',";
$sql .= " '".$this->db->idate($this->datef)."',";
@@ -174,6 +180,7 @@ class Subscription extends CommonObject
$sql .= " '".$this->db->escape($this->note_private)."',";
$sql .= " ".(empty($this->ref_ext) ? "null" : "'".$this->db->escape($this->ref_ext)."'").",";
$sql .= " ".((int) ($this->user_creation_id > 0 ? $this->user_creation_id : $user->id));
$sql .= ", ".(!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null");
$sql .= ")";
$resql = $this->db->query($sql);

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.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
@@ -150,7 +150,7 @@ if ($id > 0) {
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);

View File

@@ -127,13 +127,14 @@ if ($conf->use_javascript_ajax) {
}
}
$dataseries = array();
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), $sumMembers['total']['members_draft']); // Draft, not yet validated
$dataseries[] = array($langs->transnoentitiesnoconv("WaitingSubscription"), $sumMembers['total']['members_pending']);
$dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), $sumMembers['total']['members_uptodate']);
$dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), $sumMembers['total']['members_expired']);
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusExcluded"), $sumMembers['total']['members_excluded']);
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), $sumMembers['total']['members_resiliated']);
$dataseries = [
[$langs->transnoentitiesnoconv("MembersStatusToValid"), $sumMembers['total']['members_draft']], // Draft, not yet validated
[$langs->transnoentitiesnoconv("WaitingSubscription"), $sumMembers['total']['members_pending']],
[$langs->transnoentitiesnoconv("UpToDate"), $sumMembers['total']['members_uptodate']],
[$langs->transnoentitiesnoconv("OutOfDate"), $sumMembers['total']['members_expired']],
[$langs->transnoentitiesnoconv("MembersStatusExcluded"), $sumMembers['total']['members_excluded']],
[$langs->transnoentitiesnoconv("MembersStatusResiliated"), $sumMembers['total']['members_resiliated']],
];
/**
* @var string $badgeStatus0

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2021 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2021 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* 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
@@ -174,7 +174,7 @@ print dol_get_fiche_end();
print '<div class="tabsAction">';
if (getDolGlobalString('LDAP_MEMBER_ACTIVE') && getDolGlobalString('LDAP_MEMBER_ACTIVE') != Ldap::SYNCHRO_LDAP_TO_DOLIBARR) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a></div>';
print '<div class="inline-block divButAction"><a class="butAction" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'dolibarr2ldap'], true).'">'.$langs->trans("ForceSynchronize").'</a></div>';
}
print "</div>\n";

View File

@@ -50,51 +50,50 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("members", "companies", "categories"));
// Get parameters
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOSTINT('show_files');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$toselect = GETPOST('toselect', 'array:int');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$toselect = GETPOST('toselect', 'array:int');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
$optioncss = GETPOST('optioncss', 'aZ');
$mode = GETPOST('mode', 'alpha');
$optioncss = GETPOST('optioncss', 'aZ');
$mode = GETPOST('mode', 'alpha');
$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut'
// Search fields
$search = GETPOST("search", 'alpha');
$search = GETPOST("search", 'alpha');
$search_id = GETPOST('search_id', 'int');
$search_ref = GETPOST("search_ref", 'alpha');
$search_lastname = GETPOST("search_lastname", 'alpha');
$search_firstname = GETPOST("search_firstname", 'alpha');
$search_gender = GETPOST("search_gender", 'alpha');
$search_civility = GETPOST("search_civility", 'alpha');
$search_company = GETPOST('search_company', 'alphanohtml');
$search_login = GETPOST("search_login", 'alpha');
$search_address = GETPOST("search_address", 'alpha');
$search_zip = GETPOST("search_zip", 'alpha');
$search_town = GETPOST("search_town", 'alpha');
$search_state = GETPOST("search_state", 'alpha'); // county / departement / federal state
$search_country = GETPOST("search_country", 'alpha');
$search_phone = GETPOST("search_phone", 'alpha');
$search_ref = GETPOST("search_ref", 'alpha');
$search_lastname = GETPOST("search_lastname", 'alpha');
$search_firstname = GETPOST("search_firstname", 'alpha');
$search_gender = GETPOST("search_gender", 'alpha');
$search_civility = GETPOST("search_civility", 'alpha');
$search_company = GETPOST('search_company', 'alphanohtml');
$search_login = GETPOST("search_login", 'alpha');
$search_address = GETPOST("search_address", 'alpha');
$search_zip = GETPOST("search_zip", 'alpha');
$search_town = GETPOST("search_town", 'alpha');
$search_state = GETPOST("search_state", 'alpha'); // county / departement / federal state
$search_country = GETPOST("search_country", 'alpha');
$search_phone = GETPOST("search_phone", 'alpha');
$search_phone_perso = GETPOST("search_phone_perso", 'alpha');
$search_phone_mobile = GETPOST("search_phone_mobile", 'alpha');
$search_type = GETPOST("search_type", 'alpha');
$search_email = GETPOST("search_email", 'alpha');
$search_categ = GETPOST("search_categ", 'intcomma');
$search_morphy = GETPOST("search_morphy", 'alpha');
$search_import_key = trim(GETPOST("search_import_key", 'alpha'));
$search_type = GETPOST("search_type", 'alpha');
$search_email = GETPOST("search_email", 'alpha');
$search_categ = GETPOST("search_categ", 'intcomma');
$search_morphy = GETPOST("search_morphy", 'alpha');
$search_import_key = trim(GETPOST("search_import_key", 'alpha'));
$socid = GETPOSTINT('socid');
if (GETPOSTINT('catid') && empty($search_categ)) {
$search_categ = GETPOSTINT('catid');
}
$search_filter = GETPOST("search_filter", 'alpha');
$search_status = GETPOST("search_status", 'intcomma'); // status
$search_filter = GETPOST("search_filter", 'alpha');
$search_status = GETPOST("search_status", 'intcomma'); // status
$search_datec_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datec_start_month'), GETPOSTINT('search_datec_start_day'), GETPOSTINT('search_datec_start_year'));
$search_datec_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datec_end_month'), GETPOSTINT('search_datec_end_day'), GETPOSTINT('search_datec_end_year'));
$search_datem_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datem_start_month'), GETPOSTINT('search_datem_start_day'), GETPOSTINT('search_datem_start_year'));
@@ -208,7 +207,7 @@ foreach ($object->fields as $key => $val) {
$arrayfields[$tableprefix.'.'.$key] = array(
'label' => $val['label'],
'checked' => (($visible < 0) ? '0' : '1'),
'enabled' => (string) (int) (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)),
'enabled' => (string) (int) (abs($visible) != 3 && (bool) dol_eval((string) $val['enabled'], 1)),
'position' => (int) $val['position'],
'help' => isset($val['help']) ? $val['help'] : ''
);
@@ -645,98 +644,116 @@ if ($search_type > 0) {
}
// $parameters
$param = '';
$query = [];
if (!empty($mode)) {
$param .= '&mode='.urlencode($mode);
$query += ['mode' => $mode];
}
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
if ($contextpage != $_SERVER["PHP_SELF"]) {
$query += ['contextpage' => $contextpage];
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.((int) $limit);
$query += ['limit' => $limit];
}
if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss);
$query += ['optioncss' => $optioncss];
}
if ($groupby != '') {
$param .= '&groupby='.urlencode($groupby);
$query += ['groupby' => $groupby];
}
if ($search_all != "") {
$param .= "&search_all=".urlencode($search_all);
$query += ['search_all' => $search_all];
}
if ($search_ref) {
$param .= "&search_ref=".urlencode($search_ref);
$query += ['search_ref' => $search_ref];
}
if ($search_civility) {
$param .= "&search_civility=".urlencode($search_civility);
$query += ['search_civility' => $search_civility];
}
if ($search_firstname) {
$param .= "&search_firstname=".urlencode($search_firstname);
$query += ['search_firstname' => $search_firstname];
}
if ($search_lastname) {
$param .= "&search_lastname=".urlencode($search_lastname);
$query += ['search_lastname' => $search_lastname];
}
if ($search_gender) {
$param .= "&search_gender=".urlencode($search_gender);
$query += ['search_gender' => $search_gender];
}
if ($search_morphy != '' && $search_morphy != '-1') {
$query += ['search_morphy' => $search_morphy];
}
if ($search_login) {
$param .= "&search_login=".urlencode($search_login);
$query += ['search_login' => $search_login];
}
if ($search_email) {
$param .= "&search_email=".urlencode($search_email);
$query += ['search_email' => $search_email];
}
if ($search_categ > 0 || $search_categ == -2) {
$param .= "&search_categ=".urlencode((string) ($search_categ));
$query += ['search_categ' => $search_categ];
}
if ($search_company) {
$param .= "&search_company=".urlencode($search_company);
$query += ['search_company' => $search_company];
}
if ($search_address != '') {
$param .= "&search_address=".urlencode($search_address);
$query += ['search_address' => $search_address];
}
if ($search_town != '') {
$param .= "&search_town=".urlencode($search_town);
$query += ['search_town' => $search_town];
}
if ($search_zip != '') {
$param .= "&search_zip=".urlencode($search_zip);
$query += ['search_zip' => $search_zip];
}
if ($search_state != '') {
$param .= "&search_state=".urlencode($search_state);
$query += ['search_state' => $search_state];
}
if ($search_country != '') {
$param .= "&search_country=".urlencode($search_country);
$query += ['search_country' => $search_country];
}
if ($search_phone != '') {
$param .= "&search_phone=".urlencode($search_phone);
$query += ['search_phone' => $search_phone];
}
if ($search_phone_perso != '') {
$param .= "&search_phone_perso=".urlencode($search_phone_perso);
$query += ['search_phone_perso' => $search_phone_perso];
}
if ($search_phone_mobile != '') {
$param .= "&search_phone_mobile=".urlencode($search_phone_mobile);
$query += ['search_phone_mobile' => $search_phone_mobile];
}
if ($search_filter && $search_filter != '-1') {
$param .= "&search_filter=".urlencode($search_filter);
$query += ['search_filter' => $search_filter];
}
if ($search_status != "" && $search_status != -3) {
$param .= "&search_status=".urlencode($search_status);
$query += ['search_status' => $search_status];
}
if ($search_import_key != '') {
$param .= '&search_import_key='.urlencode($search_import_key);
$query += ['search_import_key' => $search_import_key];
}
if ($search_type > 0) {
$param .= "&search_type=".urlencode($search_type);
$query += ['search_type' => $search_type];
}
if ($search_datec_start) {
$param .= '&search_datec_start_day='.dol_print_date($search_datec_start, '%d').'&search_datec_start_month='.dol_print_date($search_datec_start, '%m').'&search_datec_start_year='.dol_print_date($search_datec_start, '%Y');
$query += [
'search_datec_start_day' => dol_print_date($search_datec_start, '%d'),
'search_datec_start_month' => dol_print_date($search_datec_start, '%m'),
'search_datec_start_year' => dol_print_date($search_datec_start, '%Y'),
];
}
if ($search_datem_end) {
$param .= '&search_datem_end_day='.dol_print_date($search_datem_end, '%d').'&search_datem_end_month='.dol_print_date($search_datem_end, '%m').'&search_datem_end_year='.dol_print_date($search_datem_end, '%Y');
$query += [
'search_datem_end_day' => dol_print_date($search_datem_end, '%d'),
'search_datem_end_month' => dol_print_date($search_datem_end, '%m'),
'search_datem_end_year' => dol_print_date($search_datem_end, '%Y'),
];
}
// Add $param from extra fields
// Add $query from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// Add $query from hooks
$parameters = array('query' => &$query);
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
// build $param
$param = http_build_query($query);
// List of mass actions available
$arrayofmassactions = array(
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
@@ -776,12 +793,14 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$queryforbutton = $query;
$queryforbutton['mode'] = 'common';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', dolBuildUrl($_SERVER["PHP_SELF"], $queryforbutton), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$queryforbutton['mode'] = 'kanban';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', dolBuildUrl($_SERVER["PHP_SELF"], $queryforbutton), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create', '', $user->hasRight('adherent', 'creer'));
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', dolBuildUrl(DOL_URL_ROOT.'/adherents/card.php', ['action' => 'create']), '', $user->hasRight('adherent', 'creer'));
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* 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) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -147,7 +147,7 @@ print dol_get_fiche_head($head, 'agenda', $langs->trans("Member"), -1, 'user');
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
@@ -181,9 +181,9 @@ if ((!empty($objUser->id) || !empty($objcon->id)) && $permok) {
$morehtmlright = '';
$messagingUrl = DOL_URL_ROOT.'/adherents/messaging.php?rowid='.$object->id;
$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/messaging.php', ['rowid' => $object->id]);
$morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 2);
$messagingUrl = DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id;
$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/agenda.php', ['id' => $object->id]);
$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1);
if (isModEnabled('agenda')) {
@@ -195,7 +195,7 @@ if (isModEnabled('agenda')) {
if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allaactions', 'read'))) {
print '<br>';
$param = '&userid='.urlencode((string) ($id));
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
if ($contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
if ($limit > 0 && $limit != $conf->liste_limit) {

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@@ -28,11 +28,6 @@
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
/**
* @var Conf $conf
* @var DoliDB $db
@@ -41,6 +36,11 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
// Load translation files required by the page
$langs->loadLangs(array("companies", "members", "bills"));
@@ -128,10 +128,10 @@ if (is_object($adht)) {
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['restore_lastsearch_values' => 1]).'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/vcard.php', ['id' => $object->id]).'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 NextGestion <contact@nextgestion.com>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.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
@@ -175,7 +175,7 @@ if ($id > 0) {
print dol_get_fiche_head($head, 'partnership', $langs->trans("ThirdParty"), -1, 'user');
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['restore_lastsearch_values' => 1]).'">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
@@ -272,12 +272,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} else {
if (!$adht->subscription) {
print $langs->trans("SubscriptionNotRecorded");
if ($fadherent->statut > 0) {
if ($fadherent->status > 0) {
print " ".img_warning($langs->trans("Late")); // Display a delay picto only if it is not a draft and is not canceled
}
} else {
print $langs->trans("SubscriptionNotReceived");
if ($fadherent->statut > 0) {
if ($fadherent->status > 0) {
print " ".img_warning($langs->trans("Late")); // Display a delay picto only if it is not a draft and is not canceled
}
}

View File

@@ -65,7 +65,7 @@ $langs->loadLangs(array("companies", "members"));
$memberstatic = new Adherent($db);
$title = $langs->trans("MembersStatisticsByProperties");
$title = $langs->trans("MembershipStatistics");
$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios|DE:Modul_Mitglieder';
llxHeader('', $title, $help_url, '', 0, 0, array('https://www.google.com/jsapi'), '', '', 'mod-member page-stats_byproperties');
@@ -84,6 +84,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."subscription as s ON s.fk_adherent = d.row
$sql .= " WHERE d.entity IN (".getEntity('adherent').")";
$sql .= " AND d.statut <> ".Adherent::STATUS_DRAFT;
$sql .= " GROUP BY d.morphy";
$foundphy = $foundmor = 0;
// Define $data array

View File

@@ -72,19 +72,7 @@ if (!empty($conf->dol_use_jmobile)) {
$arrayjs = array();
}
$title = $langs->trans("Statistics");
if ($mode == 'memberbycountry') {
$title = $langs->trans("MembersStatisticsByCountries");
}
if ($mode == 'memberbystate') {
$title = $langs->trans("MembersStatisticsByState");
}
if ($mode == 'memberbytown') {
$title = $langs->trans("MembersStatisticsByTown");
}
if ($mode == 'memberbyregion') {
$title = $langs->trans("MembersStatisticsByRegion");
}
$title = $langs->trans("MembershipStatistics");
$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios|DE:Modul_Mitglieder';
@@ -184,7 +172,7 @@ if ($mode) {
$obj = $db->fetch_object($resql);
if ($mode == 'memberbycountry') {
$data[] = array(
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? picto_from_langcode($obj->code, 'class="saturatemedium paddingrightonly"', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'code' => (string) $obj->code,
'nb' => (int) $obj->nb,
@@ -194,7 +182,7 @@ if ($mode) {
}
if ($mode == 'memberbyregion') { //+
$data[] = array(
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? picto_from_langcode($obj->code, 'class="saturatemedium paddingrightonly"', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label2' => ($obj->label2 ? $obj->label2 : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>'),
'nb' => (int) $obj->nb,
@@ -204,7 +192,7 @@ if ($mode) {
}
if ($mode == 'memberbystate') {
$data[] = array(
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? picto_from_langcode($obj->code, 'class="saturatemedium paddingrightonly"', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label2' => ($obj->label2 ? $obj->label2 : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>'),
'nb' => (int) $obj->nb,
@@ -214,7 +202,7 @@ if ($mode) {
}
if ($mode == 'memberbytown') {
$data[] = array(
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? picto_from_langcode($obj->code, 'class="saturatemedium paddingrightonly"', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>')),
'label2' => (string) ($obj->label2 ? $obj->label2 : '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>'),
'nb' => (int) $obj->nb,
@@ -242,7 +230,7 @@ if ($mode && !count($data)) {
print $langs->trans("NoValidatedMemberYet").'<br>';
print '<br>';
} else {
if ($mode == 'memberbycountry') {
if (empty($mode) || $mode == 'memberbycountry') {
print '<span class="opacitymedium">'.$langs->trans("MembersByCountryDesc");
if (getDolGlobalString("GOOGLE_SHOW_COUNTRY_GRAPH")) {
print $langs->trans("MembersByCountryDesc2");
@@ -254,16 +242,6 @@ if ($mode && !count($data)) {
print '<span class="opacitymedium">'.$langs->trans("MembersByTownDesc").'</span><br>';
} elseif ($mode == 'memberbyregion') {
print '<span class="opacitymedium">'.$langs->trans("MembersByRegion").'</span><br>'; //+
} else {
print '<span class="opacitymedium">'.$langs->trans("MembersStatisticsDesc").'</span><br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbycountry">'.$langs->trans("MembersStatisticsByCountries").'</a><br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbystate">'.$langs->trans("MembersStatisticsByState").'</a><br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbytown">'.$langs->trans("MembersStatisticsByTown").'</a><br>';
print '<br>'; //+
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbyregion">'.$langs->trans("MembersStatisticsByRegion").'</a><br>'; //+
}
print '<br>';
}

View File

@@ -2,8 +2,8 @@
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* 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
@@ -77,14 +77,14 @@ $langs->loadLangs(array("companies", "members"));
$memberstatic = new Adherent($db);
$form = new Form($db);
$title = $langs->trans("SubscriptionsStatistics");
$title = $langs->trans("MembershipStatistics");
$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios|DE:Modul_Mitglieder';
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-stats');
print load_fiche_titre($title, '', $memberstatic->picto);
$dir = $conf->adherent->dir_temp;
$dir = $conf->member->dir_temp;
dol_mkdir($dir);
@@ -165,7 +165,7 @@ print dol_get_fiche_head($head, 'statssubscription', '', -1, '');
print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
/*print '<form name="stats" method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<table class="border centpercent">';

View File

@@ -493,10 +493,10 @@ print '<input type="hidden" name="rowid" value="'.$object->id.'">';
print dol_get_fiche_head($head, 'subscription', $langs->trans("Member"), -1, 'user');
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['restore_lastsearch_values' => 1]).'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref);
@@ -951,7 +951,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
}
print '<form name="subscription" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<form name="subscription" method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="subscription">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';

View File

@@ -25,14 +25,6 @@
// Load Dolibarr environment
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
if (isModEnabled("bank")) {
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
}
/**
* @var Conf $conf
* @var DoliDB $db
@@ -40,6 +32,13 @@ if (isModEnabled("bank")) {
* @var Translate $langs
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
if (isModEnabled("bank")) {
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
}
// Load translation files required by the page
$langs->loadLangs(array("companies", "members", "bills", "users", "banks"));
@@ -373,7 +372,7 @@ if ($rowid && $action != 'edit') {
print '<div class="tabsAction">';
if ($user->hasRight('adherent', 'cotisation', 'creer')) {
if (empty($bankline->rappro) || empty($bankline)) {
if (empty($bankline) || empty($bankline->rappro)) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".((int) $object->id).'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>";
} else {
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.$langs->trans("BankLineConciliated").'" href="#">'.$langs->trans("Modify")."</a></div>";

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* 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
@@ -57,7 +57,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
}
echo '</td>';
echo '<td class="right"></td>';
echo '<td class="right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&token='.newToken().'&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
echo '<td class="right"><a class="reposition" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'dellink', 'dellinkid' => $key], true).'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
echo '</tr>';
}

View File

@@ -33,12 +33,6 @@
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
/**
* @var Conf $conf
* @var DoliDB $db
@@ -47,14 +41,20 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
// Load translation files required by the page
$langs->load("members");
$rowid = GETPOSTINT('rowid');
$rowid = GETPOSTINT('rowid');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$toselect = GETPOST('toselect', 'array:int');
$toselect = GETPOST('toselect', 'array:int');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
$mode = GETPOST('mode', 'alpha');
@@ -331,7 +331,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMemberType'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/type.php?action=create');
}
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
if ($optioncss != '') {
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
}

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2010-2012 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.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
@@ -29,11 +29,6 @@
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
/**
* @var Conf $conf
* @var DoliDB $db
@@ -42,6 +37,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
// Load translation files required by the page
$langs->loadLangs(array('members', 'languages'));
@@ -75,7 +75,7 @@ if ($action == 'delete' && GETPOST('langtodelete', 'alpha') && $user->hasRight('
$result = $object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user);
if ($result > 0) {
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id);
header("Location: ".dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $id]));
exit;
}
}
@@ -90,9 +90,9 @@ if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->hasRight('
// update of object
if ($forcelangprod == $current_lang) {
$object->label = GETPOST("libelle", 'alphanohtml');
$object->label = GETPOST("libelle", 'alphanohtml');
$object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
//$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
//$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
} else {
$object->multilangs[$forcelangprod]["label"] = GETPOST("libelle", 'alphanohtml');
$object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
@@ -116,13 +116,13 @@ if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $user->hasRight(
foreach ($object->multilangs as $key => $value) { // saving new values in the object
if ($key == $current_lang) {
$object->label = GETPOST("libelle-".$key, 'alphanohtml');
$object->label = GETPOST("libelle-".$key, 'alphanohtml');
$object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
$object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
$object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
} else {
$object->multilangs[$key]["label"] = GETPOST("libelle-".$key, 'alphanohtml');
$object->multilangs[$key]["label"] = GETPOST("libelle-".$key, 'alphanohtml');
$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
}
}
@@ -200,9 +200,9 @@ print "\n<div class=\"tabsAction\">\n";
if ($action == '') {
if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/type_translation.php?action=create&token='.newToken().'&rowid='.$object->id.'">'.$langs->trans("Add").'</a>';
print '<a class="butAction" href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/type_translation.php', ['action' => 'create', 'rowid' => $object->id], true).'">'.$langs->trans("Add").'</a>';
if ($cnt_trans > 0) {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/type_translation.php?action=edit&token='.newToken().'&rowid='.$object->id.'">'.$langs->trans("Update").'</a>';
print '<a class="butAction" href="'.dolBuildUrl(DOL_URL_ROOT.'/adherents/type_translation.php', ['action' => 'edit', 'rowid' => $object->id], true).'">'.$langs->trans("Update").'</a>';
}
}
}
@@ -228,7 +228,7 @@ if ($action == 'edit') {
print($s ? $s.' ' : '').'<b>'.$langs->trans('Language_'.$key).':</b>';
print '</div>';
print '<div class="inline-block marginbottomonly floatright">';
print '<a href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"')."</a><br>";
print '<a href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['rowid' => $object->id, 'action' => 'delete', 'langtodelete' => $key], true).'">'.img_delete('', 'class="valigntextbottom"')."</a><br>";
print '</div>';
print '<div class="underbanner clearboth"></div>';
@@ -254,7 +254,7 @@ if ($action == 'edit') {
print($s ? $s.' ' : '').'<b>'.$langs->trans('Language_'.$key).':</b>';
print '</div>';
print '<div class="inline-block marginbottomonly floatright">';
print '<a href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"').'</a>';
print '<a href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['rowid' => $object->id, 'action' => 'delete', 'langtodelete' => $key], true).'">'.img_delete('', 'class="valigntextbottom"').'</a>';
print '</div>';

View File

@@ -1,205 +0,0 @@
<?php
/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/admin/accountant.php
* \ingroup core
* \brief Setup page to configure accountant / auditor
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
$action = GETPOST('action', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'adminaccoutant'; // To manage different context of search
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/
// Load translation files required by the page
$langs->loadLangs(array('admin', 'companies'));
if (!$user->admin) {
accessforbidden();
}
$error = 0;
$object = new stdClass();
/*
* Actions
*/
$parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|| ($action == 'updateedit')) {
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOSTINT("state_id"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOSTINT('country_id'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("phone", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity);
if ($action != 'updateedit' && !$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
}
/*
* View
*/
$help_url = '';
llxHeader('', $langs->trans("CompanyFoundation"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-accountant');
print load_fiche_titre($langs->trans("CompanyFoundation"), '', 'title_setup');
$head = company_admin_prepare_head();
print dol_get_fiche_head($head, 'accountant', '', -1, '');
$form = new Form($db);
$formother = new FormOther($db);
$formcompany = new FormCompany($db);
$countrynotdefined = '<span class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</span>';
print '<span class="opacitymedium">'.$langs->trans("AccountantDesc")."</span><br>\n";
print "<br><br>\n";
/**
* Edit parameters
*/
if (!empty($conf->use_javascript_ajax)) {
print "\n".'<script type="text/javascript">';
print '$(document).ready(function () {
$("#selectcountry_id").change(function() {
console.log("selectcountry_id change");
document.form_index.action.value="updateedit";
document.form_index.submit();
});
});';
print '</script>'."\n";
}
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("CompanyInfo").'</th><th></th></tr>'."\n";
// Name of Accountant Company
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag(GETPOSTISSET('nom') ? GETPOST('nom', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_NAME')).'"'.(!getDolGlobalString('MAIN_INFO_ACCOUNTANT_NAME') ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
// Address
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOSTISSET('address') ? GETPOST('address', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_ADDRESS')).'</textarea></td></tr>'."\n";
// ZIP
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
print '<input class="width100" name="zipcode" id="zipcode" value="'.dol_escape_htmltag(GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_ZIP')).'"></td></tr>'."\n";
// Town/City
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
print '<input name="town" class="minwidth100" id="town" value="'.dol_escape_htmltag(GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_TOWN')).'"></td></tr>'."\n";
// Country
print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
print img_picto('', 'globe-americas', 'class="pictofixedwidth"');
print $form->select_country((GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY')), 'country_id');
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'."\n";
// State
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
print img_picto('', 'state', 'class="pictofixedwidth"');
print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_STATE')), (GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY')), 'state_id');
print '</td></tr>'."\n";
// Telephone
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
print img_picto('', 'object_phoning', '', 0, 0, 0, '', 'pictofixedwidth');
print '<input name="phone" id="phone" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('phone') ? GETPOST('phone', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_PHONE')).'"></td></tr>';
print '</td></tr>'."\n";
// Fax
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
print img_picto('', 'object_phoning_fax', '', 0, 0, 0, '', 'pictofixedwidth');
print '<input name="fax" id="fax" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_FAX')).'"></td></tr>';
print '</td></tr>'."\n";
// eMail
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
print img_picto('', 'object_email', '', 0, 0, 0, '', 'pictofixedwidth');
print '<input name="mail" id="email" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_MAIL')).'"></td></tr>';
print '</td></tr>'."\n";
// Web
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
print img_picto('', 'globe', '', 0, 0, 0, '', 'pictofixedwidth');
print '<input name="web" id="web" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('web') ? GETPOST('web', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_WEB')).'"></td></tr>';
print '</td></tr>'."\n";
// Code
print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
print '<input name="code" id="code" class="minwidth100" value="'.dol_escape_htmltag(GETPOSTISSET('code') ? GETPOST('code', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_CODE')).'"></td></tr>'."\n";
// Note
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOSTISSET('note') ? GETPOST('note', 'restricthtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_NOTE')).'</textarea></td></tr>';
print '</td></tr>';
print '</table>';
print $form->buttonsSaveCancel("Save", '');
print '</form>';
llxFooter();
$db->close();

View File

@@ -67,13 +67,13 @@ $help_url = '';
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-admin page-accounting');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($title, $linkback, 'title_setup');
print "<br>\n";
$texttoshow = $langs->trans("AccountancySetupDoneFromAccountancyMenu", '{s1}'.$langs->transnoentitiesnoconv("Accounting").' - '.$langs->transnoentitiesnoconv("Setup").'{s2}');
$texttoshow = str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin&showtuto=1">', $texttoshow);
$texttoshow = str_replace('{s1}', '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/accountancy/index.php', ['mainmenu' => 'accountancy', 'leftmenu' => 'accountancy_admin', 'showtuto' => 1]).'">', $texttoshow);
$texttoshow = str_replace('{s2}', '</a>'.img_picto("", "url", 'class="paddingleft"'), $texttoshow);
print '<span class="opacitymedium">'.$texttoshow."</span><br>\n";
print "<br>\n";

View File

@@ -129,7 +129,7 @@ $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Ter
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-admin page-agenda');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');

View File

@@ -75,7 +75,7 @@ $textobject = $langs->transnoentitiesnoconv("Agenda");
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');

View File

@@ -201,7 +201,7 @@ $arrayofcss = array();
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, $arrayofjs, $arrayofcss, '', 'mod-admin page-agenda-extsites');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');

View File

@@ -198,7 +198,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_other');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');

View File

@@ -166,7 +166,7 @@ $formactions = new FormActions($db);
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-agenda_reminder');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');

View File

@@ -49,21 +49,23 @@ if (!$user->admin) {
// Load translation files required by the page
$langs->loadLangs(array("admin", "other", "agenda"));
$def = array();
$actionsave = GETPOST('save', 'alpha');
// Get value in setup
$MAIN_AGENDA_XCAL_EXPORTKEY = getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY');
$MAIN_AGENDA_EXPORT_PAST_DELAY = getDolGlobalString('MAIN_AGENDA_EXPORT_PAST_DELAY', 100);
$MAIN_AGENDA_EXPORT_PAST_DELAY = getDolGlobalInt('MAIN_AGENDA_EXPORT_PAST_DELAY', 100);
$MAIN_AGENDA_EXPORT_CACHE = getDolGlobalInt('MAIN_AGENDA_EXPORT_CACHE');
$AGENDA_EXPORT_FIX_TZ = getDolGlobalString('AGENDA_EXPORT_FIX_TZ');
// Overwrite with post values
if (GETPOSTISSET('MAIN_AGENDA_XCAL_EXPORTKEY')) {
$MAIN_AGENDA_XCAL_EXPORTKEY = trim(GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY', 'alpha'));
}
if (GETPOSTISSET('MAIN_AGENDA_EXPORT_PAST_DELAY')) {
$MAIN_AGENDA_EXPORT_PAST_DELAY = intval(GETPOSTINT('MAIN_AGENDA_EXPORT_PAST_DELAY'));
$MAIN_AGENDA_EXPORT_PAST_DELAY = GETPOSTINT('MAIN_AGENDA_EXPORT_PAST_DELAY');
}
if (GETPOSTISSET('MAIN_AGENDA_EXPORT_CACHE')) {
$MAIN_AGENDA_EXPORT_CACHE = intval(GETPOSTINT('MAIN_AGENDA_EXPORT_CACHE'));
$MAIN_AGENDA_EXPORT_CACHE = GETPOSTINT('MAIN_AGENDA_EXPORT_CACHE');
}
if (GETPOSTISSET('AGENDA_EXPORT_FIX_TZ')) {
$AGENDA_EXPORT_FIX_TZ = trim(GETPOST('AGENDA_EXPORT_FIX_TZ', 'alpha'));
@@ -97,14 +99,10 @@ if ($actionsave) {
$form = new Form($db);
if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) {
$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100;
}
$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_xcal');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');
@@ -241,8 +239,6 @@ $message .= $langs->trans("AgendaUrlOptionsProject", $user->login, $user->login)
$message .= $langs->trans("AgendaUrlOptionsType", 'systemauto|system').'<br>';
$message .= $langs->trans("AgendaUrlOptionsCode", 'AC_COMPANY_CREATE,AC_PROPAL_VALIDATE,AC_CODE...').'<br>';
$message .= $langs->trans("AgendaUrlOptionsIncludeHolidays", '1', '1').'<br>';
//$defaultnotolderthan = getDolGlobalString('MAIN_AGENDA_EXPORT_PAST_DELAY', 100);
//$message .= $langs->trans("AgendaUrlOptionsLimitDays", 'X', 'X', $defaultnotolderthan).'<br>'; // This option is hidden because already set and defined into previous options
$message .= $langs->trans("AgendaUrlOptionsLimit", '1000').'<br>';
print info_admin($message);

View File

@@ -224,7 +224,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-admin page-bank');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');

View File

@@ -76,7 +76,7 @@ $page_name = "BankSetupModule";
llxHeader('', $langs->trans("BankSetupModule"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bank_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');

View File

@@ -76,7 +76,7 @@ $page_name = "BankSetupModule";
llxHeader('', $langs->trans("BankSetupModule"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bank_payments_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');

View File

@@ -76,7 +76,7 @@ $page_name = "BankSetupModule";
llxHeader('', $langs->trans("BankSetupModule"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bankline_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');

View File

@@ -148,7 +148,7 @@ $formbarcode = new FormBarCode($db);
$help_url = 'EN:Module_Barcode|FR:Module_Codes_Barre|ES:Módulo Código de barra|DE:Modul_Barcode';
llxHeader('', $langs->trans("BarcodeSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-barcode');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("BarcodeSetup"), $linkback, 'title_setup');

View File

@@ -162,6 +162,13 @@ if ($action == 'updateMask') {
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
} elseif ($action == 'updateoptions') {
if (GETPOST('BOM_USE_SEARCH_TO_SELECT')) {
$bomsearch = GETPOST('activate_BOM_USE_SEARCH_TO_SELECT', 'alpha');
if (dolibarr_set_const($db, "BOM_USE_SEARCH_TO_SELECT", $bomsearch, 'chaine', 0, '', $conf->entity)) {
$conf->global->BOM_USE_SEARCH_TO_SELECT = $bomsearch;
}
}
}
@@ -175,7 +182,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader("", $langs->trans("BOMsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-bom');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup');
@@ -478,6 +485,30 @@ if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 1) {
}
print '<tr class="oddeven">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="updateoptions">';
print '<td>'.$langs->trans("UseSearchToSelectBom").'</td>';
if (!$conf->use_javascript_ajax) {
print '<td></td>';
print '<td class="nowrap right">';
print $langs->trans("NotAvailableWhenAjaxDisabled");
print "</td>";
} else {
print '<td class="right">';
$arrval = array('0' => $langs->trans("No"),
'1' => $langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 1).')',
'2' => $langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 2).')',
'3' => $langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 3).')',
);
print $form->selectarray("activate_BOM_USE_SEARCH_TO_SELECT", $arrval, getDolGlobalString("BOM_USE_SEARCH_TO_SELECT")).'</td>';
print '<td class="right"><input type="submit" class="button small reposition" name="BOM_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">';
print "</td>";
}
print '</form>';
print '</tr>';
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
@@ -517,6 +548,8 @@ print '</form>';
print '<br>';
// End of page
llxFooter();
$db->close();

View File

@@ -76,7 +76,7 @@ $help_url = '';
llxHeader('', $langs->trans("BOMsSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bom_extrafiels');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup');

View File

@@ -76,7 +76,7 @@ $help_url = '';
llxHeader('', $langs->trans("BOMsSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bomline_extrafields');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup');

View File

@@ -238,7 +238,7 @@ $sql .= " bd.rowid as boxid";
$sql .= " FROM ".MAIN_DB_PREFIX."boxes as b, ".MAIN_DB_PREFIX."boxes_def as bd";
$sql .= " WHERE b.box_id = bd.rowid";
$sql .= " AND b.entity IN (0,".$conf->entity.")";
$sql .= " AND b.fk_user=0";
$sql .= " AND b.fk_user = 0";
$sql .= " ORDER by b.position, b.box_order";
//print $sql;

View File

@@ -115,7 +115,7 @@ llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-a
$form = new Form($db);
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');

View File

@@ -81,7 +81,7 @@ $user->fetch_clicktodial();
$wikihelp = 'EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial_Es';
llxHeader('', $langs->trans("ClickToDialSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-clicktodial');
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("ClickToDialSetup"), $linkback, 'title_setup');
@@ -175,7 +175,7 @@ if (getDolGlobalString('CLICKTODIAL_URL')) {
$phonefortest = GETPOST('phonefortest');
}
print '<form action="'.$_SERVER["PHP_SELF"].'">';
print '<form action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print $langs->trans("LinkToTestClickToDial", $user->login).' : ';
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020-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
@@ -112,7 +112,7 @@ print "<br>\n";
* Edit parameters
*/
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="update">';

View File

@@ -142,7 +142,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-compta');
$form = new Form($db);
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans('ComptaSetup'), $linkback, 'title_setup');

View File

@@ -27,9 +27,6 @@
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
/**
* @var Conf $conf
* @var DoliDB $db
@@ -37,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
* @var Translate $langs
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
// Load translation files required by the page
$langs->load("admin");
@@ -44,11 +43,14 @@ $langs->load("admin");
$rowid = GETPOSTINT('rowid');
$entity = GETPOSTINT('entity');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'aZ09');
$debug = GETPOSTINT('debug');
$consts = GETPOST('const', 'array');
$constname = GETPOST('constname', 'alphanohtml');
$constvalue = GETPOST('constvalue', 'restricthtml'); // We should be able to send everything here
$constnote = GETPOST('constnote', 'alpha');
// Load variable for pagination
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');

View File

@@ -219,7 +219,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-contract');
$form = new Form($db);
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup');

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