ordersprinter/webapp/waiterdesktop.php

178 lines
84 KiB
PHP
Raw Normal View History

2020-11-19 23:00:09 +01:00
<html>
<head>
<title>Ansicht Kellner</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
2020-11-19 23:14:10 +01:00
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.6">
2020-11-19 23:00:09 +01:00
<link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" />
<link rel="stylesheet" href="css/productpanel.css" />
<link rel="stylesheet" href="css/grouppanel.css" />
<link rel="stylesheet" href="css/groupitem.css" />
<link rel="stylesheet" href="css/ordereditem.css" />
<link rel="stylesheet" href="css/roompanel.css" />
<link rel="stylesheet" href="css/extraspanel.css" />
<link rel="stylesheet" href="css/actpanel.css" />
<link rel="stylesheet" href="css/paypanel.css" />
2020-11-19 23:14:10 +01:00
<link rel="stylesheet" href="css/numfield.css?v=1.6.6" />
2020-11-19 23:00:09 +01:00
<link rel="stylesheet" href="php/3rdparty/jqueryui1-12-0/jquery-ui.min.css" />
<script src="php/3rdparty/jquery-2.2.4.min.js"></script>
<script src="php/3rdparty/jqueryui1-12-0/jquery-ui.min.js"></script>
2020-11-19 23:01:07 +01:00
<script src="elements/tablemap.js"></script>
2020-11-19 23:00:09 +01:00
<script src="elements/grouping.js"></script>
2020-11-19 23:12:39 +01:00
<script src="elements/extra.js"></script>
2020-11-19 23:00:09 +01:00
<script src="utilities.js"></script>
<script src="receiptutils.js"></script>
<script>
2020-11-19 23:14:02 +01:00
function sendNewOrders(b){var a=getTableid();if(neworders.length!=0){var c={tableid:a,prods:neworders,print:(b?1:0),payprinttype:"s"};doAjax("POST","php/contenthandler.php?module=queue&command=addProductListToQueue",c,handleSentNewOrders,"Fehler bei Produktversand",false)}else{alert("Es sind keine Produkte ausgewählt worden.")}}function handleSentNewOrders(a){if(a.status!="OK"){alert("Es ist ein Fehler beim Versenden der Bestellung aufgetreten")}else{neworders=[];$("#search").val("");refreshGui()}}function refreshGui(){requestRoomInformation();clearProductsSelection();requestProdInformation();requestOrderedInformation();displayPanels();allowPrintAndOrderBtn=true}function getTableid(){if(selectedroomindex!==null){if(selectedroomindex<0){return 0}else{if(selectedtableindex!==null){var a=roominfo.roomstables[selectedroomindex].tables[selectedtableindex];return a.id}else{return 0}}}}function enableSendButton(){}function disableSendButton(){}function moveItems(){$("#selectiondialog").dialog({autoOpen:false,modal:true,height:400,buttons:{Abbrechen:function(){$(this).dialog("close")}}});var a=getRoomsForDialog();$("#selectiondialog").html(a);$("#selectiondialog").dialog("open");$(".ui-dialog-buttonset .ui-button").css("background-color","#44ff44");$(".ui-widget-header").css("background-color","#ff4400");bindMoveItemsRoom()}function bindMoveItemsRoom(){$(".roomchangeitem").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();var b=parseInt(this.id.split("_")[1]);var a=getTablesForDialog(b);$("#selectiondialog").dialog("open");$("#selectiondialog").html(a);bindMoveItemsTable(b)})}function bindRightButtons(){$("#sendNewOrders").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();if(allowPrintAndOrderBtn){allowPrintAndOrderBtn=false;unZoomTableMap();updateChangeTableBtnIfTableIsSelected();sendNewOrders(false)}});$("#paydeskbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();if(allowPrintAndOrderBtn){allowPrintAndOrderBtn=false;unZoomTableMap();if(neworders.length>0){if(waitergopayprint==1){sendNewOrders(true)}else{sendNewOrders(false)}}goPayDesk()}});$("#workbtn").off("click").on("click",function(a){if(allowPrintAndOrderBtn){allowPrintAndOrderBtn=false;unZoomTableMap();updateChangeTableBtnIfTableIsSelected();if(neworders.length>0){sendNewOrders(true)}}});$("#goorderbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();unZoomTableMap();goOrderDesk()});$("#mainmenudlg").dialog({autoOpen:false,modal:true});$("#changetablebtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();unZoomTableMap();moveItems()});$("#tablerecordsbtn").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var a=getTableid();doAjax("GET","php/contenthandler.php?module=queue&command=getRecords&tableid="+a,null,showRecords,true)})}function showRecords(b){if(b.status!="OK"){alert("Fehler aufgetreten: "+b.msg)}else{var a=createTableRecords(b);$("#recordsdlg").dialog({autoOpen:false,modal:true,height:570,width:600,buttons:{Abbrechen:function(){$(this).dialog("close")}}});$("#recordsdlg").dialog("open");$("#recordsdlg").html(a)}}function createTableRecords(f){var e=["Tischprotokoll","Records of table","Historia de la mesa"];var c=[["Bestellung","Ordering","Ordenar"],["Rechnung","Bill","Pagar"],["Produktstorno","Discard product","Descartar producto"],["Rechnungsstorno","Discard bill","Descartar pago"],["Rechnungs- und Produktstorno","Discard bill and product","Descrtar pago y producto"],["Tischwechsel Produktentfernung","Move products to other table","Productos a otra mesa"],["Tischwechsel Produktbuchung","Received moved products","Recibo productos de otra mesa"]];var b=f.msg;var a="<h2>"+e[0]+"</h2>";if(b.length==0){a+="keine Einträge";return a}a+="<ul>";b.forEach(function(k,i){var m=toHtml(k.time);var n=toHtml(k.username);var l=toHtml(k.action);var g=c[l][0];a+="<li>"+m+" "+n+" - <b>"+g+"</b>:<br>";var h=k.prods;a+="<ul>";h.forEach(function(o,q){var p=toHtml(o.name
2020-11-19 23:00:09 +01:00
</head>
<style>
2020-11-19 23:03:20 +01:00
2020-11-19 23:00:09 +01:00
</style>
<body>
2020-11-19 23:03:20 +01:00
<div class="tableospage">
2020-11-19 23:11:33 +01:00
<span class="header">Kellneransicht (<span id="panelmodetxt">Bestellung</span>) <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /> <img src="img/tasksstatus.png" class="tasksstatus" style="display:none;" /></span>
2020-11-19 23:03:20 +01:00
</div>
2020-11-19 23:12:16 +01:00
2020-11-19 23:02:33 +01:00
<?php
if (file_exists("customer/mywaiterdesktop.txt")) {
readfile("customer/mywaiterdesktop.txt");
} else {
readfile("waiterdesktopdefault.txt");
}
?>
2020-11-19 23:12:16 +01:00
2020-11-19 23:03:20 +01:00
<div class="tablefooter">
<span id="loggedinuser"></span>
<span id="versioninfo"></span>
</div>
2020-11-19 23:00:09 +01:00
</div>
<div id="selectiondialog" title="Auswahl">Extras to select...</div>
2020-11-19 23:00:58 +01:00
<div id="hoteldialog" title="Auswahl" style='display:none;'>
<h3><span id="hotelroomtitle">Hotelzimmer / Gast wählen</span></h3>
<p>
<form>
<div id='hotelroomfoundguest'></div><br>
<div id='roomselectionarea'><select id='hotelroomselection' class='guestselectionlist'></select><br></div>
<input id='roomguesttextfield' type="text" placeholder='Zimmer oder Gast' class='input100 inputwhite' /><br><br>
<input id='paym_hotel' type='submit' value='Auf Zimmer schreiben' class='guestselectionbutton'/>
</form>
</div>
2020-11-19 23:00:09 +01:00
<div id="unsentorderdlg" title="Achtung">
Die Bestellung würde noch nicht abgeschlossen. Wollen Sie die Bestellung verwerfen?
</div>
<div id="mainmenudlg" title="Hauptmenü">Hauptmenü</div>
<div id="actmenudlg" title="Aktion auswählen">
<header id="actprodinfo"><span id=actcountno>3x</span> <span id="actname">Warsteiner</span> (<span id="actpriceinfo">(1,00 Euro)</span>)</header>
<div id="actcounttogo">
<div id="actminusbtn" class="actbtn">-1</div>
<div id="actplusbtn" class="actbtn">+1</div>
2020-11-19 23:00:42 +01:00
<div id="acttogobtn" class="actbtn"><img id="togoicon" src="img/ok.png" style="display:none;"/><img id="notogoicon" src="img/notavailable.png" style="display:none;"/> &nbsp; To-Go</div>
2020-11-19 23:00:09 +01:00
</div>
2020-11-19 23:10:13 +01:00
<div id="actnumberarea">
<div class="actlabel">Anzahl:&nbsp;</div>
<div>
2020-11-19 23:12:00 +01:00
<input id="actnumberentryfield" class="input100 inputwhite" type="number" placeholder="Anzahl" />
2020-11-19 23:10:13 +01:00
</div>
</div>
2020-11-19 23:00:09 +01:00
<div id="actremark">
2020-11-19 23:10:13 +01:00
<div class="actlabel">Bemerkung:&nbsp;</div>
2020-11-19 23:00:09 +01:00
<div>
<input id="actremarkfield" class="input100 inputwhite" type="text" placeholder="Notiz" />
</div>
</div>
<div id="actdiscount">
<div id="actdiscount1btn" class="actbtn">-1</div>
<div id="actdiscount2btn" class="actbtn">-1</div>
<div id="actdiscount3btn" class="actbtn">-1</div>
</div>
<div id="actprice">
<div>Neuer Preis:&nbsp;</div>
<div>
<input id="actpricefield" class="input100 inputwhite" type="text" placeholder="Neuer Preis" />
</div>
</div>
</div>
<div id="ordereditemdlg" title="Aktion">
<div id="ordereditem-info"></div>
<div id="orderedcancelpanel">
2020-11-19 23:00:55 +01:00
<input id="cancelcode" class="input100 inputwhite" type="password" placeholder="Stornierungscode" />
2020-11-19 23:00:09 +01:00
</div>
<div id="ordereditemremove" class="actbtn">Entfernen</div>
<div id="ordereditemreorder" class="actbtn">Nachbestellen</div>
<div id="ordereditemcancel" class="actbtn">Abbrechen</div>
2020-11-19 23:00:55 +01:00
<div id="deleteallordereditems" class="actbtnlarge">ALLE entfernen</div>
2020-11-19 23:00:09 +01:00
</div>
2020-11-19 23:00:14 +01:00
<div id="moveItemdslg" title="Auswahl der Orderelemente">
<div>Welche Orderelemente sollen dem neuen Tisch zugewiesen werden?</div>
<div id="selectallnothing">
<input id="selectallnothing_txt" class="input100 inputblue" type="submit" />
</div>
<ul id="productsToMoveList" class="extraschoice"></ul>
</div>
2020-11-19 23:00:18 +01:00
<div id="cashdlg" title="Ein-/Auslage" style="display:none;">
<h3><span id="cashoverviewtxt">Übersicht Kellnerkasse</span></h3>
<p><span id="overviewdetails">Diese Übersicht enthält die Bewirtungseinnahme durch den Kellner seit der letzten Tageslosung sowie
als weiteren Wert den Kassenstand unter Berücksichtigung der eigenen Eingaben und Entnahmen.</span><p>
2020-11-19 23:12:16 +01:00
<p><br><i><span id="cashsum">Bewirtungseinnahmen:</span></i>
<div style="padding-left: 50px;padding-right: 50px;">
2020-11-19 23:12:37 +01:00
<span id=cashbyguests></span></p>
</div>
<div>
<br><i>Barein-/auslagen:</i> <b><span id=onlycashsum></span></b> <span class="currencyplaceholder"></span><p>
<br><i><span id="includeowncash">inkl. eigener Kassenein-/Auslagen:</span></i> <b><span id=cashtotal></span></b> <span class="currencyplaceholder"></span><p>
2020-11-19 23:12:16 +01:00
</div><br>
<p><div>
2020-11-19 23:00:18 +01:00
<input id="cashmoney" class="input100 inputblue" type="text" placeholder="0,00"/>
</div>
<div>
<input id="cashremark" class="input100 inputblue" type="text" placeholder="Bemerkung"/>
</div>
</div>
2020-11-19 23:00:39 +01:00
<div id="gencommentsdlg" title="Vordefinierte Kommentare" style="display:none;">
<input id="generalcommentfield" class="input100" placeholder="Kommentar" />
<ul id="commentschoice" class="extraschoice"></ul>
</div>
2020-11-19 23:02:49 +01:00
2020-11-19 23:12:35 +01:00
<div id="enterpricedlg" title="Benutzereingabe" style="display:none;">
<span id="entervalueunit">Eingabe...</span>
2020-11-19 23:02:49 +01:00
<input id="enterpricefield" class="input100" /><br><br>
<table class=numfield id="numfield_num">
<tr><td>7<td>8<td>9</tr>
<tr><td>4<td>5<td>6</tr>
<tr><td>1<td>2<td>3</tr>
<tr><td>0<td colspan="2">,</tr>
<tr><td colspan="3" class="keyboardapply">Anwenden</tr>
</table>
</div>
2020-11-19 23:10:26 +01:00
<div id="recordsdlg" title="Tischprotokoll" style="display:none;">
</div>
2020-11-19 23:02:49 +01:00
2020-11-19 23:00:09 +01:00
</body>
</html>