From e4cc3e1b2c6528ab66aff4871bdb41e91d236cb3 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 7 Jul 2020 07:05:18 +0200 Subject: [PATCH 01/57] NEW: Add column quantity in product margin page --- htdocs/margin/productMargins.php | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index cb67cb0d58f..25176220d49 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2020 Alexandre Spangaro * * 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 @@ -180,6 +181,7 @@ if ($id > 0) $sql .= " d.fk_product,"; if ($id > 0) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql .= " SUM(d.total_ht) as selling_price,"; // Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this) +$sql .= " SUM(d.qty) as product_qty,"; $sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,"; $sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -235,27 +237,30 @@ if ($result) print ''; if ($id > 0) { print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&id=".$id, '', $sortfield, $sortorder); - print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$id, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$id, '', $sortfield, $sortorder, 'center '); } else { print_liste_field_titre("ProductService", $_SERVER["PHP_SELF"], "p.ref", "", "&id=".$id, '', $sortfield, $sortorder); } - print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "product_qty", "", "&id=".$id, '', $sortfield, $sortorder,'center '); + print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); if (!empty($conf->global->DISPLAY_MARK_RATES)) - print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); print "\n"; $cumul_achat = 0; $cumul_vente = 0; + $cumul_qty = 0; if ($num > 0) { while ($i < $num /*&& $i < $conf->liste_limit*/) { $objp = $db->fetch_object($result); + $qty = $objp->product_qty; $pa = $objp->buying_price; $pv = $objp->selling_price; $marge = $objp->marge; @@ -295,9 +300,10 @@ if ($result) print "\n"; //print "".$product_static->getNomUrl(1)."\n"; } - print "".price(price2num($pv, 'MT'))."\n"; - print "".price(price2num($pa, 'MT'))."\n"; - print "".price(price2num($marge, 'MT'))."\n"; + print "".$qty."\n"; + print "".price(price2num($pv, 'MT'))."\n"; + print "".price(price2num($pa, 'MT'))."\n"; + print "".price(price2num($marge, 'MT'))."\n"; if (!empty($conf->global->DISPLAY_MARGIN_RATES)) print "".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."\n"; if (!empty($conf->global->DISPLAY_MARK_RATES)) @@ -307,6 +313,7 @@ if ($result) $i++; $cumul_achat += $objp->buying_price; $cumul_vente += $objp->selling_price; + $cumul_qty += $objp->product_qty; } } @@ -322,9 +329,10 @@ if ($result) print ''; else print ''; print $langs->trans('TotalMargin').""; - print "".price(price2num($cumul_vente, 'MT'))."\n"; - print "".price(price2num($cumul_achat, 'MT'))."\n"; - print "".price(price2num($totalMargin, 'MT'))."\n"; + print "".$cumul_qty.""; + print "".price(price2num($cumul_vente, 'MT'))."\n"; + print "".price(price2num($cumul_achat, 'MT'))."\n"; + print "".price(price2num($totalMargin, 'MT'))."\n"; if (!empty($conf->global->DISPLAY_MARGIN_RATES)) print "".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."\n"; if (!empty($conf->global->DISPLAY_MARK_RATES)) From e032c2f7b961667fbd5be579f43eea9351a6d6a4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 7 Jul 2020 05:09:28 +0000 Subject: [PATCH 02/57] Fixing style errors. --- htdocs/margin/productMargins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 25176220d49..71b8b41ef8d 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -241,7 +241,7 @@ if ($result) } else { print_liste_field_titre("ProductService", $_SERVER["PHP_SELF"], "p.ref", "", "&id=".$id, '', $sortfield, $sortorder); } - print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "product_qty", "", "&id=".$id, '', $sortfield, $sortorder,'center '); + print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "product_qty", "", "&id=".$id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); From 71a5cc752253c43591e3d1e3500081e560f53584 Mon Sep 17 00:00:00 2001 From: atm-josselin Date: Thu, 9 Jul 2020 17:13:53 +0200 Subject: [PATCH 03/57] Show label on batch card --- htdocs/product/stock/productlot_card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 33281ccf278..bb19726b247 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -332,7 +332,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.$langs->trans("Product").''; $producttmp = new Product($db); $producttmp->fetch($object->fk_product); - print $producttmp->getNomUrl(1, 'stock'); + print $producttmp->getNomUrl(1, 'stock'). " - " . $producttmp->label; print ''; // Eat by From dc8bce2f430f32d48dfea7d68b9e38b2e62a14e0 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Fri, 10 Jul 2020 11:42:59 +0200 Subject: [PATCH 04/57] Update list.php --- htdocs/societe/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 9b01893e479..4de868a1b27 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -139,6 +139,8 @@ $fieldstosearchall = array( 's.code_fournisseur'=>"SupplierCode", 's.code_compta'=>"CustomerAccountancyCodeShort", 's.code_compta_fournisseur'=>"SupplierAccountancyCodeShort", + 's.zip'=>"Zip", + 's.town'=>"Town", 's.email'=>"EMail", 's.url'=>"URL", 's.tva_intra'=>"VATIntra", From fd01a4d1547ee6337e70cc2102c3b4f62fa6c487 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:31:16 +0200 Subject: [PATCH 05/57] Minimum version of PHP required by module --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 4 ++-- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index e60508487c2..603fd4efa22 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -69,9 +69,9 @@ class pdf_einstein extends ModelePDFCommandes /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index b9db80a5cfc..e6e54e521d8 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -69,9 +69,9 @@ class pdf_eratosthene extends ModelePDFCommandes /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From c9c5d9cc70c41f2464dc9d0629baa2469472586b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:34:11 +0200 Subject: [PATCH 06/57] Minimum version of PHP required by module --- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index d612f4c0401..a3c549c48a7 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -62,9 +62,9 @@ class pdf_strato extends ModelePDFContract /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 7f5ebf2e31448987f6cfb8f6a43bc8bc9e875abf Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:35:36 +0200 Subject: [PATCH 07/57] Minimum version of PHP required by module --- htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 4 ++-- htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 4 ++-- htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index fb131c5b6bc..2602caf8034 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -58,9 +58,9 @@ class pdf_espadon extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 11f675100e7..5fbec0b2c68 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -59,9 +59,9 @@ class pdf_merou extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 70d9d55f6ed..dc29b6411f5 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -59,9 +59,9 @@ class pdf_rouget extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 0fdb209045e4591f3b7fbcdf9c2381b4a2dab3b8 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:36:22 +0200 Subject: [PATCH 08/57] Minimum version of PHP required by module --- .../core/modules/expensereport/doc/pdf_standard.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index ce226c5e031..6d3bc5e8e65 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -66,9 +66,9 @@ class pdf_standard extends ModeleExpenseReport /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 872b99be4227f37f076dfdaa24c7c2302f673a87 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:37:25 +0200 Subject: [PATCH 09/57] Minimum version of PHP required by module --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 4 ++-- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index a204bdad5d8..cd2f711d23a 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -70,9 +70,9 @@ class pdf_crabe extends ModelePDFFactures /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index b9cb334d48e..8695a46cae5 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -70,9 +70,9 @@ class pdf_sponge extends ModelePDFFactures /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From baa9c39ace71c5cf16f92a4576e64b956dac6050 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:38:03 +0200 Subject: [PATCH 10/57] Minimum version of PHP required by module --- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index d119cea1a45..59bed960d1e 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -61,9 +61,9 @@ class pdf_soleil extends ModelePDFFicheinter /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 0531dd00d9d5b1ef9b5976828b171ec3aeff6907 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:38:44 +0200 Subject: [PATCH 11/57] Minimum version of PHP required by module --- htdocs/core/modules/livraison/doc/pdf_typhon.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 63f8088d528..b74f25d340a 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -60,9 +60,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 370a7bcf3858395a3d0e96c7e4e453cd063779e6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:39:46 +0200 Subject: [PATCH 12/57] Minimum version of PHP required by module --- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 4 ++-- htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 82862e48c84..279b5be2569 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -69,9 +69,9 @@ class pdf_azur extends ModelePDFPropales /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index b1ef6e022ef..705294979dc 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -68,9 +68,9 @@ class pdf_cyan extends ModelePDFPropales /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 7c844064947a622858b9c9c38148793b6b8bdd4a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:41:10 +0200 Subject: [PATCH 13/57] Minimum version of PHP required by module --- .../core/modules/supplier_invoice/doc/pdf_canelle.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 49d5dd4ca2d..11ff7780002 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -65,9 +65,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From ece128c9c5a5f2b2cc62151f3c0270a2e4c7e7fb Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:42:04 +0200 Subject: [PATCH 14/57] Minimum version of PHP required by module --- .../core/modules/supplier_order/doc/pdf_cornas.modules.php | 4 ++-- .../modules/supplier_order/doc/pdf_muscadet.modules.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 7679a555483..1fdb8b09aef 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -63,9 +63,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document 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 06dd3c0aed3..5131b41bd87 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -61,11 +61,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ public $type; - /** + /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 0d58c55167de4816b0d11cf6cc0dfc9a1628edc4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 11 Jul 2020 12:42:38 +0000 Subject: [PATCH 15/57] Fixing style errors. --- .../modules/supplier_order/doc/pdf_muscadet.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 5131b41bd87..5dd240fb544 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -61,10 +61,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ public $type; - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) - */ + /** + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.6 = array(5, 6) + */ public $phpmin = array(5, 6); /** From 8a2db6bad596d0430e547ad8afdb5761c3590b2b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:42:53 +0200 Subject: [PATCH 16/57] Minimum version of PHP required by module --- .../modules/supplier_payment/doc/pdf_standard.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 5aeaf6577da..a4f9bc93823 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -60,9 +60,9 @@ class pdf_standard extends ModelePDFSuppliersPayments /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From b02b6db181c489ffba72293d61228dcaf23ce8d5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:43:30 +0200 Subject: [PATCH 17/57] Minimum version of PHP required by module --- .../core/modules/supplier_proposal/doc/pdf_aurore.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 25777895543..608b3fbd392 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -60,9 +60,9 @@ class pdf_aurore extends ModelePDFSupplierProposal /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From a61955234fcc70a6a415e0ae84d12fdbea35766c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 14:54:23 +0200 Subject: [PATCH 18/57] Minimum version of PHP required by module --- htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b722dd20c76..9b22b04800d 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 @@ -48,9 +48,9 @@ class doc_generic_bom_odt extends ModelePDFBom /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From b26a1042d268a678701a7652ccb80472be6c431d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:02:03 +0200 Subject: [PATCH 19/57] Minimum version of PHP required by module --- .../modules/commande/doc/doc_generic_order_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4fd09edf994..9c8bd72a6a0 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 @@ -48,9 +48,9 @@ class doc_generic_order_odt extends ModelePDFCommandes /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From 8d06471a4ee623f89af95b9b7ceb83d575e984e9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:03:00 +0200 Subject: [PATCH 20/57] Minimum version of PHP required by module --- .../modules/contract/doc/doc_generic_contract_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 30c12b46c44..8f707493474 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 @@ -46,9 +46,9 @@ class doc_generic_contract_odt extends ModelePDFContract /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From d4562a91ff808b1f45061e44ef4fddd41b94d708 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:03:38 +0200 Subject: [PATCH 21/57] Minimum version of PHP required by module --- .../expedition/doc/doc_generic_shipment_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b5b42de689b..122a5abdc10 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 @@ -48,9 +48,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 8f37bb5a69547f228bc73e8e8b0d928856a176bd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:04:06 +0200 Subject: [PATCH 22/57] Minimum version of PHP required by module --- .../modules/facture/doc/doc_generic_invoice_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 41c14324536..c581909588a 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 @@ -47,9 +47,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 3a4f526ccd1bf99f445355095a801f216dc4d186 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:04:31 +0200 Subject: [PATCH 23/57] Minimum version of PHP required by module --- htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 03bd868bf02..e41b4b35adc 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 @@ -48,9 +48,9 @@ class doc_generic_mo_odt extends ModelePDFMo /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From f453c2272a8a6f454ae6954def0082f1512ab7a3 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:04:54 +0200 Subject: [PATCH 24/57] Minimum version of PHP required by module --- .../modules/product/doc/doc_generic_product_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 38e4a18bda6..e1c760ccb32 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 @@ -45,9 +45,9 @@ class doc_generic_product_odt extends ModelePDFProduct /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 2e6addae11d1f210a94299e299d221956373ab69 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:05:20 +0200 Subject: [PATCH 25/57] Minimum version of PHP required by module --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 11fd721dfad..d5e45fa3c73 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFProduct /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From eb602d8bae6cb8624db733caaccf0e9f375864eb Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:05:49 +0200 Subject: [PATCH 26/57] Minimum version of PHP required by module --- .../modules/project/doc/doc_generic_project_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d4994823ffc..fe2b217124e 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 @@ -62,9 +62,9 @@ class doc_generic_project_odt extends ModelePDFProjects /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 05b97dc13409519c34892067f1a30e7cc54eaa94 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:06:17 +0200 Subject: [PATCH 27/57] Minimum version of PHP required by module --- htdocs/core/modules/project/doc/pdf_baleine.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 8cd73383a1a..7a1b0a0bfe4 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -58,11 +58,11 @@ class pdf_baleine extends ModelePDFProjects */ public $type; - /** + /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From bbde5a3c955a2e545b1f6a19ca97a9a63cf77806 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:06:44 +0200 Subject: [PATCH 28/57] Minimum version of PHP required by module --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 26ab158ded9..70cffdf9032 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 @@ -63,9 +63,9 @@ class doc_generic_task_odt extends ModelePDFTask /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 9451148928029467f66845e1c5c0bfa89b04bdf5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:07:09 +0200 Subject: [PATCH 29/57] Minimum version of PHP required by module --- .../propale/doc/doc_generic_proposal_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 b646156079b..d904c5877ec 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 @@ -43,11 +43,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales */ public $emetteur; - /** + /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From b4252b899c054baa4ccabd744eb07ea777601309 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:07:33 +0200 Subject: [PATCH 30/57] Minimum version of PHP required by module --- .../reception/doc/doc_generic_reception_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ae345b21b7c..9676bb2ff70 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,11 +41,11 @@ 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 ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From 135880131655385536c5ba2037b9b67df0d73e43 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:08:00 +0200 Subject: [PATCH 31/57] Minimum version of PHP required by module --- htdocs/core/modules/societe/doc/doc_generic_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 2af48507e94..9cc3adf708e 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -44,9 +44,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** From 1bb60ca7cc5fb0d074be2954a54f125fb8c6a638 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:08:28 +0200 Subject: [PATCH 32/57] Minimum version of PHP required by module --- .../modules/stock/doc/doc_generic_stock_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 5fbee68d41b..2c1184da321 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,11 +43,11 @@ class doc_generic_stock_odt extends ModelePDFStock */ public $emetteur; - /** + /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 1d5a1beb79d521e51cf761fd4c8e75f144425004 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:08:52 +0200 Subject: [PATCH 33/57] Minimum version of PHP required by module --- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index d4c8adb74f2..4a9404d3b3e 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFStock /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 3ee18e58524fce891d9af2daffafc732d4b12bda Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:09:15 +0200 Subject: [PATCH 34/57] Minimum version of PHP required by module --- htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 59769df9987..2905bfd6b26 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -59,9 +59,9 @@ class pdf_stdmovement extends ModelePDFMovement /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 8c5bdb8fb6c0acfe8cb656d22817352afdaedcbf Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:09:36 +0200 Subject: [PATCH 35/57] Minimum version of PHP required by module --- .../doc/doc_generic_supplier_order_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 71c39650f50..9c9e43a9475 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 @@ -49,9 +49,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From fc778e433f09f9424e58b0d68034666833a0ba8b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:10:02 +0200 Subject: [PATCH 36/57] Minimum version of PHP required by module --- .../doc/doc_generic_supplier_proposal_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 380f7a1dcb4..ea6c1574149 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 @@ -46,9 +46,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 2906e9b848c11fcbdc6092a154b289c6d946c9ec Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:10:26 +0200 Subject: [PATCH 37/57] Minimum version of PHP required by module --- htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b9f9ffe69e8..e71b09f8a0a 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 @@ -43,9 +43,9 @@ class doc_generic_user_odt extends ModelePDFUser /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 5902dd6df3b99a915ed5e82d5af8d3b8c8ef591a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:10:53 +0200 Subject: [PATCH 38/57] Minimum version of PHP required by module --- .../usergroup/doc/doc_generic_usergroup_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 9cf9a00c796..391eab28838 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 @@ -46,9 +46,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 448f03194889b0027940db128a74d76ff9259b0e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:11:15 +0200 Subject: [PATCH 39/57] Minimum version of PHP required by module --- .../mymodule/doc/doc_generic_myobject_odt.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index 6c75ec0dddb..d585815e805 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -47,10 +47,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject public $emetteur; /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = array(5, 5); + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.6 = array(5, 6) + */ + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document From ffae6b02c1f31f05e4008a44281af0ca733cbd18 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 11 Jul 2020 15:11:39 +0200 Subject: [PATCH 40/57] Minimum version of PHP required by module --- .../modules/mymodule/doc/pdf_standard_myobject.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 0d108e5bdec..e3a3699f445 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -70,9 +70,9 @@ class pdf_standard_myobject extends ModelePDFMyObject /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document From 378c8c46914e02d9eb62c5ab86b62cf917263472 Mon Sep 17 00:00:00 2001 From: Matt Sidnell <54064522+pstructures@users.noreply.github.com> Date: Sun, 12 Jul 2020 20:34:04 +0100 Subject: [PATCH 41/57] Error on time pent page where progress was getting unset --- htdocs/projet/activity/perweek.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index f3a68dd979f..5e5ae809326 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -292,7 +292,6 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac $object->fetch($taskid); if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); - else unset($object->progress); $object->timespent_duration = $newduration; $object->timespent_fk_user = $usertoprocess->id; From 2797c5e65f46ca7df8bdbcadc5f653d0f9d5f870 Mon Sep 17 00:00:00 2001 From: Matt Sidnell <54064522+pstructures@users.noreply.github.com> Date: Sun, 12 Jul 2020 21:21:34 +0100 Subject: [PATCH 42/57] Updated Issue with declared progress --- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/perweek.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 41def74cf1d..8ba7b0c3d93 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -285,7 +285,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac foreach ($timespent_duration as $key => $val) { $object->fetch($key); - + $taskid = $object->id; if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); else unset($object->progress); diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 5e5ae809326..f3a68dd979f 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -292,6 +292,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac $object->fetch($taskid); if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); + else unset($object->progress); $object->timespent_duration = $newduration; $object->timespent_fk_user = $usertoprocess->id; From d43c30defd8574b22030d67648bdd8038d0f018a Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 13 Jul 2020 14:17:12 +0200 Subject: [PATCH 43/57] change level of left menu for thirdparty types --- htdocs/core/menus/standard/eldy.lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 80e1fd24932..48987a968e7 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -824,7 +824,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { $langs->load("commercial"); - $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'prospects'); + $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'prospects'); /* no more required, there is a filter that can do more if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire); @@ -832,7 +832,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire); */ - $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer); + $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->rights->societe->creer); //$newmenu->add("/contact/list.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); } @@ -840,9 +840,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $langs->load("commercial"); - $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers'); + $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'customers'); - $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer); + $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->rights->societe->creer); //$newmenu->add("/contact/list.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); } @@ -850,8 +850,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->societe->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) || !empty($conf->supplier_proposal->enabled))) { $langs->load("suppliers"); - $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers'); - $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire)); + $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers'); + $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire)); } // Categories From 46743670999937db1d07eb6f92020fe3db2722ff Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 13 Jul 2020 14:18:16 +0200 Subject: [PATCH 44/57] remove old commented out code lines --- htdocs/core/menus/standard/eldy.lib.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 48987a968e7..de00abf8c5b 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -833,7 +833,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire); */ $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->rights->societe->creer); - //$newmenu->add("/contact/list.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); } // Customers/Prospects @@ -843,7 +842,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'customers'); $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->rights->societe->creer); - //$newmenu->add("/contact/list.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); } // Suppliers From a2cf47389108148597e82ea3ecb5f5b3dce45a8b Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 13 Jul 2020 14:24:07 +0200 Subject: [PATCH 45/57] add class for ticket edition (pdf or odt) --- htdocs/core/modules/ticket/modules_ticket.php | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/ticket/modules_ticket.php b/htdocs/core/modules/ticket/modules_ticket.php index ad8394fa91e..6aa027f16fc 100644 --- a/htdocs/core/modules/ticket/modules_ticket.php +++ b/htdocs/core/modules/ticket/modules_ticket.php @@ -1,6 +1,7 @@ - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2010-2014 Regis Houssin + * Copyright (C) 2014 Marcos García + * Copyright (C) 2020 Charlene Benke * * 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 @@ -24,6 +25,38 @@ * and parent class for projects numbering models */ +require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; + +/** + * Parent class for documents models + */ +abstract class ModelePDFTicket extends CommonDocGenerator +{ + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of active generation modules + * + * @param DoliDB $db Database handler + * @param integer $maxfilenamelength Max length of value to show + * @return array List of templates + */ + public static function liste_modeles($db, $maxfilenamelength = 0) + { + // phpcs:enable + global $conf; + + $type = 'ticket'; + $list = array(); + + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $list = getListOfModels($db, $type, $maxfilenamelength); + + return $list; + } +} + + /** * Classe mere des modeles de numerotation des references de projets */ From a4e9c478e75df18f966678d0f1e2eaad2916b37f Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 13 Jul 2020 18:14:57 +0200 Subject: [PATCH 46/57] fix the global `DEFAULT_SEARCH_INTO_MODULE` - current value will not push anything above the core modules --- htdocs/core/ajax/selectsearchbox.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index c385f1437df..bdd4eacc976 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -154,10 +154,10 @@ if (empty($reshook)) $arrayresult = array_merge($arrayresult, $hookmanager->resArray); } else $arrayresult = $hookmanager->resArray; -// This allow to keep a search entry to the top +// This pushes a search entry to the top if (!empty($conf->global->DEFAULT_SEARCH_INTO_MODULE)) { $key = 'searchinto'.$conf->global->DEFAULT_SEARCH_INTO_MODULE; - if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -10; + if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -1000; } // Sort on position From 7184fba8c6d42954358655abaa0b7c5552f473c3 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 14 Jul 2020 13:59:16 +0200 Subject: [PATCH 47/57] Update llx_c_incoterms.sql add column 'label' for short term description in english add new Incoterm DPU (DAT is obsolete , but let it stay for older documents) --- htdocs/install/mysql/data/llx_c_incoterms.sql | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_incoterms.sql b/htdocs/install/mysql/data/llx_c_incoterms.sql index 3f2e4cbac2e..adc6b2337c1 100644 --- a/htdocs/install/mysql/data/llx_c_incoterms.sql +++ b/htdocs/install/mysql/data/llx_c_incoterms.sql @@ -5,6 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2020 Udo Tamm -- -- 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 @@ -21,21 +22,24 @@ -- -- +-- +-- Do not place a comment at the end of the line, this file is parsed when +-- from the install and all '--' are removed. -- -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors -- de l'install et tous les sigles '--' sont supprimés. -- -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('EXW', 'Ex Works, au départ non chargé, non dédouané sortie d''usine (uniquement adapté aux flux domestiques, nationaux)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FCA', 'Free Carrier, marchandises dédouanées et chargées dans le pays de départ, chez le vendeur ou chez le commissionnaire de transport de l''acheteur', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FAS', 'Free Alongside Ship, sur le quai du port de départ', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FOB', 'Free On Board, chargé sur le bateau, les frais de chargement dans celui-ci étant fonction du liner term indiqué par la compagnie maritime (à la charge du vendeur)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CFR', 'Cost and Freight, chargé dans le bateau, livraison au port de départ, frais payés jusqu''au port d''arrivée, sans assurance pour le transport, non déchargé du navire à destination (les frais de déchargement sont inclus ou non au port d''arrivée)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CIF', 'Cost, Insurance and Freight, chargé sur le bateau, frais jusqu''au port d''arrivée, avec l''assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CPT', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CIP', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DAT', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DAP', 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DDP', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1); - +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('EXW', 'Ex Works', 'Ex Works, au départ non chargé, non dédouané sortie d''usine (uniquement adapté aux flux domestiques, nationaux)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FCA', 'Free Carrier', 'Free Carrier, marchandises dédouanées et chargées dans le pays de départ, chez le vendeur ou chez le commissionnaire de transport de l''acheteur', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FAS', 'Free Alongside Ship', 'Free Alongside Ship, sur le quai du port de départ', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FOB', 'Free On Board', 'Free On Board, chargé sur le bateau, les frais de chargement dans celui-ci étant fonction du liner term indiqué par la compagnie maritime (à la charge du vendeur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CFR', 'Cost and Freight', 'Cost and Freight, chargé dans le bateau, livraison au port de départ, frais payés jusqu''au port d''arrivée, sans assurance pour le transport, non déchargé du navire à destination (les frais de déchargement sont inclus ou non au port d''arrivée)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIF', 'Cost, Insurance, Freight', 'Cost, Insurance and Freight, chargé sur le bateau, frais jusqu''au port d''arrivée, avec l''assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CPT', 'Carriage Paid To', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIP', 'Carriage Insurance Paid', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAT', 'Delivered At Terminal', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAP', 'Delivered At Place`, 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DDP', 'Delivered Duty Paid', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DPU', 'Delivered at Place Unloaded`, 'Delivered at Place unloaded', 1); From 60f904bbd3071ff14aec42d45cd7fd810d2b3fb4 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:15:44 +0200 Subject: [PATCH 48/57] Update llx_c_incoterms.sql add column label for short standard term in english (libelle to use for long description (in user language)) --- htdocs/install/mysql/tables/llx_c_incoterms.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/tables/llx_c_incoterms.sql b/htdocs/install/mysql/tables/llx_c_incoterms.sql index 5b4dc3f60e2..969da0cbbfa 100644 --- a/htdocs/install/mysql/tables/llx_c_incoterms.sql +++ b/htdocs/install/mysql/tables/llx_c_incoterms.sql @@ -1,5 +1,6 @@ -- ======================================================================== -- Copyright (C) 2015 Laurent Destailleur +-- Copyright (C) 2020 Udo Tamm -- -- 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 @@ -19,6 +20,7 @@ CREATE TABLE llx_c_incoterms ( rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(3) NOT NULL, + label varchar(100) NOT NULL, libelle varchar(255) NOT NULL, active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; From 9d481cf15e5b4dee8ddc0b199143091ed85646ec Mon Sep 17 00:00:00 2001 From: "Abdessalam@MEGALOGI" Date: Wed, 15 Jul 2020 20:21:27 +0100 Subject: [PATCH 49/57] Update card.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La description d'un produit/service libre (HTML) d'un devis est formatée en texte simple. --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index a2259b10a37..72c7826e61b 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -790,7 +790,7 @@ if (empty($reshook)) } elseif ($action == 'addline' && $usercancreate) { // Add line // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); + $product_desc = (GETPOST('dp_desc', 'none') ?GETPOST('dp_desc', 'none') : ''); $price_ht = GETPOST('price_ht'); $price_ht_devise = GETPOST('multicurrency_price_ht'); $prod_entry_mode = GETPOST('prod_entry_mode'); From 125be4271e4f2799e2c2e836b4d719c61f5d58f4 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 17 Jul 2020 10:50:24 +0200 Subject: [PATCH 50/57] New: ##12972 Update supplier price also when product has batch --- htdocs/fourn/commande/dispatch.php | 36 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 061ace6c4f0..7b1d1a09a20 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2019 Juanjo Menent * Copyright (C) 2014 Cedric Gross * Copyright (C) 2016 Florian Henry - * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2017-2020 Ferran Marcet * Copyright (C) 2018 Frédéric France * Copyright (C) 2019-2020 Christophe Battarel * @@ -243,7 +243,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2]); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); if (!empty($dto)) { $unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU'); } @@ -269,14 +269,14 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2]); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); //update supplier price if (GETPOSTISSET($saveprice)) { // TODO Use class $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql .= " SET unitprice='".GETPOST($pu)."'"; $sql .= ", price=".GETPOST($pu)."*quantity"; - $sql .= ", remise_percent='".$dto."'"; + $sql .= ", remise_percent='".(!empty($dto)?$dto:0)."'"; $sql .= " WHERE fk_soc=".$object->socid; $sql .= " AND fk_product=".GETPOST($prod, 'int'); @@ -306,6 +306,16 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2]; + if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { + if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); + if (!empty($dto)) { + $unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU'); + } + $saveprice = "saveprice_".$reg[1].'_'.$reg[2]; + } + } + // We ask to move a qty if (GETPOST($qty) > 0) { if (!(GETPOST($ent, 'int') > 0)) { @@ -328,6 +338,24 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) setEventMessages($object->error, $object->errors, 'errors'); $error++; } + + if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { + if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); + //update supplier price + if (GETPOSTISSET($saveprice)) { + // TODO Use class + $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; + $sql .= " SET unitprice='".GETPOST($pu)."'"; + $sql .= ", price=".GETPOST($pu)."*quantity"; + $sql .= ", remise_percent='".(!empty($dto)?$dto:0)."'"; + $sql .= " WHERE fk_soc=".$object->socid; + $sql .= " AND fk_product=".GETPOST($prod, 'int'); + + $resql = $db->query($sql); + } + } + } } } } From 28bc001ba97fac5a096d914959e5de906599c4ab Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 17 Jul 2020 08:52:52 +0000 Subject: [PATCH 51/57] Fixing style errors. --- htdocs/fourn/commande/dispatch.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7b1d1a09a20..6f665a381df 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -243,7 +243,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); if (!empty($dto)) { $unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU'); } @@ -269,7 +269,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); //update supplier price if (GETPOSTISSET($saveprice)) { // TODO Use class @@ -308,7 +308,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); if (!empty($dto)) { $unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU'); } @@ -341,7 +341,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2],'int'); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); //update supplier price if (GETPOSTISSET($saveprice)) { // TODO Use class From 97826f140f5b1f79ee9ddb767bdcea26510eec63 Mon Sep 17 00:00:00 2001 From: Oarces DEV Date: Sat, 18 Jul 2020 11:55:42 +0200 Subject: [PATCH 52/57] Add the possibility for the prospect to order A prospect can do make order everywhere in Dolibarr, except in order tab... https://www.dolibarr.fr/forum/t/nouvelle-commande-ou-sont-les-prospects/33275/7 --- htdocs/commande/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index ab3aa443642..8cc3fd48aca 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1580,7 +1580,7 @@ if ($action == 'create' && $usercancreate) print ''; } else { print ''; - print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 3)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); // reload page to retrieve customer informations if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE)) { @@ -2003,7 +2003,7 @@ if ($action == 'create' && $usercancreate) if ($action == 'clone') { // Create an array for form $formquestion = array( - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)')) + array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client = 2 OR s.client=3)')) ); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } From 31cb57afc941f5cb324583efa8ef2bb97676d53a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Jul 2020 23:27:43 +0200 Subject: [PATCH 53/57] Fix regression with ecoterm --- htdocs/install/mysql/data/llx_c_incoterms.sql | 4 ++-- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_c_incoterms.sql | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_incoterms.sql b/htdocs/install/mysql/data/llx_c_incoterms.sql index adc6b2337c1..b77e58d1ae5 100644 --- a/htdocs/install/mysql/data/llx_c_incoterms.sql +++ b/htdocs/install/mysql/data/llx_c_incoterms.sql @@ -40,6 +40,6 @@ INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIF', 'Cost, INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CPT', 'Carriage Paid To', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1); INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIP', 'Carriage Insurance Paid', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAT', 'Delivered At Terminal', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1); -INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAP', 'Delivered At Place`, 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAP', 'Delivered At Place', 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1); INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DDP', 'Delivered Duty Paid', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1); -INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DPU', 'Delivered at Place Unloaded`, 'Delivered at Place unloaded', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DPU', 'Delivered at Place Unloaded', 'Delivered at Place unloaded', 1); diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 6af4fc35ae7..743acf473ad 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -74,3 +74,5 @@ ALTER TABLE llx_user DROP COLUMN whatsapp; ALTER TABLE llx_user ADD COLUMN datestartvalidity datetime; ALTER TABLE llx_user ADD COLUMN dateendvalidity datetime; +ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL; + diff --git a/htdocs/install/mysql/tables/llx_c_incoterms.sql b/htdocs/install/mysql/tables/llx_c_incoterms.sql index 969da0cbbfa..aa690d6ce07 100644 --- a/htdocs/install/mysql/tables/llx_c_incoterms.sql +++ b/htdocs/install/mysql/tables/llx_c_incoterms.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_c_incoterms ( rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(3) NOT NULL, - label varchar(100) NOT NULL, + label varchar(100), libelle varchar(255) NOT NULL, active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; From e5688e264130f61b0be41618f1491d7514500d35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Jul 2020 02:54:25 +0200 Subject: [PATCH 54/57] Fix phpcs --- htdocs/product/class/api_products.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 9b714ec647b..1f4bbf870f3 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -866,7 +866,7 @@ class Products extends DolibarrApi $product_fourn_list = $product_fourn->list_product_fournisseur_price($this->product->id, '', '', 0, 0); } - foreach($product_fourn_list as $tmpobj) { + foreach ($product_fourn_list as $tmpobj) { $this->_cleanObjectDatas($tmpobj); } From 9d9f865f3732d94f864291bb2fb4838fa4a33465 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jul 2020 00:24:14 +0200 Subject: [PATCH 55/57] fetch_optionals must be included into a fetch --- htdocs/contrat/class/contrat.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index c2200a411c2..12ad603ea14 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2776,18 +2776,16 @@ class ContratLigne extends CommonObjectLine * Load object in memory from database * * @param int $id Id object - * @param string $ref Ref of contract + * @param string $ref Ref of contract line * @return int <0 if KO, >0 if OK */ public function fetch($id, $ref = '') { - // Check parameters if (empty($id) && empty($ref)) return -1; $sql = "SELECT"; $sql .= " t.rowid,"; - $sql .= " t.tms,"; $sql .= " t.fk_contrat,"; $sql .= " t.fk_product,"; @@ -2888,10 +2886,14 @@ class ContratLigne extends CommonObjectLine $this->fk_user_cloture = $obj->fk_user_cloture; $this->commentaire = $obj->commentaire; $this->fk_fournprice = $obj->fk_fournprice; + $marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->fk_fournprice, $obj->pa_ht); $this->pa_ht = $marginInfos[0]; $this->fk_unit = $obj->fk_unit; + + $this->fetch_optionals(); } + $this->db->free($resql); return 1; From d823bb73c020d3b587b96b709643fd16061868f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jul 2020 01:01:40 +0200 Subject: [PATCH 56/57] Change order of fields for mass stock movement --- htdocs/langs/en_US/stocks.lang | 2 +- htdocs/product/stock/massstockmove.php | 41 +++++++++++++------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 9ce03f64942..1c0e6e5df5f 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -143,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index ab14bbb6e9a..bc7949f5a1b 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2020 Laurent Destaileur * Copyright (C) 2014 Regis Houssin * * This program is free software: you can redistribute it and/or modify @@ -122,7 +122,7 @@ if ($action == 'addline') } // TODO Check qty is ok for stock move. Note qty may not be enough yet, but we make a check now to report a warning. - // What is important is to have qty when doing action 'createmovements' + // What is more important is to have qty when doing action 'createmovements' if (!$error) { // Warning, don't forget lines already added into the $_SESSION['massstockmove'] @@ -139,9 +139,10 @@ if ($action == 'addline') $listofdata[$id] = array('id'=>$id, 'id_product'=>$id_product, 'qty'=>$qty, 'id_sw'=>$id_sw, 'id_tw'=>$id_tw, 'batch'=>$batch); $_SESSION['massstockmove'] = json_encode($listofdata); - unset($id_product); //unset($id_sw); //unset($id_tw); + unset($id_product); + unset($batch); unset($qty); } } @@ -338,18 +339,26 @@ print ''; $param = ''; print ''; +print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); +print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); if ($conf->productbatch->enabled) { print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); } -print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); -print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'center tagtd maxwidthonsmartphone '); print getTitleFieldOfList('', 0); print ''; print ''; +// From warehouse +print ''; +// To warehouse +print ''; // Product print ''; // Batch number if ($conf->productbatch->enabled) @@ -369,14 +378,6 @@ if ($conf->productbatch->enabled) print ''; print ''; } -// In warehouse -print ''; -// Out warehouse -print ''; // Qty print ''; // Button to add line @@ -393,6 +394,12 @@ foreach ($listofdata as $key => $val) print ''; print ''; + print ''; + print ''; if ($conf->productbatch->enabled) @@ -401,12 +408,6 @@ foreach ($listofdata as $key => $val) print $val['batch']; print ''; } - print ''; - print ''; print ''; print ''; From 9a506ff9b3d56fdcabfaaf9248232a0099651358 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jul 2020 03:29:22 +0200 Subject: [PATCH 57/57] css --- htdocs/admin/modules.php | 15 ++++++++------- htdocs/theme/eldy/info-box.inc.php | 8 +++++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index c113d9a0e63..e5e221c529b 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -497,6 +497,14 @@ if ($mode == 'common' || $mode == 'commonkanban') dol_fiche_head($head, $newmode, '', -1); $moreforfilter = '
'; + + $moreforfilter .= ''; + + $moreforfilter .= '
'.$moreinfo.'
'.$moreinfo2.'
'; + $moreforfilter .= '
'; $moreforfilter .= '
'; $moreforfilter .= $langs->trans('Keyword').': '; @@ -525,13 +533,6 @@ if ($mode == 'common' || $mode == 'commonkanban') $moreforfilter .= '
'; $moreforfilter .= '
'; - $moreforfilter .= ''; - - $moreforfilter .= '
'.$moreinfo.'
'.$moreinfo2.'
'; - $moreforfilter .= '
'; if (!empty($moreforfilter)) diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 48ace20e6fb..cceb8af9bf7 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -22,10 +22,13 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> border: 1px solid #e9e9e9; margin-bottom: 15px; } -.info-box.info-box-sm{ +.info-box.info-box-sm { min-height: 80px; margin-bottom: 10px; } +.opened-dash-board-wrap .info-box.info-box-sm { + border-radius: 0 0 0 20px; +} .info-box-more { float: right; top: 5px; @@ -82,6 +85,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> font-size: 25px; line-height: 92px; } +.opened-dash-board-wrap .info-box-sm .info-box-icon { + border-radius: 0 20px 0 20px; +} .opened-dash-board-wrap .info-box-sm .info-box-icon { line-height: 80px; }
'; +print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); +print ''; +print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); +print ''; $filtertype = 0; @@ -360,7 +369,7 @@ if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) { $limit = $conf->global->PRODUIT_LIMIT_SIZE; } -$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1); +$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1); print ''; -print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); -print ''; -print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); -print '
'; + print $warehousestatics->getNomUrl(1); + print ''; + print $warehousestatict->getNomUrl(1); + print ''; print $productstatic->getNomUrl(1).' - '.$productstatic->label; print ''; - print $warehousestatics->getNomUrl(1); - print ''; - print $warehousestatict->getNomUrl(1); - print ''.$val['qty'].''.img_delete($langs->trans("Remove")).'