From 5c2c06de3b2fd5bc6f74c829bf9c28dabfdaa673 Mon Sep 17 00:00:00 2001 From: Quentin VIAL-GOUTEYRON Date: Fri, 18 Feb 2022 15:39:56 +0100 Subject: [PATCH] NEW : JS inventory autocalc input --- htdocs/product/inventory/inventory.php | 76 +++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 9 deletions(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 795e3ad11bb..06c8ae0d2f5 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -1016,20 +1016,15 @@ if ($object->id > 0) { print ''; //PMP Real print ''; - print ''; - print img_picto('', 'eraser', 'class="opacitymedium"'); - print ''; + if(! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; else $pmp_real = $product_static->pmp; $pmp_valuation_real = $pmp_real * $qty_view; - print ''; + print ''; print ''; print ''; - print ''; - print img_picto('', 'eraser', 'class="opacitymedium"'); - print ''; - print ''; + print ''; print ''; $totalExpectedValuation += $pmp_valuation; @@ -1089,7 +1084,7 @@ if ($object->id > 0) { print ''; print ''.$langs->trans("Total").''; print ''.price($totalExpectedValuation).''; - print ''.price($totalRealValuation).''; + print ''.price($totalRealValuation).''; print ''; print ''; } @@ -1115,6 +1110,69 @@ if ($object->id > 0) { '; } print ''; + + + if(! empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { + ?> + +