From d662bb97dcf54571ac15cea62e0e26e57483131c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Mar 2020 15:02:15 +0100 Subject: [PATCH] Debug parallel sale feature --- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/takepos/floors.php | 2 +- htdocs/takepos/freezone.php | 6 ++++-- htdocs/takepos/index.php | 6 +++--- htdocs/takepos/invoice.php | 5 ++--- htdocs/takepos/pay.php | 2 +- htdocs/takepos/phone.php | 2 +- htdocs/takepos/receipt.php | 2 +- htdocs/takepos/reduction.php | 2 +- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 4658af376f1..ec7348723c5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1652,8 +1652,8 @@ class Facture extends CommonInvoice $this->lines = array(); $sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,'; - $sql .= ' l.situation_percent, l.fk_prev_id,'; $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,'; + $sql .= ' l.situation_percent, l.fk_prev_id,'; $sql .= ' l.rang, l.special_code,'; $sql .= ' l.date_start as date_start, l.date_end as date_end,'; $sql .= ' l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,'; diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index ac74a8d2203..21bd8568539 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -42,7 +42,7 @@ $action = GETPOST('action', 'alpha'); $left = GETPOST('left', 'alpha'); $top = GETPOST('top', 'alpha'); -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $newname = GETPOST('newname', 'alpha'); $mode = GETPOST('mode', 'alpha'); diff --git a/htdocs/takepos/freezone.php b/htdocs/takepos/freezone.php index ee9b61581e2..af7cb169ae0 100644 --- a/htdocs/takepos/freezone.php +++ b/htdocs/takepos/freezone.php @@ -40,7 +40,7 @@ global $mysoc; $langs->loadLangs(array("bills", "cashdesk")); -$place = (GETPOST('place', 'alpha') > 0 ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'); // $place is id of table for Bar or Restaurant $idline = GETPOST('idline', 'int'); $action = GETPOST('action', 'alpha'); @@ -83,15 +83,17 @@ top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss); * @param {string} rate VAT rate */ function ApplyVATRate(id, rate) { + console.log("Save selected VAT Rate into vatRate variable with value "+rate); vatRate = rate; jQuery('button.vat_rate').removeClass('selected'); - jQuery('#vat_rate_' + id).addClass('selected'); + jQuery('#vat_rate_'+id).addClass('selected'); } /** * Save (validate) */ function Save() { + console.log("We click so we call page invoice.php with place= tva_tx="+vatRate); $.get( "invoice.php", { action: "", place: "", desc:$('#desc').val(), number:$('#number').val(), tva_tx: vatRate} ); parent.$.colorbox.close(); } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 03f90e7bd96..cc55da0cad4 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Bar or Restaurant or multiple sales +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant or multiple sales $action = GETPOST('action', 'alpha'); $setterminal = GETPOST('setterminal', 'int'); @@ -435,12 +435,12 @@ function Floors() { function FreeZone() { console.log("Open box to enter a free product"); - $.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"trans("FreeZone"); ?>"}); + $.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"200px", transition:"none", iframe:"true", title:"trans("FreeZone"); ?>"}); } function TakeposOrderNotes() { console.log("Open box to order notes"); - $.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"trans("OrderNotes"); ?>"}); + $.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"250px", transition:"none", iframe:"true", title:"trans("OrderNotes"); ?>"}); } function Refresh() { diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 15f26967529..8d88e1d2f34 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -44,7 +44,7 @@ $langs->loadLangs(array("companies", "commercial", "bills", "cashdesk", "stocks" $id = GETPOST('id', 'int'); $action = GETPOST('action', 'alpha'); $idproduct = GETPOST('idproduct', 'int'); -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Bar or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant $placeid = 0; // $placeid is ID of invoice if (empty($user->rights->takepos->run)) { @@ -999,8 +999,7 @@ if ($placeid > 0) $moreinfo = ''; $moreinfo .= $langs->transcountry("TotalHT", $mysoc->country_code).': '.price($line->total_ht); if ($line->vat_src_code) $moreinfo .= '
'.$langs->trans("VATCode").': '.$line->vat_src_code; - $moreinfo .= '
'.$langs->transcountry("TotalVAT", $mysoc->country_code).': '.price($line->total_vat); - //$moreinfo .= '
'.$langs->transcountry("VATRate", $mysoc->country_code).': '.price($line->); + $moreinfo .= '
'.$langs->transcountry("TotalVAT", $mysoc->country_code).': '.price($line->total_tva); $moreinfo .= '
'.$langs->transcountry("TotalLT1", $mysoc->country_code).': '.price($line->total_localtax1); $moreinfo .= '
'.$langs->transcountry("TotalLT2", $mysoc->country_code).': '.price($line->total_localtax2); $moreinfo .= '
'.$langs->transcountry("TotalTTC", $mysoc->country_code).': '.price($line->total_ttc); diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index a3bac766aaf..e6391de1aa0 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -34,7 +34,7 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'); // $place is id of table for Bar or Restaurant $invoiceid = GETPOST('invoiceid', 'int'); diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 424282d27cf..9fc3fa65d0c 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $action = GETPOST('action', 'alpha'); $setterminal = GETPOST('setterminal', 'int'); diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 50010cf1712..9f68dba0633 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -30,7 +30,7 @@ include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->loadLangs(array("main", "cashdesk", "companies")); -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $facid = GETPOST('facid', 'int'); diff --git a/htdocs/takepos/reduction.php b/htdocs/takepos/reduction.php index f4a83a09c52..7de11b81ae4 100644 --- a/htdocs/takepos/reduction.php +++ b/htdocs/takepos/reduction.php @@ -34,7 +34,7 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $invoiceid = GETPOST('invoiceid', 'int');