From 48419da7698617d50b69ebcdd56510f5850be975 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 10 Sep 2019 14:58:55 +0200 Subject: [PATCH 1/3] FIX new invoice with generic thirdparty in takepos by default, new invoice should always create with default thirdparty and avoid errors : creating new invoice with last customer and forget to change it... --- htdocs/takepos/invoice.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 6ae5429d062..accc4befe82 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -280,8 +280,10 @@ if ($action == "delete") { $resql1 = $db->query($sql); $sql = "DELETE FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture = ".$placeid; $resql2 = $db->query($sql); + $sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; + $resql3 = $db->query($sql); - if ($resql1 && $resql2) + if ($resql1 && $resql2 && $resql3) { $db->commit(); } From 5f23ba5467d686371763a39c8276b81538197284 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 12 Sep 2019 08:04:53 +0200 Subject: [PATCH 2/3] FIX avoid non numeric warning --- htdocs/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 0fd061ac7ed..24af2adce15 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -659,7 +659,7 @@ if (empty($reshook)) } $qty = GETPOST('qty' . $predef); - $remise_percent = GETPOST('remise_percent' . $predef); + $remise_percent = (GETPOST('remise_percent'.$predef) != '' ? GETPOST('remise_percent'.$predef) : 0); // Extrafields $extrafieldsline = new ExtraFields($db); From 7966bfc2df727ec3c8ad9a0a143baa98160628a9 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 13 Sep 2019 15:25:16 +0200 Subject: [PATCH 3/3] fix: fill id for links (document tab) --- htdocs/core/class/link.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 283b296b3e3..e934f26324d 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -334,6 +334,7 @@ class Link extends CommonObject if($this->db->num_rows($resql) > 0) { $obj = $this->db->fetch_object($resql); + $this->id=$obj->rowid; $this->entity = $obj->entity; $this->datea = $this->db->jdate($obj->datea); $this->url = $obj->url;