Fix Error when trying to clone an Order
This commit is contained in:
parent
692881bf59
commit
0c7cabbf37
@ -898,6 +898,13 @@ 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