From 3048a16b4299b7d460b538d7fde9093a37c09cd1 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Tue, 17 Nov 2020 10:11:58 +0100 Subject: [PATCH 1/2] NEW log sale without lines as error in cash desk --- 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 9c4a5320c58..e0e4ba07561 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -207,7 +207,8 @@ if ($action == 'valid' && $user->rights->facture->creer) dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1); } } elseif (count($invoice->lines) == 0) { - dol_syslog("Sale without lines"); + $error++; + dol_syslog('Sale without lines', LOG_ERR); dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1); } elseif (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") { $savconst = $conf->global->STOCK_CALCULATE_ON_BILL; From 8de5925f8b3edc79836f930f6799fc57e9166333 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 18 Nov 2020 14:32:11 +0100 Subject: [PATCH 2/2] FIX remove LOG_ERR in syslog --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index e0e4ba07561..c7cfb2c0899 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -208,7 +208,7 @@ if ($action == 'valid' && $user->rights->facture->creer) } } elseif (count($invoice->lines) == 0) { $error++; - dol_syslog('Sale without lines', LOG_ERR); + dol_syslog('Sale without lines'); dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1); } elseif (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") { $savconst = $conf->global->STOCK_CALCULATE_ON_BILL;