ordersprinter/webapp/paydesk.html

222 lines
55 KiB
HTML
Raw Normal View History

2020-11-19 22:47:44 +01:00
<html>
<head>
<title>Ansicht Kasse</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
2020-11-19 22:48:24 +01:00
<meta name="author" content="Stefan Pichel">
2020-11-19 22:47:44 +01:00
2020-11-19 23:01:01 +01:00
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.20">
2020-11-19 22:47:44 +01:00
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
2020-11-19 23:00:09 +01:00
<script>
2020-11-19 23:00:58 +01:00
var CALC_TIP=0;var CALC_TOTAL=1;var lang=0;var receiptfontsize=12;var paymentconfig=0;var decpoint=".";var currency="";var osroombtnsize=0;var ostablebtnsize=0;var osprodbtnsize=0;var tminfo=null;var hasRooms=true;var cameFromOrdering=0;var billbrutto=0;var billnetto=0;var prodsToPayList=[];var prodsToPayListGrouping=[];var payTable="";var prodsOnReceiptList=[];var prodsOnReceiptListGrouping=[];var calcmodus=CALC_TOTAL;var workflowconfig=0;var digigopaysetready=1;var onlyReceiptShown=0;var prodsToPayList=null;function initializeMainMenu(a){$.ajax({type:"GET",dataType:"json",url:"php/contenthandler.php?module=admin&command=getJsonMenuItemsAndVersion",async:false,success:function(c){$("#versioninfo").html(c.version+"&nbsp;");if(c.loggedin==1){$("#loggedinuser").html("&nbsp;"+c.user);var b='<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>';$.each(c.menu,function(g,f){var e=f.name;var h=f.link;if((e!="Abmelden")&&(e!="Log out")&&(e!="Adios")){b+='<li data-theme="e"><a href="'+h+'" target="_top" class="modulebutton">'+e+"</a></li>"}else{b+='<li data-theme="e"><a href="'+h+'" target="_top">'+e+"</a></li>"}});$(a).empty().append(b).promise().done(function(){$(a).listview("refresh")});$("#menuswitch").show()}else{$("#menuswitch").hide()}},error:function(b){alert("Kommunikationsproblem zum Server bei Modulabfrage!")}});$(".modulebutton").off("click").on("click",function(c){var b=$(this).attr("href");doAjax("POST","php/contenthandler.php?module=admin&command=setLastModuleOfUser",{view:b},null,"Problem Benutzerdatenpflege")});intervalGetPrinterStatus(5)}function intervalGetPrinterStatus(b){doAjax("GET","php/contenthandler.php?module=admin&command=isPrinterServerActive",null,setPrinterStatus,null,true);var a=setInterval(function(){doAjax("GET","php/contenthandler.php?module=admin&command=isPrinterServerActive",null,setPrinterStatus,null,true)},b*1000)}function setPrinterStatus(a){if(a.status==="OK"){if(a.msg===0){$(".printerstatus").show();return}}$(".printerstatus").hide()}function hideMenu(){$("#modulepanel").panel("close");$("#menuswitch").off("click").on("click",function(a){$("#menuswitch").trigger("mouseout");a.stopImmediatePropagation();a.preventDefault();$("#modulepanel").panel("open")})}function refreshList(a){if($(a).hasClass("ui-listview")){$(a).listview("refresh")}else{$(a).trigger("create")}}function doAjax(a,b,f,e,c,g){if(typeof g==="undefined"){g=false}$.ajax({type:a,url:b,dataType:"json",data:f,async:g,success:function(h){if(e!=null){e(h)}},error:function(l,h,i){if(c!=null){var k=c+", Status: "+h+", Error:"+i+", Msg: "+l.responseText+" ("+b+")";alert("Kommunikationsfehler zum Server: "+k)}}})}function doAjaxAsync(a,b,e,c){$.ajax({type:a,url:b,dataType:"json",data:e,async:true,success:function(f){if(c!=null){c(f)}},error:function(h,f,g){}})}function doAjaxTransmitData(a,b,g,f,e,c){$.ajax({type:a,url:b,dataType:"json",data:g,async:false,success:function(h){if(f!=null){f(h,c)}},error:function(l,h,i){if(e!=null){var k=e+", Status: "+h+", Error:"+i+", Msg: "+l.responseText+" ("+b+")";alert("Kommunikationsfehler zum Server: "+k)}}})}function doAjaxSuppressError(a,b,f,e,c){$.ajax({type:a,url:b,dataType:"json",data:f,async:false,success:function(g){if(e!=null){e(g)}},error:function(g){e("ERROR")}})}function doAjaxNonJsonNonCall(a,b,c){$.ajax({type:a,data:c,url:b,async:false,error:function(e){alert("Kommunikationsproblem zum Server")}})}function toHtml(a){if(typeof a==="string"){return(a.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))}else{return a}}function createExtraParagraph(b){if((b==null)||(b=="")){return""}var c="";for(var a=0;a<b.length;a++){c+="<p>+ "+toHtml(b[a])+"</p>"}return c}function checkForLogIn(){doAjax("GET","php/contenthandler.php?module=admin&command=isUserAlreadyLoggedIn",null,handleTestForLoggedIn,null)}function handleTestForLoggedIn(a){if(a!="YES"){setTimeout(function(){document.location.href="index.html"},250)}}function isInt(a){if(Math.floor(a)==a&&$.isNumeric(a)){return true}else{return false}}var P_SUM=["Summe:","Sum:","Todo:"];var P_TOTAL=["Total","Total
2020-11-19 23:00:09 +01:00
2020-11-19 22:47:44 +01:00
</head>
<body>
<style>
@media screen
{
.receipttable {width: 70%; background-color: #cccccc;}
}
@media print
{
.receipttable,#partToPrint {width: 100%;};
}
@media print
{
#thefooter,#theheader,#modulemenu,#oben,#untenarea,#payWithoutPrint,#paybuttongroup,#hostbuttongroup {display: none;}
}
</style>
<div data-role="page" id="info-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
2020-11-19 22:59:57 +01:00
<h1><span id="paydesktitle">Kasse</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
2020-11-19 22:47:44 +01:00
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
</div>
<div data-type="horizontal" style="top:10px;position:absolute;float:right;z-index:10;display:inline;" align="left" class="ui-btn-left">
<a href="#" data-role="button" data-icon="arrow-l" data-ajax="false" id="startpaypage"></a>
</div>
</div>
<div data-role="content" id="contentpart">
<ul data-role="listview" id="oben" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading" id="roomsel">Raumauswahl</li>
</ul>
<div id="tablemapcontent" style="display:none;">
<div style="background-color:black;"><span id=tableselimmaptxt style="font-weight:bold;font-size:20px;color:white;">Tischauswahl</span>:</div>
<div id=tablemapcontent style="position: relative;width:100%;">
<img id="mapimgpart" style="width:100%;position: relative;left: 0;top: 0;" src=img/empty-room.png />
<div id=tableoverlay></div>
</div>
</div>
<div id=togoarea>
<ul data-role="listview" id="tables-list-togo" data-divider-theme="a" data-inset="true">
</ul>
</div>
<ul data-role="listview" id="cashactions" data-divider-theme="a" data-inset="true">
</ul>
<ul data-role="listview" id="navactions" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading"><span id="navtitle">Navigation</span></li>
<li data-theme="e"><a href="waiter.html" id="navtoorder" target="_top"><span id="nav2order">Bestellansicht</span></a></li>
</ul>
<div id="untenarea">
<ul data-role="listview" id="unten" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">
Inhalt Kassenbon: <p id="priceinreceipt">0,00 Euro</p>
</li>
</ul>
</div>
<div data-role="controlgroup" data-type="horizontal" id="paybuttongroup">
<a href="#" data-role="button" data-theme="b" data-icon="check" id="payWithoutPrint"><span id="OnlyPayTxt">Nur Zahlung</span></a>
<a href="#" data-role="button" data-theme="b" data-icon="grid" id="payWithPrint"><span id="payprinttxt">Bondruck</span></a>
</div>
<div data-role="controlgroup" data-type="horizontal" id="hostbuttongroup">
<a href="#" data-role="button" data-theme="b" data-icon="check" id="hostbutton">Bewirtungsbeleg</a>
</div>
<div id="partForSaveInBill"> <!-- This part will be saved into bill in db -->
<div id=partToPrint>
<table id="receiptpart" class="receipttable" border=0 style="table-layout: fixed;"></table>
</div>
</div> <!-- end of partForSaveInBill -->
</div>
<div data-role="footer" data-theme="b" id="thefooter">
<div class="ui-grid-a">
<div class="ui-block-a userinfo" id="loggedinuser"></div>
<div class="ui-block-b grid_right" id="versioninfo"></div>
</div><!-- /grid-a -->
</div> <!-- footer -->
</div>
<!-- Dialog page -->
<div data-role="dialog" id="paymentdialog" data-title="Zahlungsart">
<div data-role="content">
2020-11-19 23:00:58 +01:00
<div id='calcarea' style='display:none;'>
<h3><span id="payway">Zahlungsart</span></h3>
<p>
<div>
<form>
<table style="border: 1px solid black;">
<tr>
<td><span id=topaytxt>Zahlen: </span><td><i><b><span id=topayval>0,00</span></b></i>
<td>&nbsp;<td><span id=haspaidtxt>Bezahlt: </span><td style="width:30px;color:yellow;"><input type="text" id="haspaid" value="" data-mini="true" placeholder="" />
</tr><tr>
<td><span id="rettxt">Zurück: </span><td><i><b><span id="topayback" style="background-color:#ffff99;">0,00</span></b></i><span id=curtopay2></span></td>
<td>&nbsp;<td><span id=tiptxt>Trinkg.: </span><td style="width:30px;color:yellow;"><input type="text" id="tipfield" value="" data-mini="true" placeholder="" />
</tr>
<tr>
<td colspan=4><button id="calcreturnbtn" type="submit" data-theme="b"><span id="calcreturn">Berechne</span></button>
<td><button id="calcmodusbtn" type="submit" data-theme="c" style="width:200px;"><span id="calcmodus">Trinkgeld</span></button>
</tr>
</table>
</form>
</div>
</div>
<div id='paymentarea' style='display:none;'>
<p><b><span id="choosepayway">Auswahl der Zahlungsart</span></b></p>
<div id=paymentlist>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back">Ja</a>
</div>
</div>
</div>
<div id='hotelroomarea' style='display:none;'>
<p>
<div data-role="content">
<h3><span id="hotelroomtitle">Hotelzimmer / Gast wählen</span></h3>
<p>
<form>
<div id='hotelroomfoundguest'></div><br>
<div id='roomselectionarea'><select id='hotelroomselection'></select><br></div>
<input id='roomguesttextfield' type="text" placeholder='Zimmer oder Gast' /><br>
<a href="#" class="sure-do" data-role="button" data-theme="f" data-rel="back" id="paym_hotel">Auf Zimmer schreiben</a>
<button id='cancelhotelroomselection' type='submit' data-theme='d'><span id='cancelroomselectiontxt'>Abbrechen</span></button>
</form>
</div>
</div>
2020-11-19 22:47:44 +01:00
</div>
2020-11-19 23:00:58 +01:00
2020-11-19 22:47:44 +01:00
<!-- Dialog page -->
<div data-role="dialog" id="sure" data-title="Entfernen?">
<div data-role="content">
<h3>Zahlungsart</h3>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back">Ja</a>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back">Wert2</a>
<a href="#" data-role="button" data-theme="c" data-rel="back">Nein</a>
</div>
</div>
<!-- Dialog page for cash insert -->
<div data-role="dialog" id="cashinsertdialog" data-title="Kassenaktion">
<div data-role="content">
<h3><span id="cashtakeintxt">Bareinlage in die Kasse</span></h3>
2020-11-19 23:00:18 +01:00
<input type="text" id="remarkin" value="" data-mini="true" placeholder="Bemerkung">
2020-11-19 22:52:25 +01:00
<label for="moneyToInsert"><span id="amounttxt">Betrag:</span></label>
2020-11-19 22:47:44 +01:00
<input type="text" id="moneyToInsert" value="" data-mini="true">
<div id=paymentlistcash>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back"><span id="putinact">Einlegen</span></a>
<a href="#" data-role="button" data-theme="d" data-rel="back" id="cash_insert_cancel"><span id="canceltxt">Abbruch</span></a>
</div>
</div>
</div>
<!-- Dialog page for cash insert -->
<div data-role="dialog" id="cashtakeoutdialog" data-title="Kassenaktion">
<div data-role="content">
<h3><span id="cashtakeouttxt">Barentnahme aus der Kasse</span></h3>
2020-11-19 23:00:18 +01:00
<input type="text" id="remarkout" value="" data-mini="true" placeholder="Bemerkung">
2020-11-19 22:52:25 +01:00
<label for="moneyToTakeOut"><span id="amounttxt2">Betrag:</span></label>
2020-11-19 22:47:44 +01:00
<input type="text" id="moneyToTakeOut" value="" data-mini="true">
<div id=paymentlist>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back"><span id="takeoutact">Entnehmen</span></a>
<a href="#" data-role="button" data-theme="d" data-rel="back" id="cash_takeout_cancel">Abbruch</a>
</div>
</div>
</div>
<div data-role="dialog" id="cashoverviewinfo" name="cashoverviewinfo" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
<div data-role="content">
<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>
<p><i><span id="cashsum">Bewirtungseinnahmen:</span></i> <b><span id=cashbyguests></span></b></p>
<p><i><span id="includeowncash">inkl. eigener Kassen-Eingaben/Entnahmen:</span></i> <b><span id=cashtotal></span></b><p>
<a href="#" data-role="button" data-theme="d" data-rel="back" id="cash_overview_ok">OK</a>
</div>
</div> <!-- popup -->
<div data-role="dialog" id="nocashitems" name="nocashitems" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
<div data-role="content">
<h3><span id="noelementstxt">Keine Rechnungselemente</span></h3>
<p><span id="noelementsdetailstxt">Es wurden keine abrechenbaren Produkte festgelegt (der Bon ist leer!).</span><p>
<a href="#" data-role="button" data-theme="d" data-rel="back" id="nocashitems_ok">OK</a>
</div>
</div> <!-- popup nocashitems -->
</body>
</html>