Fix: un prospect n'était pas passé comme client à la validation d'une facture ou d'une
commande
This commit is contained in:
parent
053f12ded1
commit
a9bb9f896f
@ -175,6 +175,9 @@ class Commande extends CommonObject
|
|||||||
$objMod = new $modName($this->db);
|
$objMod = new $modName($this->db);
|
||||||
$soc = new Societe($this->db);
|
$soc = new Societe($this->db);
|
||||||
$soc->fetch($this->socidp);
|
$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
|
// on vérifie si la commande est en numérotation provisoire
|
||||||
$comref = substr($this->ref, 1, 4);
|
$comref = substr($this->ref, 1, 4);
|
||||||
|
|||||||
@ -977,6 +977,12 @@ class Facture extends CommonObject
|
|||||||
|
|
||||||
if ($error == 0)
|
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->ref = $numfa;
|
||||||
|
|
||||||
$this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0);
|
$this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user