updatet tabe invoce for cloud print

This commit is contained in:
Aung Myo
2018-08-29 15:09:03 +06:30
parent 72c5ca7891
commit 0d85e25d25
2 changed files with 23 additions and 7 deletions

View File

@@ -257,6 +257,7 @@
</div>
</div>
</div>
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
<div class="modal fade" id="AccessCodeModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-sm" role="document">
@@ -332,7 +333,10 @@ $(document).ready(function(){
receipt_no = ($("#receipt_no").html()).trim();
if((receipt_no!=undefined) && (receipt_no!=""))
createReceiptNoInFirstBillData(receipt_no,"");
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();
}
});
@@ -360,6 +364,10 @@ $(document).ready(function(){
receipt_no = ($("#receipt_no").html()).trim();
if((receipt_no!=undefined) && (receipt_no!=""))
createReceiptNoInFirstBillData(receipt_no,type);
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();
}
});
@@ -428,6 +436,10 @@ $('#void').on('click',function () {
url: ajax_url,
data: "remark="+ remark + "&sale_id=" + sale_id + "&access_code=" + access_code ,
success: function () {
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
window.location.href = '/origami';
}
});
@@ -461,7 +473,11 @@ $('#foc').click(function() {
title: "Information!",
text: 'Thank You !',
}, function () {
window.location.href = '/origami';
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
window.location.href = '/origami';
});
}
}