forked from Wavyzz/dolibarr
Some fix to support correctly parallel sales
This commit is contained in:
@@ -97,3 +97,4 @@ TakeposNumpadUsePaymentIcon=Use payment icon on numpad
|
||||
CashDeskRefNumberingModules=Numbering module for cash desk
|
||||
CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag is used to add the terminal number
|
||||
TakeposGroupSameProduct=Group same products lines
|
||||
StartAParallelSale=Start a new parallel sale
|
||||
@@ -102,6 +102,7 @@ $search_parent_name = GETPOST('search_parent_name', 'alpha');
|
||||
$type = GETPOST('type', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$mode = GETPOST("mode", 'alpha');
|
||||
$place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant
|
||||
|
||||
$diroutputmassaction = $conf->societe->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
|
||||
@@ -228,7 +229,6 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
if ($action == "change") // Change customer for TakePOS
|
||||
{
|
||||
$idcustomer = GETPOST('idcustomer', 'int');
|
||||
$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant
|
||||
|
||||
// Check if draft invoice already exists, if not create it
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' AND entity IN (".getEntity('invoice').")";
|
||||
@@ -252,8 +252,8 @@ if ($action == "change") // Change customer for TakePOS
|
||||
$resql = $db->query($sql);
|
||||
?>
|
||||
<script>
|
||||
console.log("Reload page invoice.php");
|
||||
parent.$("#poslines").load("invoice.php?place="+<?php print $place; ?>, function() {
|
||||
console.log("Reload page invoice.php with place=<?php print $place; ?>");
|
||||
parent.$("#poslines").load("invoice.php?place=<?php print $place; ?>", function() {
|
||||
//parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
|
||||
<?php if (!$resql) { ?>
|
||||
alert('Error failed to update customer on draft invoice.');
|
||||
@@ -1031,8 +1031,7 @@ while ($i < min($num, $limit))
|
||||
print '<tr class="oddeven"';
|
||||
if ($contextpage == 'poslist')
|
||||
{
|
||||
$place = (GETPOST('place', 'alpha') > 0 ? GETPOST('place', 'alpha') : 0); // $place is id of table for Bar or Restaurant
|
||||
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.$place.'\'"';
|
||||
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.urlencode($place).'\'"';
|
||||
}
|
||||
print '>';
|
||||
if (!empty($arrayfields['s.rowid']['checked']))
|
||||
|
||||
@@ -743,7 +743,7 @@ $( document ).ready(function() {
|
||||
}
|
||||
echo '$("#customerandsales").append(\'<a onclick="location.href=\\\'index.php?place=0-';
|
||||
echo $max_sale+1;
|
||||
echo '\\\'"><span class="fa fa-plus-square"></a>\');';
|
||||
echo '\\\'"><span class="fa fa-plus-square" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"></a>\');';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user