ordersprinter/webapp/waiterdesktop.php

159 lines
72 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">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v={VERSION}">
<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:02:49 +01:00
<link rel="stylesheet" href="css/numfield.css?v={VERSION}" />
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>
<script src="utilities.js"></script>
<script src="receiptutils.js"></script>
<script>
2020-11-19 23:03:51 +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()})}function bindMoveItemsTable(a){$(".tablechangeitem").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();moveToRoomIndex=a;var b=parseInt(this.id.split("_")[1]);var f=roominfo.roomstables[a].tables[b];moveToTableId=f.id;if(selectedroomindex!="-1"){var f=roominfo.roomstables[selectedroomindex].tables[selectedtableindex];moveFromTableId=f.id;$("#selectiondialog").dialog("close");doAjax("GET","php/contenthandler.php?module=queue&command=getProdsForTableChange",{tableId:moveFromTableId},insertProductsToChangeTableDlg,null,true)}else{$("#selectiondialog").dialog("close")}})}function insertProductsToChangeTableDlg(a){if(a.status!="OK"){alert("Fehler");return}prodsToMove=a.msg;allselected=1;updateProdToMoveList();$("#selectallnothing").off("click").on("click",function(f){f.stopImmediatePropagation();f.preventDefault();allselected=1-allselected;for(var c=0;c<prodsToMove.length;c++){var b=prodsToMove[c];if(allselected===1){b["class"]="selecteditem"}else{b["class"]="unselecteditem"}}updateProdToMoveList()})}function updateProdToMoveList(){if(allselected===1){$("#selectallnothing_txt").val(W_UNSELALL[lang])}else{$("#selectallnothing_txt").val(W_SELALL[lang])}var a="";for(var f=0;f<prodsToMove.length;f++){var c=prodsToMove[f];var k="prodToMove_"+f;var b=" (unbezahlt)";var h="proditemselected";if(c["class"]===undefined){c["class"]="selecteditem
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:03:51 +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;" /></span>
2020-11-19 23:03:20 +01:00
</div>
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: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>
<div id="actremark">
<div>Bemerkung:&nbsp;</div>
<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:02:57 +01:00
<p><i><span id="cashsum">Bewirtungseinnahmen:</span></i>
<p><span id=cashbyguests></span></p>
2020-11-19 23:00:18 +01:00
<p><i><span id="includeowncash">inkl. eigener Kassen-Eingaben/Entnahmen:</span></i> <b><span id=cashtotal></span></b><p>
<div>
<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
<div id="enterpricedlg" title="Preiseingabe" style="display:none;">
<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:00:09 +01:00
</body>
</html>