From 3730d874c92b2801b426a4596439b51cf4aaf3f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2013 18:01:25 +0200 Subject: [PATCH] Fix: [ bug #991 ] Error when adding a product in POS when no Tax is associated to the country of the company --- htdocs/core/lib/price.lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index c561210024f..2a058e154b5 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -69,6 +69,9 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $result=array(); + // Clean parameters + if (empty($txtva)) $txtva=0; + if (empty($seller) || ! is_object($seller)) { if (! is_object($mysoc)) // mysoc may be not defined (during migration process)