diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 04ad577bff9..63641f27625 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -228,7 +228,7 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
if ($action == "change") // Change customer for TakePOS
{
$idcustomer = GETPOST('idcustomer', 'int');
- $place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+ $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').")";
@@ -1031,7 +1031,7 @@ while ($i < min($num, $limit))
print '
0 ? GETPOST('place', 'int') : 0); // $place is id of table for Bar or Restaurant
+ $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 '>';
diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php
index 260813dd3b6..ac74a8d2203 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 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 1d4e0dfc7be..ee9b61581e2 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+$place = (GETPOST('place', 'alpha') > 0 ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant
$idline = GETPOST('idline', 'int');
$action = GETPOST('action', 'alpha');
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index 9615f90d539..03f90e7bd96 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Bar or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Bar or Restaurant or multiple sales
$action = GETPOST('action', 'alpha');
$setterminal = GETPOST('setterminal', 'int');
@@ -732,7 +732,9 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
echo ' - '.dol_print_date(dol_now(), "day").'';
?>
-
+
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 683b74edc4b..501984d9460 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Bar or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Bar or Restaurant
$placeid = 0; // $placeid is ID of invoice
if (empty($user->rights->takepos->run)) {
@@ -713,9 +713,28 @@ $( document ).ready(function() {
}
?>
- $("a#customer").html('');
+ $("#customerandsales").html('');
query($sql);
+ if ($resql) {
+ while ($obj = $db->fetch_object($resql)) {
+ echo '$("#customerandsales").append(\'';
+ if ($placeid==$obj->rowid) echo "";
+ echo 'ref));
+ echo $num_sale;
+ if (str_replace("-", "", $num_sale)>$max_sale) $max_sale=str_replace("-", "", $num_sale);
+ echo '\\\'">'.date('H:i', strtotime($obj->datec));
+ if ($placeid==$obj->rowid) echo "";
+ echo '\');';
+ }
+ echo '$("#customerandsales").append(\'\');';
+ }
+
$s = '';
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"];
diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php
index f79e310f36b..a3bac766aaf 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant
$invoiceid = GETPOST('invoiceid', 'int');
diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php
index c32561d3f52..424282d27cf 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 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 31390c347bd..50010cf1712 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 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 7ad3e88d2b5..f4a83a09c52 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', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
+$place = (GETPOST('place', 'alpha') ? GETPOST('place', 'alpha') : 0); // $place is id of table for Ba or Restaurant
$invoiceid = GETPOST('invoiceid', 'int');