diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index 2179e9141bc..9e6f9d2a448 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -32,6 +32,7 @@ if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); 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'; $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk")); @@ -62,6 +63,9 @@ if ($action == "getTables") $resql = $db->query($sql); $rows = array(); while ($row = $db->fetch_array($resql)) { + $invoice = new Facture($db); + $result=$invoice->fetch('', '(PROV-POS'.$_SESSION['takeposterminal'].'-'.$row['rowid'].')'); + if ($result>0) $row['occupied']="red"; $rows[] = $row; } echo json_encode($rows); @@ -113,6 +117,9 @@ text-align: center; font-size:300%; color:white; } +div.red{ +color:red; +} html, body { height: 100%; @@ -172,7 +179,7 @@ $( document ).ready(function() { $(this).focus(); }) - $('body').append('
'+val.label+'
'); + $('body').append('
'+val.label+'
'); }); });