diff --git a/app/views/origami/table_invoices/show.html.erb b/app/views/origami/table_invoices/show.html.erb index c7063053..0010997a 100644 --- a/app/views/origami/table_invoices/show.html.erb +++ b/app/views/origami/table_invoices/show.html.erb @@ -505,17 +505,37 @@ $('#foc').click(function() { url: "/origami/payment/cashier/foc", data: params, success:function(result){ + // if (cash >= 0) { + // swal({ + // title: "Information!", + // text: 'Thank You !', + // }, function (result) { + // // For Server Print - from jade + // if ($("#server_mode").val() == "cloud") { + // code2lab.printFile(result.filepath.substr(6), result.printer_url); + // } + // window.location.href = '/origami'; + // }); + // } + alert("hielslsl"); + alert(result) if (cash >= 0) { swal({ title: "Information!", text: 'Thank You !', - }, function (result) { - // For Server Print - from jade - if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath.substr(6), result.printer_url); - } - window.location.href = '/origami'; - }); + }, function () { + alert("hi"); + alert(result.filepath); + alert(result.filepath.substr(6)); + alert(result.printer_url); + // For Server Print - from jade + if ($("#server_mode").val() == "cloud") { + code2lab.printFile(result.filepath.substr(6), result.printer_url); + } + + window.location.href = '/origami'; + + }); } } });