From 7b59a66d119477c4e5a5ce37ee37d2442887695f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Jul 2010 21:57:07 +0000 Subject: [PATCH] Fix: Insert error --- htdocs/compta/facture/class/facture.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 5fe1f87f915..db2e5b249bd 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005 Marc Barilley / Ocebo @@ -3016,8 +3016,9 @@ class FactureLigne // Clean parameters $this->desc=trim($this->desc); - if (! $this->subprice) $this->subprice=0; - if (! $this->price) $this->price=0; + if (empty($this->subprice)) $this->subprice=0; + if (empty($this->price)) $this->price=0; + if (empty($this->tva_tx)) $this->tva_tx=0; // Check parameters if ($this->product_type < 0) return -1;