Compare commits

...

940 Commits
20.0.1 ... 19.0

Author SHA1 Message Date
Laurent Destailleur
7cd529a179 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-12-05 16:22:11 +01:00
Laurent Destailleur
82c3849baa Fix CI 2025-12-05 16:21:15 +01:00
Laurent Destailleur
c932a1c878 Merge pull request #36542 from ATM-Consulting/FIX/155/18.0/regression-variable-renaming
FIX: fix #36401 (for v17.0) doesn't work in v18.0+ because of variable renaming
2025-12-05 09:48:32 +01:00
Laurent Destailleur
f2f8278603 Merge pull request #36539 from W1W1-M/backport-fix-propal-update-shipping-availability
FIX propal shipping and availability update (v18+)
2025-12-05 09:47:25 +01:00
atm-florian
cc5a8fd15a FIX: PR#36401 fixed a missing GETPOSTISSET() but the check involves a variable ($taskid) that was renamed ($tmptaskid) in 18.0 2025-12-05 09:29:15 +01:00
William Mead
a567cade7d Fixed shipping and availability updating. Updated contributor details. 2025-12-05 08:56:14 +01:00
Laurent Destailleur
764bb3791b Fix CI 2025-12-04 21:51:03 +01:00
Laurent Destailleur
9ac82f488e Fix CI 2025-12-04 21:50:26 +01:00
Laurent Destailleur
222cd76799 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-12-04 18:53:04 +01:00
Laurent Destailleur
47799b88cf Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-12-04 18:40:23 +01:00
Laurent Destailleur
78ca968db6 Merge pull request #36517 from atm-florianm/SEC/commented-out-restrictedArea
SEC: FIX #36430 permissions not checked on other tabs of HRM evaluation card
2025-12-04 18:37:46 +01:00
Laurent Destailleur
aa8fac1deb Merge pull request #36429 from atm-adrien/FIX/MulticompanyStockCompatibility
FIX : Implementation of multi-company compatibility with inventory/warehouse management
2025-12-04 10:42:35 +01:00
Eric - CAP-REL
2ebdcfda5c Merge pull request #35788 from Easya-Solutions/18_allow_credit_invoice_on_situation
FIX : remove useless condition to create credit on situation invoice …
2025-12-04 09:56:30 +01:00
Eric - CAP-REL
70431043af Merge pull request #36398 from Easya-Solutions/18.0_fix-invoice-card-variables
FIX undefined variables on create invoice from shipment card (backport from v20)
2025-12-04 09:30:56 +01:00
lvessiller-opendsi
ad37ece7bc Merge pull request #36494 from atm-florianm/FIX/155/date/minute-second-vs-min-sec
FIX 18.0: `GETPOSTDATE()` and `buildParamDate()` assumed wrong HTTP param names
2025-12-04 09:27:44 +01:00
atm-florian
a1476fd221 SEC: permissions not checked on other tabs of HRM evaluation card 2025-12-03 17:11:14 +01:00
atm-florian
0e1c580f11 FIX 18.0: GETPOSTDATE and buildParamDate assumed HTTP param names 'minute' and 'second' instead of 'min' and 'sec' 2025-12-01 13:47:50 +01:00
Laurent Destailleur
4223ff08ce Merge pull request #36491 from Easya-Solutions/18.0_fix-update-extras
FIX not remove value of others extra-fields on update extras action
2025-12-01 13:10:08 +01:00
VESSILLER
d16f8b68db FIX not remove value of others extra-fields on update extras action 2025-12-01 11:14:16 +01:00
Laurent Destailleur
d8891130f5 Merge pull request #36463 from vold-lu/18.0
NEW: Automatically release docker image for each GitHub release
2025-11-28 18:13:47 +01:00
Aloïs Micard
b2f9de7489 Add new workflow to trigger Docker build 2025-11-28 17:27:32 +01:00
Laurent Destailleur
17ff2bea5d Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-26 21:16:11 +01:00
Laurent Destailleur
1002557746 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-11-26 21:12:58 +01:00
Laurent Destailleur
908880c82c SEC: fix IDOR attack on employee evaluation. Missing permision test 7ed0af2a13
SEC: empty commit for CI automata
2025-11-26 15:41:53 +01:00
atm-florian
3608e9b102 SEC: 7ed0af2a13 2025-11-26 14:44:38 +01:00
Adrien Raze
c1c2358e75 FIX : Implementation of multi-company compatibility with inventory/warehouse management 2025-11-26 12:30:22 +01:00
Laurent Destailleur
69ac8cebbf Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-25 21:09:26 +01:00
Laurent Destailleur
1e16bf5160 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-11-25 21:09:04 +01:00
Florian Mortgat
c2635f5242 FIX 17.0: perweek.php resets task progress to 0% when: (#36401)
* FIX 17.0: perweek.php resets task progress to 0% when:
1. the column "Declared real progress" is hidden (which means the corresponding form inputs won't be displayed)
2. and the user doesn't enter any time for that task (= leaves the input empty)

If the column is shown, the bug doesn't occur because the correct value is sent with $_POST.
If the user enters time, the bug doesn't occur because there is a GETPOSTISSET test for that case.

* Apply suggestion from @atm-florianm

variable name ($taskid vs $tmptaskid)
2025-11-24 16:32:27 +01:00
Laurent Destailleur
9394f24cf7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-24 16:15:26 +01:00
Laurent Destailleur
b1a4520059 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-11-24 16:10:29 +01:00
Laurent Destailleur
2935a245a3 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-11-24 16:07:46 +01:00
Laurent Destailleur
5589ed71b2 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-11-24 16:07:22 +01:00
Laurent Destailleur
32f160355b Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-11-24 16:03:52 +01:00
Florian Mortgat
5a61cc9393 FIX DA027383: permissions not checked on HRM evaluation card (#36328) (#36399)
Permissions involved:
- hrm->evaluation->readall: the user can view anyone's evaluations
- hrm->evaluation->read: the user can only view their or their subordinates' evaluations
2025-11-24 14:57:20 +01:00
Florian Mortgat
7ed0af2a13 FIX DA027383: permissions not checked on HRM evaluation card (#36328)
Permissions involved:
- hrm->evaluation->readall: the user can view anyone's evaluations
- hrm->evaluation->read: the user can only view their or their subordinates' evaluations
2025-11-24 12:21:51 +01:00
VESSILLER
1cd3ca3222 FIX undefined variables on create invoice from shipment card (backport from v20) 2025-11-24 10:30:08 +01:00
Eric - CAP-REL
c8acd48e34 setErrors does not exists, same solution as dolibarr v19.0 (#36107)
* setErrors does not exists, same solution as dolibarr v19.0

* reload ci

* reload ci 2

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
2025-11-20 23:58:15 +01:00
ldestailleur
9e8460c3dc Fix CI 2025-11-20 15:17:01 +01:00
ldestailleur
70f5e20572 Fix CI 2025-11-20 15:16:04 +01:00
Laurent Destailleur
3a617ed772 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-20 15:14:27 +01:00
Laurent Destailleur
f32386208d Fix CI 2025-11-20 15:14:09 +01:00
Laurent Destailleur
1adf4ce67f Fix CI 2025-11-20 15:13:52 +01:00
Laurent Destailleur
515a615915 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-20 11:44:40 +01:00
noec764
ac4820b4cb FIX: TakePOS Missing Thirdparty Id when getting more products (#36341)
Co-authored-by: Noé <noe@scopen.fr>
2025-11-20 11:34:06 +01:00
Eric Seigne
f9d285c416 Merge branch '18.0' of https://github.com/Dolibarr/dolibarr into 18.0 2025-11-20 10:09:57 +01:00
Eric Seigne
f1f7ea93b0 fix assign-and-label-v18 2025-11-20 10:09:29 +01:00
lvessiller-opendsi
1f6cec841f Merge pull request #35795 from hregis/fix_18_multicompany_compatibility
FIX Multicompany compatibility with "project_task"
2025-11-20 10:03:38 +01:00
lvessiller-opendsi
4dcbd826e6 Merge pull request #35812 from Easya-Solutions/18__fix_situation_remove_from_cycle
FIX remove situation invoice from cycle
2025-11-20 10:03:02 +01:00
Eric Seigne
fd5c9b0562 update github actions for race conditions of author/reviewer 2025-11-20 09:46:59 +01:00
Florian Mortgat
8e30fc0bd1 FIX 19.0 - attachments upload dir for invoices not always determined correctly (doesn't always take multi-entity into account) (#36302) 2025-11-18 11:39:45 +01:00
Regis Houssin
21843e68b0 FIX #36149 (#36150) 2025-11-18 10:12:05 +01:00
lvessiller-opendsi
30ecf80732 FIX keep user who validate proposal on update (#36257) 2025-11-14 15:53:31 +01:00
lvessiller-opendsi
9de04b1c48 Merge pull request #35809 from marc-dll/18.0_FIX_expensereport_bankaccount_access
FIX: expense report card: do not show bank account if user cannot see them
2025-11-13 09:39:39 +01:00
Eric - CAP-REL
7e7939d234 Merge pull request #35893 from RyAbn/18.0_FIX_Email_collector_no_msg_parts_fatal_error
FIX: Email Collector Module
2025-11-13 09:22:44 +01:00
Laurent Destailleur
dba065c222 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-11-12 21:50:04 +01:00
Laurent Destailleur
29edc77dd5 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-11-12 21:46:53 +01:00
Laurent Destailleur
99fe044868 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-11-12 21:44:49 +01:00
Laurent Destailleur
8ae27c3a5f Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-11-12 21:44:34 +01:00
Ryad ABANI
ea28972862 FIX: dol_escape_htmltag in extrafields_view (#36136)
Co-authored-by: Ryad ABANI <ryad.abani@scopen.fr>
2025-11-12 15:44:40 +01:00
Frédéric FRANCE
5fa475a074 fix directory was always overwritten (#36148) 2025-11-07 18:43:26 +01:00
Regis Houssin
3ad30f8622 FIX use array_intersect instead in_array 2025-11-07 12:07:50 +01:00
Regis Houssin
3b7cda03f3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into fix_18_multicompany_compatibility 2025-11-07 12:04:44 +01:00
Eric - CAP-REL
e5f3c2c117 Merge pull request #35963 from hregis/fix_18_wrong_hook_check
FIX wrong check of hook return
2025-11-06 09:28:56 +01:00
lvessiller-opendsi
1d24cf5ea5 Merge pull request #36027 from Easya-Solutions/18_fix_list_on_societe_price_tab
Fix listincsv on tab societe/price.php
2025-11-06 09:26:08 +01:00
Laurent Destailleur
689b992afb Split tasks 2025-11-05 22:40:50 +01:00
Florian Mortgat
a16f3bdf31 FIX 16.0: extrafield of type link to category causes SQL error in selectForFormsList() (#36074)
* FIX 16.0 (up to 19.0): extrafield of type link to category causes SQL error in selectForFormsList

* Apply suggestion from @atm-florianm
2025-11-04 13:06:58 +01:00
atm-GregM
dc7932700b Fix TICKET_ENABLE_PUBLIC_INTERFACE (#36073) 2025-11-04 12:25:57 +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
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
Marc de Lima Lucio
223326610e FIX: expense report card: use correct bank module designator for detection 2025-10-31 13:43:21 +01:00
tnegre
2555b14f9c Fix listincsv on tab societe/price.php 2025-10-31 09:39:09 +01:00
Regis Houssin
edd4565921 FIX wrong check of hook return 2025-10-27 12:09:49 +01:00
Ryad ABANI
38980a935c FIX: Email Collector Module: manage error when imap_fetchstructure return false. Previously it generated warning and fatal error because the returned value was not of type class 2025-10-22 11:56:07 +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
Marc de Lima Lucio
1f65548836 FIX: notifications: correctly report email delivery errors (#35864) 2025-10-20 23:53:07 +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
tnegre
66d72d0bba FIX allow a situation with credit to be removed from cycle 2025-10-17 14:13:25 +02:00
Marc de Lima Lucio
403dad1660 FIX: expense report card: do not show bank account if user cannot see them 2025-10-17 13:56:07 +02:00
ThomasNgr-OpenDSI
e801a7602c FIX day of ticket on takePOS. Backport 6abdb6e. (#35745) 2025-10-17 02:28:38 +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
Regis Houssin
12d078c651 FIXX clean code 2025-10-16 19:33:38 +02:00
Regis Houssin
0dbbd453e5 FIX Multicompany compatibility with "project_task" 2025-10-16 19:10:32 +02:00
tnegre
8ddf9f6075 FIX : remove useless condition to create credit on situation invoice (#35786) 2025-10-16 11:57:49 +02:00
Regis Houssin
cc22f978cd FIX wrong field name (#35728) 2025-10-14 18:45:26 +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
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
Frédéric FRANCE
a692c73071 fix select nature member in adherent/admin/website.php (#35641) 2025-10-05 16:59:16 +02:00
Laurent Destailleur
def8495513 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-02 15:52:20 +02:00
Laurent Destailleur
b2fce5052f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-02 15:52:05 +02:00
Regis Houssin
b1d57a6bd1 FIX sql syntax error (#35588) 2025-10-02 15:45:30 +02:00
ldestailleur
16904d12f8 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-02 03:18:10 +02:00
ldestailleur
1525b9c85e Rename label 2025-10-02 03:17:57 +02:00
Marc de Lima Lucio
ffe07999cf FIX: pgsql: error when calculating depreciations (#34213)
* FIX: pgsql: error when calculating depreciations

* FIX: asset deprectiation: optimize sql

* FIX: travis
2025-10-02 02:39:29 +02:00
Regis Houssin
24146d89c5 FIX #35568 (#35569)
* FIX #35568

* FIX clear "thirdparty" object before or during the fetch

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 19:54:50 +02:00
ldestailleur
1dd2cc36e4 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-01 19:51:11 +02:00
ldestailleur
477d755bbc Clean CI files 2025-10-01 19:32:40 +02:00
ldestailleur
f85b53a4ca Test CI 2025-10-01 19:29:30 +02:00
ldestailleur
a6e01fe7b7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 19:28:46 +02:00
ldestailleur
43c2336683 Log 2025-10-01 19:28:36 +02:00
Thomas C.
e1b919366e FIX : To have only the sender's entity when sending mail (#31053)
* fix

* Update html.formmail.class.php

* Update html.formmail.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
2025-10-01 19:18:31 +02:00
ldestailleur
40e4a6959f Fix CI 2025-10-01 19:17:22 +02:00
ldestailleur
e9869bb5da Fix yml 2025-10-01 17:19:57 +02:00
ldestailleur
22995dae99 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-10-01 17:16:24 +02:00
ldestailleur
52ae202aff Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:59:49 +02:00
ldestailleur
2ca2fe7f28 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:55:23 +02:00
ldestailleur
140310c508 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 16:55:05 +02:00
ldestailleur
64cf2513bd Clean CI 2025-10-01 16:54:52 +02:00
Frédéric FRANCE
6c207f78d8 fix llx_actioncomm.sql (#35583) 2025-10-01 16:24:54 +02:00
Marc de Lima Lucio
a3969c1d2c FIX: php 8+ warnings when creating deposits (#35582) 2025-10-01 16:21:05 +02:00
Regis Houssin
d9563ac0ed Update pr-18.yaml (#35577)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 14:49:29 +02:00
ldestailleur
bea2f674f0 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 14:34:04 +02:00
ldestailleur
80494870c0 Try to fix CI 18 2025-10-01 14:33:56 +02:00
Eric - CAP-REL
d25847602b missing fk_user_creat value (#35576) 2025-10-01 13:59:27 +02:00
ldestailleur
283efbbffe Test CI 2025-10-01 13:57:10 +02:00
ldestailleur
2e430a71a3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-10-01 13:54:19 +02:00
ldestailleur
faf2971ff7 Try to fix Ci 18 2025-10-01 13:54:11 +02:00
Regis Houssin
acf5e30b30 FIX missing entity filter (#35517) 2025-09-27 12:07:43 +02:00
ldestailleur
76b5540124 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-27 12:06:49 +02:00
ldestailleur
8bb63c5963 Test on autoassign 2025-09-27 12:06:40 +02:00
HENRY Florian
f532f85d8c fix: remove space in global conf test (#35484) 2025-09-26 20:54:21 +02:00
ldestailleur
f93fdc641a Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-26 01:16:30 +02:00
ldestailleur
0226d75ec6 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-26 01:16:17 +02:00
Dylan Bourdere
a63eae7903 Fix: property api dir_temp (#35439)
* fix undefined property

* rename key
2025-09-25 11:59:09 +02:00
ldestailleur
79210c0120 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-25 11:57:12 +02:00
ldestailleur
d87ebbf926 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-09-25 11:55:28 +02:00
ldestailleur
08b105502e Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-09-25 11:55:21 +02:00
ldestailleur
bd2aba1a2f Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-09-25 11:54:59 +02:00
ldestailleur
a4601686a6 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-09-25 11:54:18 +02:00
lvessiller-opendsi
bcf6d6a7a2 FIX api orders : forward database error on failure (backpot commit d9e81cb) (#35478) 2025-09-25 11:47:51 +02:00
ldestailleur
db5f33442a Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-24 15:25:33 +02:00
ldestailleur
84ba1852aa Another try to have autoassignement on v18 2025-09-24 15:25:15 +02:00
Dylan Bourdere
65a3b0893d fix undefined properties (#35435) 2025-09-22 20:31:50 +02:00
Dylan Bourdere
669c939bcd use getDolGlobalString to avoid getting undefined property (#35436) 2025-09-22 20:30:47 +02:00
Dylan Bourdere
92454d671f rename tab name in comment of modulebuilder (#35431) 2025-09-22 12:11:32 +02:00
Frédéric FRANCE
4e7954b85c fix CI v19 (#35414) 2025-09-21 12:10:43 +02:00
Frédéric FRANCE
41e914f9ac fix CI v19 (#35413)
* fix CI v19

* Update ProductCombination.class.php

* Update combinations.php

* Update combinations.php

* Update actions_massactions.inc.php
2025-09-20 18:37:01 +02:00
ldestailleur
5614def20b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-20 16:06:08 +02:00
ldestailleur
f33fe1036f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-09-20 16:05:06 +02:00
Frédéric FRANCE
f43f2909ff rule is deprecated (#35410) 2025-09-20 16:02:39 +02:00
Regis Houssin
fc8b0a80c0 FIX missing check constant PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS (#33277)
* FIX missing check constant PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS

* use getDolGlobalString

like eldy suggest

* use getDolGlobalString

* Use getDolGlobalString

* use getDolGlobalString

* Use getDolGlobalString

---------

Co-authored-by: Eric - CAP-REL <1468823+rycks@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-18 11:22:36 +02:00
Eric - CAP-REL
4adc4a31e2 Merge pull request #35262 from SylvainLegrand/Fix_rights_for_user_creer
Fix rights for bank tab on user card
2025-09-18 09:31:22 +02:00
ldestailleur
8c6ecd1144 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-17 18:23:37 +02:00
Francis Appels
7920cf8596 Fix option SERVICE_ARE_ECOMMERCE_200238EC (#35372) 2025-09-17 18:19:52 +02:00
Charlène Benke
c5451242e7 Add default values for database configuration (#35366)
warning error yet correct on old version
2025-09-17 14:46:32 +02:00
ldestailleur
a54c5fcdcb Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-12 19:26:28 +02:00
Florian Mortgat
60f089c015 FIX 17.0: ContratLigne::fetch() returns 1 even if the line doesn't exist (#35324) 2025-09-12 15:19:20 +02:00
Laurent Destailleur
8e689c1479 Complete #35313 2025-09-12 02:26:21 +02:00
Eric - CAP-REL
8efe6d477e exclude escpos-php/doc from filelist_xml (#35313) 2025-09-12 02:15:56 +02:00
Eric - CAP-REL
870c2a8f50 Prepare 18.0.8 (#35299)
* Prepare 18.0.8

* Update filefunc.inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-11 12:21:33 +02:00
atm-lucas
7d898184b5 Modify condition display button (#35257) 2025-09-09 19:30:14 +02:00
Sylvain Legrand
bba84133e7 Update bank.php 2025-09-09 07:00:19 +03:00
ldestailleur
91664a34db Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-04 20:47:24 +02:00
ldestailleur
781adf507b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-04 20:47:13 +02:00
ThomasNgr-OpenDSI
01aa901f93 18.0 fix CVE 2024 40137 (#34762)
* Sec: Remove all functions that accept callable params - CVE-2024-40137

* FIX #34746 - More complete fix for CVE-2024-40137

---------

Co-authored-by: ldestailleur <eldy@destailleur.fr>
2025-09-04 14:59:44 +02:00
VIAL-GOUTEYRON Quentin
75ee26c3ed Add HRM module support in dol_check_secure_access_document() function to manage file access rights. (#35218)
* Add HRM module support in `dol_check_secure_access_document()` function to manage file access rights.

* fix space

* Update files.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-04 14:26:42 +02:00
ldestailleur
96a74c4976 Disable this test where result is not predicable 2025-09-04 14:13:13 +02:00
ldestailleur
258fe1124b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-09-04 13:38:03 +02:00
kkhelifa-opendsi
a69ba88857 FIX: Correct the calculation of the amount of the current period between the period provided (#35083) 2025-09-04 13:27:49 +02:00
Sylvain Legrand
b05be5e1df Fix discount applied 2 times on contract (#35219)
on update line the discount was apply 2 times !
no problem on insert line.

Already solved on v22
2025-09-04 12:01:26 +02:00
kkhelifa-opendsi
247c38923f FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717)
* FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call

* Modification to take into account the value saved in the cookie

* Update invoice.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-03 16:36:18 +02:00
lvessiller-opendsi
e818bf732d FIX extra field list depend on parent list when editing a card (#35165) 2025-09-01 19:55:00 +02:00
lvessiller-opendsi
2d55195982 FIX missing quick edit for extrafields (baclport commit 4fc66c6) (#35160) 2025-09-01 19:50:48 +02:00
Alexandre SPANGARO
5788438864 FIX Missing sentence part (#35144) 2025-09-01 19:21:22 +02:00
Sylvain Legrand
4f684df12f Fix supplier invoice API (#35100)
* Fix supplier invoice API

We can't modify mode_reglement_id from API on supplier invoice !

* Update fournisseur.facture.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 03:05:05 +02:00
lvessiller-opendsi
adbbf9e3b2 FIX set global mysoc and load langs in API access (#35041)
* FIX set global mysoc and load langs in API access

* FIX reset mysoc and langs only if entity of API has changed
2025-08-28 02:50:38 +02:00
Marc de Lima Lucio
1f29c7758c FIX: accountancy general ledger: bad handling of hook return (#34029)
* FIX: accountancy general ledger: bad handling of hook return

* FIX: accountancy balance: bad handling of hook return
2025-08-27 11:30:26 +02:00
kkhelifa-opendsi
07512d1dad FIX - Fix missing token for disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084) 2025-08-27 03:06:19 +02:00
ldestailleur
edf07d40b3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-08-25 21:51:10 +02:00
ldestailleur
381c6fbecf Fix CI 2025-08-24 22:05:46 +02:00
lvessiller-opendsi
3362a6b06d FIX The combo of custom groups has disappeared (backport v19) (#35016) 2025-08-20 19:03:18 +02:00
HENRY Florian
e3953f684b fix: with MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS and multicompany image are not find on send mail (#34946) 2025-08-14 19:03:37 +02:00
Regis Houssin
9666a96d8c FIX #34893 (#34897)
* FIX #34893

* FIX change error code to USERNOTALLOWEDTOCHANGEPASS
2025-08-09 15:19:02 +02:00
ldestailleur
18109e8ba5 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-08-07 16:15:25 +02:00
ldestailleur
364cd0042c Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-08-07 16:15:18 +02:00
ldestailleur
1b59bcfadb Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-08-07 16:14:17 +02:00
ldestailleur
347bf3e4d6 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-08-07 16:14:00 +02:00
HENRY Florian
5024aee975 fix: with MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS and multicompany image are not find on send mail (#34894) 2025-08-07 14:42:20 +02:00
Maxime Kohlhaas
b3a2257638 Fix : contract line activation error when duration not defined (#34813)
* Fix : contract line activation error when duration not defined

* Fix of fix

* Update card.php

---------

Co-authored-by: x <x@x.x>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-06 21:22:47 +02:00
Marc de Lima Lucio
24652ec722 FIX: asset: could not select invoice in disposal pop-in (#34725) 2025-08-02 00:50:07 +02:00
Laurent Destailleur
8dc50b4c5a Merge remote-tracking branch 'origin/18.0' into 19.0 2025-07-31 23:16:27 +02:00
Laurent Destailleur
b226894e36 Merge remote-tracking branch 'origin/17.0' into 18.0 2025-07-31 23:14:31 +02:00
Laurent Destailleur
3b0a4c9fa9 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2025-07-31 23:11:32 +02:00
Laurent Destailleur
0928191fdd Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-31 23:01:57 +02:00
VIAL-GOUTEYRON Quentin
154a25f8cb Enhance working days calculation to incorporate half-day adjustments and optimize public holiday checks (#34552)
* "Enhance working days calculation to incorporate half-day adjustments and optimize public holiday checks"

* "Add test cases for num_open_day() to validate half-day and weekend boundary scenarios"

* "Update DateLibTest to include Saturday and Sunday as non-working days in test setup"
2025-07-31 22:59:29 +02:00
ldestailleur
75d7d2d66b Remove hack to track abuse usage with the one of v20 2025-07-28 15:21:12 +02:00
ldestailleur
c740b8aa7d Fix make var visible 2025-07-28 14:38:03 +02:00
ldestailleur
fe7eda2a4c Move api counter at a better place 2025-07-28 14:31:17 +02:00
ldestailleur
72636dde06 Add API_COUNTER_ENABLED to track pb with api abuse. 2025-07-28 12:18:50 +02:00
Maxime Kohlhaas
6a88d31675 Fix : missing langs load on comm card file (#34812)
Co-authored-by: x <x@x.x>
2025-07-26 14:57:23 +02:00
Sylvain Legrand
437a07ba3c fix use of MAIN_CHECKBOX_LEFT_COLUMN on stockadate (#34783) 2025-07-23 16:17:30 +02:00
Florian Mortgat
f4555c4413 FIX 17.0 SQL syntax error and/or constraint error when calling Facture::update() after a clone (e.g. in a trigger) (#34778)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-23 11:26:49 +02:00
ldestailleur
d202af2593 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-07-22 12:48:14 +02:00
ldestailleur
ed4006b51b Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-22 12:47:52 +02:00
Florian Mortgat
bc33f7e1a7 FIX 17.0: when you clone an invoice that was created from a template invoice, the clone should not be linked to the template invoice (#34777) 2025-07-22 12:10:41 +02:00
ldestailleur
3c1b5846c9 Fix travis file 2025-07-22 12:08:51 +02:00
ldestailleur
fe96d826ef Avoid duplicate apt install 2025-07-15 21:49:28 +02:00
ldestailleur
2d48131a91 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-07-15 18:15:55 +02:00
ldestailleur
df60ce695c Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-15 18:09:34 +02:00
ThomasNgr-OpenDSI
abc7f824d7 FIX accountancy closure: if subledger_label is not found, PHP8.2 throws an error. (#34736) 2025-07-15 06:14:53 +02:00
ldestailleur
3b5e07dca9 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-07-09 15:27:37 +02:00
ldestailleur
8927d1260a Fix travis 2025-07-09 15:27:28 +02:00
HENRY Florian
ee294917e1 fix: bad date management on update in time spent list if column is not displayed (#34511)
* fix: if column date is missing in tasktime, line update failed with Data mandatory

* fix: if column date is missing in tasktime list, line update failed with Data mandatory

* fix: remove badd php comment

* Update time.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-06 13:51:42 +03:00
Laurent Destailleur
704173f4a6 FIX #34591 FIX #34692 2025-07-05 10:32:59 +02:00
Laurent Destailleur
75593e84b2 FIX #34591 FIX #34692 2025-07-05 10:21:25 +02:00
Laurent Destailleur
53cf9f0bf1 Doc 2025-07-05 00:40:19 +02:00
Lucas Marcouiller
f4efa58022 Fix #17816 match compta/paiement.php payment method for credit note invoices (#34696) 2025-07-04 20:06:35 +03:00
Eric - CAP-REL
737dc7726e remove dpatch and add debhelper+po-debconf (#34685) 2025-07-04 09:36:44 +03:00
Eric - CAP-REL
af095c0e11 check if rpmbuild/sources dir exists (#34687) 2025-07-04 09:35:44 +03:00
Frédéric FRANCE
453b289346 fix ajax product with multiprices (#34672) 2025-07-01 16:13:57 +03:00
ldestailleur
9d30492846 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-28 18:55:40 +02:00
ldestailleur
2bef534e60 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 18:55:06 +02:00
ldestailleur
c0161ccead Fix CI 2025-06-28 18:54:53 +02:00
ldestailleur
1be67fee52 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 18:54:33 +02:00
ldestailleur
4a88509cdf Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 18:54:19 +02:00
ldestailleur
a4b1700bae Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-06-28 18:53:25 +02:00
ldestailleur
f5cb64afaa Fix CI 2025-06-28 18:53:12 +02:00
Marc de Lima Lucio
4841a8d2ce FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522)
* FIX: pre-send mail mass action: keep __EMAIL__ substitution

* FIX: comment

* test github workflows

* test github workflow for 18

* test v18 pr workflow

* FIX: massaction email tpl: keep preset

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-28 17:58:07 +02:00
ldestailleur
919d9635ab Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-28 17:55:26 +02:00
ldestailleur
52a5d4ca0a Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 17:55:04 +02:00
ldestailleur
cb0d39ff6e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 17:54:58 +02:00
ldestailleur
a5c51589d3 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-06-28 17:54:41 +02:00
ldestailleur
b4501511c8 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-06-28 17:54:22 +02:00
ldestailleur
e18c5b9d68 Fix CI 2025-06-28 17:40:01 +02:00
Vincent Maury
b940f2eae3 Fix bug in product->get_sousproduits_arbo (#34561)
* Update product.class.php

depending on php version used, when var $this->sousprods not correctly declared it'snot filled

* Update product.class.php

sousprods prop now initialized when declared

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-28 17:34:12 +02:00
ldestailleur
d268fc42c2 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-28 17:20:08 +02:00
ldestailleur
e6ff31abf1 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-28 17:19:04 +02:00
ldestailleur
d31bad82a1 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-06-28 17:14:50 +02:00
ldestailleur
bc0b0bebd3 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-06-28 17:09:51 +02:00
ldestailleur
031acacdab Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-06-28 17:04:21 +02:00
POTIER Mathieu
18725aec6b [FIX] loop interrupt if an error occurs in sendEmailsRemindersOnInvoiceDueDate (#34657) 2025-06-28 16:45:52 +02:00
ldestailleur
d2e9c01796 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-28 13:16:30 +02:00
ldestailleur
75c3456743 FIX #34654 2025-06-28 13:14:11 +02:00
ldestailleur
9a63af82de Fix pb in merge 2025-06-24 14:06:27 +02:00
ldestailleur
c0db33caf2 Having LTS in v18 and not in v19, v20... lets think that only v18 is LTS
and LTS is propagated during merge. Better to keep the mention into
Changelog only or into doc.
2025-06-24 14:04:21 +02:00
ldestailleur
b2820ebfb7 Fix version 2025-06-24 14:02:52 +02:00
ldestailleur
8159249209 Fix changelog 2025-06-22 17:26:59 +02:00
ldestailleur
4e2a76c807 Fix duplicate 2025-06-22 17:26:32 +02:00
ldestailleur
5042c0959e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-22 17:16:51 +02:00
Pichi1966
9f76298e58 FIX BankTransfer information in line.php (#34425)
* Prepare 18.0.7

* FIX BankTransfer information in line.php

FIX BankTransfer information in line.php

This is too fix a wrong information in line.php.
The mention of WithDrawalsReceipts instead of BankTransfers is wrong information

* Suppress Tab in line.php

---------

Co-authored-by: VESSILLER <lvessiller@open-dsi.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-22 12:57:33 +02:00
Pichi1966
f1ecb023ff FIX BankTransfer link in rejets.php (#34424)
* Prepare 18.0.7

* FIX BankTransfer link in rejets.php

FIX BankTransfer link in rejets.php
This is to fix a wrong action link in rejets.php.
The link was sending to a WithDrawals screen creating confusion.

---------

Co-authored-by: VESSILLER <lvessiller@open-dsi.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-22 12:57:09 +02:00
lvessiller-opendsi
ce1243140f FIX js warning (Backport commit 84d982c) (#34555)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-22 12:49:52 +02:00
Marc
52c827c2bb FIX #34541 (#34597) 2025-06-21 14:35:20 +02:00
lvessiller-opendsi
c263fccb5f Prepare 18.0.7 (#34575)
* Prepare 18.0.7

* Changelog for 18.0.7 LTS
2025-06-19 14:58:38 +02:00
ldestailleur
c3f11fd0a7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-19 10:52:07 +02:00
ldestailleur
719de0aef3 Disable not working github actions 2025-06-19 10:51:51 +02:00
ldestailleur
8a00ba81d0 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-19 10:49:00 +02:00
ldestailleur
0da1e6b464 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-19 10:48:18 +02:00
ldestailleur
4cc3be24d3 Doc 2025-06-19 10:46:15 +02:00
Eric - CAP-REL
b1109f6803 add env var for non-origin repository (#34577) 2025-06-19 10:44:18 +02:00
ldestailleur
fda1499eee Fix CI 2025-06-18 14:28:36 +02:00
Pichi1966
4bb42de5d6 FIX BankTransfer link in list.php (#34513)
FIX BankTransfer link in list.php

This is to fix a wrong action link in list.php.
The link was sending to a WithDraw screen creating confusion.
2025-06-15 03:03:42 +02:00
Laurent Destailleur
f31270df2a Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-15 00:50:35 +02:00
Laurent Destailleur
d50a938d12 Doc 2025-06-15 00:50:25 +02:00
Marc de Lima Lucio
478a8a4d52 FIX: try to fix v18 github action workflow (#34439)
* FIX: try to fix v18 github action workflow

* FIX: try to fix v18 github action workflow, part 2

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-15 00:30:44 +02:00
Laurent Destailleur
fa135a216b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-15 00:23:45 +02:00
Laurent Destailleur
79779b1d2f Doc 2025-06-15 00:23:13 +02:00
Marc de Lima Lucio
456adc1e95 FIX: receptions: crash from api because of classes not found (#34523) 2025-06-14 23:59:21 +02:00
Marc de Lima Lucio
06dc4f5426 FIX: event info tab: php 8.1 warning (#34458)
* FIX: event info tab: php 8.1 warning

* Update info.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-14 11:59:03 +02:00
Marc de Lima Lucio
467c772504 FIX: common fields: php warning with select input field (#34495) 2025-06-14 11:58:25 +02:00
Laurent Destailleur
b8400d1b21 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-14 02:15:23 +02:00
Laurent Destailleur
1bd6757e62 Fix CI 2025-06-14 02:15:10 +02:00
Marc de Lima Lucio
1c52426b90 FIX: expensereport: php warning when generating pdf with multilangs (#34492) 2025-06-14 02:09:01 +02:00
Marc de Lima Lucio
bc18656fd5 FIX: files lib: multiple php 8.1 warnings (#34462) 2025-06-14 00:27:36 +02:00
Marc de Lima Lucio
c77c4efcb8 FIX: accountancy lettering: php8.1 warning (#34469) 2025-06-13 23:57:37 +02:00
atm-lena
7152705e70 Task Clone : no translation (#34470)
Co-authored-by: atm-lena <lena.papazian@atm-consulting.fr>
2025-06-13 23:53:55 +02:00
Marc de Lima Lucio
cada04442b FIX: manufacturing orders: php 8.1 warnings on agenda tab (#34475) 2025-06-13 23:49:11 +02:00
Benjamin Falière
4bd11f64d7 FIX (#34448)
Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-13 23:45:18 +02:00
Marc de Lima Lucio
9c45f42e4f FIX: product translation: redirect after successful action (#34403)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-13 17:25:33 +02:00
Marc de Lima Lucio
c9f743983a FIX: accountancy expensereport journal: php 8.1 warning (#34457) 2025-06-13 17:11:40 +02:00
Laurent Destailleur
1497541129 Fix travis 2025-06-13 15:30:30 +02:00
Laurent Destailleur
da7e597436 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-13 15:27:04 +02:00
Laurent Destailleur
b47fbccfe3 Fix travis 2025-06-13 15:26:48 +02:00
lvessiller-opendsi
878474f1d1 FIX element must be visible to set focus on select input when using default values (#34406) 2025-06-12 12:23:55 +02:00
VIAL-GOUTEYRON Quentin
956d545b41 fix missing last_main_doc (#34405) 2025-06-12 12:17:29 +02:00
Marc de Lima Lucio
0afd5cc7e3 FIX: social contribution payment: correct error reporting (#34002)
* FIX: social contribution payment: correct error reporting

* FIX: social contribution payment: correclty handle return of adding payment to bank
2025-06-11 21:22:37 +02:00
ldestailleur
b64407f04d Fix travis file 2025-06-10 16:06:47 +02:00
ldestailleur
f9cbe6c2a0 Fix CI 2025-06-10 15:55:09 +02:00
ldestailleur
18bfa0e637 Try to fix CI 2025-06-10 15:34:16 +02:00
ldestailleur
debc895bb0 Try fix CI 2025-06-10 15:27:34 +02:00
ldestailleur
32e0ac0975 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-10 15:14:51 +02:00
ldestailleur
aceb01adbe Try to use jammy 2025-06-10 15:14:37 +02:00
Laurent Destailleur
c444fe3c1f Merge remote-tracking branch 'origin/18.0' into 19.0 2025-06-09 17:25:03 +02:00
William Mead
1aaa29ad9e Fixed expense report permission. Added contributor details. (#34368) 2025-06-08 14:37:23 +02:00
Sébastien NASSIET
58bd0ed0f6 Use DOL_DATA_ROOT instead of DOL_DOCUMENT_ROOT for upload_dir_tmp in CMailFile (#34367) 2025-06-08 14:29:36 +02:00
noec764
4096b00bd5 FIX: Too heavy sql query (#34371)
Co-authored-by: Noé <noe@scopen.fr>
2025-06-08 14:26:44 +02:00
Marc de Lima Lucio
dcc4334768 FIX: warnings when printing start/end date on line tpl (#34359) 2025-06-05 18:34:56 +02:00
Marc de Lima Lucio
f137074a98 FIX: cash control report: php warning (#34358) 2025-06-05 18:30:06 +02:00
Marc de Lima Lucio
f8f31daa16 FIX: accountancy fec export: remove dol_print_date warning (#34363) 2025-06-05 18:29:33 +02:00
Marc de Lima Lucio
35528a5885 FIX: prevent log warning with online signature url (#34361) 2025-06-05 18:29:12 +02:00
HENRY Florian
8853bfd51a fix: ref_client GETPOST facture/card.php should be alpha (#34311)
* fix: ref_client GETPOST facture/card.php should be alpha

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-04 14:09:03 +02:00
Marc de Lima Lucio
6202f614a4 FIX: accountancy sales/purchases journal: sql error logged when no invoice in journal (#34339)
* FIX: accountancy sales/purchases journal: sql error logged when no invoice in journal

* FIX: accountancy sales journal: correctly check unbounded lines
2025-06-03 17:04:19 +02:00
lvessiller-opendsi
ce0f46a483 FIX local taxes text in PDF (#34343) 2025-06-03 17:03:15 +02:00
ldestailleur
11d357b79e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-02 14:31:05 +02:00
ldestailleur
9a8a07e85a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-06-02 14:27:14 +02:00
Marc de Lima Lucio
26bcc944cf FIX: projects: go back to edit view after cloning (#34221)
* FIX: projects: go back to edit view after cloning

* FIX: projects: go back to edit view after cloning
2025-05-27 21:23:16 +02:00
Eric - CAP-REL
d2d9590019 Fix to make protection ok when no stock and (#34207)
STOCK_ALLOW_NEGATIVE_TRANSFER on

Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
2025-05-27 21:16:38 +02:00
ThomasNgr-OpenDSI
fe4b1ff34d FIX modification de dates de pièces comptables sur plusieurs entités différentes (#34226) 2025-05-27 20:16:41 +02:00
HENRY Florian
4e95aab6b5 fix: On Clone Invoice, ref_customer is not clean (#34296) 2025-05-27 15:58:28 +02:00
William Mead
4fb79ba8a1 FIX API expense report line comments (v18+) (#34297)
* Fixed API expense report line comments

* Added contributor details
2025-05-27 15:57:48 +02:00
Marc de Lima Lucio
a42593db0d FIX: asset depreciation: php warnings (#34219) 2025-05-22 21:17:58 +02:00
Marc de Lima Lucio
cfc766ebbe FIX: accountancy general ledger: last total not shown if last account group shown has only one entry (#34251) 2025-05-22 19:29:49 +02:00
HENRY Florian
51e4ce05c9 FIX: mandatory extrafelds on lines are not checked (#34228)
* FIX: mandatory extrafelds on lines are not checked

* FIX: mandatory extrafelds on lines are not checked
2025-05-22 17:40:41 +02:00
Marc de Lima Lucio
819c3fd08a FIX: accountancy: bad filter on custom account groups (#34205) 2025-05-20 22:42:34 +02:00
atm-lucas
4c6955017f Adding mapping to module rights (#34212) 2025-05-20 21:47:08 +02:00
Marc de Lima Lucio
aa93bf3f31 FIX: pgsql: boolean fields correctly defined in creation but not in migration (#34215) 2025-05-20 20:36:51 +02:00
HENRY Florian
de40214a09 fix: multi filter journal in accountancy/bookkeeping/list.php and in export (#34217)
* fix: filter journal IN

* fix: filter journal IN
2025-05-20 20:33:31 +02:00
Marc de Lima Lucio
491ecaccfe FIX: asset depreciation: division by zero (#34218) 2025-05-20 20:32:08 +02:00
Marc de Lima Lucio
3b3f3fa29b FIX: product suplier tab: last modif date column was wrongly dependant of module barcode (#34170)
* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode

* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode, part 2
2025-05-17 14:05:42 +02:00
Mohamed DAOUD
6c0d947831 Update html.form.class.php (#34128) 2025-05-14 13:08:54 +02:00
lvessiller-opendsi
efb9327896 FIX local taxes text in object line view mode (#34103) 2025-05-12 20:09:16 +02:00
ldestailleur
629533494a Fix error management 2025-05-10 13:08:49 +02:00
ldestailleur
445f089556 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-05-10 12:53:37 +02:00
Frédéric FRANCE
223f0c2763 fix translation (#34086) 2025-05-09 23:46:07 +02:00
ldestailleur
46ac3d5b12 FIX Backport fix of substition of thirdparty info in notification 2025-05-07 14:53:51 +02:00
Laurent Destailleur (aka Eldy)
b85bfc40f4 Fix phpunit 2025-05-06 11:59:08 +02:00
lvessiller-opendsi
cc78023a44 FIX allow double colon and string obfuscation in dol eval for computed extra fields (#34015)
* FIX allow double colon and string obfuscation in dol eval for computed extra fields

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-05-06 11:50:28 +02:00
ldestailleur
db6fe50106 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-05-05 00:03:22 +02:00
ldestailleur
f70cfeb6d3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-05-05 00:03:09 +02:00
Marc de Lima Lucio
9b74628e29 FIX: accountancy balance: keep subtotals when sorting (#34001) 2025-05-04 11:27:19 +02:00
Marc de Lima Lucio
0ef0d339b5 FIX: pgsql: error when creating sequences in migration scripts (#34021)
* FIX: pgsql: error in migration from 15 to 16

* FIX: pgsql: error in migration from 7 to 8
2025-05-04 11:26:34 +02:00
Laurent Destailleur
5bf5d23495 Update AbstractClient.php 2025-05-04 11:22:54 +02:00
Marc de Lima Lucio
02588036c2 FIX: oauth: php 8 warnings (#34027)
* FIX: oauth: fix php 8 warnings (backport of 9edfb1d113)

* FIX: oauth: fix php 8 warnings (backport of 9edfb1d113), part 2
2025-05-04 11:20:26 +02:00
Marc de Lima Lucio
8e0d3911e6 FIX: pgsql: case sensitivity in select queries (#34028) 2025-05-04 11:19:59 +02:00
Marc de Lima Lucio
3929ef0bfa FIX: accountancy: warning when account not found in plan (#34030) 2025-05-04 10:50:33 +02:00
William Mead
c3b35d4da5 Fixed PHPDoc. Added contributor details. (#33988) 2025-04-29 06:40:04 +02:00
HENRY Florian
8221ab0a58 fix: #33095 (#33907) 2025-04-22 11:51:25 +02:00
ThomasNgr-OpenDSI
5e887e8850 Fix : on update of an order line, the TTC price would be used as HT price (#33940)
* Fix : on update of an order line, the TTC price would be used as HT price

* Update commande.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-22 11:48:22 +02:00
ldestailleur
bfc8cb4708 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-04-21 13:44:16 +02:00
ldestailleur
0339ee6f1f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-04-21 13:44:08 +02:00
William Mead
61df34acd6 Fixed public ticket layout for Safari (#33933) 2025-04-21 10:42:51 +02:00
Frédéric FRANCE
f5b11b78da fix typo (#33920) 2025-04-19 11:46:22 +02:00
lvessiller-opendsi
d7758f9ae6 FIX bank payment rejection on SEPA (backport commit 100a657) (#33838) 2025-04-14 19:25:41 +02:00
Alexandre SPANGARO
c52b76cb2e FIX Order error translation (#33834) 2025-04-14 19:24:42 +02:00
ldestailleur
407eb0214c Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-04-10 14:17:35 +02:00
ldestailleur
8524a2f938 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-04-10 14:17:28 +02:00
ldestailleur
8434e6567f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-04-10 14:17:05 +02:00
ldestailleur
2c38bea2b0 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-04-10 14:16:58 +02:00
ldestailleur
096b59913d Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-04-10 14:16:34 +02:00
ldestailleur
d38b9e6248 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-04-10 14:16:11 +02:00
ldestailleur
f256deb54b Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-04-10 14:15:48 +02:00
Marc de Lima Lucio
cbae456978 FIX: prelevement order list: handle case of use by banktransfer module (#33801) 2025-04-09 19:08:59 +02:00
ThomasNgr-OpenDSI
7fa3474ecd FIX : constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799) 2025-04-09 15:44:51 +02:00
atm-jonathan
0bd93fa05a add param nocreateEcmFile (#33770)
Co-authored-by: x <x@x.x>
2025-04-08 15:24:28 +02:00
ldestailleur
86cf3fe8dd FIX backport of replaceement of thirdparty information on notification 2025-04-08 10:45:20 +02:00
Marc de Lima Lucio
363b05d314 FIX: warehouse list: broken status filter (#33667) 2025-04-02 12:30:53 +02:00
ldestailleur
84674e7bad Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-04-01 11:45:21 +02:00
ldestailleur
4c523cf3e5 Update doc 2025-04-01 11:45:11 +02:00
Marc de Lima Lucio
733fbecd45 FIX: tcpdf: prevent error with 'data:' URLs (backport of https://github.com/tecnickcom/TCPDF/pull/552) (#33682) 2025-04-01 11:40:02 +02:00
HENRY Florian
202a71ab8f FIX: Sort Stock To Date on PMP (#33678) 2025-04-01 10:42:21 +02:00
ldestailleur
915eb89406 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-03-31 16:00:06 +02:00
ldestailleur
3fe6132c94 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-31 11:52:55 +02:00
ldestailleur
238f684576 Fix extension of debian.tar file 2025-03-31 11:52:47 +02:00
ldestailleur
05184e7f46 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-03-29 17:28:14 +01:00
Eric - CAP-REL
e6ebf315ed package: make dir if needed (#33644) 2025-03-28 23:09:50 +01:00
Eric - CAP-REL
70e4d1ccd0 build zip & tar package : add more files on exclude list (#33634) 2025-03-28 15:00:37 +01:00
Eric - CAP-REL
a8a95cba75 debian build package on bookworm (#33635) 2025-03-28 10:19:08 +01:00
Laurent Destailleur (aka Eldy)
1a015cd91e Exclude more files 2025-03-27 15:01:50 +01:00
ldestailleur
9b36b6e965 Fix typo 2025-03-24 14:43:40 +01:00
ldestailleur
cbb9f5aa0c Replace hard coded value with var 2025-03-24 14:41:02 +01:00
ldestailleur
ef159f919e Backport fix in v20 #33536 2025-03-19 16:10:25 +01:00
ldestailleur
1ab438d62e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-03-19 14:17:37 +01:00
ldestailleur
3e8c5651cd Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-19 14:09:48 +01:00
ldestailleur
0a4f1ffc06 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-19 14:09:41 +01:00
atm-lucas
42a1cde41a useless product fetch on invoice create (#33505) 2025-03-19 14:00:03 +01:00
MDW
324f9631d7 FIX: Replace compromised tj-actions/changed-files (#33481)
# FIX: Replace compromised tj-actions/changed-files

See https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised .

(Backport from develop)
2025-03-15 16:38:56 +01:00
Eric - CAP-REL
8073c0e1be FIX : close all services on contract will close all lines (#33466)
* close line : line could be inactive or open

* Update contrat.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-15 12:03:37 +01:00
Eric - CAP-REL
b256c9aaba fix missing alter table for tms auto update timestamp (#33451)
* fix missing alter table for tms auto update timestamp

* two tables was renamed 13.0 -> 16.0
2025-03-15 10:55:17 +01:00
ldestailleur
681b20f09e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-03-14 12:32:56 +01:00
ldestailleur
4897c9de7f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-03-14 12:20:56 +01:00
ldestailleur
2058d572d9 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-03-14 12:17:06 +01:00
ldestailleur
089fab828b Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-03-14 12:14:10 +01:00
ldestailleur
fa05dc44ce Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-03-14 11:29:14 +01:00
ldestailleur
5b9453e302 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-03-14 11:28:33 +01:00
ldestailleur
d81a2d060e Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2025-03-14 11:27:49 +01:00
Eric - CAP-REL
8d9dc8c87d translation "by amoun" link (#33440) 2025-03-13 23:04:41 +01:00
Eric - CAP-REL
97aaff7395 13.0 fix migration missing tms auto update (#33443)
* tms field in llx_product is not updated to default timestamp

* but that's not the only one ...
2025-03-13 23:01:52 +01:00
HENRY Florian
7a1fa20959 fix: allow positive line in creditnote invoice if FACTURE_ENABLE_NEGATIVE_LINES and INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN (#33434)
* fix: allow positive line in creditnote invoice if FACTURE_ENABLE_NEGATIVE_LINES and INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN

* fix: allow positive line in creditnote invoice if FACTURE_ENABLE_NEGATIVE_LINES and INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN
2025-03-13 11:18:17 +01:00
atm-GregM
8942380605 #FIX : datenextrun for CRON (#30724)
* FIX : datenextrun for CRON

* FIX : CRON datenextrun

* replace by idate

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-13 11:11:17 +01:00
warnerbryce
2f36edef3b FIX : PAIEMENT Wrong field displayed for DateChequeReceived (#33390) 2025-03-12 19:29:04 +01:00
Florian Mortgat
f7fe6c4f1a FIX warnings (#33423)
* FIX warnings

* fix: empty({function call})
2025-03-12 19:15:24 +01:00
Alexandre SPANGARO
81b5771270 FIX Accountancy simplified - with multiple entities, amount of the entry is multiplied by the number of entities (#33370)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-11 03:02:50 +01:00
atm-adrien
b9f4ddb021 FIX : Count on supplier invoice list does not match count in DB (#33351) 2025-03-11 03:00:46 +01:00
Eric - CAP-REL
6f4b2a8905 allow spaces on natural search (#33324)
* allow spaces on natural search like documentation says

* clear comment

* sanitize backport from 19.0

* update sanitize call to be compatible with dolibarr 19.0 backported function
2025-03-11 02:13:06 +01:00
ldestailleur
03cbf05f0f FIX Loading of deiveries in shipping card was loading everything 2025-03-10 23:56:04 +01:00
ldestailleur
e7c05f744b Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-03-10 22:59:51 +01:00
ldestailleur
200fa88e1d FIX Duplicate load of extrafield ->fetch_optionals() 2025-03-10 22:59:35 +01:00
EnjoyFelix
8f44b0a974 # FIX The "AfterImportInsert" hook is not triggered during the simulation. #33260 (#33261)
* AfterImport hook in the simulation of the import

* Update import.php

* Update import.php

* Update import.php

---------

Co-authored-by: Elisée Chemin <elisee.chemin@tetras-libre.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-06 13:37:37 +01:00
Laurent Destailleur
0e95f70b8d Merge pull request #33329 from am97/fix/18.0/accountancy_code_sort
Fix: sort $aux_account after adding all items
2025-03-05 14:23:46 +01:00
Andrés Maldonado
dd7189b1d0 Fix: sort $aux_account after adding all items
Currently, some items are added to $aux_account, then the array is
sorted, then more items are added. In the end, the list visible in the
UI is not sorted.
2025-03-04 17:28:27 +01:00
ldestailleur
9f1f5fd864 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-03-02 13:32:17 +01:00
Laurent Destailleur
cd21d385d6 Merge pull request #33229 from BenjaminFlr/fixTicketNotifMail
FIX(ticket): Notification email without public interface
2025-03-01 10:39:24 +01:00
Laurent Destailleur
86442aa7f0 Merge pull request #33264 from OPEN-DSI/18.0_fix_show_mail_error_validate_expense_report
FIX : Show true error when send notify email at validate expense report
2025-03-01 00:24:04 +01:00
Kamel Khelifa
39cd4fcb9e FIX : Show true error when send notify email at validate expense report 2025-02-27 16:43:42 +01:00
Benjamin Falière
4272cfa7e4 Restore url public ticket 2025-02-26 10:06:43 +01:00
Benjamin Falière
db56e5c8ea Replace getDolGlobalString by getDolGlobalInt 2025-02-25 21:09:59 +01:00
Benjamin Falière
0c573812e9 Remove empty on getDolGlobalString() 2025-02-25 16:03:07 +01:00
Benjamin Falière
4cf6394f01 FIX(ticket): Notification email without public interface
Remove link to public interface from automatic notification email if not enabled.
2025-02-25 15:43:21 +01:00
Laurent Destailleur
e66e914dba Merge pull request #33207 from Easya-Solutions/19_fix_invoice_create
FIX invoice creation : use dol_include_once instead of require_once to allow external modules
2025-02-25 02:41:34 +01:00
ldestailleur
1df01397da Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-25 02:40:20 +01:00
ldestailleur
b1492818f6 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-25 02:39:50 +01:00
tnegre
70422e891c FIX invoice creation : use dol_include_once instead of require_once to allow external modules 2025-02-24 17:01:01 +01:00
Laurent Destailleur
00ccb45bc4 Merge pull request #33131 from Easya-Solutions/18_fix_invoice_create
FIX invoice creation : use dol_include_once instead of require_once to allow external modules.
2025-02-21 18:05:24 +01:00
Laurent Destailleur
3655b03331 Merge pull request #33182 from atm-quentin/FIX/19.0/SkillTab
FIX : Missing objecttype filter for skill tab
2025-02-21 17:54:38 +01:00
Quentin VIAL--GOUTEYRON
7cc16734f9 Missing filter for skill tab 2025-02-21 16:25:28 +01:00
Laurent Destailleur
8aa1d1165f Merge pull request #33146 from Easya-Solutions/18.0_fix-wrong-label-status-product-tooltip
FIX #33145 wrong label status buy on product tooltip
2025-02-21 11:38:28 +01:00
VESSILLER
5911d7d0c0 Protect product object for line label 2025-02-20 08:21:50 +01:00
VESSILLER
41e54529b0 FIX #33145 wrong label status buy on prodcut tooltip 2025-02-19 17:26:54 +01:00
tnegre
f89aff96f7 FIX invoice creation : use dol_include_once instead of require_once to allow external modules 2025-02-19 11:45:07 +01:00
Laurent Destailleur
54df3c2991 Merge pull request #33084 from rycks/18.0_fix_change_deposit_conditions_value
set deposit percent to zero on change
2025-02-19 11:41:28 +01:00
Laurent Destailleur
85bce8b71f Merge pull request #33118 from Easya-Solutions/18.0_fix-accountancy-export-quadratus
FIX #33117 accountancy export Quadratus when doc ref is less than 10 char
2025-02-18 20:49:31 +01:00
VESSILLER
9d9d890c97 FIX accountancy export Quadratus when doc ref is less than 10 char 2025-02-18 12:07:19 +01:00
Laurent Destailleur
f511e2e523 Merge pull request #33099 from Easya-Solutions/18_fix_cve_2024-34051
FIX #CVE-2024-34051
2025-02-17 19:45:24 +01:00
Laurent Destailleur (aka Eldy)
bd9bf8b5a8 FIX #CVE-2024-34051 2025-02-17 12:24:03 +01:00
Eric Seigne
5fd5eae3b1 set deposit percent to zero on change 2025-02-14 09:35:57 +01:00
Laurent Destailleur (aka Eldy)
054010f8ec Fix test 2025-02-13 20:34:55 +01:00
Laurent Destailleur (aka Eldy)
36fd5b7b26 FIX #CVE-2024-34051 2025-02-13 20:29:25 +01:00
Laurent Destailleur
6aa4d6a940 Merge pull request #33072 from FHenry/18_fix_supplierorder_catcherroroncreate
fix: On Supplier Order create, if insertExtrafield failed, Dolibarr do not return error and continue
2025-02-13 17:29:22 +01:00
Florian HENRY
7997e927a0 fix: On Supplier Order create, if insertExtrafield failed, Dolibarr do not return error and continue 2025-02-13 14:59:15 +01:00
Laurent Destailleur
9516f9bbd2 Merge pull request #33039 from Easya-Solutions/18.0_fix-fileupload-with-ref-as-prefix
FIX #33038 drag and drop files are not prefixed with object reference
2025-02-12 22:48:43 +01:00
VESSILLER
f7bd03fb75 FIX #33038 drag and drop files are not prefixed with object reference 2025-02-12 16:02:00 +01:00
Laurent Destailleur (aka Eldy)
e381362d9c Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-12 15:44:45 +01:00
Laurent Destailleur (aka Eldy)
7bc29c61a9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-12 15:44:30 +01:00
Laurent Destailleur
ea60024712 Merge pull request #33024 from Easya-Solutions/18.0_fix-shipment-with-same-product-in-other-subkit
FIX display full tree on shipment card when a kit contains a same component in other sub-kit
2025-02-12 04:02:13 +01:00
VESSILLER
edea44bccb FIX display full tree on shipment card when a kit contains a same component in other sub-kit 2025-02-11 17:12:15 +01:00
Laurent Destailleur
09df62600e Merge pull request #32616 from rycks/18.0_fix_zero_is_a_value_into_dictionnary
zero could be a value
2025-02-11 09:07:29 +01:00
Eric Seigne
94eaf5d089 cancel first idea 2025-02-11 00:32:57 +01:00
Eric Seigne
d04ac67ecd backport 20.0 solution 2025-02-11 00:31:59 +01:00
Laurent Destailleur
81b9286ea4 Merge pull request #32999 from Easya-Solutions/18_FIX_missing_unset_post
Fix missing unset post fourn_ref
2025-02-10 13:21:34 +01:00
Laurent Destailleur
c648bd8c90 Merge pull request #32982 from Easya-Solutions/18.0_fix-shipment-dispatch-serial-warehouses
FIX bad dispatched quantities for batches on shipment card
2025-02-10 12:52:42 +01:00
Laurent Destailleur
99a291f878 Merge pull request #32979 from rycks/18.0_user_author_deprecated
fk_user_author instead of user_author into update
2025-02-10 11:57:25 +01:00
ulysse-vldn
47f10cdc29 Fix missing unset post fourn_ref 2025-02-10 09:55:47 +01:00
VESSILLER
7eba8832e6 FIX bad dispatched quantities for batches on shipment card 2025-02-07 15:47:36 +01:00
Eric Seigne
03340d6016 in case of old code in other part makes a direct assignation 2025-02-07 15:13:20 +01:00
Eric Seigne
d288fe74a2 fk_user_author instead of user_author into update 2025-02-07 15:05:49 +01:00
Laurent Destailleur
28d588fd40 Merge pull request #32832 from Easya-Solutions/18.0_add_missing_hook_action_list
Missing hook PrintFieldListFrom on actions list
2025-02-06 18:23:15 +01:00
Laurent Destailleur
16a3ce91d9 Merge pull request #32963 from frederic34/patch-11
asset doesn't have lines
2025-02-06 16:24:07 +01:00
Frédéric FRANCE
7e5a35cb45 asset doesn't have lines 2025-02-06 14:02:17 +01:00
Laurent Destailleur (aka Eldy)
39293b79ff Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-05 18:16:40 +01:00
Laurent Destailleur (aka Eldy)
9fc78cd1b6 Fix regression 2025-02-05 18:16:09 +01:00
Laurent Destailleur
34298f6c8c Merge pull request #32947 from Easya-Solutions/18.0_fix-shipment-updated-message
FIX wrong message on update shipment
2025-02-05 16:39:11 +01:00
VESSILLER
bbbba45fc1 FIX wrong message on update shipment 2025-02-05 11:19:36 +01:00
Laurent Destailleur (aka Eldy)
ef8a49ad57 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-05 11:03:39 +01:00
Laurent Destailleur (aka Eldy)
857cc730cb Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-02-05 11:03:24 +01:00
Laurent Destailleur (aka Eldy)
bfb97edccf Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-02-05 10:59:49 +01:00
Laurent Destailleur (aka Eldy)
989c9b9548 Debug v22 2025-02-05 10:59:25 +01:00
Laurent Destailleur (aka Eldy)
82b7326c99 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-02-05 10:49:20 +01:00
Laurent Destailleur (aka Eldy)
d2e6335e95 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-02-05 10:49:14 +01:00
Laurent Destailleur (aka Eldy)
711f21e8a0 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-02-05 10:48:43 +01:00
Laurent Destailleur (aka Eldy)
e1c343cedd Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-02-05 10:48:16 +01:00
Laurent Destailleur
419da592a6 Merge pull request #32929 from aspangaro/19_fixaccfy
FIX  Fiscal year - missing translation on status
2025-02-04 23:36:47 +01:00
Laurent Destailleur
7e7b07fa6d Merge pull request #32923 from FHenry/19_fix_fec_import
FIX: FEC import
2025-02-04 22:56:59 +01:00
Laurent Destailleur
0cc61215a9 Update accountancyimport.class.php 2025-02-04 22:56:35 +01:00
Alexandre SPANGARO
0871b6e9f2 FIX Fiscal year missing translation on status 2025-02-03 23:18:42 +01:00
Florian HENRY
bef5cbc8bc FIX: FEC import 2025-02-03 17:01:38 +01:00
Laurent Destailleur
51def8d31d Merge pull request #32411 from Easya-Solutions/18_fix_search_ticket_list
FIX select group and severity search fields on ticket list
2025-02-03 15:53:24 +01:00
Laurent Destailleur
0578a5654f Merge pull request #32724 from FHenry/19_fix_priceupdate_list_when_multiprice
fix: allow list mass action update price when price mode is multiprice price
2025-02-02 02:38:53 +01:00
Laurent Destailleur
bbb8b0f01f Merge pull request #32830 from hregis/17.0
FIX compatibility with multicompany
2025-01-30 13:25:07 +01:00
Laurent Destailleur (aka Eldy)
a8d3973a8d Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-30 12:58:03 +01:00
Laurent Destailleur (aka Eldy)
c115a76d4e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-30 12:41:34 +01:00
Laurent Destailleur
63ab8d9f75 Merge pull request #32871 from atm-irvine/fix_undefined_properties
fix(contrat,facture-rec): undefined properties
2025-01-30 12:40:08 +01:00
Irvine Fleith
7848d77830 fix(contrat,facture-rec): undefined properties 2025-01-30 09:58:29 +01:00
ThomasNgr-OpenDSI
737a807456 Merge branch '18.0' into 18.0_add_missing_hook_action_list 2025-01-30 09:19:21 +01:00
HENRY Florian
ba5c3cc61f Merge branch '19.0' into 19_fix_priceupdate_list_when_multiprice 2025-01-29 18:37:15 +01:00
Laurent Destailleur
e6a6426b5b Merge pull request #32850 from atm-irvine/fix_missing_hook_printFieldListSearchParam
fix(services-list): added missing hook printFieldListSearchParam in services list
2025-01-29 16:49:48 +01:00
Irvine Fleith
f3dc94d334 fix(services-list): added missing hook printFieldListSearchParam 2025-01-29 10:14:46 +01:00
Laurent Destailleur
e4f0c1a42b Merge pull request #32829 from Easya-Solutions/18.0_fix-hook-product-list-missing
Backport from v20 missing executeHooks printFieldListFrom in product list page
2025-01-28 23:47:20 +01:00
Laurent Destailleur
44d6803d12 Merge pull request #32834 from atm-irvine/fix_missing_hook_printFieldListWhere
fix(services-list): added missing hook printFieldListWhere
2025-01-28 23:46:14 +01:00
Laurent Destailleur
f80e83b846 Merge pull request #32833 from Easya-Solutions/18_fix_inner_join_action_list
action/list.php : replace comma-joins by INNER JOIN
2025-01-28 23:45:41 +01:00
Florian HENRY
ce19d7cdc0 review price update 2025-01-28 19:40:52 +01:00
Florian HENRY
353c373361 review price update 2025-01-28 19:31:46 +01:00
Irvine Fleith
bdcd7b5ef3 fix(services-list): added missing hook printFieldListWhere 2025-01-28 14:47:10 +01:00
tnegre
17d1c279ab action/list.php : replace comma-joins by INNER JOIN 2025-01-28 14:44:10 +01:00
tnegre
dd40aea380 Add hook PrintFieldListFrom on actions list 2025-01-28 14:18:26 +01:00
Regis Houssin
f9ec70f1db FIX compatibility with multicompany 2025-01-28 14:05:59 +01:00
VESSILLER
83bc7b70a0 Backport from v20 missing executeHooks printFieldListFrom in product list page 2025-01-28 13:34:49 +01:00
tnegre
2cbede2ef8 Merge branch '18.0' into 18_fix_search_ticket_list 2025-01-27 15:20:18 +01:00
tnegre
729e6c4aba Revert "set empty value for choice"
This reverts commit e8aaa51edc.
2025-01-27 15:12:24 +01:00
Laurent Destailleur
a2e865587f Merge pull request #32812 from hregis/fix_18_wrong_margin
FIX wrong left margin (v18 to develop ?)
2025-01-27 14:29:19 +01:00
Laurent Destailleur
c6ab6cd57e Merge pull request #32811 from hregis/fix_18_cannot_delete_file_task
FIX can not delete files in task card
2025-01-27 14:25:18 +01:00
Regis Houssin
837b2ff060 FIX wrong left margin (v18 to develop ?) 2025-01-27 13:59:12 +01:00
Laurent Destailleur
c7ee83b3b9 FIX can not delete files in task card 2025-01-27 12:39:24 +01:00
Laurent Destailleur
9ba3c12b3f Merge pull request #32752 from comaiteseb/comaiteseb-patch-1
Update facture.class.php add missing class_element_line property
2025-01-23 00:50:20 +01:00
Laurent Destailleur
a404b80988 Merge pull request #32757 from rycks/18.0_missing_hookmanager_on_some_odt_modules
missing hookmanager like others doc_generic*odt modules
2025-01-23 00:42:46 +01:00
Eric Seigne
cbe15c7c71 missing hookmanager like others doc_generic*odt modules 2025-01-22 23:53:16 +01:00
Florian HENRY
8d0a4ac6d9 fix: allow list mass action update price when price mode is multiprice price 2025-01-22 20:18:53 +01:00
Sébastien NASSIET
4f80adc2bf Update facture.class.php 2025-01-22 14:56:53 +01:00
Sébastien NASSIET
8069cd304d Update facture.class.php ajout de class_element_line 2025-01-22 14:31:05 +01:00
Laurent Destailleur
278b07099c Merge pull request #32729 from hregis/fix_18_wrong_update_param
FIX wrong update function parameter
2025-01-21 08:26:40 +01:00
Regis Houssin
576e70c3ce FIX wrong update function parameter 2025-01-20 22:32:30 +01:00
Florian HENRY
e4078477c6 fix: allow list mass action update price when price mode is multiprice price 2025-01-20 17:32:08 +01:00
Florian HENRY
02dea8d103 fix: allow list mass action update price when price mode is multiprice price 2025-01-20 17:11:06 +01:00
Laurent Destailleur
5433aa8d2e Merge pull request #32720 from Easya-Solutions/18.0_fix-supplier-order-linked-line-delete
FIX delete supplier order when at least one line linked to customer order line
2025-01-20 15:14:05 +01:00
Laurent Destailleur
b67fdb3e51 Merge pull request #32719 from Easya-Solutions/14.0_fix-supplier-order-linked-line-delete
FIX delete supplier order line when linked to customer order line
2025-01-20 15:13:22 +01:00
Laurent Destailleur (aka Eldy)
36b48a81ec Fix double ; 2025-01-20 14:59:13 +01:00
Laurent Destailleur (aka Eldy)
dcb0befcd4 Fix regression 2025-01-20 12:51:00 +01:00
Laurent Destailleur (aka Eldy)
1f360ca498 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-20 12:28:49 +01:00
VESSILLER
7f2a253625 Uniformize SQL concat char 2025-01-20 12:17:12 +01:00
VESSILLER
ad60a50d4d Uniformize SQL concat char 2025-01-20 11:58:58 +01:00
VESSILLER
08a976fd85 FIX delete supplier order when at least one line linked to customer order line 2025-01-20 11:56:54 +01:00
VESSILLER
426f4305b0 FIX delete supplier order when at least one line linked to customer order line 2025-01-20 11:48:37 +01:00
VESSILLER
db47ce3bb1 FIX delete supplier order line when linked to customer order line 2025-01-20 11:33:24 +01:00
Laurent Destailleur (aka Eldy)
1b42078d1e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-20 10:24:30 +01:00
Laurent Destailleur (aka Eldy)
736890b244 Merge 2025-01-20 10:15:31 +01:00
Laurent Destailleur (aka Eldy)
2664518bd3 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-20 10:14:52 +01:00
Laurent Destailleur (aka Eldy)
c6f90d8361 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-20 10:14:44 +01:00
Laurent Destailleur (aka Eldy)
cc732621ab Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-01-20 10:14:25 +01:00
Laurent Destailleur (aka Eldy)
04fed9526a Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-01-20 10:13:04 +01:00
Laurent Destailleur
9f4692e1c9 Merge pull request #31460 from OPEN-DSI/18.0_fix_return_hook_sendmail
FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function
2025-01-20 09:23:44 +01:00
Laurent Destailleur
1fa3b63fdc Merge pull request #32346 from aspangaro/18_fixloanpayment
FIX #32339 Delete a loan settlement is partial
2025-01-20 04:13:26 +01:00
Laurent Destailleur
af2889e982 Merge pull request #32505 from IC-William/fix-email-notification-ticket-assignee-18
FIX send email to assigned user on ticket create
2025-01-20 04:08:23 +01:00
Laurent Destailleur
4d925db3cd Merge pull request #32515 from Easya-Solutions/18_fix_many_tags_in_string
FIX ODT substitution when many HTML tags in string
2025-01-20 04:06:50 +01:00
Laurent Destailleur
36d91f1c07 Merge pull request #32563 from marc-dll/18.0_FIX_variants_copy_multiprices
FIX: product variants copy: also copy multiprice variations
2025-01-20 04:03:44 +01:00
Laurent Destailleur
bcc260dc08 Merge pull request #32650 from ATM-Consulting/FIX_towStatusOnInvoiceLinkedObjectBlock
FIX : Many status on invoice linked object block
2025-01-20 02:53:18 +01:00
Laurent Destailleur
9507b89fec Merge pull request #32674 from fappels/18_fix_fatal_error_on_kit
FIX: #26250 fatal error on kit
2025-01-20 00:12:10 +01:00
Laurent Destailleur
2790f9cc7a Merge pull request #32690 from hregis/fix_19_default_fk_account
FIX missing default values if $objsrc or $soc fields are empty
2025-01-20 00:09:50 +01:00
Regis Houssin
a9ff78528a FIX missing default values if $objsrc or $soc fields are empty 2025-01-17 11:36:41 +01:00
Francis Appels
a52a218ae4 Use same patch like in #26454 2025-01-16 19:17:47 +01:00
Laurent Destailleur
0409b8b9c5 Merge pull request #32652 from FHenry/18_fix_fetch_expensereport_wihtout_entity_check_by_ref
fix: add entity in where for fetch when fetch by ref
2025-01-16 15:41:45 +01:00
Laurent Destailleur
f68cf0034a Merge pull request #32683 from ATM-Consulting/FIX/133/TK2501-3514/api-put
FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request
2025-01-16 11:41:26 +01:00
atm-florian
ba4e97f07b FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
+ security for Tickets API: disable updating rowid
2025-01-16 10:37:29 +01:00
Laurent Destailleur (aka Eldy)
c2c3879032 Clean php file 2025-01-16 00:36:56 +01:00
Laurent Destailleur (aka Eldy)
c4529ed986 Clean file 2025-01-16 00:35:38 +01:00
Laurent Destailleur (aka Eldy)
8b7eaf360e Fix phpunit 2025-01-15 20:08:13 +01:00
Laurent Destailleur (aka Eldy)
2f317f0f52 Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-15 20:07:40 +01:00
Laurent Destailleur (aka Eldy)
bd35af1360 Fix phpunit 2025-01-15 20:07:31 +01:00
Francis Appels
351a7bd6bb FIX: #26250 fatal error on kit 2025-01-15 19:01:18 +01:00
Laurent Destailleur
fe6d59c090 Merge pull request #32651 from ATM-Consulting/FIX/133/bug/pre-commit-debug-bar-fails
Apply suggestion by @mdeweerd to ensure pre-commit will pass.
2025-01-15 15:53:48 +01:00
Laurent Destailleur
d4e66426e7 Merge pull request #32621 from ATM-Consulting/FIX/132/bug/cache-collisions-dol-getIdFromCode
FIX 17.0 - collisions in cache for dol_getIdFromCode
2025-01-15 15:51:23 +01:00
Laurent Destailleur
88d81aa943 Merge pull request #27159 from atm-lena/17.0_FIX_MultilangsTranslationPDFLinesDescription
FIX Multilangs : PDF lines description
2025-01-15 15:38:48 +01:00
Laurent Destailleur
f24f4e012d Merge pull request #32557 from Easya-Solutions/18_fix_join_soc_commerciaux
fix join societe_commerciaux in societe list
2025-01-15 15:12:42 +01:00
Laurent Destailleur
60ea952b78 Merge pull request #32338 from Easya-Solutions/18.0_fix_error_delete_loan
FIX : display error when loan can't be deleted
2025-01-15 15:08:22 +01:00
Laurent Destailleur
5354b54ec0 Merge pull request #32663 from Easya-Solutions/14_FIX_socpeopleassigned_update_event
Backport Fix bad management when inserting contacts of actioncomm
2025-01-15 14:40:07 +01:00
Laurent Destailleur
49feeee85e Merge pull request #32654 from atm-irvine/fix_search_thirdparty_by_name
fix(services-list): search thirdparty by name
2025-01-15 14:37:32 +01:00
Laurent Destailleur
42d8591758 Merge pull request #32660 from Easya-Solutions/14_FIX_selectcontacts_param_update_event
FIX selectcontact is loading all contacts when update event
2025-01-15 14:35:32 +01:00
Laurent Destailleur (aka Eldy)
0801f91ea7 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-15 12:35:42 +01:00
Laurent Destailleur (aka Eldy)
cf156e024d Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-15 12:16:03 +01:00
Laurent Destailleur (aka Eldy)
6b0c8f39d5 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-01-15 12:15:28 +01:00
Laurent Destailleur (aka Eldy)
2c2e01d14c Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-01-15 12:14:06 +01:00
Laurent Destailleur (aka Eldy)
abc1d1dcb3 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-01-15 12:13:44 +01:00
Laurent Destailleur
628189f57f Backport of #00e65eb
Fix bad management when inserting contacts of actioncomm
2025-01-15 11:00:05 +01:00
uvaldenaire-opendsi
748dcd0881 FIX selectcontact is loading all contacts if socid is empty and MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is not set 2025-01-15 10:12:16 +01:00
Florian HENRY
2d1d6f13c9 chore: review 2025-01-15 09:10:11 +01:00
Laurent Destailleur
4f98ca37e2 Merge pull request #32653 from mdeweerd/pr32651
Fix ci 17.0 and up - Install maximum php version found in check.php
2025-01-15 01:11:52 +01:00
Irvine Fleith
a34eaa07ed fix(services-list): search thirdparty by name 2025-01-14 16:19:52 +01:00
MDW
20f2293c01 Always install expected php version 2025-01-14 16:15:04 +01:00
MDW
7869e45954 Move installation of php before pre-commit run 2025-01-14 16:15:03 +01:00
MDW
9af7eaf08c Use PHP version from check.php 2025-01-14 16:15:01 +01:00
Florian HENRY
79ed9c7e37 fix: add entity in where for fetch when fetch by ref 2025-01-14 16:08:40 +01:00
Laurent Destailleur
eb8167bc57 Merge pull request #32414 from altairisfr/fix_status_ticket
FIX: status ticket update for new message
2025-01-14 14:35:24 +01:00
atm-florian
df992477be Apply suggestion by @mdeweerd to ensure pre-commit will pass. 2025-01-14 14:34:09 +01:00
Florian Mortgat
79c55149b2 Update htdocs/core/lib/functions.lib.php 2025-01-14 11:00:38 +01:00
Adrien Raze
ac1077bfe3 FIX : There were many status indicator in the invoice linked object block (propal card) 2025-01-14 09:48:13 +01:00
Laurent Destailleur
54477083d4 Merge pull request #32507 from priojk/patch-14
FIX #29624 - substitution of __DATE_DELIVERY__
2025-01-13 02:44:24 +01:00
Laurent Destailleur
a46c47c134 Merge pull request #32542 from Al-thi/fix/stock-import
FIX #21294 Stock import sql query
2025-01-13 02:43:37 +01:00
Laurent Destailleur
ee8dbf225b Merge pull request #32624 from aspangaro/19fix32339
FIX #32339 Delete a loan settlement is partial
2025-01-13 02:26:35 +01:00
Laurent Destailleur
9471f060b3 Merge pull request #32635 from sonikf/sonikf-patch-box_graph
fix translation
2025-01-13 02:15:38 +01:00
sonikf
56efa67432 Update box_graph_product_distribution.php 2025-01-12 03:31:01 +02:00
Alexandre SPANGARO
39fe6c20b6 FIX #32339 Delete a loan settlement is partial 2025-01-11 04:55:51 +01:00
atm-florian
762e4ec8d1 updated local pre-commit hook -> fix typo 2025-01-10 17:01:59 +01:00
atm-florian
77f982d1a8 FIX 17.0 - collisions in cache for dol_getIdFromCode 2025-01-10 16:25:27 +01:00
Laurent Destailleur
8a7fdd0ed6 Merge pull request #32590 from ATM-Consulting/FIX_v19_labelSelect2NorecordFound
FIX select 2 no record found translate
2025-01-10 12:25:34 +01:00
Laurent Destailleur
7a7146c03d Merge pull request #32600 from Easya-Solutions/14_fix_selectcontacts_socid_param
fix selectcontacts  param
2025-01-10 12:03:36 +01:00
Eric Seigne
a34d760a88 fix edit : display zero value instead of nothing 2025-01-10 11:28:46 +01:00
Eric Seigne
e9eb22f8f0 zero could be a value 2025-01-10 11:17:06 +01:00
Laurent Destailleur (aka Eldy)
81a4eec990 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-09 20:27:08 +01:00
Laurent Destailleur (aka Eldy)
e37b6fac4d Fix pb in output of label of email 2025-01-09 20:26:22 +01:00
Maxime Kohlhaas
b32789f42a Merge branch '18.0' of github.com:Dolibarr/dolibarr into 19.0 2025-01-09 18:08:48 +01:00
Maxime Kohlhaas
e1a47ed0fb Merge branch '17.0' of github.com:Dolibarr/dolibarr into 18.0 2025-01-09 18:08:00 +01:00
Maxime Kohlhaas
6388f6e62a Merge branch '16.0' of github.com:Dolibarr/dolibarr into 17.0 2025-01-09 18:07:09 +01:00
Maxime Kohlhaas
e2605fbf64 Merge branch '15.0' of github.com:Dolibarr/dolibarr into 16.0 2025-01-09 18:05:33 +01:00
Maxime Kohlhaas
90c24b3d95 Merge branch '14.0' of https://github.com/Dolibarr/dolibarr into 15.0 2025-01-09 18:01:51 +01:00
uvaldenaire-opendsi
0912b3b04f fix selectcontacts param 2025-01-09 15:09:38 +01:00
tnegre
7e82f70c77 add case when HTML tags contain attributes 2025-01-09 11:05:45 +01:00
Laurent Destailleur
249dfe1bea Merge pull request #32581 from francoisPE/fix_bg_fact_fourn
FIX pdf_cannelle (supplier_invoice) add background - Complete #17243
2025-01-09 01:52:22 +01:00
Amael-PE
21e997acd7 FIX Continue for eagle_proforma 2025-01-08 17:06:19 +01:00
Amael-PE
ea94370486 FIX Complete wath was started in #17243 for pdf_cannelle 2025-01-08 17:03:15 +01:00
GregM
3737f3c0cd FIX select 2 no record found 2025-01-08 12:30:46 +01:00
Laurent Destailleur
169b2ce4e8 Update functions.lib.php 2025-01-07 21:52:26 +01:00
Laurent Destailleur
2dd81deb13 Merge pull request #32568 from atm-maxime/14.0
Fix : cron job user rights force reload
2025-01-07 21:29:15 +01:00
Laurent Destailleur
8a5475fe7a Merge pull request #32564 from FHenry/19_fix_remove_priceupdate_list_when_multiprice
fix: remove list mass action update price when price mode is not uniq price
2025-01-07 21:25:22 +01:00
Laurent Destailleur (aka Eldy)
dd7b7a8584 FIX Bad calculation of the theoretical stock. Did not take into account
the inc/dec stock option.
2025-01-07 20:58:16 +01:00
Maxime Kohlhaas
273ec857a3 Fix : cron job user rights force reload 2025-01-07 18:39:19 +01:00
Marc de Lima Lucio
ef564caf28 FIX: qual 2025-01-07 17:37:30 +01:00
Florian HENRY
9f25fc0c8a fix: remove list mass action update price wihen price mode is not uniq price 2025-01-07 17:27:11 +01:00
Florian HENRY
7b08a99cf6 fix: remove list mass action update price wihen price mode is not uniq price 2025-01-07 17:23:10 +01:00
Marc de Lima Lucio
3ef6299c83 FIX: phpcs 2025-01-07 17:20:57 +01:00
Marc de Lima Lucio
ec58ee940a FIX: product variants copy: also copy multiprice variations 2025-01-07 17:09:48 +01:00
Laurent Destailleur
2519278269 Merge pull request #32558 from Easya-Solutions/14_fix_join_soc_commerciaux
fix join societe_commerciaux in societe list
2025-01-07 15:54:42 +01:00
Joachim Kueter
5c7fd531db Update functions.lib.php
white space
2025-01-07 15:01:50 +01:00
Joachim Kueter
92d448cfe6 Update functions.lib.php
fixed spaces
2025-01-07 14:02:47 +01:00
uvaldenaire-opendsi
74881ae251 fix join societe_commerciaux in societe list 2025-01-07 13:51:34 +01:00
uvaldenaire-opendsi
c218eaa6ed fix join societe_commerciaux in societe list 2025-01-07 13:45:59 +01:00
Joachim Kueter
259088c280 Update functions.lib.php
fixed typo...
2025-01-07 09:35:37 +01:00
Joachim Kueter
7689e0b210 Update functions.lib.php
solve indentation
2025-01-07 09:28:17 +01:00
Joachim Kueter
dd41f3f47d Update functions.lib.php
trying to solve whitespace/indentation issues
2025-01-07 09:25:00 +01:00
Joachim Kueter
48a3393264 Update functions.lib.php
trying to solve indentation
2025-01-07 09:21:46 +01:00
Joachim Kueter
0158b2b832 Update functions.lib.php
trying to solve indentation issue
2025-01-07 09:17:00 +01:00
Joachim Kueter
21607b4f28 Update functions.lib.php 2025-01-07 09:11:01 +01:00
Joachim Kueter
886abc96d1 handle property for delivery date (named differently in different objects)) 2025-01-07 09:03:17 +01:00
Alexis Thietard
b7cb799af0 FIX #21294 Stock import sql query
To respect the PostgreSQL update statement syntax, cf.
https://www.postgresql.org/docs/17/sql-update.html

```
column_name
    The name of a column in the table named by table_name. The column name can
    be qualified with a subfield name or array subscript, if needed. Do not
    include the table's name in the specification of a target column — for
    example, UPDATE table_name SET table_name.col = 1 is invalid.
```

Signed-off-by: Alexis Thietard <alexis.thietard@rtone.fr>
2025-01-06 14:36:50 +01:00
tnegre
78bf506790 fix tests in error 2025-01-06 09:44:04 +01:00
tnegre
61b03b0c05 Testing ODF : revert parameters order for assertEquals() 2025-01-06 09:44:04 +01:00
tnegre
b31962f7e2 fix 2025-01-06 09:44:04 +01:00
tnegre
112220da86 BUG: when there are two identical HTML tags in a substitution string, everything is taken between first opening tag and last closing tag. Write test to reproduce. 2025-01-06 09:44:04 +01:00
Laurent Destailleur (aka Eldy)
757d1b2998 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-05 18:40:05 +01:00
Laurent Destailleur
1fafc1b6ad Merge branch '18.0' into fix-email-notification-ticket-assignee-18 2025-01-05 17:30:02 +01:00
Frédéric France
eb4e059683 fix 2025-01-05 17:29:46 +01:00
Laurent Destailleur
b5ff688841 Merge branch '18.0' into fix-email-notification-ticket-assignee-18 2025-01-05 17:23:20 +01:00
Laurent Destailleur (aka Eldy)
8805b8cac4 Exclude test files 2025-01-05 17:22:30 +01:00
Laurent Destailleur
d01a99cd79 Merge branch '18.0' into fix-email-notification-ticket-assignee-18 2025-01-05 17:16:58 +01:00
Laurent Destailleur (aka Eldy)
1866713082 Avoid error 2025-01-05 17:10:00 +01:00
Laurent Destailleur (aka Eldy)
9ecc88230f Test pr action 2025-01-05 17:08:02 +01:00
Laurent Destailleur (aka Eldy)
86a6322287 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-03 16:34:36 +01:00
Joachim Kueter
83abe6aa34 Fix #29624
Wrong property of commande fournisseur used for substitution.
2025-01-02 20:42:43 +01:00
Laurent Destailleur
8ddd050a34 Merge pull request #32487 from rycks/18.0_fix_name_to_lastname_socpeople
there is no "name" field into llx_socpeople table
2025-01-02 16:53:57 +01:00
William Mead
4c4b773de5 Fix send on assign 2025-01-02 14:59:44 +01:00
William Mead
37a815af53 Cleaned code 2025-01-02 14:50:14 +01:00
William Mead
f60f34cdf8 Backport fix for send email to assigned user on ticket create 2025-01-02 14:07:46 +01:00
Laurent Destailleur (aka Eldy)
4267f5f010 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-31 17:18:15 +01:00
Laurent Destailleur (aka Eldy)
f08c9605db Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-31 17:17:45 +01:00
Laurent Destailleur (aka Eldy)
e41dfcbbb3 Fix phpcs 2024-12-31 17:17:00 +01:00
Laurent Destailleur (aka Eldy)
a0b6aa28a7 Fix phpcs 2024-12-31 17:13:43 +01:00
Laurent Destailleur (aka Eldy)
c273495261 Fix ci 2024-12-31 17:12:37 +01:00
Eric Seigne
220090813d there is no "name" field into llx_socpeople table 2024-12-30 10:28:23 +01:00
Laurent Destailleur
e65ee097a5 Merge pull request #30915 from MaximilienR-easya/18.0_Backport_yogosha
Backport #yogosha18281
2024-12-30 04:58:37 +01:00
Laurent Destailleur (aka Eldy)
92963af09f Fix yml syntax 2024-12-29 17:04:54 +01:00
Laurent Destailleur (aka Eldy)
8ccdbf374b Update test 2024-12-29 15:57:17 +01:00
Laurent Destailleur
9e8fcba04a Merge pull request #32468 from hregis/fix_19_cannot_convert_if_prov
FIX #28702
2024-12-27 14:28:45 +01:00
Regis Houssin
da7679dfda FIX #28702 2024-12-26 11:15:22 +01:00
Laurent Destailleur (aka Eldy)
0300209b3d Missing new line 2024-12-24 02:00:37 +01:00
Laurent Destailleur
a5f51dc969 Merge pull request #32433 from frederic34/15.0-fix_ci
fix CI for branch 15.0
2024-12-19 18:58:29 +01:00
Frédéric France
04b7fdd4c4 fix CI 2024-12-19 18:32:16 +01:00
Laurent Destailleur (aka Eldy)
e3c44568a0 Test github action 2024-12-19 18:31:15 +01:00
Laurent Destailleur
37f3fccc35 Merge pull request #32383 from atm-etienne/fix/130/remove_dol_syslog_throws
Fix/130/remove dol syslog throws
2024-12-19 18:10:38 +01:00
Laurent Destailleur
fedcec58a6 Update errors.lang 2024-12-19 18:09:50 +01:00
Laurent Destailleur
be95c92c45 Update functions.lib.php 2024-12-19 18:07:02 +01:00
Laurent Destailleur
8991dcb3eb Merge pull request #32425 from hregis/fix_19_cannot_convert_if_prov
FIX backport from develop to avoid php warning
2024-12-19 18:04:03 +01:00
Laurent Destailleur (aka Eldy)
7185da6504 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-19 17:54:37 +01:00
Laurent Destailleur (aka Eldy)
810fd7e744 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-19 17:51:14 +01:00
Laurent Destailleur (aka Eldy)
c6afa1a6cb Merge branch '17.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-19 17:50:40 +01:00
Laurent Destailleur (aka Eldy)
29eedd2ac4 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-19 17:50:34 +01:00
Laurent Destailleur (aka Eldy)
ead519811c Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-12-19 17:50:09 +01:00
Laurent Destailleur
5203652796 Merge pull request #32430 from Benoit-PASCAL/fix-fetch-action-linked-object
fix: fetch action linked object
2024-12-19 17:49:50 +01:00
Laurent Destailleur
750ed5e91c Merge pull request #32412 from Easya-Solutions/17.0_fix_no_commit_to_branch
pre-commit : change regex for hook no-commit-to-branch to block only `18.0`, not `18.0_branch_description`
2024-12-19 17:38:15 +01:00
Laurent Destailleur
0ec6a240bf Merge pull request #32422 from atm-irvine/fix_sql_error_subtype
fix(facture): when updating, subtype should not be trimmed as it is a…
2024-12-19 17:32:39 +01:00
Benoît PASCAL
425c23d28c fix: fetch action linked object 2024-12-19 15:38:19 +01:00
Regis Houssin
0da6e25881 FIX backport from develop to avoid php warning 2024-12-19 11:23:45 +01:00
Irvine Fleith
4aba65eaeb fix(facture): when updating, subtype should not be trimmed as it is an int not a string 2024-12-19 08:40:56 +01:00
Laurent Destailleur
aa2af316e5 Merge pull request #32401 from FHenry/19_missing_token_delete_production_bom
fix: missing token on delete line on MO
2024-12-18 12:12:39 +01:00
Noé Cendrier
900a91a0a2 Merge pull request #22 from altairis-melina/fix_statut_ticket
Fix: Statut ticket
2024-12-18 11:40:07 +01:00
Mélina JOUM
ce06c12da6 FIX: GETPOST('private_message') 2024-12-18 11:19:56 +01:00
tnegre
b73bcd68a9 pre-commit : change regex for hook no-commit-to-branch in order to allow branches BEGINNING by 18.0, such as 18.0_fix_foo 2024-12-18 10:47:46 +01:00
tnegre
86833633ef fix 2024-12-18 10:26:26 +01:00
tnegre
21ac3b28ef Merge branch '18.0' into 18.0_fix_error_delete_loan 2024-12-18 09:50:13 +01:00
Florian HENRY
1895fb3394 fix: missing token on delete line on MO 2024-12-17 17:27:27 +01:00
Laurent Destailleur (aka Eldy)
d16dd82297 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-17 16:40:29 +01:00
Etienne BENDER
6aee2db1d4 Remove use of getDolGlobalInt() 2024-12-17 09:01:04 +01:00
Laurent Destailleur (aka Eldy)
a6da3b189a Not required, but for better code consistency 2024-12-16 12:59:16 +01:00
Laurent Destailleur
ce958276b4 Merge pull request #32369 from sonikf/sonikf-patch-19
FIX #32317 Error with report by month sales tax
2024-12-15 00:50:06 +01:00
Laurent Destailleur
0363c20047 Merge pull request #32351 from hregis/fix_19_cannot_convert_if_prov
FIX can not convert to reduc if draft status
2024-12-15 00:49:06 +01:00
sonikf
323093eaea FIX #32317 Error with report by month sales tax 2024-12-14 19:23:36 +02:00
Regis Houssin
03b560d688 FIX wrong check 2024-12-13 14:51:46 +01:00
Regis Houssin
7f6f2f44c3 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into fix_19_cannot_convert_if_prov 2024-12-13 14:51:19 +01:00
Laurent Destailleur
3ab98124b6 Merge pull request #32336 from hregis/fix_19_wrong_trigger_name
FIX wrong trigger name (MODIFY instead UPDATE)
2024-12-13 14:45:19 +01:00
Laurent Destailleur
65d6403fa3 Merge branch '18.0' into 18_fixloanpayment 2024-12-13 14:05:43 +01:00
Laurent Destailleur (aka Eldy)
62c1d500e8 Avoid errors 2024-12-13 14:05:04 +01:00
Regis Houssin
2b3bd3d6dc FIX can not convert to reduc if draft status 2024-12-13 09:19:10 +01:00
Alexandre SPANGARO
ef090aa895 CI 2024-12-13 06:22:44 +01:00
Alexandre SPANGARO
d9be3efa90 FIX #32339 Delete a loan settlement is partial 2024-12-13 06:18:45 +01:00
tnegre
a4785adb3d FIX : display error when loan can't be deleted 2024-12-12 15:31:40 +01:00
Regis Houssin
2ccc6f71ae FIX wrong trigger name (MODIFY instead UPDATE) 2024-12-12 11:58:52 +01:00
Laurent Destailleur
492505ad0b Merge pull request #32194 from josett225/patch-16
FIX Accounting Closure Duplicates, Subledger accounts, Account Labels and more... Update bookkeeping.class.php
2024-12-09 23:48:11 +01:00
Laurent Destailleur
335566a4ef Merge pull request #32298 from FHenry/19_fix_product_variant_multipricelevel
fix: Variant with multiprice, on creation of variant, percent variation is not save
2024-12-09 21:54:54 +01:00
Florian HENRY
f8bd644b58 fix: Variant with multiprice, on creation of variant, percent variation is not save 2024-12-09 17:41:56 +01:00
Laurent Destailleur (aka Eldy)
b5bb71ed63 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-09 14:20:44 +01:00
Laurent Destailleur (aka Eldy)
3c22179183 Rename file 2024-12-09 14:20:28 +01:00
Pichi1966
b86c1b22f4 Update Closure Income Labels 2024-12-09 12:46:47 +01:00
Etienne BENDER
a96d13d5aa Add translation for bad log level 2024-12-09 10:56:35 +01:00
Etienne BENDER
f1868ee162 Replace dol_syslog throws by default log level 2024-12-09 10:50:29 +01:00
Laurent Destailleur (aka Eldy)
cfd4919829 Test 2024-12-09 08:40:25 +01:00
Laurent Destailleur (aka Eldy)
30893bf676 Test 2024-12-09 08:36:07 +01:00
Laurent Destailleur (aka Eldy)
7beb874f93 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-08 16:47:36 +01:00
Laurent Destailleur (aka Eldy)
28213b3129 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 16:44:08 +01:00
Laurent Destailleur (aka Eldy)
c3ede4413d Test 2024-12-08 16:01:45 +01:00
Laurent Destailleur (aka Eldy)
21eca275e9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 15:54:01 +01:00
Laurent Destailleur (aka Eldy)
127b9701ff Test 2024-12-08 15:53:25 +01:00
Laurent Destailleur (aka Eldy)
ee7201fc61 Test 2024-12-08 15:43:42 +01:00
Laurent Destailleur (aka Eldy)
c075e078e9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 15:41:37 +01:00
Laurent Destailleur (aka Eldy)
f9eb6b69f5 Test 2024-12-08 15:41:29 +01:00
Laurent Destailleur (aka Eldy)
3d9b7ed7d3 Test 2024-12-08 15:40:35 +01:00
Laurent Destailleur (aka Eldy)
6920b72cf4 Test 2024-12-08 15:35:03 +01:00
Laurent Destailleur (aka Eldy)
9a9602f418 Test 2024-12-08 15:09:08 +01:00
Laurent Destailleur (aka Eldy)
0960fcba2a Test 2024-12-08 15:02:43 +01:00
Laurent Destailleur (aka Eldy)
9b46ed9c2d Test 2024-12-08 14:57:17 +01:00
Laurent Destailleur (aka Eldy)
d055b1fb29 Test 2024-12-08 14:36:07 +01:00
Laurent Destailleur (aka Eldy)
9411ac2144 Test 2024-12-08 14:35:30 +01:00
Laurent Destailleur (aka Eldy)
eb2b35e3b1 Test 2024-12-08 14:32:16 +01:00
Laurent Destailleur (aka Eldy)
ab5f9a0884 Tst 2024-12-08 14:31:00 +01:00
Laurent Destailleur (aka Eldy)
b4ece8d154 Fix 2024-12-08 14:25:10 +01:00
Laurent Destailleur (aka Eldy)
75e504ffbc Test 2024-12-08 14:20:15 +01:00
Laurent Destailleur (aka Eldy)
3877f257b4 Test 2024-12-08 14:13:13 +01:00
Laurent Destailleur (aka Eldy)
6f2d8b23b4 Test 2024-12-08 14:09:47 +01:00
Laurent Destailleur (aka Eldy)
80326acb71 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 14:08:07 +01:00
Laurent Destailleur (aka Eldy)
d9035eecda Test 2024-12-08 14:07:37 +01:00
Laurent Destailleur (aka Eldy)
da6f1fbc9a Test 2024-12-08 14:04:10 +01:00
Laurent Destailleur (aka Eldy)
4bb2b9f971 Test 2024-12-08 13:51:23 +01:00
Laurent Destailleur (aka Eldy)
a0864dfb3f Fix test 2024-12-08 13:05:24 +01:00
Laurent Destailleur (aka Eldy)
d3d534efee Test 2024-12-08 12:54:25 +01:00
Laurent Destailleur (aka Eldy)
2e94f7dbd4 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-08 12:52:59 +01:00
Laurent Destailleur (aka Eldy)
2c4b3bf6ad Test 2024-12-08 12:52:44 +01:00
Pichi1966
25e3224121 Close #30039 and port code on this one
This will help to better and understand and follow this fix
2024-12-08 11:36:26 +01:00
Laurent Destailleur
2e18936209 Merge pull request #32246 from hregis/fix_19_multicompany_wrong_perm
FIX missing hook parameters
2024-12-08 11:01:55 +01:00
Laurent Destailleur
886c54eb37 Merge pull request #32231 from Hystepik/Fix-#26009-better-fix
Fix #26009 better fix for bad value in select for new application
2024-12-08 11:00:38 +01:00
Laurent Destailleur
3a866b0140 Merge pull request #32229 from evarisk-kilyan/fix_php_8_warning_dolgraph
[Dolgraph] fix: php8 warning
2024-12-08 10:45:00 +01:00
tnegre
e8aaa51edc set empty value for choice 2024-12-06 14:06:54 +01:00
tnegre
e48e1e27d5 replace code from develop to match DLB18 variable name 2024-12-06 12:07:37 +01:00
Laurent Destailleur (aka Eldy)
c86b50e3fc The $empty param must follow same rules than other select component. 2024-12-06 11:57:27 +01:00
Laurent Destailleur
42368b37e9 Merge pull request #32251 from ATM-Consulting/FIX/130/coeur/fetch-return-value-bad-test
Fix 17.0 missing test of return value
2024-12-05 19:28:42 +01:00
Laurent Destailleur
addefdf0cf Merge pull request #32247 from atm-irvine/fix_missing_error_cron_createrecurringinvoice
Added new error message for CRON createRecurringInvoice
2024-12-05 18:14:40 +01:00
Laurent Destailleur
59642d8d93 Merge pull request #32131 from frederic34/patch-10
backport of PR 32080
2024-12-05 16:47:42 +01:00
Laurent Destailleur
a26eecf0fd Merge pull request #32190 from JonBendtsen/v18_Updating_Invoice_Notes_32134
throw RestException(500) if update of invoice fails #32134
2024-12-05 16:39:56 +01:00
Laurent Destailleur
69449668a8 Merge pull request #32205 from atm-quentin/FIX_total_time
Fix for incorrect total time calculation in project overview tab
2024-12-05 16:21:51 +01:00
Laurent Destailleur
084d99f670 Merge pull request #32216 from Easya-Solutions/18.0_fix_ticket_list
Ticket : don't autofill search field for ticket type on multiselect
2024-12-05 16:12:22 +01:00
atm-florian
15c19b99c9 FIX 17.0: warnings due to uninitialized variables + delete code that doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature) 2024-12-05 12:15:20 +01:00
atm-florian
c418a6ff57 FIX 17.0 - missing error handling for FactureRec::fetch in card-rec.php 2024-12-05 12:14:13 +01:00
Regis Houssin
3f1e4e27ff FIX avoid php warning 2024-12-05 11:04:38 +01:00
Irvine Fleith
3aad5fd283 Added new error message for CRON createRecurringInvoice 2024-12-05 09:02:51 +01:00
Regis Houssin
5236372921 FIX missing hook parameters 2024-12-05 07:53:04 +01:00
Hystepik
7fbaa88b9f Merge branch '19.0' of https://github.com/Dolibarr/dolibarr into Fix-#26009-better-fix 2024-12-04 12:16:41 +01:00
Hystepik
41d58cd88e Fix #26009 better fix 2024-12-04 12:13:41 +01:00
evarisk-kilyan
170d43439f [Dolgraph] fix: php8 warning 2024-12-04 09:51:07 +01:00
Laurent Destailleur
a7ed20d74b Merge pull request #32218 from FHenry/19_fix_adv_target_emailing
fix: various fix on broken extrafields managnement on advtargetemailing
2024-12-04 01:00:07 +01:00
Laurent Destailleur
211d21306c Merge pull request #32163 from glu000/19.0-fix-32161
Fix #32161 - Payment terms are not taken from thirdparty when proposal is created from project
2024-12-03 21:59:56 +01:00
Frédéric FRANCE
d04b1e57d2 Merge branch '18.0' into patch-10 2024-12-03 21:39:47 +01:00
Laurent Destailleur
ec7fd647ac Merge pull request #32160 from glu000/19.0-fix-32158
Fix #32158
2024-12-03 21:11:33 +01:00
Florian HENRY
8c85933da9 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:41:17 +01:00
Florian HENRY
b10483ddc8 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:41:07 +01:00
Florian HENRY
d39ccbc98c fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:40:04 +01:00
Florian HENRY
1080de062e fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:36:54 +01:00
Florian HENRY
6c34431336 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:36:07 +01:00
Florian HENRY
e61da22458 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:27:45 +01:00
tnegre
f5c715c6a7 Ticket : don't autofill search field for ticket type on multiselect 2024-12-03 15:05:39 +01:00
Quentin VIAL--GOUTEYRON
d8fecc1522 FIX : in projet/element.php total_time is always back to 0 2024-12-03 08:39:34 +01:00
Jon Bendtsen
30a9da8fbf Merge branch '18.0' into v18_Updating_Invoice_Notes_32134 2024-12-02 07:31:35 +01:00
Jon Bendtsen
e6712300d5 phan fix, remove code never reached 2024-12-02 07:29:18 +01:00
Laurent Destailleur (aka Eldy)
9227add8f4 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-02 01:41:40 +01:00
Laurent Destailleur (aka Eldy)
c547362ae9 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-12-02 01:41:04 +01:00
Laurent Destailleur (aka Eldy)
9ec4575c43 Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2024-12-02 01:38:41 +01:00
Günter Lukas
4962dd1a81 Fix #29353 (#32151)
Hidden extrafields are NULL on update. Can only happen with extrafields in positions of commercial elements (facture, propal, commande, etc)
2024-12-02 00:48:13 +01:00
Günter Lukas
06808b38b5 Fix #27223 (#32173) 2024-12-01 23:29:42 +01:00
Mathieu Moulin
6337a987d8 Fix handling of boolean extrafields in list filters (#32109)
* Fix show payment URL in massaction context when not one email per recipient

* Debug v20 - fix param for filter on boolean

* FIX : Fix case when the value of a extrafields of the type 'boolean', 'select' or other have an option with a value equal to '0'.
It's not reselected when the filter is set.

* Revert "Fix show payment URL in massaction context when not one email per recipient"

This reverts commit 0986d487f1.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: kkhelifa <kkhelifa@open-dsi.fr>
2024-12-01 23:28:49 +01:00
Joachim Kueter
cf0d945daa FIX #32171 (#32172)
State of reverse charge checkbox in create form not persisted after reload due to validation error
2024-12-01 23:16:38 +01:00
Alexandre Janniaux
b02742ebe1 FIX #32178: repair.php: fix missing 'as' with Postgres (#32179)
Fix the following SQL error when executing the repair script on 19.0.x
and above.

        Error DB_ERROR_SYNTAX (Req 159): create table tmp_bank_url_expense_user (select e.fk_user_author, bu2.fk_bank from llx_expensereport as e, llx_bank_url as bu2 where bu2.url_id = e.rowid and bu2.type = 'payment_expensereport');
        ERROR: 42601: syntax error at or near "select" LINE 1: create table tmp_bank_url_expense_user (select e.fk_user_aut... ^ LOCATION: scanner_yyerror, scan.l:1145
2024-12-01 23:03:08 +01:00
Pichi1966
7e3624ee27 Clean Spaces versu tab 2024-12-01 19:08:53 +01:00
Pichi1966
89fc9ac8ea FIX Accounting Closure Duplicates and more Update bookkeeping.class.php
FIX I did further testing and investigation and I fixed the following issues that stop doing a full closure without duplicate lines generated by an unclean database :

    - different label_compte with same account number
    - removing label_compte is raising an issue and the code in the line around 2770 $bookkeeping->label_compte = $obj->label_compte;
    - different subledger_label with same subledger_account
    - empty versus null values for subledger_label and subledger_account
    - opening_balance is 0 as it creates a bookkeeping entry for now.  

FIX - Update Accounting closure with missing too many A-Nouveau #30039)
2024-12-01 18:55:31 +01:00
Jon Bendtsen
7a500976d2 Merge branch '18.0' into v18_Updating_Invoice_Notes_32134 2024-12-01 10:27:43 +01:00
Jon Bendtsen
0e1744a6ec throw RestException(500) if update of invoice fails #32134 2024-12-01 10:24:25 +01:00
Günter Lukas
c01ab2b7ea Update card.php 2024-11-30 13:36:13 +01:00
Günter Lukas
23617a11fc Update card.php 2024-11-30 13:34:17 +01:00
Joachim Kueter
18775c06ea FIX #31890 store empty line extrafields (#32152)
* FIX #31890 store empty line extrafields

If a line extrafield had originally some contents, after deleting it and submitting it as empty, the extrafield was not stored but the original contents kept

* corrected whitespace
2024-11-30 13:06:36 +01:00
Joachim Kueter
53f566e9f1 Fix #32145 (#32162)
Parameter is always "1" or "0"
2024-11-30 13:02:58 +01:00
Günter Lukas
677525a663 Update card.php 2024-11-30 11:08:17 +01:00
Günter Lukas
f5d639b841 Update card.php 2024-11-30 11:04:35 +01:00
Günter Lukas
fe3fb72e5e Fix #32161 2024-11-30 10:54:32 +01:00
Günter Lukas
9dcabdbab6 Fix #32158 2024-11-30 10:05:48 +01:00
Lucas Marcouiller
1080d0718c Fix no display of extrafields in bankentries_list (#32149)
* Fix no display of extrafields in bankentries_list

* fix error

* fix comment

---------

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-11-29 17:03:25 +01:00
Frédéric FRANCE
29a7a410c8 backport of https://github.com/Dolibarr/dolibarr/pull/32080
backport of fix part
2024-11-28 13:28:34 +01:00
Mathieu Moulin
e9009ede87 Fix double hook printFieldPreListTitle in command list (#32108)
* Fix command list : remove double hook printFieldPreListTitle

* Remove files
2024-11-27 22:02:29 +01:00
Frédéric FRANCE
7b16039084 fix test (#32110) 2024-11-27 18:02:59 +01:00
Thomas C.
acdab170a7 fix (#32012) 2024-11-22 17:58:21 +01:00
Laurent Destailleur
32b18d6bfd Execute 2024-11-22 15:22:22 +01:00
Jon Bendtsen
9cd7d381a6 flip supplier proposal and orders to show up as negative in the project Profit overview (#32048)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-11-22 13:25:25 +01:00
Frédéric FRANCE
e35b534ee2 fix ajax tooltip lib_foot.js.php (#32044)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-22 13:22:05 +01:00
Laurent Destailleur
682544ad45 Update test.yaml (#32054)
* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Update pr-18.yaml

* Update test.yaml
2024-11-22 13:08:56 +01:00
Laurent Destailleur
53ffe42f92 Test CI 2024-11-22 00:27:58 +01:00
Laurent Destailleur
c2a037842d Add test 2024-11-22 00:22:26 +01:00
Laurent Destailleur
552bebf564 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-22 00:20:23 +01:00
Laurent Destailleur
ec93f50863 Test 2024-11-22 00:15:14 +01:00
HENRY Florian
240c5bb311 fix: buyer and sellers in supplier invoice and supplier order list are not corectly defined (#32028)
* fix: buyer and sellers in supplier invoice and supplier order list are not corectly defined

* chore: revert bad changes
2024-11-21 23:00:41 +01:00
lvessiller-opendsi
c12a7e144a FIX TakePos barcode rule (#31857)
* FIX TakePos barcode rule

* Keep last test confition on barcode rule
2024-11-21 19:07:58 +01:00
HENRY Florian
991f53db9e FIX: use tax with code on supplier order line give tax code missing in supplier invoice (#32018)
* FIX: use vat with code on supplier order result code missing in supplier invoice

* FIX: use vat with code on supplier order result code missing in supplier invoice
2024-11-21 17:46:54 +01:00
Laurent Destailleur
877fd00353 Update pr-18.yaml 2024-11-21 13:21:58 +01:00
Frédéric FRANCE
d420d035de Update pr-18.yaml (#32024)
* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

* Update pr-18.yaml

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-21 13:02:14 +01:00
alkaan
115323dec8 FIX : removes traces of <<<HEAD conflicts following the postponement of branch 13 modifications (#32014)
Co-authored-by: John Fleuret <john.fleuret@atgp.net>
2024-11-20 20:57:22 +01:00
noec764
4706b5d1fe Fix: Plain MSG Can be empty with \n (#32003)
Co-authored-by: Noé <noe@scopen.fr>
2024-11-19 18:59:07 +01:00
Laurent Destailleur
fc1f397f08 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-19 13:01:20 +01:00
Laurent Destailleur
ac6c57e90e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-19 12:59:14 +01:00
Laurent Destailleur
9c4bb84460 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-19 12:57:19 +01:00
Laurent Destailleur
5a58b8e721 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-11-19 12:56:37 +01:00
Laurent Destailleur
b068fdc9b3 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-11-19 12:56:19 +01:00
Laurent Destailleur
b8533e1853 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-11-19 12:49:19 +01:00
Laurent Destailleur
753e5e535d Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-11-19 12:47:14 +01:00
Laurent Destailleur
93b11038d5 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-19 03:44:50 +01:00
Laurent Destailleur
99774022a5 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-19 03:36:44 +01:00
Laurent Destailleur
c5ebc9b7bd Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-19 03:33:15 +01:00
Florian Charlaix
f2f3e478d1 New Add a workflow to let @lvessiller-opendsi and @rycks merge 18.0 PR by accepting reviews (#31898)
* Add a workflow to let @lvessiller-opendsi and @crycks merge 18.0 PR by accepting reviews

* Try to fix permissions
2024-11-18 17:58:56 +01:00
Benoît PASCAL
f10d9464a1 fix: get file link in invoice list with multicompany (#31966) 2024-11-18 17:58:25 +01:00
Sébastien NASSIET
02eb16a703 FIX#31159 - TVA Account by country is not used (#31984)
* FIX#31159

* FIX#31159
2024-11-18 15:49:52 +01:00
lvessiller-opendsi
580d789a00 FIX send mail to BCC when email formated as Fullname <email> (#31983) 2024-11-18 14:56:09 +01:00
uvaldenaire-opendsi
98d106e6b5 Fix delete project when mrp module never enabled (#31982)
Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
2024-11-18 14:55:20 +01:00
Laurent Destailleur
bca77bddb8 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-17 10:31:38 +01:00
Laurent Destailleur
7ca9f0022a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-17 10:31:11 +01:00
noec764
a960be440b FIX: All contacts were loaded even if no thirdparty was selected (#31877)
* FIX: All contact were loaded even if no thirdparty selected

* Update card.php

---------

Co-authored-by: Noé <noe@scopen.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-17 00:06:33 +01:00
Mathieu Moulin
a602309e04 Fix user::load_previous_next_ref() with MULTICOMPANY_TRANSVERSE_MODE bad sql query (cartesian product replaced by INNER JOIN) (#31946) 2024-11-16 18:19:59 +01:00
Mathieu Moulin
f51935a258 Fix slow user card when many users in same group, disable loading of all other users (#31947) 2024-11-16 18:10:08 +01:00
Sami Filali
fac36d2376 add hook (#31938) 2024-11-16 14:51:24 +01:00
Thomas C.
976399c2d9 fix (#31683) 2024-11-16 10:57:03 +01:00
Mathieu Moulin
cd6ed63768 Fix Specimen warning in supplier admin when database has no products (#31867) 2024-11-16 10:45:01 +01:00
Mathieu Moulin
348981a419 Fix show payment URL in massaction context when not one email per recipient (#31927) 2024-11-16 00:06:15 +01:00
Mathieu Moulin
adf59f2599 Fix mod_facture_fournisseur_tulip::getExample & get_next_value if no object in parameter (#31878) 2024-11-16 00:00:05 +01:00
alex10843
5d9d282f1b FIX: Takepos: set the country of the default customer (#31915)
* FIX: Takepos: set the country of the default customer

* Update modTakePos.class.php

---------

Co-authored-by: Alex - Solauv <vous@exemple.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-15 23:56:14 +01:00
kkhelifa-opendsi
d0323fa27d FIX : Update on a sold line of bank entrie set the type to empty, now it's fixed #22539 (#31888) 2024-11-15 23:53:04 +01:00
William Mead
038f8d5dff Backported default ticket severity fix (#31908) 2024-11-15 23:44:08 +01:00
William Mead
bab49d66c5 Backported default ticket type fix (#31912) 2024-11-15 23:36:54 +01:00
Francis Appels
230eee4ead FIX issue #28222 Edit date extrafield diplayed on all on lines (#31914)
* FIX issue #28222 Edit date extrafield diplayed on all on lines

* wrong id
2024-11-15 23:31:12 +01:00
Eric - CAP-REL
ef67a4c31b fix #27534 (#31896) 2024-11-15 23:26:05 +01:00
Rémi Champlon
f408803ae0 list contact check by module (#31845)
Co-authored-by: Rémi Champlon <r.champlon@vold.lu>
2024-11-15 16:02:11 +01:00
sonikf
fd3482f331 fix #31798 End of month incorrect button value(clone salary) (#31827) 2024-11-15 14:13:05 +01:00
Marc de Lima Lucio
ce9a1b3661 FIX: swiftmailer: correctly set errors-to header (#31826) 2024-11-15 14:10:35 +01:00
MaximilienR-easya
4feb9def4e Fix Preview present even when there is no corresponding file (#30585)
* Fix cas de previews de fichier non existant

* another way to detect missing or missnamed file than using file_exists function
2024-11-13 22:52:42 +01:00
accellier-dev
c845cc337c Fixed: #30976 (#30979)
* Fixed: #30976

* Update odf.php

---------

Co-authored-by: Pratush Raj <pratushraj0@gmail.com>
2024-11-13 22:27:31 +01:00
lvessiller-opendsi
dccde49388 FIX calculate start date of cloned task from cloned project (#31799)
* FIX calculate start date of cloned task from cloned project

* Fix wrong strat comment
2024-11-13 21:31:22 +01:00
Frédéric FRANCE
2b26521e32 Fix typo in ChangeLog (#31802) 2024-11-13 21:20:12 +01:00
Laurent Destailleur
b9c628413e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-13 16:37:31 +01:00
Laurent Destailleur
a039a00277 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-13 16:35:07 +01:00
Laurent Destailleur
d30a0ea066 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-11-13 16:32:54 +01:00
Laurent Destailleur
ab6c74ae88 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-11-13 16:29:18 +01:00
Laurent Destailleur
fbca98ec2a Merge 2024-11-13 16:25:00 +01:00
thomas-Ngr
93f23fe452 ODF : fix : escape specials chars in IF ELSE ENDIF $key (#31796)
* ODF : fix : escape specials chars in IF ELSE ENDIF $key

* fix missing brackets

* add delimiter to preg_quote

---------

Co-authored-by: Brice Werry <bwerry@open-dsi.fr>
2024-11-13 16:18:08 +01:00
Laurent Destailleur
ad2e2fe63d Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-13 12:41:15 +01:00
Eric - CAP-REL
67c2a48fc9 Add missing extrafields on strato pdf model (#31790)
* undef var

* add main extrafields on object

* remove dev debug sorry !

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-13 12:39:10 +01:00
Laurent Destailleur
49d936c3f6 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-13 12:10:07 +01:00
Laurent Destailleur
792ff4044e Typo 2024-11-13 12:08:46 +01:00
Laurent Destailleur
29ef86a245 Typo 2024-11-13 11:51:32 +01:00
Laurent Destailleur
62bff1d070 Prepare 19.0.4 2024-11-13 11:02:13 +01:00
Laurent Destailleur
46769d65f3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-13 10:58:10 +01:00
Laurent Destailleur
d5add8aa49 typo 2024-11-13 10:56:56 +01:00
Laurent Destailleur
d3b9a83055 Fix changelog 2024-11-13 10:56:14 +01:00
Laurent Destailleur
1729df2a75 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-13 10:06:24 +01:00
Laurent Destailleur
294912420b Prepare 19.0.4 2024-11-13 10:06:10 +01:00
Laurent Destailleur
4cd2e572ae Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-13 00:30:26 +01:00
Laurent Destailleur
f4b2269e2e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-11-13 00:26:53 +01:00
uvaldenaire-opendsi
0eee1ad18b Qual: remove php 8.2 warnings by casting trim() argument to string. (#28162) (#31693)
In create and update methods of societe class, the trim function triggered warnings when the argument passed is null.
Cast string properties to string to avoid php warnings when the property is null.

Co-authored-by: UltraViolet33 <93035200+UltraViolet33@users.noreply.github.com>
2024-11-12 19:45:52 +01:00
Laurent Destailleur
5b4744a677 Fix duplicate status after merge from v18 fix 2024-11-12 16:18:19 +01:00
lvessiller-opendsi
d5e2f89edc FIX can validate shipment without stock movement (#31780) 2024-11-12 14:25:36 +01:00
uvaldenaire-opendsi
67bcc242db fix trim null value on invoice creation (#31682)
* fix trim null value on invoice creation

* fix trim with null value for note_public
2024-11-10 11:18:05 +01:00
Laurent Destailleur
c28cd8e287 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-09 15:50:14 +01:00
Laurent Destailleur
5bb34ab2b6 Fix save of error 2024-11-09 15:49:22 +01:00
Laurent Destailleur
1a3e9de52a Fix save of error 2024-11-09 15:48:14 +01:00
lvessiller-opendsi
8a55e2f6a4 FIX old copy not needed in supplier order create method (#31733) 2024-11-08 17:51:44 +01:00
Juanjo Menent
5eb5033aba FIX #25853 Thirdparty Massaction (#25868)
* FIX #25853 Thirdparty Massaction

* FIX #25704 Taxes Deleted from Vendor Invoices

* FIX #25704 Taxes Deleted from Vendor Invoices

* FIX #25704 Taxes Deleted from Vendor Invoices

* Update fournisseur.facture.class.php

---------

Co-authored-by: Juanjo Menent <jmenent@2byte.es>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-07 04:41:48 +01:00
Laurent Destailleur
e1b0cb6cf0 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-06 20:16:12 +01:00
Florian Mortgat
723c8278ce FIX 17.0 fatal when updating recurring supplier invoice line with php8 ($remise_percent is '' instead of 0) (#31713) 2024-11-06 19:20:38 +01:00
uvaldenaire-opendsi
bbf83c7053 fix dol_getdate() when timestamp is an empty string (#31714) 2024-11-06 19:17:33 +01:00
Laurent Destailleur
43fb9dbb52 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-06 16:39:29 +01:00
Laurent Destailleur
a9b6e6916c FIX column position on PDF of payments 2024-11-06 16:38:32 +01:00
Laurent Destailleur
6a01be1b8f Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-05 17:19:29 +01:00
Laurent Destailleur
56925afe8e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-11-05 17:16:01 +01:00
HENRY Florian
b8286ab8f3 fix: List of UserGroup display wrong count of records( actual: nb group * nb user * nb perms (*nb entities)) instead of count of group (#31687)
* fix: group list count nb group * nb user * nb perms

* fix: synk.io security issue with zappier sample package in version Dolibarr 18.0
2024-11-05 15:37:04 +01:00
atm-jonathan
7133c6529b FIX show preview pdf list expensereport (#31694)
* show preview pdf list expensereport

* conditions added
2024-11-05 13:51:26 +01:00
lvessiller-opendsi
e0a3756c6e FIX update status on create supplier order for trigger (#31642) 2024-10-30 23:35:39 +01:00
PsyCrow
87fdd4ea5f FIX #28505 Blank page from thirparty to projects (#31637)
Fix Blank page from thirparty to projects for users that has not permisson to do massactions
2024-10-30 21:09:48 +01:00
thomas-Ngr
c396a08cb2 fix const WORKFLOW_RECEPTION_CLASSIFY_CLOSED_INVOICE (#31601)
* rename const WORKFLOW_EXPEDITION_CLASSIFY_CLOSED_INVOICE to WORKFLOW_RECEPTION_CLASSIFY_CLOSED_INVOICE

* edit wrong SQL erquest
2024-10-29 17:34:30 +01:00
Laurent Destailleur
d51bf2b0ea Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-10-29 15:52:04 +01:00
Laurent Destailleur
0981c69515 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-29 15:48:21 +01:00
Laurent Destailleur
1987ea2eb7 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-10-29 15:47:51 +01:00
Laurent Destailleur
6a4ee18380 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-10-29 15:47:17 +01:00
Laurent Destailleur
b3a2908b48 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-10-29 15:46:43 +01:00
Laurent Destailleur
910f7e8564 Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-10-29 15:46:12 +01:00
Laurent Destailleur
7cf1a97673 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0 2024-10-29 15:44:55 +01:00
Laurent Destailleur
cf57e7e88b Merge 2024-10-29 15:44:25 +01:00
Laurent Destailleur
8b4dcb1194 FIX email templates for expense report not visible 2024-10-29 15:43:16 +01:00
Laurent Destailleur
a186e16568 Backport fix for mysql 8 export 2024-10-29 15:32:54 +01:00
kkhelifa-opendsi
eaa31ed4a3 FIX: Fix bug select columns and acces to the public ticket list from the public ticket card (case when we have connected to another client before, the track id stocked in session overwrite the new track id from the public ticket card) (#31000) 2024-10-28 21:16:17 +01:00
Laurent Destailleur
0ed4c9f8e7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-10-24 19:59:03 +02:00
Laurent Destailleur
0e62008db6 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-24 18:03:59 +02:00
ATM-NicolasV
399d778a7e Fix:edition rapide de la date de livraison et propagation vers la commande (#31437)
* pouvoir modifier la date de livraison au statut brouillon et propagation de la valeur lors de la création d'une commande

* remove comment

---------

Co-authored-by: ATM-nicolasV <nicolas.vidal@atm-consutling.fr>
2024-10-24 03:14:23 +02:00
Laurent Destailleur
aa096448be Merge branch '18.0' of github.com:Dolibarr/dolibarr into 18.0 2024-10-24 03:07:20 +02:00
Laurent Destailleur
d9d0618eec Fix avoid unexpected deletion on accounting account when using multicompany 2024-10-24 03:06:23 +02:00
Thomas C.
39afafc585 FIX: If you have no stock of your product, an error is displayed when you delete the reception. (#31504)
* fix

* delete

* f

* indent

* indent
2024-10-23 23:11:02 +02:00
HENRY Florian
b37b2ba76f fix: test on const with space.... (#31505) 2024-10-23 23:08:05 +02:00
Anthony Berton
1778401423 FIX---PHP-warning-multiprice-in-liste-product-if-level-is-not-defined-on-product (#31507)
* FIX - PHP warning multiprice in liste product if level is not defined on product

* Update list.php

---------

Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-23 23:06:00 +02:00
atm-corentin
c48b035a15 FIX issue on action set condition in particular when you set a deposi… (#31518)
* fix issue on action set condition in particular when you set a deposit cond on propal

* fix some identation issues

* fix retour github actions pre commit

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-23 22:59:46 +02:00
sonikf
710905470b fix translation for non latin languages (#31473) 2024-10-20 00:11:53 +02:00
Frédéric FRANCE
1d197e42bb fix shippable tooltip value overwritten (#31468) 2024-10-20 00:11:04 +02:00
Frédéric FRANCE
b0c7b8750a fix overwritten value (#31470) 2024-10-20 00:10:54 +02:00
Laurent Destailleur
4a00350859 Fix test on malware 2024-10-19 20:48:05 +02:00
Laurent Destailleur
c160da91ed Change URL for module blacklist feature 2024-10-19 15:29:43 +02:00
Laurent Destailleur
85f1338b19 Fix var_dump 2024-10-19 14:29:59 +02:00
Laurent Destailleur
402570e1c5 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-10-19 14:00:10 +02:00
Laurent Destailleur
a0b791a4a6 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-19 13:59:35 +02:00
Laurent Destailleur
e97c1dc48e Better message 2024-10-19 13:51:05 +02:00
Laurent Destailleur
2aa67ba983 Trans 2024-10-19 13:31:56 +02:00
Laurent Destailleur
0844ed2f9b NEW Include a protection into check update to detect malware 2024-10-19 13:16:13 +02:00
Florian Mortgat
abefce7ae2 FIX 17.0: supplier invoice template card: buyer and seller swapped in VAT-related function calls (probably a copy-paste from customer invoice templates) (#31446) 2024-10-19 01:55:58 +02:00
atm-irvine
352bdaf9c4 FIX : Extrafield following between rec invoice and classic invoice (#31445) 2024-10-19 01:33:31 +02:00
Kamel Khelifa
87c16498ca FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function 2024-10-18 14:26:04 +02:00
Laurent Destailleur
59fd0dbae7 NEW Can choose the zip handler to build ODT 2024-10-17 12:59:24 +02:00
Can Arslan
84225c9077 fix: variable name (#31411) 2024-10-17 01:24:59 +02:00
sonikf
7903a8b780 fix typo (#31418) 2024-10-17 01:14:26 +02:00
sonikf
202263dbb5 fix PDF proposal signature area (#31420)
* fix signature

* fix signature
2024-10-17 01:04:36 +02:00
ems-co
542a4fb060 Update list.php (#31430) 2024-10-17 01:03:51 +02:00
Laurent Destailleur
ae09fc75f0 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-10-17 00:59:53 +02:00
Laurent Destailleur
35f3a4f441 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-17 00:59:17 +02:00
Laurent Destailleur
111e3fcd32 Revert "NEW - Add a new hook on order list (#31315)"
This reverts commit 1e64870a9e.
2024-10-17 00:52:42 +02:00
Laurent Destailleur
ccc27739d7 Fix bad escapement 2024-10-15 15:40:50 +02:00
Frédéric FRANCE
f3f7b67ce2 add missing dol_escape_all (#31406) 2024-10-15 15:39:47 +02:00
Laurent Destailleur
30fd0544f8 Fix look and feel v19 2024-10-14 21:28:15 +02:00
Laurent Destailleur
b099e103b3 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-10-14 21:00:26 +02:00
Laurent Destailleur
d819d88718 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-14 20:18:46 +02:00
Laurent Destailleur
278eea6fae Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-10-14 20:18:22 +02:00
Laurent Destailleur
7cd1425bc1 Fix css 2024-10-14 20:17:21 +02:00
Laurent Destailleur
fa22ebd893 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-10-14 19:31:08 +02:00
Laurent Destailleur
793e77bc5f Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-10-14 19:21:00 +02:00
thomas-Ngr
70a453a5c2 FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385) 2024-10-14 11:57:55 +02:00
UltraViolet33
33c6d95b1c Backport Fix wrong invoice status when invoice has discount (#31323)
Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions>
2024-10-13 21:04:17 +02:00
atm-lucas
1e64870a9e NEW - Add a new hook on order list (#31315)
* Add a new hook on order list

* pr correction
2024-10-11 15:53:43 +02:00
Laurent Destailleur
14dec516a3 FIX Vat code is lost when updating lines in POS 2024-10-08 23:51:51 +02:00
Laurent Destailleur
9509929f5d Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-10-07 15:11:42 +02:00
thomas-Ngr
336d3ad8e5 finish fix (#31203) 2024-10-03 21:03:13 +02:00
thomas-Ngr
e71631abe0 fix : missing update for extrafields on holidays (#31256) 2024-10-03 19:33:33 +02:00
mrozniecki
bad8ee865d Fix title encode 2024-09-20 14:34:34 +02:00
mrozniecki
1ee3c5e5a0 Backport fix title 2024-09-13 12:08:58 +02:00
mrozniecki
0be0c1a1c1 Backport #yogosha18281 2024-09-10 14:01:04 +02:00
atm-lena
66a175e48d langs of recipient 2024-01-22 14:52:51 +01:00
atm-lena
e24da32424 Load multilangs in function pdf_getlinedesc() 2024-01-16 14:13:28 +01:00
atm-lena
a13b720598 Merge branch '17.0' of https://github.com/Dolibarr/dolibarr into 17.0_FIX_MultilangsTranslationPDFLinesDescription 2024-01-16 14:08:52 +01:00
atm-lena
86971c7b86 Clean Conditions 2023-12-22 09:30:35 +01:00
atm-lena
daccab5a07 Merge branch '17.0' of https://github.com/Dolibarr/dolibarr into 17.0_FIX_MultilangsTranslationPDFLinesDescription 2023-12-22 09:22:38 +01:00
atm-lena
4d32d93ee2 Clean Travis 2023-12-18 17:28:41 +01:00
atm-lena
abc9eb7bdc Clean Code 2023-12-18 13:44:19 +01:00
atm-lena
ec19dcc8f8 Invoice 2023-12-18 13:34:50 +01:00
atm-lena
9051e411d0 FIX Multilangs : PDF lines description 2023-12-18 12:00:41 +01:00
324 changed files with 4089 additions and 1741 deletions

86
.github/scripts/get_changed_php.sh vendored Executable file
View File

@@ -0,0 +1,86 @@
#!/bin/bash
# Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
set -euo pipefail
# This script retrieves the list of changed PHP files for a pull request
# using the GitHub API and sets two outputs:
# - any_changed: "true" if at least one PHP file changed, "false" otherwise
# - all_changed_files: space-separated list of changed PHP file paths
#
# Required environment variables:
# GITHUB_TOKEN - GitHub token with repo access
# GITHUB_REPOSITORY - "owner/repo"
# GITHUB_EVENT_PATH - Path to the event JSON payload
# Verify required environment variables are set
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
echo "GITHUB_TOKEN is not set" >&2
exit 1
fi
if [[ -z "${GITHUB_REPOSITORY:-}" ]]; then
echo "GITHUB_REPOSITORY is not set" >&2
exit 1
fi
if [[ -z "${GITHUB_EVENT_PATH:-}" ]]; then
echo "GITHUB_EVENT_PATH is not set" >&2
exit 1
fi
# Extract the pull request number from the event payload
pr_number=$(jq --raw-output '.pull_request.number' "$GITHUB_EVENT_PATH")
if [[ "$pr_number" == "null" ]]; then
echo "Not a pull request event"
exit 0
fi
# Split repository into owner and repo name
# Split repository into owner and repo name using Bash parameter expansion
owner="${GITHUB_REPOSITORY%%/*}" # Extract text before the first '/'
repo="${GITHUB_REPOSITORY##*/}" # Extract text after the last '/'
page=1
per_page=100
changed_php_files=()
# Loop through all pages to gather changed files
while true; do
response=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${owner}/${repo}/pulls/${pr_number}/files?per_page=${per_page}&page=${page}")
# Filter for files ending with .php and add them to the list
mapfile -t files < <(echo "$response" | jq -r '.[] | select(.filename | test("\\.php$")) | .filename')
changed_php_files+=("${files[@]}")
# Check if we have reached the last page (less than per_page results)
count=$(echo "$response" | jq 'length')
if (( count < per_page )); then
break
fi
((page++))
done
# Build a space-separated string of changed PHP files
# This does not cope with files that have spaces.
# But such files do not exist in the project (at least not for the
# files we are filtering).
all_changed_files=$(IFS=" " ; echo "${changed_php_files[*]}")
# Determine changed files flag
if [ -z "$all_changed_files" ]; then
any_changed="false"
else
any_changed="true"
fi
# Set outputs for GitHub Actions if GITHUB_OUTPUT is available
if [ -n "${GITHUB_OUTPUT:-}" ]; then
echo "any_changed=${any_changed}" >> "$GITHUB_OUTPUT"
echo "all_changed_files=${all_changed_files}" >> "$GITHUB_OUTPUT"
else
# Otherwise, print the outputs
echo "any_changed=${any_changed}"
echo "all_changed_files=${all_changed_files}"
fi

24
.github/workflows/ci-on-release.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: "CI-RELEASE"
on:
release:
types: [published]
jobs:
trigger-docker:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.RELEASE_DOCKER_ID }}
private-key: ${{ secrets.RELEASE_DOCKER_SECRET }}
- uses: peter-evans/repository-dispatch@v4
with:
token: ${{ steps.generate-token.outputs.token }}
repository: Dolibarr/dolibarr-docker
event-type: new-release
client-payload: '{"version": "${{ github.event.release.tag_name }}"}'

View File

@@ -1,28 +0,0 @@
name: Qodana
on:
schedule:
- cron: "0 20 * * 1,3,5"
workflow_dispatch:
branches:
- develop
# push:
# branches:
# - develop
permissions:
contents: read
jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
#php-version: '7.1'
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
#with:
# php-version: '7.1'
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

View File

@@ -6,8 +6,7 @@ on:
schedule:
- cron: "0 20 1 * *"
workflow_dispatch:
branches:
- develop
permissions:
contents: read
@@ -22,7 +21,7 @@ jobs:
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
file_extensions: php
project_reports: Perfile
file_extensions: php
project_reports: Perfile

View File

@@ -14,18 +14,18 @@ jobs:
run: sudo apt-get update && sudo apt-get install cppcheck
if: false
# Checkout git sources to analyze
- uses: actions/checkout@v4
# The next uses the git API because there is no clone yet.
# This is faster for a big repo.
- name: Get all changed php files (if PR)
id: changed-php
uses: tj-actions/changed-files@v42
if: github.event_name == 'pull_request'
with:
files: |
**.php
if: env.gh_event == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.github/scripts/get_changed_php.sh
# Checkout git sources to analyze
- uses: actions/checkout@v4
# Action setup-python needs a requirements.txt or pyproject.toml
# This ensures one of them exists.
- name: Create requirements.txt if no requirements.txt or pyproject.toml
@@ -42,6 +42,21 @@ jobs:
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Extract PHP version
id: extract-php-version
run: |
PHP_VERSION=$(sed -n 's/.*\$arrayphpmaxversionwarning\s*=\s*array\s*(\s*\([0-9]\+\)\s*,\s*\([0-9]\+\).*/\1.\2/p' htdocs/install/check.php)
echo "PHP_VERSION=$PHP_VERSION" >> $GITHUB_ENV
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
# Install proper php version, and also install phpcs which may be needed
with:
php-version: ${{ env.PHP_VERSION }} # Version from check.php
coverage: none # disable xdebug, pcov
tools: phpcs
# Run all the precommit tools (defined into pre-commit-config.yaml).
# We can force exclusion of some of them here.
- name: Run pre-commit hooks
@@ -62,24 +77,6 @@ jobs:
# files: |
# **.php
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
# Install when we're going to run phpcs
if: |
steps.changed-php.outputs.any_changed == 'true'
||
(
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
)
)
with:
php-version: 8.1
coverage: none # disable xdebug, pcov
tools: phpcs
- name: Run some pre-commit hooks on selected changed files only
if: steps.changed-php.outputs.any_changed == 'true'
env:

View File

@@ -8,7 +8,7 @@ on:
types: [created]
workflow_dispatch:
permissions: {} # none
permissions: {} # no restriction by default
jobs:
stale:

View File

@@ -6,7 +6,7 @@ repos:
rev: v4.5.0
hooks:
- id: no-commit-to-branch
args: [--branch, develop, --pattern, \d+.0]
args: [--branch, develop, --pattern, \d+.0$]
- id: check-yaml
args: [--unsafe]
- id: check-json
@@ -87,6 +87,8 @@ repos:
]
pass_filenames: false # Run on all files
- id: php-lint
exclude:
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
- id: php-stan
stages: [manual]
files: \.(php)$

View File

@@ -2,9 +2,9 @@
# from Dolibarr GitHub repository.
# For syntax, see https://docs.travis-ci.com/user/languages/php/
# We use dist: bionic = 18.04, focal = 20.04
# We use dist: focal = 20.04, jammy = 22.04
os: linux
dist: focal
dist: jammy
language: generic
@@ -21,7 +21,7 @@ services:
addons:
mariadb: '10.5'
mariadb: '10.6'
env:
@@ -37,7 +37,7 @@ jobs:
- stage: PHP min and max
if: type = push
php: '7.1'
env:
env:
- DB=postgresql
- TRAVIS_PHP_VERSION=7.1
- stage: PHP min and max
@@ -49,7 +49,7 @@ jobs:
- stage: PHP 8.3
if: type = push AND branch = develop
php: '8.3'
env:
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.3
@@ -89,7 +89,7 @@ before_install:
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
fi
- |
echo Install pgsql if run is for pgsql
if [ "$DB" = 'postgresql' ]; then
@@ -114,17 +114,20 @@ before_install:
install:
- |
if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then
sudo update-alternatives --set php /usr/bin/php7.0
fi
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo update-alternatives --set php /usr/bin/php7.1
fi
fi
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo update-alternatives --set php /usr/bin/php8.1
fi
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo update-alternatives --set php /usr/bin/php8.2
fi
fi
php -i | head -
- |
echo "Updating Composer config"
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
@@ -133,10 +136,11 @@ install:
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo chmod -R a+rwx /usr/local/bin/composer
#sudo apt install composer
composer -V
composer -n config -g vendor-dir htdocs/includes
sudo composer -n config -g vendor-dir htdocs/includes
sudo chmod -R a+rwx /home/travis/.config/composer
echo
- |
@@ -206,8 +210,8 @@ before_script:
phpcs -i | head -
# Check PHP Vardump check version
echo "PHP Vardump check version"
which var_dump_check
var_dump_check --version
which var-dump-check
var-dump-check --version
# Check PHPUnit version
echo "PHPUnit version"
which phpunit
@@ -229,7 +233,7 @@ before_script:
#sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &
sleep 3
sudo ps fauxww
sudo ps fauxww
echo "MySQL set root password"
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;"
echo "MySQL grant"
@@ -238,7 +242,7 @@ before_script:
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'
echo "List pid file"
sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';"
#sudo kill `cat /var/lib/mysqld/mysqld.pid`
#sudo systemctl start mariadb
@@ -246,7 +250,7 @@ before_script:
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
echo "MySQL flush"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'
echo "MySQL load sql"
sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
@@ -415,12 +419,12 @@ script:
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE
echo
- |
echo "Upgrading Dolibarr"
# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files.
# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so
# I disable stop on error to be able to continue.
# I disable stop on error to be able to continue.
set +e
cd htdocs/install
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log

292
ChangeLog
View File

@@ -2,6 +2,59 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 19.0.4 compared to 19.0.3 *****
FIX: fatal when updating recurring supplier invoice line with php8 ($remise_percent is '' instead of 0) (#31713)
FIX: supplier invoice template card: buyer and seller swapped in VAT-related function calls (probably a copy-paste from customer invoice templates) (#31446)
FIX: #25853 Thirdparty Massaction (#25868)
FIX: #28505 Blank page from thirparty to projects (#31637)
FIX: #30757
FIX: #30762
FIX: #30768 allocate the correct invoice_line_id to the element timespent (#30769)
FIX: #30772 Accountancy document export - The project filter on expenses report don't work (#30824)
FIX: #30836
FIX: #30960 show and search extrafields (#31026)
FIX: Add same security test when uploading files from API than from GUI (#31114)
FIX: ajaxik URL in ExpenseReport to load coef calculation (#30918)
FIX: attached file on first page load (#30694)
FIX: autoselect the fiscal period by default
FIX: avoid from re-initializing array result on nested hook getEntity (#30626)
FIX: avoid odt errors (#31126)
FIX: avoid pgsql error (#30678)
FIX: avoid the return "AND (())" (#30829)
FIX: Backport fix fatal error on price with some truncating setup
FIX: box_actions.php still uses fk_user_done which no longer exists (#31190)
FIX: can validate shipment without stock movement (#31780)
FIX: column position on PDF of payments
FIX: const WORKFLOW_RECEPTION_CLASSIFY_NEWD_INVOICE (#31601)
FIX: Debug extrafields for bank lines
FIX: email templates for expense report not visible
FIX: Error message overwritten when a error occurs during update of product multilangs (#30841)
FIX: error return missing in mo creation when qty to consume is <= 0 (#31134)
FIX: Extrafield following between rec invoice and classic invoice (#31445)
FIX: Fatal error on create loan schedule (#30656)
FIX: Fix bug select columns and access to the public ticket list from the public ticket card (case when we have connected to another client before, the track id stocked in session overwrite the new track id from the public ticket card) (#31000)
FIX: fixed search filter for projects resetting when set to empty (#30902)
FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167)
FIX: If you have no stock of your product, an error is displayed when you delete the reception. (#31504)
FIX: Invoice unpaid widget - SQL error on group by with constant MAIN_COMPANY_PERENTITY_SHARED (#30866)
FIX: issue on action set condition in particular when you set a deposi… (#31518)
FIX: late order search option (v18+) (#30692)
FIX: late propal search option (v18+) (#30687)
FIX: missing fk_parent_line parameter (#30806)
FIX: mysql error during dump for enable sandbox M999999 (#31116)
FIX: PHP-warning-multiprice-in-liste-product-if-level-is-not-defined-on-product (#31507)
FIX: Protection to avoid an extrafield to be mandatory if computed
FIX: purge files cron: php warnings when rest module enabled (#30919)
FIX: removed unreachable code (#31141)
FIX: show preview pdf list expensereport (#31694)
FIX: Substitution error in ticket emails in the subject (#30778)
FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385)
FIX: use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165)
FIX: Vat code is lost when updating lines in POS
FIX: when qty is not an integer, apply price() (#31138)
FIX: Wrong default PDF model when creating the second situation invoice (#30843)
FIX: wrong subprice if price base type is TTC (#30887)
***** ChangeLog for 19.0.3 compared to 19.0.2 *****
FIX: #29403 HRM - Unable to delete a skill in a job Profile (#29779)
@@ -238,7 +291,6 @@ SEC: Add a protection against installation of external module bypassing
SEC: A user with export permission can export module data without permissions on module.
***** ChangeLog for 19.0.1 compared to 19.0.0 *****
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
FIX: 17.0: $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684)
FIX: #22948
@@ -466,7 +518,7 @@ NEW: Upgrade in module builder in menu section
NEW: use account address in sepa mandate (#23642)
NEW: VAT rate - Add entity
NEW: When an user unset the batch management of products, transformation of each batch stock mouvement in global stock mouvement
NEW: PDF Generation for each Human Resource Evaluations.
NEW: PDF Generation for each Human Resource Evaluations.
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
SEC: Add action confirm_... as sensitive to need a CSRF token
@@ -540,7 +592,7 @@ The following changes may create regressions for some external modules, but were
* The property ->user_creation to store ID of user of creation has been renamed into ->user_creation_id.
* The property ->user_modification to store ID of user of modification has been renamed into ->user_modification_id.
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
* The duplicate property ->user_creat, ->date_creat, ->date_valid have been removed (use instead user_creation, date_creation, date_validation).
* The duplicate property ->user_creat, ->date_creat, ->date_valid have been removed (use instead user_creation, date_creation, date_validation).
* The method get_substitutionarray_shipment_lines() has been removed. Use the generic get_substitutionarray_lines() instead.
* The method ProductcustomerPrice->fetch_all_log() has been renamed into camel case ->fetchAllLog()
* It was possible to use a variable $soc or $right inside a PHP code condition of some extrafields properties, this is no more true (this 2 variables are no more global variables).
@@ -552,6 +604,234 @@ The following changes may create regressions for some external modules, but were
* The load of hook context productdao has been removed before calling loadvirtualstock. Modules must use the context of main parent page or 'all' for all cases.
***** ChangeLog for 18.0.8 compared to 18.0.7 *****
35 files changed, 647 insertions(+), 298 deletions(-)
FIX: #34746 - More complete fix for CVE-2024-40137
FIX: Correct the calculation of the amount of the current period between the period provided (#35083)
FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717)
FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call
FIX: missing quick edit for extrafields (baclport commit 4fc66c6) (#35160)
FIX: Missing sentence part (#35144)
FIX: set global mysoc and load langs in API access (#35041)
FIX: set global mysoc and load langs in API access
FIX: reset mysoc and langs only if entity of API has changed
FIX: accountancy general ledger: bad handling of hook return (#34029)
FIX: accountancy general ledger: bad handling of hook return
FIX: accountancy balance: bad handling of hook return
FIX: - Fix missing token for disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084)
FIX: The combo of custom groups has disappeared (backport v19) (#35016)
FIX: #34893 (#34897)
FIX: #34893
FIX: change error code to USERNOTALLOWEDTOCHANGEPASS
FIX: asset: could not select invoice in disposal pop-in (#34725)
FIX: 17.0 SQL syntax error and/or constraint error when calling Facture::update() after a clone (e.g. in a trigger) (#34778)
FIX: 17.0: when you clone an invoice that was created from a template invoice, the clone should not be linked to the template invoice (#34777)
FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522)
FIX: pre-send mail mass action: keep __EMAIL__ substitution
FIX: comment
FIX: massaction email tpl: keep preset
FIX: loop interrupt if an error occurs in sendEmailsRemindersOnInvoiceDueDate (#34657)
FIX: #34654
***** ChangeLog for 18.0.7 compared to 18.0.6 *****
138 files changed, 1622 insertions(+), 530 deletions(-)
FIX: 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
FIX: 17.0 - collisions in cache for dol_getIdFromCode
FIX: 17.0 - missing error handling for FactureRec::fetch in card-rec.php
FIX: 17.0: warnings due to uninitialized variables + delete code that doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature)
FIX: #21294 Stock import sql query
FIX: #26250 fatal error on kit
FIX: #32339 Delete a loan settlement is partial
FIX: #33038 drag and drop files are not prefixed with object reference
FIX: #33117 accountancy export Quadratus when doc ref is less than 10 char
FIX: #33145 wrong label status buy on product tooltip
FIX: accountancy export Quadratus when doc ref is less than 10 char
FIX: bad dispatched quantities for batches on shipment card
FIX: bank payment rejection on SEPA (backport commit 100a657) (#33838)
FIX: calculate start date of cloned task from cloned project (#31799)
FIX: can not delete files in task card
FIX: close all services on contract will close all lines (#33466)
FIX: compatibility with multicompany
FIX: constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799)
FIX: Count on supplier invoice list does not match count in DB (#33351)
FIX: #CVE-2024-34051
FIX: delete supplier order line when linked to customer order line
FIX: delete supplier order when at least one line linked to customer order line
FIX: display error when loan can't be deleted
FIX: display full tree on shipment card when a kit contains a same component in other sub-kit
FIX: Fix case when the value of a extrafields of the type 'boolean', 'select' or other have an option with a value equal to '0'.
FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function
FIX: GETPOST('private_message')
FIX: in projet/element.php total_time is always back to 0
FIX: invoice creation : use dol_include_once instead of require_once to allow external modules
FIX: invoice creation : use dol_include_once instead of require_once to allow external modules.
FIX: issue #28222 Edit date extrafield displayed on all on lines (#31914)
FIX: Many status on invoice linked object block
FIX: Multilangs : PDF lines description
FIX: ODT substitution when many HTML tags in string
FIX: old copy not needed in supplier order create method (#31733)
FIX: PAIEMENT Wrong field displayed for DateChequeReceived (#33390)
FIX: phpcs
FIX: product variants copy: also copy multiprice variations
FIX: qual
FIX: removes traces of <<<HEAD conflicts following the postponement of branch 13 modifications (#32014)
FIX: Replace compromised tj-actions/changed-files (#33481)
FIX: selectcontact is loading all contacts if socid is empty and MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is not set
FIX: selectcontact is loading all contacts when update event
FIX: select group and severity search fields on ticket list
FIX: send email to assigned user on ticket create
FIX: send mail to BCC when email formatted as Fullname <email> (#31983)
FIX: Show true error when send notify email at validate expense report
FIX: status ticket update for new message
FIX: swiftmailer: correctly set errors-to header (#31826)
FIX: TakePos barcode rule (#31857)
FIX: There were many status indicator in the invoice linked object block (propal card)
FIX(ticket): Notification email without public interface
FIX: Update on a sold line of bank entries set the type to empty, now it's fixed #22539 (#31888)
FIX: update status on create supplier order for trigger (#31642)
FIX: use tax with code on supplier order line give tax code missing in supplier invoice (#32018)
FIX: use vat with code on supplier order result code missing in supplier invoice
FIX: warehouse list: broken status filter (#33667)
FIX: warnings (#33423)
FIX: wrong left margin (v18 to develop ?)
FIX: wrong message on update shipment
FIX: wrong update function parameter
***** ChangeLog for 18.0.6 compared to 18.0.5 *****
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
FIX: 16.0 - the e-mail templates configured in the notification module are not used if the recipient is a fixed e-mail address (#29407)
FIX: 17.0: $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684)
FIX: 17.0: fatal when updating recurring supplier invoice line with php8 ($remise_percent is '' instead of 0) (#31713)
FIX: 17.0: supplier invoice template card: buyer and seller swapped in VAT-related function calls (probably a copy-paste from customer invoice templates) (#31446)
FIX: #24265 regression cannot see all product on takepos (#28753)
FIX: #25853 Thirdparty Massaction (#25868)
FIX: #28205
FIX: #28251 Fixing subpermission name on api_multicurrencies.class.php (#28252)
FIX: #28369
FIX: #28518 (#28520)
FIX: #28978 FIX: #28976
FIX: #29029 Impossible to delete an order line
FIX: #29114 Missing contact term in intervention
FIX: #29114 Translate contact term in intervention
FIX: #29439 incomplete API return (#29796)
FIX: #29496 filtering a record should not hide its child not filtered
FIX: #30010 Use conf TICKET_MESSAGE_MAIL_INTRO instead of translation key (#30081)
FIX: #30274 Add the include before executing dolibarr_set_const (#30320)
FIX: #30467
FIX: #30768 allocate the correct invoice_line_id to the element timespent (#30769)
FIX: Accountancy export with file or not
FIX: Accountancy - Generate entries of expense report with localtax (#30411)
FIX: Accountancy - Not trunc id_import
FIX: accounting FEC import (Issue #28306) (#29414)
FIX: Add new hidden conf "DISABLE_QTY_OVERWRITTEN" (#28523)
FIX: Add same security test when uploading files from API than from GUI (#31114)
FIX: Amount of localtaxes in foreign currency was wrong on screen and PDF
FIX: an error in a complex else condition
FIX: ASSET: annual depreciation starting year (Again ;-)) #26084 (#30040)
FIX: avoid error "Column 'entity' in where clause is ambiguous" (#28270)
FIX: avoid from re-initializing array result on nested hook getEntity (#30626)
FIX: avoid php warnings (#29247)
FIX: avoid to delete "lock" and "unlock" files
FIX: avoid Unknown column 'pfp.ref_fourn' (#28145)
FIX: background color for enabled modules (#29378)
FIX: Backport fix fatal error on price with some truncating setup
FIX: Backport page inventory.php from v18 to fix pagination bugs causing data loss (#29688)
FIX: back to page on error in contact card (#29627)
FIX: Bad calculation of $nbtotalofrecord (#30183)
FIX: box_actions.php still uses fk_user_done which no longer exists (#31190)
FIX: can validate shipment without stock movement (#31780)
FIX: Condition on newDateLimReglement
FIX: Conflict with autoload (#30399)
FIX: const WORKFLOW_RECEPTION_CLASSIFY_NEWD_INVOICE (#31601)
FIX: contact/address title is always "New Contact/Address" even if the contact/address already exists (#29581)
FIX: Display the date according to user language on substitutions (#29510)
FIX: Display the real_PMP on inventory when its value is equal to 0 (#22291)
FIX: Don't display column when it's out of date (#28271)
FIX: email templates for expense report not visible
FIX: Error mesg show untranslated extrafield name (#30227)
FIX: Error message overwrote when a error occurs during update of product multilangs (#30841)
FIX: Error When cloning fourn price no default value for tva_tx (#28368)
FIX: executeHooks $object default value (#29647)
FIX: expedition PDF models using units labels (#30358)
FIX: Extrafield following between rec invoice and classic invoice (#31445)
FIX: fatal error on loading pictures in attached documents of an event (#30553)
FIX: fatal error Unsupported operand types when recording load payment
FIX: Fix bug select columns and access to the public ticket list from the public ticket card (case when we have connected to another client before, the track id stocked in session overwrite the new track id from the public ticket card) (#31000)
FIX: Fix create shipping with product who have negative stocks on warehouse but the negative stock transfer is allowed (#26217)
FIX: Fix save directory for invoice ODT and multientities
FIX: group by qty in product margin tab (#29853)
FIX: Hierarchy Employee view do not filter on employee = 1 (#29496)
FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167)
FIX: If you have no stock of your product, an error is displayed when you delete the reception. (#31504)
FIX: incorrect page numbering in PDF #29458 (#29476)
FIX: inventoryDeletePermission id define twice
FIX: issue on action set condition in particular when you set a deposi… (#31518)
FIX: issue to get the right files exported in Quadratrus export.php (#30004)
FIX: lang output for sales representative on PDF (#30469)
FIX: late order search option (#30692) and propal (#30687)
FIX: lettering (auto) for invoice deposit with company discount (#29633)
FIX: made invalid code shape error more user friendly (#29498)
FIX: Merge of thirdparties must also move uploaded files
FIX: missing entity parameter for ajax_constantonoff
FIX: missing hide "new" button where "product" or "service" module are disable
FIX: mo cloning (#29686)
FIX: modification date from label in accounting bookkeeping list (#30038)
FIX: Move the trigger for delete order line before the SQL request
FIX: multiple problems with multicompany
FIX: mysql error during dump for enable sandbox M999999 (#31116)
FIX: notification: error 500 in fixed emails due to a bad copy/paste (#29580)
FIX: notification module: for supplier orders (any of the 3 triggers), user can choose an e-mail template in conf, but the conf is not used when sending the notification (#28216)
FIX: Not qualified lines for reception (#29473)
FIX: not redirect when error occurs on updating card (#29388)
FIX: Not trancate the multicurrency rate shown on cards (even if the global MAIN_MAX_DECIMALS_SHOWN is set to 0) (#28211)
FIX: on change ref for bank account attachment are lost (#30529)
FIX: Option MAIN_DOC_USE_TIMING can be a string with date format
FIX: orders to bill menu (#30179)
FIX: Payment on customer invoice - Remove accountid in url if empty for apply default value (#28156)
FIX: PDF Fatal error : Backport fix from #23972
FIX: PDF Translations Extrafields
FIX: permission on payment file of a tax
FIX: php8: Fatal when empty $tmpvat is an empty string (no silent conversion to '0' when used in arithmetic operations) (#29451)
FIX: PHP 8 warning on output of successful cronjob (#29922)
FIX: PHP exception on getSpecialCode (#29646)
FIX: php warning global conf (#29478)
FIX: pos: invoice date incorrectly set because of timezome mismatches (reverts #36e91da) (#30184)
FIX: public project form return an error if SOCIETE_EMAIL_UNIQUE (#29942)
FIX: purge files cron: php warnings when rest module enabled (#30919)
FIX: PUT /thirdparties/{id} and PUT /contacts/{id} should throw exception if update returns < 0 (#29596)
FIX: Regression #29340
FIX: Repair the replenishment list (#29336)
FIX: REPLENISH MANY FOURN WHEN ORDER ALREADY CREATE (#29710)
FIX: round capital societe (#29211)
FIX: search and add extrafields to tasks when conf disabled (#29542)
FIX: show preview pdf list expensereport (#31694)
FIX: sometimes a string type instead integer is return, why ?
FIX: Special code is now transmitted by args only in order supplier (#28546) (#28619)
FIX: SQL syntax error in DDLUpdateField
FIX: subscription must be editable when accounting isn't reconciled (#28469)
FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385)
FIX: Supplier Order search on date valid (#30448)
FIX: supplier price duplicate entry on update supplier product ref (#29290)
FIX: syntax error
FIX: TakePOS | Add product / Delete line of existing invoice
FIX: Ticket new message notification sent twice
FIX: transfer in accountancy for expense reports.
FIX: Unsigned propal having signing date (#29825)
FIX: Update asset.class.php
FIX: update date_echeance of supplier invoices when we update invoice date in the past (#29886)
FIX: use $conf->browser->os instead
FIX: use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165)
FIX: User List - Function is show in wrong column when module HRM enabled (#30186)
fix: when invoice is created by WORKFLOW_ORDER_AUTOCREATE_INVOICE on ORDER_NEW, the invoice must have the default bank account of the thirdparty is it's empty on order (#29462)
FIX: when qty is not an integer, apply price() (#31138)
FIX: Wrong currency shown in TakePOS payment page
FIX: wrong shortcut key for macintosh
FIX: wrong sql request with product category filter
FIX: wrong stock permission number
***** ChangeLog for 18.0.5 compared to 18.0.4 *****
FIX: 17.0: deprecated field should only be a fallback
FIX: 17.0 - php8 warnings: test for $field existence before checking if it is null or empty
@@ -825,7 +1105,7 @@ NEW: Accountancy - Quadratus export with attachments in accountancy export
NEW: Accountancy - Can filter on a custom group of accounts. Perf or ledger list.
NEW: Accountancy - Can select the export format during export of journals
NEW: Accountancy - sort of column of custom group of account
NEW: Can upload a file with drag and drop on purchase invoice, vats, salaries and social contributions
NEW: Can upload a file with drag and drop on purchase invoice, vats, salaries and social contributions
NEW: Authentication: #22740 add OpenID Connect impl
NEW: Authentication: add experimental support for Google OAuth2 connexion
NEW: Authentication: can now edit service name for OAuth token
@@ -907,7 +1187,7 @@ NEW: No overwrite of optionals during put() contact
NEW: Notifications: add Customer Order delivered (ORDER_NEW) in module Notification
NEW: Notifications: for Sign or Refused Propal from Online Page
NEW: Now we can edit amount on VAT and salaries clone action
NEW: only get opened contact from liste_contact function, to not have access to closed contact as mail receiver
NEW: only get open contact from liste_contact function, to not have access to closed contact as mail receiver
NEW: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
NEW: Option to manage deposit slips for more payment modes (not only
NEW: Option to show column for field and line selection on the left
@@ -1029,7 +1309,7 @@ Note that to find all the parameters that are encrypted into the setup database,
***** ChangeLog for 17.0.4 compared to 17.0.3 *****
FIX: $this->newref already exists and could have been modified by trigger but we still use a local variable for the filesystem-based renaming
FIX: $this->newref already exists and could have been modified by a trigger but we still use a local variable for the filesystem-based renaming
FIX: 16.0 only, backport fix for SQL error on global search product
FIX: 17.0: deprecated field should only be a fallback
FIX: 17.0 PHP8: supplier invoice class:

View File

@@ -172,7 +172,7 @@ $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom
*/
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';

View File

@@ -4,7 +4,7 @@
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
#
# This is list of constant you can set to have generated packages moved into a specific dir:
# This is list of constant you can set to have generated packages moved into a specific dir:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
@@ -18,10 +18,12 @@ use Term::ANSIColor;
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
$PUBLISHBETARC="$ENV{'DESTIASSOLOGIN'}\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
$PUBLISHSTABLE="$ENV{'DESTISFLOGIN'}\@frs.sourceforge.net:/home/frs/project/dolibarr";
# due to implicit origin on git commands, example
# implicit origin, lionel upstream, eric dolibarr
$GITREMOTENAME="$ENV{'GITREMOTENAME'}";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
%REQUIREMENTPUBLISH=(
@@ -36,7 +38,7 @@ $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/
"RPM_FEDORA"=>"rpmbuild",
"RPM_MANDRIVA"=>"rpmbuild",
"RPM_OPENSUSE"=>"rpmbuild",
"DEB"=>"dpkg dpatch",
"DEB"=>"dpkg",
"FLATPACK"=>"flatpack",
"EXEDOLIWAMP"=>"ISCC.exe",
"SNAPSHOT"=>"tar"
@@ -98,6 +100,13 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
exit 1;
}
if (! $ENV{"GITREMOTENAME"})
{
print "Error: environment variable GITREMOTENAME does not exist. You can set it to 'origin' or any other git remote name.\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
}
# Detect OS type
# --------------
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
@@ -129,7 +138,7 @@ if (! $TEMP || ! -d $TEMP) {
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 2;
}
}
$BUILDROOT="$TEMP/buildroot";
@@ -172,7 +181,7 @@ $newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/1/gi; # dev
$newbuild =~ s/beta(.?)/2/gi; # beta (we want beta1, beta2, betax to be same package name)
$newbuild =~ s/rc(.?)/3/gi; # rc (we want rc1, rc2, rcx to be same package name)
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale is same than rc.
# now newbuild is 0-1 or 0-4 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
$build = $newbuild;
$build =~ s/-.*$//g;
@@ -190,8 +199,8 @@ for (0..@ARGV-1) {
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
if ($ARGV[$_] =~ /^-*desti=(.+)/i) { $DESTI=$1; }
if ($ARGV[$_] =~ /^-*prefix=(.+)/i) {
$PREFIX=$1;
$FILENAMESNAPSHOT.="-".$PREFIX;
$PREFIX=$1;
$FILENAMESNAPSHOT.="-".$PREFIX;
}
}
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTIBETARC is defined
@@ -210,7 +219,7 @@ print "Target directory (DESTI) : $DESTI\n";
# Choose package targets
#-----------------------
if ($target) {
if ($target eq "ALL") {
if ($target eq "ALL") {
foreach my $key (@LISTETARGET) {
if ($key ne 'SNAPSHOT' && $key ne 'SF' && $key ne 'ASSO') { $CHOOSEDTARGET{$key}=1; }
}
@@ -236,10 +245,10 @@ else {
printf(" %2d - %-14s (%s)\n",$cpt,"ASSO (publish)","Need ".$REQUIREMENTPUBLISH{"ASSO"});
$cpt=99;
printf(" %2d - %-14s (%s)\n",$cpt,"SF (publish)","Need ".$REQUIREMENTPUBLISH{"SF"});
# Ask which target to build
print "Choose one target number or several separated with space (0 - ".$cpt."): ";
$NUM_SCRIPT=<STDIN>;
$NUM_SCRIPT=<STDIN>;
chomp($NUM_SCRIPT);
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
{
@@ -286,11 +295,11 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
exit;
}
$atleastonerpm=1;
}
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
$atleastonerpm=1;
}
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
{
# Test
# Test
print "Test requirement for target $target: Search '$req'... ";
$newreq=$req; $newparam='';
if ($newreq eq 'zip') { $newparam.='-h'; }
@@ -299,12 +308,12 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
print "Test command ".$cmd."... ";
$ret=`$cmd`;
$coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
# Not found error, we try in PROGPATH
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
$REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req";
}
}
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/))) {
# Not found error
@@ -333,7 +342,7 @@ $nbofpublishneedchangelog=0;
foreach my $target (sort keys %CHOOSEDTARGET) {
if ($target eq '-CHKSUM') { $nbofpublishneedchangelog++; }
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
{
$nboftargetneedbuildroot++;
}
@@ -397,10 +406,10 @@ if ($nboftargetok) {
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
$ret=`git ls-files . --exclude-standard --others`;
if ($ret)
{
@@ -409,12 +418,16 @@ if ($nboftargetok) {
print "Canceled.\n";
exit;
}
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n";
# Copy to final dir
$NEWDESTI=$DESTI;
if ( !-d "$NEWDESTI/signatures" ) {
use File::Path qw( make_path );
make_path "$NEWDESTI/signatures" or die "Failed to create path: $NEWDESTI/signatures";
}
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
use File::Copy qw(copy);
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
@@ -427,32 +440,32 @@ if ($nboftargetok) {
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
if ($ret =~ /(already exists|existe déjà)/)
{
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
$QUESTIONOVERWRITETAG=<STDIN>;
$QUESTIONOVERWRITETAG=<STDIN>;
chomp($QUESTIONOVERWRITETAG);
if ($QUESTIONOVERWRITETAG =~ /(o|y)/)
{
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
print 'Run git push -f --tags'."\n";
$ret=`git push -f --tags`;
print 'Run git push $GITREMOTENAME -f --tags'."\n";
$ret=`git push $GITREMOTENAME -f --tags`;
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
}
}
else
{
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
print 'Run git push $GITREMOTENAME --tags'."\n";
$ret=`git push $GITREMOTENAME --tags`;
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
}
chdir("$olddir");
}
# Update buildroot if required
#-----------------------------
if ($nboftargetneedbuildroot)
@@ -462,7 +475,7 @@ if ($nboftargetok) {
print "Delete directory $BUILDROOT\n";
$ret=`rm -fr "$BUILDROOT"`;
mkdir "$BUILDROOT";
mkdir "$BUILDROOT/$PROJECT";
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
@@ -488,7 +501,7 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/README-*.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`;
@@ -557,20 +570,20 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot11.png`;
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
# Security to avoid to package data files
# Security to avoid to package data files
print "Remove documents dir\n";
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
# Removed known external modules to avoid any error when packaging from env where external modules are tested
# Removed known external modules to avoid any error when packaging from env where external modules are tested
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/abricot*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
@@ -596,15 +609,15 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/common/fontawesome-5/svgs`;
# Removed other test files
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
# Removed files installed by the awful composer
# Removed files installed by the awful composer
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
@@ -639,7 +652,7 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/bin`;
@@ -649,14 +662,14 @@ if ($nboftargetok) {
# Build package for each target
#------------------------------
foreach my $target (sort keys %CHOOSEDTARGET)
foreach my $target (sort keys %CHOOSEDTARGET)
{
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target eq '-CHKSUM') { next; }
print "\nBuild package for target $target\n";
if ($target eq 'SNAPSHOT')
if ($target eq 'SNAPSHOT')
{
$NEWDESTI=$DESTI;
@@ -680,13 +693,13 @@ if ($nboftargetok) {
next;
}
if ($target eq 'TGZ')
if ($target eq 'TGZ')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
print "Remove target $FILENAMETGZ.tgz...\n";
@@ -700,7 +713,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/build/exe`;
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" $FILENAMETGZ";
print "$cmd\n";
@@ -712,14 +725,14 @@ if ($nboftargetok) {
next;
}
if ($target eq 'XZ')
if ($target eq 'XZ')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
}
print "Remove target $FILENAMEXZ.xz...\n";
unlink("$NEWDESTI/$FILENAMEXZ.xz");
@@ -732,7 +745,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/build/exe`;
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
print "Compress $FILENAMEXZ into $FILENAMEXZ.xz...\n";
print "Go to directory $BUILDROOT\n";
@@ -748,15 +761,15 @@ if ($nboftargetok) {
$ret=`mv "$BUILDROOT/$FILENAMEXZ.xz" "$NEWDESTI/$FILENAMEXZ.xz"`;
next;
}
if ($target eq 'ZIP')
if ($target eq 'ZIP')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
}
}
print "Remove target $FILENAMEZIP.zip...\n";
unlink("$NEWDESTI/$FILENAMEZIP.zip");
@@ -779,14 +792,14 @@ if ($nboftargetok) {
print $cmd."\n";
$ret= `$cmd`;
chdir("$olddir");
# Move to final dir
print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`;
next;
}
if ($target =~ /RPM/) # Linux only
if ($target =~ /RPM/) # Linux only
{
$NEWDESTI=$DESTI;
$subdir="package_rpm_generic";
@@ -797,7 +810,7 @@ if ($nboftargetok) {
{
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
}
}
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
@@ -810,7 +823,7 @@ if ($nboftargetok) {
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
$ret=`$cmd`;
@@ -827,6 +840,7 @@ if ($nboftargetok) {
print "Compress $FILENAMETGZ2 into $FILENAMETGZ2.tgz...\n";
$ret=`tar --exclude-from "$SOURCE/build/tgz/tar_exclude.txt" --directory "$BUILDROOT" -czvf "$BUILDROOT/$FILENAMETGZ2.tgz" $FILENAMETGZ2`;
if (! -d $RPMDIR . '/SOURCES') { mkdir($RPMDIR . '/SOURCES'); }
print "Move $BUILDROOT/$FILENAMETGZ2.tgz to $RPMDIR/SOURCES/$FILENAMETGZ2.tgz\n";
$cmd="mv $BUILDROOT/$FILENAMETGZ2.tgz $RPMDIR/SOURCES/$FILENAMETGZ2.tgz";
$ret=`$cmd`;
@@ -836,7 +850,7 @@ if ($nboftargetok) {
if ($target =~ /FEDO/i) { $BUILDFICSRC="${FILENAME}_fedora.spec"; }
if ($target =~ /MAND/i) { $BUILDFICSRC="${FILENAME}_mandriva.spec"; }
if ($target =~ /OPEN/i) { $BUILDFICSRC="${FILENAME}_opensuse.spec"; }
use Date::Language;
$lang=Date::Language->new('English');
$datestring = $lang->time2str("%a %b %e %Y", time);
@@ -854,7 +868,7 @@ if ($nboftargetok) {
}
close SPECFROM;
close SPECTO;
print "Copy patch file to $RPMDIR/SOURCES\n";
$ret=`cp "$SOURCE/build/rpm/dolibarr-forrpm.patch" "$RPMDIR/SOURCES"`;
$ret=`chmod 644 $RPMDIR/SOURCES/dolibarr-forrpm.patch`;
@@ -876,14 +890,14 @@ if ($nboftargetok) {
next;
}
if ($target eq 'DEB')
if ($target eq 'DEB')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/package_debian-ubuntu');
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
}
}
$olddir=getcwd();
@@ -964,13 +978,18 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/select2/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
# Removed files we don't need (already removed)
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.codeclimate.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.pre-commit-config.yaml`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/.vscode`;
$ret=`find $BUILDROOT/$PROJECT.tmp/ -type f -name '.editorconfig' -exec rm {} \\;`;
$ret=`find $BUILDROOT/$PROJECT.tmp/ -type f -name '.travis.yml' -exec rm {} \\;`;
# Rename upstream changelog to match debian rules
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
# Prepare source package (init debian dir)
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
@@ -1008,7 +1027,7 @@ if ($nboftargetok) {
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
# Set owners and permissions
#print "Set owners on files/dir\n";
#$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
@@ -1039,8 +1058,8 @@ if ($nboftargetok) {
$ret=`$cmd`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
$ret=`$cmd`;
print "Rename directory $BUILDROOT/$PROJECT.tmp into $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
$ret=`$cmd`;
@@ -1048,14 +1067,14 @@ if ($nboftargetok) {
print "Go into directory $BUILDROOT\n";
chdir("$BUILDROOT");
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
print $cmd."\n";
$ret=`$cmd`;
# Creation of source package
# Creation of source package
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
#$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
@@ -1074,12 +1093,12 @@ if ($nboftargetok) {
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next;
}
if ($target eq 'EXEDOLIWAMP')
{
$NEWDESTI=$DESTI;
@@ -1087,22 +1106,22 @@ if ($nboftargetok) {
{
mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
}
}
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
if ($OS eq 'windows') {
print "Check that ISCC.exe is in your PATH.\n";
} else {
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
}
$SOURCEBACK=$SOURCE;
$SOURCEBACK =~ s/\//\\/g;
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!;
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
@@ -1115,7 +1134,7 @@ if ($nboftargetok) {
close(OUT);
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
if ($OS eq 'windows') {
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
} else {
@@ -1129,26 +1148,26 @@ if ($nboftargetok) {
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
use File::Copy;
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
next;
}
}
# Publish package for each target
#--------------------------------
foreach my $target (sort keys %CHOOSEDPUBLISH)
foreach my $target (sort keys %CHOOSEDPUBLISH)
{
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
print "\nList of files to publish (BUILD=$BUILD)\n";
%filestoscansf=(
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'none', # none means it won't be published on SF
@@ -1171,7 +1190,8 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
@@ -1206,26 +1226,26 @@ if ($nboftargetok) {
print "\n";
}
if ($target eq 'SF' || $target eq 'ASSO')
if ($target eq 'SF' || $target eq 'ASSO')
{
print "\n";
if ($target eq 'SF') { $PUBLISH = $PUBLISHSTABLE; }
if ($target eq 'ASSO' && $BUILD =~ /[a-z]/i) { $PUBLISH = $PUBLISHBETARC.'/lastbuild'; }
if ($target eq 'ASSO' && $BUILD =~ /^[0-9]+$/) { $PUBLISH = $PUBLISHBETARC.'/stable'; }
$NEWPUBLISH=$PUBLISH;
print "Publish to target $NEWPUBLISH. Click enter or CTRL+C...\n";
# Ask which target to build
$NUM_SCRIPT=<STDIN>;
$NUM_SCRIPT=<STDIN>;
chomp($NUM_SCRIPT);
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
$ret=`mkdir -p "/tmp/emptydir/"`;
%filestoscan=%filestoscansf;
foreach my $file (sort keys %filestoscan)
{
$found=0;
@@ -1235,30 +1255,30 @@ if ($nboftargetok) {
if ($target eq 'SF') {
if ($filestoscan{$file} eq 'none') {
next;
}
}
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
}
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
$destFolder="$NEWPUBLISH/$filestoscanstableasso{$file}";
}
}
elsif ($target eq 'ASSO' and $NEWPUBLISH !~ /stable/) {
$destFolder="$NEWPUBLISH";
}
}
else # No more used
{
$dirnameonly=$file;
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
$filenameonly=$file;
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
$destFolder="$NEWPUBLISH/$dirnameonly";
}
print "\n";
print "Publish file ".$file." to ".$destFolder."\n";
# mkdir
# mkdir
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
#$ssh->login("$user","$pass");
#$ssh->login("$user","$pass");
#use String::ShellQuote qw( shell_quote );
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
@@ -1267,20 +1287,20 @@ if ($nboftargetok) {
#$sftp->mkdir($destFolder)
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
#print "$command\n";
#print "$command\n";
#my $ret=`$command 2>&1`;
$command="rsync -s -e 'ssh' --recursive /tmp/emptydir/ \"".$destFolder."\"";
print "$command\n";
print "$command\n";
my $ret=`$command 2>&1`;
$command="rsync -s -e 'ssh' \"$file\" \"".$destFolder."\"";
print "$command\n";
print "$command\n";
my $ret2=`$command 2>&1`;
print "$ret2\n";
}
}
}
}
}
print "\n----- Summary -----\n";

View File

@@ -6,7 +6,7 @@ of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE versi
***** Prerequisites For Linux *****
Prerequisites to build tgz, debian and rpm packages:
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
> apt-get install perl tar dpkg p7zip-full rpm zip php-cli debhelper po-debconf
Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
> apt-get install wine q4wine
@@ -14,11 +14,11 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
> Install InnoSetup
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
> Add path to ISCC into PATH windows var:
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
@@ -32,8 +32,8 @@ Prerequisites to build autoexe DoliWamp package from Windows:
> Install Microsoft Visual C++ Redistributable 2017 (https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170)
> Install WampServer-3.2.6-64.exe (Apache 2.4.51, PHP 7.4.26, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
> Install Dolibarr current version:
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
> Install Dolibarr current version:
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
> Add the path of PHP (C:\wamp64\bin\php\php7.4.26) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
@@ -45,11 +45,10 @@ Prerequisites to build autoexe DoliWamp package from Windows:
***** Actions to do a BETA *****
This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step.
This section describes steps made by Dolibarr packaging team to make a beta version of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in ChangeLog, for this you can:
- Update version/info in ChangeLog, for this you can:
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "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/aaa"
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | 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/aaa"
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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/aaa"
@@ -70,8 +69,7 @@ Recopy the content of the output file into the file ChangeLog.
***** Actions to do a RELEASE *****
This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step.
This section describes steps made by Dolibarr packaging team to make a complete release of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in ChangeLog, for this you can:
@@ -87,9 +85,9 @@ Recopy the content of the output file into the file ChangeLog.
- Check content of built packages.
- Run makepack-dolibarr.pl again with option to publish files on
- Run makepack-dolibarr.pl again with option to publish files on
dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org).
- Run makepack-dolibarr.pl again with option to publish files on
- Run makepack-dolibarr.pl again with option to publish files on
sourceforge. This will also add official tag.
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
on server to point to new files (used by some web sites).

View File

@@ -3,6 +3,13 @@
.git
.gitignore
.scrutinizer.yml
.travis.yml
.vscode
.idea
.editorconfig
.codeclimate.yml
.pre-commit-config.yaml
.mailmap
Thumbs.db
build/exe
build/html

View File

@@ -22,3 +22,9 @@ dolibarr*.deb
dolibarr*.zip
cvschangelogbuilder_dolibarr*
dolibarr_install.log
.travis.yml
.vscode
.idea
.editorconfig
.codeclimate.yml
.pre-commit-config.yaml

View File

@@ -31,7 +31,7 @@ Replace:
d.items&&
With
d&&d.items&&
ESCPOS:
-------
@@ -55,8 +55,8 @@ NUSOAP:
* Line 1257 of file nusoap.php. Add:
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
* Line 4346 of file nusoap.php
$rev = array();
@@ -128,30 +128,43 @@ with
if (!@TCPDF_STATIC::file_exists($file)) {
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
//return false;
//return false;
$tfile = str_replace(' ', '%20', $file);
if (@TCPDF_STATIC::file_exists($tfile)) {
$file = $tfile;
}
}
* Replace in tcpdf.php:
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
if ($imgsrc[0] === '@') {
// data stream
$imgsrc = '@'.base64_decode(substr($imgsrc, 1));
$type = '';
} else {
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
with
// @CHANGE LDR Add support for src="file://..." links
if (strpos($imgsrc, 'file://') === 0) {
$imgsrc = str_replace('file://', '/', $imgsrc);
$imgsrc = urldecode($imgsrc);
$testscrtype = @parse_url($imgsrc);
if (empty($testscrtype['query'])) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
}
}
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
$reg = array(); // @CHANGE DOL support 'data:' URLs (tcpdf backport https://github.com/tecnickcom/TCPDF/pull/552)
if ($imgsrc[0] === '@') {
// data stream
$imgsrc = '@'.base64_decode(substr($imgsrc, 1));
$type = '';
} elseif (preg_match('@^data:image/([^;]*);base64,(.*)@', $imgsrc, $reg)) { // @CHANGE DOL support 'data:' URLs (tcpdf backport https://github.com/tecnickcom/TCPDF/pull/552)
$imgsrc = '@'.base64_decode($reg[2]); // @CHANGE DOL support 'data:' URLs (tcpdf backport https://github.com/tecnickcom/TCPDF/pull/552)
$type = $reg[1]; // @CHANGE DOL support 'data:' URLs (tcpdf backport https://github.com/tecnickcom/TCPDF/pull/552)
} else {
// @CHANGE LDR Add support for src="file://..." links
if (strpos($imgsrc, 'file://') === 0) {
$imgsrc = str_replace('file://', '/', $imgsrc);
$imgsrc = urldecode($imgsrc);
$testscrtype = @parse_url($imgsrc);
if (empty($testscrtype['query'])) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
}
} elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace:
@@ -174,7 +187,7 @@ with
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
into
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);
* Removed useless directories ("examples", "tools")
* Optionnaly, removed all fonts except
@@ -243,7 +256,7 @@ with:
with
foreach ($value[1] as $k => $v) {
* Fix by replacing
* Fix by replacing
if ($res[0] == PDF_TYPE_OBJECT)
with
if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT)
@@ -261,11 +274,11 @@ with
* Replace
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
with
with
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
vTmpNode.setAttribute('href',vTaskList[i].getLink());
* Replace '% Comp.' to have a smaller text column header
'comp':'% Comp.'
with
@@ -307,19 +320,19 @@ RESTLER:
// @CHANGE LDR
if (!is_string($haystack)) return false;
* Replace
* Replace
$loaders = array_unique(static::$rogueLoaders);
with
with
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
* Replace CommentParser.php line 423
elseif (count($value) && is_numeric($value[0]))
with
elseif (count($value) && isset($value[0]) && is_numeric($value[0]))
* Add CommentParser.php line 406 & 407 to remove a warning on api request in php 8.1
@@ -417,5 +430,3 @@ Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug:
.select2-hidden-accessible {
margin: -10000px !important; /* line to restore */
}

View File

@@ -133,7 +133,7 @@
<rule ref="Generic.Formatting.SpaceAfterCast" />
<rule ref="Generic.Functions.CallTimePassByReference" />
<!-- <rule ref="Generic.Functions.CallTimePassByReference" /> -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />

View File

@@ -87,7 +87,7 @@ $tablib[32] = "DictionaryAccountancyCategory";
// Requests to extract data
$tabsql = array();
$tabsql[32] = "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
$tabsql[32] = "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid AND c.active=1 AND a.entity IN (".getEntity('c_accounting_category').")";
// Criteria to sort dictionaries
$tabsqlsort = array();
@@ -99,11 +99,11 @@ $tabfield[32] = "code,label,range_account,category_type,formula,position,country
// Name of editing fields for record modification
$tabfieldvalue = array();
$tabfieldvalue[32] = "code,label,range_account,category_type,formula,position,country_id";
$tabfieldvalue[32] = "code,label,range_account,category_type,formula,position,country_id,entity";
// Name of the fields in the table for inserting a record
$tabfieldinsert = array();
$tabfieldinsert[32] = "code,label,range_account,category_type,formula,position,fk_country";
$tabfieldinsert[32] = "code,label,range_account,category_type,formula,position,fk_country,entity";
// Name of the rowid if the field is not of type autoincrement
// Example: "" if id field is "rowid" and has autoincrement on
@@ -903,7 +903,7 @@ if ($resql) {
// Active
print '<td class="center" class="nowrap">';
if ($canbedisabled) {
print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
print '<a href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
} else {
print $langs->trans("AlwaysActive");
}

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
/* Copyright (C) 2013-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
@@ -123,7 +123,7 @@ if ($result) {
$newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
if (empty($reshook)) {
$newcardbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->hasRight('accounting', 'fiscalyear', 'write'));
$newcardbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/accountancy/admin/fiscalyear_card.php?action=create', '', $user->hasRight('accounting', 'fiscalyear', 'write'));
}
$title = $langs->trans('AccountingPeriods');

View File

@@ -197,6 +197,9 @@ if (empty($reshook)) {
$filter['t.reconciled_option'] = $search_not_reconciled;
$param .= '&search_not_reconciled='.urlencode($search_not_reconciled);
}
if (!empty($show_subgroup)) {
$param .= '&show_subgroup='.urlencode($show_subgroup);
}
// param with type of list
$url_param = substr($param, 1); // remove first "&"
@@ -302,7 +305,7 @@ if ($action != 'export_csv') {
$newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
if (empty($reshook)) {
$newcardbutton = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' (' . getDolGlobalString('ACCOUNTING_EXPORT_FORMAT').')" />';
$newcardbutton .= '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' (' . getDolGlobalString('ACCOUNTING_EXPORT_FORMAT').')" />';
print '<script type="text/javascript">
jQuery(document).ready(function() {

View File

@@ -349,7 +349,7 @@ if (empty($reshook)) {
$listofaccountsforgroup2 = array();
if (is_array($listofaccountsforgroup)) {
foreach ($listofaccountsforgroup as $tmpval) {
$listofaccountsforgroup2[] = "'".$db->escape($tmpval['id'])."'";
$listofaccountsforgroup2[] = "'".$db->escape($tmpval['account_number'])."'";
}
}
$filter['t.search_accounting_code_in'] = join(',', $listofaccountsforgroup2);

View File

@@ -337,7 +337,7 @@ if (empty($reshook)) {
$listofaccountsforgroup2 = array();
if (is_array($listofaccountsforgroup)) {
foreach ($listofaccountsforgroup as $tmpval) {
$listofaccountsforgroup2[] = "'".$db->escape($tmpval['id'])."'";
$listofaccountsforgroup2[] = "'".$db->escape($tmpval['account_number'])."'";
}
}
$filter['t.search_accounting_code_in'] = join(',', $listofaccountsforgroup2);

View File

@@ -292,7 +292,7 @@ if (empty($reshook)) {
$listofaccountsforgroup2 = array();
if (is_array($listofaccountsforgroup)) {
foreach ($listofaccountsforgroup as $tmpval) {
$listofaccountsforgroup2[] = "'".$db->escape($tmpval['id'])."'";
$listofaccountsforgroup2[] = "'".$db->escape($tmpval['account_number'])."'";
}
}
$filter['t.search_accounting_code_in'] = join(',', $listofaccountsforgroup2);
@@ -676,7 +676,7 @@ if ($reshook < 0) {
$newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
if (empty($reshook)) {
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
if ($type == 'sub') {
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly'));
$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 btnTitleSelected'));
@@ -976,6 +976,21 @@ $totalarray['val']['totaldebit'] = 0;
$totalarray['val']['totalcredit'] = 0;
$totalarray['val']['totalbalance']=0;
$colspan = 0; // colspan before field 'label of operation'
$colspanend = 3; // colspan after debit/credit
if (!empty($arrayfields['t.piece_num']['checked'])) { $colspan++; }
if (!empty($arrayfields['t.code_journal']['checked'])) { $colspan++; }
if (!empty($arrayfields['t.doc_date']['checked'])) { $colspan++; }
if (!empty($arrayfields['t.doc_ref']['checked'])) { $colspan++; }
if (!empty($arrayfields['t.label_operation']['checked'])) { $colspan++; }
if (!empty($arrayfields['t.date_export']['checked'])) { $colspanend++; }
if (!empty($arrayfields['t.date_validated']['checked'])) { $colspanend++; }
if (!empty($arrayfields['t.lettering_code']['checked'])) { $colspanend++; }
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$colspan++;
$colspanend--;
}
while ($i < min($num, $limit)) {
$line = $object->lines[$i];
@@ -1104,8 +1119,6 @@ while ($i < min($num, $limit)) {
//if (empty($displayed_account_number)) $displayed_account_number='-';
$sous_total_debit = 0;
$sous_total_credit = 0;
$colspan = 0;
}
print '<tr class="oddeven">';

View File

@@ -968,7 +968,7 @@ class AccountancyExport
// We need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part
// $tab['num_piece3'] = str_pad(self::trunc($line->piece_num, 10), 10);
$tab['num_piece3'] = substr(self::trunc($line->doc_ref, 20), -10);
$tab['num_piece3'] = str_pad(substr(self::trunc($line->doc_ref, 20), -10), 10);
$tab['reserved'] = str_repeat(' ', 10); // position 159
$tab['currency_amount'] = str_repeat(' ', 13); // position 169
// get document file

View File

@@ -113,12 +113,12 @@ class AccountancyImport
/**
* Compute direction
* Compute direction
*
* @param array $arrayrecord Array of read values: [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string), [fieldpos+1]...
* @param array $listfields Fields list to add
* @param int $record_key Record key
* @return mixed Value
* @return string Value D or C or ""
*/
public function computeDirection(&$arrayrecord, $listfields, $record_key)
{
@@ -132,9 +132,9 @@ class AccountancyImport
$sens = 'C';
}
return "'" . $this->db->escape($sens) . "'";
return $sens;
}
return "''";
return "";
}
}

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2015-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2024 Jose MARTINEZ <jose.martinez@pichinov.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
@@ -26,6 +27,7 @@
// Class
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
@@ -327,7 +329,7 @@ class BookKeeping extends CommonObject
$this->piece_num = 0;
// First check if line not yet already in bookkeeping.
// Note that we must include 'doc_type - fk_doc - numero_compte - label' to be sure to have unicity of line (because we may have several lines
// Note that we must include 'doc_type - fk_doc - numero_compte - label - subledger_account (if not empty)' to be sure to have unicity of line (because we may have several lines
// with same doc_type, fk_doc, numero_compte for 1 invoice line when using localtaxes with same account)
// WARNING: This is not reliable, label may have been modified. This is just a small protection.
// The page that make transfer make the test on couple (doc_type - fk_doc) only.
@@ -341,6 +343,9 @@ class BookKeeping extends CommonObject
}
$sql .= " AND numero_compte = '".$this->db->escape($this->numero_compte)."'";
$sql .= " AND label_operation = '".$this->db->escape($this->label_operation)."'";
if (!empty($this->subledger_account)) {
$sql .= " AND subledger_account = '".$this->db->escape($this->subledger_account)."'";
}
$sql .= " AND entity = ".$conf->entity; // Do not use getEntity for accounting features
$resql = $this->db->query($sql);
@@ -1008,7 +1013,7 @@ class BookKeeping extends CommonObject
$line->multicurrency_amount = $obj->multicurrency_amount;
$line->multicurrency_code = $obj->multicurrency_code;
$line->lettering_code = $obj->lettering_code;
$line->date_lettering = $obj->date_lettering;
$line->date_lettering = $this->db->jdate($obj->date_lettering);
$line->fk_user_author = $obj->fk_user_author;
$line->import_key = $obj->import_key;
$line->code_journal = $obj->code_journal;
@@ -1109,7 +1114,7 @@ class BookKeeping extends CommonObject
$sqlwhere[] = natural_search($key, $value, 1, 1);
} elseif ($key == 't.code_journal' && !empty($value)) {
if (is_array($value)) {
$sqlwhere[] = natural_search("t.code_journal", join(',', $value), 3, 1);
$sqlwhere[] = natural_search("t.code_journal", (string) join(',', $value), 3, 1);
} else {
$sqlwhere[] = natural_search("t.code_journal", $value, 3, 1);
}
@@ -1160,7 +1165,7 @@ class BookKeeping extends CommonObject
$line->amount = $obj->amount;
$line->sens = $obj->sens;
$line->lettering_code = $obj->lettering_code;
$line->date_lettering = $obj->date_lettering;
$line->date_lettering = $this->db->jdate($obj->date_lettering);
$line->fk_user_author = $obj->fk_user_author;
$line->import_key = $obj->import_key;
$line->code_journal = $obj->code_journal;
@@ -1455,6 +1460,7 @@ class BookKeeping extends CommonObject
*/
public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '')
{
global $conf;
$error = 0;
$sql_filter = $this->getCanModifyBookkeepingSQL();
@@ -1467,6 +1473,7 @@ class BookKeeping extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element.$mode;
$sql .= " SET ".$field." = ".(is_numeric($value) ? ((float) $value) : "'".$this->db->escape($value)."'");
$sql .= " WHERE piece_num = ".((int) $piece_num);
$sql .= " AND entity = " . ((int) $conf->entity);
$sql .= $sql_filter;
$resql = $this->db->query($sql);
@@ -2251,7 +2258,7 @@ class BookKeeping extends CommonObject
dol_syslog(get_class($this)."::select_account", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$obj = '';
$obj = (object) array('label' => '');
if ($this->db->num_rows($resql)) {
$obj = $this->db->fetch_object($resql);
}
@@ -2692,10 +2699,8 @@ class BookKeeping extends CommonObject
$sql = 'SELECT';
$sql .= " t.numero_compte,";
$sql .= " t.label_compte,";
if ($separate_auxiliary_account) {
$sql .= " t.subledger_account,";
$sql .= " t.subledger_label,";
$sql .= " NULLIF(t.subledger_account, '') as subledger_account,"; // fix db issues with Null or "" values
}
$sql .= " aa.pcg_type,";
$sql .= " (SUM(t.credit) - SUM(t.debit)) as opening_balance";
@@ -2707,10 +2712,11 @@ class BookKeeping extends CommonObject
$sql .= ' AND aa.pcg_type IN (' . $this->db->sanitize(implode(',', $pcg_type_filter), 1) . ')';
$sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($fiscal_period->date_start) . "'";
$sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($fiscal_period->date_end) . "'";
$sql .= ' GROUP BY t.numero_compte, t.label_compte, aa.pcg_type';
$sql .= ' GROUP BY t.numero_compte, aa.pcg_type';
if ($separate_auxiliary_account) {
$sql .= ' ,t.subledger_account, t.subledger_label';
$sql .= " , NULLIF(t.subledger_account, '')";
}
$sql .= ' HAVING (SUM(t.credit) - SUM(t.debit)) != 0 '; // Exclude rows with opening_balance = 0
$sql .= $this->db->order("t.numero_compte", "ASC");
$resql = $this->db->query($sql);
@@ -2732,23 +2738,38 @@ class BookKeeping extends CommonObject
$bookkeeping = new BookKeeping($this->db);
$bookkeeping->doc_date = $new_fiscal_period->date_start;
$bookkeeping->date_lim_reglement = '';
$bookkeeping->doc_ref = $new_fiscal_period->label;
$bookkeeping->doc_ref = $fiscal_period->label;
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'closure';
$bookkeeping->fk_doc = $new_fiscal_period->id;
$bookkeeping->fk_doc = $fiscal_period->id;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = '';
if ($separate_auxiliary_account) {
$bookkeeping->subledger_account = $obj->subledger_account;
$bookkeeping->subledger_label = $obj->subledger_label;
$sql = 'SELECT';
$sql .= " subledger_label";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE subledger_account = '" . $this->db->escape($obj->subledger_account) . "'";
$sql .= " ORDER BY doc_date DESC";
$sql .= " LIMIT 1";
$result = $this->db->query($sql);
if (!$result) {
$this->errors[] = 'Error: ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
$error++;
}
$objtmp = $this->db->fetch_object($result);
$bookkeeping->subledger_label = $objtmp->subledger_label; // latest subledger label used
} else {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->subledger_account = null;
$bookkeeping->subledger_label = null;
}
$bookkeeping->numero_compte = $obj->numero_compte;
$bookkeeping->label_compte = $obj->label_compte;
$accountingaccount = new AccountingAccount($this->db);
$accountingaccount->fetch('', $obj->numero_compte);
$bookkeeping->label_compte = $accountingaccount->label; // latest account label used
$bookkeeping->label_operation = $new_fiscal_period->label;
$bookkeeping->montant = $mt;
@@ -2779,20 +2800,32 @@ class BookKeeping extends CommonObject
$bookkeeping = new BookKeeping($this->db);
$bookkeeping->doc_date = $new_fiscal_period->date_start;
$bookkeeping->date_lim_reglement = '';
$bookkeeping->doc_ref = $new_fiscal_period->label;
$bookkeeping->doc_ref = $fiscal_period->label;
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'closure';
$bookkeeping->fk_doc = $new_fiscal_period->id;
$bookkeeping->fk_doc = $fiscal_period->id;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = '';
if ($separate_auxiliary_account) {
$bookkeeping->subledger_label = '';
$bookkeeping->subledger_account = $obj->subledger_account;
$bookkeeping->subledger_label = $obj->subledger_label;
$sql = 'SELECT';
$sql .= " subledger_label";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE subledger_account = '" . $this->db->escape($obj->subledger_account) . "'";
$sql .= " ORDER BY doc_date DESC";
$sql .= " LIMIT 1";
$result = $this->db->query($sql);
if (!$result) {
$this->errors[] = 'Error: ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
$error++;
}
$objtmp = $this->db->fetch_object($result);
$bookkeeping->subledger_label = $objtmp->subledger_label ?? null; // latest subledger label used
} else {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->subledger_account = null;
$bookkeeping->subledger_label = null;
}
$bookkeeping->numero_compte = $accountingaccount->account_number;

View File

@@ -586,7 +586,7 @@ class Lettering extends BookKeeping
$grouped_lines = array();
foreach (self::$doc_type_infos as $doc_type => $doc_type_info) {
if (!is_array($bookkeeping_lines_by_type[$doc_type])) {
if (empty($bookkeeping_lines_by_type[$doc_type]) || !is_array($bookkeeping_lines_by_type[$doc_type])) {
continue;
}

View File

@@ -361,29 +361,32 @@ foreach ($tabfac as $key => $val) { // Loop on each invoice
}
*/
// New way, single query, load all unbound lines
$sql = "
SELECT
fk_facture_fourn,
COUNT(fd.rowid) as nb
FROM
llx_facture_fourn_det as fd
WHERE
fd.product_type <= 2
AND fd.fk_code_ventilation <= 0
AND fd.total_ttc <> 0
AND fk_facture_fourn IN (".$db->sanitize(join(",", array_keys($tabfac))).")
GROUP BY fk_facture_fourn
";
$resql = $db->query($sql);
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->nb > 0) {
$errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound';
if (!empty($tabfac)) {
$sql = "
SELECT
fk_facture_fourn,
COUNT(fd.rowid) as nb
FROM
llx_facture_fourn_det as fd
WHERE
fd.product_type <= 2
AND fd.fk_code_ventilation <= 0
AND fd.total_ttc <> 0
AND fk_facture_fourn IN (".$db->sanitize(join(",", array_keys($tabfac))).")
GROUP BY fk_facture_fourn
";
$resql = $db->query($sql);
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->nb > 0) {
$errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound';
}
$i++;
}
$i++;
}
//var_dump($errorforinvoice);exit;

View File

@@ -225,6 +225,14 @@ if ($result) {
$vatdata = $vatdata_cache[$tax_id];
} else {
$vatdata = getTaxesFromId($tax_id, $mysoc, $mysoc, 0);
if (getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC')) {
$buyer = new Societe($db);
$buyer->fetch($obj->socid);
} else {
$buyer = null; // We don't need the buyer in this case
}
$seller = $mysoc;
$vatdata = getTaxesFromId($tax_id, $buyer, $seller, 0);
$vatdata_cache[$tax_id] = $vatdata;
}
$compta_tva = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
@@ -382,29 +390,31 @@ foreach ($tabfac as $key => $val) { // Loop on each invoice
*/
// New way, single query, load all unbound lines
$sql = "
SELECT
fk_facture,
COUNT(fd.rowid) as nb
FROM
".MAIN_DB_PREFIX."facturedet as fd
WHERE
fd.product_type <= 2
AND fd.fk_code_ventilation <= 0
AND fd.total_ttc <> 0
AND fk_facture IN (".$db->sanitize(join(",", array_keys($tabfac))).")
GROUP BY fk_facture
";
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->nb > 0) {
$errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound';
if (!empty($tabfac)) {
$sql = "
SELECT
fk_facture,
COUNT(fd.rowid) as nb
FROM
".MAIN_DB_PREFIX."facturedet as fd
WHERE
fd.product_type <= 2
AND fd.fk_code_ventilation <= 0
AND fd.total_ttc <> 0
AND fk_facture IN (".$db->sanitize(join(",", array_keys($tabfac))).")
GROUP BY fk_facture
";
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->nb > 0) {
$errorforinvoice[$obj->fk_facture] = 'somelinesarenotbound';
}
$i++;
}
$i++;
}
}
//var_dump($errorforinvoice);exit;

View File

@@ -225,7 +225,7 @@ if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) {
print '<tr class="oddeven drag" id="trforcenature"><td>';
print $langs->trans("ForceMemberNature");
print '</td><td>';
$forcenature = getDolGlobalInt('MEMBER_NEWFORM_FORCEMORPHY', 0);
$forcenature = getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY'); // 'phy' or 'mor'
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
print "</td></tr>\n";

View File

@@ -358,7 +358,13 @@ class Members extends DolibarrApi
}
}
} else {
$member->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$member->array_options[$index] = $this->_checkValForAPI($field, $val, $member);
}
continue;
}
$member->$field = $this->_checkValForAPI($field, $value, $member);
}
}

View File

@@ -202,10 +202,15 @@ class MembersTypes extends DolibarrApi
$membertype->context['caller'] = $request_data['caller'];
continue;
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$membertype->array_options[$index] = $this->_checkValForAPI($field, $val, $membertype);
}
continue;
}
// Process the status separately because it must be updated using
// the validate(), resiliate() and exclude() methods of the class AdherentType.
$membertype->$field = $value;
$membertype->$field = $this->_checkValForAPI($field, $value, $membertype);
}
// If there is no error, update() returns the number of affected rows

View File

@@ -196,7 +196,13 @@ class Subscriptions extends DolibarrApi
continue;
}
$subscription->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$subscription->array_options[$index] = $this->_checkValForAPI($field, $val, $subscription);
}
continue;
}
$subscription->$field = $this->_checkValForAPI($field, $value, $subscription);
}
if ($subscription->update(DolibarrApiAccess::$user) > 0) {

View File

@@ -2114,6 +2114,11 @@ if ($id > 0) {
$canbemodified = 1;
}
if ($tabname[$id] == "c_product_nature" && in_array($obj->code, array(0, 1))) {
$canbedisabled = 0;
$canbemodified = 0;
$iserasable = 0;
}
// Build Url. The table is id=, the id of line is rowid=
$rowidcol = empty($tabrowid[$id]) ? 'rowid' : $tabrowid[$id];
// If rowidcol not defined

View File

@@ -43,7 +43,7 @@ if (!$user->admin) {
$usersignature = $user->signature;
// For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html.
if ($action == 'test' || ($action == 'send' && $trackid = 'test')) {
if ($action == 'test' || ($action == 'send' && $trackid == 'test')) {
$usersignature = dol_string_nohtmltag($usersignature, 2);
}

View File

@@ -1103,6 +1103,10 @@ if ($num) {
if (getDolGlobalString('MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES')) {
$fieldsforcontent[] = 'content_lines';
}
$parameters = array('fieldsforcontent' => &$fieldsforcontent, 'tabname' => $tabname[$id]);
$hookmanager->executeHooks('editEmailTemplateFieldsForContent', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
foreach ($fieldsforcontent as $tmpfieldlist) {
$showfield = 1;
$css = "left";

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2024 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2023 Juanjo Menent <jmenent@2byte.es>
@@ -267,6 +267,30 @@ if ($action == 'install' && $allowonlineinstall) {
}
}
/*
if (!$error) {
if (GETPOST('checkforcompliance')) {
$dir = $dirins;
$file = $modulenameval;
// $installedmodule
try {
$res = include_once $dir.$file; // A class already exists in a different file will send a non catchable fatal error.
$modName = substr($file, 0, dol_strlen($file) - 10);
if ($modName) {
if (class_exists($modName)) {
$objMod = new $modName($db);
'@phan-var-force DolibarrModules $objMod';
//var_dump($objMod);
}
}
} catch(Exception $e) {
// Nothing done
}
}
}
*/
if (!$error) {
setEventMessages($langs->trans("SetupIsReadyForUse", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules")), null, 'warnings');
}
@@ -837,11 +861,19 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|| getDolGlobalString('CHECKLASTVERSION_EXTERNALMODULE')
)
) {
$checkRes = $objMod->checkForUpdate();
$checkRes = $objMod->checkForUpdate(); // Check for update version
if ($checkRes > 0) {
setEventMessage($objMod->getName().' : '.$versiontrans.' -> '.$objMod->lastVersion);
} elseif ($checkRes < 0) {
setEventMessage($objMod->getName().' '.$langs->trans('CheckVersionFail'), 'warnings');
setEventMessage($objMod->getName().': '.$langs->trans('CheckVersionFail'), 'warnings');
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && $action == 'checklastversion' && !getDolGlobalString('DISABLE_CHECK_ON_MALWARE_MODULES')) {
$checkRes = $objMod->checkForCompliance(); // Check if module is reported as non compliant with Dolibarr rules and law
if (!is_numeric($checkRes) && $checkRes != '') {
$langs->load("errors");
setEventMessages($objMod->getName().' : '.$langs->trans($checkRes), null, 'errors');
}
}
@@ -1305,7 +1337,7 @@ if ($mode == 'deploy') {
$(document).ready(function() {
jQuery("#fileinstall").on("change", function() {
if(this.files[0].size > '.($maxmin * 1024).') {
alert("'.dol_escape_js($langs->trans("ErrorFileSizeTooLarge")).'");
alert("'.dol_escape_js($langs->transnoentitiesnoconv("ErrorFileSizeTooLarge")).'");
this.value = "";
}
});

View File

@@ -104,7 +104,9 @@ if ($action == "set") {
if (!($res > 0)) {
$error++;
}
} elseif (!$error) {
}
if (!$error) {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2025 William Mead <william@m34d.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
@@ -197,14 +198,6 @@ class DolibarrApi
unset($object->stats_mrptoconsume);
unset($object->stats_mrptoproduce);
unset($object->element);
unset($object->element_for_permission);
unset($object->fk_element);
unset($object->table_element);
unset($object->table_element_line);
unset($object->class_element_line);
unset($object->picto);
unset($object->fieldsforcombobox);
unset($object->regeximgext);
@@ -225,10 +218,18 @@ class DolibarrApi
unset($object->prefix_comm);
if (!isset($object->table_element) || $object->table_element != 'ticket') {
if (!isset($object->table_element) || ! in_array($object->table_element, array('expensereport_det', 'ticket'))) {
unset($object->comments);
}
unset($object->element);
unset($object->element_for_permission);
unset($object->fk_element);
unset($object->table_element);
unset($object->table_element_line);
unset($object->class_element_line);
unset($object->picto);
// Remove the $oldcopy property because it is not supported by the JSON
// encoder. The following error is generated when trying to serialize
// it: "Error encoding/decoding JSON: Type is not supported"

View File

@@ -87,7 +87,7 @@ class DolibarrApiAccess implements iAuthenticate
public function __isAllowed()
{
// phpcs:enable
global $conf, $db, $user;
global $conf, $db, $langs, $mysoc, $user;
$login = '';
$stored_key = '';
@@ -138,6 +138,56 @@ class DolibarrApiAccess implements iAuthenticate
// We must also reload global conf to get params from the entity
dol_syslog("Entity was not set on http header with HTTP_DOLAPIENTITY (recommanded for performance purpose), so we switch now on entity of user (".$conf->entity.") and we have to reload configuration.", LOG_WARNING);
$conf->setValues($this->db);
// set global mysoc after setting conf entity (the entity can be changed with the user logged)
// see master.inc.php
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$fmysoc = new Societe($db);
$fmysoc->setMysoc($conf);
// We set some specific default values according to country
if ($fmysoc->country_code == 'DE' && !isset($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
// For DE, we need to invert our address with customer address
$conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1;
}
if ($fmysoc->country_code == 'FR' && !isset($conf->global->INVOICE_CATEGORY_OF_OPERATION)) {
// For FR, default value of option to show category of operations is on by default. Decret n°2099-1299 2022-10-07
$conf->global->INVOICE_CATEGORY_OF_OPERATION = 1;
}
if ($fmysoc->country_code == 'FR' && !isset($conf->global->INVOICE_DISABLE_REPLACEMENT)) {
// For FR, the replacement invoice type is not allowed.
// From an accounting point of view, this creates holes in the numbering of the invoice.
// This is very problematic during a fiscal control.
$conf->global->INVOICE_DISABLE_REPLACEMENT = 1;
}
if ($fmysoc->country_code == 'GR' && !isset($conf->global->INVOICE_DISABLE_REPLACEMENT)) {
// The replacement invoice type is not allowed in Greece.
$conf->global->INVOICE_DISABLE_REPLACEMENT = 1;
}
if ($fmysoc->country_code == 'GR' && !isset($conf->global->INVOICE_DISABLE_DEPOSIT)) {
// The deposit invoice type is not allowed in Greece.
$conf->global->INVOICE_DISABLE_DEPOSIT = 1;
}
if (($fmysoc->localtax1_assuj || $fmysoc->localtax2_assuj) && !isset($conf->global->MAIN_NO_INPUT_PRICE_WITH_TAX)) {
// For countries using the 2nd or 3rd tax, we disable input/edit of lines using the price including tax (because 2nb and 3rd tax not yet taken into account).
// Work In Progress to support all taxes into unit price entry when MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES is set.
$conf->global->MAIN_NO_INPUT_PRICE_WITH_TAX = 1;
}
// Set also the global variable $mysoc
$mysoc = $fmysoc;
// Reload langs
$langcode = (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT);
if (!empty($user->conf->MAIN_LANG_DEFAULT)) {
$langcode = $user->conf->MAIN_LANG_DEFAULT;
}
if ($langs->getDefaultLang() != $langcode) {
$langs->setDefaultLang($langcode);
$langs->tab_translate = array();
$langs->loadLangs(array('main'));
}
}
} elseif ($nbrows > 1) {
throw new RestException(503, 'Error when fetching user api_key : More than 1 user with this apikey');
@@ -168,7 +218,7 @@ class DolibarrApiAccess implements iAuthenticate
}
// Check if user status is enabled
if ($fuser->statut != $fuser::STATUS_ENABLED) {
if ($fuser->status != $fuser::STATUS_ENABLED) {
// Status is disabled
dol_syslog("functions_isallowed::check_user_api_key Authentication KO for '".$login."': The user has been disabled", LOG_NOTICE);
sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid.

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2023 Romain Neil <contact@romain-neil.fr>
* Copyright (C) 2025 William Mead <william@m34d.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
@@ -497,7 +498,7 @@ class Documents extends DolibarrApi
} elseif ($modulepart == 'expensereport') {
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
if (!DolibarrApiAccess::$user->rights->expensereport->read && !DolibarrApiAccess::$user->rights->expensereport->read) {
if (!DolibarrApiAccess::$user->rights->expensereport->lire) {
throw new RestException(401);
}

View File

@@ -2130,7 +2130,7 @@ class Setup extends DolibarrApi
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
// Fill file_list with files in signature, new files, modified files

View File

@@ -434,4 +434,50 @@ if (Luracast\Restler\Defaults::$returnResponse) {
echo $result;
}
if (getDolGlobalInt("API_ENABLE_COUNT_CALLS") && $api->r->responseCode == 200) {
$error = 0;
$db->begin();
$userid = DolibarrApiAccess::$user->id;
$sql = "SELECT up.value";
$sql .= " FROM ".MAIN_DB_PREFIX."user_param as up";
$sql .= " WHERE up.param = 'API_COUNT_CALL'";
$sql .= " AND up.fk_user = ".((int) $userid);
$sql .= " AND up.entity = ".((int) $conf->entity);
$result = $db->query($sql);
if ($result) {
$updateapi = false;
$nbrows = $db->num_rows($result);
if ($nbrows == 0) {
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."user_param";
$sql2 .= " (fk_user, entity, param, value)";
$sql2 .= " VALUES (".((int) $userid).", ".((int) $conf->entity).", 'API_COUNT_CALL', 1)";
} else {
$updateapi = true;
$sql2 = "UPDATE ".MAIN_DB_PREFIX."user_param as up";
$sql2 .= " SET up.value = up.value + 1";
$sql2 .= " WHERE up.param = 'API_COUNT_CALL'";
$sql2 .= " AND up.fk_user = ".((int) $userid);
$sql2 .= " AND up.entity = ".((int) $conf->entity);
}
$result2 = $db->query($sql2);
if (!$result2) {
$modeapicall = $updateapi ? 'updating' : 'inserting';
dol_syslog('Error while '.$modeapicall. ' API_COUNT_CALL for user '.$userid, LOG_ERR);
$error++;
}
} else {
dol_syslog('Error on select API_COUNT_CALL for user '.$userid, LOG_ERR);
$error++;
}
if ($error) {
$db->rollback();
} else {
$db->commit();
}
}
//session_destroy();

View File

@@ -279,9 +279,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$disposal_type_form = $object->showInputField(null, 'fk_disposal_type', $fk_disposal_type, '', '', '', 0);
$object->fields['fk_disposal_type']['visible'] = -2;
$object->fields['disposal_invoice_id'] = array('type' => 'integer:Facture:compta/facture/class/facture.class.php::entity IN (__SHARED_ENTITIES__)', 'enabled' => '1', 'notnull' => 1, 'visible' => 1, 'index' => 1, 'validate' => '1',);
$disposal_invoice_form = $object->showInputField(null, 'disposal_invoice_id', $disposal_invoice_id, '', '', '', 0);
unset($object->fields['disposal_invoice_id']);
$disposal_invoice_form = $form->selectForForms('Facture:compta/facture/class/facture.class.php::(entity:IN:__SHARED_ENTITIES__)', 'disposal_invoice_id', $disposal_invoice_id);
// Create an array for form
$formquestion = array(

View File

@@ -939,13 +939,12 @@ class Asset extends CommonObject
}
// Delete old lines
$sql = "DELETE " . MAIN_DB_PREFIX . "asset_depreciation FROM " . MAIN_DB_PREFIX . "asset_depreciation";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab ON ab.doc_type = 'asset' AND ab.fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid";
$sql .= " WHERE " . MAIN_DB_PREFIX . "asset_depreciation.fk_asset = " . (int) $this->id;
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.depreciation_mode = '" . $this->db->escape($mode_key) . "'";
$sql .= " AND ab.fk_docdet IS NULL";
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "asset_depreciation";
$sql .= " WHERE fk_asset = " . (int) $this->id;
$sql .= " AND depreciation_mode = '" . $this->db->escape($mode_key) . "'";
$sql .= " AND NOT EXISTS (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset' AND fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid)";
if ($last_depreciation_date !== "") {
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.ref != ''";
$sql .= " AND ref <> ''";
}
$resql = $this->db->query($sql);
if (!$resql) {
@@ -1010,9 +1009,9 @@ class Asset extends CommonObject
// futures depreciation lines
//-----------------------------------------------------
$nb_days_in_year = getDolGlobalString('ASSET_DEPRECIATION_DURATION_PER_YEAR') ? $conf->global->ASSET_DEPRECIATION_DURATION_PER_YEAR : 365;
$nb_days_in_month = getDolGlobalString('ASSET_DEPRECIATION_DURATION_PER_MONTH') ? $conf->global->ASSET_DEPRECIATION_DURATION_PER_MONTH : 30;
$period_amount = (float) price2num($depreciation_period_amount / $fields['duration'], 'MT');
$nb_days_in_year = getDolGlobalInt('ASSET_DEPRECIATION_DURATION_PER_YEAR', 365);
$nb_days_in_month = getDolGlobalInt('ASSET_DEPRECIATION_DURATION_PER_MONTH', 30);
$period_amount = (float) ($fields['duration'] > 0 ? price2num($depreciation_period_amount / $fields['duration'], 'MT') : 0);
$first_period_found = false;
// TODO fix declaration of $begin_period
// @phpstan-ignore-next-line

View File

@@ -165,7 +165,7 @@ class AssetDepreciationOptions extends CommonObject
// Unset required option (notnull) if field disabled
if (!empty($field_info['enabled_field'])) {
$info = explode(':', $field_info['enabled_field']);
if ($this->deprecation_options[$info[0]][$info[1]] != $info[2] && isset($this->fields[$field_key]['notnull'])) {
if (!empty($this->deprecation_options[$info[0]][$info[1]]) && $this->deprecation_options[$info[0]][$info[1]] != $info[2] && isset($this->fields[$field_key]['notnull'])) {
unset($this->fields[$field_key]['notnull']);
}
}
@@ -285,7 +285,7 @@ class AssetDepreciationOptions extends CommonObject
foreach ($this->deprecation_options_fields as $mode_key => $mode_info) {
if (!empty($mode_info['enabled_field'])) {
$info = explode(':', $mode_info['enabled_field']);
if ($deprecation_options[$info[0]][$info[1]] != $info[2]) {
if (!empty($this->deprecation_options[$info[0]][$info[1]]) && $deprecation_options[$info[0]][$info[1]] != $info[2]) {
unset($deprecation_options[$info[0]][$info[1]]);
}
}
@@ -358,7 +358,7 @@ class AssetDepreciationOptions extends CommonObject
foreach ($this->deprecation_options_fields as $mode_key => $mode_info) {
if (!empty($mode_info['enabled_field'])) {
$info = explode(':', $mode_info['enabled_field']);
if ($deprecation_options[$info[0]][$info[1]] != $info[2]) {
if (!empty($this->deprecation_options[$info[0]][$info[1]]) && $deprecation_options[$info[0]][$info[1]] != $info[2]) {
unset($deprecation_options[$info[0]][$info[1]]);
}
}
@@ -471,7 +471,7 @@ class AssetDepreciationOptions extends CommonObject
if (!$error && !empty($this->deprecation_options[$mode_key])) {
if (!empty($mode_info['enabled_field'])) {
$info = explode(':', $mode_info['enabled_field']);
if ($this->deprecation_options[$info[0]][$info[1]] != $info[2]) {
if (!empty($this->deprecation_options[$info[0]][$info[1]]) && $this->deprecation_options[$info[0]][$info[1]] != $info[2]) {
continue;
}
}

View File

@@ -251,7 +251,13 @@ class Boms extends DolibarrApi
continue;
}
$this->bom->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->bom->array_options[$index] = $this->_checkValForAPI($field, $val, $this->bom);
}
continue;
}
$this->bom->$field = $this->_checkValForAPI($field, $value, $this->bom);
}
$this->checkRefNumbering();

View File

@@ -1443,7 +1443,7 @@ class BOM extends CommonObject
$this->error = $tmpproduct->error;
return -1;
}
$line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp);
$line->unit_cost = price2num(is_null($tmpproduct->cost_price) ? $tmpproduct->pmp : $tmpproduct->cost_price);
if (empty($line->unit_cost)) {
if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) {
if ($productFournisseur->fourn_remise_percent != "0") {

View File

@@ -248,7 +248,13 @@ class Categories extends DolibarrApi
continue;
}
$this->category->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->category->array_options[$index] = $this->_checkValForAPI($field, $val, $this->category);
}
continue;
}
$this->category->$field = $this->_checkValForAPI($field, $value, $this->category);
}
if ($this->category->update(DolibarrApiAccess::$user) > 0) {

View File

@@ -2067,7 +2067,27 @@ if ($id > 0) {
// related contact
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td>';
print '<div class="maxwidth200onsmartphone">';
print img_picto('', 'contact', 'class="paddingrightonly"').$form->selectcontacts(!getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? $object->socid : 0, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'minwidth300 widthcentpercentminusx', false, 0, 0, array(), 'multiple', 'contactid');
$searchSocid = ($object->socid > 0) ? $object->socid : (getDolGlobalString('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT') ? 0 : -1);
print img_picto('', 'contact', 'class="paddingrightonly"');
print $form->selectcontacts(
$searchSocid,
array_keys($object->socpeopleassigned),
'socpeopleassigned[]',
1,
'',
'',
1,
'minwidth300 widthcentpercentminusx',
false,
0,
0,
array(),
'multiple',
'contactid'
);
print '</div>';
print '</td>';
print '</tr>';

View File

@@ -629,7 +629,7 @@ class ActionComm extends CommonObject
foreach ($this->userassigned as $key => $val) {
// Common value with new behavior is to have $val = array('id'=>iduser, 'transparency'=>0|1) and $this->userassigned is an array of iduser => $val.
if (!is_array($val)) { // For backward compatibility when $val='id'.
$val = array('id'=>$val);
$val = array('id' => $val);
}
if ($val['id'] > 0) {
@@ -1271,7 +1271,7 @@ class ActionComm extends CommonObject
$already_inserted = array();
foreach (array_keys($this->socpeopleassigned) as $key => $val) {
if (!is_array($val)) { // For backward compatibility when val=id
$val = array('id'=>$val);
$val = array('id' => $val);
}
if (!empty($already_inserted[$val['id']])) {
continue;
@@ -2547,80 +2547,86 @@ class ActionComm extends CommonObject
// Load event
$res = $this->fetch($actionCommReminder->fk_actioncomm);
if ($res > 0) {
// PREPARE EMAIL
$errormesg = '';
$res2 = $this->fetch_thirdparty();
if ($res2 >= 0) {
// PREPARE EMAIL
$errormesg = '';
// Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($langs, 0, '', $this);
// Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $this);
complete_substitutions_array($substitutionarray, $langs, $this);
complete_substitutions_array($substitutionarray, $langs, $this);
// Content
$sendContent = make_substitutions($langs->trans($arraymessage->content), $substitutionarray);
// Content
$sendContent = make_substitutions($langs->trans($arraymessage->content), $substitutionarray);
//Topic
$sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->transnoentities('EventReminder'));
//Topic
$sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->transnoentities('EventReminder'));
// Recipient
$recipient = new User($this->db);
$res = $recipient->fetch($actionCommReminder->fk_user);
if ($res > 0) {
if (!empty($recipient->email)) {
$to = $recipient->email;
// Recipient
$recipient = new User($this->db);
$res = $recipient->fetch($actionCommReminder->fk_user);
if ($res > 0) {
if (!empty($recipient->email)) {
$to = $recipient->email;
} else {
$errormesg = "Failed to send remind to user id=".$actionCommReminder->fk_user.". No email defined for user.";
$error++;
}
} else {
$errormesg = "Failed to send remind to user id=".$actionCommReminder->fk_user.". No email defined for user.";
$errormesg = "Failed to load recipient with user id=".$actionCommReminder->fk_user;
$error++;
}
// Sender
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
if (empty($from)) {
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
$error++;
}
if (!$error) {
// Errors Recipient
$errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');
// Mail Creation
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', '');
// Sending Mail
if ($cMailFile->sendfile()) {
$nbMailSend++;
} else {
$errormesg = 'Failed to send email to: '.$to.' '.$cMailFile->error.implode(',', $cMailFile->errors);
$error++;
}
}
if (!$error) {
$actionCommReminder->status = $actionCommReminder::STATUS_DONE;
$res = $actionCommReminder->update($user);
if ($res < 0) {
$errorsMsg[] = "Failed to update status to done of ActionComm Reminder";
$error++;
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
}
} else {
$actionCommReminder->status = $actionCommReminder::STATUS_ERROR;
$actionCommReminder->lasterror = dol_trunc($errormesg, 128, 'right', 'UTF-8', 1);
$res = $actionCommReminder->update($user);
if ($res < 0) {
$errorsMsg[] = "Failed to update status to error of ActionComm Reminder";
$error++;
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
} else {
$errorsMsg[] = $errormesg;
}
}
} else {
$errormesg = "Failed to load recipient with user id=".$actionCommReminder->fk_user;
$errorsMsg[] = 'Failed to fetch record thirdparty on actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
$error++;
}
// Sender
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
if (empty($from)) {
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
$error++;
}
if (!$error) {
// Errors Recipient
$errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');
// Mail Creation
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', '');
// Sending Mail
if ($cMailFile->sendfile()) {
$nbMailSend++;
} else {
$errormesg = 'Failed to send email to: '.$to.' '.$cMailFile->error.join(',', $cMailFile->errors);
$error++;
}
}
if (!$error) {
$actionCommReminder->status = $actionCommReminder::STATUS_DONE;
$res = $actionCommReminder->update($user);
if ($res < 0) {
$errorsMsg[] = "Failed to update status to done of ActionComm Reminder";
$error++;
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
}
} else {
$actionCommReminder->status = $actionCommReminder::STATUS_ERROR;
$actionCommReminder->lasterror = dol_trunc($errormesg, 128, 'right', 'UTF-8', 1);
$res = $actionCommReminder->update($user);
if ($res < 0) {
$errorsMsg[] = "Failed to update status to error of ActionComm Reminder";
$error++;
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
} else {
$errorsMsg[] = $errormesg;
}
}
} else {
$errorsMsg[] = 'Failed to fetch record actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
$error++;

View File

@@ -279,6 +279,12 @@ class AgendaEvents extends DolibarrApi
continue;
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->actioncomm->array_options[$index] = $this->_checkValForAPI($field, $val, $this->actioncomm);
}
continue;
}
$this->actioncomm->$field = $this->_checkValForAPI($field, $value, $this->actioncomm);
}

View File

@@ -53,6 +53,9 @@ if ($user->socid && $socid) {
$result = restrictedArea($user, 'societe', $socid);
}
$object = new ActionComm($db);
$object->fetch($id);
$usercancreate = $user->hasRight('agenda', 'allactions', 'create') || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->hasRight('agenda', 'myactions', 'create'));
@@ -65,8 +68,6 @@ $form = new Form($db);
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda|DE:Modul_Terminplanung';
llxHeader('', $langs->trans("Agenda"), $help_url);
$object = new ActionComm($db);
$object->fetch($id);
$object->info($object->id);
$head = actions_prepare_head($object);

View File

@@ -443,20 +443,25 @@ if (!$user->hasRight('societe', 'client', 'voir') && !$socid) {
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
$sql .= " ,".MAIN_DB_PREFIX."c_actioncomm as c";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
// We must filter on resource table
if ($resourceid > 0) {
$sql .= ", ".MAIN_DB_PREFIX."element_resources as r";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as r ON r.element_type = 'action' AND r.element_id = a.id";
}
// We must filter on assignement table
if ($filtert > 0 || $usergroup > 0) {
$sql .= ", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as ar ON ar.fk_actioncomm = a.id AND ar.element_type='user'";
}
if ($usergroup > 0) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element";
}
$sql .= " WHERE c.id = a.fk_action";
$sql .= ' AND a.entity IN ('.getEntity('agenda').')';
// Add table from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
// Condition on actioncode
if (!empty($actioncode)) {
if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
@@ -487,7 +492,7 @@ if (!empty($actioncode)) {
}
}
if ($resourceid > 0) {
$sql .= " AND r.element_type = 'action' AND r.element_id = a.id AND r.resource_id = ".((int) $resourceid);
$sql .= " AND r.resource_id = ".((int) $resourceid);
}
if ($pid) {
$sql .= " AND a.fk_project=".((int) $pid);
@@ -498,10 +503,6 @@ if (!$user->hasRight('societe', 'client', 'voir') && !$socid) {
if ($socid > 0) {
$sql .= " AND s.rowid = ".((int) $socid);
}
// We must filter on assignement table
if ($filtert > 0 || $usergroup > 0) {
$sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'";
}
if ($type) {
$sql .= " AND c.id = ".((int) $type);
}

View File

@@ -66,7 +66,7 @@ if (isModEnabled('ficheinter')) {
}
// Load translation files required by the page
$langs->loadLangs(array('companies', 'banks'));
$langs->loadLangs(array('companies', 'banks', 'commercial'));
if (isModEnabled('contrat')) {
$langs->load("contracts");
@@ -871,9 +871,9 @@ if ($object->id > 0) {
$filedir = $conf->propal->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
$file_list = null;
if (!empty($filedir)) {
$file_list = dol_dir_list($filedir, 'files', 0, '', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
}
if (is_array($file_list)) {
if (is_array($file_list) && !empty($file_list)) {
// Defined relative dir to DOL_DATA_ROOT
$relativedir = '';
if ($filedir) {
@@ -983,9 +983,9 @@ if ($object->id > 0) {
$filedir = $conf->commande->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
$file_list = null;
if (!empty($filedir)) {
$file_list = dol_dir_list($filedir, 'files', 0, '', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
}
if (is_array($file_list)) {
if (is_array($file_list) && !empty($file_list)) {
// Defined relative dir to DOL_DATA_ROOT
$relativedir = '';
if ($filedir) {
@@ -1077,9 +1077,9 @@ if ($object->id > 0) {
$filedir = $conf->expedition->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
$file_list = null;
if (!empty($filedir)) {
$file_list = dol_dir_list($filedir, 'files', 0, '', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
}
if (is_array($file_list)) {
if (is_array($file_list) && !empty($file_list)) {
// Defined relative dir to DOL_DATA_ROOT
$relativedir = '';
if ($filedir) {
@@ -1183,9 +1183,9 @@ if ($object->id > 0) {
$filedir = $conf->contrat->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
$file_list = null;
if (!empty($filedir)) {
$file_list = dol_dir_list($filedir, 'files', 0, '', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
}
if (is_array($file_list)) {
if (is_array($file_list) && !empty($file_list)) {
// Defined relative dir to DOL_DATA_ROOT
$relativedir = '';
if ($filedir) {
@@ -1274,9 +1274,9 @@ if ($object->id > 0) {
$filedir = $conf->ficheinter->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
$file_list = null;
if (!empty($filedir)) {
$file_list = dol_dir_list($filedir, 'files', 0, '', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
}
if (is_array($file_list)) {
if (is_array($file_list) && !empty($file_list)) {
// Defined relative dir to DOL_DATA_ROOT
$relativedir = '';
if ($filedir) {
@@ -1486,9 +1486,9 @@ if ($object->id > 0) {
$filedir = $conf->facture->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref);
$file_list = null;
if (!empty($filedir)) {
$file_list = dol_dir_list($filedir, 'files', 0, '', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
$file_list = dol_dir_list($filedir, 'files', 0, dol_sanitizeFileName($objp->ref).'.pdf', '(\.meta|_preview.*.*\.png)$', 'date', SORT_DESC);
}
if (is_array($file_list)) {
if (is_array($file_list) && !empty($file_list)) {
// Defined relative dir to DOL_DATA_ROOT
$relativedir = '';
if ($filedir) {

View File

@@ -37,7 +37,7 @@ if (!$sortorder) {
$sortorder = "ASC";
}
if (!$sortfield) {
$sortfield = "p.name";
$sortfield = "p.lastname";
}
if ($page < 0) {
$page = 0;
@@ -81,7 +81,7 @@ if ($type == "f") {
*/
$sql = "SELECT s.rowid, s.nom as name, st.libelle as stcomm";
$sql .= ", p.rowid as cidp, p.name, p.firstname, p.email, p.phone";
$sql .= ", p.rowid as cidp, p.lastname, p.firstname, p.email, p.phone";
$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st,";
if (!$user->hasRight('societe', 'client', 'voir') && !$socid) {
$sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
@@ -106,7 +106,7 @@ if ($socid) {
$sql .= " AND s.rowid = ".((int) $socid);
}
if (!empty($search_lastname)) {
$sql .= " AND p.name LIKE '%".$db->escape($search_lastname)."%'";
$sql .= " AND p.lastname LIKE '%".$db->escape($search_lastname)."%'";
}
if (!empty($search_firstname)) {
$sql .= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'";
@@ -115,8 +115,8 @@ if (!empty($search_company)) {
$sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'";
}
if (!empty($contactname)) { // acces a partir du module de recherche
$sql .= " AND (p.name LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') ";
$sortfield = "p.name";
$sql .= " AND (p.lastname LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') ";
$sortfield = "p.lastname";
$sortorder = "ASC";
}
@@ -136,7 +136,7 @@ if ($resql) {
print '<table class="liste centpercent">';
print '<tr class="liste_titre">';
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.name", $begin, $param, "", $sortfield, $sortorder);
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.lastname", $begin, $param, "", $sortfield, $sortorder);
print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "p.firstname", $begin, $param, "", $sortfield, $sortorder);
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", $begin, $param, "", $sortfield, $sortorder);
print_liste_field_titre("Email");

View File

@@ -421,7 +421,7 @@ if (empty($reshook)) {
dol_syslog("comm/mailing/card.php: error for #".$iforemailloop.($mail->error ? ' - '.$mail->error : ''), LOG_WARNING);
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=-1, error_text='".$db->escape($mail->error)."', date_envoi='".$db->idate($now)."' WHERE rowid=".((int) $obj->rowid);
$sql .= " SET statut=-1, error_text='".$db->escape(dol_trunc($mail->error, 250))."', date_envoi='".$db->idate($now)."' WHERE rowid=".((int) $obj->rowid);
$resql2 = $db->query($sql);
if (!$resql2) {
dol_print_error($db);

View File

@@ -255,7 +255,7 @@ class FormAdvTargetEmailing extends Form
}
}
if (!empty($InfoFieldList[1])) {
$sql .= " ORDER BY nom";
$sql .= $this->db->order($InfoFieldList[1]);
}
// $sql.= ' WHERE entity = '.$conf->entity;
@@ -266,7 +266,7 @@ class FormAdvTargetEmailing extends Form
if ($num) {
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
$labeltoshow = dol_trunc($obj->$InfoFieldList[1], 90);
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 90);
$options_array[$obj->rowid] = $labeltoshow;
$i++;
}
@@ -332,6 +332,20 @@ class FormAdvTargetEmailing extends Form
global $conf, $langs;
$form = new Form($this->db);
foreach ($options_array as $okey => $val) {
if ((string) $okey == '') {
continue;
}
$valarray = explode('|', $val);
$val = $valarray[0];
if ($val) {
$options_array[$okey] = $langs->trans($val);
} else {
$options_array[$okey] = $val;
}
}
$return = $form->multiselectarray($htmlname, $options_array, $selected_array, 0, 0, '', 0, 295);
return $return;
}

View File

@@ -149,7 +149,6 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
if (empty($reshook)) {
$backurlforlist = DOL_URL_ROOT.'/comm/propal/list.php';
@@ -1622,7 +1621,20 @@ if (empty($reshook)) {
$result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int'));
} elseif ($action == 'setconditions' && $usercancreate) {
// Terms of payment
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha'));
$sql = "SELECT code ";
$sql .= "FROM " . $db->prefix() . "c_payment_term";
$sql .= " WHERE rowid = " . ((int) GETPOST('cond_reglement_id', 'int'));
$result = $db->query($sql);
if ($result) {
$obj = $db->fetch_object($result);
if ($obj->code == 'DEP30PCTDEL') {
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha'));
} else {
$object->deposit_percent = 0;
$object->update($user);
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), $object->deposit_percent);
}
}
//} elseif ($action == 'setremisepercent' && $usercancreate) {
// $result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'), '', 2));
//} elseif ($action == 'setremiseabsolue' && $usercancreate) {
@@ -1754,6 +1766,7 @@ if ($action == 'create') {
$fk_account = GETPOST('fk_account', 'int');
// Load objectsrc
$objectsrc = null;
if (!empty($origin) && !empty($originid)) {
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
@@ -1765,6 +1778,14 @@ if ($action == 'create') {
if ($element == 'project') {
$projectid = $originid;
// Fetch project and thirdparty
$project = new Project($db);
$project->fetch($projectid);
if ($project->socid > 0) {
$soc = new Societe($db);
$soc->fetch($project->socid);
}
} else {
// For compatibility
if ($element == 'order' || $element == 'commande') {
@@ -1796,9 +1817,9 @@ if ($action == 'create') {
$soc = $objectsrc->thirdparty;
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0));
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
$warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0));
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0));
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
$warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0));
// Replicate extrafields
$objectsrc->fetch_optionals();
@@ -1813,7 +1834,10 @@ if ($action == 'create') {
}
}
}
} else {
}
// Load default values from thirdparty
if (!empty($soc)) {
$cond_reglement_id = empty($soc->cond_reglement_id) ? $cond_reglement_id : $soc->cond_reglement_id;
$deposit_percent = empty($soc->deposit_percent) ? $deposit_percent : $soc->deposit_percent;
$mode_reglement_id = empty($soc->mode_reglement_id) ? $mode_reglement_id : $soc->mode_reglement_id;
@@ -3145,7 +3169,7 @@ if ($action == 'create') {
if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) {
print '<br><!-- Link to sign -->';
require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
print showOnlineSignatureUrl('proposal', $object->ref).'<br>';
print showOnlineSignatureUrl('proposal', $object->ref, $object).'<br>';
}
print '</div><div class="fichehalfright">';

View File

@@ -708,7 +708,13 @@ class Proposals extends DolibarrApi
continue;
}
$this->propal->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->propal->array_options[$index] = $this->_checkValForAPI($field, $val, $this->propal);
}
continue;
}
$this->propal->$field = $this->_checkValForAPI($field, $value, $this->propal);
}
// update end of validity date

View File

@@ -18,6 +18,7 @@
* Copyright (C) 2022 ATM Consulting <contact@atm-consulting.fr>
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2025 William Mead <william@m34d.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
@@ -1770,12 +1771,14 @@ class Propal extends CommonObject
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
$sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").",";
$sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").",";
$sql .= " fk_user_valid=".(isset($this->user_validation_id) ? $this->user_validation_id : "null").",";
$sql .= " fk_user_valid = ".(!empty($this->user_validation_id) ? (int) $this->user_validation_id : "null").",";
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
$sql .= " deposit_percent=".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null").",";
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
$sql .= " fk_input_reason=".(isset($this->demand_reason_id) ? $this->demand_reason_id : "null").",";
$sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? (int) $this->shipping_method_id : "null").",";
$sql .= " fk_availability=".(isset($this->availability_id) ? (int) $this->availability_id : "null").",";
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
$sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").",";
@@ -2066,7 +2069,6 @@ class Propal extends CommonObject
$this->ref = $num;
$this->statut = self::STATUS_VALIDATED;
$this->status = self::STATUS_VALIDATED;
$this->user_validation_id = $user->id;
$this->datev = $now;
$this->date_validation = $now;
@@ -4421,8 +4423,17 @@ class PropaleLigne extends CommonObjectLine
// End call triggers
}
$this->db->commit();
return 1;
if (!$error) {
$this->db->commit();
return 1;
}
foreach ($this->errors as $errmsg) {
dol_syslog(get_class($this)."::insert ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
}
$this->db->rollback();
return -1 * $error;
} else {
$this->error = $this->db->error()." sql=".$sql;
$this->db->rollback();
@@ -4628,8 +4639,17 @@ class PropaleLigne extends CommonObjectLine
// End call triggers
}
$this->db->commit();
return 1;
if (!$error) {
$this->db->commit();
return 1;
}
foreach ($this->errors as $errmsg) {
dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
}
$this->db->rollback();
return -1 * $error;
} else {
$this->error = $this->db->error();
$this->db->rollback();

View File

@@ -880,17 +880,17 @@ if (empty($reshook)) {
// Set unit price to use
if (!empty($price_ht) || $price_ht === '0') {
$pu_ht = price2num($price_ht, 'MU');
$pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU');
$pu_ht = (float) price2num($price_ht, 'MU');
$pu_ttc = (float) price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU');
} elseif (!empty($price_ttc) || $price_ttc === '0') {
$pu_ttc = price2num($price_ttc, 'MU');
$pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU');
$pu_ttc = (float) price2num($price_ttc, 'MU');
$pu_ht = (float) price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU');
} elseif ($tmpvat != $tmpprodvat) {
// Is this still used ?
if ($price_base_type != 'HT') {
$pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU');
$pu_ht = (float) price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU');
} else {
$pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU');
$pu_ttc = (float) price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU');
}
}

View File

@@ -662,7 +662,13 @@ class Orders extends DolibarrApi
continue;
}
$this->commande->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->commande->array_options[$index] = $this->_checkValForAPI($field, $val, $this->commande);
}
continue;
}
$this->commande->$field = $this->_checkValForAPI($field, $value, $this->commande);
}
// Update availability

View File

@@ -3242,7 +3242,7 @@ class Commande extends CommonOrder
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
$this->line->remise_percent = $remise_percent;
$this->line->subprice = $pu_ht;
$this->line->subprice = (float) $pu_ht;
$this->line->info_bits = $info_bits;
$this->line->special_code = $special_code;
$this->line->total_ht = $total_ht;

View File

@@ -1507,9 +1507,6 @@ if (empty($reshook)) {
if (!empty($moreforfilter)) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
@@ -2213,8 +2210,8 @@ while ($i < $imaxinloop) {
// Alias name
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="nocellnopadd">';
print $obj->alias;
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->alias).'">';
print dol_escape_htmltag($obj->alias);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@@ -2244,8 +2241,8 @@ while ($i < $imaxinloop) {
// Town
if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="nocellnopadd">';
print $obj->town;
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">';
print dol_escape_htmltag($obj->town);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@@ -2254,8 +2251,8 @@ while ($i < $imaxinloop) {
// Zip
if (!empty($arrayfields['s.zip']['checked'])) {
print '<td class="nocellnopadd">';
print $obj->zip;
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->zip).'">';
print dol_escape_htmltag($obj->zip);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@@ -2264,7 +2261,7 @@ while ($i < $imaxinloop) {
// State
if (!empty($arrayfields['state.nom']['checked'])) {
print "<td>".$obj->state_name."</td>\n";
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->state_name).'">'.dol_escape_htmltag($obj->state_name)."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
@@ -2655,7 +2652,7 @@ while ($i < $imaxinloop) {
$productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique;
} else {
$generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'];
$generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique;
$generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'];
}
if ($reliquat > $generic_product->stock_reel) {

View File

@@ -2104,7 +2104,7 @@ if ($resql) {
$productstat_cachevirtual[$obj->fk_product]['stock_reel'] = $generic_product->stock_theorique;
} else {
$generic_product->stock_reel = $productstat_cache[$obj->fk_product]['stock_reel'];
$generic_product->stock_theorique = $productstat_cachevirtual[$obj->fk_product]['stock_reel'] = $generic_product->stock_theorique;
$generic_product->stock_theorique = $productstat_cachevirtual[$obj->fk_product]['stock_reel'];
}
if ($reliquat > $generic_product->stock_reel) {

View File

@@ -597,9 +597,9 @@ $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappr
$sql .= " b.fk_account, b.fk_type, b.fk_bordereau,";
$sql .= " ba.rowid as bankid, ba.ref as bankref";
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['label'])) {
foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) {
$sql .= ($extrafields->attributes[$extrafieldsobjectkey]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
}
}
// Add fields from hooks
@@ -612,8 +612,8 @@ if ($search_bid > 0) {
}
$sql .= " ".MAIN_DB_PREFIX."bank_account as ba,";
$sql .= " ".MAIN_DB_PREFIX."bank as b";
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)";
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$extrafieldsobjectkey."_extrafields as ef on (b.rowid = ef.fk_object)";
}
// Add fields from hooks
@@ -1831,6 +1831,7 @@ if ($resql) {
}
// Extra fields
$obj = $objp; // Because extrafield template use $obj and not $objp as object variable name
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);

View File

@@ -345,6 +345,12 @@ class BankAccounts extends DolibarrApi
continue;
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$account->array_options[$index] = $this->_checkValForAPI($field, $val, $account);
}
continue;
}
$account->$field = $this->_checkValForAPI($field, $value, $account);
}

View File

@@ -164,7 +164,8 @@ if ($user->hasRight('banque', 'modifier') && $action == "update") {
$sql .= " SET ";
// Always opened
if (GETPOSTISSET('value')) {
$sql .= " fk_type='".$db->escape(GETPOST('value'))."',";
$type = GETPOST('value');
$sql .= " fk_type='".$db->escape(empty($type) && $object->fk_type == 'SOLD' ? 'SOLD' : $type)."',";
}
if (GETPOSTISSET('num_chq')) {
$sql .= " num_chq='".$db->escape(GETPOST("num_chq"))."',";

View File

@@ -196,6 +196,7 @@ class CashControl extends CommonObject
$sql .= ", cash";
$sql .= ", cheque";
$sql .= ", card";
$sql .= ", fk_user_creat";
$sql .= ") VALUES (";
//$sql .= "'(PROV)', ";
$sql .= ((int) $conf->entity);
@@ -210,6 +211,7 @@ class CashControl extends CommonObject
$sql .= ", ".price2num($this->cash, 'MT');
$sql .= ", ".price2num($this->cheque, 'MT');
$sql .= ", ".price2num($this->card, 'MT');
$sql .= ", ".((int) $user->id);
$sql .= ")";
$this->db->begin();

View File

@@ -253,7 +253,7 @@ if ($resql) {
// Date ope
print '<td class="nowrap left">';
print '<span id="dateoperation_'.$objp->rowid.'">'.dol_print_date($db->jdate($objp->do), "day")."</span>";
print '<span id="dateoperation_'.$objp->facid.'">'.dol_print_date($db->jdate($objp->do), "day")."</span>";
print "</td>\n";
if (!$i) {
$totalarray['nbfield']++;

View File

@@ -93,7 +93,10 @@ $pagenext = $page + 1;
$object = new FactureRec($db);
if (($id > 0 || $ref) && $action != 'create' && $action != 'add') {
$ret = $object->fetch($id, $ref);
if (!$ret) {
if ($ret < 0) {
dol_print_error($db, $object->error, $object->errors);
exit;
} elseif (! $ret) {
setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors');
}
}
@@ -1344,14 +1347,10 @@ if ($action == 'create') {
}
print '</tr></table>';
print '</td><td>';
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
if ($action == 'editconditions') {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id');
} else {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none');
}
if ($action == 'editconditions') {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id');
} else {
print '&nbsp;';
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none');
}
print '</td></tr>';
@@ -1781,6 +1780,7 @@ if ($action == 'create') {
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$morehtmlcenter = '';
$somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
print '</div>';

View File

@@ -96,7 +96,7 @@ $origin = GETPOST('origin', 'alpha');
$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
$fac_rec = GETPOST('fac_rec', 'int');
$facid = GETPOST('facid', 'int');
$ref_client = GETPOST('ref_client', 'int');
$ref_client = GETPOST('ref_client', 'alpha');
$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1;
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : 0);
$selectedLines = GETPOST('toselect', 'array');
@@ -643,7 +643,7 @@ if (empty($reshook)) {
$object->setValueFrom('ref', GETPOST('ref'), '', null, '', '', $user, 'BILL_MODIFY');
} elseif ($action == 'setref_client' && $usercancreate) {
$object->fetch($id);
$object->set_ref_client(GETPOST('ref_client'));
$object->set_ref_client(GETPOST('ref_client', 'alpha'));
} elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) {
// Classify to validated
$idwarehouse = GETPOST('idwarehouse', 'int');
@@ -1537,6 +1537,9 @@ if (empty($reshook)) {
}
foreach ($TTotalByTva as $tva => &$total) {
if (empty($amountdeposit[$tva])) {
$amountdeposit[$tva] = 0;
}
$coef = $total / $srcobject->total_ttc; // Calc coef
$am = $amount * $coef;
$amount_ttc_diff += $am;
@@ -1561,6 +1564,9 @@ if (empty($reshook)) {
if ($qualified) {
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
$tva_tx = $lines[$i]->tva_tx;
if (empty($amountdeposit[$tva_tx])) {
$amountdeposit[$tva_tx] = 0;
}
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
}
}
@@ -1727,25 +1733,25 @@ if (empty($reshook)) {
// Date start
$date_start = false;
if ($lines[$i]->date_debut_prevue) {
if (isset($lines[$i]->date_debut_prevue)) {
$date_start = $lines[$i]->date_debut_prevue;
}
if ($lines[$i]->date_debut_reel) {
if (isset($lines[$i]->date_debut_reel)) {
$date_start = $lines[$i]->date_debut_reel;
}
if ($lines[$i]->date_start) {
if (isset($lines[$i]->date_start)) {
$date_start = $lines[$i]->date_start;
}
// Date end
$date_end = false;
if ($lines[$i]->date_fin_prevue) {
if (isset($lines[$i]->date_fin_prevue)) {
$date_end = $lines[$i]->date_fin_prevue;
}
if ($lines[$i]->date_fin_reel) {
if (isset($lines[$i]->date_fin_reel)) {
$date_end = $lines[$i]->date_fin_reel;
}
if ($lines[$i]->date_end) {
if (isset($lines[$i]->date_end)) {
$date_end = $lines[$i]->date_end;
}
@@ -3179,9 +3185,9 @@ if ($action == 'create') {
$expesrc->fetch_optionals();
$object->array_options = $expesrc->array_options;
} else {
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0));
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
$fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0));
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : (!empty($cond_reglement_id) ? $cond_reglement_id : 0)));
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : (!empty($mode_reglement_id) ? $mode_reglement_id : 0)));
$fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : (!empty($fk_account) ? $fk_account : 0)));
//$remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_percent) ? $soc->remise_percent : 0));
//$remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0));
@@ -4543,6 +4549,9 @@ if ($action == 'create') {
$morehtmlref .= '</div>';
$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
$object->totalcreditnotes = $totalcreditnotes;
$object->totaldeposits = $totaldeposits;
$object->remaintopay = price2num($object->total_ttc - $object->totalpaid - $object->totalcreditnotes - $object->totaldeposits, 'MT');
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '');
@@ -5086,6 +5095,7 @@ if ($action == 'create') {
print '<td>'.$langs->trans('ListOfSituationInvoices').'</td>';
print '<td></td>';
print '<td class="center">'.$langs->trans('Situation').'</td>';
if (isModEnabled("banque")) {
print '<td class="right"></td>';
}
@@ -5177,7 +5187,9 @@ if ($action == 'create') {
$total_next_ht = $total_next_ttc = 0;
foreach ($object->tab_next_situation_invoice as $next_invoice) {
$totalpaid = $next_invoice->getSommePaiement();
$next_invoice_total_paid = $next_invoice->getSommePaiement(0);
$next_invoice_totalcreditnotes = $next_invoice->getSumCreditNotesUsed(0);
$next_invoice_totaldeposits = $next_invoice->getSumDepositsUsed(0);
$total_next_ht += $next_invoice->total_ht;
$total_next_ttc += $next_invoice->total_ttc;
@@ -5190,7 +5202,7 @@ if ($action == 'create') {
}
print '<td class="right"><span class="amount">'.price($next_invoice->total_ht).'</span></td>';
print '<td class="right"><span class="amount">'.price($next_invoice->total_ttc).'</span></td>';
print '<td class="right">'.$next_invoice->getLibStatut(3, $totalpaid).'</td>';
print '<td class="right">'.$next_invoice->getLibStatut(3, $next_invoice_total_paid + $next_invoice_totalcreditnotes + $next_invoice_totaldeposits).'</td>';
print '</tr>';
}
@@ -5850,10 +5862,9 @@ if ($action == 'create') {
}
}
// For situation invoice with excess received
// For situation invoice
if ($object->statut > Facture::STATUS_DRAFT
&& $object->type == Facture::TYPE_SITUATION
&& ($object->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits) > 0
&& $usercancreate
&& !$objectidnext
&& $object->is_last_in_cycle()

View File

@@ -336,6 +336,7 @@ class Invoices extends DolibarrApi
*
* @throws RestException 400
* @throws RestException 401
* @throws RestException 403 Access not allowed for login
* @throws RestException 404
* @throws RestException 405
*/
@@ -352,6 +353,9 @@ class Invoices extends DolibarrApi
if (empty($orderid)) {
throw new RestException(400, 'Order ID is mandatory');
}
if (!DolibarrApi::_checkAccessToResource('commande', $orderid)) {
throw new RestException(403, 'Access not allowed on order for login '.DolibarrApiAccess::$user->login);
}
$order = new Commande($this->db);
$result = $order->fetch($orderid);
@@ -633,7 +637,13 @@ class Invoices extends DolibarrApi
continue;
}
$this->invoice->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->invoice->array_options[$index] = $this->_checkValForAPI($field, $val, $this->invoice);
}
continue;
}
$this->invoice->$field = $this->_checkValForAPI($field, $value, $this->invoice);
}
// update bank account
@@ -643,11 +653,11 @@ class Invoices extends DolibarrApi
}
}
if ($this->invoice->update(DolibarrApiAccess::$user)) {
if ($this->invoice->update(DolibarrApiAccess::$user) > 0) {
return $this->get($id);
} else {
throw new RestException(500, $this->invoice->error);
}
return false;
}
/**
@@ -1486,8 +1496,8 @@ class Invoices extends DolibarrApi
* Warning: Take care that all invoices are owned by the same customer.
* Example of value for parameter arrayofamounts: {"1": {"amount": "99.99", "multicurrency_amount": ""}, "2": {"amount": "", "multicurrency_amount": "10"}}
*
* @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice
* @param string $datepaye {@from body} Payment date {@type timestamp}
* @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice
* @param string $datepaye {@from body} Payment date {@type timestamp}
* @param int $paymentid {@from body} Payment mode Id {@min 1}
* @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no}
* @param int $accountid {@from body} Account Id {@min 1}
@@ -1572,13 +1582,13 @@ class Invoices extends DolibarrApi
$amount = price2num($amountarray["multicurrency_amount"], 'MT');
}
if ($amount > $remainstopay && !$accepthigherpayment) {
if (abs($amount) > abs($remainstopay) && !$accepthigherpayment) {
$this->db->rollback();
throw new RestException(400, 'Payment amount on invoice ID '.$id.' ('.$amount.') is higher than remain to pay ('.$remainstopay.')');
}
if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) {
$amount = price2num(-1 * $amount, 'MT');
$amount = price2num(-1 * abs($amount), 'MT');
}
if ($is_multicurrency) {

View File

@@ -136,6 +136,13 @@ class FactureRec extends CommonInvoice
public $cond_reglement_code; // Code in llx_c_paiement
public $mode_reglement_code; // Code in llx_c_paiement
public $fk_multicurrency;
public $multicurrency_code;
public $multicurrency_tx;
public $multicurrency_total_ht;
public $multicurrency_total_tva;
public $multicurrency_total_ttc;
public $suspended; // status
public $auto_validate; // 0 to create in draft, 1 to create and validate the new invoice
@@ -1358,6 +1365,14 @@ class FactureRec extends CommonInvoice
$facture->multicurrency_tx = $facturerec->multicurrency_tx;
}
if (isset($facture->array_options) && isset($facturerec->array_options)) {
foreach ($facturerec->array_options as $key => $value) {
if (isset($facture->array_options[$key])) {
$facture->array_options[$key] = $value;
}
}
}
$invoiceidgenerated = $facture->create($user);
if ($invoiceidgenerated <= 0) {
$this->errors = $facture->errors;
@@ -1407,6 +1422,7 @@ class FactureRec extends CommonInvoice
$nb_create++;
$this->output .= $langs->trans("InvoiceGeneratedFromTemplate", $facture->ref, $facturerec->ref)."\n";
} else {
$this->output .= $langs->trans("InvoiceGeneratedFromTemplateError", $facture->ref, $facturerec->ref, $this->error)."\n";
$this->db->rollback("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref);
}

View File

@@ -75,6 +75,11 @@ class Facture extends CommonInvoice
*/
public $table_element_line = 'facturedet';
/**
* @var string Name of class line
*/
public $class_element_line = 'FactureLigne';
/**
* @var string Fieldname with ID of parent key if this field has a parent
*/
@@ -463,8 +468,8 @@ class Facture extends CommonInvoice
$this->ref_client = trim($this->ref_client);
$this->note = (isset($this->note) ? trim($this->note) : trim($this->note_private)); // deprecated
$this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note_private));
$this->note_public = trim($this->note_public);
$this->note_private = (isset($this->note_private) ? trim($this->note_private) : '');
$this->note_public = (isset($this->note_public) ? trim($this->note_public) : '');
if (!$this->cond_reglement_id) {
$this->cond_reglement_id = 0;
}
@@ -974,11 +979,6 @@ class Facture extends CommonInvoice
$fk_parent_line = 0;
foreach ($_facrec->lines as $i => $val) {
if ($_facrec->lines[$i]->fk_product) {
$prod = new Product($this->db);
$res = $prod->fetch($_facrec->lines[$i]->fk_product);
}
// Reset fk_parent_line for no child products and special product
if (($_facrec->lines[$i]->product_type != 9 && empty($_facrec->lines[$i]->fk_parent_line)) || $_facrec->lines[$i]->product_type == 9) {
$fk_parent_line = 0;
@@ -986,6 +986,11 @@ class Facture extends CommonInvoice
// For line from template invoice, we use data from template invoice
/*
if ($_facrec->lines[$i]->fk_product) {
$prod = new Product($this->db);
$res = $prod->fetch($_facrec->lines[$i]->fk_product);
}
$tva_tx = get_default_tva($mysoc,$soc,$prod->id);
$tva_npr = get_default_npr($mysoc,$soc,$prod->id);
if (empty($tva_tx)) $tva_npr=0;
@@ -1243,7 +1248,7 @@ class Facture extends CommonInvoice
$object->socid = $objsoc->id;
$object->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
$object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
$object->fk_project = '';
$object->fk_project = null;
$object->fk_delivery_address = '';
}
@@ -1261,10 +1266,12 @@ class Facture extends CommonInvoice
$object->fk_user_author = $user->id;
$object->fk_user_valid = null;
$object->fk_facture_source = 0;
$object->fk_fac_rec_source = null;
$object->date_creation = '';
$object->date_modification = '';
$object->date_validation = '';
$object->ref_client = '';
$object->ref_customer = '';
$object->close_code = '';
$object->close_note = '';
if (getDolGlobalInt('MAIN_DONT_KEEP_NOTE_ON_CLONING') == 1) {
@@ -2451,9 +2458,6 @@ class Facture extends CommonInvoice
if (empty($this->type)) {
$this->type = self::TYPE_STANDARD;
}
if (isset($this->subtype)) {
$this->subtype = trim($this->subtype);
}
if (isset($this->ref)) {
$this->ref = trim($this->ref);
}
@@ -2490,6 +2494,9 @@ class Facture extends CommonInvoice
if (isset($this->retained_warranty)) {
$this->retained_warranty = (float) $this->retained_warranty;
}
if (!isset($this->fk_user_author) && isset($this->user_author) ) {
$this->fk_user_author = $this->user_author;
}
// Check parameters
@@ -2517,8 +2524,8 @@ class Facture extends CommonInvoice
$sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").",";
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
$sql .= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '') ? $this->db->escape($this->revenuestamp) : "null").",";
$sql .= " fk_statut=".(isset($this->status) ? $this->db->escape($this->status) : "null").",";
$sql .= " fk_user_author=".(isset($this->user_author) ? $this->db->escape($this->user_author) : "null").",";
$sql .= " fk_statut=".(isset($this->status) ? ((int) $this->status) : "null").",";
$sql .= " fk_user_author=".(isset($this->fk_user_author) ? ((int) $this->fk_user_author) : "null").",";
$sql .= " fk_user_valid=".(isset($this->fk_user_valid) ? $this->db->escape($this->fk_user_valid) : "null").",";
$sql .= " fk_facture_source=".(isset($this->fk_facture_source) ? $this->db->escape($this->fk_facture_source) : "null").",";
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->db->escape($this->fk_project) : "null").",";
@@ -4051,7 +4058,7 @@ class Facture extends CommonInvoice
* @param double $remise_percent Percentage discount of the line
* @param int $date_start Date de debut de validite du service
* @param int $date_end Date de fin de validite du service
* @param double $txtva VAT Rate (Can be '8.5', '8.5 (ABC)')
* @param double|string $txtva VAT Rate (Can be '8.5', '8.5 (ABC)')
* @param double $txlocaltax1 Local tax 1 rate
* @param double $txlocaltax2 Local tax 2 rate
* @param string $price_base_type HT or TTC
@@ -4207,6 +4214,11 @@ class Facture extends CommonInvoice
$rangmax = $this->line_max($fk_parent_line);
$this->line->rang = $rangmax + 1;
}
$apply_abs_price_on_credit_note=false;
if ($this->type == self::TYPE_CREDIT_NOTE && !getDolGlobalInt('FACTURE_ENABLE_NEGATIVE_LINES') && !getDolGlobalInt('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) {
$apply_abs_price_on_credit_note = true;
}
$this->line->id = $rowid;
$this->line->rowid = $rowid;
@@ -4223,14 +4235,14 @@ class Facture extends CommonInvoice
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
$this->line->remise_percent = $remise_percent;
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ? -abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
$this->line->subprice = ($apply_abs_price_on_credit_note ? -abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
$this->line->date_start = $date_start;
$this->line->date_end = $date_end;
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_tva) : $total_tva);
$this->line->total_ht = (($apply_abs_price_on_credit_note || $qty < 0) ? -abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
$this->line->total_tva = (($apply_abs_price_on_credit_note || $qty < 0) ? -abs($total_tva) : $total_tva);
$this->line->total_localtax1 = $total_localtax1;
$this->line->total_localtax2 = $total_localtax2;
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_ttc) : $total_ttc);
$this->line->total_ttc = (($apply_abs_price_on_credit_note || $qty < 0) ? -abs($total_ttc) : $total_ttc);
$this->line->info_bits = $info_bits;
$this->line->special_code = $special_code;
$this->line->product_type = $type;
@@ -4243,10 +4255,10 @@ class Facture extends CommonInvoice
$this->line->pa_ht = $pa_ht;
// Multicurrency
$this->line->multicurrency_subprice = ($this->type == self::TYPE_CREDIT_NOTE ? -abs($pu_ht_devise) : $pu_ht_devise); // For credit note, unit price always negative, always positive otherwise
$this->line->multicurrency_total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_ht) : $multicurrency_total_ht); // For credit note and if qty is negative, total is negative
$this->line->multicurrency_total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_tva) : $multicurrency_total_tva);
$this->line->multicurrency_total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_ttc) : $multicurrency_total_ttc);
$this->line->multicurrency_subprice = ($apply_abs_price_on_credit_note ? -abs($pu_ht_devise) : $pu_ht_devise); // For credit note, unit price always negative, always positive otherwise
$this->line->multicurrency_total_ht = (($apply_abs_price_on_credit_note || $qty < 0) ? -abs($multicurrency_total_ht) : $multicurrency_total_ht); // For credit note and if qty is negative, total is negative
$this->line->multicurrency_total_tva = (($apply_abs_price_on_credit_note || $qty < 0) ? -abs($multicurrency_total_tva) : $multicurrency_total_tva);
$this->line->multicurrency_total_ttc = (($apply_abs_price_on_credit_note || $qty < 0) ? -abs($multicurrency_total_ttc) : $multicurrency_total_ttc);
if (is_array($array_options) && count($array_options) > 0) {
// We replace values in this->line->array_options only for entries defined into $array_options
@@ -5703,209 +5715,212 @@ class Facture extends CommonInvoice
if ($resql) {
while ($obj = $this->db->fetch_object($resql)) {
if (!$error) {
// Load event
$res = $tmpinvoice->fetch($obj->id);
if ($res > 0) {
$tmpinvoice->fetch_thirdparty();
// Create a loopError that is reset at each loop, this counter is added to the global counter at the end of loop
$loopError = 0;
$outputlangs = new Translate('', $conf);
if ($tmpinvoice->thirdparty->default_lang) {
$outputlangs->setDefaultLang($tmpinvoice->thirdparty->default_lang);
$outputlangs->loadLangs(array("main", "bills"));
} else {
$outputlangs = $langs;
}
// Load event
$res = $tmpinvoice->fetch($obj->id);
if ($res > 0) {
$tmpinvoice->fetch_thirdparty();
// Select email template according to language of recipient
$arraymessage = $formmail->getEMailTemplate($this->db, 'facture_send', $user, $outputlangs, (is_numeric($template) ? $template : 0), 1, (is_numeric($template) ? '' : $template));
if (is_numeric($arraymessage) && $arraymessage <= 0) {
$langs->load("errors");
$this->output .= $langs->trans('ErrorFailedToFindEmailTemplate', $template);
return 0;
}
$outputlangs = new Translate('', $conf);
if ($tmpinvoice->thirdparty->default_lang) {
$outputlangs->setDefaultLang($tmpinvoice->thirdparty->default_lang);
$outputlangs->loadLangs(array("main", "bills"));
} else {
$outputlangs = $langs;
}
// PREPARE EMAIL
$errormesg = '';
// Select email template according to language of recipient
$arraymessage = $formmail->getEMailTemplate($this->db, 'facture_send', $user, $outputlangs, (is_numeric($template) ? $template : 0), 1, (is_numeric($template) ? '' : $template));
if (is_numeric($arraymessage) && $arraymessage <= 0) {
$langs->load("errors");
$this->output .= $langs->trans('ErrorFailedToFindEmailTemplate', $template);
return 0;
}
// Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, '', $tmpinvoice);
// PREPARE EMAIL
$errormesg = '';
complete_substitutions_array($substitutionarray, $outputlangs, $tmpinvoice);
// Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, '', $tmpinvoice);
// Topic
$sendTopic = make_substitutions(empty($arraymessage->topic) ? $outputlangs->transnoentitiesnoconv('InformationMessage') : $arraymessage->topic, $substitutionarray, $outputlangs, 1);
complete_substitutions_array($substitutionarray, $outputlangs, $tmpinvoice);
// Content
$content = $outputlangs->transnoentitiesnoconv($arraymessage->content);
// Topic
$sendTopic = make_substitutions(empty($arraymessage->topic) ? $outputlangs->transnoentitiesnoconv('InformationMessage') : $arraymessage->topic, $substitutionarray, $outputlangs, 1);
$sendContent = make_substitutions($content, $substitutionarray, $outputlangs, 1);
// Content
$content = $outputlangs->transnoentitiesnoconv($arraymessage->content);
// Recipient
$to = array();
if ($forcerecipient) { // If a recipient was forced
$to = array($forcerecipient);
} else {
$res = $tmpinvoice->fetch_thirdparty();
$recipient = $tmpinvoice->thirdparty;
if ($res > 0) {
$tmparraycontact = $tmpinvoice->liste_contact(-1, 'external', 0, 'BILLING');
if (is_array($tmparraycontact) && count($tmparraycontact) > 0) {
foreach ($tmparraycontact as $data_email) {
if (!empty($data_email['email'])) {
$to[] = $tmpinvoice->thirdparty->contact_get_property($data_email['id'], 'email');
}
$sendContent = make_substitutions($content, $substitutionarray, $outputlangs, 1);
// Recipient
$to = array();
if ($forcerecipient) { // If a recipient was forced
$to = array($forcerecipient);
} else {
$res = $tmpinvoice->fetch_thirdparty();
$recipient = $tmpinvoice->thirdparty;
if ($res > 0) {
$tmparraycontact = $tmpinvoice->liste_contact(-1, 'external', 0, 'BILLING');
if (is_array($tmparraycontact) && count($tmparraycontact) > 0) {
foreach ($tmparraycontact as $data_email) {
if (!empty($data_email['email'])) {
$to[] = $tmpinvoice->thirdparty->contact_get_property($data_email['id'], 'email');
}
}
if (empty($to) && !empty($recipient->email)) {
$to[] = $recipient->email;
}
if (empty($to)) {
$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for invoice or customer.";
$error++;
}
} else {
$errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->socid;
$error++;
}
if (empty($to) && !empty($recipient->email)) {
$to[] = $recipient->email;
}
if (empty($to)) {
$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for invoice or customer.";
$loopError++;
}
} else {
$errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->socid;
$loopError++;
}
// Sender
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
if (!empty($arraymessage->email_from)) { // If a sender is defined into template, we use it in priority
$from = $arraymessage->email_from;
}
if (empty($from)) {
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
$error++;
}
if (!$error && !empty($to)) {
$this->db->begin();
$to = implode(',', $to);
if (!empty($arraymessage->email_to)) { // If a recipient is defined into template, we add it
$to = $to.','.$arraymessage->email_to;
}
// Errors Recipient
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;
$trackid = 'inv'.$tmpinvoice->id;
$sendcontext = 'standard';
$email_tocc = '';
if (!empty($arraymessage->email_tocc)) { // If a CC is defined into template, we use it
$email_tocc = $arraymessage->email_tocc;
}
$email_tobcc = '';
if (!empty($arraymessage->email_tobcc)) { // If a BCC is defined into template, we use it
$email_tobcc = $arraymessage->email_tobcc;
}
//join file is asked
$joinFile = [];
$joinFileName = [];
$joinFileMime = [];
if ($arraymessage->joinfiles == 1 && !empty($tmpinvoice->last_main_doc)) {
$joinFile[] = DOL_DATA_ROOT.'/'.$tmpinvoice->last_main_doc;
$joinFileName[] = basename($tmpinvoice->last_main_doc);
$joinFileMime[] = dol_mimetype(DOL_DATA_ROOT.'/'.$tmpinvoice->last_main_doc);
}
// Mail Creation
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, $joinFile, $joinFileMime, $joinFileName, $email_tocc, $email_tobcc, 0, 1, $errors_to, '', $trackid, '', $sendcontext, '');
// Sending Mail
if ($cMailFile->sendfile()) {
$nbMailSend++;
// Add a line into event table
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
// Insert record of emails sent
$actioncomm = new ActionComm($this->db);
$actioncomm->type_code = 'AC_OTH_AUTO'; // Event insert into agenda automatically
$actioncomm->socid = $tmpinvoice->thirdparty->id; // To link to a company
$actioncomm->contact_id = 0;
$actioncomm->code = 'AC_EMAIL';
$actioncomm->label = 'sendEmailsRemindersOnInvoiceDueDateOK (nbdays='.$nbdays.' paymentmode='.$paymentmode.' template='.$template.' datetouse='.$datetouse.' forcerecipient='.$forcerecipient.')';
$actioncomm->note_private = $sendContent;
$actioncomm->fk_project = $tmpinvoice->fk_project;
$actioncomm->datep = dol_now();
$actioncomm->datef = $actioncomm->datep;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action
// Fields when action is an email (content should be added into note)
$actioncomm->email_msgid = $cMailFile->msgid;
$actioncomm->email_subject = $sendTopic;
$actioncomm->email_from = $from;
$actioncomm->email_sender = '';
$actioncomm->email_to = $to;
//$actioncomm->email_tocc = $sendtocc;
//$actioncomm->email_tobcc = $sendtobcc;
//$actioncomm->email_subject = $subject;
$actioncomm->errors_to = $errors_to;
$actioncomm->elementtype = 'invoice';
$actioncomm->fk_element = $tmpinvoice->id;
//$actioncomm->extraparams = $extraparams;
$actioncomm->create($user);
} else {
$errormesg = $cMailFile->error.' : '.$to;
$error++;
// Add a line into event table
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
// Insert record of emails sent
$actioncomm = new ActionComm($this->db);
$actioncomm->type_code = 'AC_OTH_AUTO'; // Event insert into agenda automatically
$actioncomm->socid = $tmpinvoice->thirdparty->id; // To link to a company
$actioncomm->contact_id = 0;
$actioncomm->code = 'AC_EMAIL';
$actioncomm->label = 'sendEmailsRemindersOnInvoiceDueDateKO';
$actioncomm->note_private = $errormesg;
$actioncomm->fk_project = $tmpinvoice->fk_project;
$actioncomm->datep = dol_now();
$actioncomm->datef = $actioncomm->datep;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action
// Fields when action is an email (content should be added into note)
$actioncomm->email_msgid = $cMailFile->msgid;
$actioncomm->email_from = $from;
$actioncomm->email_sender = '';
$actioncomm->email_to = $to;
//$actioncomm->email_tocc = $sendtocc;
//$actioncomm->email_tobcc = $sendtobcc;
//$actioncomm->email_subject = $subject;
$actioncomm->errors_to = $errors_to;
//$actioncomm->extraparams = $extraparams;
$actioncomm->create($user);
}
$this->db->commit(); // We always commit
}
if ($errormesg) {
$errorsMsg[] = $errormesg;
}
} else {
$errorsMsg[] = 'Failed to fetch record invoice with ID = '.$obj->id;
$error++;
}
// Sender
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
if (!empty($arraymessage->email_from)) { // If a sender is defined into template, we use it in priority
$from = $arraymessage->email_from;
}
if (empty($from)) {
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
$loopError++;
}
if (!$loopError && !empty($to)) {
$this->db->begin();
$to = implode(',', $to);
if (!empty($arraymessage->email_to)) { // If a recipient is defined into template, we add it
$to = $to.','.$arraymessage->email_to;
}
// Errors Recipient
$errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');
$trackid = 'inv'.$tmpinvoice->id;
$sendcontext = 'standard';
$email_tocc = '';
if (!empty($arraymessage->email_tocc)) { // If a CC is defined into template, we use it
$email_tocc = $arraymessage->email_tocc;
}
$email_tobcc = '';
if (!empty($arraymessage->email_tobcc)) { // If a BCC is defined into template, we use it
$email_tobcc = $arraymessage->email_tobcc;
}
//join file is asked
$joinFile = [];
$joinFileName = [];
$joinFileMime = [];
if ($arraymessage->joinfiles == 1 && !empty($tmpinvoice->last_main_doc)) {
$joinFile[] = DOL_DATA_ROOT.'/'.$tmpinvoice->last_main_doc;
$joinFileName[] = basename($tmpinvoice->last_main_doc);
$joinFileMime[] = dol_mimetype(DOL_DATA_ROOT.'/'.$tmpinvoice->last_main_doc);
}
// Mail Creation
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, $joinFile, $joinFileMime, $joinFileName, $email_tocc, $email_tobcc, 0, 1, $errors_to, '', $trackid, '', $sendcontext, '');
// Sending Mail
if ($cMailFile->sendfile()) {
$nbMailSend++;
// Add a line into event table
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
// Insert record of emails sent
$actioncomm = new ActionComm($this->db);
$actioncomm->type_code = 'AC_OTH_AUTO'; // Event insert into agenda automatically
$actioncomm->socid = $tmpinvoice->thirdparty->id; // To link to a company
$actioncomm->contact_id = 0;
$actioncomm->code = 'AC_EMAIL';
$actioncomm->label = 'sendEmailsRemindersOnInvoiceDueDateOK (nbdays='.$nbdays.' paymentmode='.$paymentmode.' template='.$template.' datetouse='.$datetouse.' forcerecipient='.$forcerecipient.')';
$actioncomm->note_private = $sendContent;
$actioncomm->fk_project = $tmpinvoice->fk_project;
$actioncomm->datep = dol_now();
$actioncomm->datef = $actioncomm->datep;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action
// Fields when action is an email (content should be added into note)
$actioncomm->email_msgid = $cMailFile->msgid;
$actioncomm->email_subject = $sendTopic;
$actioncomm->email_from = $from;
$actioncomm->email_sender = '';
$actioncomm->email_to = $to;
//$actioncomm->email_tocc = $sendtocc;
//$actioncomm->email_tobcc = $sendtobcc;
//$actioncomm->email_subject = $subject;
$actioncomm->errors_to = $errors_to;
$actioncomm->elementtype = 'invoice';
$actioncomm->fk_element = $tmpinvoice->id;
//$actioncomm->extraparams = $extraparams;
$actioncomm->create($user);
} else {
$errormesg = $cMailFile->error.' : '.$to;
$loopError++;
// Add a line into event table
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
// Insert record of emails sent
$actioncomm = new ActionComm($this->db);
$actioncomm->type_code = 'AC_OTH_AUTO'; // Event insert into agenda automatically
$actioncomm->socid = $tmpinvoice->thirdparty->id; // To link to a company
$actioncomm->contact_id = 0;
$actioncomm->code = 'AC_EMAIL';
$actioncomm->label = 'sendEmailsRemindersOnInvoiceDueDateKO';
$actioncomm->note_private = $errormesg;
$actioncomm->fk_project = $tmpinvoice->fk_project;
$actioncomm->datep = dol_now();
$actioncomm->datef = $actioncomm->datep;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action
// Fields when action is an email (content should be added into note)
$actioncomm->email_msgid = $cMailFile->msgid;
$actioncomm->email_from = $from;
$actioncomm->email_sender = '';
$actioncomm->email_to = $to;
//$actioncomm->email_tocc = $sendtocc;
//$actioncomm->email_tobcc = $sendtobcc;
//$actioncomm->email_subject = $subject;
$actioncomm->errors_to = $errors_to;
//$actioncomm->extraparams = $extraparams;
$actioncomm->create($user);
}
$this->db->commit(); // We always commit
}
if ($errormesg) {
$errorsMsg[] = $errormesg;
}
} else {
$errorsMsg[] = 'Failed to fetch record invoice with ID = '.$obj->id;
$loopError++;
}
$error += $loopError;
}
} else {
$error++;
@@ -6390,7 +6405,7 @@ class FactureLigne extends CommonInvoiceLine
// If fk_remise_except is defined, the discount is linked to the invoice
// which flags it as "consumed".
if ($this->fk_remise_except) {
if ($this->fk_remise_except && empty($error)) {
$discount = new DiscountAbsolute($this->db);
$result = $discount->fetch($this->fk_remise_except);
if ($result >= 0) {
@@ -6427,7 +6442,7 @@ class FactureLigne extends CommonInvoiceLine
}
}
if (!$notrigger) {
if (!$notrigger && empty($error)) {
// Call trigger
$result = $this->call_trigger('LINEBILL_INSERT', $user);
if ($result < 0) {
@@ -6437,8 +6452,17 @@ class FactureLigne extends CommonInvoiceLine
// End call triggers
}
$this->db->commit();
return $this->id;
if (!$error) {
$this->db->commit();
return $this->id;
}
foreach ($this->errors as $errmsg) {
dol_syslog(get_class($this)."::insert ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
}
$this->db->rollback();
return -1 * $error;
} else {
$this->error = $this->db->lasterror();
$this->db->rollback();
@@ -6609,8 +6633,18 @@ class FactureLigne extends CommonInvoiceLine
}
// End call triggers
}
$this->db->commit();
return 1;
if (!$error) {
$this->db->commit();
return 1;
}
foreach ($this->errors as $errmsg) {
dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
}
$this->db->rollback();
return -1 * $error;
} else {
$this->error = $this->db->error();
$this->db->rollback();

View File

@@ -68,9 +68,9 @@ if (!$sortfield) {
}
$object = new Facture($db);
if ($object->fetch($id, $ref)) {
if ($object->fetch($id, $ref) > 0) {
$object->fetch_thirdparty();
$upload_dir = $conf->facture->dir_output."/".dol_sanitizeFileName($object->ref);
$upload_dir = $conf->facture->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
}
$permissiontoadd = $user->hasRight('facture', 'creer');
@@ -119,7 +119,6 @@ if ($id > 0 || !empty($ref)) {
if ($object->fetch($id, $ref) > 0) {
$object->fetch_thirdparty();
$upload_dir = $conf->facture->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
$head = facture_prepare_head($object);
print dol_get_fiche_head($head, 'documents', $langs->trans('InvoiceCustomer'), -1, 'bill');

View File

@@ -436,8 +436,8 @@ if ($action == 'makepayment_confirm' && $user->hasRight('facture', 'paiement'))
$paiementAmount = $facture->getSommePaiement();
$totalcreditnotes = $facture->getSumCreditNotesUsed();
$totaldeposits = $facture->getSumDepositsUsed();
$totalpay = $paiementAmount + $totalcreditnotes + $totaldeposits;
$remaintopay = price2num($facture->total_ttc - $totalpay);
$totalallpayments = $paiementAmount + $totalcreditnotes + $totaldeposits;
$remaintopay = price2num($facture->total_ttc - $totalallpayments);
if ($remaintopay != 0) {
$resultBank = $facture->setBankAccount($bankid);
if ($resultBank < 0) {
@@ -2076,7 +2076,9 @@ if ($num > 0) {
}
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($obj->ref);
$filepath = $conf->facture->multidir_output[$obj->entity] ?? $conf->facture->dir_output;
$filedir = $filepath . '/' . $filename;
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->id;
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
print '</td>';

View File

@@ -86,11 +86,21 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '</td>';
print '<td class="linkedcol-statut right">';
$totalallpayments = 0;
$totalcalculated = false;
if (method_exists($objectlink, 'getSommePaiement')) {
print $objectlink->getLibStatut(3, $objectlink->getSommePaiement());
} else {
print $objectlink->getLibStatut(3);
$totalcalculated = true;
$totalallpayments += $objectlink->getSommePaiement();
}
if (method_exists($objectlink, 'getSumDepositsUsed')) {
$totalcalculated = true;
$totalallpayments += $objectlink->getSumDepositsUsed();
}
if (method_exists($objectlink, 'getSumCreditNotesUsed')) {
$totalcalculated = true;
$totalallpayments += $objectlink->getSumCreditNotesUsed();
}
print $objectlink->getLibStatut(3, ($totalcalculated ? $totalallpayments : -1));
print '</td>';
print '<td class="linkedcol-action 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>';
print "</tr>\n";

View File

@@ -215,6 +215,9 @@ if (isModEnabled('facture') && $user->hasRight('facture', 'lire')) {
$thirdpartystatic->code_compta = $obj->code_compta;
//$thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
$totalallpayments = $tmpinvoice->getSommePaiement(0);
$totalallpayments += $tmpinvoice->getSumCreditNotesUsed(0);
$totalallpayments += $tmpinvoice->getSumDepositsUsed(0);
print '<tr class="oddeven">';
print '<td class="nowrap">';
@@ -247,7 +250,7 @@ if (isModEnabled('facture') && $user->hasRight('facture', 'lire')) {
print '<td class="right" title="'.dol_escape_htmltag($langs->trans("DateModificationShort").' : '.dol_print_date($db->jdate($obj->tms), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->tms), 'day', 'tzuserrel').'</td>';
print '<td>'.$tmpinvoice->getLibStatut(3, $obj->am).'</td>';
print '<td>'.$tmpinvoice->getLibStatut(3, $totalallpayments).'</td>';
print '</tr>';
@@ -377,6 +380,8 @@ if ((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMO
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).'</span></td>';
print '<td class="right" title="'.dol_escape_htmltag($langs->trans("DateModificationShort").' : '.dol_print_date($db->jdate($obj->tms), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->tms), 'day', 'tzuserrel').'</td>';
$alreadypaid = $facstatic->getSommePaiement();
$alreadypaid += $facstatic->getSumCreditNotesUsed();
$alreadypaid += $facstatic->getSumDepositsUsed();
print '<td>'.$facstatic->getLibStatut(3, $alreadypaid).'</td>';
print '</tr>';
$total_ht += $obj->total_ht;

View File

@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2012 Alexandre spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2025 Alexandre spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 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
@@ -120,6 +120,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
$sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
$sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
$sql .= " WHERE f.fk_statut > 0 AND f.entity IN (".getEntity('invoice').")";
$sql .= " AND ct.entity IN (".getEntity('invoice').")";
if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
$sql .= " AND f.type IN (0,1,2)";
} else {

View File

@@ -1,13 +1,13 @@
<?php
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2012 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 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
@@ -130,6 +130,7 @@ $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
$sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = ".((int) $idpays);
$sql .= " WHERE f.entity IN (".getEntity('invoice').")";
$sql .= " AND ct.entity IN (".getEntity('invoice').")";
$sql .= " AND f.fk_statut > 0";
if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";

View File

@@ -446,7 +446,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) { // $
print '<tr class="oddeven">';
print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month='.$m.'&year='.$y.'">'.dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y").'</a></td>';
print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month='.$m.'&year='.$y.'&localTaxType='.$localTaxType.'">'.dol_print_date(dol_mktime(0, 0, 0, (int) $m, 1, (int) $y), "%b %Y").'</a></td>';
$x_coll_sum = 0;
foreach (array_keys($x_coll) as $rate) {

View File

@@ -544,7 +544,7 @@ if ($action == 'new') {
if (count($lines[$bid])) {
foreach ($lines[$bid] as $lid => $value) {
print '<tr class="oddeven">';
print '<td>'.dol_print_date($value["date"], 'day').'</td>';
print '<td>'.dol_print_date($value["paymentdate"], 'day').'</td>';
print '<td>'.$value["numero"]."</td>\n";
print '<td>'.$value["emetteur"]."</td>\n";
print '<td>'.$value["banque"]."</td>\n";

View File

@@ -1270,7 +1270,7 @@ class Paiement extends CommonObject
$facturestatic = new Facture($this->db);
foreach ($arraybill as $billid) {
$facturestatic->fetch($billid);
$label .= '<br> '.$facturestatic->getNomUrl(1, '', 0, 0, '', 1).' '.$facturestatic->getLibStatut(2, 1);
$label .= '<br> '.$facturestatic->getNomUrl(1, '', 0, 0, '', 1).' '.$facturestatic->getLibStatut(2, -1);
}
}
}

View File

@@ -749,6 +749,11 @@ while ($i < $imaxinloop) {
}
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Status
if (!empty($arrayfields['p.statut']['checked'])) {
print '<td class="right">';

View File

@@ -51,7 +51,7 @@ $charge = new ChargeSociales($db);
* Actions
*/
if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'yes')) {
if ($action == 'add_payment') {
$error = 0;
if ($cancel) {
@@ -89,7 +89,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
}
}
if (count($amounts) <= 0) {
if (empty($amounts)) {
$error++;
setEventMessages($langs->trans("ErrorNoPaymentDefined"), null, 'errors');
$action = 'create';
@@ -119,9 +119,9 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
if (!$error) {
$result = $paiement->addPaymentToBank($user, 'payment_sc', '(SocialContributionPayment)', GETPOST('accountid', 'int'), '', '');
if (!($result > 0)) {
if ($result <= 0) {
$error++;
setEventMessages($paiement->error, null, 'errors');
setEventMessages($paiement->error, $paiement->errors, 'errors');
$action = 'create';
}
}

View File

@@ -101,7 +101,7 @@ print '</span></td></tr></table></div><br>';
/*
* Invoices waiting for withdraw
*/
$sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,";
$sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut as status, f.paye, f.type,";
$sql .= " pfd.date_demande, pfd.amount,";
$sql .= " s.nom as name, s.email, s.rowid as socid, s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,";
@@ -141,10 +141,13 @@ if ($resql) {
$invoicestatic->id = $obj->rowid;
$invoicestatic->ref = $obj->ref;
$invoicestatic->statut = $obj->fk_statut;
$invoicestatic->statut = $obj->status;
$invoicestatic->status = $obj->status;
$invoicestatic->paye = $obj->paye;
$invoicestatic->type = $obj->type;
$alreadypayed = $invoicestatic->getSommePaiement();
$totalallpayments = $invoicestatic->getSommePaiement(0);
$totalallpayments += $invoicestatic->getSumCreditNotesUsed(0);
$totalallpayments += $invoicestatic->getSumDepositsUsed(0);
$thirdpartystatic->id = $obj->socid;
$thirdpartystatic->name = $obj->name;
@@ -177,7 +180,7 @@ if ($resql) {
print '</td>';
print '<td class="right">';
print $invoicestatic->getLibStatut(3, $alreadypayed);
print $invoicestatic->getLibStatut(3, $totalallpayments);
print '</td>';
print '</tr>';
$i++;

View File

@@ -168,7 +168,12 @@ if ($id) {
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
print $id.'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("WithdrawalsReceipts").'</td><td>';
if ($type == 'bank-transfer') {
print '<tr><td class="titlefield">'.$langs->trans("BankTransfers").'</td><td>';
} else {
print '<tr><td class="titlefield">'.$langs->trans("WithdrawalsReceipts").'</td><td>';
}
print $bon->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec, 'day').'</td></tr>';

View File

@@ -472,7 +472,7 @@ while ($i < $imaxinloop) {
print '<td>';
print $line->LibStatut($obj->statut_ligne, 2);
print "&nbsp;";
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid_ligne.'">';
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid_ligne.($type == 'bank-transfer' ? '&type=bank-transfer' : '').'">';
print substr('000000'.$obj->rowid_ligne, -6);
print '</a></td>';

View File

@@ -152,7 +152,11 @@ if (($massaction == "delete" || ($action == 'delete' && $confirm == 'yes')) && $
}
$objectclass = 'BonPrelevement';
$objectlabel = 'BonPrelevement';
$uploaddir = $conf->prelevement->dir_output;
if ($type == 'bank-transfer') {
$uploaddir = $conf->paymentbybanktransfer->dir_output;
} else {
$uploaddir = $conf->prelevement->dir_output;
}
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
/*

View File

@@ -162,7 +162,7 @@ if ($result) {
print '<td>';
print $line->LibStatut($obj->statut, 2).'&nbsp;';
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid.'">';
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid.($type == 'bank-transfer' ? '&type=bank-transfer' : '').'">';
print substr('000000'.$obj->rowid, -6)."</a></td>";
if ($bon->checkIfSalaryBonPrelevement()) {

View File

@@ -159,7 +159,9 @@ if ($id > 0) {
print $fac->error."<br>";
continue;
}
$totalpaid = $fac->getSommePaiement();
$alreadypaid = $fac->getSommePaiement();
$alreadypaid += $fac->getSumDepositsUsed();
$alreadypaid += $fac->getSumCreditNotesUsed();
$userstatic->id = $objf->userid;
$userstatic->login = $objf->login;
@@ -169,7 +171,7 @@ if ($id > 0) {
'date' => $fac->date,
'datefieldforsort' => $fac->date.'-'.$fac->ref,
'link' => $fac->getNomUrl(1),
'status' => $fac->getLibStatut(2, $totalpaid),
'status' => $fac->getLibStatut(2, $alreadypaid),
'amount' => $fac->total_ttc,
'author' => $userstatic->getLoginUrl(1)
);

View File

@@ -505,33 +505,37 @@ if ($modecompta == 'CREANCES-DETTES') {
$yeartoprocess++;
}
//var_dump($monthtoprocess.'_'.$yeartoprocess);
if (isset($cpt['account_number'])) {
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, empty($cat['dc']) ? 0 : $cat['dc'], 'nofilter', $monthtoprocess, $yeartoprocess);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultM = 0;
if (($yeartoprocess == $start_year && ($k + 1) >= $date_startmonth && $k < $date_endmonth) ||
($yeartoprocess == $start_year + 1 && ($k + 1) < $date_startmonth)
) {
//var_dump($monthtoprocess.'_'.$yeartoprocess);
if (isset($cpt['account_number'])) {
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, empty($cat['dc']) ? 0 : $cat['dc'], 'nofilter', $monthtoprocess, $yeartoprocess);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultM = 0;
} else {
$resultM = $AccCat->sdc;
}
} else {
$resultM = $AccCat->sdc;
$resultM = 0;
}
if (empty($totCat['M'][$k])) {
$totCat['M'][$k] = $resultM;
} else {
$totCat['M'][$k] += $resultM;
}
if (empty($sommes[$code]['M'][$k])) {
$sommes[$code]['M'][$k] = $resultM;
} else {
$sommes[$code]['M'][$k] += $resultM;
}
if (isset($cpt['account_number'])) {
$totPerAccount[$cpt['account_number']]['M'][$k] = $resultM;
}
} else {
$resultM = 0;
}
if (empty($totCat['M'][$k])) {
$totCat['M'][$k] = $resultM;
} else {
$totCat['M'][$k] += $resultM;
}
if (empty($sommes[$code]['M'][$k])) {
$sommes[$code]['M'][$k] = $resultM;
} else {
$sommes[$code]['M'][$k] += $resultM;
}
if (isset($cpt['account_number'])) {
$totPerAccount[$cpt['account_number']]['M'][$k] = $resultM;
}
$resultN += $resultM;
$resultN += $resultM;
}
}
if (empty($totCat)) {

View File

@@ -598,7 +598,6 @@ class PaymentSocialContribution extends CommonObject
$result = $this->update_fk_bank($bank_line_id);
if ($result <= 0) {
$error++;
dol_print_error($this->db);
}
// Add link 'payment', 'payment_supplier', 'payment_sc' in bank_url between payment and bank transaction
@@ -610,7 +609,7 @@ class PaymentSocialContribution extends CommonObject
$result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode);
if ($result <= 0) {
$error++;
dol_print_error($this->db);
$this->setErrorsFromObject($acc);
}
}
@@ -622,7 +621,8 @@ class PaymentSocialContribution extends CommonObject
$socialcontrib->fetch($key);
$result = $acc->add_url_line($bank_line_id, $socialcontrib->id, DOL_URL_ROOT.'/compta/charges.php?id=', $socialcontrib->type_label.(($socialcontrib->lib && $socialcontrib->lib != $socialcontrib->type_label) ? ' ('.$socialcontrib->lib.')' : ''), 'sc');
if ($result <= 0) {
dol_print_error($this->db);
$this->setErrorsFromObject($acc);
$error++;
}
if ($socialcontrib->fk_user) {
@@ -639,14 +639,14 @@ class PaymentSocialContribution extends CommonObject
);
if ($result <= 0) {
$this->error = $acc->error;
$this->setErrorsFromObject($acc);
$error++;
}
}
}
}
} else {
$this->error = $acc->error;
$this->setErrorsFromObject($acc);
$error++;
}
}

View File

@@ -724,7 +724,8 @@ while ($i < $imaxinloop) {
}
if (!empty($arrayfields['t.status']['checked'])) {
print '<td class="nowrap right">' . $tva_static->getLibStatut(5, $obj->alreadypayed) . '</td>';
$totalallpayments = $obj->alreadypayed;
print '<td class="nowrap right">' . $tva_static->getLibStatut(5, $totalallpayments) . '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@@ -767,9 +767,6 @@ if (empty($reshook)) {
$price_ht = price2num(GETPOST('elprice'), 'MU');
$remise_percent = price2num(GETPOST('elremise_percent'), '', 2);
if ($remise_percent > 0) {
$remise = round(($price_ht * $remise_percent / 100), 2);
}
$objectline->fk_product = GETPOST('idprod', 'int');
$objectline->description = GETPOST('product_desc', 'restricthtml');
@@ -1988,7 +1985,9 @@ if ($action == 'create') {
if ($objp->fk_product > 0) {
$product = new Product($db);
$product->fetch($objp->fk_product);
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit);
if (!empty($product->duration_value) && !empty($product->duration_unit)) {
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit);
}
}
}
@@ -2282,7 +2281,7 @@ if ($action == 'create') {
print '<br><!-- Link to sign -->';
require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
print showOnlineSignatureUrl('contract', $object->ref).'<br>';
print showOnlineSignatureUrl('contract', $object->ref, $object).'<br>';
}
print '</div><div class="fichehalfright">';

View File

@@ -519,7 +519,13 @@ class Contracts extends DolibarrApi
continue;
}
$this->contract->$field = $value;
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);
}
continue;
}
$this->contract->$field = $this->_checkValForAPI($field, $value, $this->contract);
}
if ($this->contract->update(DolibarrApiAccess::$user) > 0) {

View File

@@ -3273,7 +3273,7 @@ class ContratLigne extends CommonObjectLine
*
* @param int $id Id object
* @param string $ref Ref of contract line
* @return int Return integer <0 if KO, >0 if OK
* @return int Return integer <0 if KO, >0 if OK, 0 if not found
*/
public function fetch($id, $ref = '')
{
@@ -3291,7 +3291,7 @@ class ContratLigne extends CommonObjectLine
$sql .= " t.label,"; // This field is not used. Only label of product
$sql .= " p.ref as product_ref,";
$sql .= " p.label as product_label,";
$sql .= " p.description as product_desc,";
$sql .= " p.description as product_description,";
$sql .= " p.fk_product_type as product_type,";
$sql .= " t.description,";
$sql .= " t.date_commande,";
@@ -3393,6 +3393,9 @@ class ContratLigne extends CommonObjectLine
$this->rang = $obj->rang;
$this->fetch_optionals();
} else {
$this->db->free($resql);
return 0;
}
$this->db->free($resql);
@@ -3819,15 +3822,13 @@ class ContratLigne extends CommonObjectLine
$error = 0;
// statut actif : 4
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET statut = ".((int) ContratLigne::STATUS_CLOSED).",";
$sql .= " date_cloture = '".$this->db->idate($date_end_real)."',";
$sql .= " fk_user_cloture = ".((int) $user->id).",";
$sql .= " commentaire = '".$this->db->escape($comment)."'";
$sql .= " WHERE rowid = ".((int) $this->id)." AND statut = ".((int) ContratLigne::STATUS_OPEN);
$sql .= " WHERE rowid = ".((int) $this->id)." AND statut <> ".((int) ContratLigne::STATUS_CLOSED);
$resql = $this->db->query($sql);
if ($resql) {

View File

@@ -376,7 +376,10 @@ if (!empty($filter_opcloture) && $filter_opcloture == ' BETWEEN ') {
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
//print $sql;
// Add where from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
// Count total nb of records
$nbtotalofrecords = '';
@@ -488,6 +491,10 @@ if ($filter_datecloture_start != '') {
}
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// Add $param from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$param .= $hookmanager->resPrint;
// List of mass actions available
$arrayofmassactions = array(

View File

@@ -358,7 +358,7 @@ if ($action == "update_extras" && GETPOST('id', 'int') > 0 && !empty($permission
$object->oldcopy = dol_clone($object, 2);
$attribute = GETPOST('attribute', 'alphanohtml');
$attribute = GETPOST('attribute', 'aZ09');
$error = 0;

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