update jade print in pay,void and foc

This commit is contained in:
Aung Myo
2018-03-21 15:37:45 +06:30
parent a30abfb30c
commit 80853fb666
4 changed files with 58 additions and 17 deletions

View File

@@ -420,11 +420,11 @@
</div>
<div class="modal-footer ">
<div class="row m-b-10 m-r-30">
<% if ENV["SERVER_MODE"] != 'cloud' %>
<div class="col-md-5 m-r-20">
<button type="button" class="btn btn-link bg-red waves-effect print_receipt">Print</button>
</div>
<% end %>
<div class="col-md-5">
<button type="button" class="btn btn-link bg-blue waves-effect btn_pdf_close" data-dismiss="modal">CLOSE</button>
</div>
@@ -710,8 +710,12 @@ var customer_name = "<%= @customer.name %>";
type: 'POST',
url: ajax_url,
data: "remark="+ remark + "&sale_id=" + sale_id,
success: function () {
success: function (result) {result
customer_display_view(null,"reload");
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url);
}
if (cashier_type=="cashier") {
window.location.href = '/origami';
}else{
@@ -922,6 +926,10 @@ var customer_name = "<%= @customer.name %>";
title: "Information!",
text: 'Thank You !',
}, function () {
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url);
}
if (cashier_type=="cashier") {
window.location.href = '/origami';
}else{
@@ -997,6 +1005,10 @@ var customer_name = "<%= @customer.name %>";
data: params,
success:function(result){
console.log(result);
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url);
}
if (cashier_type=="cashier") {
window.location.href = '/origami';
}else{