Debug parallel sale feature
This commit is contained in:
parent
d965aad6e6
commit
d662bb97dc
@ -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,';
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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=<?php echo $place; ?> tva_tx="+vatRate);
|
||||
$.get( "invoice.php", { action: "<?php echo $action; ?>", place: "<?php echo $place; ?>", desc:$('#desc').val(), number:$('#number').val(), tva_tx: vatRate} );
|
||||
parent.$.colorbox.close();
|
||||
}
|
||||
|
||||
@ -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:"<?php echo $langs->trans("FreeZone"); ?>"});
|
||||
$.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"200px", transition:"none", iframe:"true", title:"<?php echo $langs->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:"<?php echo $langs->trans("OrderNotes"); ?>"});
|
||||
$.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"250px", transition:"none", iframe:"true", title:"<?php echo $langs->trans("OrderNotes"); ?>"});
|
||||
}
|
||||
|
||||
function Refresh() {
|
||||
|
||||
@ -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 .= '<br>'.$langs->trans("VATCode").': '.$line->vat_src_code;
|
||||
$moreinfo .= '<br>'.$langs->transcountry("TotalVAT", $mysoc->country_code).': '.price($line->total_vat);
|
||||
//$moreinfo .= '<br>'.$langs->transcountry("VATRate", $mysoc->country_code).': '.price($line->);
|
||||
$moreinfo .= '<br>'.$langs->transcountry("TotalVAT", $mysoc->country_code).': '.price($line->total_tva);
|
||||
$moreinfo .= '<br>'.$langs->transcountry("TotalLT1", $mysoc->country_code).': '.price($line->total_localtax1);
|
||||
$moreinfo .= '<br>'.$langs->transcountry("TotalLT2", $mysoc->country_code).': '.price($line->total_localtax2);
|
||||
$moreinfo .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).': '.price($line->total_ttc);
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user