2
0
forked from Wavyzz/dolibarr

FIX update extrafields

This commit is contained in:
Laurent Destailleur
2018-08-12 16:29:26 +02:00
parent e1877625a0
commit 12e21b4886
14 changed files with 90 additions and 70 deletions

View File

@@ -3067,17 +3067,23 @@ class Commande extends CommonOrder
$error++; $this->errors[]="Error ".$this->db->lasterror();
}
if (! $error)
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0)
{
if (! $notrigger)
$result=$this->insertExtraFields();
if ($result < 0)
{
// Call trigger
$result=$this->call_trigger('ORDER_MODIFY', $user);
if ($result < 0) $error++;
// End call triggers
$error++;
}
}
if (! $error && ! $notrigger)
{
// Call trigger
$result=$this->call_trigger('ORDER_MODIFY', $user);
if ($result < 0) $error++;
// End call triggers
}
// Commit or rollback
if ($error)
{