forked from Wavyzz/dolibarr
Qual: Removed useless methods
Qual: Removed deprecated vars Qual: Free memory
This commit is contained in:
@@ -1344,16 +1344,13 @@ class Commande extends CommonOrder
|
||||
$this->lines = array();
|
||||
|
||||
if ($this->statut == 0) $this->brouillon = 1;
|
||||
|
||||
|
||||
// Retreive all extrafield for invoice
|
||||
// fetch optionals attributes and labels
|
||||
if(!class_exists('Extrafields'))
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields=new ExtraFields($this->db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||
if (count($extralabels)>0) {
|
||||
$this->fetch_optionals($this->id,$extralabels);
|
||||
}
|
||||
$this->fetch_optionals($this->id,$extralabels);
|
||||
|
||||
$this->db->free();
|
||||
|
||||
@@ -2430,7 +2427,7 @@ class Commande extends CommonOrder
|
||||
// Delete linked contacts
|
||||
$res = $this->delete_linked_contact();
|
||||
if ($res < 0) $error++;
|
||||
|
||||
|
||||
// Remove extrafields
|
||||
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
|
||||
{
|
||||
@@ -2468,8 +2465,8 @@ class Commande extends CommonOrder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@@ -2833,6 +2830,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->nb["orders"]=$obj->nb;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@@ -3127,7 +3125,7 @@ class OrderLine extends CommonOrderLine
|
||||
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
@@ -3235,7 +3233,7 @@ class OrderLine extends CommonOrderLine
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
@@ -3339,7 +3337,7 @@ class OrderLine extends CommonOrderLine
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
|
||||
Reference in New Issue
Block a user