Compare commits

..

974 Commits

Author SHA1 Message Date
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
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
ldestailleur
96a74c4976 Disable this test where result is not predicable 2025-09-04 14:13:13 +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
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
lvessiller-opendsi
3362a6b06d FIX The combo of custom groups has disappeared (backport v19) (#35016) 2025-08-20 19:03:18 +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
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
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
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
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
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
df60ce695c Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-07-15 18:09:34 +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
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
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
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
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
75c3456743 FIX #34654 2025-06-28 13:14:11 +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
8159249209 Fix changelog 2025-06-22 17:26:59 +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
719de0aef3 Disable not working github actions 2025-06-19 10:51:51 +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
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
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
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
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
William Mead
1aaa29ad9e Fixed expense report permission. Added contributor details. (#34368) 2025-06-08 14:37:23 +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
lvessiller-opendsi
ce0f46a483 FIX local taxes text in PDF (#34343) 2025-06-03 17:03:15 +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
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
lvessiller-opendsi
efb9327896 FIX local taxes text in object line view mode (#34103) 2025-05-12 20:09:16 +02:00
Frédéric FRANCE
223f0c2763 fix translation (#34086) 2025-05-09 23:46:07 +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
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
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
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
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
ThomasNgr-OpenDSI
7fa3474ecd FIX : constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799) 2025-04-09 15:44:51 +02:00
Marc de Lima Lucio
363b05d314 FIX: warehouse list: broken status filter (#33667) 2025-04-02 12:30:53 +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
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
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
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
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
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
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
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
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
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
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
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 (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)
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
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
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)
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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 (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 (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
Benoît PASCAL
425c23d28c fix: fetch action linked object 2024-12-19 15:38:19 +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
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
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
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
Laurent Destailleur (aka Eldy)
3c22179183 Rename file 2024-12-09 14:20:28 +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)
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
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
Irvine Fleith
3aad5fd283 Added new error message for CRON createRecurringInvoice 2024-12-05 09:02:51 +01:00
Frédéric FRANCE
d04b1e57d2 Merge branch '18.0' into patch-10 2024-12-03 21:39:47 +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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
792ff4044e Typo 2024-11-13 12:08:46 +01:00
Laurent Destailleur
29ef86a245 Typo 2024-11-13 11:51:32 +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
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
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
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
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
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
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
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
0e62008db6 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-24 18:03:59 +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
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
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
a0b791a4a6 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-19 13:59:35 +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
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
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
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
94ed718782 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-10-07 15:15:01 +02:00
Laurent Destailleur
40965b63b5 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-10-07 15:13:17 +02:00
Laurent Destailleur
3391d3db05 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-10-07 15:12:00 +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
Laurent Destailleur
63d4b5e3d8 FIX Backport fix fatal error on price with some truncating setup 2024-10-06 22:17:26 +02:00
atm-irvine
f287d100a3 Use <= 0 instead of ! because delete method returns -1 or 1 (#31268)
* Use <= 0 instead of ! because delete method returns -1 or 1

* Added contact

* Removed user from parameters
2024-10-04 11:49:44 +02:00
thomas-Ngr
336d3ad8e5 finish fix (#31203) 2024-10-03 21:03:13 +02:00
cbeasley-sbb
9af212a542 Update ticket.class.php Bug-fix Issue #31206 (#31208)
Fix Issue #31206 for the v.18 branch because unrelated tests failing on develop branch.
2024-10-03 20:33:02 +02:00
thomas-Ngr
e71631abe0 fix : missing update for extrafields on holidays (#31256) 2024-10-03 19:33:33 +02:00
Sylvain Legrand
5d58a33f37 Fix tz array (#31240)
The list of time zones included in the 'get_tz_array()' function no longer matches the list of zones supported by PHP!
See the pages "https://www.php.net/manual/fr/timezones.php"

When using these values, this caused a 500 error: "PHP Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (Pacific/Enderbury) " for example =>
$arraytz = get_tz_array();
foreach ($arraytz as $key => $value) {
$date = new DateTime();
$date->setTimezone(new DateTimeZone($value));
}

When several zone names could be used for the same time zone, I favored the canonical name (The primary, preferred zone name).
See the table "https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
2024-10-03 15:38:41 +02:00
Laurent Destailleur
25ea797aed Fix not default template for BOM 2024-09-30 18:26:24 +02:00
Laurent Destailleur
97eacefa6b Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-29 22:41:54 +02:00
Laurent Destailleur
f5fbbcfcb8 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-09-29 22:40:45 +02:00
Laurent Destailleur
2c67c8b6ff Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-09-29 22:32:01 +02:00
Laurent Destailleur
d0fb08adf4 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-09-29 22:31:42 +02:00
Laurent Destailleur
624493fb26 Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-09-29 22:30:07 +02:00
Laurent Destailleur
6eddee9a78 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0 2024-09-29 22:29:19 +02:00
Laurent Destailleur
52138372ce Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2024-09-29 22:27:54 +02:00
Laurent Destailleur
a27538f582 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2024-09-29 22:27:42 +02:00
Florian Mortgat
385927fe06 FIX: box_actions.php still uses fk_user_done which no longer exists (#31190)
Co-authored-by: FlorianMortgat <5845502+FlorianMortgat@users.noreply.github.com>
2024-09-29 22:18:18 +02:00
Laurent Destailleur
a621032643 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:28:05 +02:00
Laurent Destailleur
32646cb7f4 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:25:49 +02:00
Florian Mortgat
74b67eb6c6 FIX - use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165) 2024-09-29 15:57:05 +02:00
Florian Mortgat
231fc6ce70 FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167) 2024-09-29 15:27:24 +02:00
Laurent Destailleur
1dfc091c9b Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-26 19:11:23 +02:00
Laurent Destailleur
df7fffcab3 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-09-26 19:10:44 +02:00
Laurent Destailleur
b517e068ed Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-09-26 19:09:54 +02:00
Laurent Destailleur
8a330ecaa9 Merge remote-tracking branch 'origin/14.0' into 15.0 2024-09-26 19:07:02 +02:00
Laurent Destailleur
eef0d0bddb Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-09-26 18:48:45 +02:00
Laurent Destailleur
c1889afd7b Merge remote-tracking branch 'origin/12.0' into 13.0 2024-09-26 18:47:39 +02:00
Laurent Destailleur
644f365455 Merge remote-tracking branch 'origin/11.0' into 12.0 2024-09-26 18:47:12 +02:00
Laurent Destailleur
667890247c Merge remote-tracking branch 'origin/10.0' into 11.0 2024-09-26 18:46:30 +02:00
Florian Mortgat
c727bbb530 FIX: when qty is not an integer, apply price() (#31138)
* FIX: when qty is not an integer, apply price() to avoid displaying precision errors if php.ini's precision settings are too high

* Apply eldy's suggestion to use price's parameters rather than a test
2024-09-26 18:41:41 +02:00
UltraViolet33
79edf0fb15 Fix delete commande fournisseur line linked to commandedet (#31136)
When a commande fournisseur line is deleted, the wrong commandedet.fk_commandefourndet was set to NULL
and the commande fournisseur line deletion was impossible if it was link to a commandet.

Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions>
2024-09-26 17:18:27 +02:00
HENRY Florian
c0f5e314e1 fix: DOL_DATA_ROOT do not have last / by defaut, and last_main_doc not have first / (#31090) 2024-09-26 03:51:06 +02:00
Laurent Destailleur
e125ab4783 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-26 03:36:52 +02:00
Laurent Destailleur
a8cb076bbd Fix move 2024-09-26 03:34:32 +02:00
Laurent Destailleur
691f76d1e0 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-26 03:32:43 +02:00
Laurent Destailleur
4ea503f366 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-09-26 03:30:40 +02:00
Laurent Destailleur
65c9bd7dcf Merge remote-tracking branch 'origin/15.0' into 16.0 2024-09-26 03:25:38 +02:00
Laurent Destailleur
16a0d1d7d5 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-09-26 03:23:00 +02:00
thomas-Ngr
bb40a43c5f FIX Add same security test whe nuploading files from API than from GUI (#31114)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-26 03:13:34 +02:00
lvessiller-opendsi
e4a93da82e FIX mysql error during dump for enable sandbox M999999 (#31116) 2024-09-25 22:54:31 +02:00
MaximilienR-easya
6de574bf5c Fix a problem when we have an extrafield on the line (#31104) 2024-09-25 22:18:26 +02:00
Laurent Destailleur
2f773e9326 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-23 21:45:03 +02:00
Laurent Destailleur
1594afdef7 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-09-23 21:44:25 +02:00
Laurent Destailleur
ad154a368f Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-09-23 21:43:48 +02:00
Laurent Destailleur
171494ddfc Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-09-23 21:43:24 +02:00
William Mead
21d8c40fc0 Fixed select list for long third party names (#30948) 2024-09-23 03:55:18 +02:00
MaximilienR-easya
fd0338cb1c Backport Fix error on empty(NOLOGIN) (#30594)
* initial commit

* Backport Fix from develop

* Fix precommit

* Correction as sugested in the PR

* Deleted too much last commit

* this time it's good
2024-09-23 03:53:22 +02:00
HENRY Florian
61c5a61623 fix: better error reporting in CMailFile (#31058) 2024-09-20 17:46:52 +02:00
mrozniecki
bad8ee865d Fix title encode 2024-09-20 14:34:34 +02:00
Benjamin Falière
dcba3347d8 Retroport: FIX determine multi-currency price on object line create tpl (#28021) (#30535)
* NEW determine multi-currency price on object line create tpl (#28021)

* Update html.form.class.php

---------

Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-18 03:22:38 +02:00
HENRY Florian
126dc77ef3 fix: add missing hook in propal and invoice (contact and document tabs) (#30518)
* add missing hook in propal contact and document

* add missing hook in propal contact and document

* add missing hook in propal and invoice (contact and document)

* add missing hook in propal and invoice (contact and document)

* add missing hook in propal and invoice (contact and document)

* review: change inithook place
2024-09-18 03:03:05 +02:00
MaximilienR-easya
f64a07861d Fix php8 change, '' != 0 since php8 (#30997)
* Fix php8 change, '' != 0 since php8

* Update dispatch.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-18 01:25:28 +02:00
mrozniecki
1ee3c5e5a0 Backport fix title 2024-09-13 12:08:58 +02:00
William Mead
1a81d7fc16 FIX late order search option (v18+) (#30692)
* Fixed search late order. Added search late order checkbox. Added contributor details.

* Removed late date alert checkbox
2024-09-13 04:14:41 +02:00
William Mead
4cd82df73c FIX late propal search option (v18+) (#30687)
* Fixed search late propal. Added search late propal checkbox.

* Removed late date alert checkbox
2024-09-13 04:07:24 +02:00
Laurent Destailleur
1b24270a46 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-12 21:59:42 +02:00
Laurent Destailleur
65e5899442 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-09-12 21:58:28 +02:00
Marc de Lima Lucio
d17890f05b FIX: purge files cron: php warnings when rest module enabled (#30919) 2024-09-12 21:57:41 +02:00
mrozniecki
0be0c1a1c1 Backport #yogosha18281 2024-09-10 14:01:04 +02:00
kkhelifa-opendsi
d29ebee2ac FIX avoid from re-initializing array result on nested hook getEntity (#30626) 2024-09-09 04:35:13 +02:00
kkhelifa-opendsi
21ec7ce98f FIX: Error message overwrited when a error occurs during update of product multilangs (#30841) 2024-09-06 13:24:59 +02:00
thomas-Ngr
9f5ef68123 fix replenish with multicurrency (#30832)
* fix replenish

* Use multicurrency supplier price instead of recomputing from EUR supplier price
2024-09-05 16:01:31 +02:00
Laurent Destailleur
70660d778f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-08-27 04:37:00 +02:00
Shanty
e7e96f650a FIX #30768 allocate the correct invoice_line_id to the element timespent (#30769) 2024-08-27 03:02:43 +02:00
HENRY Florian
bd98d3e9ff fix: VAT is already calculted if not post (#30683) 2024-08-20 09:45:56 +02:00
Laurent Destailleur
892d9cc865 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-08-12 21:35:51 +02:00
MaximilienR-easya
0295c43885 Fix error due to mismatch type for duration value (#30593)
* Fix error due to missmatch type for duration value. It should be an INT as it is everywhere in the code compared to int value and passed as an int to function

* Fix precommit
2024-08-10 23:16:25 +02:00
HENRY Florian
163e623964 FIX: on change ref for bank account attachement are lost (#30529)
* FIX: on change ref for bank account attachement are lost

* FIX: on change ref for bank account attachement are lost

* FIX: on change ref for bank account attachement are lost

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-07 03:08:04 +02:00
lvessiller-opendsi
7cde5adec8 FIX fatal error on loading pictures in attached documents of an event (#30553) 2024-08-07 00:53:16 +02:00
HENRY Florian
650fa5ef1d fix: add missing fetch_optionals() call on OrderLine fetch method (#30560) 2024-08-07 00:09:27 +02:00
Laurent Destailleur
27435508a3 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-08-01 13:30:05 +02:00
Laurent Destailleur
a5cba3235e Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-08-01 13:29:38 +02:00
atm-adrien
2c92e57fe7 FIX : Display the real_PMP on inventory when its value is equal to 0 (#22291)
* FIX : Display the real_PMP on inventory when its value is equal to 0

* FIX : PR Returns

* FIX : PR returns
2024-08-01 12:52:53 +02:00
Francis Appels
dc58a90a48 Fix modulebuilder MAIN_ODT_AS_PDF (#30496) 2024-07-31 15:35:15 +02:00
Laurent Destailleur
966ac2cdbc Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-25 18:04:42 +02:00
Laurent Destailleur
385d98b3e0 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-07-25 18:04:17 +02:00
Laurent Destailleur
c1b8197b8b Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-07-25 18:02:04 +02:00
Laurent Destailleur
d5004258db Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-07-25 18:00:55 +02:00
Laurent Destailleur
207a290edd Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-25 18:00:34 +02:00
Laurent Destailleur
54e087f8e5 FIX #30467 2024-07-25 18:00:18 +02:00
Thibault Fiacre
7c9e6b1fb9 FIX lang output for sales representative on PDF (#30469) 2024-07-25 17:56:13 +02:00
HENRY Florian
517e5e732c fix: load translation for extrafields in PDF (#30461) 2024-07-25 14:29:12 +02:00
HENRY Florian
bc69a62af0 fix: on edit line contrat, if failed at the end, stay on edit mode (#30259) 2024-07-24 20:16:21 +02:00
atm-lucas
1495c9d3ce Add element on childTables (#30445) 2024-07-24 18:13:22 +02:00
HENRY Florian
0982220397 FIX: Supplier Order search on date valid (#30448)
* FIX: Supplier Order search on date valid

* FIX: Supplier Order search on date valid
2024-07-24 18:12:53 +02:00
Sylvain Legrand
89b558a1b1 Fixes loss of rich text wrapping for translated category descriptions (#30433)
If multi-language is enabled, saving translations of category descriptions loses the rich text wrapping (wysiwyg)
2024-07-23 19:36:09 +02:00
MaximilienR-easya
30f1d4f18b Backport fix from develop (#30421) 2024-07-20 18:24:01 +02:00
Laurent Destailleur
8857aebb70 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-18 02:33:28 +02:00
Laurent Destailleur
f14833f856 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-18 02:33:03 +02:00
Laurent Destailleur
6c7bc18ae1 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-07-18 02:32:25 +02:00
Laurent Destailleur
193faf6813 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-07-18 02:30:50 +02:00
Pichi1966
f8da618789 FIX : issue to get the right files exported in Quadratrus export.php (#30004)
* FIX : issue to get the right files exported in Quadratrus export.php

The export of files does not work correctly when using Accounting option export Quadratus with file export.
The files are not attached to the zip until we uncommment the 3 lines of this PR.

* Update export.php
2024-07-17 20:07:40 +02:00
Florian Charlaix
4479b1e662 FIX Conflict with autoload (#30399)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-17 19:43:18 +02:00
Alexandre SPANGARO
50646e70a0 FIX Accountancy - Generate entries of expense report with localtax (#30411)
* FIX User List - Function is show in wrong column when module HRM enabled

* FIX Accountancy - Generate entries of expense report with localtax. $cpttva don't exist
2024-07-17 19:42:12 +02:00
Sylvain Legrand
8d6d17c18d fix missing value on fetch (#30390)
info_bits value is missing when fetching rows
2024-07-16 12:39:06 +02:00
MaximilienR-easya
75d40e6b72 Fix d'une erreur qui survient quand on ne selection aucun entrepot lors d'une recherche avec l'option alerte stock. on fini avec deux conditions d'entrepot qui se contredisent et qui font comme si tous les produits n'avaient aucun stocks (#30382) 2024-07-15 21:07:09 +02:00
Laurent Destailleur
609b842e65 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-07-15 00:46:20 +02:00
Laurent Destailleur
f7936d4378 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-15 00:46:03 +02:00
Laurent Destailleur
9487a4f918 FIX transfer in accountancy for expense reports. 2024-07-15 00:43:30 +02:00
MaximilienR-easya
eca8735e22 Fix les lien de téléchargement de facture fournisseur sur la page vue d'ensemble des projets (#30349) 2024-07-13 18:13:32 +02:00
lvessiller-opendsi
09fdb887bb FIX expedition PDF models using units labels (#30358) 2024-07-13 17:18:05 +02:00
iouston
2335ea3067 FIX public project form return an error if SOCIETE_EMAIL_UNIQUE (#29942)
* FIX Bug - public project form return an error if SOCIETE_EMAIL_UNIQUE

if SOCIETE_EMAIL_UNIQUE is 1, this form returns an error because the third party already exists.

* after comment from eldy
2024-07-11 10:26:46 +02:00
ksar
05cfd3dc52 FIX #30274 : Add the include before executing dolibarr_set_const (#30320) 2024-07-10 23:36:53 +02:00
HENRY Florian
32aaab75b5 fix: hidden option MAIN_KEEP_REF_CUSTOMER_ON_CLONING always win on pr… (#30340)
* fix: hidden option MAIN_KEEP_REF_CUSTOMER_ON_CLONING always win on propal clone even if it's for enother customer

* Update propal.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-10 18:53:57 +02:00
Laurent Destailleur
9ddc8dd93c Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-06 13:59:47 +02:00
Laurent Destailleur
0a88dc95a5 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-07-06 13:59:13 +02:00
Laurent Destailleur
86362599c1 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-07-06 13:55:04 +02:00
Laurent Destailleur
ca39809658 Fix #30256 2024-07-06 13:53:54 +02:00
Laurent Destailleur
29dd8ade01 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-02 13:41:06 +02:00
Laurent Destailleur
a7dcd9cccb Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-02 13:40:57 +02:00
Pichi1966
e79f18a636 FIX ASSET: annual depreciation starting year (Again ;-)) #26084 (#30040)
* FIX ASSET: annual depreciation starting year (Again ;-)) #26084

FIX Update asset.class.php
This is an old issue that has been already fixed by 
https://github.com/Dolibarr/dolibarr/pull/26084

I tested it several times and it works.

* Update asset.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-02 02:06:54 +02:00
noec764
96a5479e9e FIX: Error mesg show untranslated extrafield name (#30227)
Co-authored-by: Noé <noe@scopen.fr>
2024-07-02 01:56:45 +02:00
Laurent Destailleur
75f853f2db Fix date of invoice. We want the date of the user. 2024-07-01 02:46:48 +02:00
Shanty
7cee801622 FIX #30010 : Use conf TICKET_MESSAGE_MAIL_INTRO instead of translation key (#30081)
* Use conf TICKET_MESSAGE_MAIL_INTRO instead of translation key

* Set TicketMessageMailIntroText as default value if conf empty
2024-07-01 01:51:33 +02:00
Marc de Lima Lucio
6031f8437b FIX: pos: invoice date incorrectly set beacause of timezome mismatches (reverts #36e91da) (#30184) 2024-06-30 12:36:59 +02:00
Laurent Destailleur
d6da8fafc2 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-06-29 20:49:12 +02:00
Laurent Destailleur
d4b49fac4a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-06-29 20:49:03 +02:00
Laurent Destailleur
00b58c94c3 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-06-29 20:48:39 +02:00
Laurent Destailleur
300fd7c1c4 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-06-29 20:45:08 +02:00
Laurent Destailleur
70799e392f Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-06-29 20:44:41 +02:00
lvessiller-opendsi
6cd3d7943d FIX orders to bill menu (#30179)
* FIX orders to bill menu

* only fix url menu

* FIX orders supplier to bill menu
2024-06-29 19:31:08 +02:00
Alexandre SPANGARO
2e6af87823 FIX User List - Function is show in wrong column when module HRM enabled (#30186) 2024-06-29 19:30:06 +02:00
noec764
42d9b384d4 FIX: Bad calculation of $nbtotalofrecord (#30183)
Co-authored-by: Noé <noe@scopen.fr>
2024-06-29 19:29:14 +02:00
HENRY Florian
9c6a1eac94 fix: bad errors variable for error return (#30145)
* fix: bad errors variable for error return

* fix: bad errors variable for error return

* Update contrat.class.php

fix review
2024-06-24 23:47:34 +02:00
Eric - CAP-REL
cbba014355 fk_product could be = -1 then line added is not linked to selected pr… (#30013)
* fk_product could be = -1 then line added is not linked to selected product

* more clear conditions

* idprod could be set if prev dropdown menu was used
2024-06-15 16:27:54 +02:00
lvessiller-opendsi
c5bb1856c2 FIX modification date from label in accounting bookkeeping list (#30038) 2024-06-15 15:02:19 +02:00
Maxime Kohlhaas
956d1b025a Fix : product price by quantity was removing default price (#29899) 2024-06-08 23:35:01 +02:00
Marc de Lima Lucio
b0e825c123 FIX: PHP 8 warning on output of successful cronjob (#29922) 2024-06-08 12:01:22 +02:00
Maxime Kohlhaas
5989ee9cf0 Fix : SQL error on stock transfer deletion (#29902) 2024-06-08 00:09:30 +02:00
Maxime Kohlhaas
040e9083da Fix : expense report reapproval email, wrong date format + missing parameter (#29874) 2024-06-07 23:56:14 +02:00
Laurent Destailleur
72a2a96063 Fix travis 2024-06-07 23:46:21 +02:00
UltraViolet33
ee75ffe823 FIX update date_echeance of supplier invoices when we update invoice date in the past (#29886)
When we update the date of supplier invoices in the past, the date_echeance was not updated if the new calculated date_echeance is before the current date_echeance.
The same goes if we update the payment term of supplier invoice, the date echeance is not updated if the new calculted date_echeance is before the current date_echeance.
With this PR, when we update the supplier invoice date or payment term, the date_echeance is updated even if the new calculated date_echeance
 is before the current date_echeance.

Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions>
2024-06-07 18:06:31 +02:00
Rémi Champlon
a3e7151633 fix restrictedArea on selectobject (#29882) 2024-06-07 16:20:25 +02:00
lvessiller-opendsi
bd23133543 FIX group by qty in product margin tab (#29853) 2024-06-06 15:36:52 +02:00
lvessiller-opendsi
7249e3a4d1 FIX init total amounts in margin module (#29854) 2024-06-06 15:33:35 +02:00
Yannis Hoareau
26e09f85d2 FIX: Unsigned propal having signing date (#29825)
* FIX propal dates: setting sign date only if signed

* FIX propal dates: clearing sign date when reopenning a propal

* FIX propal dates: reworked + not clearing sign date

Not clearing the sign date anymore because of 17.0 configuration that allow the user to choose if he wants to keep the previous sign date or the current date.

* FIX propal dates: move comma to fix sql syntax error

* FIX propal dates: add SQL request to update database

This SQL request is meant to set the sign date and the signing user to null to match the fix

* Update 15.0.0-16.0.0.sql

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-06-04 10:52:29 +02:00
HENRY Florian
5a2bcc47b6 fix: do not allow/suggest create shipping with 2 time the same serial for the same product (#29749)
* fix: #29674

* fix: #29674

* review
2024-06-03 21:36:24 +02:00
MaximilienR-easya
382f279783 Fix incorrect translation code and missing one (#29804)
* Fix of an incorrect translation code and added a missing one

* added missing translation in en_US
2024-05-31 16:27:46 +02:00
battosai30
f0bf49f942 FIX: #29439 incomplete API return (#29796)
* Update api_documents.class.php

* Update api_documents.class.php

* Update api_documents.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-05-31 15:24:31 +02:00
daraelmin
5821a87ac3 Fix 18.0 - Update VAT for Switzerland (#29760)
VAT in Switzerland was increased on January 1, 2024.

See: https://www.estv.admin.ch/estv/fr/accueil/taxe-sur-la-valeur-ajoutee/taux-tva-suisse.html
2024-05-26 15:16:56 +02:00
Charles
fb1e5b9dd5 Update card.php Issue #29757 (#29758)
Bug-Fix Issue #29757  Prevent the check for a duplicate ref from populating the new ticket object fields with values from the conflicting ticket.
2024-05-25 13:04:39 +02:00
Laurent Destailleur
5b35b2be30 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-05-21 20:05:41 +02:00
Laurent Destailleur
659830b68a Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-05-21 20:05:09 +02:00
Laurent Destailleur
a9cb586f30 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-05-21 20:04:51 +02:00
IC-Mathieu
f3460eae48 FIX REPLENISH MANY FOURN WHEN ORDER ALREADY CREATE (#29710) 2024-05-21 20:01:36 +02:00
MaximilienR-easya
b6561116a0 Backport d'un fix sur un lien du menu (#29719) 2024-05-21 16:53:52 +02:00
sonikf
03ce503bd2 fix translation for non latin languages (#29717)
* fix translation for non latin languages

* fix translation for non latin languages
2024-05-21 14:49:20 +02:00
Florian Mortgat
22dddb8e87 FIX: Backport page inventory.php from v18 to fix pagination bugs causing data loss (#29688) 2024-05-15 15:07:29 +02:00
atm-adrien
133bf3ffb8 FIX : mo cloning (#29686) 2024-05-15 15:06:14 +02:00
Paul Schulte
1406715ce5 FIX executeHooks $object default value (#29647)
Change $object parameter default value from '' to null to fix issue when using type declarations in custom hooks.

Mirrored change from commit 0453b3e.
2024-05-11 20:48:52 +02:00
Francis Appels
ba4f7323fe FIX PHP exception on getSpecialCode (#29646) 2024-05-10 12:34:38 +02:00
Rémi Champlon
66d4960a79 FIX : Not qualified lines for reception (#29473)
* Fix qualified line receptions

* indent

* change
2024-05-09 13:16:27 +02:00
HENRY Florian
8a57ac3caf fix: accountancy php warning key undefined (#29636) 2024-05-07 22:34:59 +02:00
lvessiller-opendsi
cfc162a31d FIX lettering (auto) for invoice deposit with company discount (#29633) 2024-05-07 21:44:05 +02:00
lvessiller-opendsi
c4ad5e06f2 FIX back to page on error in contact card (#29627) 2024-05-07 21:28:58 +02:00
Laurent Destailleur
b44e35e8ef Fix warning 2024-05-06 18:01:59 +02:00
Laurent Destailleur
98fc9ffe14 fix tab 2024-05-03 19:21:47 +02:00
Laurent Destailleur
4fef808efa Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-05-03 18:16:58 +02:00
Laurent Destailleur
1c81155a9a Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-05-03 18:13:21 +02:00
Marc de Lima Lucio
3258b00e16 FIX: notification: error 500 in fixed emails due to a bad copy/paste (#29580) 2024-05-03 18:12:55 +02:00
Florian Mortgat
cf6cbafa8c FIX: PUT /thirdparties/{id} and PUT /contacts/{id} should throw exception if update returns < 0 (#29596)
+ FIX some PHPDoc (types and throws)
+ FIX issue #29594: trigger should be called on contact update by API
2024-05-03 18:03:14 +02:00
Florian Mortgat
8474360271 FIX: contact/address title is always "New Contact/Address" even if the contact/address already exists (#29581) 2024-05-03 13:10:36 +02:00
MaximilienR-easya
6b812ccad3 Backport en provenance de develop pour afficher les messages d'erreurs (#29583) 2024-05-02 20:10:19 +02:00
Laurent Destailleur
594280e1df Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-05-02 13:22:47 +02:00
Laurent Destailleur
36873b9fe7 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-05-02 13:20:04 +02:00
Laurent Destailleur
93fc018cd4 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-05-02 13:19:39 +02:00
Laurent Destailleur
750c1c16db Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-05-02 13:18:13 +02:00
Laurent Destailleur
fdb63a6540 Fix related to #29580 2024-05-02 13:06:48 +02:00
Yannis Hoareau
03c4f7219f FIX: made invalid code shape error more user friendly (#29498)
* FIX: barcode pdf creation die: added try catch

* FIX: barcode pdf creation die: try catch refactor

* FIX: barcode pdf creation die: fixed translation

* FIX: barcode generation error

* FIX: barcode generation error: wrong code
2024-05-01 17:44:31 +02:00
Yannis Hoareau
37fcbc34b8 FIX: search and add extrafields to tasks when conf disabled (#29542)
* FIX: task could be searched even if disabled

* FIX: could add extra fields to task even if disabled
2024-05-01 17:37:12 +02:00
HENRY Florian
82806b00ab fix: SQL Error on replannish (#29548) 2024-05-01 16:23:46 +02:00
Alban Durrheimer
a174922733 Fix translation of permissions only en_US after 6c521073ea (#29525) 2024-04-29 19:29:55 +02:00
Laurent Destailleur
94e93aea05 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-29 13:32:47 +02:00
Laurent Destailleur
ff54b1cb5a Fix regression in permission test for list of holiday 2024-04-29 13:31:41 +02:00
ksar
3df149045d FIX : Display the date according to user language on subsitutions (#29510)
See : https://www.dolibarr.fr/forum/t/format-date-dune-variable-de-substitution-dans-un-modele-de-courriel/40705
2024-04-28 01:17:09 +02:00
HENRY Florian
768846191b fix: when invoice is created by WORKFLOW_ORDER_AUTOCREATE_INVOICE on ORDER_CLOSE, the invoice must have the default bank account of the thirdparty is it's empty on order (#29462)
* fix: when invoice is created by WORKFLOW_ORDER_AUTOCREATE_INVOICE on ORDER_CLOSE, the invoice must have the default bank account of the thirdparty is it's empty on order

* fix: add control on back stattement
2024-04-27 12:49:27 +02:00
Laurent Destailleur
4ed77028e9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-27 04:49:16 +02:00
Laurent Destailleur
73a07ed669 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-27 04:49:08 +02:00
Laurent Destailleur
c29a27d79d Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-27 04:48:38 +02:00
Laurent Destailleur
90a89d3468 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-04-27 04:46:34 +02:00
Francis Appels
fdc1cdd94c FIX incorrect page numbering in PDF #29458 (#29476)
* FIX incorrect page numbering in PDF #29458

* Work on width correction

* Work on width correction

* Work on width correction

* Work on code order
2024-04-27 04:36:51 +02:00
Laurent Destailleur
56e1412627 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-27 04:28:25 +02:00
Laurent Destailleur
50e9b4c9da Revert "Fix translation of permissions after 6c521073ea9215fb7baddca5e48345b2…" (#29506)
This reverts commit 35aa10a28f.
2024-04-27 04:28:03 +02:00
Alban Durrheimer
35aa10a28f Fix translation of permissions after 6c521073ea (#29477) 2024-04-27 04:22:18 +02:00
Yannis Hoareau
7317e16737 FIX: php warning global conf (#29478) 2024-04-27 03:57:53 +02:00
thomas-Ngr
5129454883 Backport : Fix VAT computation. Fix #28620 (#29493) 2024-04-27 03:45:13 +02:00
Laurent Destailleur
078c1dd489 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-27 03:13:12 +02:00
Laurent Destailleur
3a887ab2fa FIX #29496 - filtering a record should not hide its child not filtered 2024-04-27 03:12:17 +02:00
HENRY Florian
00e61f875a FIX: Hierarchy Employee view do not filter on employee = 1 (#29496)
* FIX: Hierarchy Employee list do not filters on employee = 1

* Update hierarchy.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-27 00:57:32 +02:00
HENRY Florian
f46ec55e0b fix: when option SOCIETE_ADDRESSES_MANAGEMENT is set then PHP message: PHP Fatal error: Uncaught Error: Call to undefined function show_addresses() in htdocs/societe/card.php:3325 (#29461) 2024-04-24 22:39:22 +02:00
Laurent Destailleur
0693fa9149 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-24 21:08:18 +02:00
Laurent Destailleur
bc29102c18 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-24 21:06:54 +02:00
Laurent Destailleur
07dedd3d2c Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-24 21:06:46 +02:00
Laurent Destailleur
8d5dd565a6 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-04-24 21:05:22 +02:00
Laurent Destailleur
7259195caf Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-24 21:04:48 +02:00
Laurent Destailleur
3723ae025f Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-04-24 21:01:44 +02:00
Laurent Destailleur
2d971f3a05 Fix regression 2024-04-24 21:00:38 +02:00
Eric
c8ef530d52 note_private and note_public was forgotten too (#29440)
* note_private and note_public was forgotten

* sql error missing comma

* sql error missing comma for rang=
2024-04-24 15:11:27 +02:00
Florian Mortgat
0a2699f6cd FIX php8: Fatal when empty $tmpvat is an empty string (no silent conversion to '0' when used in arithmetic operations) (#29451) 2024-04-24 15:09:00 +02:00
Laurent Destailleur
ce8c70450c FIX Merge of thirdparties must also move uploaded files 2024-04-23 22:28:15 +02:00
Laurent Destailleur
c454729f90 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-22 14:19:30 +02:00
Laurent Destailleur
79353a6cbb Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-22 14:17:06 +02:00
Laurent Destailleur
98fc0033f5 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-04-22 14:16:37 +02:00
Laurent Destailleur
8e0369440f Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-22 14:16:18 +02:00
Florian Mortgat
54caae51e0 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) 2024-04-20 22:44:26 +01:00
lvessiller-opendsi
370785d515 FIX accounting FEC import (Issue #28306) (#29414) 2024-04-20 22:18:10 +01:00
lvessiller-opendsi
483c137535 FIX not redirtect when error occurs on updating card (#29388) 2024-04-18 13:11:12 +01:00
Noé Cendrier
be14db7b73 FIX: background color for enabled modules (#29378) 2024-04-18 11:41:21 +01:00
HiroKX
c24fda189f fix : #29372 month_report is accessible even without the readall permission (#29385)
Co-authored-by: robin <robin.lagler@vingeanne-transports.com>
2024-04-18 11:19:16 +01:00
Laurent Destailleur
bb5e4685cd Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-17 23:37:03 +02:00
Eric
8e23600ee0 fix start amount, '' is less than first releve.... (#29366) 2024-04-17 17:25:13 +01:00
atm-lucas
31ce8f826b FIX - Repair the replenishment list (#29336)
* Repair the replenishment list

* Warning and condition

* pre-commit failling

* Update replenish.php

* Update replenish.php

* Fixing list

* pre-commit error

* pre-commit error 2

* Fonction bis

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-17 16:00:23 +01:00
MaximilienR-easya
26a750ee0a 17.0 Backport autocomplete in dialog box (#29307)
* Fix autocomplete list showing in the background of the dialog box and was unusable

* Fix permit to adjust dialog box size in case of the autocomplete list is cut by the dialog box

* adjust dialog box size to be more fitting to the content

* rollback

* Backport Fix
2024-04-16 10:28:47 +02:00
Laurent Destailleur
2768d80b9b FIX Regression #29340 2024-04-14 03:15:49 +02:00
Laurent Destailleur
459ff72732 FIX Regression #29340 2024-04-14 02:56:17 +02:00
Eric
2a93168d48 object tasks: priority is fetch but not updated and others... (#29340)
* priority is fetch but not updated and others...

* insert too
2024-04-14 00:52:01 +02:00
atm-jonathan
1adda9817a FIX round capital societe (#29211)
* round capital societe

* new key formated
2024-04-12 02:38:00 +02:00
Laurent Destailleur
095679845b Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-11 22:31:36 +02:00
Laurent Destailleur
7ad3a0601f Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-11 22:30:41 +02:00
Laurent Destailleur
dc988f7e37 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-04-11 22:29:49 +02:00
Laurent Destailleur
3002fa120b Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-11 22:28:51 +02:00
Laurent Destailleur
137de338d2 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-11 22:28:27 +02:00
HENRY Florian
ed6247b640 18 fix emailcollector false positive for type="recordjoinpiece" (#29308)
* change git ignor

* change git ignor

* FIX: on email collector operation type : recordjoinpiece, check empty field return false positive

* revert changes from origin branch

* revert changes from origin branch

* revert changes from origin branch

* revert changes from origin branch

---------

Co-authored-by: moreauf <moreauf@theobald-groupe.com>
2024-04-11 22:03:27 +02:00
Günter Lukas
5c3caa3f31 Fix #29314 (#29315)
* Fix #29314

Add method getFullName

* Update conferenceorboothattendee.class.php
2024-04-11 20:51:50 +02:00
lvessiller-opendsi
22244a9d84 FIX supplier price duplicate entry on update supplier product ref (#29290)
* FIX supplier price duplicate entry on update supplier product ref

* Add ref_fourn_price_id in fetch method
2024-04-09 20:16:10 +02:00
Jon Bendtsen
b133d9386e Fix #29279 Not admin that can create group have disabled button for
group creation (#29286)

* Fix #29279 Not admin that can create group have disabled button for
group creation

* Update eldy.lib.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

Conflicts:
	htdocs/core/menus/standard/eldy.lib.php
2024-04-09 02:32:32 +02:00
Eric
7213455fd3 on tasks status is statut (#29285) 2024-04-08 23:35:52 +02:00
Regis Houssin
ec45ca8abe FIX avoid php warnings (#29247) 2024-04-06 13:28:58 +02:00
Laurent Destailleur
477c81ae99 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-04 17:55:13 +02:00
Laurent Destailleur
d10d5aed72 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-04 17:54:59 +02:00
Laurent Destailleur
e407588231 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-04 17:54:31 +02:00
Laurent Destailleur
65f2425902 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-04-04 17:51:55 +02:00
Laurent Destailleur
28075f7cf8 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-04 17:51:37 +02:00
Laurent Destailleur
5a6c6b0509 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2024-04-04 17:50:54 +02:00
Laurent Destailleur
87bee3fb8c SEC Merge pull request #29231 from hregis/fix_14_security
FIX avoid to delete "lock" and "unlock" files
2024-04-04 17:50:47 +02:00
Laurent Destailleur
b0055c502e Merge pull request #29231 from hregis/fix_14_security
FIX avoid to delete "lock" and "unlock" files
2024-04-04 16:50:08 +02:00
Laurent Destailleur
87e336eb79 Merge pull request #29223 from altairis-benjamin/fixDoubleNotif
FIX: Ticket new message notification sent twice
2024-04-04 16:38:40 +02:00
Regis Houssin
cb9a93d97e FIX syntax error (but same result) :-) 2024-04-04 16:32:24 +02:00
Regis Houssin
9e638ccc12 FIX avoid to delete "lock" and "unlock" files 2024-04-04 16:22:31 +02:00
Laurent Destailleur
285080fc74 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-04-04 16:16:53 +02:00
Benjamin Falière
8156fbfea3 FIX: Ticket new message notification sent twice 2024-04-04 11:44:22 +02:00
Laurent Destailleur
cdf46276ac Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-04-04 11:06:46 +02:00
Laurent Destailleur
a15cb44096 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-04-04 11:06:19 +02:00
Laurent Destailleur
191ed21a91 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-04-04 11:02:04 +02:00
Laurent Destailleur
52b51b79ff Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-04-04 11:01:46 +02:00
Laurent Destailleur
214eac46ab Merge pull request #29217 from atm-lena/17.0_FIX_TranslationPDFExtrafields
17.0 fix translation pdf extrafields
2024-04-04 02:56:37 +02:00
x
c583102364 FIX Accolad 2024-04-03 15:19:53 +02:00
x
81adb15eb0 FIX PDF Translations Extrafields 2024-04-03 15:04:30 +02:00
Laurent Destailleur
6ff1bbf2a5 Merge pull request #29166 from aspangaro/18p22
FIX Accountancy - Not trunc id_import
2024-04-02 11:53:04 +02:00
Alexandre SPANGARO
c664ed7565 FIX Accountancy - Not trunc id_import 2024-04-01 08:06:48 +02:00
Laurent Destailleur
d7bd31c0ce Merge pull request #29157 from hregis/fix_18_wrong_permission_number
FIX sometimes a string type instead integer is return, why ?
2024-03-31 19:29:32 +02:00
Regis Houssin
85a08a9288 FIX sometimes a string type instead integer is return, why ? 2024-03-31 19:17:58 +02:00
Laurent Destailleur
2ed6ae0799 Fix #29031 Fix #29059 2024-03-31 19:15:41 +02:00
Laurent Destailleur
601989f924 Merge pull request #29149 from hregis/fix_17_takepos_multicompany
FIX multiple problems with multicompany
2024-03-31 15:54:18 +02:00
Regis Houssin
cbf1014ab9 FIX multiple problems with multicompany 2024-03-31 13:56:44 +02:00
Laurent Destailleur
bdcf1a3a62 Merge pull request #29134 from aspangaro/18p21
FIX #29114 Translate contact term in intervention
2024-03-30 20:00:15 +01:00
Laurent Destailleur
ef4a1bef3b Update interventions.lang 2024-03-30 19:59:47 +01:00
Alexandre SPANGARO
48bcc07bc6 FIX #29114 Missing contact term in intervention 2024-03-30 07:51:57 +01:00
Laurent Destailleur
c78b62112a Merge pull request #29071 from aspangaro/18p20
NEW Constant to select if typent helps define whether the thirdparty is a company
2024-03-29 12:22:02 +01:00
Laurent Destailleur
e1d80df488 Merge pull request #29108 from Hystepik/fix-member-type-id-select-width
Fix #29100 select member type id width
2024-03-29 11:46:55 +01:00
Laurent Destailleur
c5391bd8f4 Merge pull request #29072 from hregis/fix_missing_entity_parameter
FIX wrong shortcut key for macintosh
2024-03-28 15:20:28 +01:00
Hystepik
96711686da Fix select member type id width 2024-03-28 14:56:10 +01:00
Laurent Destailleur
97a81455b8 Merge pull request #29070 from aspangaro/18p19
FIX Accountancy export with file or not
2024-03-28 14:15:39 +01:00
Laurent Destailleur
5bd834b7ac Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-27 11:16:23 +01:00
Laurent Destailleur
dd42f45d1a Fix precommit 2024-03-27 10:59:05 +01:00
Laurent Destailleur
14f286053a Merge pull request #29080 from hregis/fix_18_wrong_permission_number
FIX wrong stock permission number
2024-03-27 10:21:29 +01:00
Laurent Destailleur
1d13e51a5c Merge pull request #29074 from hregis/fix_18_wrong_sql_request
FIX wrong sql request with product category filter
2024-03-27 10:04:10 +01:00
Regis Houssin
2ae4f94eed FIX inventoryDeletePermission id define twice 2024-03-27 02:24:57 +01:00
Regis Houssin
f16b08fbdb FIX peut pas faire mieux ! 2024-03-27 01:21:15 +01:00
Regis Houssin
d8e102a24c FIX wrong stock permission number 2024-03-27 01:15:03 +01:00
Regis Houssin
38156a84fc FIX wrong sql request with product category filter 2024-03-26 20:40:26 +01:00
Regis Houssin
48e85e6690 FIX use $conf->browser->os instead 2024-03-26 20:15:21 +01:00
Regis Houssin
3b9be97792 FIX syntax error 2024-03-26 19:40:14 +01:00
Regis Houssin
e1fc40d694 FIX wrong shortcut key for macintosh 2024-03-26 19:36:15 +01:00
Alexandre SPANGARO
a8771d03bd Use getDolGlobalString 2024-03-26 17:30:02 +01:00
Alexandre SPANGARO
049beb9bf8 NEW Constant to select if typent helps define whether the thirdparty is a company 2024-03-26 17:28:26 +01:00
Alexandre SPANGARO
522a012053 FIX Accountancy export with file or not 2024-03-26 16:13:54 +01:00
Laurent Destailleur
70471186ed Merge pull request #29043 from hregis/fix_missing_entity_parameter
FIX missing hide "new" button where "product" or "service" module are disable
2024-03-24 14:38:24 +01:00
Regis Houssin
5378c85c5d FIX missing hide "new" button where "product" or "service" module is
disable
2024-03-24 11:35:18 +01:00
Laurent Destailleur
9c604536ca Merge pull request #29030 from Delthair/patch-6
FIX  #29029 Impossible to delete an order line
2024-03-23 16:31:33 +01:00
Delthair
5f1796b39a FIX #29029 Impossible to delete an order line
Impossible to delete a line because the code lead to add an error if the request is valid therefore leading to a rollback of the request
2024-03-22 18:49:12 +01:00
Laurent Destailleur
fa45588c49 Merge pull request #29007 from vold-lu/fix_takepos_update_invoice
FIX : TakePOS | Add product / Delete line of existing invoice
2024-03-21 14:46:36 +01:00
Laurent Destailleur
10444e588a Merge pull request #29008 from hregis/fix_missing_entity_parameter
FIX missing entity parameter for ajax_constantonoff
2024-03-21 14:40:27 +01:00
Rémi Champlon
d8b87ff6eb fix 2024-03-21 14:22:12 +01:00
Regis Houssin
5ffdc44952 FIX missing entity parameter for ajax_constantonoff 2024-03-21 13:35:51 +01:00
Rémi Champlon
ab10f29db7 add invoice id 2024-03-21 13:06:09 +01:00
Laurent Destailleur
01a058b208 Fix regression 2024-03-21 11:22:12 +01:00
Laurent Destailleur
ad36de82a2 Merge pull request #28997 from am97/fix/18.0/DDLUpdateField
FIX: SQL syntax error in DDLUpdateField
2024-03-21 11:10:07 +01:00
Andrés Maldonado
976686262d FIX: SQL syntax error in DDLUpdateField 2024-03-21 02:36:40 +01:00
Laurent Destailleur
5bae4ffe4d FIX #28978 FIX #28976 2024-03-20 21:29:29 +01:00
Laurent Destailleur
fe4d567a82 Merge pull request #28991 from OPEN-DSI/18.0_fix_generate_invoice_odt_directory
FIX: Fix save directory for invoice ODT and multientities
2024-03-20 16:22:13 +01:00
Kamel Khelifa
9e7aeca447 FIX: Fix save directory for invoice ODT and multientities 2024-03-20 15:26:19 +01:00
Laurent Destailleur
2e8080b0e5 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-20 11:24:41 +01:00
Laurent Destailleur
5b2cb4b063 Fix remove bad entry into array of the rss box 2024-03-20 11:24:16 +01:00
Laurent Destailleur
a7223719a5 Merge pull request #28446 from rycks/18.0-ticket_code_review
18.0 fix links error on dedicated virtualhost and ticket code review
2024-03-20 01:55:57 +01:00
Laurent Destailleur
2f0ad0bf36 Merge pull request #28973 from hregis/fix_avoid_foreach_warning
FIX avoid php warning
2024-03-19 22:47:44 +01:00
Regis Houssin
ce3171a722 FIX avoid php warning 2024-03-19 19:50:28 +01:00
Laurent Destailleur
b705dd8094 NEW Support Reply-To tracking in emails sending (tickets only for the
moment)

Conflicts:
	htdocs/core/class/CMailFile.class.php
	htdocs/ticket/class/ticket.class.php
2024-03-19 16:42:27 +01:00
Laurent Destailleur
2b76ba7b4f Merge pull request #28965 from OPEN-DSI/18.0_fix_trigger_position_delete_order_line
FIX: Move the trigger for delete order line before the SQL request
2024-03-19 15:43:46 +01:00
Laurent Destailleur
3cf8c162bd Merge pull request #28966 from atm-lucasmantegari/FIX_newDateCalculatedOnInvoice
FIX - Condition on newDateLimReglement
2024-03-19 15:40:44 +01:00
ATM-Lucas
6f85a989f0 Condition on newDateLimReglement 2024-03-19 14:59:13 +01:00
Kamel Khelifa
426e18ea33 Correction syntax 2024-03-19 14:31:15 +01:00
Kamel Khelifa
07c84df3dc FIX: Move the trigger for delete order line before the SQL request 2024-03-19 14:23:02 +01:00
Laurent Destailleur
2077c23c5e Update styles.css.php 2024-03-19 02:08:49 +01:00
Laurent Destailleur
9ee6e6c170 Merge pull request #28944 from atm-john/17.0_backport_fix_23972
FIX : PDF Fatal error : Backport fix from  #23972
2024-03-18 23:42:06 +01:00
John BOTELLA
715ce8b745 Backport #23972 2024-03-18 15:22:00 +01:00
Laurent Destailleur
f7f64651c9 Fix bad merge 2024-03-17 21:52:45 +01:00
Laurent Destailleur
9320ea03ee Merge pull request #27030 from glu000/18.0-issue27029
Fix #27029
2024-03-17 21:51:07 +01:00
Laurent Destailleur
ac1ae64ef8 Merge branch '18.0' into 18.0-issue27029 2024-03-17 21:49:12 +01:00
Laurent Destailleur
97e11f7f5f Update cticketcategory.class.php 2024-03-16 17:16:46 +01:00
Laurent Destailleur
0fdca9b183 Update messaging.php 2024-03-16 16:00:22 +01:00
Laurent Destailleur
34a554e64d Update cticketcategory.class.php 2024-03-16 15:59:43 +01:00
Laurent Destailleur
ea12c39cba Update index.php 2024-03-16 15:57:16 +01:00
Laurent Destailleur
57fa0671e5 Update messaging.php 2024-03-16 15:56:40 +01:00
Laurent Destailleur
2bef2c6b87 Update list.php 2024-03-16 15:55:11 +01:00
Laurent Destailleur
52d9b7d6c4 Update index.php 2024-03-16 15:53:25 +01:00
Laurent Destailleur
15ba3757ab Update document.php 2024-03-16 15:52:38 +01:00
Laurent Destailleur
15207665d8 Update contact.php 2024-03-16 15:52:01 +01:00
Laurent Destailleur
78d49e6713 Update ticket.class.php 2024-03-16 15:51:21 +01:00
Laurent Destailleur
8e3a567c03 Update cticketcategory.class.php 2024-03-16 15:49:04 +01:00
Laurent Destailleur
b65b184405 Update agenda.php 2024-03-16 15:48:04 +01:00
Laurent Destailleur
c8545ff59d Update card.php 2024-03-16 15:46:45 +01:00
Laurent Destailleur
bb57fb3a93 Update view.php 2024-03-16 15:37:38 +01:00
Laurent Destailleur
efc96c8cf4 Merge pull request #28781 from rycks/14_fix_default_commercial_on_create_thirdpart
fix default current user as commercial for the thirdparty
2024-03-15 00:29:59 +01:00
Laurent Destailleur
4d72f22b8a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-14 23:45:07 +01:00
Laurent Destailleur
aa56a170c7 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-03-14 23:44:46 +01:00
Laurent Destailleur
d96fa756c6 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-03-14 23:44:26 +01:00
Laurent Destailleur
91c6940818 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-03-14 23:44:04 +01:00
Laurent Destailleur
7ecf1ac082 Merge 2024-03-14 23:43:25 +01:00
Laurent Destailleur
f61c837b41 Merge pull request #28833 from rycks/14_fix_login_autocorrect_on_smartphone
Fix autocorrect on login input field (smartphone)
2024-03-14 22:58:18 +01:00
Eric Seigne
1c9129497f autocomplete on 2024-03-14 12:36:01 +01:00
Eric Seigne
0903b4da87 disable auto correct login field on smartphone 2024-03-14 12:35:19 +01:00
Laurent Destailleur
aa10a32d4f Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-13 22:05:56 +01:00
Laurent Destailleur
a0b26ae7cd FIX Amount of localtaxes in foreign currency was wrong on screen and PDF 2024-03-13 22:04:44 +01:00
Eric Seigne
71442efa03 remove check againts read access (and if that user create a thirdpart read access is implicit) 2024-03-13 12:19:01 +01:00
Eric Seigne
94dbde9cfd fix default current user as commercial for the thirdparty 2024-03-12 15:28:35 +01:00
Laurent Destailleur
d1ec646b5f Merge pull request #28777 from rycks/17_fix_and_or_in_complex_else
FIX an error in a complex else condition
2024-03-12 14:06:22 +01:00
Laurent Destailleur
33de57bd6c Update list.php 2024-03-12 14:00:53 +01:00
Laurent Destailleur
8367e909c9 Update list.php 2024-03-12 13:58:36 +01:00
Laurent Destailleur
c19efebc76 Fix regression 2024-03-12 13:55:00 +01:00
Laurent Destailleur
6122ba335f Fix regression 2024-03-12 13:54:35 +01:00
Laurent Destailleur
c92be21524 Update list.php 2024-03-12 13:52:49 +01:00
Laurent Destailleur
a437398993 Update index.php 2024-03-12 13:52:16 +01:00
Laurent Destailleur
2cc95fda85 Fix regression
Fix regression
2024-03-12 13:51:21 +01:00
Eric Seigne
77afadcc1f replace OR by AND condition 2024-03-12 07:43:16 +01:00
Laurent Destailleur
3ede8e2937 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-11 18:28:39 +01:00
Laurent Destailleur
330abe14fe FIX Option MAIN_DOC_USE_TIMING can be a string with date format 2024-03-11 18:28:20 +01:00
Laurent Destailleur
05b949ed98 Merge pull request #28763 from Hystepik/Fix-unable-delete-file
Fix unable to delete file medias
2024-03-11 16:14:58 +01:00
Hystepik
e0cf910f49 Fix unable to delete file medias 2024-03-11 15:01:39 +01:00
Laurent Destailleur
07ecee2429 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-11 13:32:04 +01:00
Laurent Destailleur
f40ad6e90a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-11 13:31:55 +01:00
Laurent Destailleur
5daa7d6a08 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-03-11 13:30:34 +01:00
Laurent Destailleur
2df1ea2097 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-03-11 13:30:13 +01:00
Laurent Destailleur
ab760df389 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-03-11 13:29:40 +01:00
Laurent Destailleur
2db58f09bc Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-03-11 13:19:44 +01:00
daraelmin
4065a59024 FIX #24265 regression cannot see all product on takepos (#28753)
* FIX #24265 regression cannot see all product on takepose

See discussion here :

https://www.dolibarr.fr/forum/t/bug-affichage-takepos-mobile-dolibarr-v17/43219

* Update pos.css.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-11 13:07:37 +01:00
Charles
23723289c2 Update ticket.class.php update function (#28722)
Default value for status to zero(0) instead of "null"
2024-03-09 01:05:58 +01:00
kkhelifa-opendsi
bcf6d7a2aa FIX: Fix create shipping with product who have negative stocks on warehouse but the negative stock transfert is allowed (#26217) 2024-03-08 12:36:31 +01:00
Eric Seigne
9f1904e8d2 todo is done 2024-03-08 00:15:45 +01:00
Eric Seigne
57e5599d82 Merge branch '18.0' into 18.0-ticket_code_review 2024-03-08 00:12:22 +01:00
Florian Mortgat
7f10566d5e 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)
this is a follow-up of PR #27008
2024-03-07 20:21:41 +01:00
ATM-NicolasV
4dcf98b9f7 fix entity in sql from RemoveFromGroup (#28682) 2024-03-07 15:55:07 +01:00
Laurent Destailleur
91b994b89c Prepare 18.0.6 2024-03-06 17:20:44 +01:00
Laurent Destailleur
2d9801ffe3 Fix sec more complete list of forbidden function 2024-03-06 17:18:46 +01:00
Ferran Marcet
75f1de8f8f Fix: Deposit lines are not created correctly (#28646)
* FIX: The minimum price in proposals is not checked correctly

* Fix: Deposit lines are not created correctly

* Fix: Volver a dejar como estaba

* Fix: Deposit lines are not created correctly
2024-03-05 18:07:05 +01:00
noec764
55c0efae3f FIX: Special code is now transmitted by args only in order supplier (#28619)
Co-authored-by: Noé <noe@scopen.fr>
2024-03-04 18:26:38 +01:00
MDW
f166f15f7d Qual: Backport/pre commit / log annotation simplification (#28614)
* Qual: ci: Run pre-commit/php-cs with cache (#28079)

This adds a hook to .pre-commit-config.yaml and updates the workflow
to run php-cs with cache when it is run for all files.
When running on changed files only, the cache is not useful.

The php-codesniffer ruleset.xml was cleaned up (duplicates removal/formatted)

* Fix: Make all 'relative paths' absolute (#28196)

# Fix: Make all 'relative paths' absolute

The phpcs ruleset xml file's relative exclude patterns are relative to
the filename(s) provided on the command line.
Hence with partial verifications, the path exclusion does not function
as we would like.
Removing the relative-path attribute from the patterns the exclusion
works.
At the same time, the patterns were optimized and a comment was added.

* Qual: Optimize workflow (#28386)

# Qual: Optimize workflow

The log annotation based on the pre-commit logs is now simplified.
2024-03-04 18:21:32 +01:00
Laurent Destailleur
db7a62f644 FIX fatal error Unsupported operand types when recording load payment 2024-03-04 14:46:33 +01:00
Laurent Destailleur
0c86f64565 FIX permission on payment file of a tax 2024-03-04 14:03:46 +01:00
Laurent Destailleur
17ff0972ab Fix use of invoke into computed fields 2024-03-03 19:35:37 +01:00
Laurent Destailleur
717297ef29 FIX Wrong currency shown in TakePOS payment page 2024-03-02 14:49:27 +01:00
Laurent Destailleur
cb6c65183d Fix bad condition on project field 2024-03-02 13:53:10 +01:00
Laurent Destailleur
7964f831e9 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-01 19:02:31 +01:00
Laurent Destailleur
aaae1aad67 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-01 19:02:16 +01:00
Laurent Destailleur
ce4dc610ed Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-03-01 19:01:13 +01:00
Laurent Destailleur
615a80835a Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-03-01 19:00:32 +01:00
Delthair
9ab1f56f83 Update expensereport.lib.php (#28553)
ISSUE #28552
2024-03-01 18:49:37 +01:00
Charlène Benke
3c28480fda Update list.php add some init field array (#28550) 2024-03-01 18:26:36 +01:00
Liammer
af8e086aac Update adherent.class.php (#28554)
To not send the Email to cancelled members. They already asked not to be members anymore. Sending reminders can be exhausting.
2024-03-01 18:24:31 +01:00
noec764
cb302fbb63 FIX: Special code is now transmitted by args only in order supplier (#28546)
Co-authored-by: Noé <noe@scopen.fr>
2024-03-01 12:55:07 +01:00
Laurent Destailleur
b6a056799c Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-29 20:09:56 +01:00
Laurent Destailleur
15a578e6ac Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
Conflicts:
	htdocs/accountancy/bookkeeping/balance.php
2024-02-29 20:09:44 +01:00
Laurent Destailleur
c3ad0bc9e7 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
Conflicts:
	htdocs/core/class/commonobject.class.php
2024-02-29 20:07:53 +01:00
thomas-Ngr
a0fc77cd76 Fix Form::load_cache_vatrates() countries dict (#28528) 2024-02-29 19:40:51 +01:00
Laurent Destailleur
284fb49f60 Try a better fix for #28526 2024-02-29 19:35:34 +01:00
Laurent Destailleur
4c116e1577 Doc 2024-02-29 17:59:17 +01:00
atm-adrien
700c0e3e73 FIX : Add new hidden conf "DISABLE_QTY_OVERWRITTEN" (#28523)
* FIX : Add new hidden conf "DISABLE_QTY_OVERWRITTEN"

* FIX : Change conf name

* FIX : PR returns
2024-02-29 15:49:26 +01:00
Hasanuzzaman Sattar
042ef30a9f FIX #28518 (#28520)
* #28518

* Update interface_50_modTicket_TicketEmail.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-29 14:41:59 +01:00
daraelmin
d59e3e5bc8 FIX subscription must be editable when accounting isn't reconciled (#28469) 2024-02-28 18:54:41 +01:00
Eric Seigne
a2fb7884f9 precommit cleanup 2024-02-28 08:00:12 +01:00
Eric Seigne
c34dbebcc5 fix search socid 2024-02-27 20:39:33 +01:00
Eric Seigne
737407c953 remove ! from string 2024-02-27 16:45:13 +01:00
Eric Seigne
d40081b0a8 missing ) 2024-02-27 08:37:48 +01:00
Eric Seigne
bc10246974 fix missing view.php 2024-02-27 01:12:53 +01:00
Eric Seigne
02a7c27ec6 fix missing view.php 2024-02-27 01:11:20 +01:00
Eric Seigne
e34e8ddb9a fix missing view.php 2024-02-27 01:09:30 +01:00
Eric Seigne
aec7cdefde conf->global to getDolGlobalString 2024-02-27 01:06:13 +01:00
Eric Seigne
6996974376 css with public interface 2024-02-27 00:47:28 +01:00
Eric Seigne
9d24025496 use TICKET_URL_PUBLIC_INTERFACE 2024-02-27 00:24:22 +01:00
Eric Seigne
5ec5369289 conver conf->global to getDolGlobalString 2024-02-27 00:09:35 +01:00
HENRY Florian
bb12b0c8b9 fix: display root account according root label in balance bookkeeping (#28435) 2024-02-26 22:59:27 +01:00
Laurent Destailleur
0140f5057d Fix warning 2024-02-25 21:37:38 +01:00
Laurent Destailleur
459101cb4f Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-25 21:29:47 +01:00
Laurent Destailleur
26a3ca0413 Fix warning php 8.1 2024-02-25 21:29:36 +01:00
noec764
692e10ec94 FIX: Error When cloning fourn price no default value for tva_tx (#28368)
Co-authored-by: Noé <noe@scopen.fr>
2024-02-23 17:14:10 +01:00
Laurent Destailleur
d84a886e87 FIX #28369 2024-02-23 16:22:43 +01:00
Laurent Destailleur
80f3bc6c1b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-23 15:25:56 +01:00
Laurent Destailleur
2acfea2f0c Fix corrupted data 2024-02-23 15:24:47 +01:00
HENRY Florian
38095cf8b8 fix: enabled default wharehouse field on service if STOCK_SUPPORTS_SERVICES (#28354) 2024-02-22 13:24:18 +01:00
Eric
af062aa5f6 datenextrun is mandatory as dolibarr 16.0 (#28344) 2024-02-22 11:34:39 +01:00
Laurent Destailleur
9874d008aa Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-22 00:16:59 +01:00
Laurent Destailleur
1f129feed8 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-02-22 00:16:36 +01:00
Laurent Destailleur
88da45d9dd Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-02-22 00:16:14 +01:00
Laurent Destailleur
a76eafa0d4 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-02-22 00:15:35 +01:00
Laurent Destailleur
8c2a910a94 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-02-22 00:13:59 +01:00
Laurent Destailleur
f7e8725406 Clean code 2024-02-22 00:12:33 +01:00
Saami PERDRIX
52646ee9f5 fix aperçu/dl fichier quand il est dans {userid}/temp (#27211) 2024-02-22 00:10:04 +01:00
MDW
e363e53516 FIx: modulenames (#28337)
* Fix modulename

* Fix modulename

* Fix modulename
2024-02-21 19:17:56 +01:00
Eric
6defdcd018 better fix with this->entity thanks to regis (#28331)
* better fix with this->entity thanks to regis

* Update fichinter.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-21 17:06:05 +01:00
Eric
75ad2e82fd fix entity if interventions are shared between entities (#28317) 2024-02-20 23:01:16 +01:00
Joachim Kueter
c2980f34c7 Fix: add missing parameters to existing hook (#28304)
For this hook to add reasonable additional fields to a line, access to the line number and other related values of the line is required.
2024-02-20 10:37:10 +01:00
Laurent Destailleur
7117ec5a7c Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-19 18:18:55 +01:00
Laurent Destailleur
ab5d5a3e79 FIX #28205 2024-02-19 18:18:28 +01:00
Laurent Destailleur
ffafad5d4a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-02-19 15:59:22 +01:00
Laurent Destailleur
46afde019b Fix missing cash control menu in auguria 2024-02-19 15:59:11 +01:00
atm-adrien
6f5ed78d0a FIX : Don't display column when it's out of date (#28271) 2024-02-19 15:24:14 +01:00
Florian Mortgat
2b71c260d8 FIX 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
This is because the field's value is set using GETPOST even when no corresponding <input> is present in the form.
2024-02-19 15:21:19 +01:00
Regis Houssin
832284e710 FIX avoid error "Column 'entity' in where clause is ambiguous" (#28270) 2024-02-19 15:20:08 +01:00
atm-sami
aa068bd0a0 18.0 FIX multiplication error (#28266)
* add new hook context for mo production card

* remove consumed and produced line when we clone mo

* Fix multiplication error in actions_addupdatedelete.inc.php
2024-02-19 09:35:59 +01:00
kkhelifa-opendsi
926462e218 FIX: Not trancate the multicurrency rate shown on cards (even if the global MAIN_MAX_DECIMALS_SHOWN is set to 0) (#28211) 2024-02-18 22:56:19 +01:00
Laurent Destailleur
ebe68c9075 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-18 17:06:36 +01:00
Laurent Destailleur
b3720deda4 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-02-18 17:05:11 +01:00
Laurent Destailleur
1a14c19cd2 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-02-18 17:03:18 +01:00
Laurent Destailleur
f9426f30a9 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-02-18 17:02:55 +01:00
MaximilienR-easya
05cf98fae8 Fix lost POST data when redirection after drag_n_drop an event inside the agenda (#28212) 2024-02-18 16:38:46 +01:00
Florian Mortgat
6e5fd5eb58 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) 2024-02-18 16:31:12 +01:00
HENRY Florian
8edebd56be fix: Init bar code page must filter by entity (#28218)
* fix: Init bar code page must filter by entity

* missing one filter
2024-02-18 15:40:10 +01:00
I. Antunes
a417b4eda9 FIX 28251 Fixing subpermission name on api_multicurrencies.class.php (#28252) 2024-02-18 14:48:01 +01:00
MDW
acf09b805f Fix: Make all 'relative paths' absolute (#28196)
# Fix: Make all 'relative paths' absolute

The phpcs ruleset xml file's relative exclude patterns are relative to
the filename(s) provided on the command line.
Hence with partial verifications, the path exclusion does not function
as we would like.
Removing the relative-path attribute from the patterns the exclusion
works.
At the same time, the patterns were optimized and a comment was added.
2024-02-16 12:59:04 +01:00
Regis Houssin
1ef91d3a21 FIX avoid Unknown column 'pfp.ref_fourn' (#28145) 2024-02-15 16:47:07 +01:00
Alexandre SPANGARO
3867d1619e FIX Payment on customer invoice - Remove accountid in url if empty for apply default value (#28156) 2024-02-13 09:03:08 +01:00
atm-sami
549f10c150 18.0 FIX remove consumed and produced lines for mo clone (#28140)
* add new hook context for mo production card

* remove consumed and produced line when we clone mo
2024-02-12 18:10:48 +01:00
Eric
280ceef46b outputlangs must not be a string as default value like others generateDocument functions (#28132) 2024-02-12 17:55:32 +01:00
boudet jean pascal
7e652b9f9f fix token to link (#28141)
* fix token to link

* pre-commit

---------

Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
2024-02-12 17:51:09 +01:00
MDW
1527dfc7c1 Qual: Correct spelling errors (#28135)
# Qual: Correct spelling errors

Fix new error in Changelog
2024-02-12 16:32:43 +01:00
Laurent Destailleur
36d9022c7d Changelog 2024-02-12 12:31:55 +01:00
Laurent Destailleur
67272dddd3 Prepare 18.0.4 2024-02-12 12:26:47 +01:00
Laurent Destailleur
52ab3dbba4 Release 17.0.4 2024-02-12 12:20:57 +01: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
Günter Lukas
28769a13eb Update security.lib.php
Better fix as proposed by eldy
2023-12-27 00:08:18 +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
Günter Lukas
382f9ce95d Fix #27029 2023-12-08 00:24:44 +01:00
5600 changed files with 224079 additions and 270876 deletions

View File

@@ -7,18 +7,18 @@ Bug reports and feature requests
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English.
Default **language here is english**. So please prepare your contributions in english.
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible).
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
5. Delete unnecessary submissions.
6. **Check your Message at Preview before sending.**
<a name="code"></a>Submit code
<a name="code"></a>Code
---------------------
### Basic workflow
@@ -35,22 +35,20 @@ Default **language here is English**. So please prepare your contributions in En
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.
If you're fixing a bug, it is preferred that you cook your fix and pull request it
against the oldest version affected that's still supported.
We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
higher versions.
We officially support versions N, N 1 and N 2 for N the latest version available.
The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
and number of potential beneficiaries of the correction.
Choose your base branch accordingly.
### General rules
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
### <a name="commits"></a>Commits
Use clear commit messages with the following structure:
```plaintext
```
[KEYWORD] [ISSUENUM] DESC
LONGDESC
@@ -68,13 +66,10 @@ where
#### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
The keyword can be omitted if your commit does not fit in any of the following categories:
The keyword can be ommitted if your commit does not fit in any of the following categories:
- Fix/FIX: for a bug fix
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- Close/CLOSE: for closing a referenced feature request
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
- Perf/PERF: for a performance enhancement
- Qual/QUAL: for quality code enhancement or re-engineering
#### Issuenum
If your commit fixes a referenced bug or feature request.
@@ -95,19 +90,19 @@ Feel free to express technical details, use cases or anything relevant to the cu
This section can span multiple lines.
If your PR is a change on interface, you must also paste a screenshot showing the new screen.
Try to keep lines under 120 characters.
#### Examples
<pre>
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
or
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span across multiple lines).
Long description (Can span accross multiple lines).
</pre>
### Pull Requests
@@ -124,7 +119,7 @@ Also, some code changes need a prior approbation:
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
@@ -135,8 +130,7 @@ If your PR has errors reported by the Continuous Integration Platform, it means
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%.
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
### Resources
@@ -150,7 +144,7 @@ All other translations are managed online at [Transifex](https://www.transifex.c
Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.

View File

@@ -68,4 +68,4 @@ body:
id: files
attributes:
label: Attached files
description: Screenshots, screencasts, dolibarr.log, debugging information
description: Screenshots, screencasts, dolibarr.log, debugging informations

View File

@@ -1,7 +1,7 @@
# Instructions
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
*Please:*
- *only keep the "FIX", "CLOSE", "NEW", "PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
- *replace the bracket enclosed texts with meaningful information*
@@ -16,12 +16,3 @@
# NEW|New [*Short description*]
[*Long description*]
# PERF|Perf #[*issue_number Short description*]
[*Long description*]
# QUAL|Qual #[*issue_number Short description*]
[*Long description*]

View File

@@ -0,0 +1,3 @@
# Add this tag for any changes for more than 1 line
"Pending analysis of PR (maintenance team)":
min: 1

588
.github/logToCs.py vendored
View File

@@ -1,588 +0,0 @@
#!/usr/bin/env python3
# pylint: disable=invalid-name
"""
Convert a log to CheckStyle format.
Url: https://github.com/mdeweerd/LogToCheckStyle
The log can then be used for generating annotations in a github action.
Note: this script is very young and "quick and dirty".
Patterns can be added to "PATTERNS" to match more messages.
# Examples
Assumes that logToCs.py is available as .github/logToCs.py.
## Example 1:
```yaml
- run: |
pre-commit run -all-files | tee pre-commit.log
.github/logToCs.py pre-commit.log pre-commit.xml
- uses: staabm/annotate-pull-request-from-checkstyle-action@v1
with:
files: pre-commit.xml
notices-as-warnings: true # optional
```
## Example 2:
```yaml
- run: |
pre-commit run --all-files | tee pre-commit.log
- name: Add results to PR
if: ${{ always() }}
run: |
.github/logToCs.py pre-commit.log | cs2pr
```
Author(s):
- https://github.com/mdeweerd
License: MIT License
"""
import argparse
import datetime as dt
import json
import os
import re
import sys
import xml.etree.ElementTree as ET # nosec
def remove_prefix(string, prefix):
"""
Remove prefix from string
Provided for backward compatibility.
"""
if prefix and string.startswith(prefix):
return string[len(prefix) :]
return string
def convert_notices_to_checkstyle(notices, root_path=None):
"""
Convert annotation list to CheckStyle xml string
"""
root = ET.Element("checkstyle")
for fields in notices:
add_error_entry(root, **fields, root_path=root_path)
return ET.tostring(root, encoding="utf_8").decode("utf_8")
def convert_lines_to_notices(lines):
"""
Convert provided message to CheckStyle format.
"""
notices = []
for line in lines:
fields = parse_message(line)
if fields:
notices.append(fields)
return notices
def convert_text_to_notices(text):
"""
Convert provided message to CheckStyle format.
"""
return parse_file(text)
# Initial version for Checkrun from:
# https://github.com/tayfun/flake8-your-pr/blob/50a175cde4dd26a656734c5b64ba1e5bb27151cb/src/main.py#L7C1-L123C36
# MIT Licence
class CheckRun:
"""
Represents the check run
"""
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN", None)
GITHUB_EVENT_PATH = os.environ.get("GITHUB_EVENT_PATH", None)
URI = "https://api.github.com"
API_VERSION = "2022-11-28"
ACCEPT_HEADER_VALUE = "application/vnd.github+json"
AUTH_HEADER_VALUE = f"Bearer {GITHUB_TOKEN}"
# This is the max annotations Github API accepts in one go.
MAX_ANNOTATIONS = 50
def __init__(self):
"""
Initialise Check Run object with information from checkrun
"""
self.read_event_file()
self.read_meta_data()
def read_event_file(self):
"""
Read the event file to get the event information later.
"""
if self.GITHUB_EVENT_PATH is None:
raise ValueError("Not running in github workflow")
with open(self.GITHUB_EVENT_PATH, encoding="utf_8") as event_file:
self.event = json.loads(event_file.read())
def read_meta_data(self):
"""
Get meta data from event information
"""
self.repo_full_name = self.event["repository"]["full_name"]
pull_request = self.event.get("pull_request")
print("%r", self.event)
if pull_request:
self.head_sha = pull_request["head"]["sha"]
else:
print("%r", self.event)
check_suite = self.event.get("check_suite", None)
if check_suite is not None:
self.head_sha = check_suite["pull_requests"][0]["base"]["sha"]
else:
self.head_sha = None # Can't annotate?
def submit( # pylint: disable=too-many-arguments
self,
notices,
title=None,
summary=None,
text=None,
conclusion=None,
):
"""
Submit annotations to github
See:
https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28
#update-a-check-run
:param conclusion: success, failure
"""
# pylint: disable=import-outside-toplevel
import requests # Import here to not impose presence of module
if self.head_sha is None:
return
output = {
"annotations": notices[: CheckRun.MAX_ANNOTATIONS],
}
if title is not None:
output["title"] = title
if summary is not None:
output["summary"] = summary
if text is not None:
output["text"] = text
if conclusion is None:
# action_required, cancelled, failure, neutral, success
# skipped, stale, timed_out
if bool(notices):
conclusion = "failure"
else:
conclusion = "success"
payload = {
"name": "log-to-pr-annotation",
"head_sha": self.head_sha,
"status": "completed", # queued, in_progress, completed
"conclusion": conclusion,
# "started_at": dt.datetime.now(dt.timezone.utc).isoformat(),
"completed_at": dt.datetime.now(dt.timezone.utc).isoformat(),
"output": output,
}
# Create the check-run
response = requests.post(
f"{self.URI}/repos/{self.repo_full_name}/check-runs",
headers={
"Accept": self.ACCEPT_HEADER_VALUE,
"Authorization": self.AUTH_HEADER_VALUE,
"X-GitHub-Api-Version": self.API_VERSION,
},
json=payload,
timeout=30,
)
print(response.content)
response.raise_for_status()
ANY_REGEX = r".*?"
FILE_REGEX = r"\s*(?P<file_name>\S.*?)\s*?"
FILEGROUP_REGEX = r"\s*(?P<file_group>\S.*?)\s*?"
EOL_REGEX = r"[\r\n]"
LINE_REGEX = r"\s*(?P<line>\d+?)\s*?"
COLUMN_REGEX = r"\s*(?P<column>\d+?)\s*?"
SEVERITY_REGEX = r"\s*(?P<severity>error|warning|notice|style|info)\s*?"
MSG_REGEX = r"\s*(?P<message>.+?)\s*?"
MULTILINE_MSG_REGEX = r"\s*(?P<message>(?:.|.[\r\n])+)"
# cpplint confidence index
CONFIDENCE_REGEX = r"\s*\[(?P<confidence>\d+)\]\s*?"
# List of message patterns, add more specific patterns earlier in the list
# Creating patterns by using constants makes them easier to define and read.
PATTERNS = [
# beautysh
# File ftp.sh: error: "esac" before "case" in line 90.
re.compile(
f"^File {FILE_REGEX}:{SEVERITY_REGEX}:"
f" {MSG_REGEX} in line {LINE_REGEX}.$"
),
# beautysh
# File socks4echo.sh: error: indent/outdent mismatch: -2.
re.compile(f"^File {FILE_REGEX}:{SEVERITY_REGEX}: {MSG_REGEX}$"),
# yamllint
# ##[group].pre-commit-config.yaml
# ##[error]97:14 [trailing-spaces] trailing spaces
# ##[endgroup]
re.compile(rf"^##\[group\]{FILEGROUP_REGEX}$"), # Start file group
re.compile(
rf"^##\[{SEVERITY_REGEX}\]{LINE_REGEX}:{COLUMN_REGEX}{MSG_REGEX}$"
), # Msg
re.compile(r"^##(?P<file_endgroup>\[endgroup\])$"), # End file group
# File socks4echo.sh: error: indent/outdent mismatch: -2.
re.compile(f"^File {FILE_REGEX}:{SEVERITY_REGEX}: {MSG_REGEX}$"),
# Emacs style
# path/to/file:845:5: error - Expected 1 space after closing brace
re.compile(
rf"^{FILE_REGEX}:{LINE_REGEX}:{COLUMN_REGEX}:{SEVERITY_REGEX}"
rf"-?\s{MSG_REGEX}$"
),
# ESLint (JavaScript Linter), RoboCop, shellcheck
# path/to/file.js:10:2: Some linting issue
# path/to/file.rb:10:5: Style/Indentation: Incorrect indentation detected
# path/to/script.sh:10:1: SC2034: Some shell script issue
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}:{COLUMN_REGEX}: {MSG_REGEX}$"),
# Cpplint default output:
# '%s:%s: %s [%s] [%d]\n'
# % (filename, linenum, message, category, confidence)
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}:{MSG_REGEX}{CONFIDENCE_REGEX}$"),
# MSVC
# file.cpp(10): error C1234: Some error message
re.compile(
f"^{FILE_REGEX}\\({LINE_REGEX}\\):{SEVERITY_REGEX}{MSG_REGEX}$"
),
# Java compiler
# File.java:10: error: Some error message
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}:{SEVERITY_REGEX}:{MSG_REGEX}$"),
# Python
# File ".../logToCs.py", line 90 (note: code line follows)
re.compile(f'^File "{FILE_REGEX}", line {LINE_REGEX}$'),
# Pylint, others
# path/to/file.py:10: [C0111] Missing docstring
# others
re.compile(f"^{FILE_REGEX}:{LINE_REGEX}: {MSG_REGEX}$"),
# Shellcheck:
# In script.sh line 76:
re.compile(
f"^In {FILE_REGEX} line {LINE_REGEX}:{EOL_REGEX}?"
f"({MULTILINE_MSG_REGEX})?{EOL_REGEX}{EOL_REGEX}"
),
# eslint:
# /path/to/filename
# 14:5 error Unexpected trailing comma comma-dangle
re.compile(
f"^{FILE_REGEX}{EOL_REGEX}"
rf"\s+{LINE_REGEX}:{COLUMN_REGEX}\s+{SEVERITY_REGEX}\s+{MSG_REGEX}$"
),
]
# Exceptionnaly some regexes match messages that are not error.
# This pattern matches those exceptions
EXCLUDE_MSG_PATTERN = re.compile(
r"^("
r"Placeholder pattern" # To remove on first message pattern
r")"
)
# Exceptionnaly some regexes match messages that are not error.
# This pattern matches those exceptions
EXCLUDE_FILE_PATTERN = re.compile(
r"^("
# Codespell: (appears as a file name):
r"Used config files\b"
r")"
)
# Severities available in CodeSniffer report format
SEVERITY_NOTICE = "notice"
SEVERITY_WARNING = "warning"
SEVERITY_ERROR = "error"
def strip_ansi(text: str):
"""
Strip ANSI escape sequences from string (colors, etc)
"""
return re.sub(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])", "", text)
def parse_file(text):
"""
Parse all messages in a file
Returns the fields in a dict.
"""
# pylint: disable=too-many-branches,too-many-statements
# regex required to allow same group names
try:
import regex # pylint: disable=import-outside-toplevel
except ImportError as exc:
raise ImportError(
"The 'parsefile' method requires 'python -m pip install regex'"
) from exc
patterns = [pattern.pattern for pattern in PATTERNS]
# patterns = [PATTERNS[0].pattern]
file_group = None # The file name for the group (if any)
full_regex = "(?:(?:" + (")|(?:".join(patterns)) + "))"
results = []
for fields in regex.finditer(
full_regex, strip_ansi(text), regex.MULTILINE | regex.IGNORECASE
):
if not fields:
continue
result = fields.groupdict()
if len(result) == 0:
continue
severity = result.get("severity", None)
file_name = result.get("file_name", None)
confidence = result.pop("confidence", None)
new_file_group = result.pop("file_group", None)
file_endgroup = result.pop("file_endgroup", None)
message = result.get("message", None)
if new_file_group is not None:
# Start of file_group, just store file
file_group = new_file_group
continue
if file_endgroup is not None:
file_group = None
continue
if file_name is None:
if file_group is not None:
file_name = file_group
result["file_name"] = file_name
else:
# No filename, skip
continue
else:
if EXCLUDE_FILE_PATTERN.search(file_name):
# This file_name is excluded
continue
if message is not None:
if EXCLUDE_MSG_PATTERN.search(message):
# This message is excluded
continue
if confidence is not None:
# Convert confidence level of cpplint
# to warning, etc.
confidence = int(confidence)
if confidence <= 1:
severity = SEVERITY_NOTICE
elif confidence >= 5:
severity = SEVERITY_ERROR
else:
severity = SEVERITY_WARNING
if severity is None:
severity = SEVERITY_ERROR
else:
severity = severity.lower()
if severity in ["info", "style"]:
severity = SEVERITY_NOTICE
result["severity"] = severity
results.append(result)
return results
def parse_message(message):
"""
Parse message until it matches a pattern.
Returns the fields in a dict.
"""
for pattern in PATTERNS:
fields = pattern.match(message, re.IGNORECASE)
if not fields:
continue
result = fields.groupdict()
if len(result) == 0:
continue
if "confidence" in result:
# Convert confidence level of cpplint
# to warning, etc.
confidence = int(result["confidence"])
del result["confidence"]
if confidence <= 1:
severity = SEVERITY_NOTICE
elif confidence >= 5:
severity = SEVERITY_ERROR
else:
severity = SEVERITY_WARNING
result["severity"] = severity
if "severity" not in result:
result["severity"] = SEVERITY_ERROR
else:
result["severity"] = result["severity"].lower()
if result["severity"] in ["info", "style"]:
result["severity"] = SEVERITY_NOTICE
return result
# Nothing matched
return None
def add_error_entry( # pylint: disable=too-many-arguments
root,
severity,
file_name,
line=None,
column=None,
message=None,
source=None,
root_path=None,
):
"""
Add error information to the CheckStyle output being created.
"""
file_element = find_or_create_file_element(
root, file_name, root_path=root_path
)
error_element = ET.SubElement(file_element, "error")
error_element.set("severity", severity)
if line:
error_element.set("line", line)
if column:
error_element.set("column", column)
if message:
error_element.set("message", message)
if source:
# To verify if this is a valid attribute
error_element.set("source", source)
def find_or_create_file_element(root, file_name: str, root_path=None):
"""
Find/create file element in XML document tree.
"""
if root_path is not None:
file_name = remove_prefix(file_name, root_path)
for file_element in root.findall("file"):
if file_element.get("name") == file_name:
return file_element
file_element = ET.SubElement(root, "file")
file_element.set("name", file_name)
return file_element
def main():
"""
Parse the script arguments and get the conversion done.
"""
parser = argparse.ArgumentParser(
description="Convert messages to Checkstyle XML format."
)
parser.add_argument(
"input", help="Input file. Use '-' for stdin.", nargs="?", default="-"
)
parser.add_argument(
"output",
help="Output file. Use '-' for stdout.",
nargs="?",
default="-",
)
parser.add_argument(
"-i",
"--in",
dest="input_named",
help="Input filename. Overrides positional input.",
)
parser.add_argument(
"-o",
"--out",
dest="output_named",
help="Output filename. Overrides positional output.",
)
parser.add_argument(
"--root",
metavar="ROOT_PATH",
help="Root directory to remove from file paths."
" Defaults to working directory.",
default=os.getcwd(),
)
parser.add_argument(
"--github-annotate",
action=argparse.BooleanOptionalAction,
help="Annotate when in Github workflow.",
# Currently disabled,
# Future: (os.environ.get("GITHUB_EVENT_PATH", None) is not None),
default=False,
)
args = parser.parse_args()
if args.input == "-" and args.input_named:
with open(
args.input_named, encoding="utf_8", errors="surrogateescape"
) as input_file:
text = input_file.read()
elif args.input != "-":
with open(
args.input, encoding="utf_8", errors="surrogateescape"
) as input_file:
text = input_file.read()
else:
text = sys.stdin.read()
root_path = os.path.join(args.root, "")
try:
notices = convert_text_to_notices(text)
except ImportError:
notices = convert_lines_to_notices(re.split(r"[\r\n]+", text))
checkstyle_xml = convert_notices_to_checkstyle(
notices, root_path=root_path
)
if args.output == "-" and args.output_named:
with open(args.output_named, "w", encoding="utf_8") as output_file:
output_file.write(checkstyle_xml)
elif args.output != "-":
with open(args.output, "w", encoding="utf_8") as output_file:
output_file.write(checkstyle_xml)
else:
print(checkstyle_xml)
if args.github_annotate:
checkrun = CheckRun()
checkrun.submit(notices)
if __name__ == "__main__":
main()

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

View File

@@ -21,7 +21,7 @@ jobs:
fetch-depth: 1
#php-version: '7.1'
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
uses: JetBrains/qodana-action@v2023.1.5
#with:
# php-version: '7.1'
env:

View File

@@ -2,9 +2,8 @@
name: "Exakat analysis"
on:
# execute once a month, the 1st
schedule:
- cron: "0 20 1 * *"
- cron: "0 20 * * *"
workflow_dispatch:
branches:
- develop
@@ -16,13 +15,11 @@ jobs:
exakat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 1
- 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_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
file_extensions: php
project_reports: Perfile
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/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'

View File

@@ -235,7 +235,7 @@ jobs:
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Check Apache availability
- name: Chech Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e

View File

@@ -190,7 +190,7 @@ jobs:
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Check Apache availability
- name: Chech Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e

View File

@@ -11,7 +11,7 @@ jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 50 # important!

View File

@@ -1,8 +1,6 @@
name: GitHub CI PHPCS and PHPCBF
on:
pull_request:
types: [opened]
on: push
#on:
# push:
# paths:
@@ -13,7 +11,7 @@ jobs:
# uses: ./.github/workflows/files_changed.yaml
# with:
# folder_path: .*
linter_name:
name: Run & fix PHP Code Sniffer
runs-on: ubuntu-latest
@@ -21,9 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
# fetch-depth: 10
fetch-depth: 10
- name: echo Get list of all changed files
run: |
@@ -43,21 +39,6 @@ jobs:
phpcs_ref_name: ${{github.ref_name}}
phpcs_github_event_name: ${{github.event_name}}
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
# with:
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
with:
default_author: github_actions
committer_name: GitHub Actions
committer_email: actions@github.com
#author_name: PHP CS fixer
#author_email: eldy@destailleur.fr
#committer_name: PHP CS fixer
#committer_email: eldy@destailleur.fr
message: 'PHP CS fixer github action'
add: '*.php'
commit_message: Fix PHPCS errors by GitHub PHPCSfixer action

View File

@@ -0,0 +1,21 @@
name: "Set label for v18"
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "18.0"
push:
branches:
- "18.0"
jobs:
changed-lines-count-labeler:
runs-on: ubuntu-latest
name: An action for automatically labelling pull requests based on the changed lines count
steps:
- name: Set a label
uses: vkirilichev/changed-lines-count-labeler@v0.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/changed-lines-count-labeler.yml
continue-on-error: true

45
.github/workflows/pr-18.yaml.disabled vendored Normal file
View File

@@ -0,0 +1,45 @@
# Action to prepare the github action
# Go on Dolibarr - Settings - Developer settings - Enter a name + webhook to disable + Permissions (see app test) + Can install by any account
# Click on generate the private keys
# Click on Install application - choose user of the Organization
# Go on Organisation - Secret and variables and create a secret PR18_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
# Go on Organisation - Secret and variables and create a variable PR18_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
#
name: Set reviewer for v18
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "18.0"
push:
branches:
- "18.0"
jobs:
pr18:
runs-on: ubuntu-latest
#env:
# GH_TOKEN: ${{ github.token }}
# GH_TOKENS: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.PR18_APP_ID }}
private-key: ${{ secrets.PR18_SECRET_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Assign reviewer
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
url: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit "$url" --add-reviewer rycks
gh pr edit "$url" --add-reviewer lvessiller-opendsi

View File

@@ -7,7 +7,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
env:
LOG_TO_CS: .github/logToCs.py
RAW_LOG: pre-commit.log
CS_XML: pre-commit.xml
steps:
@@ -15,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
@@ -37,12 +36,27 @@ jobs:
with:
cache: pip
python-version: "3.11"
- run: python -m pip install pre-commit regex
- run: python -m pip install pre-commit
# Restore previous cache of precommit
- uses: actions/cache/restore@v4
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
@@ -63,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:
@@ -102,19 +98,12 @@ jobs:
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a ${RAW_LOG}
ls -l ~/.cache/pre-commit/
# If error, we convert log in the checkstyle format
- name: Convert Raw Log to CheckStyle format
if: ${{ failure() }}
run: |
python ${LOG_TO_CS} ${RAW_LOG} ${CS_XML}
# Annotate the git sources with the log messages
- name: Annotate Source Code with Messages
uses: staabm/annotate-pull-request-from-checkstyle-action@v1
- name: Convert Raw Log to Annotations
uses: mdeweerd/logToCheckStyle@v2024.2.9
if: ${{ failure() }}
with:
files: ${{ env.CS_XML }}
notices-as-warnings: true # optional
prepend-filename: true # optional
in: ${{ env.RAW_LOG }}
# Save the precommit cache
- uses: actions/cache/save@v4
if: ${{ ! cancelled() }}

View File

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

28
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Test github actions
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
push:
env:
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
ENVGHU: ${{ github.token }}
TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }}
TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }}
ENVLOCAL: "varenvlocal"
jobs:
testjob:
runs-on: ubuntu-latest
steps:
- name: Log
run: |
echo "Run action by ${{ github.actor }}"
echo "github.token=${{ github.token }}"
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
echo "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}"
echo "variable repository : ${{vars.TEST_VAR_REPO}}"
echo "ENVLOCAL: ${{env.ENVLOCAL}}"

13
.gitignore vendored
View File

@@ -59,12 +59,11 @@ package-lock.json
doc/install.lock
/.asciidoctorconfig.adoc
.idea
# Qodana
.idea/vcs.xml
.idea/modules.xml
.idea/workspace.xml
.idea/inspectionProfiles/Project_Default.xml
.idea/jsLinters/jshint.xml
/composer.json
/composer.lock
/build/phpstan/phpstan
/build/phpstan/bootstrap_custom.php
phpstan_custom.neon
/.php-cs-fixer.cache
/.php_cs.cache

View File

@@ -1,63 +0,0 @@
<?php
/* PHP 7.0 */
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'core/includes',
'custom',
'documents',
'doctemplates',
'vendor',
'install/doctemplates',
'htdocs/custom',
'htdocs/includes',
'htdocs/install/doctemplates',
])
->notPath('vendor');
/* PHP 7.4+ */
/*
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'custom',
'documents',
'htdocs/custom',
'htdocs/includes',
])
->notPath([
'vendor',
]);
*/
return (new PhpCsFixer\Config())
->setRules([
// Apply PSR-12 as per https://wiki.dolibarr.org/index.php?title=Langages_et_normes#PHP:~:text=utiliser%20est%20le-,PSR%2D12,-(https%3A//www
'@PSR12' => true, // Disabled for now to limit number of changes
// Minimum version Dolibarr v18.0.0
// Compatibility with min 7.1 is announced with Dolibarr18.0 but
// app is still working with 7.0 so no reason to abandon compatiblity with this target for the moment.
// So we use target PHP70 for the moment.
'@PHP70Migration' => true,
//'@PHP71Migration' => true,
// Avoid adding public to const (incompatible with PHP 7.0):
'visibility_required' => ['elements'=>['property', 'method']],
//'strict_param' => true,
//'array_syntax' => ['syntax' => 'short'],
//'list_syntax' => false,
//'visibility_required' => false,
'array_syntax' => false,
'ternary_to_null_coalescing' => false
])
->setFinder($finder)
// TAB Indent violates PSR-12 "must" rule, but used in code
// (See https://www.php-fig.org/psr/psr-12/#24-indenting )
->setIndent("\t")
// All files MUST use the Unix LF line ending only
// https://www.php-fig.org/psr/psr-12/#22-files
->setLineEnding("\n")
;

View File

@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<!--
Documentation:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
-->
<rule ref="dev/setup/codesniffer/ruleset.xml"/>
<arg value="p"/>
<arg name="colors"/>
<arg name="extensions" value="php,inc" />
</ruleset>

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
@@ -81,6 +81,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)$

236
.scrutinizer.yml Normal file
View File

@@ -0,0 +1,236 @@
# .scrutinizer.yml
#build:
# - php-scrutinizer-run
build:
nodes:
analysis:
tests:
override:
- command: php-scrutinizer-run
idle_timeout: 8000
#- php-scrutinizer-run --sub-project-dir=htdocs/admin
imports:
- php
filter:
excluded_paths:
- build/
- dev/
- doc/
- documents/
- node_modules/
- test/
- htdocs/custom/
- htdocs/includes/
- htdocs/install/doctemplates/
#dependency_paths:
# - htdocs/includes/
paths:
- htdocs/*
- scripts/*
tools:
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
php_analyzer:
enabled: true
extensions:
- php
#dependency_paths:
# - htdocs/includes/
filter:
excluded_paths:
- build/
- dev/
- doc/
- documents/
- htdocs/custom/
- htdocs/includes/
- htdocs/install/doctemplates/
- htdocs/core/class/lessc.class.php
- node_modules/
- test/
paths:
- htdocs/*
- scripts/*
config:
parameter_reference_check:
enabled: true
checkstyle:
enabled: false
no_trailing_whitespace: true
naming:
enabled: true
local_variable: ^[a-z][a-zA-Z0-9]*$
abstract_class_name: ^Abstract|Factory$
utility_class_name: Utils?$
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
property_name: ^[a-z][a-zA-Z0-9]*$
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
parameter_name: ^[a-z][a-zA-Z0-9]*$
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
type_name: ^[A-Z][a-zA-Z0-9]*$
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
isser_method_name: ^(?:is|has|should|may|supports)
unreachable_code:
enabled: true
check_access_control:
enabled: true
typo_checks:
enabled: true
check_variables:
enabled: true
check_calls:
enabled: true
too_many_arguments: true
missing_argument: true
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
suspicious_code:
enabled: true
overriding_parameter: false
overriding_closure_use: true
parameter_closure_use_conflict: true
parameter_multiple_times: true
non_existent_class_in_instanceof_check: true
non_existent_class_in_catch_clause: true
assignment_of_null_return: true
non_commented_switch_fallthrough: true
non_commented_empty_catch_block: true
overriding_private_members: true
use_statement_alias_conflict: true
precedence_in_condition_assignment: true
dead_assignments:
enabled: true
verify_php_doc_comments:
enabled: false
parameters: true
return: true
suggest_more_specific_types: true
ask_for_return_if_not_inferrable: true
ask_for_param_type_annotation: true
loops_must_use_braces:
enabled: true
check_usage_context:
enabled: true
simplify_boolean_return:
enabled: false
phpunit_checks:
enabled: false
reflection_checks:
enabled: true
# Checks Common Precedence Mistakes
precedence_checks:
enabled: true
assignment_in_condition: true
comparison_of_bit_result: true
basic_semantic_checks:
enabled: true
# Disabled unused code. In most cases, we want to keep it.
unused_code:
enabled: false
deprecation_checks:
enabled: true
useless_function_calls:
enabled: true
metrics_lack_of_cohesion_methods:
enabled: true
metrics_coupling:
enabled: true
stable_code:
namespace_prefixes: []
classes: []
doctrine_parameter_binding:
enabled: false
doctrine_entity_manager_injection:
enabled: false
symfony_request_injection:
enabled: false
doc_comment_fixes:
enabled: true
reflection_fixes:
enabled: false
use_statement_fixes:
enabled: true
remove_unused: true
# Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
preserve_multiple: false
# Whether you would like to preserve blank lines between use statements.
preserve_blanklines: false
order_alphabetically: false
# To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
# php_depend
#php_pdepend:
# enabled: false
# configuration_file: null
# suffixes:
# - php
# excluded_dirs: { }
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'test/*'
# - 'htdocs/includes/*'
# paths: { }
# change tracking
#php_changetracking:
# enabled: false
# bug_patterns:
# - '\bfix(?:es|ed)?\b'
# feature_patterns:
# - '\badd(?:s|ed)?\b'
# - '\bimplement(?:s|ed)?\b'
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'documents/*'
# - 'htdocs/includes/*'
# - 'node_modules/*'
# - 'test/*'
# paths: { }
# Similar code detection
#php_sim:
# enabled: false
# min_mass: 30
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'documents/*'
# - 'htdocs/includes/*'
# - 'node_modules/*'
# - 'test/*'
# paths: { }
# Coding-Style / Bug Detection
#js_hint:
# enabled: false
# use_native_config: true
# extensions:
# - js
# filter:
# excluded_paths:
# - 'build/*'
# - 'dev/*'
# - 'doc/*'
# - 'documents/*'
# - 'htdocs/includes/*'
# - 'node_modules/*'
# - 'test/*'
# paths: { }
# config: { }
# path_configs: { }
before_commands: { }
after_commands: { }
artifacts: { }
build_failure_conditions: { }

14
.stickler.yml Normal file
View File

@@ -0,0 +1,14 @@
---
linters:
phpcs:
standard: 'dev/setup/codesniffer/ruleset.xml'
extensions: 'php'
tab_width: 4
fixer: true
fixers:
enable: true
files:
ignore:
- 'htdocs/includes/*'

View File

@@ -2,13 +2,13 @@
# 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
#scan_logs: false
scan_logs: false
git:
depth: 1
@@ -21,7 +21,7 @@ services:
addons:
mariadb: '10.5'
mariadb: '10.6'
env:
@@ -31,27 +31,25 @@ env:
jobs:
fast_finish: true
allow_failures:
- php: '8.3'
#allow_failures:
#- php: nightly
include:
- stage: PHP min and max
- stage: PHP 7.0-8.1
if: type = push
php: '7.1'
env:
- DB=postgresql
- TRAVIS_PHP_VERSION=7.1
- stage: PHP min and max
- stage: PHP 7.0-8.1
if: type = pull_request OR type = push
php: '8.2'
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.2
- stage: PHP 8.3
if: type = push AND branch = develop
php: '8.3'
php: '8.1'
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.3
- TRAVIS_PHP_VERSION=8.1
#- stage: PHP Dev
# if: type = push AND branch = developdisabled
# php: '8.2'
# env: DB=mysql
notifications:
email:
@@ -83,13 +81,7 @@ before_install:
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2
fi
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,15 +106,15 @@ 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
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo update-alternatives --set php /usr/bin/php8.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo update-alternatives --set php /usr/bin/php8.2
fi
php -i | head -
- |
@@ -133,10 +125,9 @@ 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
- |
@@ -159,7 +150,7 @@ install:
squizlabs/php_codesniffer ^3
fi
# phpunit 9 is required for php 8
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
sudo composer self-update 2.4.4
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
php-parallel-lint/php-parallel-lint ^1.2 \
@@ -206,8 +197,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
@@ -268,9 +259,8 @@ before_script:
- |
export CONF_FILE=htdocs/conf/conf.php
echo "Setting up Dolibarr '$CONF_FILE'"
echo "Setting up Dolibarr $CONF_FILE"
echo '<?php' > $CONF_FILE
echo 'error_reporting(E_ALL);' >> $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
@@ -335,54 +325,26 @@ script:
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
set +e
echo
- |
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
set +e
echo
- |
echo "Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)"
echo "Checking missing debug"
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
set +e
@@ -394,7 +356,6 @@ script:
# Ensure we catch errors
set +e
echo '<?php ' > $INSTALL_FORCED_FILE
echo 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
@@ -414,7 +375,6 @@ script:
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE
echo
- |
echo "Upgrading Dolibarr"
@@ -480,22 +440,15 @@ script:
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
set +e
echo
- |
echo Show some debug info like table content or log
#show table content and log
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
echo
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
- |
echo Result of migration scripts
ls -alrt $TRAVIS_BUILD_DIR/
echo Show content of last file
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
@@ -514,7 +467,6 @@ script:
echo
#cat /tmp/dolibarr_install.log
cat $TRAVIS_BUILD_DIR/enablemodule.log
echo
- |
echo "Unit testing"
@@ -524,7 +476,6 @@ script:
phpunitresult=$?
echo "Phpunit return code = $phpunitresult"
set +e
echo
after_script:
- |

View File

@@ -200,6 +200,12 @@ source_file = htdocs/langs/en_US/ldap.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:link]
file_filter = htdocs/langs/<lang>/link.lang
source_file = htdocs/langs/en_US/link.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:loan]
file_filter = htdocs/langs/<lang>/loan.lang
source_file = htdocs/langs/en_US/loan.lang

View File

@@ -23,22 +23,20 @@ Licence of dependencies of third-party components used by Dolibarr (all compatib
Component Version License GPL Compatible Usage
-------------------------------------------------------------------------------------
PHP libraries:
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.7.4 MIT License Yes Markdown parser
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
PHPDebugBar 1.18.2 MIT License Yes Used only by the module "debugbar" for developers
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHP-Iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
PrestaShop-WS-Lib 94feb5f OSL-3.0 No Library providing API client for Prestashop.
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
@@ -54,7 +52,7 @@ bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
JS libraries:
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
ChartJS 3.7.1 MIT License Yes JS library for graph
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
jQuery 3.6.4 MIT License Yes JS library
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css

786
ChangeLog
View File

@@ -2,257 +2,301 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 18.0.8 compared to 18.0.7 *****
35 files changed, 647 insertions(+), 298 deletions(-)
***** ChangeLog for 19.0.0 compared to 18.0.0 *****
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
For users:
----------
NEW: Compatibility with PHP 8.2
NEW: Module Workstation (used to enhance the module BOM and Manufacturing Order) is now stable
NEW: Add a confirmation popup when deleting extrafields
NEW: Add type 'icon' type for extrafields
NEW: Close #20930 Use ajax for state loading after country change
NEW: #23331 Add support for parent projects (#24856)
NEW: #22531 Expense report - Add two fields into export : Qty & Unit price (excl.) (#26309)
NEW: #22626 date filter thirdparties contracts projects (#22707)
NEW: #24085 Add the Project filter
NEW: #25312 Support extrafields in selectForForms
NEW: #26312 Manage intermediate BIC - SQL Part (#26325)
NEW: Accountancy - Add quick navigation with keyboard shortcut on ledger (#26221)
NEW: Accountancy - FEC/FEC2 format export with attachments (#26192)
NEW: Accountancy - Option to choose length of lettering code
NEW: Add a button to create a product or a service from an order or an invoice (#26173)
NEW: Add a button to re-encrypt data of a dolcrypt extrafield password
NEW: Add a CLI tool to regenerate all documents
NEW: Add a goto url from smartphone search page
NEW: Add all id prof checker on thirdparty for code compta customer and supplier
NEW: add and list external contributors on ticket public interface
NEW: Add a protection on purgeFiles
NEW: Add a public page to list all open surveys
NEW: Add chart of accounts PCG08-PYME-CAT for ES in catalan language
NEW: add constant to check if qty shipped not greater than qty ordered
NEW: Add context for the movement stock (role toconsume/toproduce) on mrp
NEW: Add contract link on ticket
NEW: Add culum Technical ID in list of details lines of an order (#26164)
NEW: ADD: custom compute for exports
NEW: Add custom Text on footer total (#26334)
NEW: Add different picto for each type of extrafields (date, string, ...)
NEW: Add edit line on MO (#26122)
NEW: Added notification on closed intervention
NEW: Added of a popup on validation instead of a database fielld to know if the user wants to include subwarehouse
NEW: Added of the field "include_sub_warehouse" in the table "llx_inventory"
NEW: Added total line to third-parties list (#26148)
NEW: Added VAT free & VAT amounts on payment input
NEW: Add ext payment system ID in the payment page with link to Stripe
NEW: Add field TechnicalID in list of users
NEW: Add filter on status of line of a dictionary
NEW: Add get_substitutionarray_other() on shipping odt (#25080)
NEW: add IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
NEW: Add index on prelevement_demande
NEW: Add invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
NEW: Add label to price level when changing price (#26240)
NEW: Add modifications of template invoices into agenda
NEW: Add more company informations (ProfId7 to 10) (#25266)
NEW: Add more information to holiday mailings (#25461)
NEW: Add more param on fetch() to prepare perf optimization
NEW: Add more tables activated by module activation only
NEW: Add new field into $fields array + Creation of the function getChildWarehouse()
NEW: Add option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
NEW: Add option in PDF for purchase order and quotation to hide prices
NEW: Add option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
NEW: add order supplier submit notif
NEW: add parent product column on list
NEW: Add picto in product/service list in object lines (#25511)
NEW: Add possibility to choose separator #21426
NEW: Add preselected update keys attribute to import class and select it by default if filled
NEW: add product barcode on stock exports
NEW: Add recurring behaviour
NEW: add recursive deletion option for child m os (#26102)
NEW: Add refactoring user permission (#26162)
NEW: add sorting of product price list by customer (#26483)
NEW: Add tab Events/Agenda on recurring invoices
NEW: Add the formEditObjectLine hook on commande card and invoice card
NEW: Add the picto phone of thirdparty on the kanban view of projects
NEW: Add the status of partnership to select partnership for emailing
NEW: add Ticket tab on contract
NEW: agenda per user use quarter hour split instead of half hour split
NEW: Allow generation of delivery note through REST-API (#26226)
NEW: Allow sync of currency rates with currency layer by default.
NEW: Allow to have products not managed in stocks - SQL Part (#26190)
NEW: Assign contact to a ticket message (#24735)
NEW: Better protection against reserved words
NEW: billing on shipment+reception. Can be done before or after delivery.
NEW: can edit bomline workstation
NEW: Can edit both the Test and Live stripe customer account on payment
NEW: Can include product variants in list of products
NEW: Can manage ODT documents for groups of users.
NEW: Can modify the picto into modulebuilder
NEW: Can restore product in stock when deleting the supplier invoice
NEW: Can see the favicon file into setup of properties of a website
NEW: Can switch product batch management to no management. (#21691)
NEW: Can upload/delete ODT template for project and tasks
NEW: chart of accounts ES PCG08-PYME-CAT in catalan language
NEW: clone skill object (#26526)
NEW: close notification for interventions
NEW: column in table prelevement_lignes for fk_user (#26196)
NEW: CONF allow modify ticket classification even if closed
NEW: conf to display date entry stock exped and sort in date order (#22625)
NEW: create a product from a free line in a document (#22324)
NEW: customize position in complete_head_from_modules (#26406)
NEW: Date d'entree en stock sur les exped au moment de la création
NEW: Date field for shipment export (#25574)
NEW: Date format dayhoursec is using year on 2 char on smartphones
NEW: Default customer, category and product when enable TakePOS (#25031)
NEW: do not add default value in list
NEW: drop down for action button show a simple button if only 1 action
NEW: Enhance github_commits_perversion to get more stats on git commits
NEW: Enhance IPN to support payment_intent.succeeded for both card/ban
NEW: extrafields password accepts 'dolcrypt' algorithm (reversible algo)
NEW: Factorize a lot of code for numbering modules
NEW: filter on from/to period rather than month/year (#26378)
NEW: FontAwesome - Add possibility to select another version
NEW: Form for add object's property on moduleBuilder
NEW: Can generate SEPA files for salaries (#26541)
NEW: massactions to delete projects
NEW: Generic doc template for donations (#26338)
NEW: Get list evaluation with skills details in user fiche (#26510)
NEW: hidden conf to disable use of dns_get_record (which can become unresponsive) (#26339)
NEW: improved resource data structure
NEW: Include sub warehouse in inventory
NEW: inventory without virtual products (kits)
NEW: Invoice subtypes for customers and vendors (#26233)
NEW: Invoice time from task, make task note better display in invoice line
NEW: lazy load to substitute project variables (#26451)
NEW: LDAP Active Directory UserAccountControl (#25507)
NEW: Library including math and financial functions (#25035)
NEW: Loan - Can upload a file with drag and drop
NEW: Manage rate indirect. (#26449)
NEW: memorize model name for pdf hooks
NEW: Menu editor is reponsive
NEW: Merge the "Create ..." buttons on contract into one.
NEW: More accurate tooltip on what admin permissions are
NEW: (#24834) new option for hide the footer (#25464)
NEW: (#25044) new option for choose project visibility
NEW: new option for hide the footer of tickets on the public interface
NEW: no need to create invoice supplier object on supplier card for standalone credit note
NEW: Option to show label, ref+label or only ref of product in TakePOS
NEW: payment full amount detail tooltip
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
NEW: Project - List - use select2 multiselect for status
NEW: Propagate invoice extrafields into template invoice (#26529)
NEW: remove include_subwarehouse form llx_inventory database table
NEW: resource improvements - data structure (#26285)
NEW: Retrieve vat details from the Greek Ministry of Finance GSIS SOAP web service and autocomplete third party fields
NEW: Right for stats orders (#24607)
NEW: rights and check access to create portal accounts
NEW: Row in list higher height (#26177)
NEW: Save date of RUM creation when creating a Stripe SEPA mandate
NEW: shipment can include service (for information and invoicing) (#26407)
NEW: Show id of module on the tooltip module help page
NEW: show VAT free amount on payment input close #26208 (#26209)
NEW: start and end date for due date filter on invoice list
NEW: Sub total in list (#26165)
NEW: Suport html content for combo list of email recipient
NEW: Website: Support of js into the Dolibarr server preview
NEW: TakePOS - add constant to check qty asked is available (#24820)
NEW: TakePOS - add constant to choose contact instead of customer (#24807)
NEW: TakePOS - amount label with or without tax in free product (#24829)
NEW: TakePOS compatibility with lots and serials
NEW: TakePOS compatibility with lots and serials (#26426)
NEW: Top menu support picto of modules that are font awesome picto.
NEW: updating by adding massactions for delete projects in societe tab
NEW: updating by adding tooltip for api section in Modulebuilder
NEW: updating by adjust request Sql for Salary invoice (#26279)
NEW: updating for display Help title when try to delete Don (issue #25314)
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.
***** ChangeLog for 18.0.7 compared to 18.0.6 *****
138 files changed, 1622 insertions(+), 530 deletions(-)
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
SEC: Add action confirm_... as sensitive to need a CSRF token
SEC: Disable not used PHP streams
SEC: Add option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY
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
For developers or integrators:
------------------------------
***** 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
QUAL Reduce very seriously the technical debt (using PHPStan, Psalm and Rector)
NEW Tool in dev/tools/rector to autofix code using style coding practice rules
PERF: Removed a useless fetch_thirdparty
PERF: Perf avoid 2 useless fetch into the triggers of agenda.
PERF: performance & code quality enhancements template sections
QUAL: Remove hardcoded code for OVH sms. Generic method is ok now.
QUAL: Code fix using rector
QUAL: Force subclass MINVERSION (#26314)
QUAL: group all flag images into 1 sprite file. (#26459)
QUAL: Move conf->global into getDolGlobal...
QUAL: Refactor merging companies and fix #26272 with Reception objects (#26320)
QUAL: Removed deprecated field remise, remise_percent, remise_absolute
QUAL: Standardize code and look and feel for dictionaries
QUAL: Standardize code. Renamed ID of user properties into ->user_xxx_id
QUAL: Use dol_clone with parameter 2 for ->oldcopy
QUAL: use switch case instead of if elseif statements for actions
QUAL: Better respect of REST API RFC.
NEW: [Add hook in user bank page]
NEW: #19501 Add two hooks in dolreceiptprinter.php (#26439)
NEW: Accountancy - Add hooks on PrintFieldList for expensereportsjournal, purchasesjournal, sellsjournal
NEW: add a $notrigger param to Product::updatePrice() method (#26404)
NEW: Add a rule to fix empty($conf->global->...) into !getDolGlobal...
NEW: Add column extraparams on societe_rib
NEW: Add hook on selectLotDataList() function (#25368)
NEW: add Hooks and prepare extrafields management for product invoices consumptions (#26280)
NEW: Add hooks on import, step 5 - 6 (#24915)
NEW: add hook tabContentCreateSupplierOrder (#26418)
NEW: add hook tabContentViewSupplierInvoice (#26431)
NEW: add new hook AfterImportInsert
NEW: add new hook OrderCard (#26380)
NEW: add new hook tabContentCreateOrder (#26408)
NEW: Add phpunit for REST API of contacts
NEW: Add triggers COMPANY_RIB_XXX already present in companybankaccount.class.php
NEW: Add triggers on import success
NEW: Add trigger when deleting a bank account line
NEW: subproduct triggers in product class (#25142)
NEW: ModuleBuilder: add section changeLog to Doc in MB
NEW: ModuleBuilder: Add api url to documentation in ModuleBuilder
NEW: ModuleBuilder: Checkin comments begin and end before each actions
NEW: ModuleBuilder: edit properties in description tab for ModuleBuilder
NEW: ModuleBuilder: remove dictionary in ModuleBuilder
NEW: ModuleBuilder: add page for create dictionary
NEW: ModuleBuilder: add badge for each tabs
NEW: ModuleBuilder: for edit name of dictionnary and delete it in MB
NEW: add barcode function to check if EAN13 is valid (
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Recheck the setup of your module Workflow to see if you need to enable the new setting to have shipment set to billed automatically when
an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order), because this setup has changed.
* The hook changeHelpURL is replaced by llxHeader
* The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT.
* The duplicated and deprecated property ->date_livraison that was renamed into ->delivery_date has been completely removed.
* The property ->user_close to store ID of closing user has been renamed into ->user_closing_id.
* The property ->user_validation to store ID of user validating has been renamed into ->user_validation_id.
* 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 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).
* New hook files of modules actions_mymodule.class.php should now "extends CommonHookActions"
* Endpoint for API /partnershipapi and /recruitment has been renamed into /partnerships and /recruitments to follow name conventions.
* Hidden option ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT has been renamed into ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT
* The delete() method of AdherentType, Contact, Delivery, MultiCurrency, CurrencyRate now need $user as first parameter.
* A very high number of class properties (with old name in french) are now deprecated in favor of the property name in english.
* 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.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
FIX: #24185: v18: display of the merged pdf lists
FIX: #26416 BOM_SUB_BOM blank page
FIX: #27166
FIX: #27262 Recurrent invoice - user to string conversion
FIX: #27970 #26283 #27970
FIX: Accountancy - Level 3 of binding not working on supplier side (#27462)
FIX: Accounting files export - Use th instead of td on all title columns (#28003)
FIX: add action update_extras to don card
FIX: Adding hooks init
FIX: Adding the $encode parameter to recursive _replaceHtmlWithOdtTag() utilisation
FIX: add new hook context for mo production card (#28037)
FIX: avoid from re-initializing result on nested hook getEntity (#27799)
FIX: avoid sql error (issue #26342)
FIX: bad accountancy code autoselection for supplier ventilation
FIX: Bad visible status of proposal after reopen
FIX: Barcode header cell not well displayed
FIX: BarCode Header not well displayed
FIX: Bar code verification should be done by entity because generation does (#28087)
FIX: can edit reminders on past events
FIX: check parameter socid before cloning a customer proposal (#28085)
FIX: crabe PDF is generating in conf->entity instead of object->entity
FIX: CVE-2024-23817 (#28089)
FIX: disable pointer events on jQuery-UI tooltips to prevent a glitch (fast-blinking tooltip)
FIX: Error on emailreminder not reported
FIX: Fatal error converting object of class User to string (php8)
FIX: filter by entity on contact is missing
FIX: Fix supplier invoice security check
FIX: format of color in manifest is wrong when using a custom color
FIX: #GHSA-7947-48q7-cp5m
FIX: HTML injection vulnerability in Dolibarr Application Home Page
FIX: invoice add line save devise
FIX: Keep a link to enable a 'always_enabled' module to solve pb.
FIX: label
FIX: line special_code never saved (#28051)
FIX: link to print when there is a search on multiselect fields
FIX: Menu Create of project no working on smartphone with no top menu.
FIX: missing $search_sale var (backport from v19)
FIX: Missing begin transaction when updating supplier recurring invoice
FIX: missing entity filter for check if period exists
FIX: more correctly parse the select part to be replaced in sql queries
FIX: MouvementStock::origin is not an object
FIX: notification information on intervention validated confirmation message (v17+)
FIX: not load all contacts by default when creating an event
FIX: port in Docker MailDev
FIX: propal use devise changes
FIX: public user photo not visible if $dolibarr_main_instance_unique_id
FIX: remove DISTINCT (backport from v19)
FIX: remove specific name from v19
FIX: Retours PR
FIX: Return a better error message when token is not valid
FIX: search by ref & rowid in don list
FIX: search by thirdparty in don list
FIX: several names for one const THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT
FIX: SQL concatenation error
FIX: [TAKEPOS] display prices with or without taxes depending on setup (TAKEPOS_CHANGE_PRICE_HT)
FIX: Ternary operator condition is always true/false
FIX: too long output
FIX: Undefined property: Task::$fk_parent
FIX: uniformization to use "intervention"
FIX: Update loan.class.php (#27971)
FIX: update price extrafield on propal card
FIX: user filter in per user view of event list (#28049)
FIX: use the currency for propal signature page
***** ChangeLog for 18.0.4 compared to 18.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
@@ -444,8 +488,8 @@ FIX: when adding new times on a survey, all hours would be erased.
***** ChangeLog for 18.0.0 compared to 17.0.0 *****
For users:
----------
For uses:
---------
NEW: PHP 8.2 compatibility (not yet complete).
NEW: Module Workstations Management upgraded to stable status.
@@ -458,56 +502,66 @@ NEW: Accountancy - Manage intra-community VAT on supplier invoices - FPC22
NEW: Accountancy - iSuiteExpert export model
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
NEW: Add a public virtual card page for each user
NEW: Add a status on supplier price ref (WIP to close a supplier ref)
NEW: add bookmarks in selectable landing pages for users
NEW: Add column ext_payment_site into societe_rib to allow multiple payment mode
NEW: add convertion of images to webp for a single image in website media editor
NEW: Add CRC for currency symbol before amount
NEW: add customer code to invoices listing
NEW: Add filter on nb of generation done in list of recurring invoices
NEW: Add filters and sort on product unit column
NEW: Add link to edit VAT list from error message of missing VAT
NEW: add margins in paiement/card.php
NEW: Add mass action delete on VAT
NEW: Add origin info when create a product batch when created from a movement stock
NEW: Add possibility to choose format #21426
NEW: Add SQL contraint on product_stock table to allow only exsting product and warehouse #23543
NEW: Add STRIPE_DEBUG, a way to log Stripe IPN
NEW: An external module can modify the quick search fields
NEW: Bank: Bank name no more mandatory on creation. Can be generated if empty.
NEW: Bank: Add fields zip, town, country for owner of a bank account
NEW: Auto activate some modules on install (Export/Import/Wysiwyg editor)
NEW: Autofill email form with the email template with status "Default" on
NEW: Bank name no more mandatory on creation. Can be generated if empty.
NEW: Bank: Add fields zip, town, country for owner of a bank account
NEW: batch referential objets
NEW: Can add the add now link on date into addfieldvalue()
NEW: Can add an array of several links in date selector
NEW: Can bin accounting line for a given month
NEW: Can edit account on miscellaneous payment (if not transfered)
NEW: Can edit inline the VAT number from supplier tab
NEW: Can fill date of salary payment with date of start of salary
NEW: Can go back to draft on shipment when stock change not on validate
NEW: Can modify bank account of sepa payment (if file not sent yet)
NEW: Customers: add date due and labels into customer comm card
NEW: Can select the export format during export of journals
NEW: Can set a checkbox in formconfirm by clicking on the label
NEW: Can set flag default value on email templates
NEW: Can set the page "List of opportunities" as landing page
NEW: Can show the SQL request used on emailing selection
NEW: Can show the sql request used on emailing selection
NEW: can stay on edit field when errors occurs
NEW: comment in api_mymodule for seperate methods
NEW: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
NEW: create email substitution variable for intervention signature URL
NEW: Contacts: presend mass action in contact list
NEW: Contacts: hook printFieldListFrom in contact list
NEW: Customers: add date due and labels into customer comm card
NEW: Debug the custom CSS feature to avoid a directory search/scan at
NEW: dev name
NEW: Disable bad reputation product price
NEW: Email: autofill email form with the email template with status "Default" on
NEW: dolExplodeIntoArray can accept regex
NEW: dol_sort_array can sort on alphabetical order even if val is num
NEW: element time integration code + SQL
NEW: Email: don't have closed contact proposed as receiver for the mails
NEW: Email: can set flag default value on email templates
NEW: Email-Collector: add field reply-to in email collector as possible filter
NEW: Email-Collector: substitute date now in email collector
NEW: Email-Collector: operation type in email collector to load or create contact
NEW: Email-Collector: easier setup - can also use ! for negative search
NEW: Email-Templates: show module into list of email templates
NEW: Events: can add any contact on events if global MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is set at 1
NEW: Events: list with color
NEW: Events: remove default percentage for event creation url
NEW: expend/collapse list of social networks
NEW: Filter on amount and qty on list of service's contracts
NEW: formconfirm can support field with format datetime
NEW: getCommonSubstitutionArray to have more substitute keys
NEW: GeoIP: Can test a geoip conversion from the geoip setup page
NEW: GUI: add a CSS editor into the admin GUI
NEW: GUI: add dropdown button actions (example on Create button on project)
@@ -518,17 +572,16 @@ NEW: GUI: can set background style with MAIN_LOGIN_BACKGROUND_STYLE
NEW: Help: Tooltip to explain how to add a photo on a product
NEW: Help: Possibility to link to German pages in help
NEW: helper functions for dates + small demo case
NEW: HR - Salary: can fill date of salary payment with date of start of salary
NEW: hook printFieldListFrom in contact list
NEW: HR - Salary: can modify the date of payment of a salary (if not reconciled)
NEW: HR - Salary: date for salary payment includes the hour/min
NEW: HR - Salary: adding button Send Email on the salary file
NEW: Import: filter on entity in import
NEW: Import: map table to element for get entity in import
NEW: inc.php: handle parameters from argv
NEW: Installation: Auto activate some modules on install (Export/Import/Wysiwyg editor)
NEW: Invoice: show category of operations
NEW: Invoice: add customer code to invoices listing
NEW: Invoice - show category of operations
NEW: Keep a link between user created from recruitment and application
NEW: List product in orders
NEW: Mass Actions: Better responsive for mass actions
NEW: Members: add numbering modules for members
NEW: Members: add widget box_members_by_tags.php
@@ -542,75 +595,75 @@ 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: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
NEW: only get open contact from liste_contact function, to not have access to closed contact as mail receiver
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
NEW: Orders: add sub total in order list det
NEW: Orders: list product in orders
NEW: Orders export: allow to export field 'shipment method'
NEW: payment default values when supplier order created from reception
NEW: Payment: manage contracts
NEW: Payment: sepaStripe now creates the payment mode with type pm_ using new API
NEW: Payment: add partial payment reason "withholding tax"
NEW: Payment: Can edit account on miscellaneous payment (if not transfered)
NEW: Payment : manage contracts
NEW: presend mass action in contact list
NEW: Print PDF: category of operation for crabe PDF model
NEW: Print PDF: Name and date to print on PDF Sign
NEW: Print PDF: Use the more recent PDF templates for documents by default on a fresh install
NEW: Print PDF: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
NEW: Print PDF: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
NEW: product images on popup are cached
NEW: Products: Add origin info when create a product batch when created from a movement stock
NEW: Products: Add statistics by amount on statistics of products.
NEW: Products: Add SQL contraint on product_stock table to allow only existing product and warehouse #23543
NEW: Proposals: filter for Signed+Billed in proposals
NEW: Proposals: can modify margin rates in offers like VAT rates
NEW: Proposals: option filter for NoSalesRepresentativeAffected in proposals list
NEW: Proposals: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
NEW: Reception: can receive more than qty ordered on reception
NEW: referential objects of batch
NEW: remove default percentage for event creation url
NEW: remove keys whose table element is the same as element in map list
NEW: repair script skip views
NEW: search on time spent duration range
NEW: Security: Save date to invalidate other session into user table
NEW: Security: Invalidate all sessions of a user when password is modified.
NEW: Service Contracts: Filter on amount and qty on list of service's contracts
NEW: search on time spent duration range
NEW: sepaStripe now creates the payment mode with type pm_ using new API
NEW: set payment default values when supplier order created from reception
NEW: set today start time at beginning
NEW: Show counter of access of website in website list
NEW: Show main currency in company info user tooltip
NEW: Show module into list of emails templates
NEW: Show picto into the combobox of widgets
NEW: Show supplier invoice ref of direct debit transfer tab invoices
NEW: Social Networks: expend/collapse list of social networks
NEW: show supplier name in getNomUrl of supplier order
NEW: sort of column of custom group of account
NEW: Supplier Invoices: add ability of ODT support to supplier invoices
NEW: Stock limit for alert and desired optimal stock by product and warehouse import
NEW: Stock: Add warehouse create and modify triggers.
NEW: Stock: Can select several warehouses into the view stock at date in past
NEW: Stripe: add STRIPE_DEBUG, a way to log Stripe IPN
NEW: Supplier Invoices: add ability of ODT support to supplier invoices
NEW: Supplier Order: show supplier name in getNomUrl of supplier order
NEW: Supplier Order: set payment default values when supplier order created from reception
NEW: Supplier Price: Add a status on supplier price ref (WIP to close a supplier ref)
NEW: Support different bank account for several direct debit payments
NEW: Support multiselect in the warehouse selection combo box
NEW: Option: MAIN_SECURITY_MAXFILESIZE_DOWNLOADED #yogosha10660
NEW: Survey: Comment on survey is possible only after vote.
NEW: tables: llx_element_time to store time spent on several elements (mo, ticket...)
NEW: TakePOS: adapt category and product pictures sizes on TakePOS
NEW: TakePOS: limit load products in TakePOS
NEW: The batch for remind on due date can be setup for using validation date
NEW: The refresh link for IMAP collector is always visible
NEW: Third-Party: use an ajax component to switch prospection status on thirdparty list
NEW: The refresh link for imap collector is always visible
NEW: The upgrade process can be done by creating a file upgrade.unlock
NEW: Tickets: --Send an email when ticket assigned--
NEW: Tickets: Send a notification email when ticket assigned
NEW: Tickets: set ticket status to answered if the client has answered from the public interface
NEW: Tickets: added an option to display the progress of tickets on the public interface
NEW: Tickets: add link to thirdparty tickets history
NEW: Tickets: notify also the contributor affected to a ticket if a new message public is post (add global TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ALSO_CONTRIBUTOR)
NEW: Upgrades: The upgrade process can be done by creating a file upgrade.unlock
NEW: Use a cache file for external RSS in calendar
NEW: Use by default the domain $dolibarr_main_url_root for SMTP HELO
NEW: Users: add a public virtual card page for each user
NEW: use more recent model by default
NEW: VAT can be modified during add of line
NEW: Website Module: Increment website counter on each page access in website module
NEW: Website Module: Show counter of access of website in website list
NEW: Widgets: Show picto into the combobox of widgets
NEW: write all fields and their properties in asciidoc format
NEW: Can add an array of several links in date selector
NEW: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
NEW: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
NEW: Widgets: Implement MAIN_ACTIVATE_FILECACHE on birthday widget
NEW: Widgets: Add widget "The next upcoming events"
NEW: Widgets: Add widget of open opportunities
NEW: use an ajax component to switch prospection status on thirdparty list
NEW: Add partial payment reason "withholding tax"
@@ -620,41 +673,31 @@ For developers or integrators:
NEW: Make it possible to select hours and minutes in form_confirm
NEW: add triggers on mailing
NEW: Add a trigger when create a shipping line batch and fix propagate missing errors
NEW: add function for listing objects from directory
NEW: add function for listiong objects from directory
NEW: add helplist property to describe fields of objects
NEW: API: Support contact in post() document API
NEW: API: more APIs (update currency rate, upload of supplier documents, ...)
NEW: Hooks: printFieldListFrom in contact list
NEW: Hooks: add hook in loadLotStock() in html.formproduct.class.php file
NEW: Hooks: add hook 'llxFooter'
NEW: Hooks: add hook online sign
NEW: Hooks: add sent info in the parameters provided to the hook sendMailAfter
NEW: Libraries: Update libs parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
NEW: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign
NEW: Update lib parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
NEW: Support contact in post() document API
NEW: More APIs (update currency rate, upload of supplier documents, ...)
NEW: ModuleBuilder: updating in modulbuilder on tab Menu when adding object
NEW: ModuleBuilder: add/edit permissions
NEW: ModuleBuilder: better generated documentation
NEW: add sent info in the parameters provided to the hook sendMailAfter
NEW: add setAsSelectUser into factory for generic setup page
NEW: add option keepspace into dol_string_nospecialchar()
NEW: dol_sort_array can sort on alphabetical order even if val is num
NEW: dolExplodeIntoArray can accept regex
NEW: element time integration code + SQL
NEW: tables: llx_element_time to store time spent on several elements (mo, ticket...)
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
NEW: getCommonSubstitutionArray to have more substitute keys
NEW: write all fields and their properties in asciidoc format
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Minimal PHP version is now PHP 7.1 instead of PHP 7.0
* Sensitive datas like keys in setup pages, that need encyption (for example the API keys of users, the CRON security key, the keys into the Stripe module, or
* Sensitive datas like keys in setup pages, that need encyption (for example the API keys of users, the CRON security key, the keys into the Stripe module, or
external modules setup pages that store sensitive keys or password), are using the $dolibarr_main_instance_unique_id as part of the key for encryption. So,
if you restore or duplicate the data from another instance dump, you must also update this parameter in ther conf.php file to allow decryption in the new instance, or
if you restore or duplicate the data from another instance dump, you must also update this parameter in ther conf.php file to allow decryption in the new instance, or
better, you must reenter the sensitive data into the setup pages of the new instance to resave them correctly.
Note that to find all the parameters that are encrypted into the setup database, you can do a "SELECT * FROM llx_const WHERE value LIKE '%dolcrypt%';"
Note that to find all the parameters that are encrypted into the setup database, you can do a "SELECT * FROM llx_const WHERE value LIKE '%dolcrypt%';"
* The deprecated method "escapeunderscore()" of database handlers has been removed. You must use "escapeforlike()" instead.
* The method "nb_expedition()" has been renamed into "countNbOfShipments()"
* The method "nb_expedition()" has been renamed into "countNbOfShipments()"
* Revert default type of hooks. Default is now 'addreplace' hooks (and exception become 'output' hooks, that become deprecated).
* Deprecated property libelle removed from entrepot class.
* The type 'text' in ->fields property does not accept html content anymore. Use the type 'html' for that.
@@ -663,6 +706,117 @@ Note that to find all the parameters that are encrypted into the setup database,
* The method getCheckOption() and deleteCPUser() of class Holiday has been removed (it was not used)
***** ChangeLog for 17.0.4 compared to 17.0.3 *****
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:
FIX: 17.0 - php8 warnings: test for $field existence before checking is_null
FIX: #25399 (#26694)
FIX: #25458 intervention localizations (backport v17) (#26757)
FIX: #25580 install/step1.php - wrong command line argument used for $main_dir (#25581)
FIX: #25919
FIX: #25934 #25929
FIX: #26100 - Ticket - On edit, list of closed project must be excluded (#26223)
FIX: #26195 - Various payment - List of project excluded those assigned to third parties (#26222)
FIX: #26735 FIX: #26994
FIX: #27262 Recurrent invoice - user to string conversion
FIX: Accountancy - Possibility to write in bookkeeping expense report operation with some line not bound (#26545)
FIX: Accountancy - Update Quadra export format
FIX: add action update_extras to don card
FIX: add_customer_ref_on_linked_shipment (#26349)
FIX: add display of an error when attempting to delete a committed transaction (#26573)
FIX: Adding the $encode parameter to recursive _replaceHtmlWithOdtTag() utilisation
FIX: add warning in the changelog
FIX: avoid php8 warnings (#25596)
FIX: avoid warning : Cannot use a scalar value as an array (#26437)
FIX: Backport memory fix for fatal error when +100000 products
FIX: backport SQL error on global search product
FIX: bad accountancy code autoselection for supplier ventilation
FIX: Bad calculation of localtax when price_base_type not defined.
FIX: bad check return for sendfile
FIX: bad from and to
FIX: Bad value of accounting account shown in list. Edit fails.
FIX: Barcode header cell not well displayed
FIX: Bar code verification should be done by entity because generation does (#28087)
FIX: # Bug Estimated Stock at date value in V14 (#26479)
FIX: Can't access to rec supplier invoice card
FIX: Can't delete a fourn commande row if a commande ligne is linked
FIX: check tva_tx before comparing price_min_ttc (#25220)
FIX: commande context (#26497)
FIX: compare the result of the send mail file function
FIX: could not delete a fourn commande row if a commande ligne is linked
FIX: count cronjob list differs of lines shown nb
FIX: crabe PDF is generating in conf->entity instead of object->entity
FIX: creation of invoice from contract with discount lines
FIX: CVE-2024-23817 (#28089)
FIX: dir output path for ODT models on reception card
FIX: disable pointer events on jQuery-UI tooltips to prevent a glitch (fast-blinking tooltip)
FIX: Error handling for computed values on import (#24897)
FIX: escape HTML tags in return value of getFullName() (#26735)
FIX: export FEC
FIX: Fatal error converting object of class User to string (php8)
FIX: fatal error with bad definition of dictionaries
FIX: filter by entity on contact is missing
FIX: Fix supplier invoice security check
FIX: HTML in ODT templates (#26181)
FIX: include
FIX: label
FIX: line special_code never saved (#28051)
FIX: link to create purchase order from sale order
FIX: menu auguria
FIX: message order in ticket public view is not coherent with tickets events tab
FIX: Missing begin transaction when updating supplier recurring invoice
FIX: missing contact_id for the trigger
FIX: Missing error message on CommandeFourn creation
FIX: missing fk_account situation invoice
FIX: missing project entity filter (Issue #26243) (#26247)
FIX: modification of complementary attributes in commercial proposals
FIX: modification of complementary attributes in invoices (#26180)
FIX: more correctly parse the select part to be replaced in sql queries
FIX: not create/update extrafields for visibility 0,2 and 5
FIX: notification information on intervention validated confirmation message (v17+)
FIX: payment card: misleading message when delete button disabled
FIX: payment : language is not propagated to following pages
FIX: pdf cornas page head multicell width (backport v17)
FIX: possible inconsistency between llx_ecm_files and file system when BILL_SUPPLIER_VALIDATES changes ref
FIX: Prices visible on TakePOS KO with multiprices support
FIX: product list accounting length
FIX: propal list : warning if product module is not enabled (#25583)
FIX: Propal's negative quantities
FIX: Quick search Intervention redirect to wrong page
FIX: reception odt dir output path
FIX: regression on rounding stocks fields on product list
FIX_reload_linked_objects_on_propal_closeas
FIX: Return right content type
FIX: right access on salary card and tabs
FIX: rights paymentsc paiementcharge
FIX: same broken feature as v18 (Multicompany)
FIX: Save user modif id when changing a contact status
FIX: search by ref & rowid in don list
FIX: search by thirdparty in don list
FIX: special_code update line keep old value. (#26819)
FIX: SQL concatenation error
FIX: SQL request parenthesis
FIX: substitute project variables in invoice documents (#26445)
FIX: Suppliers addlines never have VAT if buyprice for this supplier
FIX: [TAKEPOS] display prices with or without taxes depending on setup (TAKEPOS_CHANGE_PRICE_HT)
FIX: TakePOS receipt preview in admin #25648
FIX: template invoice list extrafield filters (backport v17) (#26227)
FIX: thirdparty object in proposal card is not loaded
FIX: too long output
FIX: translation button
FIX: use event.key instead event.which to avoid keyboard difference
FIX: Use of line->insert instead of line->create
FIX: user creation when LDAP is configured (#26332)
FIX: Use the wrong logo size on PDF
FIX: v17: Param $notrigger in $societe->create() causes method to return true regardless of actual result of database functions (#26499)
FIX: warning param $lineID getSpecialCode is negatif (#26826)
FIX: warning php8.2 undefined_array_key (#26830)
FIX: warning when Workboard Responses display non numeric strings
FIX: Wrong backtopage given for the stocktransfer button from the stocktransfer list (#26271)
FIX: wrong place of trigger delete
***** ChangeLog for 17.0.3 compared to 17.0.2 *****
FIX: #20304 propaldates update
FIX: #24508 Label not reported when creating a supplier invoice template (#25340)
@@ -1056,7 +1210,7 @@ WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Minimal PHP version is now PHP 7.0 instead of PHP 5.6
* Core has introduced a Universal Filter Syntax for seach criteria. Example: ((((field1:=:value1) OR (field2:in:1,2,3)) AND ...). In rare case, some filters
could be provided by URL parameters. For such cases (societe/ajax/company.php), use of Universal Filter Syntax become mandatory.
could be provided by URL parameters. For such cases (societe/ajax/company.php), use of Universal Filter Syntax become mandatory.
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product->getNomUrl()
* Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead.
* All functions fetch_all() have been set to deprecated for naming consitency, use fetchAll() instead.
@@ -1134,7 +1288,7 @@ FIX: #23019 Impossible to add task times to an existing draft invoice
FIX: #23072
FIX: #23075
FIX: #23087
FIX: #23115
FIX: #23115
FIX: #23116
FIX: #23117
FIX: #23281
@@ -2686,7 +2840,7 @@ NEW: add quick dropdown menu in top right menu (experimental with MAIN_USE_TOP_M
NEW: add region in export companies and contacts
NEW: add rights on margin info on invoice list
NEW: add search param for close date on order list
NEW: add show preview for mail attachement on form mail
NEW: add show preview for mail attachment on form mail
NEW: add State/Province origin for products
NEW: add the workflow interaction close intervention on closing ticket
NEW: add tracking number in list and search_all items
@@ -4071,7 +4225,7 @@ FIX: access to public interface when origin email has an alias.
FIX: Alias name is not into the email recipient label.
FIX: allow standalone credit note even if no invoice
FIX: an admin can not access his own permissions after enabling advanced permissions
FIX: Attachement of linked files on ticket when sending a message
FIX: Attachment of linked files on ticket when sending a message
FIX: avoid non numeric warning
FIX: Bad currency var used in stripe for connect
FIX: Bad list of ticket on public interface for ticket emailcollector
@@ -4867,7 +5021,7 @@ NEW: hidden option to define an invoice template for each invoice type
NEW: Highlight lines on lists when they are checked
NEW: Notification module support expense report+holiday validation and approval
NEW: On customer/supplier card, add simple tooltip to amount boxes
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachments
NEW: possibility to add all rights of all modules in one time
NEW: redirect if only one result on global search on card
NEW: Permission to ignore price min
@@ -6311,7 +6465,7 @@ NEW: No external check of version without explicit click in about page.
NEW: ODT docs for USER USERGROUP CONTRACT and PRODUCT class
NEW: odt usergroup
NEW: On invoices generated by template, we save if invoice come from a source template.
NEW: option to copy into attachement files of events, files send by mail (with auto event creation)
NEW: option to copy into attachment files of events, files send by mail (with auto event creation)
NEW: PDF with numbertoword
NEW: Permit multiple file upload in linked documents
NEW: PHP 7.1 compatibility

View File

@@ -70,7 +70,7 @@ Note: *Le processus de migration peut être lancé manuellement et plusieurs foi
## CE QUI EST NOUVEAU
Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog).
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
## CE QUE DOLIBARR PEUT FAIRE
@@ -88,11 +88,11 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Gestion de contrats de services
- Gestion de stock et inventaires
- Gestion des expéditions
- Gestion des demandes de congés
- Gestion des demandes de congès
- Gestion des notes de frais
- Gestion de recrutement
- GED (Gestion Electronique de Documents)
- E-Mailings de masse
- EMailings de masse
- Réalisation de sondages
- Gestion d'adhérents
- Point de vente/Caisse enregistreuse
@@ -107,17 +107,17 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Support des codes barres
- Calcul des marges
- Connectivité LDAP
- Intégration de ClickToDial
- Intégratn de ClickToDial
- Intégration RSS
- Intégration Skype
- Intégration de système de paiements (PayPal, Stripe, Paybox...)
- Intégation Skype
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
-
### Divers
- Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module.
- Multidevise.
- Multi-devise.
- Peux être multi-société par ajout du module externe multi-société.
- Plusieurs thèmes visuels.
- Application simple à utiliser.
@@ -127,7 +127,7 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- Support natif de nombreuses fonctions spécifiques aux pays comme:
- La taxe espagnole TE et ISPF
- La tax espagnole TE et ISPF
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
- La loi française Finance 2016 et logiciels de caisse
- La double taxe canadienne
@@ -139,7 +139,7 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
### Extension
Dolibarr peut aussi être étendu à volonté avec l'ajout de modules/applications externes développées par des développeurs tiers, disponible sur [DoliStore](https://www.dolistore.com).
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
@@ -168,15 +168,15 @@ Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/CO
## ACTUALITES ET RESEAUX SOCIAUX
Suivez le projet Dolibarr sur les réseaux francophones
Suivez le projet Dolibarr project sur les réseaux francophones
- [Facebook](https://www.facebook.com/dolibarr.fr)
- [X](https://www.twitter.com/dolibarr_france)
- [Twitter](https://www.twitter.com/dolibarr_france)
ou sur les réseaux anglophones
- [Facebook](https://www.facebook.com/dolibarr)
- [X](https://www.twitter.com/dolibarr)
- [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr)

View File

@@ -9,7 +9,7 @@ Dolibarr ERP & CRM is a modern software package that helps manage your organizat
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
You can freely use, study, modify or distribute it according to its license.
You can freely use, study, modify or distribute it according to its licence.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
@@ -47,9 +47,9 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 3.6, 9.0, ...)
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
@@ -57,7 +57,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- From your browser, go to the dolibarr "install/" page
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
`http://localhost/dolibarr/htdocs/install/`
@@ -71,7 +71,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- Follow the installer instructions
### SaaS/Cloud setup
### Saas/Cloud setup
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
@@ -81,7 +81,7 @@ Dolibarr supports upgrading, usually without the need for any (commercial) suppo
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Overwrite all old files from the 'dolibarr' directory with files provided into the new version's package.
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
@@ -98,13 +98,13 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
Product Management
- Products and/or Services catalogue
- Products and/or Services catalog
- Stock / Warehouse management + Inventory
- Barcodes
- Batches / Lots / Serials
- Product Variants
- Bill of Materials (BOM)
- Manufacturing Orders (MO)
- Manufacturing Orders
Customer/Sales Management
@@ -114,8 +114,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Customer Orders management
- Contracts/Subscription management
- Interventions management
- Ticket System (+ Knowledge management)
- Partnership management
- Ticket System
- Shipping management
- Customer Invoices/Credit notes and payment management
- Point of Sale (POS)
@@ -125,7 +124,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Suppliers/Vendors + Contacts
- Supplier (price) requests
- Purchase Orders management
- Delivery/Reception
- Delivery/Receiption
- Supplier Invoices/credit notes and payment management
- INCOTERMS
@@ -142,18 +141,16 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
Collaboration
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
- Shared calendar/agenda (with ical and vcal import/export for third party tools integration)
- Projects & Tasks management
- Event organization
- Ticket System
- Surveys
HR - Human Resources Management
HR
- Employee's leaves management
- Expense reports
- Recruitment management
- Employee/staff management
- Timesheets
### Other application/modules
@@ -171,20 +168,20 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Payment platforms integration (PayPal, Stripe, Paybox...)
- Email-Collector
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
(around 100 modules available by default, 1000+ on the addon market place)
### Other general features
- Multi-Language Support (Localization in most major languages)
- Multi-users and groups with finely-grained rights
- Multi-Users and groups with finely grained rights
- Multi-Currency
- Multi-Company (by adding of an external module)
- Very user-friendly and easy to use
- Very user friendly and easy to use
- Customizable dashboards
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- APIs (REST, SOAP)
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country-specific features:
- Support a lot of country specific features:
- Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT
@@ -192,7 +189,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Argentina invoice numbering using A,B,C...
- ZATCA e-invoicing QR-Code
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with data privacy rules (Europe GDPR, ...)
- Compatible with data privacy rules (europe GDPR, ...)
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
- ...
@@ -207,7 +204,7 @@ See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequ
### Extending
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com).
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## WHAT DOLIBARR CAN'T DO YET
@@ -215,19 +212,19 @@ These are features that Dolibarr does **not** yet fully support:
- Tasks dependencies in projects
- Payroll module
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
- Dolibarr can't do coffee (yet)
## DOCUMENTATION
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING
This project exists thanks to all the people who contribute.
Please read the instructions on how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
A View on Contributors:
A view on Contributors:
[![Dolibarr](https://opencollective.com/dolibarr/contributors.svg?width=890&button=false)](https://github.com/Dolibarr/dolibarr/graphs/contributors)
@@ -242,7 +239,7 @@ See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) fil
Follow Dolibarr project on:
- [Facebook](https://www.facebook.com/dolibarr)
- [X](https://x.com/dolibarr)
- [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)

View File

@@ -20,9 +20,9 @@ We believe that the future of software is online SaaS. This means software are m
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
We recommend to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
### User Agent
@@ -30,7 +30,7 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
### Account access
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
## Eligibility and Responsible Disclosure
@@ -38,7 +38,7 @@ We are happy to thank everyone who submits valid reports which help us improve t
You must be the first reporter of the vulnerability (duplicate reports are closed).
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommend to install software on your own platform.
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
@@ -48,31 +48,27 @@ Reports are processed around once a month.
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
* The version to analyze must be the last version available in the "develop" branch. Reports on vulnerabilities already fixed (so already reported) in the develop branch will not be validated.
* $dolibarr_main_prod must be set to 1 in conf.php
* $dolibarr_nocsrfcheck must be kept to the value 0 in conf.php (this is the default value)
* The version to analyze must be the last version available into "develop" branch or into last stable "vX.Y" released version.
* $dolibarr_main_prod must be set to 1 into conf.php
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
* $dolibarr_main_force_https must be set to something else than 0.
* Some constant must be set in the backoffice menu Home - Setup - Other
- MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
CSRF attacks and HTML injections are accepted but double check this setup that is experimental setup that already fix a lot of case and soon enabled by default.
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default). CSRF attacks are accepted but
double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only if HTML or JavaScript injection can be done by a non-allowed user.
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
* Fail2ban rules for rate limit on the login page,password forgotten page, api calls and all public pages (/public/*) must be installed as recommendend into the section "About - Admin tools - Section Access limits and mitigation".
Scope is the web application (backoffice) and the APIs.
Scope is the web application (back office) and the APIs.
## Examples of vulnerabilities that are Qualified for reporting.
* Remote code execution (RCE)
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except into module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
* Open redirect
* Broken authentication & session management
@@ -80,21 +76,24 @@ Scope is the web application (backoffice) and the APIs.
* Cross-Origin Resource Sharing (CORS) with real security impact
* Horizontal and vertical privilege escalation
* "HTTP Host Header" XSS
* Software version disclosure (for non-admin users only)
* Stack traces or path disclosure (for non-admin users only)
* Software version disclosure (for non admin users only)
* Stack traces or path disclosure (for non admin users only)
## Examples of vulnerabilities that are Non-qualified for reporting.
* "Self" XSS
* Clickjacking/UI redressing
* Presence of autocomplete attribute on web forms
* Logout and other instances of low-severity Cross-Site Request Forgery
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
* Software or libraries versions, private IP disclosure, Stack traces or path disclosure when logged-in user is admin.
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
* SSL/TLS best practices
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
* Denial of Service attacks
* Clickjacking/UI redressing
* Physical or social engineering attempts or issues that require physical access to a victims computer/device
* Presence of autocomplete attribute on web forms
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
* Logout and other instances of low-severity Cross-Site Request Forgery
* Missing security-related HTTP headers which do not lead directly to a vulnerability
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
* Reports on features flagged as "experimental" or "development"
* Software version or private IP disclosure when logged-in user is admin
* Stack traces or path disclosure when logged-in user is admin
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the fail2ban recommended fail2ban rules were not installed.

View File

@@ -1,17 +1,16 @@
<?php
$force_install_message = 'KeepDefaultValuesMamp';
$force_install_main_data_root = '/Applications/MAMP/dolibarr_documents';
$force_install_type = 'mysqli';
$force_install_dbserver = 'localhost';
$force_install_port = '8889';
$force_install_database = 'dolibarr';
$force_install_createdatabase = '1';
$force_install_databaselogin = 'dolibarrmysql';
$force_install_databasepass = 'root';
$force_install_createuser = '1';
$force_install_databaserootlogin = 'root';
$force_install_databaserootpass = 'root';
$force_install_dolibarrlogin = 'admin';
$force_install_nophpinfo = '1';
$force_install_lockinstall = '444';
$force_install_message='KeepDefaultValuesMamp';
$force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
$force_install_type='mysqli';
$force_install_dbserver='localhost';
$force_install_port='8889';
$force_install_database='dolibarr';
$force_install_createdatabase='1';
$force_install_databaselogin='dolibarrmysql';
$force_install_databasepass='root';
$force_install_createuser='1';
$force_install_databaserootlogin='root';
$force_install_databaserootpass='root';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';

View File

@@ -1,7 +1,7 @@
# How to use it ?
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
This docker image is intended for development usage.
This docker image is intended for developpement usage.
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
Before build/run, define the variable HOST_USER_ID as following:

View File

@@ -1,5 +1,5 @@
#-------------------------------------------------------------------#
# Makefile to build UsedPort exe
# Makefile
#-------------------------------------------------------------------#
# 1.0 Laurent Destailleur Creation
#-------------------------------------------------------------------#

View File

@@ -253,7 +253,6 @@ int main(int argc, char **argv)
//----------------
int noarg,curseurarg,help=0,invalide=0;
char option;
char *endptr;
for (noarg=1;noarg<argc;noarg++) {
if (((argv[noarg][0])=='/') || ((argv[noarg][0])=='-')) {
@@ -262,7 +261,7 @@ for (noarg=1;noarg<argc;noarg++) {
if (strlen(argv[noarg]) < 3) { ++noarg; curseurarg=0; }
switch (option) {
case 's': strncpy(Host,argv[noarg]+curseurarg,sizeof(Host)); break;
case 'p': Port=strtol(argv[noarg] + curseurarg, &endptr, 10); break; // Get port from "-p80" (curseurarg = 2) or "-p 80" (curseurarg = 0)
case 'p': Port=atoi(argv[noarg]+curseurarg); break;
case '?': help=-1;break; // Help
case 'h': help=-1;break; // Help
case 'v': help=-1;break; // Help
@@ -271,20 +270,6 @@ for (noarg=1;noarg<argc;noarg++) {
}
}
// Check for conversion errors
if (*endptr != '\0') {
// Handle error: Invalid input format
printf("Invalid port number format\n");
exit(-1);
}
// Check for overflow
if (Port < 0 || Port > INT_MAX) {
// Handle error: Port number out of range
printf("Port number out of range\n");
exit(-1);
}
help=!(Port > 0);
// Show usage

View File

@@ -251,7 +251,7 @@ safe_mode_protected_env_vars = LD_LIBRARY_PATH
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
open_basedir = "WAMPROOT;C:\WINDOWS\TEMP"
open_basedir = "WAMPROOT"
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is

View File

@@ -22,13 +22,13 @@
* \brief This script create a xml checksum file
*/
if (!defined('NOREQUIREDB')) {
if (! defined('NOREQUIREDB')) {
define('NOREQUIREDB', '1'); // Do not create database handler $db
}
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -44,9 +44,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
* Main
*/
$includecustom = 0;
$includeconstants = array();
$buildzip = 0;
$includecustom=0;
$includeconstants=array();
$buildzip=0;
if (empty($argv[1])) {
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
@@ -55,7 +55,7 @@ if (empty($argv[1])) {
}
$i = 0;
$i=0;
$result = array();
while ($i < $argc) {
if (!empty($argv[$i])) {
@@ -71,10 +71,10 @@ while ($i < $argc) {
$includeconstants[$i] = $result["includeconstant"];
}
if (!empty($result["buildzip"])) {
$buildzip = 1;
$buildzip=1;
}
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
$tmp=explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
if (count($tmp) != 3) {
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
exit -1;
@@ -93,16 +93,16 @@ if (empty($release)) {
$savrelease = $release;
// If release is auto, we take current version
$tmpver = explode('-', $release, 2);
$tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
$release = DOL_VERSION;
$release=DOL_VERSION;
if ($tmpver[1] && $tmpver[0] == 'auto') {
$release .= '-'.$tmpver[1];
$release.='-'.$tmpver[1];
}
}
if (empty($includecustom)) {
$tmpverbis = explode('-', $release, 2);
$tmpverbis=explode('-', $release, 2);
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
@@ -110,7 +110,7 @@ if (empty($includecustom)) {
exit -1;
}
} else {
$tmpverter = explode('-', DOL_VERSION, 2);
$tmpverter=explode('-', DOL_VERSION, 2);
if ($tmpverter[0] != $tmpverbis[0]) {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
@@ -118,7 +118,7 @@ if (empty($includecustom)) {
}
}
} else {
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
@@ -137,13 +137,13 @@ foreach ($includeconstants as $countrycode => $tmp) {
print "\n";
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
$outputdir = dirname(dirname(__FILE__)).'/htdocs/install';
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n";
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1);
$checksumconcat = array();
$checksumconcat=array();
$outputfile = $outputdir.'/filelist-'.$release.'.xml';
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
$fp = fopen($outputfile, 'w');
if (empty($fp)) {
print 'Failed to open file '.$outputfile."\n";
@@ -156,8 +156,8 @@ fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now
foreach ($includeconstants as $countrycode => $tmp) {
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach ($tmp as $constname => $constvalue) {
$valueforchecksum = (empty($constvalue) ? '0' : $constvalue);
$checksumconcat[] = $valueforchecksum;
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
}
fputs($fp, '</dolibarr_constants>'."\n");
@@ -172,26 +172,26 @@ $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|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 = '';
$needtoclose = 0;
$dir='';
$needtoclose=0;
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
if ($newdir != $dir) {
if ($newdir!=$dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
}
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir;
$needtoclose = 1;
$needtoclose=1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
@@ -205,7 +205,7 @@ fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
$checksumconcat = array();
$checksumconcat=array();
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
@@ -215,27 +215,27 @@ $iterator2 = new RecursiveIteratorIterator($dir_iterator2);
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude = '(custom|documents|conf|install)$'; // Exclude dirs
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = '';
$needtoclose = 0;
$dir='';
$needtoclose=0;
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
if ($newdir != $dir) {
if ($newdir!=$dir) {
if ($needtoclose) {
fputs($fp, ' </dir>'."\n");
}
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
$dir = $newdir;
$needtoclose = 1;
$needtoclose=1;
}
if (filetype($file) == "file") {
$md5 = md5_file($file);
$checksumconcat[] = $md5;
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}

View File

@@ -2,9 +2,9 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
# \author (c)2004-2020 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++;
}
@@ -369,12 +378,12 @@ if ($nboftargetok) {
}
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
else # For a maintenance release
{
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-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/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
print "\n";
if (! $ret)
@@ -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`;
@@ -538,8 +551,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/php-cs-fixer/vendor`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/rector/vendor`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/vagrant`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`;
@@ -557,20 +568,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*`;
@@ -583,7 +594,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/langs/*/README.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
@@ -596,15 +606,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
@@ -630,33 +640,27 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$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`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/*/bin`;
}
# 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 +684,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 +704,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 +716,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 +736,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 +752,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 +783,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 +801,7 @@ if ($nboftargetok) {
{
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
}
}
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
@@ -810,7 +814,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 +831,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 +841,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 +859,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 +881,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 +969,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 +1018,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 +1049,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 +1058,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 +1084,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 +1097,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 +1125,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 +1139,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 +1181,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 +1217,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 +1246,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 +1278,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.
@@ -31,8 +31,8 @@ Prerequisites to build autoexe DoliWamp package from Windows:
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, 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.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
@@ -43,12 +43,11 @@ 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
This files describe 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"
@@ -68,8 +67,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
This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step.
- Check all files are commited.
@@ -86,9 +84,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,7 +3,9 @@ README (English)
Building a Patch file
##################################################
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree.
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
Using this tool is now deprecated. You must use git pull requests to submit contributions.
This directory contains tools to build a patch
after a developer has made changes on files in its
Dolibarr tree.
The output patch file can then be submited on Dolibarr
dev mailing-list, with explanation on its goal, for
inclusion in main branch.

View File

@@ -1,22 +1,9 @@
PHPStan (https://phpstan.org)
-----------------------------
PHPStan
https://phpstan.org
PHPStan requires PHP >= 7.1
Config File is: ./phpstan.neon
Install: composer require --dev phpstan/phpstan
In dolibarr/build/phpstan
mkdir phpstan
cd phpstan
composer require --dev phpstan/phpstan
Build report from CLI:
In dolibarr/
mv htdocs/custom /tmp/
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/commande/class
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/
mv /tmp/custom htdocs
Build HTML report from Cron:
Example of line to add into a cron to generate a HTML report:
0 1 5 * * cd /home/dolibarr/preview.dolibarr.org/dolibarr; chmod -R u+w /home/dolibarr/preview.dolibarr.org/dolibarr; git pull; /home/dolibarr/phpstan/vendor/bin/phpstan -v analyze -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=github | awk ' BEGIN{ print "Date "strftime("%Y-%m-%d")"<br>" } { print $0"<br>" } END{ print NR } ' > /home/dolibarr/doxygen.dolibarr.org/phpstan/index.html
Config File: phpstan.neon

View File

@@ -1,16 +1,11 @@
<?php
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
//define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
//define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
//define('DOL_URL_ROOT', '/');
// Load the main.inc.php file to have functions env defined
if (!defined("NOLOGIN")) {
define("NOLOGIN", '1');
}
if (!defined("NOHTTPSREDIRECT")) {
define("NOHTTPSREDIRECT", '1');
}
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
if (! defined("NOHTTPSREDIRECT")) define("NOHTTPSREDIRECT", '1');
global $conf, $langs, $user, $db;
include_once __DIR__ . '/../../htdocs/main.inc.php';

View File

@@ -1,5 +1,4 @@
<?php
//
// Take a look at conf.php.example file for an example of conf.php file
// and explanations for all possibles parameters.

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

1
dev/.gitignore vendored
View File

@@ -1,2 +1 @@
/spec
/tools/rector/vendor/

View File

@@ -18,7 +18,7 @@ With
CKEDITOR (4.22.1):
CKEDITOR (4.6.2):
-----------------
* In ckeditor/ckeditor/contents.css
Replace:
@@ -26,12 +26,7 @@ Replace:
With
body { ... margin: 5px;
* In ckeditor/ckeditor/ckeditor.js
Replace:
d.items&&
With
d&&d.items&&
ESCPOS:
-------
@@ -41,59 +36,40 @@ With
protected $connector;
SABRE:
------
rm -fr ./htdocs/includes/sabre/sabre/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/*/bin;
NUSOAP:
-------
* Line 1257 of file nusoap.php. Add:
* In file nusoap.php, to avoid a warning,
Replace
if (isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
By
if (! is_array($this->methodreturn) && isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
* Line 4346 of file nusoap.php
* In file nusoap.php, to avoid a warning,
Replace call to serialize_val with no bugged value
$rev = array();
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
* Line 6566 of file nusoap.php, replace
* Line 4222 of file nusoap.php
$rev = array();
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
if (count($attrs) > 0) {
with
if (is_array($attrs) && count($attrs) > 0) {
TCPDF:
------
* Modify in tcpdf.php: make TCPDF::_out public.
(htdocs/core/lib/pdf.lib.php uses it as a public method)
Change:
protected function _out($s)
to
public function _out($s)
Change in method's _out phpdoc:
* @protected
to
* @public
* Replace in tcpdf.php:
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
unlink($file);
}
}
with
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
// DOL CHANGE If we keep this, source image files are physically destroyed
@@ -101,7 +77,8 @@ with
}
}
* Replace in tcpdf.php:
* Replace in tcpdf.php
$preserve = array(
'file_id',
'internal_encoding',
@@ -109,7 +86,9 @@ with
'bufferlen',
'buffer',
'cached_files',
with
$preserve = array(
'file_id',
'internal_encoding',
@@ -120,11 +99,14 @@ with
// @CHANGE DOL
'imagekeys',
* Replace in tcpdf.php:
* Replace in tcpdf.php
if (!@TCPDF_STATIC::file_exists($file)) {
return false;
}
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)));
@@ -134,10 +116,13 @@ with
$file = $tfile;
}
}
* Replace in tcpdf.php:
* Replace in tcpdf.php
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);
@@ -153,10 +138,12 @@ with
}
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace:
if (strpos($filename, '://') === false) {
with
if (strpos($filename, '//') === 0) {
// Share folder on a (windows) server
// e.g.: "//[MyServerName]/[MySharedFolder]/"
@@ -165,16 +152,11 @@ with
}
elseif (strpos($filename, '://') === false)
* To avoid to have QRcode changed because generated with a random mask, replace:
* To avoid to have QRcode changed because generated with a random mask, replace
define('QR_FIND_FROM_RANDOM', 2);
with
with:
define('QR_FIND_FROM_RANDOM', false);
* Change line:
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
into
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);
* Removed useless directories ("examples", "tools")
* Optionnaly, removed all fonts except
@@ -202,23 +184,6 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
return strval($number);
}
* Add this at begin of tcpdf_autoconfig.php
// @CHANGE LDR DOCUMENT_ROOT fix for IIS Webserver
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
if (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['PHP_SELF'])) {
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
} else {
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
$_SERVER['DOCUMENT_ROOT'] = '/';
}
}
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT']);
if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/') {
$_SERVER['DOCUMENT_ROOT'] .= '/';
}
TCPDI:

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.7';
$error = 0;
$version='1.7';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -74,20 +74,20 @@ $obj->note_public = 'A public comment';
$obj->note_private = 'A private comment';
$obj->cond_reglement_id = 1;
$line1 = new FactureLigne($db);
$line1->tva_tx = 10.0;
$line1->remise_percent = 0;
$line1->qty = 1;
$line1->total_ht = 100;
$line1->total_tva = 10;
$line1->total_ttc = 110;
$obj->lines[] = $line1;
$line1=new FactureLigne($db);
$line1->tva_tx=10.0;
$line1->remise_percent=0;
$line1->qty=1;
$line1->total_ht=100;
$line1->total_tva=10;
$line1->total_ttc=110;
$obj->lines[]=$line1;
// Create invoice
$idobject = $obj->create($user);
$idobject=$obj->create($user);
if ($idobject > 0) {
// Change status to validated
$result = $obj->validate($user);
$result=$obj->validate($user);
if ($result > 0) {
print "OK Object created with id ".$idobject."\n";
} else {
@@ -102,7 +102,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.11';
$error = 0;
$version='1.11';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -75,17 +75,17 @@ $com->note_private = 'A private comment';
$com->source = 1;
$com->remise_percent = 0;
$orderline1 = new OrderLine($db);
$orderline1->tva_tx = 10.0;
$orderline1->remise_percent = 0;
$orderline1->qty = 1;
$com->lines[] = $orderline1;
$orderline1=new OrderLine($db);
$orderline1->tva_tx=10.0;
$orderline1->remise_percent=0;
$orderline1->qty=1;
$com->lines[]=$orderline1;
// Create order
$idobject = $com->create($user);
$idobject=$com->create($user);
if ($idobject > 0) {
// Change status to validated
$result = $com->valid($user);
$result=$com->valid($user);
if ($result > 0) {
print "OK Object created with id ".$idobject."\n";
} else {
@@ -100,7 +100,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.10';
$error = 0;
$version='1.10';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -65,7 +65,7 @@ $db->begin();
require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
// Create instance of object
$myproduct = new Product($db);
$myproduct=new Product($db);
// Definition of product instance properties
$myproduct->ref = '1234';
@@ -91,7 +91,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.7';
$error = 0;
$version='1.7';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -71,10 +71,10 @@ $obj->login = 'ABCDEF';
$obj->nom = 'ABCDEF';
// Create user
$idobject = $obj->create($user);
$idobject=$obj->create($user);
if ($idobject > 0) {
// Change status to validated
$result = $obj->setStatut(1);
$result=$obj->setStatut(1);
if ($result > 0) {
print "OK Object created with id ".$idobject."\n";
} else {
@@ -82,7 +82,7 @@ if ($idobject > 0) {
dol_print_error($db, $obj->error);
}
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
print "User with login ".$obj->login." already exists\n";
print "User with login ".$obj->login." already exists\n";
} else {
$error++;
dol_print_error($db, $obj->error);
@@ -91,7 +91,7 @@ if ($idobject > 0) {
// -------------------- END OF YOUR CODE --------------------
if (!$error) {
if (! $error) {
$db->commit();
print '--- end ok'."\n";
} else {

View File

@@ -25,7 +25,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$version = '1.7';
$error = 0;
$version='1.7';
$error=0;
// -------------------- START OF YOUR CODE HERE --------------------
// Include Dolibarr environment
require_once $path."../../../htdocs/master.inc.php";
require_once $path."../../htdocs/master.inc.php";
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
//$langs->setDefaultLang('en_US'); // To change default language of $langs
@@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0);
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!$result > 0) {
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (! $result > 0) {
dol_print_error('', $user->error);
exit;
}
@@ -57,7 +57,7 @@ $user->getrights();
print "***** ".$script_file." (".$version.") *****\n";
if (!isset($argv[1])) { // Check parameters
if (! isset($argv[1])) { // Check parameters
print "Usage: ".$script_file." id_thirdparty ...\n";
exit;
}
@@ -72,9 +72,9 @@ require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
// Create contract object
$obj = new Contrat($db);
$obj->socid = $argv[1];
$obj->socid=$argv[1];
$listofcontractsforcompany = $obj->getListOfContracts('all');
$listofcontractsforcompany=$obj->getListOfContracts('all');
print $listofcontractsforcompany;

View File

@@ -1,124 +0,0 @@
{
"id": "evt_123456789",
"object": "event",
"api_version": "2023-10-16",
"created": 1702053463,
"data": {
"object": {
"id": "pi_123456789",
"object": "payment_intent",
"amount": 60,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_123456789_secret_123456789",
"confirmation_method": "automatic",
"created": 1702053448,
"currency": "eur",
"customer": "cus_123456789",
"description": "Stripe payment from makeStripeSepaRequest: DID=31262-INV=123-CUS=123 did=123 ref=FA2312-123",
"invoice": null,
"last_payment_error": {
"code": "",
"decline_code": "generic_decline",
"message": "The transaction can't be processed because your customer's account information is missing or incorrect. Collect a new mandate and ask your customer to provide their name and address exactly as it appears on their bank account. After this, you can attempt the transaction again.",
"payment_method": {
"id": "pm_123456789",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": "FR",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": "email@example.com",
"name": "Test example",
"phone": null
},
"created": 1692688898,
"customer": "cus_123456789",
"livemode": false,
"metadata": {
"dol_version": "19.0.0-dev",
"dol_thirdparty_id": "123",
"ipaddress": "1.2.3.4",
"dol_id": "123",
"dol_type": "companypaymentmode",
"dol_entity": "1"
},
"sepa_debit": {
"bank_code": "123",
"branch_code": "",
"country": "AT",
"fingerprint": "123456789",
"generated_from": {
"charge": null,
"setup_attempt": null
},
"last4": "3202"
},
"type": "sepa_debit"
},
"type": "card_error"
},
"latest_charge": "py_123456789",
"livemode": false,
"metadata": {
"dol_version": "19.0.0-beta",
"dol_thirdparty_id": "123",
"ipaddress": "1.2.3.4",
"dol_id": "123",
"dol_type": "facture",
"dol_entity": "1"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
},
"sepa_debit": {
}
},
"payment_method_types": [
"card",
"sepa_debit"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": "DID=123-",
"statement_descriptor_suffix": "DID=123-",
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "payment_intent.payment_failed"
}

View File

@@ -1,7 +1,5 @@
README
------
Scripts in this directory can be used to load massive data or purge data of a database instance.
Scripts in this directory can be used to load or purge data of a database instance.
WARNING: Some of this script may delete definitely data.
To init data for a demo, use instead the tool into dev/initdemo

View File

@@ -45,9 +45,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
* Parameters
*/
define('GEN_NUMBER_FACTURE', $argv[1] ?? 1);
define(GEN_NUMBER_FACTURE, 1);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
$dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
mktime(12, 0, 0, 2, 13, $year),
mktime(12, 0, 0, 2, 23, $year),
@@ -168,8 +168,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) {
$result=$object->validate($fuser);
if ($result) {
print " OK with ref ".$object->ref."\n";
;
print " OK with ref ".$object->ref."\n";;
} else {
dol_print_error($db, $object->error);
}

View File

@@ -51,9 +51,9 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
* Parametre
*/
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
define(GEN_NUMBER_COMMANDE, 10);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
$dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
mktime(12, 0, 0, 2, 13, $year),
mktime(12, 0, 0, 2, 23, $year),

View File

@@ -50,7 +50,7 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
* Parameters
*/
define('GEN_NUMBER_PRODUIT', $argv[1] ?? 100);
define(GEN_NUMBER_PRODUIT, 100000);
$ret=$user->fetch('', 'admin');
@@ -64,24 +64,18 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++;
}
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++;
}
} else {
print "err";
@@ -90,12 +84,9 @@ if ($resql) {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++;
}
} else {
print "err";
@@ -108,7 +99,7 @@ for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
$produit = new Product($db);
$produit->type = mt_rand(0, 1);
$produit->status = 1;
$produit->ref = ($produit->type ? 'S' : 'P').time().$s;
$produit->ref = ($produit->type?'S':'P').time().$s;
$produit->label = 'Label '.time().$s;
$produit->description = 'Description '.time().$s;
$produit->price = mt_rand(1, 999.99);

View File

@@ -47,9 +47,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
* Parameters
*/
define('GEN_NUMBER_PROPAL', $argv[1] ?? 10);
define(GEN_NUMBER_PROPAL, 10);
$year = 2016;
$dates = array(mktime(12, 0, 0, 1, 3, $year),
$dates = array (mktime(12, 0, 0, 1, 3, $year),
mktime(12, 0, 0, 1, 9, $year),
mktime(12, 0, 0, 2, 13, $year),
mktime(12, 0, 0, 2, 23, $year),
@@ -152,8 +152,8 @@ $user->rights->propal->creer=1;
$user->rights->propal->propal_advance->validate=1;
if (getDolGlobalString('PROPALE_ADDON') && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php")) {
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php";
if (!empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
}
$i=0;

View File

@@ -53,7 +53,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
* Parametre
*/
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
define(GEN_NUMBER_SOCIETE, 10);
$ret=$user->fetch('', 'admin');
@@ -67,8 +67,7 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
@@ -79,8 +78,7 @@ if ($resql) {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
@@ -93,8 +91,7 @@ if ($resql) {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
@@ -120,13 +117,12 @@ for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) {
$soc->country_id=1;
$soc->country_code='FR';
// Un client sur 3 a une remise de 5%
$user_remise=mt_rand(1, 3);
if ($user_remise==3) {
$user_remise=mt_rand(1, 3); if ($user_remise==3) {
$soc->remise_percent=5;
}
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
$soc->note_private = 'Company created by the script generate-societe.php';
$socid = $soc->create($user);
$socid = $soc->create();
if ($socid >= 0) {
$rand = mt_rand(1, 4);

View File

@@ -62,9 +62,9 @@ dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1];
$filepath = $argv[2];
$filepatherr = $filepath.'.err';
$defaultlang = empty($argv[3]) ? 'en_US' : $argv[3];
$startlinenb = empty($argv[4]) ? 1 : $argv[4];
$endlinenb = empty($argv[5]) ? 0 : $argv[5];
$defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[4])?1:$argv[4];
$endlinenb = empty($argv[5])?0:$argv[5];
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";

View File

@@ -63,8 +63,8 @@ $mode = $argv[1];
$filepath = $argv[2];
$filepatherr = $filepath.'.err';
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
$startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
@@ -128,8 +128,8 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$object->client = $fields[7];
$object->fournisseur = $fields[8];
$object->name = $fields[13] ? trim($fields[13]) : $fields[0];
$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : '';
$object->name = $fields[13]?trim($fields[13]):$fields[0];
$object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):'';
$object->address = trim($fields[14]);
$object->zip = trim($fields[15]);

View File

@@ -63,8 +63,8 @@ $mode = $argv[1];
$filepath = $argv[2];
$filepatherr = $filepath.'.err';
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
$startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";

File diff suppressed because one or more lines are too long

View File

@@ -4655,6 +4655,75 @@ INSERT INTO `llx_menu` VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,
/*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_milestone`
--
DROP TABLE IF EXISTS `llx_milestone`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_milestone` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`fk_element` int(11) NOT NULL,
`elementtype` varchar(16) NOT NULL,
`label` varchar(255) NOT NULL,
`options` varchar(255) DEFAULT NULL,
`priority` int(11) DEFAULT '0',
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`fk_user_modif` int(11) DEFAULT NULL,
PRIMARY KEY (`rowid`),
UNIQUE KEY `uk_milestone_fk_element` (`fk_element`,`elementtype`),
KEY `idx_milestone_fk_user_modif` (`fk_user_modif`),
CONSTRAINT `fk_milestone_fk_user_modif` FOREIGN KEY (`fk_user_modif`) REFERENCES `llx_user` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_milestone`
--
LOCK TABLES `llx_milestone` WRITE;
/*!40000 ALTER TABLE `llx_milestone` DISABLE KEYS */;
INSERT INTO `llx_milestone` VALUES (2,779,'facture','azerty',NULL,0,'2013-03-09 12:19:30',NULL),(3,780,'facture','fsdf',NULL,0,'2013-03-09 13:01:08',NULL),(4,781,'facture','hhh',NULL,0,'2013-03-09 14:06:37',NULL);
/*!40000 ALTER TABLE `llx_milestone` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_monitoring_probes`
--
DROP TABLE IF EXISTS `llx_monitoring_probes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_monitoring_probes` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(64) NOT NULL,
`groupname` varchar(64) DEFAULT NULL,
`url` varchar(250) NOT NULL,
`useproxy` int(11) DEFAULT '0',
`checkkey` varchar(250) DEFAULT NULL,
`maxval` int(11) DEFAULT NULL,
`frequency` int(11) DEFAULT '60',
`active` int(11) DEFAULT '1',
`status` int(11) DEFAULT '0',
`lastreset` datetime DEFAULT NULL,
`oldesterrortext` text,
`oldesterrordate` datetime DEFAULT NULL,
PRIMARY KEY (`rowid`),
UNIQUE KEY `uk_monitoring_probes` (`title`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_monitoring_probes`
--
LOCK TABLES `llx_monitoring_probes` WRITE;
/*!40000 ALTER TABLE `llx_monitoring_probes` DISABLE KEYS */;
INSERT INTO `llx_monitoring_probes` VALUES (1,'aaa',NULL,'http://www.chiensderace.com',0,'chiens',1000,10,1,1,'2011-04-20 23:46:41',NULL,NULL),(2,'ChatsDeRace',NULL,'http://www.chatsderace.com',0,'chats',1000,5,1,1,'2011-04-20 23:46:41',NULL,NULL);
/*!40000 ALTER TABLE `llx_monitoring_probes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_notify`
--

View File

@@ -245,16 +245,6 @@ export list="
--ignore-table=$base.llx_c_ticketsup_category
--ignore-table=$base.llx_c_ticketsup_severity
--ignore-table=$base.llx_c_ticketsup_type
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_examconclusion
--ignore-table=$base.llx_cabinetmed_cons_extrafields
--ignore-table=$base.llx_cabinetmed_diaglec
--ignore-table=$base.llx_cabinetmed_examaut
--ignore-table=$base.llx_cabinetmed_exambio
--ignore-table=$base.llx_cabinetmed_examenprescrit
--ignore-table=$base.llx_cabinetmed_motifcons
--ignore-table=$base.llx_cabinetmed_patient
--ignore-table=$base.llx_cabinetmed_societe
--ignore-table=$base.llx_congespayes
--ignore-table=$base.llx_congespayes_config
--ignore-table=$base.llx_congespayes_events
@@ -338,8 +328,6 @@ export list="
--ignore-table=$base.tmp_llx_accouting_account
--ignore-table=$base.tmp_llx_product_batch
--ignore-table=$base.tmp_llx_product_batch2
--ignore-table=$base.tmp_tmp
--ignore-table=$base.tmp_user
"
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile

View File

@@ -21,7 +21,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -30,39 +30,39 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$error = 0;
$error=0;
$sourceserver = isset($argv[1]) ? $argv[1] : ''; // user@server:/src/file
$password = isset($argv[2]) ? $argv[2] : '';
$dataserver = isset($argv[3]) ? $argv[3] : '';
$database = isset($argv[4]) ? $argv[4] : '';
$loginbase = isset($argv[5]) ? $argv[5] : '';
$passwordbase = isset($argv[6]) ? $argv[6] : '';
$sourceserver=isset($argv[1])?$argv[1]:''; // user@server:/src/file
$password=isset($argv[2])?$argv[2]:'';
$dataserver=isset($argv[3])?$argv[3]:'';
$database=isset($argv[4])?$argv[4]:'';
$loginbase=isset($argv[5])?$argv[5]:'';
$passwordbase=isset($argv[6])?$argv[6]:'';
// Include Dolibarr environment
$res = 0;
if (!$res && file_exists($path."../../master.inc.php")) {
$res = @include $path."../../master.inc.php";
$res=0;
if (! $res && file_exists($path."../../master.inc.php")) {
$res=@include $path."../../master.inc.php";
}
if (!$res && file_exists($path."../../htdocs/master.inc.php")) {
$res = @include $path."../../htdocs/master.inc.php";
if (! $res && file_exists($path."../../htdocs/master.inc.php")) {
$res=@include $path."../../htdocs/master.inc.php";
}
if (!$res && file_exists("../master.inc.php")) {
$res = @include "../master.inc.php";
if (! $res && file_exists("../master.inc.php")) {
$res=@include "../master.inc.php";
}
if (!$res && file_exists("../../master.inc.php")) {
$res = @include "../../master.inc.php";
if (! $res && file_exists("../../master.inc.php")) {
$res=@include "../../master.inc.php";
}
if (!$res && file_exists("../../../master.inc.php")) {
$res = @include "../../../master.inc.php";
if (! $res && file_exists("../../../master.inc.php")) {
$res=@include "../../../master.inc.php";
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res) {
if (! $res) {
die("Failed to include master.inc.php file\n");
}
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -72,13 +72,13 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
* Main
*/
$login = '';
$server = '';
$login='';
$server='';
if (preg_match('/^(.*)@(.*):(.*)$/', $sourceserver, $reg)) {
$login = $reg[1];
$server = $reg[2];
$sourcefile = $reg[3];
$targetfile = basename($sourcefile);
$login=$reg[1];
$server=$reg[2];
$sourcefile=$reg[3];
$targetfile=basename($sourcefile);
}
if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) {
print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n";
@@ -88,23 +88,22 @@ if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile
}
$targetdir = '/tmp';
$targetdir='/tmp';
print "Get dump file from server ".$server.", path ".$sourcefile.", connect with login ".$login." loaded into localhost\n";
$sftpconnectstring = $sourceserver;
$sftpconnectstring=$sourceserver;
print 'SFTP connect string : '.$sftpconnectstring."\n";
//print 'SFTP password '.$password."\n";
// SFTP connect
if (!function_exists("ssh2_connect")) {
dol_print_error('', 'ssh2_connect function does not exists');
exit(1);
if (! function_exists("ssh2_connect")) {
dol_print_error('', 'ssh2_connect function does not exists'); exit(1);
}
$connection = ssh2_connect($server, 22);
if ($connection) {
if (!@ssh2_auth_password($connection, $login, $password)) {
if (! @ssh2_auth_password($connection, $login, $password)) {
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR);
exit(-5);
} else {
@@ -122,16 +121,16 @@ if ($connection) {
print 'Get file '.$sourcefile.' into '.$targetdir.$targetfile."\n";
ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile);
$fullcommand = "cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
$fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
if (preg_match('/\.bz2$/', $targetfile)) {
$fullcommand = "bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
$fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
}
if (preg_match('/\.gz$/', $targetfile)) {
$fullcommand = "gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
$fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
}
print "Load dump with ".$fullcommand."\n";
$output = array();
$return_var = 0;
$output=array();
$return_var=0;
print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n";
exec($fullcommand, $output, $return_var);
foreach ($output as $line) {

View File

@@ -21,7 +21,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__).'/';
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -30,34 +30,34 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Global variables
$error = 0;
$error=0;
$confirm = isset($argv[1]) ? $argv[1] : '';
$confirm=isset($argv[1])?$argv[1]:'';
// Include Dolibarr environment
$res = 0;
if (!$res && file_exists($path."../../master.inc.php")) {
$res = @include $path."../../master.inc.php";
$res=0;
if (! $res && file_exists($path."../../master.inc.php")) {
$res=@include $path."../../master.inc.php";
}
if (!$res && file_exists($path."../../htdocs/master.inc.php")) {
$res = @include $path."../../htdocs/master.inc.php";
if (! $res && file_exists($path."../../htdocs/master.inc.php")) {
$res=@include $path."../../htdocs/master.inc.php";
}
if (!$res && file_exists("../master.inc.php")) {
$res = @include "../master.inc.php";
if (! $res && file_exists("../master.inc.php")) {
$res=@include "../master.inc.php";
}
if (!$res && file_exists("../../master.inc.php")) {
$res = @include "../../master.inc.php";
if (! $res && file_exists("../../master.inc.php")) {
$res=@include "../../master.inc.php";
}
if (!$res && file_exists("../../../master.inc.php")) {
$res = @include "../../../master.inc.php";
if (! $res && file_exists("../../../master.inc.php")) {
$res=@include "../../../master.inc.php";
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res = @include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) {
$res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
}
if (!$res) {
if (! $res) {
die("Failed to include master.inc.php file\n");
}
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -76,56 +76,56 @@ if (empty($confirm)) {
}
$tmp = dol_getdate(dol_now());
$tmp=dol_getdate(dol_now());
$tables = array(
'propal' => array(0 => 'datep', 1 => 'fin_validite', 2 => 'date_valid', 3 => 'date_cloture'),
'commande' => array(0 => 'date_commande', 1 => 'date_valid', 2 => 'date_cloture'),
'facture' => array(0 => 'datec', 1 => 'datef', 2 => 'date_valid', 3 => 'date_lim_reglement'),
'paiement' => array(0 => 'datep'),
'bank' => array(0 => 'datev', 1 => 'dateo'),
'commande_fournisseur' => array(0 => 'date_commande', 1 => 'date_valid', 3 => 'date_creation', 4 => 'date_approve', 5 => 'date_approve2', 6 => 'date_livraison'),
'supplier_proposal' => array(0 => 'datec', 1 => 'date_valid', 2 => 'date_cloture'),
'expensereport' => array(0 => 'date_debut', 1 => 'date_fin', 2 => 'date_create', 3 => 'date_valid', 4 => 'date_approve', 5 => 'date_refuse', 6 => 'date_cancel'),
'holiday' => array(0 => 'date_debut', 1 => 'date_fin', 2 => 'date_create', 3 => 'date_valid', 5 => 'date_refuse', 6 => 'date_cancel'),
'ticket' => array(0 => 'datec', 1 => 'date_read', 2 => 'date_close')
$tables=array(
'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'),
'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'),
'facture'=>array(0=>'datec', 0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'),
'paiement'=>array(0=>'datep'),
'bank'=>array(0=>'datev', 1=>'dateo'),
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'),
'expensereport'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'),
'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel'),
'ticket'=>array(0=>'datec', 1=>'date_read', 2=>'date_close')
);
$year = 2010;
$currentyear = $tmp['year'];
$year=2010;
$currentyear=$tmp['year'];
while ($year <= $currentyear) {
//$year=2021;
$delta1 = ($currentyear - $year);
$delta2 = ($currentyear - $year - 1);
$delta1=($currentyear - $year);
$delta2=($currentyear - $year - 1);
//$delta=-1;
if ($delta1) {
foreach ($tables as $tablekey => $tableval) {
print "Correct ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
$sql = "select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$i=0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
$obj=$db->fetch_object($resql);
if ($obj) {
print ".";
$sql2 = "UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j = 0;
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j=0;
foreach ($tableval as $field) {
if ($j) {
$sql2 .= ", ";
$sql2.=", ";
}
$sql2 .= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");
$sql2.= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");
$j++;
}
$sql2 .= " WHERE rowid = ".$obj->rowid;
$sql2.=" WHERE rowid = ".$obj->rowid;
//print $sql2."\n";
$resql2 = $db->query($sql2);
if (!$resql2) {
if (! $resql2) {
dol_print_error($db);
}
}

View File

@@ -5,20 +5,20 @@
<arg name="tab-width" value="4"/>
<arg name="extensions" value="php" />
<exclude-pattern type="relative">build/html</exclude-pattern>
<exclude-pattern type="relative">build/aps</exclude-pattern>
<exclude-pattern type="relative">dev/tools/test/namespacemig</exclude-pattern>
<!-- <exclude-pattern type="relative">dev/initdata/dbf/includes</exclude-pattern> -->
<exclude-pattern type="relative">documents</exclude-pattern>
<exclude-pattern type="relative">htdocs/core/class/lessc.class.php</exclude-pattern>
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">htdocs/install/doctemplates/websites</exclude-pattern>
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
<exclude-pattern type="relative">source</exclude-pattern>
<exclude-pattern type="relative">.git</exclude-pattern>
<exclude-pattern type="relative">.cache</exclude-pattern>
<!-- info: '*' is replaced with '.*', so better use '+' in some cases -->
<!-- info: 'relative' paths are relative to the examined file, so not ok. -->
<exclude-pattern>/build/(html|aps)/</exclude-pattern>
<exclude-pattern>/dev/tools/test/namespacemig/</exclude-pattern>
<!-- <exclude-pattern>dev/initdata/dbf/includes</exclude-pattern> -->
<exclude-pattern>/documents/</exclude-pattern>
<exclude-pattern>/htdocs/core/class/lessc\.class\.php</exclude-pattern>
<exclude-pattern>/htdocs/(custom|includes)/</exclude-pattern>
<exclude-pattern>/htdocs/install/doctemplates/websites</exclude-pattern>
<exclude-pattern>/htdocs/([^/]+/)?conf\.php</exclude-pattern>
<exclude-pattern>*/nltechno*</exclude-pattern>
<exclude-pattern>/source/</exclude-pattern>
<exclude-pattern>/\.git/</exclude-pattern>
<exclude-pattern>/\.cache/</exclude-pattern>
<!-- List of all tests -->

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-accesslog-limit403
#
# To test rule file on a existing log file
# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf --print-all-matched
# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf
failregex = <HOST> - - .*HTTP/[0-9]+(.[0-9]+)?" 403
ignoreregex =

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-dolibarr-limitpublic
#
# To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf --print-all-matched
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/public/
ignoreregex =

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-dolibarr-rulesbruteforce
#
# To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf --print-all-matched
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf
failregex = ^ [A-Z\s]+ <HOST>\s+functions_.*::check_user_.* Authentication KO
ignoreregex =

View File

@@ -13,7 +13,7 @@
# fail2ban-client status web-dolibarr-rulespassforgotten
#
# To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf --print-all-matched
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/passwordforgotten.php - action=buildnewpassword
ignoreregex =

View File

@@ -3,10 +3,10 @@ QODANA TUTO
This README explains how to use qodana to generate static analytics reports on the code
Install docker
apt install docker
Install qodana into ~/.loca/bin/qodana
curl -fsSL https://jb.gg/qodana-cli/install | bash
Install qodana
To run inspection on CLI
cd ~/git/dirtoscan

View File

@@ -1,15 +0,0 @@
= Install SonarQube locally
Check you are using Install Java SDK 17
java --version must show 61
To install java sdk 17 on ubuntu:
sudo apt update
sudo apt install -y openjdk-17-jdk
Unzip the sonar package into a directory
Edit the file conf/sonar.properties to modify port 9000 and 9001 (already used by Eclipse or xdebug) into 9080 and 9081
Launch sonar with
bin/linux*/sonar.sh console

View File

@@ -1 +1 @@
Files and tools of a skeleton to build a module were moved into htdocs/modulebuilder/template
Files and tools were moved into htdocs/modulebuilder/template

View File

@@ -1 +0,0 @@
/vendor/

View File

@@ -1,438 +0,0 @@
#!/usr/bin/env php
<?php
/*
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file dev/tools/apstats.php
* \brief Script to report Advanced Statistics on a coding project
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = dirname(__FILE__) . '/';
// Test si mode batch
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n";
exit();
}
error_reporting(E_ALL & ~E_DEPRECATED);
define('PRODUCT', "apstats");
define('VERSION', "1.0");
$phpstanlevel = 2;
print '***** '.constant('PRODUCT').' - '.constant('VERSION').' *****'."\n";
if (empty($argv[1])) {
print 'You must run this tool being into the root of the project.'."\n";
print 'Usage: '.constant('PRODUCT').'.php pathto/outputfile.html [--dir-scc=pathtoscc] [--dir-phpstan=pathtophpstan]'."\n";
print 'Example: '.constant('PRODUCT').'.php documents/apstats/index.html --dir-scc=/snap/bin --dir-phpstan=~/git/phpstan/htdocs/includes/bin';
exit(0);
}
$outputpath = $argv[1];
$outputdir = dirname($outputpath);
$outputfile = basename($outputpath);
if (!is_dir($outputdir)) {
print 'Error: dir '.$outputdir.' does not exists or is not writable'."\n";
exit(1);
}
$dirscc = '';
$dirphpstan = '';
$i = 0;
while ($i < $argc) {
$reg = array();
if (preg_match('/--dir-scc=(.*)$/', $argv[$i], $reg)) {
$dirscc = $reg[1];
}
if (preg_match('/--dir-phpstan=(.*)$/', $argv[$i], $reg)) {
$dirphpstan = $reg[1];
}
$i++;
}
$timestart = time();
// Count lines of code of Dolibarr itself
/*
$commandcheck = 'cloc . --exclude-dir=includes --exclude-dir=custom --ignore-whitespace --vcs=git';
$resexec = shell_exec($commandcheck);
$resexec = (int) (empty($resexec) ? 0 : trim($resexec));
// Count lines of code of external dependencies
$commandcheck = 'cloc htdocs/includes --ignore-whitespace --vcs=git';
$resexec = shell_exec($commandcheck);
$resexec = (int) (empty($resexec) ? 0 : trim($resexec));
*/
// Count lines of code of application
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/includes,htdocs/custom,htdocs/theme/common/fontawesome-5,htdocs/theme/common/octicons';
print 'Execute SCC to count lines of code in project: '.$commandcheck."\n";
$output_arrproj = array();
$resexecproj = 0;
exec($commandcheck, $output_arrproj, $resexecproj);
// Count lines of code of dependencies
$commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/theme/common/fontawesome-5 htdocs/theme/common/octicons';
print 'Execute SCC to count lines of code in dependencies: '.$commandcheck."\n";
$output_arrdep = array();
$resexecdep = 0;
exec($commandcheck, $output_arrdep, $resexecdep);
// Get technical debt
$commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$phpstanlevel.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 5G --error-format=github';
print 'Execute PHPStan to get the technical debt: '.$commandcheck."\n";
$output_arrtd = array();
$resexectd = 0;
exec($commandcheck, $output_arrtd, $resexectd);
$arrayoflineofcode = array();
$arraycocomo = array();
$arrayofmetrics = array(
'proj' => array('Bytes' => 0, 'Files' => 0, 'Lines' => 0, 'Blanks' => 0, 'Comments' => 0, 'Code' => 0, 'Complexity' => 0),
'dep' => array('Bytes' => 0, 'Files' => 0, 'Lines' => 0, 'Blanks' => 0, 'Comments' => 0, 'Code' => 0, 'Complexity' => 0)
);
// Analyse $output_arrproj
foreach (array('proj', 'dep') as $source) {
print 'Analyze SCC result for lines of code for '.$source."\n";
if ($source == 'proj') {
$output_arr = &$output_arrproj;
} elseif ($source == 'dep') {
$output_arr = &$output_arrdep;
} else {
print 'Bad value for $source';
die();
}
foreach ($output_arr as $line) {
if (preg_match('/^(───|Language|Total)/', $line)) {
continue;
}
//print $line."<br>\n";
if (preg_match('/^Estimated Cost.*\$(.*)/i', $line, $reg)) {
$arraycocomo[$source]['currency'] = preg_replace('/[^\d\.]/', '', str_replace(array(',', ' '), array('', ''), $reg[1]));
}
if (preg_match('/^Estimated Schedule Effort.*\s([\d\s,]+)/i', $line, $reg)) {
$arraycocomo[$source]['effort'] = str_replace(array(',', ' '), array('.', ''), $reg[1]);
}
if (preg_match('/^Estimated People.*\s([\d\s,]+)/i', $line, $reg)) {
$arraycocomo[$source]['people'] = str_replace(array(',', ' '), array('.', ''), $reg[1]);
}
if (preg_match('/^Processed\s(\d+)\s/i', $line, $reg)) {
$arrayofmetrics[$source]['Bytes'] = $reg[1];
}
if (preg_match('/^(.*)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$/', $line, $reg)) {
$arrayoflineofcode[$source][$reg[1]]['Files'] = $reg[2];
$arrayoflineofcode[$source][$reg[1]]['Lines'] = $reg[3];
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = $reg[4];
$arrayoflineofcode[$source][$reg[1]]['Comments'] = $reg[5];
$arrayoflineofcode[$source][$reg[1]]['Code'] = $reg[6];
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = $reg[7];
}
}
if (!empty($arrayoflineofcode[$source])) {
foreach ($arrayoflineofcode[$source] as $key => $val) {
$arrayofmetrics[$source]['Files'] += $val['Files'];
$arrayofmetrics[$source]['Lines'] += $val['Lines'];
$arrayofmetrics[$source]['Blanks'] += $val['Blanks'];
$arrayofmetrics[$source]['Comments'] += $val['Comments'];
$arrayofmetrics[$source]['Code'] += $val['Code'];
$arrayofmetrics[$source]['Complexity'] += $val['Complexity'];
}
}
}
$timeend = time();
/*
* View
*/
$html = '<html>'."\n";
$html .= '<meta charset="utf-8">'."\n";
$html .= '<meta http-equiv="refresh" content="300">'."\n";
$html .= '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n";
$html .= '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" integrity="sha512-q3eWabyZPc1XTCmF+8/LuE1ozpg5xxn7iO89yfSOd5/oKvyqLngoNGsx8jq92Y8eXJ/IRxQbEC+FGSYxtk2oiw==" crossorigin="anonymous" referrerpolicy="no-referrer" />'."\n";
$html .= '<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>'."\n";
$html .= '
<style>
body {
margin: 10px;
margin-left: 50px;
margin-right: 50px;
}
h1 {
font-size: 1.5em;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
header {
text-align: center;
}
header, section.chapter {
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
}
table {
border-collapse: collapse;
}
th,td {
padding-top: 5px;
padding-bottom: 5px;
padding-left: 10px;
padding-right: 10px;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
.nowrap {
white-space: nowrap;
}
.opacitymedium {
opacity: 0.5;
}
.centpercent {
width: 100%;
}
.hidden {
display: none;
}
.trgroup {
background-color: #EEE;
}
.seedetail {
color: #000088;
cursor: pointer;
}
.box {
padding: 20px;
font-size: 1.2em;
margin-top: 10px;
margin-bottom: 10px;
width: 200px;
}
.box.inline-box {
display: inline-block;
text-align: center;
margin-left: 10px;
}
.back1 {
background-color: #884466;
color: #FFF;
}
.back2 {
background-color: #664488;
color: #FFF;
}
div.fiche>form>div.div-table-responsive {
min-height: 392px;
}
div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min {
overflow-x: auto;
}
.div-table-responsive {
line-height: 120%;
}
.div-table-responsive, .div-table-responsive-no-min {
overflow-x: auto;
min-height: 0.01%;
}
/* Force values for small screen 767 */
@media only screen and (max-width: 767px)
{
body {
margin: 5px;
margin-left: 5px;
margin-right: 5px;
}
}
</style>'."\n";
$html .= '<body>'."\n";
$html .= '<header>'."\n";
$html .= '<h1>Advanced Project Statistics</h1>'."\n";
$currentDate = date("Y-m-d H:i:s"); // Format: Year-Month-Day Hour:Minute:Second
$html .= '<span class="opacitymedium">Generated on '.$currentDate.' in '.($timeend - $timestart).' seconds</span>'."\n";
$html .= '</header>'."\n";
$html .= '<section class="chapter" id="linesofcode">'."\n";
$html .= '<h2>Lines of code</h2>'."\n";
$html .= '<div class="div-table-responsive">'."\n";
$html .= '<table class="centpercent">';
$html .= '<tr class="loc">';
$html .= '<th class="left">Language</th>';
$html .= '<th class="right">Bytes</th>';
$html .= '<th class="right">Files</th>';
$html .= '<th class="right">Lines</th>';
$html .= '<th class="right">Blanks</th>';
$html .= '<th class="right">Comments</th>';
$html .= '<th class="right">Code</th>';
//$html .= '<td class="right">'.$val['Complexity'].'</td>';
$html .= '</tr>';
foreach (array('proj', 'dep') as $source) {
$html .= '<tr class="trgroup" id="source'.$source.'">';
if ($source == 'proj') {
$html .= '<td>All files without dependencies';
} elseif ($source == 'dep') {
$html .= '<td>All files of dependencies only';
}
$html .= ' &nbsp; &nbsp; <span class="seedetail" data-source="'.$source.'">(See detail per file type...)</span>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Bytes']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Files']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Lines']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Blanks']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Comments']).'</td>';
$html .= '<td class="right">'.formatNumber($arrayofmetrics[$source]['Code']).'</td>';
$html .= '<td></td>';
$html .= '</tr>';
if (!empty($arrayoflineofcode[$source])) {
foreach ($arrayoflineofcode[$source] as $key => $val) {
$html .= '<tr class="loc hidden source'.$source.' language'.str_replace(' ', '', $key).'">';
$html .= '<td>'.$key.'</td>';
$html .= '<td class="right"></td>';
$html .= '<td class="right nowrap">'.(empty($val['Files']) ? '' : formatNumber($val['Files'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Lines']) ? '' : formatNumber($val['Lines'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Blanks']) ? '' : formatNumber($val['Blanks'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Comments']) ? '' : formatNumber($val['Comments'])).'</td>';
$html .= '<td class="right nowrap">'.(empty($val['Code']) ? '' : formatNumber($val['Code'])).'</td>';
//$html .= '<td class="right">'.(empty($val['Complexity']) ? '' : $val['Complexity']).'</td>';
$html .= '<td class="nowrap">TODO graph here...</td>';
$html .= '</tr>';
}
}
}
$html .= '<tr class="trgroup">';
$html .= '<td class="left">Total</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Bytes'] + $arrayofmetrics['dep']['Bytes']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Files'] + $arrayofmetrics['dep']['Files']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Lines'] + $arrayofmetrics['dep']['Lines']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Blanks'] + $arrayofmetrics['dep']['Blanks']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Comments'] + $arrayofmetrics['dep']['Comments']).'</td>';
$html .= '<td class="right nowrap">'.formatNumber($arrayofmetrics['proj']['Code'] + $arrayofmetrics['dep']['Code']).'</td>';
//$html .= '<td>'.$arrayofmetrics['Complexity'].'</td>';
$html .= '<td></td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '</div>';
$html .= '</section>'."\n";
$html .= '<section class="chapter" id="projectvalue">'."\n";
$html .= '<h2>Project value</h2><br>'."\n";
$html .= '<div class="box inline-box back1">';
$html .= 'COCOMO (Basic organic model) value:<br>';
$html .= '<b>$'.formatNumber((empty($arraycocomo['proj']['currency']) ? 0 : $arraycocomo['proj']['currency']) + (empty($arraycocomo['dep']['currency']) ? 0 : $arraycocomo['dep']['currency']), 2).'</b>';
$html .= '</div>';
$html .= '<div class="box inline-box back2">';
$html .= 'COCOMO (Basic organic model) effort<br>';
$html .= '<b>'.formatNumber($arraycocomo['proj']['people'] * $arraycocomo['proj']['effort'] + $arraycocomo['dep']['people'] * $arraycocomo['dep']['effort']);
$html .= ' monthes people</b><br>';
$html .= '</section>'."\n";
$tmp = '';
$nblines = 0;
foreach ($output_arrtd as $line) {
$reg = array();
//print $line."\n";
preg_match('/^::error file=(.*),line=(\d+),col=(\d+)::(.*)$/', $line, $reg);
if (!empty($reg[1])) {
$tmp .= '<tr><td>'.$reg[1].'</td><td>'.$reg[2].'</td><td>'.$reg[4].'</td></tr>'."\n";
$nblines++;
}
}
$html .= '<section class="chapter" id="technicaldebt">'."\n";
$html .= '<h2>Technical debt <span class="opacitymedium">(PHPStan level '.$phpstanlevel.' -> '.$nblines.' warnings)</span></h2><br>'."\n";
$html .= '<div class="div-table-responsive">'."\n";
$html .= '<table class="list_technical_debt">'."\n";
$html .= '<tr><td>File</td><td>Line</td><td>Type</td></tr>'."\n";
$html .= $tmp;
$html .= '</table>';
$html .= '</div>';
$html .= '</section>'."\n";
$html .= '
<script>
$(document).ready(function() {
$( ".seedetail" ).on( "click", function() {
var source = $(this).attr("data-source");
console.log("Click on "+source);
jQuery(".source"+source).toggle();
} );
});
</script>
';
$html .= '</body>';
$html .= '</html>';
$fh = fopen($outputpath, 'w');
if ($fh) {
fwrite($fh, $html);
fclose($fh);
print 'Generation of output file '.$outputfile.' done.'."\n";
} else {
print 'Failed to open '.$outputfile.' for ouput.'."\n";
}
/**
* function to format a number
*
* @param string|int $number Number to format
* @param int $nbdec Number of decimal digits
* @return string Formated string
*/
function formatNumber($number, $nbdec = 0)
{
return number_format($number, 0, '.', ' ');
}

View File

@@ -4,7 +4,6 @@
// Conversion du PDF en image png si fichier png non existant
// Save a stripe payment was done in realy life so later we will be able to force a commit on recorded payments
// To make a Stripe SEPA payment request, we must have the payment mode source already saved into societe_rib and retreived with ->sepaStripe
// If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
//break; // No break for sortfield and sortorder so we can cumulate fields (is it realy usefull ?)
$errmsg = 'Failed to retreive paymentintent or charge from id';
$minifile = getImageFileNameForSize($fileinfo['basename'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original
@@ -36,19 +35,15 @@
// remove invalid value, as it didnt match anything
// we dont use the rank from orderline because we may have lines from several orders
dol_syslog("makeStripeSepaRequest get stripe connet account", LOG_DEBUG);
if (isset($this->oldcopy->array_options["options_".$key]) && $this->array_options["options_".$key] == $this->oldcopy->array_options["options_".$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
print '<input type="hidden" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
print 'jQuery("select[name=\''.$paramkey.'\']").focus();'."\n"; // Not really usefull, but we keep it in case of.
$filles[$obj->fk_categorie_fille] = 1; // Set record for this child
$i2++; // a criteria for 1 more field was added to string (we can add several citeria for the same field as it is a multiselect search criteria)
$invoiceid = -1; // There is more than one invoice payed by this payment
$line->pa_ht = $line->pa_ht; // we choosed to have buy/cost price always positive, so no revert of sign here
$mesg .= '<br>Unkown Error, please refers to your administrator';
$result = $adh->setPassword($user, $this->pass, (!getDolGlobalString('DATABASE_PWD_ENCRYPTED') ? 0 : 1), 1); // Cryptage non gere dans module adherent
$result = $adh->setPassword($user, $this->pass, (empty($conf->global->DATABASE_PWD_ENCRYPTED) ? 0 : 1), 1); // Cryptage non gere dans module adherent
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
$value = ((!empty($this->array_options) && array_key_exists("options_".$key.$keysuffix, $this->array_options)) ? $this->array_options["options_".$key.$keysuffix] : null); // Value may be cleaned or formated later
$ways = $c->print_all_ways(' &gt;&gt; ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
'capture' => true, // Charge immediatly
@@ -71,13 +66,10 @@
// Show subproducts of product (not recommanded)
// TODO Que faire si update echoue car on update avec un login deja existant pour un autre compte.
// dont try to send email if no recipient
// note: $cs->mandate contians ID of mandate on Stripe side
// nous avons au moins une reponse
// nous n'avons pas de reponse => n'existe pas
//'visible'=>$fille->visible,
break; // break for loop incase of error
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found old pass in database", LOG_WARNING);
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok");
hide: { delay: 50 }, /* If I enable effect:\'toggle\' here, a bug appears: the tooltip is shown when collpasing a new dir if it was shown before */
if ($reg[1] == 'thi') { // Third-party
if (empty($objMod->dictionaries) && !empty($objMod->dictionnaries)) {
@@ -95,7 +87,6 @@
$repid[$obj->id] = $label;
$reponsesadd = str_split($obj->reponses);
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
$serie[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n";
$serie[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n";
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
@@ -116,7 +107,6 @@
// Label mouvement
// Login is successfull with this method
// Lot/serie
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer but may be NOT (for example a transfer of an email rewriten)
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer or NOT (a transfer rewriten)
// Not a recongized record
// Note: This suppose that "pass_indatabase_crypted" is a md5 (guaranted by the previous test if "(empty($conf->global->MAIN_SECURITY_HASH_ALGO))"
@@ -163,9 +153,6 @@
$heigth = $tmp[3];
$info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$info[getDolGlobalString('LDAP_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
$objectoffield = $object; //For compatibily with the computed formula
$optstart .= ' data-tvatx-formated="' . dol_escape_htmltag(price($objp->tva_tx, 0, $langs, 1, -1, 2)) . '"';
$optstart .= ' data-tvatx-formated="'.dol_escape_htmltag(price($objp->tva_tx, 0, $langs, 1, -1, 2)).'"';
$outprice_ht = price($objp->price); // formated for langage user because is inserted into input field
@@ -180,7 +167,6 @@
$this->user_closing = $cluser;
$this->user_cloture = $cluser;
$usertime = 0; // We dont modify date because we want to have date into memory datep and datef stored as GMT date. Compensation will be done during output.
$valuetoshow = ucfirst($value); // Par defaut
$ways = $c->print_all_ways(' &gt;&gt; ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
&& $obj->status != $tmpobject::STATUS_ABANDONED // Not abandonned
'adress'=>$obj->adress,
@@ -188,7 +174,6 @@
'transparency'=>$object->transparency, // Force transparency on onwer from preoperty of event
/* Remove selected id as soon as we type or delete a char (it means old selection is wrong). Use keyup/down instead of change to avoid loosing the product id. This is needed only for select of predefined product */
/*case 'select': // Not required, we chosed value='0' for undefined values
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
// Batch number managment
// Calculcate number of days consumed
// Cas des factures liees par un autre objet (ex: commande)
@@ -198,7 +183,6 @@
// For exemple, we may have error: 'No such customer: cus_XXXXX; a similar object exists in live mode, but a test mode key was used to make this request.'
// For full day events, date are also GMT but they wont but converted using tz during output
// If translation exists, we use it, otherwise, we use tha had coded label
// If we want to closed payed invoices
// Line dates planed
// Message-ID=A, In-Reply-To=B, References=B and message can BE an answer or NOT (a transfer rewriten)
// Note: $obj->halfday is 0:Full days, 2:Sart afternoon end morning, -1:Start afternoon, 1:End morning
@@ -207,10 +191,8 @@
// On selectionne les groupes auquel fait parti le user
// On verifie l'emplacement du modele
// Onwer
// Option to reload page to retrieve customer informations. Note, this clear other input
// Produit non deja existant
// Search submenu fot this mainmenu entry
// Selection of all product stock mouvements that contains batchs
// Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
// Strip off the beggining '<'
@@ -231,7 +213,6 @@
// at a time, and thats just stupid, so lets just hope this doesnt appear anywhere in the actual data
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
// if we have a PROJECTLEADER contact and we dont use it as recipient we store the contact object for later use
// multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time
// save curent cell padding
//$sql .= " AND (status <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason
//Esle it's separated key/value and coma list
@@ -250,7 +231,6 @@
error="Database $dbname NOT successfully droped. You have to do it manually."
foreach ($cats as $fille) {
if (!empty($childrens)) {
if (!getDolGlobalString('PROJECT_DISABLE_UNLINK_FROM_OVERVIEW') || $user->admin) { // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
if (!isset($filles[$obj->fk_categorie_fille])) { // Only one record as child (a child has only on parent).
if ($conf->file->mailing_limit_sendbyweb != '-1') { // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it.
if ($login && $login != '--bad-login-validity--') { // Login is successfull
@@ -266,29 +246,20 @@
jQuery("#mouvement").trigger("change");
print "ERROR: Failed to include file '".$filephp."'. Try to edit and re-save page ith this ID.";
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
setEventMessages($langs->trans('Bad value for email, emai lwas not verified by Google'), null, 'errors');
} else { // Pour les autres schémas, les membres sont listés sous forme de DN complets
$newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->hasRight('compta', 'resultat', 'lire'));
* Section Creditor (sepa Crediteurs bloc lines)
* Section Debitor (sepa Debiteurs bloc lines)
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
"confirm" => $confirmnow, // try to confirm immediatly after create (if conditions are ok)
$ErrorLongMsg = "Session expired. Can't retreive PaymentType. Payment has not been validated.";
$accountparent->account_number = $obj->account_number2; // Sotre an account number for output
$action = 'transfert';
$allways = $parent->get_all_ways();
$bugbaseurl .= urlencode("## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)\n");
$childs[] = array_combine($keys, $values);
$curent = getDolGlobalString($thisTypeConfName, getDolGlobalString('FACTURE_ADDON_PDF'));
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
$info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
$info[getDolGlobalString('LDAP_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte
$info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte
$initialY = $tab_top + 7;
$invoicestatic->statut = $obj->fk_statut; // For backward comaptibility
$jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$curent.'"';
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $showmode, '', 'project', 'list');
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list');
$object->actionmsg = dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs);
@@ -297,16 +268,13 @@
$paramfortooltiptd .= ' title="' . ($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)) . '"'; // Attribut to put on td tag to store tooltip
$paramfortooltiptd .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on td tag to store tooltip
$showfield = 1; // Par defaut
$societe->note_private = "Default customer automaticaly created by Point Of Sale module activation. Can be used as the default generic customer in the Point Of Sale setup. Can also be edited or removed if you don't need a generic customer.";
$tagdatabase = true; // We don't know what it was before, so now we consider we are version choosed.
$this->category->childs[] = $this->_cleanObjectDatas($cat);
$this->civility_id = $obj->civility_code; // Bad. Kept for backard compatibility
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed
$this->liste_array = $repid;
$this->statut = self::STATUS_DRAFT; // dperecated
$this->stringtoshow .= $serie[$i] . "\n";
$this->stringtoshow .= $this->mirrorGraphValues ? '[' . -$serie[$i] . ',' . $serie[$i] . ']' : $serie[$i];
$this->stringtoshow .= $this->mirrorGraphValues ? '[-' . $serie[$i] . ',' . $serie[$i] . ']' : $serie[$i];
$this->stringtoshow .= ' data: [' . $serie[$i] . ']';
$this->stringtoshow .= '<!-- Serie ' . $i . ' -->' . "\n";
$tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
@@ -319,10 +287,8 @@
/* Removed due to awful harcoded values
/*case 'select': // Not required, we chosed value='0' for undefined values
// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
// Add entry into bank accoun
// Add field of attribut
// Add link to the Direct Debit if invoice redused ('InvoiceRefused') in bank_url
// Ajout de l'utilisateur dans le groupe
// Batch number managment
// By default, electronic transfert from bank to bank
@@ -341,7 +307,6 @@
// Fonctions de conversion non presente dans ce PHP
// Get lines of sources alread delivered
// Get next free nuber for the ref of bon
// Get next free nunber for the ref of bon prelevement
// If create form is coming from same page, it means that post was sent but an error occured
// If not abandonned
// If option "one bill per third" is set, and an invoice for this thirdparty was already created, we re-use it.
@@ -358,12 +323,10 @@
// No temp directory provided, so we are not able to support convertion of data:image into physical images.
// On verifie l'emplacement du modele
// Option to reload page to retrieve customer informations. Note, this clear other input
// Or set status to "In porgress" if the client has answered and if the ticket has started
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
// Payment informations
// Proprietes particulieres a facture de remplacement
// Recursive call if there is childs to child
// Retreive lines
// See example with selectsearchbox.php. This case is reserverd for the selectesearchbox.php so we can
// Seperate "Real Name" from eMail address
// Should not happend. Entries are added
@@ -373,13 +336,11 @@
// Subscription informations
// TODO : if base exists in unit dictionary table, remove this convertion exception and update convertion infos in database.
// TODO Can we set it to submited ?
// TODO Replace this with a checkbox for each payment mode: "Send request to XXX immediatly..."
// TODO We can't, we dont' have full path of file, only last_main_doc and ->element, so we must first rebuild full path $destfull
// This convert an embedd file with src="/viewimage.php?modulepart... into a cid link
// This make 12 calls for each accountancy account (12 monthes M)
// Validate immediatly the order
// Warning, the function may add a LF so we are forced to trim to compare with old $out without having always a difference and an infinit loop.
// We chack if file exists
// We check if lines of invoice are not already transfered into accountancy
// We dont want on all entities, we delete all and current
// We must filter on assignement table
@@ -408,10 +369,8 @@
continue; // The field was not submited to be saved
dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now());
dol_syslog("functions_isallowed::check_user_api_key Authentication KO for '".$login."': The user login has a validity between [".$fuser->datestartvalidity." and ".$fuser->dateendvalidity."], curren date is ".dol_now());
dol_syslog('Bad password, connexion refused (see a previous notice message for more info)', LOG_NOTICE);
dol_syslog('Bad password, connexion refused', LOG_DEBUG);
dol_syslog('Bad value for code, connexion refused');
dol_syslog('Bad value for code, connexion refused', LOG_NOTICE);
dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING);
foreach ($allways as $way) {
foreach ($legends as $val) { // Loop on each serie
@@ -433,11 +392,7 @@
print '<div class="inline-block marginrightonly">'; // Button include dynamic contant
return $this->trigger(9, "an unexpected error occured");
} // don't wast resourses if we don't need them...
} elseif ($links[$key]['type'] == 'banktransfert') { // transfert between 1 local account and another local account
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
* @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''.
* @param string $head Optionnal head lines
* Ouput html header of a page. It calls also top_httphead()
$action = ''; // Do not show form post if there was at least one successfull sent
$action = 'transfert';
$alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly
@@ -469,7 +424,6 @@
$paramfortooltiptd = ($extracss ? ' class="' . $extracss . '"' : '') . ($extrastyle ? ' style="' . $extrastyle . '"' : ''); // Attribut to put on td text tag
$paramfortooltiptd = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag
$pdf->MultiCell($this->posxdiscount - $this->posxunit, 2, $outputlangs->transnoentities("Label Mouvement"), '', 'C');
$pdf->MultiCell(190, 5, $outputlangs->transnoentities("Informations"), '', 'L');*/
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
$result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
@@ -490,9 +444,6 @@
$sql = 'SELECT s.reponses';
$sql2 .= " SET reponses = '".$db->escape($newcar)."'";
$this->category->childs = array();
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)');
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)');
$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)');
$this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini
$this->error = 'update_note was called on objet with property table_element not defined';
$this->modelpdf = $modelpdf; // For bakward compatibility
@@ -513,13 +464,11 @@
'sr.type' => "Type ban is defaut",
/* Disabled because bcc must remain by defintion not visible
// $_POST contains fk_commandefourndet_X_Y where Y is num of product line and X is number of splitted line
// $new_array_options will be used for direct update, so must contains formated data for the UPDATE.
// $opt['filter[id]'] contais list of product id that are result of search
// 1 - Association des utilisateurs du groupe LDAP au groupe Dolibarr
// 2 - Suppression des utilisateurs du groupe Dolibarr qui ne sont plus dans le groupe LDAP
// A redirect is added if API call successfull
// Action according to choosed sending method
// Action according to the choosed sending method
// Add entry into bank accoun
// Add personnal information
// Adding <b> may convert the original string into a HTML string. Sowe have to first
@@ -537,7 +486,6 @@
// Chercher un contact existant avec cette adresse email
// Color of earch arc
// Defaut
// Delivery date planed
// Discard check of mandatory fiedls for other fields
// Documents are stored above the web pages root to prevent being downloaded without authentification
// Dont't use entity if you use rowid
@@ -575,13 +523,11 @@
// On verifie si aucun paiement n'a ete effectue
// On verifie si la balise prefix est utilisee
// On verifie si la facture a des paiements
// Option to reload page to retrieve customer informations.
// Option to reload page to retrieve customer informations. Note, this clear other input
// Parameteres execution
// Programm next run
// Replace espacing \' by ''.
// Replace protected special codes with matching number of _ as wild card caracter
// Retained warranty : usualy use on construction industry
// Select des informations du projet
// Set default encryption to yes, generate a salt and set default encryption algorythm (but only if there is no user yet into database)
// Show var initialized by include fo paypal lib at begin of this file
@@ -616,7 +562,6 @@
// add variables subtitutions ticket
// count the orders to ship in theorical stock when some are already removed by invoice validation.
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
// employee informations
// et on met la quantité de la ligne dans la limite du "budget" indiqué par dispatch.qty
// if "frequency" is empty or = 0, the reccurence is disabled
// mise a jour des reponses utilisateurs dans la base
@@ -625,13 +570,10 @@
// on verifie si l'objet est utilisé
// only if socid not filled else it's allready done upper
// procédure de remplacement de la table pour ajouter la contrainte
// reload page to retrieve customer informations
// reload page to retrieve supplier informations
// save curent cell padding
// si le curseur est un booleen on retourne la valeur 0
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
//Add hook to filter on user (for exemple on usergroup define in custom modules)
//Another call for easy debugg
//Calcultate new task end date with difference between origin proj end date and origin task end date
//Calcultate new task start date with difference between old proj start date and origin task start date
//Calcultate new task start date with difference between origin proj start date and origin task start date
@@ -643,11 +585,9 @@
//XXX: Should be done just befor commit no ?
//but the note is saved, so just add a notification will be enought
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
//print $langs->trans("Desription").' : ';
//print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name;
//si le sujet n'est pas celui qui a été effacé alors on concatene
//si on voit une erreur, le fond de la case est rouge
The selectForForms is called with parameter $objectfield defined, so tha app can retreive the filter inside the ajax component instead of being provided as parameters. The
console.log("Load desciption into text area : "+description);
continue; // We discard parametes starting with ?
dol_print_error('', get_class($this)."::load_previous_next_ref was called on objet with property table_element not defined");
@@ -703,8 +643,6 @@
if ($value) { // If we have -1 here, pb is into insert, not into ouptut (fix insert instead of changing code here to compensate)
if (empty($objimport->array_import_convertvalue[0][$tmpcode])) { // If source file does not need convertion
jQuery("#mouvement").change(function() {
let hours = hour.getHours().toString().padStart(2, "0"); // Formater pour obtenir deux chiffres
let mins = hour.getMinutes().toString().padStart(2, "0"); // Formater pour obtenir deux chiffres
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction
print " - Error cant find payment mode for ".$condpayment."\n";
print "Expedition inexistante ou acces refuse";
@@ -713,8 +651,6 @@
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
print '<a class="cursoradd" href="'.$urltocreate.'">'; // Explicit link, usefull for nojs interfaces
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par defaut en creation
print __METHOD__." module accouting must be enabled.\n";
print __METHOD__." module accouting must be enabled.\n"; exit(-1);
return -1; // Alternate souce not found
return false; // Sould be 6
@@ -736,7 +672,6 @@
$action = ''; // Do not show form post if there was at least one successfull sent
$action = 'transfert';
$allways = $this->get_all_ways(); // Load array of categories
$asciiDocTable = "[options=\"header\"]\n|===\n|Objet | URLs\n";
$buyingprice = (GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
$canbedeleted = $object->can_be_deleted(); // Renvoi vrai si compte sans mouvements
@@ -757,7 +692,6 @@
$keyval = substr($nvpstr, $intial, $keypos);
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
$localobject->date_creation = dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
$mail = 'bidon@unvalid.unvalid';
$myclone = clone $object; // PHP clone is a shallow copy only, not a real clone, so properties of references will keep the reference (refering to the same target/variable)
$nbofsubproducts = count($prodschild); // This include only first level of childs
@@ -790,7 +724,6 @@
$sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes
$sql .= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
$sql .= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
$sql .= " label = 'Annulation mouvement ID ".((int) $this->id)."',";
$sql .= " tms = tms"; // La date de derniere modif doit changer sauf pour la mise a jour de date de derniere connexion
$sql .= ", '".$this->db->escape($url)."'"; // dperecated
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
@@ -828,7 +761,6 @@
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
$this->rights[1][1] = 'Lire ses notes de frais et deplacements et celles de sa hierarchy';
$this->rights[1][3] = 0; // La permission est-elle une permission par defaut
$this->rights[1][3] = 1; // La permission est-elle une permission par defaut
$this->rights[2][3] = 0; // La permission est-elle une permission par defaut
$this->rights[3][1] = 'Lire mouvements de stocks';
@@ -841,7 +773,6 @@
'filles' => array('name'=>'filles', 'type'=>'tns:FillesArray')
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Paid', 3=>'Abandonned')),
'qty_regulated' => array('type'=>'double', 'label'=>'QtyDelta', 'visible'=>1, 'enabled'=>1, 'position'=>34, 'index'=>1, 'help'=>'Qty aadded or removed (filled once movements are validated)'),
'type_mouvement' =>array('type'=>'smallint(6)', 'label'=>'Type mouvement', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
/* Definition de la date limite */
/* Liste des taches et role sur les projets ou taches */
/* width: ...px; If I use with, there is trouble on size of flex boxes solved with min + (max that is a little bit higer than min) */
@@ -890,11 +821,8 @@
// Exclude unsubscribed email adresses
// Files missings
// First, we get the max value (reponse immediate car champ indexe)
// For a string that is already HTML (contains HTML tags) but badly formated
// For a string that is already HTML (contains HTML tags) with special tags but badly formated
// For backward compatiblity, we detect file stored into an old path
// For each file build select list with PDF extention
// For exemple if element is project
// For external user, no check is done on company because readability is managed by public status of project and assignement.
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
// Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project
@@ -903,7 +831,6 @@
// How the date for data are formated (format used bu jsgantt)
// How the date for data are formated (format used by dol_print_date)
// If lib not found in language file, we get label from cache/databse
// If on smartphone or optmized for small screen
// If option choosed, we create invoice
// If resultset not provided, we take the last used by connexion
// If stock increment is done on reception (recommanded choice)
@@ -917,7 +844,6 @@
// Links beetween objects are stored in this table
// Load extrafields if not allready done
// Load extrafiels if not allready does
// Load librairies to check BAN
// Log the init of hook but only for hooks thare are declared to be managed
// Loop on each line keword was found into file.
// Mis a jour contact
@@ -936,7 +862,6 @@
// Option to reload page to retrieve customer informations.
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
// Ouput page under the Dolibarr top menu
// Parameteres execution
// Permet de commencer l'impression de l'etiquette desiree dans le cas ou la page a deja servie
// Permettre l'exclusion de groupes
// Permettre l'inclusion de groupes
@@ -945,7 +870,6 @@
// Refresh / Reload web site (for non javascript browers)
// Remove '<' into remainging, so remove non closing html tags like '<abc' or '<<abc'. Note: '<123abc' is not a html tag (can be kept), but '<abc123' is (must be removed).
// Remove fields not relevent to categories
// Renaming can be done when we rename globaly a bank receipt but not when changing 1 line from one receipt into another one.
// Replace protected special codes with matching number of _ as wild card caracter
// Reset the substraction for this amount
// Retained warranty : usualy use on construction industry
@@ -969,10 +893,7 @@
// TODO Remove hooks with type 'output' (exemple createFrom). All hooks must be converted into 'addreplace' hooks.
// TODO Remove hooks with type 'output' (exemple getNomUrl). All hooks must be converted into 'addreplace' hooks.
// Tableau des parametres complementaires du post
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML only to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY only to test disabling of bad atrributes
// Test with restricthtml + MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES to test disabling of bad atrributes
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
// This improvment as provided by 'SirSir' to
@@ -1006,11 +927,9 @@
// reload page to retrieve customer informations
// reload page to retrieve supplier informations
// save curent cell padding
// submited to nothing.
// substract 1 because array start from 0
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
// to allow mask usage for dir, we shoul introduce a new param "isdir" to 1 to complete newmask like this
// variable submitted at all, so no way to make a difference between variable not submited and variable
//$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Mut be fields found into declaration of dataset
//$signature_line = dol_hash($keyforsignature, '5'); // Not really usefull
//Add hook to filter on user (for exemple on usergroup define in custom modules)
@@ -1037,7 +956,6 @@
console.log("Change montly amount echeance="+echeance+" idcap="+idcap+" capital="+capital);
dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now());
dol_syslog("Warning: Function form_constantes is calle with parameter strictw3c = 0, this is deprecated. Value must be 2 now.", LOG_DEBUG);
dol_syslog("line.php update bank line to set the new bank receipt nuber", LOG_DEBUG);
dol_syslog(get_class($this)."::getCustomerAccount Try to find the first system customer id for ".$site." of thirdparty id=".$id." (exemple: cus_.... for stripe)", LOG_DEBUG);
dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG);
foreach ($allways as $way) {
@@ -1047,12 +965,9 @@
http_response_code(202); // If we use 202, this is not really an error message, but this allow to ouput message on command line tools
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
if (!empty($this->phone)) { // If a phone of thirdparty is defined, we add it ot mobile of contacts
if (!getDolGlobalString('PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN')) { // Note that some countries still need bank number, BIC/IBAN not enougth for them
if (!is_array($this->userassigned) && !empty($this->userassigned)) { // For backward compatibility when userassigned was an int instead fo array
if ($lines[$i]->fk_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines
if ($lines[$i]->fk_task_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines
if ($objectfield) { // We must retreive the objectdesc from the field or extrafield
if ($this->label == 'Annulation mouvement ID'.$this->id) {
if ($user->hasRight('stock', 'mouvement', 'creer')) {
if (GETPOST('import_name')) { // If we have submited a form, we take value used fot the update try
if (dol_strlen($phone) == 10) {// fixe 6 chiffres +352_AA_BB_CC
@@ -1078,12 +993,10 @@
print 'This website or feature is currently temporarly not available or failed after a technical error.<br><br>This may be due to a maintenance operation. Current status of operation ('.dol_print_date(dol_now(), 'dayhourrfc').') are on next line...<br><br>'."\n";
return $childs;
return $objet->compteur;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Lable")), null, 'errors');
unset($object->supplierprices); // Mut use another API to get them
while ($i < $nblot) { // Loop on each serie
} else // We decrease agressiveness
} else { // If thirdparty unkown, output the waiting account
} else { // We decrease agressiveness
} else { // old method. deprecated because ot can't retrieve type
} elseif (!empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables.
} elseif (!empty($this->fk_element) && !empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables.
@@ -1130,7 +1043,6 @@
* @param int $socid Id ot third party or 0 for all or -1 for empty list
* @param int $id Id du paiement dont il faut afficher les infos
* @param mixed $gm 'gmt'=Input informations are GMT values, 'tzserver'=Local to server TZ
* @param string $method Method of transmision to bank (0=Internet, 1=Api...)
* @param string $method method of transmision to bank
* @param string $method method of transmision to bank (0=Internet, 1=Api...)
* @param string $dolibarr_main_db_pass Mot de passe user a creer
@@ -1153,7 +1065,6 @@
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
* @return array Tableau info des attributs
* @return int < 0 if KO (infinit loop), >= 0 if OK
* @return int Return integer < 0 if KO (infinit loop), >= 0 if OK
* @return array Tableau des informations des champs de la table
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return int 0 en cas de succes
@@ -1162,8 +1073,6 @@
* Charge indicateurs this->nb pour le tableau de bord
* Charge les informations d'ordre info dans l'objet commande
* Charge les informations d'ordre info dans l'objet facture
* Classify the reception as invoiced (used for exemple by trigger when WORKFLOW_RECEPTION_CLASSIFY_BILLED_INVOICE is on)
* Classify the shipping as invoiced (used for exemple by trigger when WORKFLOW_SHIPPING_CLASSIFY_BILLED_INVOICE is on)
* Connexion to server
* Define properties fullpath, fullrelativename, fulllabel of a directory of array this->cats and all its childs.
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
@@ -1210,7 +1119,6 @@
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon la TVA proposee par defaut=0. Fin de regle.
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* - string (categories ids seprated by comma)
* - string (categories ids seprated by comma)
* - string (categories ids seprated by comma)
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
@@ -1397,7 +1305,6 @@
* @param array $arrayofcriterias Array of available search criterias. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...)
* @param array $search_component_params Array of selected search criterias
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
* @param int $fk_product_stock id product_stock for objet
* @param int $disabledoutputofmessages Clear all messages stored into session without diplaying them
* @param int $lineid Id of production line to filter childs
* @param int $noescapecommand 1=Do not escape command. Warning: Using this parameter needs you alreay have sanitized the $command parameter. If not, it will lead to security vulnerability.
@@ -1436,7 +1343,6 @@
* @param array $info content informations of field
* @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok)
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
* @param int $default_font_size default siez of font
* @param int $id id du paiement dont il faut afficher les infos
@@ -1449,7 +1355,6 @@
* @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (usefull only if product is a subproduct)
* @param int $nbmax Number maxium of photos (0=no maximum)
* @param int $id Id of product to search childs of
* @param string $extrafieldsobjectkey The key to use to store retreived data (commonly $object->table_element)
* @param string $extrafieldsobjectkey The key to use to store retreived data (for example $object->table_element)
* @param string $moreparam To add more parametes on html input tag
* @param string $moreparam To add more parametes on html input tag
@@ -1469,19 +1374,11 @@
* @param int $month Specifig month - Can be empty
* @param int $year Specifig year - Can be empty
* @param int $_type Interger value representing Mail Transport Type
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $str Original string to encode and optionaly truncate
* @param string $page Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformated)
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of numeric value, or a select combo). Use '' to use same than $value
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
* @param string $page Page name (website id must also be filled if this parameter is used). Exemple 'myaliaspage' or 'fr/myaliaspage'
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
* @param string $_path Path to the sendmail execuable
* @param string $key Authentification key
* @param string $selected Id remise fixe pre-selectionnee
@@ -1491,7 +1388,6 @@
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return float|string Total amout of discount
* @return int <0 if KO, number of equipments found if OK
* @return int Return integer <0 if KO, number of equipments found if OK
* @return string Javacript code to manage dependency
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return array Array with inforation on table
@@ -1510,20 +1406,15 @@
* @var array Custom family informations
* @var array Header informations. Usually created at runtime by loadBox().
* @var array box dependancies
* @var boolean $standard_conforming_string Set this to true if postgres accept only standard encoding of sting using '' and not \'
* @var int Postion
* @var int Date for cancelation
* @var int ID for cancelation
* @var int -1=Unkown duration
* @var int Amount can be choosen by the visitor during subscription (0 or 1)
* @var int Code modifiable si il est invalide
* @var int Subsription required (0 or 1)
* @var int availabilty ID
* @var integer|string Date delivery planed
* @var string The name of constant to use to scan ODT files (Exemple: 'COMMANDE_ADDON_PDF_ODT_PATH')
* @var string Hash to identify ticket publically
* @var string availabilty code
* @var string availabilty label
* @var string ref custome
* Active Directory ne supporte pas les connexions anonymes
* Attention ce module est utilise par defaut si aucun module n'a
@@ -1543,7 +1434,6 @@
* Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] }
* Flag to 1 if we must clean ambiguous charaters for the autogeneration of password (List of ambiguous char is in $this->Ambi)
* Function to know all custom groupd from an accounting account
* Function to shwo the combo select to chose a type of field (varchar, int, email, ...)
* Function used to return childs of Mo
* If paid completelly, this->close_code will be null
* Inserts all informations into database.
@@ -1602,7 +1492,6 @@
* Return connexion ID
* Return direct childs id of a category into an array
* Return list of auxilary accounts. Cumulate list from customers, suppliers and users.
* Return list of categories having choosed type
* Return list of product formated for output
* Return the addtional SQL JOIN query for filtering a list by a category
* Return the addtional SQL SELECT query for filtering a list by a category
@@ -1620,7 +1509,6 @@
* ete definit dans la configuration
* or a COMMA delimted string, and inserts them into a highly
* reload conf value from databases is an aliase of loadValueFromConf
* reverse mouvement for object by updating infos
* statique et publique. Le nombre de parametres est determine automatiquement.
* the tagret is useful with hooks : that allow externals modules to add setup items on good place
* the underlaying array is destroyed and reconstructed.
@@ -1632,7 +1520,6 @@
# Log directoves
$IBS_RETOUR = "montant:M;ref:R;auto:A;trans:T"; // Format des parametres du get de validation en reponse (url a definir sous paybox)
$alwaysuncheckedmodules = array('dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'skype', 'website'); // Module we dont want by default
$alwaysuncheckedmodules = array('dav', 'dynamicprices', 'incoterm', 'loan', 'multicurrency', 'paybox', 'paypal', 'stripe', 'google', 'printing', 'scanner', 'socialnetworks', 'website'); // Module we dont want by default
$amount = (is_numeric($amount) ? $amount : 0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number)
$controle = $tableau[$report][10];
$data = getDecodeValue($mege, $type);
@@ -1643,8 +1530,6 @@
$intial = 0;
$ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_MEMBER_DN, $conf->global->LDAP_KEY_MEMBERS, $required_fields, 'member'); // Fiter on 'member' filter param
$ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 'user'); // Fiter on 'user' filter param
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_DN'), getDolGlobalString('LDAP_KEY_MEMBERS'), $required_fields, 'member'); // Fiter on 'member' filter param
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 'user'); // Fiter on 'user' filter param
$mege = imap_fetchbody($mbox, $jk, $fpos);
$mege = imap_fetchbody($mbox, $jk, $fpos, FT_UID);
$object->status = $object->fk_statut; // for backwad compatibility
@@ -1671,7 +1556,6 @@
// Add format informations and link to download example
// Affichage de la liste des projets de la semaine
// Bit 1: 0 ligne normale - 1 si ligne de remise fixe
// Build filter to diplay only concerned lines
// By default use tls decied by PHP.
// Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT
// Chargement de la classe
@@ -1737,11 +1621,9 @@
// We open a list of transaction of a dedicated account and no page was set by defaut
// When a dictionnary is commented
// add properties and declare them in consturctor
// buil format asciidoc for urls in table
// but in some situations that is required (update legal informations for example)
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// on transfert les données de l'un vers l'autre
// rewrite dictionnary if
// si le filtrage est parametre pour l'export ou pas
// start and end date that change with time andd that may be different that the period of reference for price.
// verify informations entred
@@ -1792,7 +1674,6 @@
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
print '<tr><td colspan="2"><br>*** Force modules not found physicaly to be disabled (only modules adding js, css or hooks can be detected as removed physicaly)</td></tr>';
print 'Failed to open '.$outputfile.' for ouput.'."\n";
print 'Missing paramater s, c or a';
print 'Sorry, it seems your internet connexion is off.<br>';
print ajax_combobox("mouvement");
@@ -1806,7 +1687,6 @@
public $date_delivery; // Date delivery planed
public $debug_api; // usefull if no dialog
public $emetteur; // Objet societe qui emet
public $fk_origin_stock; // rowid in llx_product_batch table (not usefull)
public $graph; // Objet Graph (Artichow, Phplot...)
public $infofiles; // Used to return informations by function getDocumentsLink
public $lastsearch_values; // To store last saved search criterias for user
@@ -1998,7 +1878,6 @@
* \brief Onglet informations personnelles d'un contact
* \brief Page fiche LDAP groupe
* \brief Tab to manage contacts/adresses of proposal
* @return boolean True if informations are valid, false otherwise
* @return boolean True if informations are valid, false otherwise
* @return string Formated string
* @return string Return list fo image format
@@ -2051,10 +1930,8 @@
* @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)')
* @return array|int Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error
* @return array|int Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error
* Classe mere des modeles de numerotation des references de bon de livraison
* Classe mere des modeles de numerotation des references de members
* Classe mere des modeles de numerotation des references de projets
* Classe mere des modeles de numerotation des tickets de caisse
* Classe permettant la gestion des stats des expensereports et notes de frais
* Delete files into database index using search criterias.
* Get formated error messages to output (Used to show messages on html output).
@@ -2119,7 +1996,6 @@
* @param string $objectname name of object whant to remove
* @retun boolean
* @return array returns an associtive array containing the response from the server.
* @return string Formated string
* @return string A HTML table that conatins a list with open (unpaid) supplier invoices
* @return string Formated value
* @return array Array of mesures
@@ -2142,7 +2018,6 @@
* Correspondance des livraisons et des commandes clients dans la table llx_co_liv
* Creation objet $langs (must be before all other code)
* For action=add, use: $var = GETPOST('var'); // No GETPOSTISSET, so GETPOST always called and default value is retreived if not a form POST, and value of form is retreived if it is a form POST.
* Generate Urls and add them to documentaion module
* It is usefull to search for a particular key and displaying arrays.
* Lattest modified orders
* Les catégories filles, sous tableau dez la catégorie
@@ -2197,17 +2072,14 @@
$FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more informations
$array = array(1=>'Value 1', 2=>'Value 2', 3=>'Value 3 ith a very long text. aze eazeae e ae aeae a e a ea ea ea e a e aea e ae aeaeaeaze.');
$conf = new stdClass(); // instantiate $conf explicitely
$html .= ' monthes people</b><br>';
$permissiontoadd = $user->rights->stock->mouvement->creer;
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we shoul dnever delete
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we should never delete
$permissiontoread = $user->rights->stock->mouvement->lire;
$seledted = !getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY') ? array() : explode(',', getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY'));
$seledted = empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY) ? array() : explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY);
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
$sql = 'SELECT nom as name, reponses';
$tag = GETPOST('tag'); // To retreive the emailing, and recipient
$tmpday = -date("w", dol_mktime(12, 0, 0, $month, 1, $year, 'gmt')) + 2; // date('w') is 0 fo sunday
$usercancreate = $user->rights->stock->mouvement->creer;
$usercancreate = (($user->rights->stock->mouvement->creer));
$usercandelete = $user->rights->stock->mouvement->creer;
@@ -2266,7 +2138,6 @@ $usercanread = (($user->rights->stock->mouvement->lire));
/* Affichage de la liste des projets du mois */
/* Badge style is based on boostrap framework */
/* Force values on one colum for small screen */
/* The buttonplus isgrowing on hover (dont know why). This is to avoid to have the cellegrowing too */
/* To make a div popup, we must use a position aboluste inside a position relative */
/* USING IMAGES FOR WEATHER INTEAD OF FONT AWESOME */
/* Warning: setting this may make screen not beeing refreshed after a combo selection */
@@ -2335,7 +2206,6 @@ $usercanread = (($user->rights->stock->mouvement->lire));
// TODO ajouter regle pour restreindre acces paiement
// Table to store complete informations (will replace all other table). Key is table name.
// Test to check image can be publically viewed is done inside the viewimage.php wrapper.
// The session_set_save_handler() at end of this fille will replace default session management.
// This 2 lines are usefull only if we want to exclude some Urls from the explorer
// This refresh list of dirs, not list of files (for preformance reason). List of files is refresh only if dir was not synchronized.
// To disable a constant whithout javascript
@@ -2344,11 +2214,9 @@ $usercanread = (($user->rights->stock->mouvement->lire));
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
// We must filter on assignement table
// badge color ajustement for color blind
// chek if salary pl
// current rule: uptodate = the end date is in future or no subcription required
// librarie core
// librarie jobs
// reverse mouvement of stock
// status color ajustement for color blind
//Activate Set adress in list
//Another call for easy debugg
@@ -2495,7 +2363,6 @@ NEW: Add SQL contraint on product_stock table to allow only exsting product and
NEW: Add email in event history, for reminder email of expired subsription
NEW: Add exemple of setup for multitail to render dolibarr log files
NEW: Add hidden option MAIN_EMAIL_SUPPORT_ACK to restore Email ack checkbox (feature abandonned by mailers)
NEW: Add more company informations (ProfId7 to 10) (#25266)
NEW: Add option to disable globaly some notifications emails.
NEW: Add option to display thirdparty adress in combolist
NEW: Add ressource extrafields.
@@ -2527,20 +2394,15 @@ NEW: Implement option SUPPLIER_ORDER_USE_DISPATCH_STATUS to add a status into ea
NEW: Introduce position of records into dictionnary of type of contacts
NEW: Introduce use of cache for thumbs images of users to save bandwith.
NEW: Look and feel v11: Some setup pages are by default direclty in edit mode.
NEW: Menu editor is reponsive
NEW: Merge all boxes "related objects" into one. This save a lot of room on most card and avoid often horizontal scoll.
NEW: ModuleBuilder - More feature that can be modifed after module generation
NEW: ModuleBuilder: for edit name of dictionnary and delete it in MB
NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users).
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
NEW: Payment: Can edit account on miscellaneous payment (if not transfered)
NEW: Product stock and subproduct stock are independant
NEW: Products: Add SQL contraint on product_stock table to allow only existing product and warehouse #23543
NEW: Remove tooltip tipTip library replaced with standatd jquery tooltip
NEW: Start to introduce search filters on dictionnaries for vat list.
NEW: Support of deployement of metapackages
NEW: When a new field to show into lists is selected, the form is automatically submited and field added.
NEW: When an user unset the batch management of products, transformation of each batch stock mouvement in global stock mouvement
NEW: X-Axis on graph are shown verticaly when there is a lot of values.
NEW: add API shipment mode dictionnary
NEW: add a prospect status for the contact with managment of custom icon
@@ -2568,13 +2430,11 @@ Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test
Store, search and retreive any article to keep your knowledge into a database. It can be used to manage a list of FAQ, or a database
The keyword can be ommitted if your commit does not fit in any of the following categories:
The output patch file can then be submited on Dolibarr
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
This directory contains several subdirectories with entries for informations on Dolibarr.<br>
This docker image intended for developpement usage.
This docker image is intended for developpement usage.
This module provides a sheduled job that scan regularly one or several IMAP email boxes, with filtering rules, to automatically record data in your application, like
Une ligne represente un element : data[$x]
Upgrading to any other version or database system is abolutely required BEFORE trying to
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
@@ -2587,7 +2447,6 @@ elseif ($year && $month && $day) $daytoparsegmt = dol_mktime(0, 0, 0, $month, $d
function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localtax2_tx, $fk_pa, $paht)
function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0)
if (!$user->hasRight('stock', 'mouvement', 'lire')) {
if (!empty($conf->variants->eabled) && !getDolGlobalString('VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT')) { // Add test to exclude products that has variants
if (!empty($conf->variants->eabled) && empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { // Add test to exclude products that has variants
if (!empty($contactname)) { // acces a partir du module de recherche
if ($action == "transfert") {
@@ -2603,4 +2462,3 @@ print '<div class="div-table-responsive-no-min">'; // You can use div-table-resp
print_barre_liste($langs->trans("Sessions"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, ($num ? $num : ''), 'setup'); // Do not show numer (0) if no session found (it means we can't know)
print_liste_field_titre("Prority", $_SERVER["PHP_SELF"], "t.priority", "", $param, '', $sortfield, $sortorder);
session_start(); // To be able to keep info into session (used for not losing pass during navigation. pass must not transit through parmaeters)
} // this are value submited after submit of action 'submitdateselect'

View File

@@ -37,14 +37,14 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
exit();
}
error_reporting(E_ALL & ~E_DEPRECATED);
error_reporting(E_ALL & ~ E_DEPRECATED);
define('PRODUCT', "pg2mysql");
define('VERSION', "2.0");
// this is the default, it can be overridden here, or specified as the third parameter on the command line
$config['engine'] = "InnoDB";
if (!($argv[1] && $argv[2])) {
if (! ($argv[1] && $argv[2])) {
echo "Usage: php pg2mysql_cli.php <inputfilename> <outputfilename> [engine]\n";
exit();
} else {
@@ -141,7 +141,7 @@ function pg2mysql_large($infilename, $outfilename)
echo "Filesize: " . formatsize($fs) . "\n";
while ($instr = fgets($infp)) {
$linenum++;
$linenum ++;
$memusage = round(memory_get_usage(true) / 1024 / 1024);
$len = strlen($instr);
$pgsqlchunk[] = $instr;
@@ -163,7 +163,7 @@ function pg2mysql_large($infilename, $outfilename)
}
if (strlen($instr) > 3 && ($instr[$len - 3] == ")" && $instr[$len - 2] == ";" && $instr[$len - 1] == "\n") && $inquotes == false) {
$chunkcount++;
$chunkcount ++;
if ($linenum % 10000 == 0) {
$currentpos = ftell($infp);
@@ -246,7 +246,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (is_array($input)) {
$lines = $input;
} else {
$lines = explode("\n", $input);
$lines = split("\n", $input);
}
if ($header) {
@@ -302,7 +302,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$output .= 'DROP TABLE IF EXISTS `' . $reg2[1] . '`;' . "\n";
}
$output .= $line;
$linenumber++;
$linenumber ++;
continue;
}
@@ -313,7 +313,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$output .= $tbl_extra;
$output .= $line;
$linenumber++;
$linenumber ++;
$tbl_extra = "";
continue;
}
@@ -395,10 +395,10 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (strstr($line, " CONSTRAINT ")) {
$line = "";
// and if the previous output ended with a , remove the ,
$lastchr = substr($output, -2, 1);
$lastchr = substr($output, - 2, 1);
// echo "lastchr=$lastchr";
if ($lastchr == ",") {
$output = substr($output, 0, -2) . "\n";
$output = substr($output, 0, - 2) . "\n";
}
}
@@ -408,9 +408,9 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (substr($line, 0, 11) == "INSERT INTO") {
$line = str_replace('public.', '', $line);
if (substr($line, -3, -1) == ");") {
if (substr($line, - 3, - 1) == ");") {
// we have a complete insert on one line
list($before, $after) = explode(" VALUES ", $line, 2);
list ($before, $after) = explode(" VALUES ", $line, 2);
// we only replace the " with ` in what comes BEFORE the VALUES
// (ie, field names, like INSERT INTO table ("bla","bla2") VALUES ('s:4:"test"','bladata2');
// should convert to INSERT INTO table (`bla`,`bla2`) VALUES ('s:4:"test"','bladata2');
@@ -424,13 +424,13 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$after = str_replace(", E'", ", '", $after);
$output .= $before . " VALUES " . $after;
$linenumber++;
$linenumber ++;
continue;
} else {
// this insert spans multiple lines, so keep dumping the lines until we reach a line
// that ends with ");"
list($before, $after) = explode(" VALUES ", $line, 2);
list ($before, $after) = explode(" VALUES ", $line, 2);
// we only replace the " with ` in what comes BEFORE the VALUES
// (ie, field names, like INSERT INTO table ("bla","bla2") VALUES ('s:4:"test"','bladata2');
// should convert to INSERT INTO table (`bla`,`bla2`) VALUES ('s:4:"test"','bladata2');
@@ -453,7 +453,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$output .= $before . " VALUES " . $after;
do {
$linenumber++;
$linenumber ++;
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
@@ -477,7 +477,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
}
// echo "inquotes=$inquotes\n";
}
} while (substr($lines[$linenumber], -3, -1) != ");" || $inquotes);
} while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes);
}
}
if (substr($line, 0, 16) == "ALTER TABLE ONLY") {
@@ -486,14 +486,14 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$line = str_replace("public.", "", $line);
$pkey = $line;
$linenumber++;
$linenumber ++;
if (!empty($lines[$linenumber])) {
$line = $lines[$linenumber];
} else {
$line = '';
}
if (strstr($line, " PRIMARY KEY ") && substr($line, -3, -1) == ");") {
if (strstr($line, " PRIMARY KEY ") && substr($line, - 3, - 1) == ");") {
$reg2 = array();
if (preg_match('/ALTER TABLE ([^\s]+)/', $pkey, $reg2)) {
if (empty($arrayofprimaryalreadyintabledef[$reg2[1]])) {
@@ -580,7 +580,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
}
}
$linenumber++;
$linenumber ++;
}
return array('output' => $output,'outputatend' => $outputatend);

View File

@@ -10,21 +10,21 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, including files into includes."
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, also files into includes."
echo "Usage: fixdosfiles.sh [list|fix]"
fi
# To detec
if [ "x$1" = "xlist" ]
then
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep -v 'htdocs\/includes' | grep CRLF
fi
# To convert
if [ "x$1" = "xfix" ]
then
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
do
echo "Fix file $fic"
dos2unix "$fic"

View File

@@ -1,11 +1,10 @@
#!/bin/sh
#
# Count number of different contributors and number of commits for a given year.
# Can be used for statistics (for example to generate the inforgraphy of the year)
#
if [ "x$1" = "x" ]; then
echo "Usage: $0 YEARSTART [YEAREND]"
echo "Usage: $0 YEAR"
exit
fi
@@ -13,15 +12,10 @@ fi
FROM=$1-01-01
TO=$1-12-31
if [ "x$2" != "x" ]; then
TO=$2-12-31
fi
echo "--- Number of contributors for the year"
echo "git log --since $FROM --before $TO | grep ^Author | awk -F'<' '{ print $1 }' | iconv -f UTF-8 -t ASCII//TRANSLIT | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep '^Author' | awk -F"<" '{ print $1 }' | iconv -f UTF-8 -t ASCII//TRANSLIT | sort -u -f -i -b | wc -l
echo "Number of contributors for the year"
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
echo "--- Number of commit for the year"
echo "git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c | awk '{ if (\$2 >= '"$1"') { print \"Year: \"\$2\", commits: \"\$1 } }'"
git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c | awk '{ if ($2 >= '$1') { print "Year: "$2", commits: "$1 } }'
echo "Number of commit for the year"
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"

View File

@@ -3,47 +3,16 @@
# Count number of commits per user and per versions (using date for version detection)
#
Releases=("3.9" "4.0" "5.0" "6.0" "7.0" "8.0" "9.0" "10.0" "11.0" "12.0" "13.0" "14.0" "15.0" "16.0" "17.0" "18.0" "develop")
let "counter = 0"
Releases=("17.0" "18.0" "develop")
Dates=("2023-02-01" "2023-08-31" "2050-01-01")
let "counter = 1"
echo "Copy script into /tmp/github_commits_perversion.sh"
cp $0 /tmp/github_commits_perversion.sh
echo "Delete /tmp/git"
rm -fr /tmp/git
echo "Create and go into /tmp/git"
mkdir /tmp/git
cd /tmp/git
git clone https://github.com/Dolibarr/dolibarr.git
cd /tmp/git/dolibarr
firstline=1
for i in "${Releases[@]}"
do
if [ $firstline -eq 1 ]; then
firstline=0
continue
fi
#echo "=== Version $i (counter $counter):"
echo "=== Version $i (counter $counter):"
echo "Get common commit ID between origin/${Releases[counter]} and origin/${Releases[counter+1]}"
echo "git merge-base origin/${Releases[counter]} origin/${Releases[counter+1]}"
commitidcommon=`git merge-base origin/${Releases[counter]} origin/${Releases[counter+1]}`
echo "Found commitid=$commitidcommon"
echo "Checkout into version $i"
git checkout $i
#git shortlog -s -n --after=YYYY-MM-DD --before=YYYY-MM-DD | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion.txt
git shortlog -s -n $commitidcommon.. | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion.txt
#cat /tmp/github_commits_perversion.txt
echo "Total for version $i:"
echo -n "- Nb of commits: "
git log $commitidcommon.. --pretty=oneline | tr '[:lower:]' '[:upper:]' > /tmp/github_commits_perversion2.txt
cat /tmp/github_commits_perversion2.txt | wc -l
echo -n "- Nb of different authors: "
awk ' { print $2 } ' < /tmp/github_commits_perversion.txt | sort -u | wc -l
echo "=== $counter git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}"
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
echo -n "Total $i: "
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
echo "======================="
echo
let "counter +=1"

View File

@@ -1,57 +0,0 @@
#!/bin/bash
# Based of: https://gist.github.com/jaymzcd/342399 and https://github.com/buren/flag-sprite-maker
# uses imagemagick to stich together all images in a folder and
# then writes a css file with the correct offsets along with a
# test html page for verification that its all good
# Usage:
# $ ./make_sprite.sh path class_name image_extension
set -euo pipefail
IFS=$'\n\t'
name='output'; # output will be placed in a folder named this
path="${1:-}" # Path to flag images
classname=${2:-flag}"-sprite"
ext="."${3:-png}; # the extension to iterate over for input files
css="$name/$classname.css";
html="$name/test.html";
rm -fr $name;
mkdir $name;
touch $css $html;
echo "Generating sprite file...";
convert $path*$ext -append $name/$classname$ext;
echo "Sprite complete! - Creating css & test output...";
echo -e "<html>\n<head>\n\t<link rel=\"stylesheet\" href=\"`basename $css`\" />\n</head>\n<body>\n\t<h1>Sprite test page</h1>\n" >> $html
echo -e ".$classname {\n\tbackground:url('$classname$ext') no-repeat top left; display:inline-block;\n}" >> $css;
counter=0;
offset=0;
for file in $path*$ext
do
width=`identify -format "%[fx:w]" "$file"`;
height=`identify -format "%[fx:h]" "$file"`;
idname=`basename "$file" $ext`;
clean=${idname// /-}
echo -e ".$classname.$clean {" >> $css;
echo -e "\tbackground-position:0 -${offset}px;" >> $css;
echo -e "\twidth: ${width}px;" >> $css;
echo -e "\theight: ${height}px;\n}" >> $css;
echo -e "<div style=\"display:inline-block;width:100px;\"><div style=\"overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;\">$clean</div> <a href=\"#\" class=\"$classname $clean\"></a></div>\n" >> $html;
let offset+=$height;
let counter+=1;
echo -e "\t#$counter done";
done
echo -e "<h2>Full sprite:</h2>\n<img src=\"$classname$ext\" />" >> $html;
echo -e "</body>\n</html>" >> $html;
echo -e "\nComplete! - $counter sprites created, css written & test page output.";

View File

@@ -1,3 +0,0 @@
/vendor/
/composer.json
/composer.lock

View File

@@ -1,80 +0,0 @@
#!/bin/bash
#
# Usage:
# Optionally set COMPOSER_CMD to the command to use to run composer.
# Optionally set COMPOSER_VENDOR_DIR to your vendor path for composer.
#
# Run php-cs-fixer by calling this script:
# ./run-php-cs-fixer.sh check # Only checks (not available with PHP 7.0)
# ./run-php-cs-fixer.sh fix # Fixes
#
# You can fix only a few files using
# ./run-php-cs-fixer.sh fix htdocs/path/to/myfile.php
#
# You can run this from the root directory of dolibarr
# dev/tools/run-php-cs-fixer.sh fix htdocs/path/to/myfile.php
#
# You can provide the environment variables on the CLI like this:
# COMPOSER_CMD="php ~/composer.phar" COMPOSER_VENDOR_DIR="~/vendor" ./run-php-cs-fixer.sh
#
# or export them:
# export COMPOSER_CMD="~/composer.phar"
# export COMPOSER_VENDOR_DIR="~/vendor"
# ./run-php-cs-fixer.sh
#
# Or some other method
#
MYDIR=$(dirname "$(realpath "$0")")
export COMPOSER_VENDOR_DIR=${COMPOSER_VENDOR_DIR:=$MYDIR/vendor}
COMPOSER_CMD=${COMPOSER_CMD:composer}
MINPHPVERSION="7.0"
echo "***** run-php-cs-fixer.sh *****"
if [ "x$1" = "x" ]; then
echo "Syntax: run-php-cs-fixer.sh check|fix [path_from_root_project]"
exit 1;
fi
#
# Check composer is available
#
if [ ! -r "${COMPOSER_CMD}" ] ; then
echo composer is not available or not in path. You can give the path of composer by setting COMPOSER_CMD=/pathto/composer
echo Example: export COMPOSER_CMD="~/composer.phar"
echo Example: export COMPOSER_CMD="/usr/local/bin/composer"
exit 1;
fi
#
# Install/update php-cs-fixer
#
echo Install php-cs-fixer
PHP_CS_FIXER="${COMPOSER_VENDOR_DIR}/bin/php-cs-fixer"
if [ ! -r "${PHP_CS_FIXER}" ] ; then
[[ ! -e "${COMPOSER_VENDOR_DIR}" ]] && ${COMPOSER_CMD} install
[[ -e "${COMPOSER_VENDOR_DIR}" ]] && ${COMPOSER_CMD} update
php${MINPHPVERSION} ${COMPOSER_CMD} require --dev friendsofphp/php-cs-fixer
echo
fi
# With PHP 7.0, php-cs-fixer is V2 (command check not supported)
# With PHP 8.2, php-cs-fixer is V3
(
echo cd "${MYDIR}/../../.."
cd "${MYDIR}/../../.." || exit
CMD=
# If no argument, run check by default
[[ "$1" == "" ]] && CMD=check
# shellcheck disable=SC2086
echo php${MINPHPVERSION} "${PHP_CS_FIXER}" $CMD "$@"
php${MINPHPVERSION} "${PHP_CS_FIXER}" $CMD "$@"
)

View File

@@ -1,2 +0,0 @@
/test.php
/vendor

View File

@@ -1,28 +0,0 @@
### Refactoring code with [rector](https://getrector.com)
#### Installation
Run in this folder
```shell
cd dev/tools/rector
```
Install rector with composer
```shell
composer install
```
#### Usage
##### To make changes (Add --dry-run for test mode only)
```shell
./vendor/bin/rector process --dry-run
```
##### To make changes on a given directory
```shell
./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/
```

View File

@@ -1,19 +0,0 @@
{
"name": "dolibarr/rector",
"type": "project",
"license": "GplV3",
"authors": [
{
"name": "Dev2a",
"email": "contact@dev2a.pro"
}
],
"require-dev": {
"rector/rector": "^0.18.5"
},
"autoload-dev": {
"psr-4": {
"Dolibarr\\Rector\\": "./src"
}
}
}

View File

@@ -1,137 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f2998987cad52db5ab60d5ff0672ce05",
"packages": [],
"packages-dev": [
{
"name": "phpstan/phpstan",
"version": "1.10.38",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691",
"reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"keywords": [
"dev",
"static analysis"
],
"support": {
"docs": "https://phpstan.org/user-guide/getting-started",
"forum": "https://github.com/phpstan/phpstan/discussions",
"issues": "https://github.com/phpstan/phpstan/issues",
"security": "https://github.com/phpstan/phpstan/security/policy",
"source": "https://github.com/phpstan/phpstan-src"
},
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://github.com/phpstan",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2023-10-06T14:19:14+00:00"
},
{
"name": "rector/rector",
"version": "0.18.5",
"source": {
"type": "git",
"url": "https://github.com/rectorphp/rector.git",
"reference": "2a3b82f317e431fc142d21f3303891a4e64c96eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/2a3b82f317e431fc142d21f3303891a4e64c96eb",
"reference": "2a3b82f317e431fc142d21f3303891a4e64c96eb",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0",
"phpstan/phpstan": "^1.10.35"
},
"conflict": {
"rector/rector-doctrine": "*",
"rector/rector-downgrade-php": "*",
"rector/rector-phpunit": "*",
"rector/rector-symfony": "*"
},
"bin": [
"bin/rector"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Instant Upgrade and Automated Refactoring of any PHP code",
"keywords": [
"automation",
"dev",
"migration",
"refactoring"
],
"support": {
"issues": "https://github.com/rectorphp/rector/issues",
"source": "https://github.com/rectorphp/rector/tree/0.18.5"
},
"funding": [
{
"url": "https://github.com/tomasvotruba",
"type": "github"
}
],
"time": "2023-10-05T11:25:40+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.2.0"
}

View File

@@ -1,62 +0,0 @@
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Set\ValueObject\LevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersion::PHP_71);
//$rectorConfig->indent(' ', 4);
// Traits seems not supported correctly by rector without declaring them as bootstrapFiles
$arrayoftraitfiles = array(
__DIR__ . '/../../../htdocs/core/class/commonincoterm.class.php',
__DIR__ . '/../../../htdocs/core/class/commonpeople.class.php',
__DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php'
);
$rectorConfig->bootstrapFiles($arrayoftraitfiles);
$rectorConfig->paths([
__DIR__ . '/../../../htdocs/',
__DIR__ . '/../../../scripts/',
__DIR__ . '/../../../test/phpunit/',
]);
$rectorConfig->skip([
'**/includes/**',
'**/custom/**',
'**/vendor/**',
'**/rector/**', // Disable this line to test the "test.php" file.
__DIR__ . '/../../../htdocs/custom/',
__DIR__ . '/../../../htdocs/install/doctemplates/*'
]);
$rectorConfig->parallel(240);
// Register rules
//$rectorConfig->rule(Rector\Php71\Rector\List_\ListToArrayDestructRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\GetClassOnNullRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\Assign\ListEachRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector::class);
//$rectorConfig->rule(Rector\Php72\Rector\FuncCall\StringifyDefineRector::class);
//$rectorConfig->rule(ReplaceEachAssignmentWithKeyCurrentRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\FloatvalToTypeCastRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\BoolvalToTypeCastRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class);
//$rectorconfig->rule(Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\GlobalToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\UserRightsToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class);
// Add all predefined rules to migrate to up to php 71
// $rectorConfig->sets([
// LevelSetList::UP_TO_PHP_71
// ]);
};

View File

@@ -1,216 +0,0 @@
<?php
namespace Dolibarr\Rector\Renaming;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Expr\BinaryOp\Equal;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Empty_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use Rector\Core\NodeManipulator\BinaryOpManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\Php71\ValueObject\TwoNodeMatch;
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
/**
* Class with Rector custom rule to fix code
*/
class EmptyGlobalToFunction extends AbstractRector
{
/**
* @var \Rector\Core\NodeManipulator\BinaryOpManipulator
*/
private $binaryOpManipulator;
/**
* Constructor
*
* @param BinaryOpManipulator $binaryOpManipulator The $binaryOpManipulator
*/
public function __construct(BinaryOpManipulator $binaryOpManipulator)
{
$this->binaryOpManipulator = $binaryOpManipulator;
}
/**
* getRuleDefinition
*
* @return RuleDefinition
* @throws PoorDocumentationException
*/
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change $conf->global to getDolGlobal',
[new CodeSample(
'$conf->global->CONSTANT',
'getDolGlobalInt(\'CONSTANT\')'
)]
);
}
/**
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
*
* @return string[]
*/
public function getNodeTypes(): array
{
return [Node\Expr\BooleanNot::class, Node\Expr\Empty_::class];
}
/**
* refactor
*
* @param Node $node A node
* @return FuncCall|BooleanNot
*/
public function refactor(Node $node)
{
if ($node instanceof Node\Expr\BooleanNot) {
if (!$node->expr instanceof Node\Expr\Empty_) {
return null;
}
// node is !empty(...) so we set node to ...
$newnode = $node->expr->expr;
$tmpglobal = $newnode->var;
if (is_null($tmpglobal)) {
return null;
}
if (!$this->isName($tmpglobal, 'global')) {
return null;
}
$tmpconf = $tmpglobal->var;
if (!$this->isName($tmpconf, 'conf')) {
return null;
}
$nameforconst = $this->getName($newnode);
if (is_null($nameforconst)) {
return null;
}
$constName = new String_($nameforconst);
// We found a node !empty(conf->global->XXX)
return new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
}
if ($node instanceof Node\Expr\Empty_) {
// node is empty(...) so we set node to ...
$newnode = $node->expr;
$tmpglobal = $newnode->var;
if (is_null($tmpglobal)) {
return null;
}
if (!$this->isName($tmpglobal, 'global')) {
return null;
}
$tmpconf = $tmpglobal->var;
if (!$this->isName($tmpconf, 'conf')) {
return null;
}
$nameforconst = $this->getName($newnode);
if (is_null($nameforconst)) {
return null;
}
$constName = new String_($nameforconst);
return new BooleanNot(new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
));
}
return null;
}
/**
* Get nodes with check empty
*
* @param BooleanAnd $booleanAnd A BooleandAnd
* @return TwoNodeMatch|null
*/
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
{
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
$booleanAnd,
// $conf->global == $value
function (Node $node): bool {
if (!$node instanceof Equal) {
return \false;
}
return $this->isGlobalVar($node->left);
},
// !empty(...) || isset(...)
function (Node $node): bool {
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
return $this->isGlobalVar($node->expr->expr);
}
if (!$node instanceof Isset_) {
return $this->isGlobalVar($node);
}
return \true;
}
);
}
/**
* Check if node is a global access with format conf->global->XXX
*
* @param Node $node A node
* @return bool Return true if noe is conf->global->XXX
*/
private function isGlobalVar($node)
{
if (!$node instanceof PropertyFetch) {
return false;
}
if (!$this->isName($node->var, 'global')) {
return false;
}
$global = $node->var;
if (!$global instanceof PropertyFetch) {
return false;
}
if (!$this->isName($global->var, 'conf')) {
return false;
}
return true;
}
/**
* @param Node $node Node to be parsed
* @return Node|void Return the name of the constant
*/
private function getConstName($node)
{
if ($node instanceof PropertyFetch && $node->name instanceof Node\Expr) {
return $node->name;
}
$name = $this->getName($node);
if (empty($name)) {
return;
}
return new String_($name);
}
}

View File

@@ -1,391 +0,0 @@
<?php
namespace Dolibarr\Rector\Renaming;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Expr\BinaryOp\Equal;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Empty_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use Rector\Core\NodeManipulator\BinaryOpManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\Php71\ValueObject\TwoNodeMatch;
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use PhpParser\Node\Expr\BinaryOp\NotEqual;
use PhpParser\Node\Expr\BinaryOp\Greater;
use PhpParser\Node\Expr\BinaryOp\GreaterOrEqual;
use PhpParser\Node\Expr\BinaryOp\Smaller;
use PhpParser\Node\Expr\BinaryOp\SmallerOrEqual;
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
/**
* Class with Rector custom rule to fix code
*/
class GlobalToFunction extends AbstractRector
{
/**
* @var \Rector\Core\NodeManipulator\BinaryOpManipulator
*/
private $binaryOpManipulator;
/**
* Constructor
*
* @param BinaryOpManipulator $binaryOpManipulator The $binaryOpManipulator
*/
public function __construct(BinaryOpManipulator $binaryOpManipulator)
{
$this->binaryOpManipulator = $binaryOpManipulator;
}
/**
* getRuleDefinition
*
* @return RuleDefinition
* @throws PoorDocumentationException
*/
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change $conf->global to getDolGlobal in context (1) conf->global Operator Value or (2) function(conf->global...)',
[new CodeSample(
'$conf->global->CONSTANT',
'getDolGlobalInt(\'CONSTANT\')'
)]
);
}
/**
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
*
* @return string[]
*/
public function getNodeTypes(): array
{
return [FuncCall::class, MethodCall::class, Equal::class, NotEqual::class, Greater::class, GreaterOrEqual::class, Smaller::class, SmallerOrEqual::class, NotIdentical::class, BooleanAnd::class, Concat::class, ArrayDimFetch::class];
}
/**
* refactor
*
* @param Node $node A node
* @return FuncCall|Equal|Concat|ArrayDimFetch|void
* return $node unchanged or void to do nothing
*/
public function refactor(Node $node)
{
if ($node instanceof Node\Expr\ArrayDimFetch) {
if (!isset($node->dim)) {
return;
}
if ($this->isGlobalVar($node->dim)) {
$constName = $this->getConstName($node->dim);
if (empty($constName)) {
return;
}
$node->dim = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
}
return $node;
}
if ($node instanceof FuncCall) {
$tmpfunctionname = $this->getName($node);
// If function is ok. We must avoid a lot of cases like isset(), empty()
if (in_array($tmpfunctionname, array('dol_escape_htmltag', 'dol_hash', 'make_substitutions', 'min', 'max', 'explode'))) {
//print "tmpfunctionname=".$tmpfunctionname."\n";
$args = $node->getArgs();
$nbofparam = count($args);
if ($nbofparam >= 1) {
$tmpargs = $args;
foreach ($args as $key => $arg) { // only 1 element in this array
//var_dump($key);
//var_dump($arg->value);exit;
if ($this->isGlobalVar($arg->value)) {
$constName = $this->getConstName($arg->value);
if (empty($constName)) {
return;
}
$a = new FuncCall(new Name('getDolGlobalString'), [new Arg($constName)]);
$tmpargs[$key] = new Arg($a);
$r = new FuncCall(new Name($tmpfunctionname), $tmpargs);
return $r;
}
}
}
}
return $node;
}
if ($node instanceof MethodCall) {
$tmpmethodname = $this->getName($node->name);
// If function is ok. We must avoid a lot of cases
if (in_array($tmpmethodname, array('idate'))) {
//print "tmpmethodname=".$tmpmethodname."\n";
$expr = $node->var;
$args = $node->getArgs();
$nbofparam = count($args);
if ($nbofparam >= 1) {
$tmpargs = $args;
foreach ($args as $key => $arg) { // only 1 element in this array
//var_dump($key);
//var_dump($arg->value);exit;
if ($this->isGlobalVar($arg->value)) {
$constName = $this->getConstName($arg->value);
if (empty($constName)) {
return;
}
$a = new FuncCall(new Name('getDolGlobalString'), [new Arg($constName)]);
$tmpargs[$key] = new Arg($a);
$r = new MethodCall($expr, $tmpmethodname, $tmpargs);
return $r;
}
}
}
}
return $node;
}
if ($node instanceof Concat) {
if ($this->isGlobalVar($node->left)) {
$constName = $this->getConstName($node->left);
if (empty($constName)) {
return;
}
$leftConcat = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
$rightConcat = $node->right;
}
if ($this->isGlobalVar($node->right)) {
$constName = $this->getConstName($node->right);
if (empty($constName)) {
return;
}
$rightConcat = new FuncCall(
new Name('getDolGlobalString'),
[new Arg($constName)]
);
$leftConcat = $node->left;
}
if (!isset($leftConcat, $rightConcat)) {
return;
}
return new Concat($leftConcat, $rightConcat);
}
if ($node instanceof BooleanAnd) {
$nodes = $this->resolveTwoNodeMatch($node);
if (!isset($nodes)) {
return;
}
/** @var Equal $node */
$node = $nodes->getFirstExpr();
}
// Now process all comparison like:
// $conf->global->... Operator Value
$typeofcomparison = '';
if ($node instanceof Equal) {
$typeofcomparison = 'Equal';
}
if ($node instanceof NotEqual) {
$typeofcomparison = 'NotEqual';
}
if ($node instanceof Greater) {
$typeofcomparison = 'Greater';
}
if ($node instanceof GreaterOrEqual) {
$typeofcomparison = 'GreaterOrEqual';
}
if ($node instanceof Smaller) {
$typeofcomparison = 'Smaller';
}
if ($node instanceof SmallerOrEqual) {
$typeofcomparison = 'SmallerOrEqual';
}
if ($node instanceof NotIdentical) {
$typeofcomparison = 'NotIdentical';
//var_dump($node->left);
}
if (empty($typeofcomparison)) {
return;
}
if (!$this->isGlobalVar($node->left)) {
return;
}
// Test the type after the comparison conf->global->xxx to know the name of function
$typeright = $node->right->getType();
switch ($typeright) {
case 'Scalar_LNumber':
$funcName = 'getDolGlobalInt';
break;
case 'Scalar_String':
$funcName = 'getDolGlobalString';
break;
default:
return;
}
$constName = $this->getConstName($node->left);
if (empty($constName)) {
return;
}
if ($typeofcomparison == 'Equal') {
return new Equal(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'NotEqual') {
return new NotEqual(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'Greater') {
return new Greater(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'GreaterOrEqual') {
return new GreaterOrEqual(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'Smaller') {
return new Smaller(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'SmallerOrEqual') {
return new SmallerOrEqual(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
if ($typeofcomparison == 'NotIdentical') {
return new NotIdentical(
new FuncCall(
new Name($funcName),
[new Arg($constName)]
),
$node->right
);
}
}
/**
* Get nodes with check empty
*
* @param BooleanAnd $booleanAnd A BooleandAnd
* @return TwoNodeMatch|null
*/
private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch
{
return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
$booleanAnd,
// Function to check if we are in the case $conf->global->... == $value
function (Node $node): bool {
if (!$node instanceof Equal) {
return \false;
}
return $this->isGlobalVar($node->left);
},
// !empty(...) || isset(...)
function (Node $node): bool {
if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
return $this->isGlobalVar($node->expr->expr);
}
if (!$node instanceof Isset_) {
return $this->isGlobalVar($node);
}
return \true;
}
);
}
/**
* Check if node is a global access with format conf->global->XXX
*
* @param Node $node A node
* @return bool Return true if node is conf->global->XXX
*/
private function isGlobalVar($node)
{
if (!$node instanceof PropertyFetch) {
return false;
}
if (!$this->isName($node->var, 'global')) {
return false;
}
$global = $node->var;
if (!$global instanceof PropertyFetch) {
return false;
}
if (!$this->isName($global->var, 'conf')) {
return false;
}
return true;
}
/**
* @param Node $node Node to be parsed
* @return Node|void Return the name of the constant
*/
private function getConstName($node)
{
if ($node instanceof PropertyFetch && $node->name instanceof Node\Expr) {
return $node->name;
}
$name = $this->getName($node);
if (empty($name)) {
return;
}
return new String_($name);
}
}

View File

@@ -1,153 +0,0 @@
<?php
namespace Dolibarr\Rector\Renaming;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Scalar\String_;
use PhpParser\NodeTraverser;
use Rector\Core\PhpParser\Node\NodeFactory;
use Rector\Core\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* Class to refactor User rights
*/
class UserRightsToFunction extends AbstractRector
{
/**
* @param \Rector\Core\PhpParser\Node\NodeFactory $nodeFactory node factory
*/
public function __construct(NodeFactory $nodeFactory)
{
$this->nodeFactory = $nodeFactory;
}
/**
* @throws \Symplify\RuleDocGenerator\Exception\PoorDocumentationException
* @return RuleDefinition
*/
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change \$user->rights->module->permission to \$user->hasRight(\'module\', \'permission\')',
[new CodeSample(
'$user->rights->module->permission',
'$user->hasRight(\'module\', \'permission\')'
)]
);
}
/**
* Return a node type from https://github.com/rectorphp/php-parser-nodes-docs/
*
* @return string[]
*/
public function getNodeTypes(): array
{
return [
Node\Expr\Assign::class,
Node\Expr\PropertyFetch::class,
Node\Expr\BooleanNot::class,
Node\Expr\Empty_::class,
Node\Expr\Isset_::class,
Node\Stmt\ClassMethod::class
];
}
/**
* @param \PhpParser\Node $node node to be changed
* @return \PhpParser\Node|\PhpParser\Node[]|\PhpParser\Node\Expr\MethodCall|void|null| int
*/
public function refactor(Node $node)
{
if ($node instanceof Node\Stmt\ClassMethod) {
$excludeMethods = ['getrights', 'hasRight'];
/** @var \PHPStan\Analyser\MutatingScope $scope */
$scope = $node->getAttribute('scope');
$class = $scope->getClassReflection();
$classes = ['UserGroup', 'User'];
if (isset($class) && in_array($class->getName(), $classes)) {
if (in_array($this->getName($node), $excludeMethods)) {
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}
}
}
if ($node instanceof Node\Expr\Assign) {
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}
$isInverse = false;
if ($node instanceof Node\Expr\BooleanNot) {
if (!$node->expr instanceof Node\Expr\Empty_) {
return null;
}
$node = $node->expr->expr;
}
if ($node instanceof Node\Expr\Empty_) {
$node = $node->expr;
$isInverse = true;
}
if ($node instanceof Node\Expr\Isset_) {
// Take first arg for isset (No code found with multiple isset).
$node = $node->vars[0];
}
if (!$node instanceof Node\Expr\PropertyFetch) {
return;
}
$data = $this->getRights($node);
if (!isset($data)) {
return;
}
$args = [new Arg($data['module']), new Arg($data['perm1'])];
if (!empty($data['perm2'])) {
$args[] = new Arg($data['perm2']);
}
$method = $this->nodeFactory->createMethodCall($data['user'], 'hasRight', $args);
if ($isInverse) {
return new Node\Expr\BooleanNot($method);
}
return $method;
}
/**
* @param \PhpParser\Node\Expr\PropertyFetch $node node
* @return array|null
*/
private function getRights(Node\Expr\PropertyFetch $node)
{
$perm2 = '';
if (!$node->var instanceof Node\Expr\PropertyFetch) {
return null;
}
// Add a test to avoid rector error on html.formsetup.class.php
if (!$node->name instanceof Node\Expr\Variable && is_null($this->getName($node))) {
//var_dump($node);
return null;
//exit;
}
$perm1 = $node->name instanceof Node\Expr\Variable ? $node->name : new String_($this->getName($node));
$moduleNode = $node->var;
if (!$moduleNode instanceof Node\Expr\PropertyFetch) {
return null;
}
if (!$moduleNode->var instanceof Node\Expr\PropertyFetch) {
return null;
}
if (!$this->isName($moduleNode->var, 'rights')) {
$perm2 = $perm1;
$perm1 = $moduleNode->name instanceof Node\Expr\Variable ? $moduleNode->name : new String_($this->getName($moduleNode));
$moduleNode = $moduleNode->var;
}
$module = $moduleNode->name instanceof Node\Expr\Variable ? $moduleNode->name : new String_($this->getName($moduleNode));
$rights = $moduleNode->var;
if (!$this->isName($rights, 'rights') || !isset($perm1) || !isset($module)) {
return null;
}
if (!$rights->var instanceof Node\Expr\Variable) {
return null;
}
$user = $rights->var;
return compact('user', 'module', 'perm1', 'perm2');
}
}

146
dev/tools/spider.php Normal file
View File

@@ -0,0 +1,146 @@
#!/usr/bin/env php
<?php
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file dev/tools/spider.php
* \brief Script to spider Dolibarr app.
*
* To use it:
* - Disable module "bookmark"
* - Exclude param optioncss, token, sortfield, sortorder
*/
$crawledLinks=array();
const MAX_DEPTH=2;
/**
* @param string $url URL
* @param string $depth Depth
* @return string String
*/
function followLink($url, $depth = 0)
{
global $crawledLinks;
$crawling=array();
if ($depth>MAX_DEPTH) {
echo "<div style='color:red;'>The Crawler is giving up!</div>";
return;
}
$options=array(
'http'=>array(
'method'=>"GET",
'user-agent'=>"gfgBot/0.1\n"
)
);
$context=stream_context_create($options);
$doc=new DomDocument();
@$doc->loadHTML(file_get_contents($url, false, $context));
$links=$doc->getElementsByTagName('a');
$pageTitle=getDocTitle($doc, $url);
$metaData=getDocMetaData($doc);
foreach ($links as $i) {
$link=$i->getAttribute('href');
if (ignoreLink($link)) continue;
$link=convertLink($url, $link);
if (!in_array($link, $crawledLinks)) {
$crawledLinks[]=$link;
$crawling[]=$link;
insertIntoDatabase($link, $pageTitle, $metaData, $depth);
}
}
foreach ($crawling as $crawlURL)
followLink($crawlURL, $depth+1);
}
/**
* @param string $site Site
* @param string $path Path
* @return string String
*/
function convertLink($site, $path)
{
if (substr_compare($path, "//", 0, 2)==0)
return parse_url($site)['scheme'].$path;
elseif (substr_compare($path, "http://", 0, 7)==0
or substr_compare($path, "https://", 0, 8)==0
or substr_compare($path, "www.", 0, 4)==0
)
return $path;
else return $site.'/'.$path;
}
/**
* @param string $url URL
* @return boolean
*/
function ignoreLink($url)
{
return $url[0]=="#" or substr($url, 0, 11) == "javascript:";
}
/**
* @param string $link URL
* @param string $title Title
* @param string $metaData Array
* @param int $depth Depth
* @return void
*/
function insertIntoDatabase($link, $title, &$metaData, $depth)
{
//global $crawledLinks;
echo "Inserting new record {URL= ".$link.", Title = '$title', Description = '".$metaData['description']."', Keywords = ' ".$metaData['keywords']."'}<br/><br/><br/>";
//²$crawledLinks[]=$link;
}
/**
* @param string $doc Doc
* @param string $url URL
* @return string URL/Title
*/
function getDocTitle(&$doc, $url)
{
$titleNodes=$doc->getElementsByTagName('title');
if (count($titleNodes)==0 or !isset($titleNodes[0]->nodeValue))
return $url;
$title=str_replace('', '\n', $titleNodes[0]->nodeValue);
return (strlen($title)<1)?$url:$title;
}
/**
* @param string $doc Doc
* @return array Array
*/
function getDocMetaData(&$doc)
{
$metaData=array();
$metaNodes=$doc->getElementsByTagName('meta');
foreach ($metaNodes as $node)
$metaData[$node->getAttribute("name")] = $node->getAttribute("content");
if (!isset($metaData['description']))
$metaData['description']='No Description Available';
if (!isset($metaData['keywords'])) $metaData['keywords']='';
return array(
'keywords'=>str_replace('', '\n', $metaData['keywords']),
'description'=>str_replace('', '\n', $metaData['description'])
);
}
followLink("http://localhost/dolibarr_dev/htdocs");

View File

@@ -1,5 +1,4 @@
<?php
//============================================================+
// File name : example_016.php
// Begin : 2008-03-04

View File

@@ -1,5 +1,4 @@
<?php
// This source file must be UTF-8 encoded
/*
$filename='filewithé';

View File

@@ -74,6 +74,7 @@ class autoTranslator
*/
private function parseRefLangTranslationFiles()
{
$files = $this->getTranslationFilesArray($this->_refLang);
$counter = 1;
foreach ($files as $file) {
@@ -240,7 +241,7 @@ class autoTranslator
if ($this->_outputpagecode == 'UTF-8') {
$val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
} else {
$val=mb_convert_encoding($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)), 'ISO-8859-1');
$val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
}
}
@@ -275,7 +276,7 @@ class autoTranslator
private function getLineValue($line)
{
$arraykey = explode('=', $line, 2);
return trim(isset($arraykey[1]) ? $arraykey[1] : '');
return trim(isset($arraykey[1])?$arraykey[1]:'');
}
/**
@@ -333,8 +334,8 @@ class autoTranslator
//print "Url to translate: ".$url."\n";
if (! function_exists("curl_init")) {
print "Error, your PHP does not support curl functions.\n";
die();
print "Error, your PHP does not support curl functions.\n";
die();
}
$ch = curl_init();

View File

@@ -210,8 +210,7 @@ foreach ($dups as $string => $pages) {
$inadmin=0;
foreach ($pages as $file => $lines) {
if ($file == 'main.lang') {
$inmain=1;
$inadmin=0;
$inmain=1; $inadmin=0;
}
if ($file == 'admin.lang' && ! $inmain) {
$inadmin=1;
@@ -569,16 +568,16 @@ if ((!empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($ar
if (empty($unused)) {
print "No string not used found.\n";
} else {
$filetosave='/tmp/'.($argv[2] ? $argv[2] : "").'notused.lang';
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
file_put_contents($filetosave, implode("", $unused));
print "To remove from original file, run command :\n";
if (($argv[2] ? $argv[2] : "")) {
print 'cd htdocs/langs/en_US; mv '.($argv[2] ? $argv[2] : "")." ".($argv[2] ? $argv[2] : "").".tmp; ";
if (($argv[2]?$argv[2]:"")) {
print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; ";
}
print "diff ".($argv[2] ? $argv[2] : "").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2] ? $argv[2] : "");
if (($argv[2] ? $argv[2] : "")) {
print "; rm ".($argv[2] ? $argv[2] : "").".tmp;\n";
print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:"");
if (($argv[2]?$argv[2]:"")) {
print "; rm ".($argv[2]?$argv[2]:"").".tmp;\n";
}
}
}

View File

@@ -58,10 +58,10 @@ $rc = 0;
// Get and check arguments
$lPrimary = isset($argv[1]) ? $argv[1] : '';
$lSecondary = isset($argv[2]) ? $argv[2] : '';
$lPrimary = isset($argv[1])?$argv[1]:'';
$lSecondary = isset($argv[2])?$argv[2]:'';
$lEnglish = 'en_US';
$filesToProcess = isset($argv[3]) ? $argv[3] : '';
$filesToProcess = isset($argv[3])?$argv[3]:'';
if (empty($lPrimary) || empty($lSecondary) || empty($filesToProcess)) {
$rc = 1;
@@ -272,16 +272,7 @@ foreach ($filesToProcess as $fileToProcess) {
// key is redundant
if (array_key_exists($key, $aPrimary)) {
print "Key $key is redundant in file $lPrimaryFile (line: $cnt)";
if (!empty($fileFirstFound[$key])) {
print " - Already found into ".$fileFirstFound[$key];
print " (line: ".$lineFirstFound[$key].").\n";
} else {
$fileFirstFound[$key] = $fileToProcess;
$lineFirstFound[$key] = $cnt;
print " - Already found into main file.\n";
}
print "Key $key is redundant in file $lPrimaryFile (line: $cnt) - Already found into ".$fileFirstFound[$key]." (line: ".$lineFirstFound[$key].").\n";
continue;
} else {
$fileFirstFound[$key] = $fileToProcess;
@@ -317,7 +308,7 @@ foreach ($filesToProcess as $fileToProcess) {
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
) {
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
fwrite($oh, $key."=".(empty($aSecondary[$key]) ? $aPrimary[$key] : $aSecondary[$key])."\n");
fwrite($oh, $key."=".(empty($aSecondary[$key])?$aPrimary[$key]:$aSecondary[$key])."\n");
}
}
if (! feof($handle)) {

1
htdocs/.gitignore vendored
View File

@@ -24,4 +24,5 @@
/abricot*
/nomenclature*
/of/
/workstation/
/oblyon*

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@@ -39,7 +39,7 @@ $id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$massaction = GETPOST('massaction', 'aZ09');
$optioncss = GETPOST('optioncss', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountingaccountlist'; // To manage different context of search
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingaccountlist'; // To manage different context of search
$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
$search_account = GETPOST('search_account', 'alpha');
@@ -49,7 +49,7 @@ $search_accountparent = GETPOST('search_accountparent', 'alpha');
$search_pcgtype = GETPOST('search_pcgtype', 'alpha');
$search_import_key = GETPOST('search_import_key', 'alpha');
$toselect = GETPOST('toselect', 'array');
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$confirm = GETPOST('confirm', 'alpha');
$chartofaccounts = GETPOST('chartofaccounts', 'int');
@@ -66,7 +66,7 @@ if (!$user->hasRight('accounting', 'chartofaccount')) {
}
// Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
@@ -111,8 +111,7 @@ $hookmanager->initHooks(array('accountancyadminaccount'));
*/
if (GETPOST('cancel', 'alpha')) {
$action = 'list';
$massaction = '';
$action = 'list'; $massaction = '';
}
if (!GETPOST('confirmmassaction', 'alpha')) {
$massaction = '';
@@ -144,13 +143,10 @@ if (empty($reshook)) {
$search_labelshort = "";
$search_accountparent = "";
$search_pcgtype = "";
$search_import_key = "";
$search_array_options = array();
}
if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on
|| (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != getDolGlobalInt('CHARTOFACCOUNTS'))) { // a submit of form is done and chartofaccounts combo has been modified
$error = 0;
if ($chartofaccounts > 0 && $permissiontoadd) {
// Get language code for this $chartofaccounts
$sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_country as c, '.MAIN_DB_PREFIX.'accounting_system as a';
@@ -158,9 +154,7 @@ if (empty($reshook)) {
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
if ($obj) {
$country_code = $obj->code;
}
$country_code = $obj->code;
} else {
dol_print_error($db);
}
@@ -223,15 +217,14 @@ if (empty($reshook)) {
/*
* View
*/
$form = new Form($db);
$formaccounting = new FormAccounting($db);
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $langs->trans("ListAccounts"), $help_url);
llxHeader('', $langs->trans("ListAccounts"));
if ($action == 'delete') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);
print $formconfirm;
}
@@ -240,24 +233,11 @@ $pcgver = getDolGlobalInt('CHARTOFACCOUNTS');
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.account_parent, aa.label, aa.labelshort, aa.fk_accounting_category,";
$sql .= " aa.reconcilable, aa.active, aa.import_key,";
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql = preg_replace('/,\s*$/', '', $sql);
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".((int) $conf->entity);
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".((int) $conf->entity);
// Add table from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " WHERE asy.rowid = ".((int) $pcgver);
//print $sql;
if (strlen(trim($search_account))) {
$lengthpaddingaccount = 0;
if (getDolGlobalInt('ACCOUNTING_LENGTH_GACCOUNT') || getDolGlobalInt('ACCOUNTING_LENGTH_AACCOUNT')) {
@@ -280,7 +260,7 @@ if (strlen(trim($search_account))) {
$search_account_tmp_clean = $search_account_tmp;
$search_account_clean = $search_account;
$startchar = '%';
if (substr($search_account_tmp, 0, 1) === '^') {
if (strpos($search_account_tmp, '^') === 0) {
$startchar = '';
$search_account_tmp_clean = preg_replace('/^\^/', '', $search_account_tmp);
$search_account_clean = preg_replace('/^\^/', '', $search_account);
@@ -304,15 +284,6 @@ if (strlen(trim($search_accountparent)) && $search_accountparent != '-1') {
if (strlen(trim($search_pcgtype))) {
$sql .= natural_search("aa.pcg_type", $search_pcgtype);
}
if (strlen(trim($search_import_key))) {
$sql .= natural_search("aa.import_key", $search_import_key);
}
// 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;
$sql .= $db->order($sortfield, $sortorder);
//print $sql;
@@ -327,6 +298,16 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
}
}
// List of mass actions available
if ($user->hasRight('accounting', 'chartofaccount')) {
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
}
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
$arrayofmassactions = array();
}
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$arrayofselected = is_array($toselect) ? $toselect : array();
$sql .= $db->plimit($limit + 1, $offset);
dol_syslog('accountancy/admin/account.php:: $sql='.$sql);
@@ -335,8 +316,6 @@ $resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$arrayofselected = is_array($toselect) ? $toselect : array();
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
@@ -359,18 +338,13 @@ if ($resql) {
if ($search_pcgtype) {
$param .= '&search_pcgtype='.urlencode($search_pcgtype);
}
if ($search_import_key) {
if ($optioncss != '') {
$param .= '&search_import_key='.urlencode($search_import_key);
}
if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss);
}
// 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;
if (!empty($conf->use_javascript_ajax)) {
print '<!-- Add javascript to reload page when we click "Change plan" -->
<script type="text/javascript">
@@ -384,19 +358,7 @@ if ($resql) {
</script>';
}
// List of mass actions available
if ($user->hasRight('accounting', 'chartofaccount')) {
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
}
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
$arrayofmassactions = array();
}
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$newcardbutton = '';
$newcardbutton = dolGetButtonTitle($langs->trans('Addanaccount'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/accountancy/admin/card.php?action=create', '', $permissiontoadd);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') {
@@ -409,9 +371,9 @@ if ($resql) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accounting_account', 0, $newcardbutton, '', $limit, 0, 0, 1);
$newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accounting_account', 0, $newcardbutton, '', $limit, 0, 0, 1);
// Box to select active chart of account
print $langs->trans("Selectchartofaccounts")." : ";
@@ -429,11 +391,11 @@ if ($resql) {
print '<option value="-1">&nbsp;</option>';
while ($i < $numbis) {
$obj = $db->fetch_object($resqlchart);
if ($obj) {
print '<option value="'.$obj->rowid.'"';
print ($pcgver == $obj->rowid) ? ' selected' : '';
print '>'.$obj->pcg_version.' - '.$obj->label.' - ('.$obj->country_code.')</option>';
}
print '<option value="'.$obj->rowid.'"';
print ($pcgver == $obj->rowid) ? ' selected' : '';
print '>'.$obj->pcg_version.' - '.$obj->label.' - ('.$obj->country_code.')</option>';
$i++;
}
} else {
@@ -445,8 +407,8 @@ if ($resql) {
print '<br>';
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $accounting, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '<br>';
@@ -456,11 +418,6 @@ if ($resql) {
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
$moreforfilter = '';
if ($moreforfilter) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</div>';
}
$accountstatic = new AccountingAccount($db);
$accountparent = new AccountingAccount($db);
@@ -470,14 +427,12 @@ if ($resql) {
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
// Fields title search
// --------------------------------------------------------------------
// Line for search fields
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center maxwidthsearch">';
$searchpicto = $form->showFilterButtons('left');
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
@@ -503,17 +458,11 @@ if ($resql) {
if (!empty($arrayfields['categories']['checked'])) {
print '<td class="liste_titre"></td>';
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Import key
if (!empty($arrayfields['aa.import_key']['checked'])) {
print '<td class="liste_titre"><input type="text" class="flat width75" name="search_import_key" value="'.$search_import_key.'"></td>';
}
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print '<td class="liste_titre">&nbsp;</td>';
}
@@ -523,77 +472,52 @@ if ($resql) {
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center maxwidthsearch">';
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print '</tr>'."\n";
$totalarray = array();
$totalarray['nbfield'] = 0;
// Fields title label
// --------------------------------------------------------------------
print '</tr>';
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch actioncolumn ');
$totalarray['nbfield']++;
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['aa.account_number']['checked'])) {
print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.label']['checked'])) {
print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"], "aa.label", "", $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.labelshort']['checked'])) {
print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.account_parent']['checked'])) {
print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['aa.pcg_type']['checked'])) {
print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['categories']['checked'])) {
print_liste_field_titre($arrayfields['categories']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '', $arrayfields['categories']['help'], 1);
$totalarray['nbfield']++;
}
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['aa.import_key']['checked'])) {
print_liste_field_titre($arrayfields['aa.import_key']['label'], $_SERVER["PHP_SELF"], 'aa.import_key', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.import_key']['help'], 1);
$totalarray['nbfield']++;
}
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['aa.active']['checked'])) {
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
$totalarray['nbfield']++;
}
print "</tr>\n";
// Loop on record
// --------------------------------------------------------------------
$i = 0;
while ($i < min($num, $limit)) {
$obj = $db->fetch_object($resql);
@@ -707,11 +631,6 @@ if ($resql) {
}
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, '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;
// Import id
if (!empty($arrayfields['aa.import_key']['checked'])) {
print "<td>";
@@ -722,8 +641,8 @@ if ($resql) {
}
}
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
// Activated or not reconciliation on an accounting account
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
// Activated or not reconciliation on accounting account
if (!empty($arrayfields['aa.reconcilable']['checked'])) {
print '<td class="center">';
if (empty($obj->reconcilable)) {
@@ -800,16 +719,9 @@ if ($resql) {
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
}
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>'."\n";
print '</form>'."\n";
print "</table>";
print "</div>";
print '</form>';
} else {
dol_print_error($db);
}

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