From 8dd8ccad2eb19b16008fd2a20137cf6b43e8f1d2 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 1 Apr 2013 23:28:44 +0200 Subject: [PATCH] fix: some issue on the road to numbering supplier invoice --- htdocs/fourn/class/fournisseur.facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 3ca14f707e3..93fc2dd3963 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -123,7 +123,7 @@ class FactureFournisseur extends CommonInvoice if (empty($this->date)) $this->date=$now; $socid = $this->socid; - $number = $this->ref_supplier?$this->ref_supplier:$this->ref; + $ref_supplier = $this->ref_supplier; $amount = $this->amount; $remise = $this->remise; @@ -147,7 +147,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ")"; $sql.= " VALUES ("; $sql.= "'(PROV)'"; - $sql.= ", '".$this->db->escape($number)."'"; + $sql.= ", '".$this->db->escape($this->$ref_supplier)."'"; $sql.= ", ".$conf->entity; $sql.= ", '".$this->db->escape($this->libelle)."'"; $sql.= ", ".$this->socid;