From 3665e9137a4d9c0435aae67ecf12d4e9d68fff46 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Tue, 19 Mar 2019 23:05:08 +0100 Subject: [PATCH] In a previous commit the command to change 'ref' has been deleted. And now TakePOS don't work. In Dolibarr the next command not work on draft invoice: $invoice->ref = "(PROV-POS-".$place.")"; So I return to the previous command: $sql="UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS-".$place.")' where rowid=".$placeid; --- htdocs/takepos/invoice.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 98a40884497..45a65af3f94 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -87,11 +87,12 @@ if (($action=="addline" || $action=="freezone") && $placeid == 0) { $invoice->socid = $conf->global->CASHDESK_ID_THIRDPARTY; $invoice->date = dol_now(); - $invoice->ref = "(PROV-POS-".$place.")"; $invoice->module_source = 'takepos'; $invoice->pos_source = (string) $place; $placeid = $invoice->create($user); + $sql="UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS-".$place.")' where rowid=".$placeid; + $db->query($sql); } if ($action == "addline") {