From acdac6552bdad0727cf0a0ae249f4688c1ce48b9 Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Wed, 7 Sep 2022 17:49:39 +0200 Subject: [PATCH 1/5] FIX : inventory total columns --- htdocs/product/inventory/inventory.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 00523c6bf3d..e2455b30372 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -950,19 +950,23 @@ if ($object->id > 0) { print ''; } print ''; - print ''; - print ''; - print ''; if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { print ''; print ''; print ''; print ''; print ''; + print ''; print ''; print ''; print ''; - } + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + } // Actions print ''; print ''; @@ -1160,9 +1164,9 @@ if ($object->id > 0) { } if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { print ''; - print ''.$langs->trans("Total").''; + print ''.$langs->trans("Total").''; print ''.price($totalExpectedValuation).''; - print ''.price($totalRealValuation).''; + print ''.price($totalRealValuation).''; print ''; print ''; } From 24a61b57db3c555fab101e1195edefed927a9fd5 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 7 Sep 2022 16:09:08 +0000 Subject: [PATCH 2/5] Fixing style errors. --- htdocs/product/inventory/inventory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index e2455b30372..b33e471c3e4 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -966,7 +966,7 @@ if ($object->id > 0) { print ''; print ''; print ''; - } + } // Actions print ''; print ''; From 0234b352fe2e0f342dd86aa1aa54e41ec6e311df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?This=20Charl=C3=A8ne?= <1179011+defrance@users.noreply.github.com> Date: Wed, 7 Sep 2022 23:13:49 +0200 Subject: [PATCH 3/5] php V8 warning --- htdocs/supplier_proposal/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 9e92a5fb4b6..3f7b1eeb71c 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1282,7 +1282,7 @@ if ($action == 'create') { // Shipping Method if (!empty($conf->expedition->enabled)) { print ''.$langs->trans('SendingMethod').''; - print $form->selectShippingMethod(GETPOST('shipping_method_id') > 0 ? GETPOST('shipping_method_id', 'int') : $shipping_method_id, 'shipping_method_id', '', 1); + print $form->selectShippingMethod(GETPOST('shipping_method_id') > 0 ? GETPOST('shipping_method_id', 'int') : "", 'shipping_method_id', '', 1); print ''; } @@ -1290,7 +1290,7 @@ if ($action == 'create') { print ''.$langs->trans("DeliveryDate").''; print ''; $datedelivery = dol_mktime(0, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); - if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "") { + if (!empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) { $tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); @@ -1307,7 +1307,7 @@ if ($action == 'create') { print ''.$langs->trans("DefaultModel").''; print ''; $list = ModelePDFSupplierProposal::liste_modeles($db); - $preselected = ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF); + $preselected = (!empty($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT) ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF); print $form->selectarray('model', $list, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); print ""; From 15ae8709242855df49f73cc4828499627325b4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?This=20Charl=C3=A8ne?= <1179011+defrance@users.noreply.github.com> Date: Wed, 7 Sep 2022 23:17:24 +0200 Subject: [PATCH 4/5] Update card.php --- htdocs/supplier_proposal/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 3f7b1eeb71c..5756149e74d 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -448,10 +448,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { From 72c4bb91066ec3e95b1de86b3e7d47d457b95b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?This=20Charl=C3=A8ne?= <1179011+defrance@users.noreply.github.com> Date: Wed, 7 Sep 2022 23:29:41 +0200 Subject: [PATCH 5/5] Update card.php --- htdocs/supplier_proposal/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 5756149e74d..09f12d70e4a 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -686,6 +686,7 @@ if (empty($reshook)) { $ref_supplier = $productsupplier->ref_supplier; // Get vat rate + $tva_npr = 0; if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority) $tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); $tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); @@ -841,10 +842,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) {