From 18424812db785ee41eea1284136a14e513efedf8 Mon Sep 17 00:00:00 2001 From: cla Date: Fri, 3 Jun 2016 23:49:08 +0200 Subject: [PATCH 1/2] closes #5192. I deleted the line and moved last_insert_id() functions 3 lines under --- htdocs/fourn/class/fournisseur.commande.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index c3f21a15f4c..e0939258ad1 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1452,12 +1452,10 @@ class CommandeFournisseur extends CommonOrder //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) From deb7c407adbdb7bb8076fb5755498b8631636d39 Mon Sep 17 00:00:00 2001 From: cla Date: Sat, 4 Jun 2016 00:08:13 +0200 Subject: [PATCH 2/2] FIX #4643 --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 844b7e9f700..8dbddcde2ab 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -132,7 +132,7 @@ if ($status) if ($status == '6,7') $title.=' - '.$langs->trans("StatusOrderCanceled"); else $title.=' - '.$langs->trans($commandestatic->statuts[$status]); } -if ($billed) $title.=' - '.$langs->trans("Billed"); +if ($billed > 0) $title.=' - '.$langs->trans("Billed"); llxHeader('',$title);