From b1bd69c70e3039dcc40bb7c931fabe065a5168d0 Mon Sep 17 00:00:00 2001 From: phyusin Date: Mon, 10 Dec 2018 13:34:22 +0630 Subject: [PATCH] order reservation js --- app/assets/javascripts/order_reservation.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/order_reservation.js b/app/assets/javascripts/order_reservation.js index a38912b8..8f301400 100644 --- a/app/assets/javascripts/order_reservation.js +++ b/app/assets/javascripts/order_reservation.js @@ -726,12 +726,12 @@ function print_receipt(){ data: params, success:function(result){ // For Server Print - from jade - // if ($("#server_mode").val() == "cloud") { - // if(typeof code2lab != 'undefined'){ - // code2lab.printFile(result.filepath.substr(6), result.printer_url); - // } - // } - // else{ + if ($("#server_mode").val() == "cloud") { + if(typeof code2lab != 'undefined'){ + code2lab.printFile(result.filepath.substr(6), result.printer_url); + } + } + else{ swal({ title: "Print Success", text: "Complete Order", @@ -743,7 +743,7 @@ function print_receipt(){ }, function () { window.location.href = '/origami/order_reservation'; }); - // } + } } }); }