From f653f5c96c3d83d8d7775f791575a0e0d57352c0 Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Mon, 29 May 2023 09:02:49 +0200 Subject: [PATCH 01/20] Fix multicurrency payments' currency quoting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PostgreSQL imposes single-quoting around strings; double-quotes cast to column names Fixes a0d9419be5cb766db6b8d3f9f47ba1322d1196e1 --- htdocs/fourn/class/paiementfourn.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 88f0ce47d4e..1a90e971df3 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -270,7 +270,7 @@ class PaiementFourn extends Paiement if (is_numeric($amount) && $amount <> 0) { $amount = price2num($amount); $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn_facturefourn (fk_facturefourn, fk_paiementfourn, amount, multicurrency_amount, multicurrency_code, multicurrency_tx)'; - $sql .= " VALUES (".((int) $facid).", ".((int) $this->id).", ".((float) $amount).', '.((float) $this->multicurrency_amounts[$key]).', '.($currencyofpayment ? '"'.$this->db->escape($currencyofpayment).'"' : 'NULL').', '.(!empty($currencytxofpayment) ? (double) $currencytxofpayment : 1).')'; + $sql .= " VALUES (".((int) $facid).", ".((int) $this->id).", ".((float) $amount).', '.((float) $this->multicurrency_amounts[$key]).', '.($currencyofpayment ? "'".$this->db->escape($currencyofpayment)."'" : 'NULL').', '.(!empty($currencytxofpayment) ? (double) $currencytxofpayment : 1).')'; $resql = $this->db->query($sql); if ($resql) { $invoice = new FactureFournisseur($this->db); From 9f54a981be57dc634e9e7ab66ada1cd04d9d523a Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 30 May 2023 03:45:33 +0200 Subject: [PATCH 02/20] FIX Accountancy - Balance - Date param --- htdocs/accountancy/bookkeeping/balance.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 1670776ab6e..a8ab24f65f5 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -161,11 +161,11 @@ if (empty($reshook)) { if (!empty($search_date_start)) { $filter['t.doc_date>='] = $search_date_start; - $param .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int'); + $param .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int'); } if (!empty($search_date_end)) { $filter['t.doc_date<='] = $search_date_end; - $param .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int'); + $param .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int'); } if (!empty($search_doc_date)) { $filter['t.doc_date'] = $search_doc_date; @@ -177,7 +177,7 @@ if (empty($reshook)) { } else { $filter['t.numero_compte>='] = $search_accountancy_code_start; } - $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); + $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); } if (!empty($search_accountancy_code_end)) { if ($type == 'sub') { @@ -185,7 +185,7 @@ if (empty($reshook)) { } else { $filter['t.numero_compte<='] = $search_accountancy_code_end; } - $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); + $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); } if (!empty($search_ledger_code)) { $filter['t.code_journal'] = $search_ledger_code; From 5d2be9b475d9f9374bd2a00d673297af13d200a0 Mon Sep 17 00:00:00 2001 From: Jyhere Date: Tue, 30 May 2023 11:33:55 +0200 Subject: [PATCH 03/20] FIX: ref and label filters are not working on stocktodate page --- htdocs/product/stock/stockatdate.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index 8a97d2f8478..ec8e3024a8f 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -289,6 +289,12 @@ if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { if (!empty($canvas)) { $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; } +if ($search_ref) { + $sql .= " AND p.ref LIKE '%{$db->escape($search_ref)}%'"; +} +if ($search_nom) { + $sql .= " AND p.label LIKE '%{$db->escape($search_nom)}%'"; +} $sql .= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price, p.pmp, p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,'; $sql .= ' p.tms, p.duration, p.tobuy, p.stock'; // Add where from hooks From 121b707f45cd56252e7c9d7e8add2747c3fc176f Mon Sep 17 00:00:00 2001 From: Jyhere Date: Tue, 30 May 2023 11:40:00 +0200 Subject: [PATCH 04/20] FIX: name and ref should use naturalsearch function --- htdocs/product/stock/stockatdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index ec8e3024a8f..7d9fce8aa48 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -290,10 +290,10 @@ if (!empty($canvas)) { $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; } if ($search_ref) { - $sql .= " AND p.ref LIKE '%{$db->escape($search_ref)}%'"; + $sql .= natural_search('p.ref', $search_ref); } if ($search_nom) { - $sql .= " AND p.label LIKE '%{$db->escape($search_nom)}%'"; + $sql .= natural_search('p.label', $search_nom); } $sql .= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price, p.pmp, p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,'; $sql .= ' p.tms, p.duration, p.tobuy, p.stock'; From 20d89770d11bac107c8c843badba12f9707d75bf Mon Sep 17 00:00:00 2001 From: Roger Dueck Date: Tue, 30 May 2023 09:20:41 -0600 Subject: [PATCH 05/20] Fix undefined variable & array key warnings in forgotten password code" --- htdocs/core/tpl/passwordforgotten.tpl.php | 2 +- htdocs/user/passwordforgotten.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 6a54ee53e79..f2e72ef4fd2 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -27,7 +27,7 @@ if (empty($conf) || !is_object($conf)) { } // DDOS protection -$size = (int) $_SERVER['CONTENT_LENGTH']; +$size = (int) ($_SERVER['CONTENT_LENGTH'] ?? 0); if ($size > 10000) { $langs->loadLangs(array("errors", "install")); httponly_accessforbidden('
'.$langs->trans("ErrorRequestTooLarge").'
'.$langs->trans("ClickHereToGoToApp").'
', 413, 1); diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 0298c6614fd..ad66bc5987a 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -84,7 +84,7 @@ $parameters = array('username' => $username); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { $message = $hookmanager->error; -} +} else $message = ''; if (empty($reshook)) { // Validate new password From ce923ee9e01d96aea67097883547d0b4eeb1928c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 09:19:02 +0200 Subject: [PATCH 06/20] Doc --- htdocs/install/check.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 0e255969ee8..27cd0da3dd3 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -171,7 +171,7 @@ if (!function_exists("easter_date")) { print 'Ok '.$langs->trans("PHPSupport", "Calendar")."
\n"; } -// Check if Curl is supported +// Check if Xml is supported if (!function_exists("simplexml_load_string")) { $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupport", "Xml")."
\n"; @@ -200,7 +200,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc } } -// Check if Curl is supported +// Check if Imap is supported if (!function_exists("imap_open")) { $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupport", "IMAP")."
\n"; @@ -209,6 +209,7 @@ if (!function_exists("imap_open")) { print 'Ok '.$langs->trans("PHPSupport", "IMAP")."
\n"; } +// Check if Zip is supported if (!class_exists('ZipArchive')) { $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."
\n"; From c61d96c98f576fd38b324c06b56238495f0a841c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 09:31:22 +0200 Subject: [PATCH 07/20] put phpmin info in one place --- htdocs/core/class/commondocgenerator.class.php | 6 ++++++ .../modules/asset/doc/doc_generic_asset_odt.modules.php | 7 ------- .../core/modules/asset/doc/pdf_standard_asset.modules.php | 6 ------ .../core/modules/bom/doc/doc_generic_bom_odt.modules.php | 6 ------ .../modules/commande/doc/doc_generic_order_odt.modules.php | 6 ------ .../core/modules/commande/doc/pdf_eratosthene.modules.php | 6 ------ .../contract/doc/doc_generic_contract_odt.modules.php | 6 ------ htdocs/core/modules/contract/doc/pdf_strato.modules.php | 6 ------ htdocs/core/modules/delivery/doc/pdf_storm.modules.php | 6 ------ htdocs/core/modules/delivery/doc/pdf_typhon.modules.php | 6 ------ .../expedition/doc/doc_generic_shipment_odt.modules.php | 6 ------ htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 6 ------ htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 6 ------ htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 6 ------ .../modules/expensereport/doc/pdf_standard.modules.php | 6 ------ .../facture/doc/doc_generic_invoice_odt.modules.php | 6 ------ htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 6 ------ htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 6 ------ htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 6 ------ .../modules/member/doc/doc_generic_member_odt.class.php | 6 ------ htdocs/core/modules/movement/doc/pdf_standard.modules.php | 6 ------ htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php | 6 ------ htdocs/core/modules/mrp/doc/pdf_vinci.modules.php | 6 ------ .../product/doc/doc_generic_product_odt.modules.php | 6 ------ htdocs/core/modules/product/doc/pdf_standard.modules.php | 6 ------ .../project/doc/doc_generic_project_odt.modules.php | 6 ------ htdocs/core/modules/project/doc/pdf_baleine.modules.php | 6 ------ htdocs/core/modules/project/doc/pdf_beluga.modules.php | 6 ------ htdocs/core/modules/project/doc/pdf_timespent.modules.php | 6 ------ .../project/task/doc/doc_generic_task_odt.modules.php | 6 ------ .../propale/doc/doc_generic_proposal_odt.modules.php | 6 ------ htdocs/core/modules/propale/doc/pdf_azur.modules.php | 6 ------ htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 6 ------ .../reception/doc/doc_generic_reception_odt.modules.php | 6 ------ .../core/modules/societe/doc/doc_generic_odt.modules.php | 7 ------- .../modules/stock/doc/doc_generic_stock_odt.modules.php | 7 ------- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 6 ------ .../core/modules/stocktransfer/doc/pdf_eagle.modules.php | 6 ------ .../stocktransfer/doc/pdf_eagle_proforma.modules.php | 6 ------ .../doc/doc_generic_supplier_invoice_odt.modules.php | 6 ------ .../modules/supplier_invoice/doc/pdf_canelle.modules.php | 6 ------ .../doc/doc_generic_supplier_order_odt.modules.php | 6 ------ .../core/modules/supplier_order/doc/pdf_cornas.modules.php | 6 ------ .../modules/supplier_order/doc/pdf_muscadet.modules.php | 6 ------ .../modules/supplier_payment/doc/pdf_standard.modules.php | 6 ------ .../doc/doc_generic_supplier_proposal_odt.modules.php | 6 ------ .../modules/supplier_proposal/doc/pdf_aurore.modules.php | 6 ------ .../modules/ticket/doc/doc_generic_ticket_odt.modules.php | 6 ------ .../core/modules/user/doc/doc_generic_user_odt.modules.php | 6 ------ .../usergroup/doc/doc_generic_usergroup_odt.modules.php | 6 ------ 50 files changed, 6 insertions(+), 297 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 11f2fca8226..4c0fda9cae0 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -106,6 +106,12 @@ abstract class CommonDocGenerator public $emetteur; + /** + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 7.1 = array(7, 1) + */ + public $phpmin = array(7, 1); + /** * @var array Array of columns */ diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index a68b8fd2354..e281be6ff44 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -46,18 +46,11 @@ class doc_generic_asset_odt extends ModelePDFAsset */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ public $version = 'dolibarr'; - /** * Constructor * diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index d62a1eb6ada..75fb8025e42 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -68,12 +68,6 @@ class pdf_standard_asset extends ModelePDFAsset */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index d34844f14f2..ede4554e98a 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -46,12 +46,6 @@ class doc_generic_bom_odt extends ModelePDFBom */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 9172115903b..c4ecbee453c 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -46,12 +46,6 @@ class doc_generic_order_odt extends ModelePDFCommandes */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index ccb68a003bb..458cc39dd27 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -72,12 +72,6 @@ class pdf_eratosthene extends ModelePDFCommandes */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index aec1a96109a..a7cb5ada26c 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -44,12 +44,6 @@ class doc_generic_contract_odt extends ModelePDFContract */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 2f434af93a6..fe6f77b9b9a 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -70,12 +70,6 @@ class pdf_strato extends ModelePDFContract */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index c84c9b7e6a0..fc55f6fe0f3 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -64,12 +64,6 @@ class pdf_storm extends ModelePDFDeliveryOrder */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index af2fda0f7a8..31c46438992 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -63,12 +63,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index bf264b45c94..6b7998a121c 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -46,12 +46,6 @@ class doc_generic_shipment_odt extends ModelePdfExpedition */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 9592330da2e..297013ed8ac 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -61,12 +61,6 @@ class pdf_espadon extends ModelePdfExpedition */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 130608be433..1d8e0c3f19e 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -62,12 +62,6 @@ class pdf_merou extends ModelePdfExpedition */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index f7c6599647b..11635c6511b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -62,12 +62,6 @@ class pdf_rouget extends ModelePdfExpedition */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 5568cd28840..b8a58d3b517 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -69,12 +69,6 @@ class pdf_standard extends ModeleExpenseReport */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index cc9bc723635..f1e30925d3f 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -45,12 +45,6 @@ class doc_generic_invoice_odt extends ModelePDFFactures */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c55b6ce36bc..7941815ee24 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -69,12 +69,6 @@ class pdf_crabe extends ModelePDFFactures */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 6a9877fbe3d..fbf1907ec7d 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -70,12 +70,6 @@ class pdf_sponge extends ModelePDFFactures */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index cd1cdf48f5e..d42f85cb3cf 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -64,12 +64,6 @@ class pdf_soleil extends ModelePDFFicheinter */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index f38f61e6d8a..b8cdb48a02f 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -41,12 +41,6 @@ class doc_generic_member_odt extends ModelePDFMember */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index 2d7a7e8f9fc..abdb0cc24af 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -62,12 +62,6 @@ class pdf_standard extends ModelePDFMovement */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index 2f0c11d0649..ee0532fd949 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -46,12 +46,6 @@ class doc_generic_mo_odt extends ModelePDFMo */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index a36234b1026..e4d46662197 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -67,12 +67,6 @@ class pdf_vinci extends ModelePDFMo */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index ba98d74fb3f..1d5116addba 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -43,12 +43,6 @@ class doc_generic_product_odt extends ModelePDFProduct */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index b244f01e0fa..afcb9503997 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -57,12 +57,6 @@ class pdf_standard extends ModelePDFProduct */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 853060f3b2c..e3f2a54c6bc 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -83,12 +83,6 @@ class doc_generic_project_odt extends ModelePDFProjects */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 06f6e400b75..0a048837d7a 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -63,12 +63,6 @@ class pdf_baleine extends ModelePDFProjects */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 525c3bd2ece..b4ee7ec83b0 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -79,12 +79,6 @@ class pdf_beluga extends ModelePDFProjects */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 31a8127f733..c00ae37ab22 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -62,12 +62,6 @@ class pdf_timespent extends ModelePDFProjects */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 96a5b75c626..fe87287cf54 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -82,12 +82,6 @@ class doc_generic_task_odt extends ModelePDFTask */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 8a35edc7968..853329481fe 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -44,12 +44,6 @@ class doc_generic_proposal_odt extends ModelePDFPropales */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 093a8c5b6be..de872e9e43c 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -73,12 +73,6 @@ class pdf_azur extends ModelePDFPropales */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 24ccb210f12..0870e860d16 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -66,12 +66,6 @@ class pdf_cyan extends ModelePDFPropales */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 463a794faee..76335afc7b5 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -41,12 +41,6 @@ class doc_generic_reception_odt extends ModelePdfReception */ public $emetteur; // Objet societe qui emet - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index e8d6c8317dc..c052401203c 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -42,13 +42,6 @@ class doc_generic_odt extends ModeleThirdPartyDoc */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - - /** * Constructor * diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 4ce652dd55b..612aa787dce 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -43,18 +43,11 @@ class doc_generic_stock_odt extends ModelePDFStock */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ public $version = 'dolibarr'; - /** * Constructor * diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index a5c1d87691d..338d81edc44 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -58,12 +58,6 @@ class pdf_standard extends ModelePDFStock */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index 449bd69f17d..e9bcdad28b3 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -59,12 +59,6 @@ class pdf_eagle extends ModelePdfStockTransfer */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 123048bbb2d..69c1ed27a51 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -68,12 +68,6 @@ class pdf_eagle_proforma extends ModelePDFCommandes */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php index 41ce5795ae6..94bb2d9fc0c 100644 --- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php @@ -47,12 +47,6 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices */ public $issuer; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index e0a4e0694dd..39d2074d8e6 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -63,12 +63,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index 8e40a21a1e4..a305403d6a6 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -47,12 +47,6 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders */ public $issuer; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * @var string Dolibarr version of the loaded document */ diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index c6e8434c955..cf94376b285 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -66,12 +66,6 @@ class pdf_cornas extends ModelePDFSuppliersOrders */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 31cee8d94ed..1206d91a794 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -66,12 +66,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index bede0cc948e..ec3ec568a30 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -64,12 +64,6 @@ class pdf_standard extends ModelePDFSuppliersPayments */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 6a8ecbc28c6..fd71e68e003 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -44,12 +44,6 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 95b661364ad..046c72cd06b 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -63,12 +63,6 @@ class pdf_aurore extends ModelePDFSupplierProposal */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index de316dbc4b1..2d9f9a9e9ae 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -41,12 +41,6 @@ class doc_generic_ticket_odt extends ModelePDFTicket */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 81328821261..f1a7ca0f2a3 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -41,12 +41,6 @@ class doc_generic_user_odt extends ModelePDFUser */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 5ff9d4c8526..7c86061b057 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -44,12 +44,6 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup */ public $emetteur; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string From 3d6c899de2937f11bda9d1fe9c9e029ebb3a928e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 09:32:51 +0200 Subject: [PATCH 08/20] put phpmin info in one place --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 20e738f14c8..9f8008dda11 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -72,12 +72,6 @@ class pdf_einstein extends ModelePDFCommandes */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 7.0 = array(7, 0) - */ - public $phpmin = array(7, 0); - /** * Dolibarr version of the loaded document * @var string From 544e82b60c1d2600cbdaaa44b8b731b8bf6cc470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 13:35:47 +0200 Subject: [PATCH 09/20] fix picto tooltip --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 2f58c5576c7..1c0e1dd3a34 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3753,7 +3753,7 @@ class Commande extends CommonOrder if ($user->hasRight('commande', 'lire')) { $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("Order").''; if (isset($this->statut)) { - $datas[] = ' '.$this->getLibStatut(5); + $datas['picto'] .= ' '.$this->getLibStatut(5); } $datas['Ref'] = '
'.$langs->trans('Ref').': '.$this->ref; if (!$nofetch) { From 8c0f7f4b65e8c65b7d673d41fc32e394ba7e261b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 13:53:41 +0200 Subject: [PATCH 10/20] Update commande.class.php --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 1c0e1dd3a34..bb162e3c835 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3753,7 +3753,7 @@ class Commande extends CommonOrder if ($user->hasRight('commande', 'lire')) { $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("Order").''; if (isset($this->statut)) { - $datas['picto'] .= ' '.$this->getLibStatut(5); + $datas['status'] = ' '.$this->getLibStatut(5); } $datas['Ref'] = '
'.$langs->trans('Ref').': '.$this->ref; if (!$nofetch) { From 2752154f9bfdf0a7b6658b294926eed7513af588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 13:56:41 +0200 Subject: [PATCH 11/20] Update propal.class.php --- htdocs/comm/propal/class/propal.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b3f3d387df3..d7fb02e14f3 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3721,6 +3721,7 @@ class Propal extends CommonObject { global $conf, $langs, $user; + $langs->load('propal'); $datas = []; $nofetch = !empty($params['nofetch']); From 8d3f1ca9c22691349063fff7f5eaa3a17a4bb2fd Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 31 May 2023 15:15:26 +0200 Subject: [PATCH 12/20] Remove unexisting massaction --- htdocs/commande/list_det.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 166afaeb5b3..7af49aae108 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -813,7 +813,7 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array( - 'GenerateOrdersSuppliers'=>img_picto('', 'doc', 'class="pictofixedwidth"').$langs->trans("GenerateOrdersSupplie"), + // TODO add mass action here ); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); From 44996553a0684ca1426055033237cb3df71393de Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 31 May 2023 15:36:29 +0200 Subject: [PATCH 13/20] get shippable status for line, so you know which line is shippable (no need to loop order lines) --- htdocs/commande/list_det.php | 130 +++++++++++++++++------------------ 1 file changed, 63 insertions(+), 67 deletions(-) diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 7af49aae108..8c1b78ae863 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1995,83 +1995,79 @@ if ($resql) { print ''; if (!empty($show_shippable_command) && !empty($conf->stock->enabled)) { if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) { - $generic_commande->getLinesArray(); // Load array ->lines $generic_commande->loadExpeditions(); // Load array ->expeditions - $numlines = count($generic_commande->lines); // Loop on each line of order - for ($lig = 0; $lig < $numlines; $lig++) { - if (isset($generic_commande->expeditions[$generic_commande->lines[$lig]->id])) { - $reliquat = $generic_commande->lines[$lig]->qty - $generic_commande->expeditions[$generic_commande->lines[$lig]->id]; + if (isset($generic_commande->expeditions[$obj->rowid])) { + $reliquat = $obj->qty - $generic_commande->expeditions[$obj->rowid]; + } else { + $reliquat = $obj->qty; + } + if ($obj->product_type == 0 && $obj->fk_product > 0) { // If line is a product and not a service + $nbprod++; // order contains real products + $generic_product->id = $obj->fk_product; + + // Get local and virtual stock and store it into cache + if (empty($productstat_cache[$obj->fk_product])) { + $generic_product->load_stock('nobatch'); // ->load_virtual_stock() is already included into load_stock() + $productstat_cache[$obj->fk_product]['stock_reel'] = $generic_product->stock_reel; + $productstat_cachevirtual[$obj->fk_product]['stock_reel'] = $generic_product->stock_theorique; } else { - $reliquat = $generic_commande->lines[$lig]->qty; + $generic_product->stock_reel = $productstat_cache[$obj->fk_product]['stock_reel']; + $generic_product->stock_theorique = $productstat_cachevirtual[$obj->fk_product]['stock_reel'] = $generic_product->stock_theorique; } - if ($generic_commande->lines[$lig]->product_type == 0 && $generic_commande->lines[$lig]->fk_product > 0) { // If line is a product and not a service - $nbprod++; // order contains real products - $generic_product->id = $generic_commande->lines[$lig]->fk_product; - // Get local and virtual stock and store it into cache - if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) { - $generic_product->load_stock('nobatch'); // ->load_virtual_stock() is already included into load_stock() - $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel; - $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; - } else { - $generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel']; - $generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; - } - - if ($reliquat > $generic_product->stock_reel) { - $notshippable++; - } - if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { // Default code. Default should be this case. - $text_info .= $reliquat.' x '.$generic_commande->lines[$lig]->product_ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 20); - $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel.''; - $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique.''; - $text_info .= ($reliquat != $generic_commande->lines[$lig]->qty ? ' ('.$langs->trans("QtyInOtherShipments").' '.($generic_commande->lines[$lig]->qty - $reliquat).')' : ''); - $text_info .= '
'; - } else { // BUGGED CODE. - // DOES NOT TAKE INTO ACCOUNT MANUFACTURING. THIS CODE SHOULD BE USELESS. PREVIOUS CODE SEEMS COMPLETE. - // COUNT STOCK WHEN WE SHOULD ALREADY HAVE VALUE - // Detailed virtual stock, looks bugged, uncomplete and need heavy load. - // stock order and stock order_supplier - $stock_order = 0; - $stock_order_supplier = 0; - if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { // What about other options ? - if (!empty($conf->commande->enabled)) { - if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { - $generic_product->load_stats_commande(0, '1,2'); - $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; - } else { - $generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer']; - } - $stock_order = $generic_product->stats_commande['qty']; + if ($reliquat > $generic_product->stock_reel) { + $notshippable++; + } + if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { // Default code. Default should be this case. + $text_info .= $reliquat.' x '.$obj->product_ref.' '.dol_trunc($obj->product_label, 20); + $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel.''; + $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique.''; + $text_info .= ($reliquat != $obj->qty ? ' ('.$langs->trans("QtyInOtherShipments").' '.($obj->qty - $reliquat).')' : ''); + $text_info .= '
'; + } else { // BUGGED CODE. + // DOES NOT TAKE INTO ACCOUNT MANUFACTURING. THIS CODE SHOULD BE USELESS. PREVIOUS CODE SEEMS COMPLETE. + // COUNT STOCK WHEN WE SHOULD ALREADY HAVE VALUE + // Detailed virtual stock, looks bugged, uncomplete and need heavy load. + // stock order and stock order_supplier + $stock_order = 0; + $stock_order_supplier = 0; + if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { // What about other options ? + if (!empty($conf->commande->enabled)) { + if (empty($productstat_cache[$obj->fk_product]['stats_order_customer'])) { + $generic_product->load_stats_commande(0, '1,2'); + $productstat_cache[$obj->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; + } else { + $generic_product->stats_commande['qty'] = $productstat_cache[$obj->fk_product]['stats_order_customer']; } - if (isModEnabled('supplier_order')) { - if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { - $generic_product->load_stats_commande_fournisseur(0, '3'); - $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; - } else { - $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier']; - } - $stock_order_supplier = $generic_product->stats_commande_fournisseur['qty']; - } - } - $text_info .= $reliquat.' x '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 20); - $text_stock_reel = $generic_product->stock_reel.'/'.$stock_order; - if ($stock_order > $generic_product->stock_reel && !($generic_product->stock_reel < $generic_commande->lines[$lig]->qty)) { - $warning++; - $text_warning .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; - } - if ($reliquat > $generic_product->stock_reel) { - $text_info .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; - } else { - $text_info .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; + $stock_order = $generic_product->stats_commande['qty']; } if (isModEnabled('supplier_order')) { - $text_info .= ' '.$langs->trans('SupplierOrder').' : '.$stock_order_supplier; + if (empty($productstat_cache[$obj->fk_product]['stats_order_supplier'])) { + $generic_product->load_stats_commande_fournisseur(0, '3'); + $productstat_cache[$obj->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; + } else { + $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$obj->fk_product]['stats_order_supplier']; + } + $stock_order_supplier = $generic_product->stats_commande_fournisseur['qty']; } - $text_info .= ($reliquat != $generic_commande->lines[$lig]->qty ? ' ('.$langs->trans("QtyInOtherShipments").' '.($generic_commande->lines[$lig]->qty - $reliquat).')' : ''); - $text_info .= '
'; } + $text_info .= $reliquat.' x '.$obj->product_ref.' '.dol_trunc($obj->product_label, 20); + $text_stock_reel = $generic_product->stock_reel.'/'.$stock_order; + if ($stock_order > $generic_product->stock_reel && !($generic_product->stock_reel < $obj->qty)) { + $warning++; + $text_warning .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; + } + if ($reliquat > $generic_product->stock_reel) { + $text_info .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; + } else { + $text_info .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; + } + if (isModEnabled('supplier_order')) { + $text_info .= ' '.$langs->trans('SupplierOrder').' : '.$stock_order_supplier; + } + $text_info .= ($reliquat != $obj->qty ? ' ('.$langs->trans("QtyInOtherShipments").' '.($obj->qty - $reliquat).')' : ''); + $text_info .= '
'; } } if ($notshippable == 0) { From 1484ac243f1af7a319a44bf9a7fcb9c848682616 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 31 May 2023 15:36:42 +0200 Subject: [PATCH 14/20] Fix translation --- htdocs/langs/en_US/orders.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 4be2b34fd73..9165e8b5b66 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -99,7 +99,7 @@ ListOfOrders=List of orders ListOrderLigne=Lines of orders productobuy=Products to buy only productonly=Products only -disablelinefree=No lines free +disablelinefree=No free lines CloseOrder=Close order ConfirmCloseOrder=Are you sure you want to set this order to delivered? Once an order is delivered, it can be set to billed. ConfirmDeleteOrder=Are you sure you want to delete this order? From a322ba85fe5684755000668bbc5c13bd3319252b Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 31 May 2023 15:43:24 +0200 Subject: [PATCH 15/20] Only show subtotal when sorted by product. --- htdocs/commande/list_det.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 8c1b78ae863..c4610916e94 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1436,7 +1436,8 @@ if ($resql) { if (empty($i)) { $oldref = $obj->product_ref; } - if ($oldref != $obj->product_ref) { + if ($oldref != $obj->product_ref && $sortfield == 'pr.ref') { + // TODO make new /core/tpl/list_print_sub_total.php include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $oldref = $obj->product_ref; } From ba646d19233acbab43da62e1c171e22f3928c028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 May 2023 18:11:12 +0200 Subject: [PATCH 16/20] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f7a993fd38f..8561b7e252f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -793,7 +793,8 @@ abstract class CommonObject $hookmanager->initHooks(array($this->element . 'dao')); $parameters = array( - 'tooltipcontentarray' => &$datas + 'tooltipcontentarray' => &$datas, + 'params' => $params, ); // Note that $action and $object may have been modified by some hooks $hookmanager->executeHooks('getTooltipContent', $parameters, $this, $action); From 93682620424daf184bc14e585fc12c3c96295c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 1 Jun 2023 09:23:59 +0200 Subject: [PATCH 17/20] min php is 7.1 for check --- htdocs/install/check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 0e255969ee8..ba63a665a25 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -83,7 +83,7 @@ if (!empty($useragent)) { // Check PHP version min $arrayphpminversionerror = array(5, 6, 0); -$arrayphpminversionwarning = array(7, 0, 0); +$arrayphpminversionwarning = array(7, 1, 0); if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { // Minimum to use (error if lower) print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); $checksok = 0; // 0=error, 1=warning From 9861b50ede694b0dd89121925403274bf624acc9 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 1 Jun 2023 11:49:56 +0200 Subject: [PATCH 18/20] fix: use CONST of TYPE of CommonInvoice rather than hard coded value --- htdocs/core/class/discount.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 9f5ea960c9a..c66bd73b96e 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -366,13 +366,14 @@ class DiscountAbsolute $sql .= " AND fk_invoice_supplier IS NULL)"; // Not used as credit note and not used as deposit dol_syslog(get_class($this)."::delete Delete discount", LOG_DEBUG); + require_once DOL_DOCUMENT_ROOT. '/core/class/commoninvoice.class.php'; $result = $this->db->query($sql); if ($result) { // If source of discount was a credit note or deposit, we change source statut. if ($this->fk_facture_source) { $sql = "UPDATE ".$this->db->prefix()."facture"; $sql .= " set paye=0, fk_statut=1"; - $sql .= " WHERE (type = 2 or type = 3) AND rowid = ".((int) $this->fk_facture_source); + $sql .= " WHERE (type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_facture_source); dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result = $this->db->query($sql); @@ -387,7 +388,7 @@ class DiscountAbsolute } elseif ($this->fk_invoice_supplier_source) { $sql = "UPDATE ".$this->db->prefix()."facture_fourn"; $sql .= " set paye=0, fk_statut=1"; - $sql .= " WHERE (type = 2 or type = 3) AND rowid = ".((int) $this->fk_invoice_supplier_source); + $sql .= " WHERE (type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_invoice_supplier_source); dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result = $this->db->query($sql); @@ -573,12 +574,12 @@ class DiscountAbsolute $sql = "SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount"; $sql .= " FROM ".$this->db->prefix()."societe_remise_except as rc, ".$this->db->prefix()."facture as f"; $sql .= " WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = ".((int) $invoice->id); - $sql .= " AND f.type = 3"; + $sql .= " AND f.type = ". (int) $invoice::TYPE_DEPOSIT; } elseif ($invoice->element == 'invoice_supplier') { $sql = "SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount"; $sql .= " FROM ".$this->db->prefix()."societe_remise_except as rc, ".$this->db->prefix()."facture_fourn as f"; $sql .= " WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = ".((int) $invoice->id); - $sql .= " AND f.type = 3"; + $sql .= " AND f.type = ". (int) $invoice::TYPE_DEPOSIT; } else { $this->error = get_class($this)."::getSumDepositsUsed was called with a bad object as a first parameter"; dol_print_error($this->error); From 6920f390186a4b59b534860693fa747fc1528535 Mon Sep 17 00:00:00 2001 From: jyhere Date: Thu, 1 Jun 2023 12:03:51 +0200 Subject: [PATCH 19/20] FIX: when updating cost price, oldcopy has the new value --- htdocs/product/fournisseurs.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 5d62485f3bc..1b32aeccec1 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -139,6 +139,7 @@ if (empty($reshook)) { if ($action == 'setcost_price') { if ($id) { $result = $object->fetch($id); + $object->oldcopy = dol_clone($object); $object->cost_price = price2num($cost_price); $result = $object->update($object->id, $user); if ($result > 0) { From 30d9f9ca03708091482cb0208c3342568b924d05 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 1 Jun 2023 10:05:12 +0000 Subject: [PATCH 20/20] Fixing style errors. --- htdocs/product/fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 1b32aeccec1..f3a96d8a43f 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -139,7 +139,7 @@ if (empty($reshook)) { if ($action == 'setcost_price') { if ($id) { $result = $object->fetch($id); - $object->oldcopy = dol_clone($object); + $object->oldcopy = dol_clone($object); $object->cost_price = price2num($cost_price); $result = $object->update($object->id, $user); if ($result > 0) {