From d4d3e28437d05a8fab8c7df46211aad57b2885fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Aug 2019 15:53:03 +0200 Subject: [PATCH 1/2] It is diffcult to understand how stock decrease is done so we show the ref of stock. --- htdocs/takepos/invoice.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 9616085f6fb..1682db54468 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -136,11 +136,12 @@ if ($action == 'valid' && $user->rights->facture->creer) $invoice->update($user); } - if (! empty($conf->stock->enabled) && $conf->global->{'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]} != "1") + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; + if (! empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") { $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; dol_syslog("Validate invoice with stock change into warehouse id ".$constantforkey); - $invoice->validate($user, '', $conf->global->$cosntantforkey); + $invoice->validate($user, '', $conf->global->$constantforkey); } else { @@ -593,8 +594,17 @@ if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takep $soc = new Societe($db); if ($invoice->socid > 0) $soc->fetch($invoice->socid); else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); - print '

'; + print '

'; print $langs->trans("Customer").': '.$soc->name; + + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; + if (! empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") + { + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; + $warehouse = new Entrepot($db); + $warehouse->fetch($conf->global->$constantforkey); + print '
'.$langs->trans("Warehouse").': '.$warehouse->ref; + } print '

'; } From 1ac9affd82083db74ce54ef50f828e3a4bd4ae1b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Aug 2019 15:54:44 +0200 Subject: [PATCH 2/2] Trans --- htdocs/langs/en_US/cashdesk.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 749c749293c..d65046d3277 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -62,6 +62,7 @@ TicketVatGrouped=Group VAT by rate in tickets AutoPrintTickets=Automatically print tickets EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ? +ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ? History=History ValidateAndClose=Validate and close Terminal=Terminal