Merge pull request #3575 from atm-ph/fix_3.8_clone_order
FIX clone customer order
This commit is contained in:
commit
4cddb0175b
@ -978,6 +978,7 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->id=0;
|
$this->id=0;
|
||||||
|
$this->ref = '';
|
||||||
$this->statut=self::STATUS_DRAFT;
|
$this->statut=self::STATUS_DRAFT;
|
||||||
|
|
||||||
// Clear fields
|
// Clear fields
|
||||||
@ -987,13 +988,6 @@ class Commande extends CommonOrder
|
|||||||
$this->date_validation = '';
|
$this->date_validation = '';
|
||||||
$this->ref_client = '';
|
$this->ref_client = '';
|
||||||
|
|
||||||
// Set ref
|
|
||||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$conf->global->COMMANDE_ADDON.'.php';
|
|
||||||
$obj = $conf->global->COMMANDE_ADDON;
|
|
||||||
$modCommande = new $obj;
|
|
||||||
$this->ref = $modCommande->getNextValue($objsoc,$this);
|
|
||||||
|
|
||||||
|
|
||||||
// Create clone
|
// Create clone
|
||||||
$result=$this->create($user);
|
$result=$this->create($user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user