From a8d14ae349ece967be9f89a2c8ee1b7f3fd0e2b1 Mon Sep 17 00:00:00 2001 From: Geno Date: Thu, 19 Nov 2020 23:12:18 +0100 Subject: [PATCH] OrderSprinter 1.5.18 --- gastsystem/index.php | 6 +- gastsystem/install.php | 4 +- printserver/OrderSprinterPrintserver.exe | Bin 282624 -> 282624 bytes spider/install/installer.php | 2 +- webapp/OrderSprinterPrintserver.exe | Bin 282624 -> 282624 bytes webapp/bar.html | 6 +- webapp/bill.html | 2 +- webapp/elements/product.js | 12 +- webapp/feedback.html | 2 +- webapp/index.html | 6 +- webapp/install.html | 10 +- webapp/install/installer.php | 4 +- webapp/kitchen.html | 6 +- webapp/manager.html | 79 +++++++---- webapp/paydesk.html | 2 +- webapp/php/admin.php | 46 ++++--- webapp/php/commonutils.php | 29 ++-- webapp/php/customers.php | 2 +- webapp/php/dbutils.php | 1 + webapp/php/debug.php | 2 +- webapp/php/printqueue.php | 12 ++ webapp/php/products.php | 20 ++- webapp/php/queuecontent.php | 126 +++++++++++++++++- .../TypeAndProducts/ProductEntry.php | 31 ++++- .../TypeAndProductFileManager.php | 14 +- webapp/php/utilities/version.php | 17 ++- webapp/pickups.html | 4 +- webapp/preferences.html | 2 +- webapp/products.html | 14 +- webapp/rating.html | 2 +- webapp/reports.html | 2 +- webapp/reservation.html | 2 +- webapp/supplydesk.html | 2 +- webapp/tasks.html | 4 +- webapp/timetracking.html | 2 +- webapp/waiter.html | 10 +- webapp/waiterdesktop.php | 2 +- webapp/waiterdesktopdefault.txt | 5 +- 38 files changed, 349 insertions(+), 143 deletions(-) diff --git a/gastsystem/index.php b/gastsystem/index.php index cecc970..89a99f3 100644 --- a/gastsystem/index.php +++ b/gastsystem/index.php @@ -9,8 +9,8 @@ - - + + @@ -105,7 +105,7 @@
  OrderSprinter
-
1.5.17  
+
1.5.18  
diff --git a/gastsystem/install.php b/gastsystem/install.php index c61d4ba..158d60f 100644 --- a/gastsystem/install.php +++ b/gastsystem/install.php @@ -90,10 +90,10 @@ if (isset($_POST['code'])) { } else { echo ""; echo "Installation Gastsystem"; - echo ''; + echo ''; echo ""; echo "
"; - echo "Installation OrderSprinter-Gastsystem 1.5.17

"; + echo "Installation OrderSprinter-Gastsystem 1.5.18

"; echo "
"; echo "
"; echo "
"; diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe index 7ce0615c5ca5d9b0a73ef6fb28e2d482805e0c0b..aa5a420c579133fecff75055dc18fe60115a2da2 100644 GIT binary patch delta 1978 zcmY+_drVVT90%~Axp;9>vg9T2id%Ckq;S&R%P-S%a5*|g@LY_g-h3$75-3G2!0#fWrbofD&1qZ zi)>rpasEG)6R<&;X+9Q~4{5t$K2~d@!$H3q;*q1PI;aBi*rMyIssc?s%Ng!$s~~>m z(8scw5)fFY$UzBmtsw#Fx|Yg~hDA7H)A_aBYDh#&z1I2@D+vXBnv{XR$@dM(7`&|M zxIAE3g4C;ua;S!vSdMR1IjB<}C6=Q=RR>~(AAJc^quQw+;7UwXl}~@mqs2nrDm= z-=kZVc7E+hQRSqfX<4t^QQt($`py9Jq`i^@FZ5!9ah`C%_qwu#GVm1Efo?0(I@cpm zl~P+E)}uueW&11=IS6b~Ivvz){9J58ye=|jip`kVs@42WHj#%OR*KSUF>Mwu9J#9% zXP9<~eB|EK6l>Zo3Q*KGq=RAyqS`ejno7mbSfeY=bV_*eeuq+XQids5>_VKow@9q8 zC8!f|FgjY?hn#`WSf>U5Q|&fuo5t$w|zz(ZZt zTswz8T}`Yiq<0N1Xr>xuyrMO#wCz}fZC&anbI@18|A_POs6}me)*`9<|7k8FO;raX z#0a{GL#iB<p-Fiphi4VrJch@JnNvm5w6NXE4^juhTHgyNU@oz85^FdP3kq%jNJe9iPVfDO_XU)lI}o$u1&XAN~TuK zQsv;QYZmSyO_#UvGpP-`_0BEkFQg6>ywJw&G-pWxQoD z<_bK*U0rSFSbBs`UEN&kM6a#^u61HilX?)3Aq@;2Qla!19#xf;KmIIrA@(n&mQQyq zd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TO;oF)^tCp07hD$--usGjXBuyP(r2kVYt6Qyn zmh+4gall!!NLt~DfVXqpVky(Zhi?Jg;Zx>ZEUg01{cwr&6Tdt6yd+u1SZEprJ3?Uc Uuu9~`eJ)FxPpmY6ykNI~0NGF=jsO4v diff --git a/spider/install/installer.php b/spider/install/installer.php index 9e8cf48..51e2e6b 100644 --- a/spider/install/installer.php +++ b/spider/install/installer.php @@ -85,7 +85,7 @@ class Installer { } Database::dropTables($pdo); Database::createEmptyTables($pdo, $prefix); - Database::setVersion($pdo,$prefix,"1.5.17"); + Database::setVersion($pdo,$prefix,"1.5.18"); Database::setAccessPassword($pdo,$prefix,$adminpass); Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour return array("status" => "OK","msg" => "Installation successful"); diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe index 7ce0615c5ca5d9b0a73ef6fb28e2d482805e0c0b..aa5a420c579133fecff75055dc18fe60115a2da2 100644 GIT binary patch delta 1978 zcmY+_drVVT90%~Axp;9>vg9T2id%Ckq;S&R%P-S%a5*|g@LY_g-h3$75-3G2!0#fWrbofD&1qZ zi)>rpasEG)6R<&;X+9Q~4{5t$K2~d@!$H3q;*q1PI;aBi*rMyIssc?s%Ng!$s~~>m z(8scw5)fFY$UzBmtsw#Fx|Yg~hDA7H)A_aBYDh#&z1I2@D+vXBnv{XR$@dM(7`&|M zxIAE3g4C;ua;S!vSdMR1IjB<}C6=Q=RR>~(AAJc^quQw+;7UwXl}~@mqs2nrDm= z-=kZVc7E+hQRSqfX<4t^QQt($`py9Jq`i^@FZ5!9ah`C%_qwu#GVm1Efo?0(I@cpm zl~P+E)}uueW&11=IS6b~Ivvz){9J58ye=|jip`kVs@42WHj#%OR*KSUF>Mwu9J#9% zXP9<~eB|EK6l>Zo3Q*KGq=RAyqS`ejno7mbSfeY=bV_*eeuq+XQids5>_VKow@9q8 zC8!f|FgjY?hn#`WSf>U5Q|&fuo5t$w|zz(ZZt zTswz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+=yN7vCUR*J@L>D1@a)spZi+Q-Iim2&dRB-nYf5C-bS>)GbQjdsAu2 zr(si{C`YueZqu*g5UNyZ%TT;PkvQFq~GuPR08)tQPnPcfTF6$aF*WnIs z=o;bL9rS5ZAN)St|5pW4A96>O3m&8VXX~jSbADHpPwjzwrG6~d)vIcqt_OkprJ#On z*7;}PL1_?=9w`I01-pkXwWd9z_aMqD3x(xrTTMCfrfcP_!60WX+$)HFfy`NlFwS}` z{L-Y?Woy8ffvSJ5TO;oF)^tCp07hD$--usGjXBuyP(r2kVYt6Qyn zmh+4gall!!NLt~DfVXqpVky(Zhi?Jg;Zx>ZEUg01{cwr&6Tdt6yd+u1SZEprJ3?Uc Uuu9~`eJ)FxPpmY6ykNI~0NGF=jsO4v diff --git a/webapp/bar.html b/webapp/bar.html index 4d5f7a1..9b471c3 100644 --- a/webapp/bar.html +++ b/webapp/bar.html @@ -5,7 +5,7 @@ - + @@ -13,8 +13,8 @@ - - + + +var W_TABLES=["Tische","Tables","Mesas"];var W_ATABLE=["Tisch","Table","Mesa"];var W_ROOMS=["Räume","Rooms","Espacios"];var W_SELECTION=["Auswahl","Selection","Selección"];var W_LAST_SELECTED=["zuletzt","last","seleccionado"];var W_FAVS=["Favoriten","Favorites","Favoritos"];var W_NEW_ORDER=["Neue Order","New Orders","Ordenes nuevas"];var W_KIT_BAR=["nicht serviert/unbezahlt","unserved/unpaid","no servido/impagado"];var W_OTHER_PROD=["Auswahl Produktkategorie","Select product categroy","Categoría diferente"];var W_WORK_TICKET=["Arbeitsbon","Work ticket","Tique de trabajar"];var W_NOTE=["Bemerkung","Comment","Comentario"];var W_NUMBER=["Anzahl","Number","Número"];var W_SEND_ORDERS=["Bestellung senden","Send orders","Enviar Ordenes"];var W_TO_PAYDESK=["-> Kasse","-> Paydesk","-> Caja"];var W_TABLECHANGE=["Tischwechsel","Change table","Cambiar mesa"];var W_ROOMTABLE=["Raum-Tisch","Room-Table","Espacio-Mesa"];var W_TABLE_SEL=["Tischauswahl","Select table","Qué mesa?"];var W_UNDELIV_INFO=["Liste enthält die Produkte die noch in der Küchen-/Baransicht sind, sowie unbezahlte Produkte, die die Bereitstellungsansicht nicht durchlaufen.","List contains the products which are still in kitchen or bar view, as well as unpaid products that do not pass the supplydesk view.","La lista contiene los productos que estan todavía en modulo de cocina/bar, también productos impagados que no pasan vista de productos preparados."];var W_REMOVE_ERROR=["Ansicht nicht mehr aktuell - Liste wird neu geladen.","View is obsolete - List will be reloaded.","Vista no esta actual - vamos a actualisar la lista."];var W_FOOD_FOR=["Speisen für","Food for","Comidas para"];var W_DRINKS_FOR=["Getränke für","Beverage for","Bebidas para"];var W_ACT_NEW_ORD_EL=["Aktion auswählen","Select action","Que acción?"];var W_ACT_CHANGE=["Ändern","Modify","Modificar"];var W_ACT_CHANGE_ALL=["Alle Ändern","Modify all","Modificar todo"];var W_ACT_CHANGE_ONE=["Einen Artikel ändern","Modify one item","Modificar un artículo"];var W_APPLY=["Anwenden","Apply","Aplicar"];var W_CANCEL=["Abbrechen","Cancel","Cancelar"];var W_STILL_UNSENT_ORDERS=["Es sind noch ungesendete Orders vorhanden!","There are unsent orders in the list","Hay elementos in la liste que no han enviados"];var W_EXTRAS=["Extras/Optionen","Add-ons/Options","Opciones"];var W_OPEN_PANEL=["Extras-Auswahl noch offen","Add-ons selection still open","Selección de opciones todavía abierta"];var W_DEL=["Löschen","Delete","Removar"];var W_MSG=["Nachricht","Message","Mensaje"];var W_CHANGE_PRICE=["Neuer Preis: ","New price: ","Cambiar precio: "];var W_PRICE=["Preis","Price","Precio"];var W_WRONG_FORMAT=["Falsches Zahlenformat","Wrong number format","Formato de precio incorecto"];var W_TOGO=["Außer-Haus-Verkauf","Sale with Tax No 2","Venta IVA 2"];var W_YES=["Ja","Yes","Si"];var W_NO=["Nein","No","No"];var W_DISCARD_NO_ASK=["Es sind noch ungesendete Orders vorhanden! Sollen diese verworfen werden?","There are still unsent orders. Do you want to discard them?","Hay todavía ordenes non-enviados. Removarlos?"];var W_DISCARD_HEADER=["Neue Orders verwerfen?","Discard new orders?","Removar ordenes nuevos?"];var W_SEARCH=["Produktsuche","Product search","Buscar producto"];var W_BARCODE=["Barcode","Barcode","Código de barras"];var W_SEARCHRESULTS=["Suchergebnis","Search Result","Encontrado"];var W_WRONG_PIN=["Falscher Stornocode","Wrong cancel code","Codigo falso"];var W_NO_ORDERS=["Keine gebuchten Orders vorhanden!","No orders available!","No hay ningún orden!"];var W_TO_PAY=["offen","to pay","a pagar"];var W_MOVE_PRODS=["Produkte verschieben","Move products","Productos a otra mesa"];var W_NO_PRODS_SELECTED=["Es wurden keine Produkte ausgewählt!","You have not chosen any products!","No ha seleccionado ningún producto!"];var W_MAX_PRICE_EXCEEDED=["Der Maximalwert für den Preis wurde überschritten!","The max. value for the price is exceeded!","El valor del precio es más que el maximum!"];var W_REORDER=["Nachbestellen","Reorder","Order una vez mas"];var W_REMOVE=["Entfernen","Remove","Removar"];var W_SELALL=["Alles auswählen","Select all","Elegir todo"];var W_UNSELALL=["Alles abwählen","Unselect all","No elegir nada"];var W_ONLY=["noch","only","sólo"];var W_DEL_ALL_UNDELIVERED=["Entferne alles","Remove all","Borrar todo"];var W_DEL_ALL_ASSIGNED_PRODS=["Alle Produkte löschen?","Delete all products?","Removar todos los productos?"];var W_NO_VALID_PRICE=["Keine gültige Preiseingabe","No valid price","Precio no valido"];var W_NO_REORDER_VAR_PRICE=["Produkt mit variablem Preis kann nicht auf diese Weise nachbestellt werden.","Produkt with variable price cannot be reordered this way.","Producto con un precio variable no se puede reordenado asi."];var W_INVALID_NO_ENTERING=["Fehler bei der Eingabe","Input contains errors","Número invalido"];var w_INVALID_NO_RANGE=["Ungültiger Zahlenbereich (1-1000)","Invalid number range (1-1000)","Número no es entre 1 y 1000"];var W_DAYCODETXT=["Tageslosung","Day code","Código del día"];var W_RECORDS_HEADER=["Tischprotokoll","Records of table","Historia de la mesa"];var W_RECORDS_INIT=["Tischprotokoll (Anklicken zum Öffnen)","Records of table (click to open)","Historia de la mesa (click para abrir)"];var W_RECORD_ACTION=[["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 W_NO_ENTRIES=["Keine Einträge","No entries","Ningún data"];var CHANGE_ALL=0;var CHANGE_ONE=1;var WORKFLOW_DIGI_WORK=0;var WORKFLOW_DIGI=1;var WORKFLOW_WORK=2;var WORKFLOW_WORK_SEND=3;function Grouping(b,a){this.set=b;this.sortedset=[];this.group=function(){this.sortedset=[];for(var g=0;g/g,">"))}function setLanguage(c){lang=c;$("#roomtableheader2").html(W_ROOMTABLE[lang]);$("#tableselection").html(W_TABLE_SEL[lang]);$("#actiontxt").html(W_ACT_NEW_ORD_EL[lang]);$("#actdeltxt").html(W_DEL[lang]);$("#discard_new_orders_yes").html(W_YES[lang]);$("#discard_new_orders_no").html(W_NO[lang]);$("#discardnewordersask").html(W_DISCARD_NO_ASK[lang]);$("#discardnoheader").html(W_DISCARD_HEADER[lang]);$("#moveprods").html(W_MOVE_PRODS[lang]);$(".daycodetxt").html(W_DAYCODETXT[lang]);var k="";if(prominentsearch==0){k+='
';if(usebarcode==1){k+=''}}else{if(usebarcode==0){k+='
';k+="
"}else{k+='
';k+='';k+="
"}}k+="
";var a='
';if(prominentsearch==0){$("#searchposition-normal").html(k)}else{$("#searchposition-prominent").html(k)}if(usebarcode==1){$("#barcode").focus()}var g=a;var f="";if((workflowconfig==WORKFLOW_DIGI_WORK)||(workflowconfig==WORKFLOW_DIGI)||(workflowconfig==WORKFLOW_WORK_SEND)){f=" osbigbtn ";if(preferfixbtns==1){f=" ossmallbtn fixedsendorderbtn "}g+=''+W_SEND_ORDERS[lang]+""}if((workflowconfig==WORKFLOW_DIGI_WORK)||(workflowconfig==WORKFLOW_WORK)||(workflowconfig==WORKFLOW_WORK_SEND)){f=" osbigbtn ";if(preferfixbtns==1){f=" ossmallbtn fixedworkprintbtn "}g+=''+W_WORK_TICKET[lang]+""}if(cashenabled==1){f=" osbigbtn ";if(preferfixbtns==1){f=" ossmallbtn fixedgopaydeskbtn "}g+=''+W_TO_PAYDESK[lang]+""}g+='';$("#commandbuttons").html(g);if(preferfixbtns==1){$("#waiterui").addClass("fixedwaiterui")}$("#waiterui").trigger("create");var i="
"+W_NUMBER[lang]+':
';var b='
';$("#actremark").html(i+b);if(rightchangeprice==1){var e='';$("#actchangepricesection").html(e);var h='
';h+=getDiscountButton("discount1","a",discount1,discountname1);h+=getDiscountButton("discount2","b",discount2,discountname2);h+=getDiscountButton("discount3","c",discount3,discountname3);h+="
";$("#actdiscount").html(h)}$("#actionneworderconfirm_all").html(W_ACT_CHANGE_ALL[lang]);$("#actionneworderconfirm_one").html(W_ACT_CHANGE_ONE[lang]);$("#actionnewordercancel").html(W_CANCEL[lang]);$("#select-comment").off("change").on("change",function(m){var l=$("#select-comment").find(":selected").val();$("#optionfield").val(l)});$("#act-select-comment").off("change").on("change",function(m){var l=$("#act-select-comment").find(":selected").val();$("#act-optionfield").val(l)});$("#discard_new_orders_no").off("click").on("click",function(l){l.stopImmediatePropagation();l.preventDefault();parent.history.back()});$("#discard_priceenter").off("click").on("click",function(l){l.stopImmediatePropagation();l.preventDefault();$("#enterpricedlg").dialog("close")});$("#discard_numberenter").off("click").on("click",function(l){l.stopImmediatePropagation();l.preventDefault();$("#enternumberdlg").dialog("close")});$("#discard_new_orders_yes").off("click").on("click",function(l){l.stopImmediatePropagation();l.preventDefault();neworders=[];gotoOtherPage($("#discardnewordersdlg").data("link"))});$("#prodbackbtn").off("click").on("click",function(l){if(neworders.length!=0){l.stopImmediatePropagation();l.preventDefault();hideMenuProd();$("#discardnewordersdlg").data("link","back_table");$.mobile.changePage("#discardnewordersdlg")}else{parent.history.back()}});$("#searchField").off("keyup").on("keyup",function(l){generateSearchResults()});if(usebarcode==1){$("#barcode").focus()}$("#barcode").off("keyup").on("keyup",function(l){handleBarcodeInput()})}function getDiscountButton(f,e,c,a){var b='";if(a.trim()!=""){b='"}return b}function generateSearchResults(){var i=$("#searchField").val().trim().toLowerCase();if(i.length";var h=$("#typprodpage").data("types_prods_sorted");var a=false;var g=null;for(var f=0;f=0){g=e.prodimageid;if(g!=0){a=true;break}}}$.each(h,function(n,o){var m=o.longname;if(m.toLowerCase().indexOf(i)>=0){c+='
  • ';if(a&&(preferimgmobile==1)){var l="php/contenthandler.php?module=products&command=getprodimage&prodid="+o.id+"&size=l";c+=''}c+=toHtml(m);c+=createSearchProdInfoTxt(o.id);c+="
  • "}});c+="";$("#searchResult").html(c);$("#searchResult").trigger("create");$(".srinfo").off("click").on("click",function(o){o.stopImmediatePropagation();o.preventDefault();var l=this.id.split("_")[1];var n=getProdEntry(l);var m=n.price;alert(W_PRICE[lang]+": "+m+" "+currency)});$(".srplus").off("click").on("click",function(n){n.stopImmediatePropagation();n.preventDefault();var m=this.id.split("_")[1];var l=getSearchProdCount(m);$("#srprodcount_"+m).html(l+1)});$(".srminus").off("click").on("click",function(n){n.stopImmediatePropagation();n.preventDefault();var m=this.id.split("_")[1];var l=getSearchProdCount(m);if(l==2){$("#srprodcount_"+m).html("");selectedProdCount=1}else{if(l>2){$("#srprodcount_"+m).html(l-1)}}});$(".srprodcount").off("click").on("click",function(m){m.stopImmediatePropagation();m.preventDefault();var l=this.id.split("_")[1];$("#enternumberdlg").data("prodid",l);enternumberdlgshown=true;$("#enternumberfield").val("");$.mobile.changePage("#enternumberdlg");var n=$(this).parent().attr("id");bindEnterSearchNumberNumbers(n)});$(".searchresult").off("click").on("click",function(m){m.stopImmediatePropagation();m.preventDefault();var l=this.id.split("_")[1];handleClickOnSearchResult(l)})}}function handleBarcodeInput(){var c=$("#barcode").val();c=c.split("-").join("");c=c.split(" ").join("");if(c!=""){var a=findProdWithBarcode(c);if(a!=null){$("#barcode").val("");var b=a.id;beep();handleClickOnProd(b)}}}function findProdWithBarcode(b){var e=$("#typprodpage").data("types_prods_sorted");for(var c=0;c'+a+""}htmlComments=b;predefinedComments=b;$("#select-comment").html(b);$("#select-comment").selectmenu("refresh")}function initializeMainMenu(a,h,e,i,g){$("#"+e).html(" "+a.user);$("#"+i).html(a.version+" ");var k='
  • Module
  • ';$.each(a.menu,function(n,m){var l=m.name;var o=m.link;if(g){k+='
  • '+l+"
  • "}else{k+='
  • '+l+"
  • "}});$(h).empty().append(k).promise().done(function(){refreshList(h)});if(h=="#modulemenu-room"){var c=a.waitermessage;if(c!=""){$("#waitermessage").show();var b='
  • '+W_MSG[lang]+"
  • ";var f='
  • '+toHtml(c)+"
  • ";$("#waitermessage").html(b+f);refreshList("#waitermessage")}else{$("#waitermessage").hide()}}$(".modulebutton").off("click").on("click",function(m){var l=$(this).attr("href");doJsonAjaxAsync("POST","php/contenthandler.php?module=admin&command=setLastModuleOfUser",{view:l},null,"Problem Benutzerdatenpflege",false)})}function intervalCheckConnection(b){checkConnection();var a=setInterval(function(){checkConnection()},b*1000)}function checkConnection(){var a=new Image();a.onerror=function(){$(".connectionstatus").show()};a.onload=function(){$(".connectionstatus").hide()};a.src="img/gray.png?t="+(+new Date)}function refreshList(a){if($(a).hasClass("ui-listview")){$(a).listview("refresh")}else{$(a).trigger("create")}}function gotoOtherPage(a){var b=a.split("_");if(b[0]=="menu"){doJsonAjax("POST","php/contenthandler.php?module=admin&command=setLastModuleOfUser",{view:b[1]},null,null);setTimeout(function(){document.location.href=b[1]},250)}else{if(b[0]=="back"){$("#discardnewordersdlg").dialog("close");parent.history.back()}}}function moduleForward(a){if(neworders.length==0){gotoOtherPage(a)}else{hideMenuProd();$("#discardnewordersdlg").data("link",a);$.mobile.changePage("#discardnewordersdlg")}}function getPayPrintType(){doJsonAjax("GET","php/contenthandler.php?module=admin&command=getPayPrintType",null,insertPayPrintType,"Fehler Druckkonfiguration")}function insertPayPrintType(a){$("#workprintarea").data("payPrintType",a)}function getUserHasRightForPaydesk(){doJsonAjax("GET","php/contenthandler.php?module=admin&command=hasUserPaydeskRight",null,hasUserPaydeskRight,"Fehler Kassenberechtigung")}function hasUserPaydeskRight(a){$("#gopaydesk_btn").data("allowed",a)}function hideMenuRoom(){$("#modulepanel-room").panel("close");$("#menuswitch").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();$("#modulepanel-room").panel("open")})}function hideMenuTable(){$("#modulepanel-table").panel("close");$("#menuswitchtable").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();$("#modulepanel-table").panel("open")})}function hideMenuProd(){$("#modulepanel-prod").panel("close");$("#menuswitchprod").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();$("#modulepanel-prod").panel("open")})}function calcTotalPriceOfProdAndExtras(b,e){var a=parseFloat(b);if(e!=null){for(var c=0;c";var m=groupedNewOrders.count.length;for(g=0;g1){l=""+h.toString()+"x "+l}var f=groupedNewOrders.prodids[g];if(k!=""){k="

    "+toHtml(k)+"

    "}var c=groupedNewOrders.changedPrices[g];var b=groupedNewOrders.togos[g];var o="";var e=groupedNewOrders.extras[g];if((e!=null)&&(e!="")){o=""+e+""}if(c!="NO"){c=c.replace(".",decpoint);if(b!=0){n+='
  • '+l+k+o+" ("+c+" - To-Go)
  • "}else{n+='
  • '+l+k+o+" ("+c+")
  • "}}else{if(b!=0){n+='
  • '+l+k+o+" - To-Go
  • "}else{n+='
  • '+l+k+o+"
  • "}}}$("#neworders").html(n);refreshList("#neworders");binding_neworderelem()}function getProdSizeClass(){if(osprodbtnsize==1){return("osprod-1")}else{if(osprodbtnsize==2){return("osprod-2")}}return""}function binding_neworderelem(){$(".neworder_el").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();var b=$("#neworders li").index($(this).closest("li"))-1;var a={count:groupedNewOrders.count[b],name:groupedNewOrders.name[b],price:groupedNewOrders.price[b],option:groupedNewOrders.option[b],extras:groupedNewOrders.extras[b],prodid:groupedNewOrders.prodids[b],origidxs:groupedNewOrders.origidxs[b],changedPrices:groupedNewOrders.changedPrices[b],togos:groupedNewOrders.togos[b]};$("#actiononneworderel").data("entry",a);$("#actiononneworderel").data("newcount",a.count);$("#actiononneworderel").data("groupedListIndex",b);$("#actiononneworderel").data("countatdialogstart",a.count);$("#act-optionfield").val(a.option);$("#act-numberfield").val(a.count);$("#togocheckbox").prop("checked",a.togos==1?true:false);actionSelOnNewOrderElem()})}function sendNewOrders(c,f,a){var g=$("#typprodpage").data("table-info");var b=g[1];if(neworders.length!=0){var e={tableid:b,prods:neworders,print:(c?1:0),payprinttype:f};$("#typprodpage").data("neworders",[]);if(f=="s"){doJsonAjax("POST","php/contenthandler.php?module=queue&command=addProductListToQueue",e,a,"Fehler bei Produktversand")}else{doJsonAjax("POST","php/contenthandler.php?module=queue&command=addProductListToQueue",e,fillPrintAreaAndPrint,"Fehler bei Produktversand")}}else{if(c&¬DeliveredProdsAvailable){}}}function reloadPage(){tableListActive=false;setTimeout(function(){document.location.href="waiter.html"},250)}function gotoTablePage(){var a=$("#tables-page").data("allroomtables");var b=a.length;if(!isTogoOrderSelected||(b==1)){if(tablesAfterSend==1){$.mobile.changePage("#tables-page")}else{reloadPage()}}else{reloadPage()}}function removeProductFromQueue(a,c,f,e,b,g){if(typeof g==="undefined"){g=true}if(!b){alert(W_WRONG_PIN[lang]);return}$.ajax({type:"POST",dataType:"json",url:"php/contenthandler.php?module=queue&command=removeProductFromQueue",data:{queueid:a,isPaid:c,isCooking:f,isReady:e},async:false,success:function(l){if(l.status!="OK"){alert(W_REMOVE_ERROR[lang])}var k=$("#typprodpage").data("table-info");var h=k[1];var i="php/contenthandler.php?module=queue&command=getJsonLongNamesOfProdsForTableNotDelivered&tableid="+h;if(g){fillNotDeliveredProductsOfATable(i)}},error:function(h){alert("Sorry, Fehler bei Produktentfernung!")}})}function reorderProduct(f,b,g){var a=getProdProperties(f);if((a.unit!=0)&&(a.unit!="null")){alert(W_NO_REORDER_VAR_PRICE[lang]);return}var e=[];for(var c=0;c'+k.name+""});if(showtogo==1){a+='
  • '+W_TOGO[lang]}var f=h.takeawayprice;var c=f.replace(".",decpoint)+" "+currency;if(f!=0){a+=" ("+W_TO_PAY[lang]+": "+c+")"}a+=createServeInfo(null,h.takeawayprodcount,h.takeawayprodready);a+="
  • ";$("#room-list").append(a).promise().done(function(){bindTogoOrdering();bindServeClick();$(this).off("click").on("click","a",function(l){l.stopImmediatePropagation();l.preventDefault();var k=b[this.id];currentRoomIndex=this.id;isTogoOrderSelected=false;$("#tables-page").data("roomdetail",k);nextPage="tables-page";$.mobile.changePage("#tables-page")});refreshList(this)})}}})}function handleClickInTablemap(a){forwardDisplayToProductView.call(this,a.roomid,a.tableid,a.tablename)}$(document).on("pagebeforeshow","#tables-page",function(){lastSelectedProduct="";tableListActive=true;if(nextPage==""){reloadPage()}hideMenuTable();checkForLogIn();$("#searchField").val("");$("#barcode").val("");generateSearchResults();$("#tableselbackbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();tableListActive=false;$.mobile.changePage("#info-page")});updateTableList()});$(document).on("pagebeforeshow","#changetablewhatdialog",function(){var a=$("#changetablewhatdialog").data("fromtableid");doJsonAjax("GET","php/contenthandler.php?module=queue&command=getProdsForTableChange",{tableId:a},insertProductsToChangeTableDlg,"Tischartikel")});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"+c.productname+b+"";a+="
  • "+g+"
  • "}$("#productsToMoveList").html(a);refreshList("#productsToMoveList");handleClickOnMoveableProd()}function handleClickOnMoveableProd(){$(".prodToMoveEl").off("click").on("click",function(f){f.stopImmediatePropagation();f.preventDefault();var b=this.id.split("_")[1];var a=prodsToMove[b];var c=a["class"];if(c=="unselecteditem"){a["class"]="selecteditem"}else{a["class"]="unselecteditem"}updateProdToMoveList()});$("#moveprods").off("click").on("click",function(k){k.stopImmediatePropagation();k.preventDefault();var g=[];for(var f=0;f'+W_TOGO[lang]+""}k+="";$("#tables-list-togo").html(k);$("#togoarea").show();refreshList("#tables-list-togo");bindTogoOrdering();bindServeClick()}}else{$(h).show();$("#togoarea").hide();$("#tablemapcontent").hide();var k='
  • '+W_TABLES[lang]+"
  • ";var f="";if(ostablebtnsize==1){f="ostable-1"}else{if(ostablebtnsize==2){f="ostable-2"}}$.each(l,function(p,s){var r=s.pricesum;var n=r.replace(".",decpoint)+" "+currency;var o=s.prodcount;var m=s.prodready;var q=s.readyQueueIds;if(r!=0){k+='
  • '+s.name+" ("+W_TO_PAY[lang]+": "+n+")"+createServeInfo(s.id,o,m)+"
  • "}else{k+='
  • '+s.name+createServeInfo(s.id,o,m)+"
  • "}});if(c=="t"){if(showtogo==1){k+='
  • '+W_TOGO[lang]+"
  • "}}$(h).empty().append(k).promise().done(function(){bindTogoOrdering();bindServeClick();$(this).off("click").on("click",".info-go",function(p){p.stopImmediatePropagation();p.preventDefault();var o=g;var m=l[this.id]["id"];var n=l[this.id]["name"];forwardDisplayToProductView.call(this,a,m,n)});refreshList(this)})}}function bindServeClick(){$(".prodreadyicon").off("click").on("click",function(l){l.stopImmediatePropagation();l.preventDefault();var f=this.id.split("_")[1];var h=queueIdsOfTakeAway;if((f!=null)&&(f!="n")){var a=$("#tables-page").data("roomdetail");var c=a.tables;for(var b=0;b0){var k=h.join();doJsonAjax("POST","php/contenthandler.php?module=queue&command=declareMultipleProductsDelivered",{queueids:k},updateAfterDelivery,"Bereitstellung")}})}function updateAfterDelivery(a){if(tableListActive){updateTableList()}else{reloadPage()}}function bindTogoOrdering(){$(".togoorder").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();isTogoOrderSelected=true;forwardDisplayToProductView.call(this,0,0,W_TOGO[lang])})}function forwardDisplayToProductView(b,a,c){neworders=[];updateNewOrdersGui();var e=new Array(b,a,c);$("#typprodpage").data("table-info",e);nextPage="typprodpage";$.mobile.changePage("#typprodpage");neworders=[];updateNewOrdersGui()}function attachAndDisplayFirstRefTypes(e){$("#typprodpage").data("types_prods",e);var a=e.prods;var c=[];for(var b=0;b";if(applyExtraBtnPos!=1){m+='
  • '+W_APPLY[lang]+"
  • "}for(var f=0;f=0){b="f";l="check"}m+='
  • '+toHtml(k)+"
  • "}if(requestPriceInExtras!=false){m+='
  • '}if(applyExtraBtnPos!=2){m+='
  • '+W_APPLY[lang]+"
  • "}m+=createHigherLine(n);return m}function bindExtrasSel(){$(".extrasel").off("click").on("click",function(n){n.stopImmediatePropagation();n.preventDefault();var a=this.id.split("_");var b=a[1];var f=a[2];if((b=="abottom")||(b=="atop")){var l=getProdEntry(f);var c=l.extras;var o=[];for(var h=0;h=0){o[o.length]={id:b,name:m,price:g.price}}}if(requestPriceInExtras){var k=$("#enterpriceextrasfield").val();k=k.trim();k=k.replace(decpoint,".");if((k!="")&&($.isNumeric(k))){requestPriceInExtras=false;presetPriceInExtras="";addProductToNewOrdersList(f,o,k)}else{alert(W_NO_VALID_PRICE[lang])}}else{addProductToNewOrdersList(f,o)}}else{if(w_extras.indexOf(b)>=0){w_extras.splice(w_extras.indexOf(b),1)}else{w_extras[w_extras.length]=b}if(requestPriceInExtras!==false){presetPriceInExtras=$("#enterpriceextrasfield").val()}var p=listOfExtras(f);$("#typeproducts-list").html(p);refreshList("#typeproducts-list");bindExtrasSel();bindHigherButtons()}})}function lastSelectedProdToStr(){return" ("+W_LAST_SELECTED[lang]+": "+lastSelectedProduct+")"}function listOfTypesProds(g){var a='
  • '+W_SELECTION[lang]+"";if(lastSelectedProduct!=""){a+=lastSelectedProdToStr()}a+="
  • ";var b=$("#typprodpage").data("types_prods");var f=getProdSizeClass();$.each(b.types,function(l,k){if(parseInt(k.ref)==g){a+='
  • '+toHtml(k.name)+"
  • "}});var i=false;if(preferimgmobile==1){var e=null;for(var c=0;c';if(i&&(preferimgmobile==1)){var k="php/contenthandler.php?module=products&command=getprodimage&prodid="+m.id+"&size=l";a+=''}a+=toHtml(m.name);if((m.amount!="null")&&(m.amount<11)){a+=" ("+W_ONLY[lang]+" "+m.amount+")"}a+=createProdInfoTxt(m.id);a+=""}});if(g!=0){a+=createHigherLine(f)}return a}function createHigherLine(e){var f="f";if(preferfixbtns==1){f="a"}var a='
  • ';a+='
    ';var c="";var b="";if(preferfixbtns==1){c="fixedtypetopimg";b="fixedtypehigherimg"}a+='
    ';a+='
    ';a+="
    ";a+="
  • ";return a}function createProdEntryWithTextPrice(a,e,f){var c=getProdEntry(a);if(c!=null){var b=c.price.replace(".",decpoint);return"
    "+b+"
    "}return""}function createProdInfoTxt(b){var a="";if(priceinlist==0){a+="
    "}else{a+=createProdEntryWithTextPrice(b,"prodtextinfo","pinfo")}if(showplusminus==1){a+="
    ";a+="
    "}return a}function createSearchProdInfoTxt(b){var a="";if(priceinlist==0){a+="
    "}else{a+=createProdEntryWithTextPrice(b,"srtextinfo","srinfo")}if(showplusminus==1){a+="
    ";a+="
    "}return a}function createServeInfo(e,c,b){if(supplyright==0){return""}if(e==null){e="n"}if(b>0){var a=""+b+"("+c+")";if(b>=c){a+="
    "}else{a+="
    "}return a}else{return""}}function getProdEntry(e){var b=$("#typprodpage").data("types_prods");var c=0;var a=b.prods;for(c=0;c";var b=$("#typprodpage").data("types_prods");var e=getProdSizeClass();var a=false;var c=[];$.each(b.prods,function(g,h){if(parseInt(h.favorite)==1){a=true;c[c.length]={id:h.id,longname:h.longname}}});c.sort(prodcompare);$.each(c,function(g,h){f+='
  • '+toHtml(h.longname);f+=createProdInfoTxt(h.id);f+="
  • "});f+="";if(a){$("#favarea").html(f);$("#favarea").trigger("create")}else{$("#favarea").html("");$("#favarea").trigger("create")}}function bindFavEvent(){$(".fav").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();favOrSearchWasClicked=true;levelOneType=0;var a=this.id.split("_")[1];selectedProdCount=getProdCount(a);handleClickOnProd(a)})}function displayTypesProds(c,b){if(preferfixbtns!=1){window.scrollTo(0,0)}if(c==0){fillFavArea();bindFavEvent()}else{$("#favarea").html("")}var a=null;if(b==null){idOfHigherType=c;a=listOfTypesProds(parseInt(c));extrasMenuOpen=false}else{a=listOfExtras(parseInt(c));extrasMenuOpen=true}$("#typeproducts-list").empty().append(a).promise().done(function(){refreshList("#typeproducts-list");$(this).off("click").on("click","a",function(f){f.stopImmediatePropagation();f.preventDefault();productInListClicked(this.id,c)});bindHigherButtons()});$(".prodinfo").off("click").on("click",function(i){i.stopImmediatePropagation();i.preventDefault();var f=this.id.split("_")[1];var h=getProdEntry(f);var g=h.price;alert(W_PRICE[lang]+": "+g+" "+currency)});$(".prodplus").off("click").on("click",function(h){h.stopImmediatePropagation();h.preventDefault();var g=this.id.split("_")[1];var f=getProdCount(g);$("#prodcount_"+g).html(f+1)});$(".prodminus").off("click").on("click",function(h){h.stopImmediatePropagation();h.preventDefault();var g=this.id.split("_")[1];var f=getProdCount(g);if(f==2){$("#prodcount_"+g).html("");selectedProdCount=1}else{if(f>2){$("#prodcount_"+g).html(f-1)}}});$(".prodcount").off("click").on("click",function(g){g.stopImmediatePropagation();g.preventDefault();var f=this.id.split("_")[1];$("#enternumberdlg").data("prodid",f);enternumberdlgshown=true;$("#enternumberfield").val("");$.mobile.changePage("#enternumberdlg");var h=$(this).parent().attr("id");bindEnterNumberNumbers(h,c)})}function productInListClicked(b,e){favOrSearchWasClicked=false;$("#searchField").val("");$("#barcode").val("");generateSearchResults();var a=b.split("_");if(a[0]=="t"){if(e==0){levelOneType=a[1];e=a[1]}displayTypesProds(a[1],null)}else{var c=a[1];selectedProdCount=getProdCount(c);$("#prodcount_"+c).html("");handleClickOnProd(c)}}function getHigherType(){var c=$("#typprodpage").data("types_prods");var b=c.types;var f=0;if(!extrasMenuOpen){for(var e=0;e0)){w_extras=[];w_allextras=a;idOfHigherType=c.ref;if(c.unit==1){requestPriceInExtras=true;presetPriceInExtras=""}else{requestPriceInExtras=false}displayTypesProds(b,a);bindExtrasSel()}else{if(c.unit==1){hideMenuProd();enterpricedlgshown=true;$("#enterpricedlg").data("prodid",b);$("#enterpricefield").val("");$.mobile.changePage("#enterpricedlg");bindEnterPriceNumbers()}else{addProductToNewOrdersList(b,null)}}}function bindEnterPriceNumbers(){$(".numfield td").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var f=$(this).html();var a=$(this).attr("class");if(a!="keyboardapply"){var c=String($("#enterpricefield").val());$("#enterpricefield").val(c+f)}});$("#apply_priceenter").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();var a=$("#enterpricedlg").data("prodid");var b=$("#enterpricefield").val();b=b.trim();b=b.replace(decpoint,".");if((b!="")&&($.isNumeric(b))){$("#enterpricedlg").dialog("close");addProductToNewOrdersList(a,null,b)}else{alert(W_NO_VALID_PRICE[lang])}})}function bindPartNumberEntry(){$(".numfield td").off("click").on("click",function(f){f.stopImmediatePropagation();f.preventDefault();var g=$(this).html();var c=$(this).attr("class");if(c!="keyboardapply"){var a=String($("#enternumberfield").val());if(c=="dellastkey"){var h=a.length;if(h>0){var b=a.substring(0,h-1);$("#enternumberfield").val(b)}}else{$("#enternumberfield").val(a+g)}}})}function bindEnterNumberNumbers(b,a){bindPartNumberEntry();$("#apply_numberenter").off("click").on("click",function(g){g.stopImmediatePropagation();g.preventDefault();var f=$("#enternumberdlg").data("prodid");var c=$("#enternumberfield").val().trim();if(c==""){c=1}if($.isNumeric(c)){if((c<1)||(c>1000)){alert(w_INVALID_NO_RANGE[lang])}else{if(c>1){$("#enternumberdlg").dialog("close");$("#prodcount_"+f).html(c);productInListClicked(b,a)}else{$("#enternumberdlg").dialog("close");$("#prodcount_"+f).html("");productInListClicked(b,a)}}}else{alert(W_INVALID_NO_ENTERING[lang])}})}function bindEnterSearchNumberNumbers(a){bindPartNumberEntry();$("#apply_numberenter").off("click").on("click",function(f){f.stopImmediatePropagation();f.preventDefault();var c=$("#enternumberdlg").data("prodid");var b=$("#enternumberfield").val().trim();if(b==""){b=1}if($.isNumeric(b)){if((b<1)||(b>1000)){alert(w_INVALID_NO_RANGE[lang])}else{if(b>1){$("#enternumberdlg").dialog("close");$("#srprodcount_"+c).html(b);handleClickOnSearchResult(c)}else{$("#enternumberdlg").dialog("close");$("#srprodcount_"+c).html("");handleClickOnSearchResult(c)}}}else{alert(W_INVALID_NO_ENTERING[lang])}})}function addProductToNewOrdersList(b,c,f){var g=$("#typprodpage").data("table-info");var a=g[1];addProductToQueue(b,c,"NO",0,f);var h=getProdAudio(parseInt(b));var e=parseInt($("#typprodpage").data("ordervolume"))/10;if(h!=""){var k="customer/"+h;if(h.match(/mp3$/)){$("#audiofile").html('')}else{if(h.match(/ogg$/)){$("#audiofile").html('')}else{if(h.match(/wav$/)){$("#audiofile").html('')}}}document.getElementById("audiofile").load();document.getElementById("audiofile").volume=e;document.getElementById("audiofile").play()}else{if(e>0.5){beep()}}var i="php/contenthandler.php?module=queue&command=getJsonLongNamesOfProdsForTableNotDelivered&tableid="+a;fillNotDeliveredProductsOfATable(i);if((keeptypelevel==0)||(favOrSearchWasClicked)){displayTypesProds(levelOneType,null)}else{if(extrasMenuOpen){displayTypesProds(idOfHigherType,null)}}allowPrintAndOrderBtn=true;refreshList("#typeproducts-list")}function beep(){var a=new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAEx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LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");a.play()}function fetchTypeProdsFromServer(){doJsonAjaxAsync("GET","php/contenthandler.php?module=products&command=getAllTypesAndAvailProds",null,attachAndDisplayFirstRefTypes,true)}var waitProdTimer=null;function fillTypeProdList(b){var a=$("#typprodpage").data("types_prods");if(a!=undefined){displayTypesProds(b,null)}else{waitProdTimer=setInterval(function(){var c=$("#typprodpage").data("types_prods");if(c!=undefined){clearInterval(waitProdTimer);displayTypesProds(b,null)}},200)}}function fillTypeProdList_(a){displayTypesProds(a,null)}function createTxtAssignedProd(e){var b="";if(e.option!=""){b=" ("+toHtml(e.option)+")"}var c=e.longname;if(e.togo==1){c="To-Go: "+c}if(e.pricechanged==1){c+=" - "+e.price.replace(".",decpoint)}var a="";if(e.isready=="1"){a+=" ☞"}if(e.isCooking=="1"){a+=" ♨"}if(e.isPaid=="1"){a+=" ☑"}return toHtml(c)+b+a+"
    "+createExtraParagraph(e.extras)}function createListElOfAssignedProd(b){var a="";if("count" in b){if(b.count>1){a=b.count+"x "}}if(b.isready=="0"){return'
  • '+a+createTxtAssignedProd(b)+"
  • "}else{return'
  • '+a+createTxtAssignedProd(b)+"
  • "}}function fillAssignedProdList(b){if(b.length>0){notDeliveredProdsAvailable=true}else{notDeliveredProdsAvailable=false}$("#cancelcodefield").val("");if(cancelunpaidcode!=""){if(b.length>0){$("#cancelcodearea").show()}else{$("#cancelcodearea").hide()}}else{$("#cancelcodearea").hide()}var c=new Grouping(b,createTxtAssignedProd);c.group();var a='
  • '+W_KIT_BAR[lang]+"
  • ";a+=c.outputList(createListElOfAssignedProd);if(notDeliveredProdsAvailable){a+='
  • '+W_DEL_ALL_UNDELIVERED[lang]+"
  • "}$("#orderedprod-list-0").html(a);refreshList("#orderedprod-list-0");$("#undeliveredheader").off("click").on("click",function(f){f.stopImmediatePropagation();f.preventDefault();alert(W_UNDELIV_INFO[lang])});bindingOfAssignedProds(c);bindDelAllUndeliveredProds(b);$("#cancelcodeform").off("submit").on("submit",function(f){f.stopImmediatePropagation();f.preventDefault()})}function bindDelAllUndeliveredProds(a){$("#delallundelivered").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();areYouSure("Produkte löschen.",W_DEL_ALL_ASSIGNED_PRODS[lang],W_REMOVE[lang],function(){removeAllAssignedProds(a)})})}function removeAllAssignedProds(h){var c=true;if(cancelunpaidcode!=""){if($("#cancelcodefield").val()!=cancelunpaidcode){c=false;alert(W_WRONG_PIN[lang]);return}}for(var f=0;f