From ca318485c939ed99d7c15c2311bb0e5db2db40fc Mon Sep 17 00:00:00 2001 From: Geno Date: Thu, 19 Nov 2020 23:12:46 +0100 Subject: [PATCH] OrderSprinter 1.5.28 --- gastsystem/index.php | 8 +- gastsystem/install.php | 4 +- gastsystem/js/ordering.js | 2 +- gastsystem/php/ossystem.php | 9 +- javaprinter/javaprinter.jar | Bin 50363 -> 66118 bytes printserver/OrderSprinterPrintserver.exe | Bin 283136 -> 283136 bytes spider/install/installer.php | 2 +- webapp/OrderSprinterPrintserver.exe | Bin 283136 -> 283136 bytes webapp/bar.html | 6 +- webapp/bill.html | 4 +- webapp/customers.html | 4 +- webapp/dash.php | 4 +- webapp/feedback.html | 4 +- webapp/help.php | 6 +- webapp/index.html | 12 +- webapp/install.html | 22 ++- webapp/install/installer.php | 2 +- webapp/kitchen.html | 6 +- webapp/manager.html | 58 +++++-- webapp/paydesk.html | 5 +- webapp/php/admin.php | 79 +++++---- webapp/php/bill.php | 97 +++++++---- webapp/php/closing.php | 26 +-- webapp/php/contenthandler.php | 3 + webapp/php/customers.php | 6 +- webapp/php/dbutils.php | 6 +- webapp/php/debug.php | 2 +- webapp/php/queuecontent.php | 194 +++++++++++++--------- webapp/php/reports.php | 51 +++++- webapp/php/reservation.php | 2 +- webapp/php/roomtables.php | 5 +- webapp/php/utilities/demodata.php | 199 +++++++++++++++++++++++ webapp/php/utilities/version.php | 13 +- webapp/pickups.html | 4 +- webapp/preferences.html | 4 +- webapp/products.html | 10 +- webapp/productsdesktop.php | 4 +- webapp/rating.html | 4 +- webapp/reports.html | 162 +++++++++++------- webapp/reservation.html | 6 +- webapp/sumuphandler.php | 8 +- webapp/supplydesk.html | 4 +- webapp/tasks.html | 4 +- webapp/timetracking.html | 4 +- webapp/waiter.html | 6 +- 45 files changed, 739 insertions(+), 322 deletions(-) create mode 100644 webapp/php/utilities/demodata.php diff --git a/gastsystem/index.php b/gastsystem/index.php index da65d12..e0a789f 100644 --- a/gastsystem/index.php +++ b/gastsystem/index.php @@ -9,8 +9,8 @@ - - + + @@ -101,6 +101,8 @@
+ +

@@ -111,7 +113,7 @@
  OrderSprinter
-
1.5.27  
+
1.5.28  
diff --git a/gastsystem/install.php b/gastsystem/install.php index 154388f..b918286 100644 --- a/gastsystem/install.php +++ b/gastsystem/install.php @@ -114,10 +114,10 @@ if (isset($_POST['code'])) { } else { echo ""; echo "Installation Gastsystem"; - echo ''; + echo ''; echo ""; echo "
"; - echo "Installation OrderSprinter-Gastsystem 1.5.27

"; + echo "Installation OrderSprinter-Gastsystem 1.5.28

"; echo "
"; echo "
"; echo "
"; diff --git a/gastsystem/js/ordering.js b/gastsystem/js/ordering.js index 6e08505..811a4c5 100644 --- a/gastsystem/js/ordering.js +++ b/gastsystem/js/ordering.js @@ -1 +1 @@ -$(document).on("pageinit","#guest-page",function(){var a=Date.now();$("#logoarea").html('');intervalCheckLastOsSystemAccess(5);getTables()});var selectedTableid=null;var syncisWorking=false;var dailycode=null;var tablecode=null;var products=null;var types=null;var currency="";var decpoint=".";var selectedproduct=null;var selectedtable=null;var timeout=0;var timecounter=0;var askdaycode=1;var asktablecode=1;var fetchTimer=null;function intervalCheckLastOsSystemAccess(b){doAjax("GET","php/ossystem.php?command=getsystemstatus",null,insertSyncIsWorking,true);var a=setInterval(function(){doAjax("GET","php/ossystem.php?command=getsystemstatus",null,insertSyncIsWorking,true)},b*1000)}function timeouting(){if(fetchTimer!=null){clearTimeout(fetchTimer)}if(timeout!=0){timecounter=0;fetchTimer=setInterval(function(){updateTimer()},1000)}}function createReadableTimeValue(c){var b=Math.floor(c/60);var a=c%60;if(a<10){a="0"+a.toString()}return"Verbleibende Zeit bis Neuanmeldung: "+b+":"+a+"  "}function updateTimer(){if(timecounter>0){$("#timecounter").show();$("#timecounter").html(createReadableTimeValue(timecounter))}else{$("#timecounter").hide()}if(timecounter>0){timecounter--;if(timecounter==0){var a=$("#tableselection").is(":visible");if(!a){$(".notcollapsible").hide();getTables()}}}}function insertSyncIsWorking(c){if(c.status=="OK"){if(c.msg.lastaccessok==1){syncisWorking=true}else{syncisWorking=false}if(syncisWorking){$("#warningdiv").hide()}else{$("#warningdiv").show()}var a=c.msg.dbwritestatus;var d=a.writeable;if(d==0){var b=a.file;if(a.reason!=""){b+=" (Zusatzinfo: "+a.reason+")"}$("#writeprotectedfile").html(b);$("#warningdiv2").show()}else{$("#warningdiv2").hide()}}}function getTables(){doAjax("GET","php/tables.php?command=gettables",null,insertTables,"Fehler beim Abruf der Tische",true)}function preventCollapsible(){$(".notcollapsible").off("collapsiblecollapse").on("collapsiblecollapse",function(a){a.stopImmediatePropagation();a.preventDefault();var b=this.id;$("#"+b).collapsible("expand")})}function insertTables(b){if(b.status!="OK"){alert("Es ist ein Fehler aufgetreten: "+b.msg)}else{currency=b.currency;decpoint=b.decpoint;timeout=b.timeout;askdaycode=b.askdaycode;asktablecode=b.asktablecode;var a="";a+=fillSelectionBox("tableselect",b.msg,"Tischauswahl");$("#tableselectionbox").html(a);$("#tableselection").show();$("#tableselection").trigger("create");preventCollapsible();$("#tableselectionbox").off("change").on("change",function(c){c.stopImmediatePropagation();c.preventDefault();selectedTableid=$("#tableselect").val();if(selectedTableid!=(-1)){$("#tableselection").hide();handleCodeInput()}});timeouting()}}function handleCodeInput(){if((askdaycode==0)&&(asktablecode==0)){tablecode="empty";dailycode="empty";timecounter=timeout;initProductsView();return}$("#tablecodediv").show();preventCollapsible();if(askdaycode==1){tablecode="empty";$("#daycodearea").show()}if(asktablecode==1){dailycode="empty";$("#tablecodearea").show()}$("#tablecodefield").val("");$("#dailycodefield").val("");$("#codebackbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();hideCodeAreas();$("#tablecodediv").hide();getTables()});$("#submitcodesbtn").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();tablecode=$("#tablecodefield").val().trim();dailycode=$("#dailycodefield").val().trim();var a={tableid:selectedTableid,tablecode:tablecode,dailycode:dailycode};doAjax("POST","php/tables.php?command=checkcodes",a,handleCodeCheck,"Fehler bei der Abfrage der Codes",true)})}function hideCodeAreas(){$("#daycodearea").hide();$("#tablecodearea").hide()}function handleCodeCheck(a){if(a.status!="OK"){alert(a.msg)}else{hideCodeAreas();timecounter=timeout;initProductsView()}}function fillSelectionBox(f,b,d){var e='
';e+='";return e}function toHtml(a){return(a.replace(/"/g,""").replace(//g,">"))}function initProductsView(){doAjax("POST","php/menu.php?command=getmenu",null,showProductsView,"Fehler bei der Abfrage der Speisekarte",true)}function showProductsView(a){timecounter=timeout;preventCollapsible();if(a.status!="OK"){alert("Fehler: "+a.msg);$("#productsdiv").hide();getTables()}else{products=a.msg.products;types=a.msg.types;showProdTypes(0);$("#tablecodediv").hide();$("#productsdiv").show();$("#prodbackbtn").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();$("#productsdiv").hide();getTables()})}}function showProdTypes(c){timecounter=timeout;var a=createTypesHtml(c);if(a!=null){$("#typesdiv").html(a);$("#typesdiv").trigger("create")}bindProdTypes();var b=createProdsHtml(c);if(b!=null){$("#prodsdiv").show();$("#prodsdiv").html(b);$("#prodsdiv").trigger("create");bindProducts()}else{$("#prodsdiv").hide()}preventCollapsible()}function bindProducts(){$(".product").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();var b=this.id.split("_")[1];selectedproduct=b;$("#productsdiv").hide();$("#prodconfirmdiv").show();timecounter=timeout;var a=getProductName(b);$("#selectedprod").html(toHtml(a));bindProdConfirm()})}function bindProdTypes(){$(".prodtype").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var a=this.id.split("_")[1];showProdTypes(a)});$(".up").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var a=this.id.split("_")[1];showProdTypes(a)})}function createTypesHtml(d){if(types==null){return null}var c='";return c}function getParentOfReference(c){for(var b=0;b';if(a){var l="php/ossystem.php?command=getprodimage&prodid="+j.id+"&t="+c;g+=''}g+=toHtml(j.longname);g+=" ("+h+")"}}g+="";if(f){return g}else{return null}}function getProductName(b){for(var a=0;a');intervalCheckLastOsSystemAccess(5);getTables()});var selectedTableid=null;var syncisWorking=false;var dailycode=null;var tablecode=null;var products=null;var types=null;var currency="";var decpoint=".";var selectedproduct=null;var selectedtable=null;var timeout=0;var timecounter=0;var askdaycode=1;var asktablecode=1;var fetchTimer=null;var orders=[];var tablevalues=[];function intervalCheckLastOsSystemAccess(b){doAjax("GET","php/ossystem.php?command=getsystemstatus",null,insertSyncIsWorking,true);var a=setInterval(function(){doAjax("GET","php/ossystem.php?command=getsystemstatus",null,insertSyncIsWorking,true)},b*1000)}function timeouting(){if(fetchTimer!=null){clearTimeout(fetchTimer)}if(timeout!=0){timecounter=0;fetchTimer=setInterval(function(){updateTimer()},1000)}}function createReadableTimeValue(c){var b=Math.floor(c/60);var a=c%60;if(a<10){a="0"+a.toString()}return"Verbleibende Zeit bis Neuanmeldung: "+b+":"+a+"  "}function updateTimer(){if(timecounter>0){$("#timecounter").show();$("#timecounter").html(createReadableTimeValue(timecounter))}else{$("#timecounter").hide()}if(timecounter>0){timecounter--;if(timecounter==0){var a=$("#tableselection").is(":visible");if(!a){$(".notcollapsible").hide();getTables()}}}}function insertSyncIsWorking(c){if(c.status=="OK"){if(c.msg.lastaccessok==1){syncisWorking=true}else{syncisWorking=false}if(syncisWorking){$("#warningdiv").hide()}else{$("#warningdiv").show()}var a=c.msg.dbwritestatus;var d=a.writeable;if(d==0){var b=a.file;if(a.reason!=""){b+=" (Zusatzinfo: "+a.reason+")"}$("#writeprotectedfile").html(b);$("#warningdiv2").show()}else{$("#warningdiv2").hide()}}}function getTables(){orders=[];doAjax("GET","php/tables.php?command=gettables",null,insertTables,"Fehler beim Abruf der Tische",true)}function preventCollapsible(){$(".notcollapsible").off("collapsiblecollapse").on("collapsiblecollapse",function(a){a.stopImmediatePropagation();a.preventDefault();var b=this.id;$("#"+b).collapsible("expand")})}function insertTables(b){if(b.status!="OK"){alert("Es ist ein Fehler aufgetreten: "+b.msg)}else{currency=b.currency;decpoint=b.decpoint;timeout=b.timeout;askdaycode=b.askdaycode;asktablecode=b.asktablecode;var a="";a+=fillSelectionBox("tableselect",b.msg,"Tischauswahl");$("#tableselectionbox").html(a);$("#tableselection").show();$("#tableselection").trigger("create");preventCollapsible();$("#tableselectionbox").off("change").on("change",function(c){c.stopImmediatePropagation();c.preventDefault();selectedTableid=$("#tableselect").val();if(selectedTableid!=(-1)){$("#tableselection").hide();handleCodeInput()}});timeouting()}}function handleCodeInput(){if((askdaycode==0)&&(asktablecode==0)){tablecode="empty";dailycode="empty";timecounter=timeout;initProductsView();return}$("#tablecodediv").show();preventCollapsible();if(askdaycode==1){tablecode="empty";$("#daycodearea").show()}if(asktablecode==1){dailycode="empty";$("#tablecodearea").show()}$("#tablecodefield").val("");$("#dailycodefield").val("");$("#codebackbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();hideCodeAreas();$("#tablecodediv").hide();getTables()});$("#submitcodesbtn").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();tablecode=$("#tablecodefield").val().trim();dailycode=$("#dailycodefield").val().trim();var a={tableid:selectedTableid,tablecode:tablecode,dailycode:dailycode};doAjax("POST","php/tables.php?command=checkcodes",a,handleCodeCheck,"Fehler bei der Abfrage der Codes",true)})}function hideCodeAreas(){$("#daycodearea").hide();$("#tablecodearea").hide()}function handleCodeCheck(a){if(a.status!="OK"){alert(a.msg)}else{hideCodeAreas();timecounter=timeout;initProductsView()}}function fillSelectionBox(f,b,d){tablevalues=b;var e='
';e+='";return e}function toHtml(a){return(a.replace(/"/g,""").replace(//g,">"))}function initProductsView(){doAjax("POST","php/menu.php?command=getmenu",null,showProductsView,"Fehler bei der Abfrage der Speisekarte",true)}function showProductsView(a){timecounter=timeout;preventCollapsible();if(a.status!="OK"){alert("Fehler: "+a.msg);$("#productsdiv").hide();getTables()}else{products=a.msg.products;types=a.msg.types;showProdTypes(0);$("#tablecodediv").hide();$("#productsdiv").show();$("#prodbackbtn").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();$("#productsdiv").hide();getTables()})}}function showProdTypes(c){timecounter=timeout;var a=createTypesHtml(c);if(a!=null){$("#typesdiv").html(a);$("#typesdiv").trigger("create")}bindProdTypes();var b=createProdsHtml(c);if(b!=null){$("#prodsdiv").show();$("#prodsdiv").html(b);$("#prodsdiv").trigger("create");bindProducts()}else{$("#prodsdiv").hide()}preventCollapsible()}function bindProducts(){$(".product").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();var b=this.id.split("_")[1];selectedproduct=b;$("#productsdiv").hide();$("#prodconfirmdiv").show();timecounter=timeout;var a=getProductName(selectedproduct);$("#selectedprod").html(toHtml(a));bindProdConfirm()})}function bindProdTypes(){$(".prodtype").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var a=this.id.split("_")[1];showProdTypes(a)});$(".up").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var a=this.id.split("_")[1];showProdTypes(a)})}function createTypesHtml(d){if(types==null){return null}var c='";return c}function getParentOfReference(c){for(var b=0;b";if(f){return g}else{return null}}function getProdDetails(e){for(var d=0;d';if(c){b+=''}b+=toHtml(a.prodname);b+=" ("+a.price+")";return b}function bindProdConfirm(){$("#prodconfirmbackbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();$("#prodconfirmdiv").hide();initProductsView()});$("#prodconfirmbtn").off("click").on("click",function(b){b.stopImmediatePropagation();b.preventDefault();var a={prodid:selectedproduct,tableid:selectedTableid,dailycode:dailycode,tablecode:tablecode};doAjax("POST","php/queue.php?command=putintoqueue",a,askForMore,"Fehler beim Senden der Produktdaten",true)})}function askForMore(a){if(a.status!="OK"){alert("Fehler: "+a.msg)}else{var b=Date.now();orders[orders.length]={prodid:selectedproduct,ordertime:b};createOrdersList("#orderslist");$("#prodconfirmdiv").hide();$("#askformorediv").show();timecounter=timeout;preventCollapsible();$("#askformorenobtn").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();$("#askformorediv").hide();getTables()});$("#askformoreyesbtn").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();$("#askformorediv").hide();initProductsView()})}}function createOrdersList(a){var d='";$("#searchResult").html(c);$("#searchResult").trigger("create");$(".srinfo").off("click").on("click",function(q){q.stopImmediatePropagation();q.preventDefault();var m=this.id.split("_")[1];var p=getProdEntry(m);var o=p.price;var n=p.unit;var l=W_PRICE[lang]+": "+o+" "+currency;if(n>2){l+="/"+g_units_arr[n].text}alert(l)});$(".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(1);selectedProdCount=1}else{if(l>2){$("#srprodcount_"+m).html(l-1)}}});$(".srprodcount").off("click").on("click",function(o){o.stopImmediatePropagation();o.preventDefault();var n=this.id.split("_")[1];var m=getProdEntry(n);var l=m.unit;if(l>1){alert(W_NOT_SUPPORTED[lang]);return}$("#enternumberdlg").data("prodid",n);enternumberdlgshown=true;$("#enternumberfield").val("");$.mobile.changePage("#enternumberdlg");var p=$(this).parent().attr("id");bindEnterSearchNumberNumbers(p)});$(".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,c){var e=parseFloat(b);var a=extrasManagement.calcPriceOfAssignedExtras(c);totalPrice=(parseFloat(e+a)).toFixed(2);return totalPrice}function addProductToQueueNoGuiUpdate(f,m,h,c,e,o,g){var b=getProdProperties(f);var a=b.name;var k=calcTotalPriceOfProdAndExtras(b.price,h);var n={name:a,option:m,extras:h,prodid:f,price:k,changedPrice:c,togo:e,unit:o,unitamount:g};for(var l=0;l";var q=groupedNewOrders.count.length;for(l=0;l1){o=f+g_units_arr[r].text+" "}var p=toHtml(groupedNewOrders.name[l]);var n=groupedNewOrders.option[l];var m=groupedNewOrders.count[l];if(m>1){p=""+m.toString()+"x "+o+p}else{p=o+p}var k=groupedNewOrders.prodids[l];if(n!=""){n="

    "+toHtml(n)+"

    "}var e=groupedNewOrders.changedPrices[l];var c=groupedNewOrders.togos[l];var t="";var h=groupedNewOrders.extras[l];if((h!=null)&&(h!="")){t=""+h+""}var g='
  • ';var b=p+n+t;if(e!="NO"){e=e.replace(".",decpoint)+" "+currency;if(r>1){e+="/"+g_units_arr[r].text}if(c!=0){s+=g+''+b+" ("+e+" - To-Go)
  • "}else{s+=g+''+b+" ("+e+")"}}else{if(c!=0){s+=g+''+b+" - To-Go"}else{s+=g+''+b+""}}}$("#neworders").html(s);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],unit:groupedNewOrders.units[b],unitamount:groupedNewOrders.unitamounts[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 removeCurrentOrders(){groupedNewOrders={count:[],joinedvals:[],name:[],prodids:[],extras:[],origidxs:[],changedPrices:[],togos:[]};neworders=[]}function gotoTablePage(){removeCurrentOrders();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,h,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(s,u){var r=u.pricesum;var q=r.replace(".",decpoint)+" "+currency;var o=u.prodcount;var t=u.prodready;var n=u.readyQueueIds;var m=u.reservations;var p=u.name;if(m!=""){p+=" (Res.: "+m+")"}if(r!=0){k+='
  • '+p+" ("+W_TO_PAY[lang]+": "+q+")"+createServeInfo(u.id,o,t)+"
  • "}else{k+='
  • '+p+createServeInfo(u.id,o,t)+"
  • "}});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){a+='
  • '+W_APPLY[lang]+"
  • "}a+=extrasManagement.renderExtras(c,b,true);if(requestPriceInExtras!=false){a+='
  •  '+currency+"
  • "}if(applyExtraBtnPos!=2){a+='
  • '+W_APPLY[lang]+"
  • "}a+=createHigherLine(b);return a}function bindExtrasSel(){$(".extrasel").off("click").on("click",function(i){i.stopImmediatePropagation();i.preventDefault();var a=this.id.split("_");var b=a[1];var f=a[2];if((b=="abottom")||(b=="atop")){var g=getProdEntry(f);var c=g.extras;var k=extrasManagement.getAssignedExtras();if(requestPriceInExtras){var h=$("#enterpriceextrasfield").val();h=h.trim();h=h.replace(decpoint,".");if((h!="")&&($.isNumeric(h))){requestPriceInExtras=false;presetPriceInExtras="";addProductToNewOrdersList(f,k,h,0,1)}else{alert(W_NO_VALID_PRICE[lang])}}else{addProductToNewOrdersList(f,k,null,0,1)}}else{extrasManagement.extraClicked(b);if(requestPriceInExtras!==false){presetPriceInExtras=$("#enterpriceextrasfield").val()}var l=listOfExtras(f);$("#typeproducts-list").html(l);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,m.unit);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,f,g){var e=getProdEntry(a);var c=e.unit;if(e!=null){var b=e.price.replace(".",decpoint);if(c>1){b+="
    /"+g_units_arr[c].text}return"
    "+b+"
    "}return""}function createProdInfoTxt(b,c){var a="";if(showplusminus==1){a+="1";7}if(priceinlist==0){a+="
    "}else{a+=createProdEntryWithTextPrice(b,"prodtextinfo","pinfo")}if(showplusminus==1){a+="
    ";a+="
    "}return a}function createSearchProdInfoTxt(b,c){var a="";if(showplusminus==1){a+="1"}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,unit:h.unit}}});c.sort(prodcompare);$.each(c,function(g,h){f+='
  • '+toHtml(h.longname);f+=createProdInfoTxt(h.id,h.unit);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];if(showplusminus==1){selectedProdCount=getProdCount(a)}else{selectedProdCount=1}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(l){l.stopImmediatePropagation();l.preventDefault();var g=this.id.split("_")[1];var k=getProdEntry(g);var i=k.price;var h=k.unit;var f=W_PRICE[lang]+": "+i+" "+currency;if(h>2){f+="/"+g_units_arr[h].text}alert(f)});$(".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(1);selectedProdCount=1}else{if(f>2){$("#prodcount_"+g).html(f-1)}}});$(".prodcount").off("click").on("click",function(i){i.stopImmediatePropagation();i.preventDefault();var h=this.id.split("_")[1];var g=getProdEntry(h);var f=g.unit;if(f>1){alert(W_NOT_SUPPORTED[lang]);return}$("#enternumberdlg").data("prodid",h);enternumberdlgshown=true;$("#enternumberfield").val("");$.mobile.changePage("#enternumberdlg");var k=$(this).parent().attr("id");bindEnterNumberNumbers(k,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];if(showplusminus==1){selectedProdCount=getProdCount(c)}else{selectedProdCount=1}$("#prodcount_"+c).html(1);handleClickOnProd(c)}}function getHigherType(){var c=$("#typprodpage").data("types_prods");var b=c.types;var f=0;if(!extrasMenuOpen){for(var e=0;e0)&&(e<2)){idOfHigherType=f.ref;if(f.unit==1){requestPriceInExtras=true;presetPriceInExtras=""}else{requestPriceInExtras=false}displayTypesProds(c,b);bindExtrasSel()}else{if(f.unit!=0){var a=g_units_arr[f.unit].longtext;$("#enterpriceheader").html(a);$("#enterpricedlg").data("unit",f.unit);hideMenuProd();enterpricedlgshown=true;$("#enterpricedlg").data("prodid",c);$("#enterpricefield").val("");$.mobile.changePage("#enterpricedlg");bindEnterPriceNumbers()}else{addProductToNewOrdersList(c,null,null,0,1)}}}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(f){f.stopImmediatePropagation();f.preventDefault();var a=$("#enterpricedlg").data("prodid");var c=$("#enterpricefield").val();c=c.trim();c=c.replace(decpoint,".");var b=$("#enterpricedlg").data("unit");if((c!="")&&($.isNumeric(c))){$("#enterpricedlg").dialog("close");if(b==1){addProductToNewOrdersList(a,null,c,0,1)}else{addProductToNewOrdersList(a,null,null,b,c)}}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(1);handleClickOnSearchResult(c)}}}else{alert(W_INVALID_NO_ENTERING[lang])}})}function addProductToNewOrdersList(e,f,g,m,b){if(g==undefined){g=null}if(m==undefined){m=0}if(b==undefined){b=1}var h=$("#typprodpage").data("table-info");var a=h[1];addProductToQueue(e,f,"NO",0,g,m,b);var i=getProdAudio(parseInt(e));var c=parseInt($("#typprodpage").data("ordervolume"))/10;if(i!=""){var l="customer/"+i;if(i.match(/mp3$/)){$("#audiofile").html('')}else{if(i.match(/ogg$/)){$("#audiofile").html('')}else{if(i.match(/wav$/)){$("#audiofile").html('')}}}document.getElementById("audiofile").load();document.getElementById("audiofile").volume=c;document.getElementById("audiofile").play()}else{if(c>0.5){beep()}}var k="php/contenthandler.php?module=queue&command=getJsonLongNamesOfProdsForTableNotDelivered&tableid="+a;fillNotDeliveredProductsOfATable(k);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,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qJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+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(f){var b="";if(f.option!=""){b=" ("+toHtml(f.option)+")"}var c=f.longname;if(f.togo==1){c="To-Go: "+c}if(f.pricechanged==1){c+=" - "+f.price.replace(".",decpoint)+" "+currency}if(f.unit>1){var g=g_units_arr[f.unit].text;var e=f.unitamount.replace(".",decpoint);c+=" ("+e+" "+g+")"}var a="";if(f.isready=="1"){a+=" ☞"}if(f.isCooking=="1"){a+=" ♨"}if(f.isPaid=="1"){a+=" ☑"}return toHtml(c)+b+a+"
    "+createExtraParagraph(f.extras,f.extrasamounts)}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