From ba2df8ac0886266763c18fd232609e09646d523d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Jul 2010 09:36:10 +0000 Subject: [PATCH] Fix: Works if country not defined --- htdocs/comm/propal/class/propal.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 56db346c8d2..5c3e0cfa78e 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2220,8 +2220,8 @@ class Propal extends CommonObject /** - \class PropalLigne - \brief Classe permettant la gestion des lignes de propales + * \class PropalLigne + * \brief Class to manage commercial proposal lines */ class PropaleLigne { @@ -2330,7 +2330,7 @@ class PropaleLigne /** * \brief Insert object line propal in database - * \return int <0 si ko, >0 si ok + * \return int <0 if KO, >0 if OK */ function insert() { @@ -2343,6 +2343,7 @@ class PropaleLigne if (! $this->remise) $this->remise=0; if (! $this->remise_percent) $this->remise_percent=0; if (! $this->info_bits) $this->info_bits=0; + if (empty($this->tva_tx)) $this->tva_tx=0; // Check parameters if ($this->type < 0) return -1; @@ -2367,7 +2368,7 @@ class PropaleLigne } } - // Insertion dans base de la ligne + // Insert line into database $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'propaldet'; $sql.= ' (fk_propal, description, fk_product, product_type, fk_remise_except, qty, tva_tx, localtax1_tx, localtax2_tx,'; $sql.= ' subprice, remise_percent, ';