From a9bb9f896f39ea0c9789ee091cf4d450d44c9442 Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Sun, 6 Aug 2006 17:54:27 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20un=20prospect=20n'=E9tait=20pas=20pass?= =?UTF-8?q?=E9=20comme=20client=20=E0=20la=20validation=20d'une=20facture?= =?UTF-8?q?=20ou=20d'une=20=20commande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 3 +++ htdocs/facture.class.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 924fe36d470..d4897ff72d9 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -175,6 +175,9 @@ class Commande extends CommonObject $objMod = new $modName($this->db); $soc = new Societe($this->db); $soc->fetch($this->socidp); + + // Classe la soci�t� rattach�e comme client + $result=$soc->set_as_client(); // on v�rifie si la commande est en num�rotation provisoire $comref = substr($this->ref, 1, 4); diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index d5f1172a1df..3ec7735ee56 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -977,6 +977,12 @@ class Facture extends CommonObject if ($error == 0) { + + // Classe la soci�t� rattach�e comme client + $soc=new Societe($this->db); + $soc->id = $this->socidp; + $result=$soc->set_as_client(); + $this->ref = $numfa; $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); -- GitLab