From 7c458777cf04922d0796b3ab1b4350ede32de13a Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 4 Feb 2013 10:21:59 +0100 Subject: [PATCH 1/2] Task # 559 : product customer prices by quantity, correction --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f31cb0f741e..80859d5d883 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1171,7 +1171,7 @@ class Form $sql.= ", pl.label as label_translated"; } // Price by quantity - if (! empty($conf->global->PRODUIT_PRICE_BY_QTY)) + if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { $sql.= ", (SELECT pp.rowid FROM ".MAIN_DB_PREFIX."product_price as pp WHERE pp.fk_product = p.rowid"; if ($price_level >= 1) $sql.= " AND price_level=".$price_level; From 1cfd32680aacd0c6a5e0215735046808e9a760ca Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 13 Feb 2013 15:43:27 +0100 Subject: [PATCH 2/2] Fix : set some vars when invoice is back to draft status --- htdocs/compta/facture/class/facture.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b96fd57916d..8618c729592 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1829,6 +1829,8 @@ class Facture extends CommonInvoice if ($error == 0) { + $this->brouillon = 1; + $this->statut = 0; $this->db->commit(); return 1; }