Skip to content

Commit

Permalink
closes #5192.
Browse files Browse the repository at this point in the history
I deleted the line and moved last_insert_id() functions 3 lines under
  • Loading branch information
aschio committed Jun 3, 2016
1 parent a36abd4 commit 1842481
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -1452,12 +1452,10 @@ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0
//print $sql;
if ($resql)
{
$this->rowid = $this->db->last_insert_id(MAIN_DB_PREFIX.'commande_fournisseurdet');

if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$linetmp = new CommandeFournisseurLigne($this->db);
$linetmp->id=$this->rowid;
$linetmp->id=$this->db->last_insert_id(MAIN_DB_PREFIX.'commande_fournisseurdet');
$linetmp->array_options = $array_options;
$result=$linetmp->insertExtraFields();
if ($result < 0)
Expand Down

0 comments on commit 1842481

Please sign in to comment.