From 0890f20a729f8b4dc500d33d0a9708826c7052df Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Fri, 4 Mar 2016 19:29:08 +0100 Subject: [PATCH 1/3] Update functions.lib.php Add product.lib for function measuring_units_string --- htdocs/core/lib/functions.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 493afb9e4cc..3b5923536d7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3422,6 +3422,8 @@ function price2num($amount,$rounding='',$alreadysqlnb=0) */ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; + if ($dimension < 1/10000) { $dimension = $dimension * 1000000; From 266f1e2acd270dd472a662e146cdfece761430d2 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Fri, 4 Mar 2016 20:02:03 +0100 Subject: [PATCH 2/3] Update commande.class.php subprice should be pu without tax --- htdocs/commande/class/commande.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8f8edcf15a3..9ea0a37d479 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2552,6 +2552,14 @@ class Commande extends CommonOrder // Anciens indicateurs: $price, $subprice, $remise (a ne plus utiliser) $price = $pu; + if ($price_base_type == 'TTC') + { + $subprice = $tabprice[5]; + } + else + { + $subprice = $pu; + } $subprice = $pu; $remise = 0; if ($remise_percent > 0) From 61bd7b330fb2d2fd449d4eabc046b4d878da1a8f Mon Sep 17 00:00:00 2001 From: fappels Date: Sat, 5 Mar 2016 11:44:35 +0100 Subject: [PATCH 3/3] Revert "Update commande.class.php" This reverts commit 266f1e2acd270dd472a662e146cdfece761430d2. --- htdocs/commande/class/commande.class.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 9ea0a37d479..8f8edcf15a3 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2552,14 +2552,6 @@ class Commande extends CommonOrder // Anciens indicateurs: $price, $subprice, $remise (a ne plus utiliser) $price = $pu; - if ($price_base_type == 'TTC') - { - $subprice = $tabprice[5]; - } - else - { - $subprice = $pu; - } $subprice = $pu; $remise = 0; if ($remise_percent > 0)