Clean code

This commit is contained in:
Laurent Destailleur
2019-11-12 10:11:30 +01:00
parent 9fc1c98192
commit c02cd80b75
15 changed files with 65 additions and 53 deletions

View File

@@ -1565,7 +1565,7 @@ class Commande extends CommonOrder
if ($result > 0)
{
$this->db->commit();
return $this->line->rowid;
return $this->line->id;
}
else
{
@@ -3104,7 +3104,7 @@ class Commande extends CommonOrder
$this->line->rang = $rangmax + 1;
}
$this->line->rowid=$rowid;
$this->line->id=$rowid;
$this->line->label=$label;
$this->line->desc=$desc;
$this->line->qty=$qty;
@@ -4267,11 +4267,11 @@ class OrderLine extends CommonOrderLine
$resql=$this->db->query($sql);
if ($resql)
{
$this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'commandedet');
$this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.'commandedet');
$this->rowid = $this->id;
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$this->id=$this->rowid;
$result=$this->insertExtraFields();
if ($result < 0)
{