From 99fac7c8d3999678d96c2e09aedf45b99ae16e22 Mon Sep 17 00:00:00 2001 From: MarcVJ <38230768+MarcVJ@users.noreply.github.com> Date: Sun, 9 Feb 2025 22:20:05 +0100 Subject: [PATCH 1/2] Added one line to allow use of price_ttc in calculated extra fields (ex : price per kilo) --- htdocs/product/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index aa378d1c85c..c023c3ca97d 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1628,7 +1628,8 @@ while ($i < $imaxinloop) { } $product_static->price = $obj->price; - + $product_static->price_ttc = $obj->price_ttc; // Allows to use price_ttc in calculated extra fields (ex : price per kilo) + $object = $product_static; $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'lire'); From 4c3329481aa8bbfcc876168ac0120f248121f3a5 Mon Sep 17 00:00:00 2001 From: MarcVJ <38230768+MarcVJ@users.noreply.github.com> Date: Sun, 9 Feb 2025 22:33:56 +0100 Subject: [PATCH 2/2] Removed incorrect white space on line 1632 --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index c023c3ca97d..d262f757909 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1629,7 +1629,7 @@ while ($i < $imaxinloop) { $product_static->price = $obj->price; $product_static->price_ttc = $obj->price_ttc; // Allows to use price_ttc in calculated extra fields (ex : price per kilo) - + $object = $product_static; $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'lire');