fix reprint for completed invoices
This commit is contained in:
@@ -684,10 +684,38 @@ function check_emp_access_code(access_code,type) {
|
|||||||
$('#AccessCodeModal').modal('hide');
|
$('#AccessCodeModal').modal('hide');
|
||||||
$('#focModal').modal('show');
|
$('#focModal').modal('show');
|
||||||
}
|
}
|
||||||
|
else if(type == "reprint"){
|
||||||
|
$('#AccessCodeModal').modal('hide');
|
||||||
|
reprint();
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
swal("Oops",result.message,"warning");
|
swal("Oops",result.message,"warning");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#reprint').on('click', function () {
|
||||||
|
reprint();
|
||||||
|
});
|
||||||
|
|
||||||
|
function reprint(){
|
||||||
|
var sale_id = $('#sale_id').text();
|
||||||
|
|
||||||
|
var ajax_url = '/foodcourt/'+ sale_id + "/reprint";
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: ajax_url,
|
||||||
|
success: function (result) {
|
||||||
|
if ($("#server_mode").val() == "cloud") {
|
||||||
|
if(typeof code2lab != 'undefined'){
|
||||||
|
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ scope "(:locale)", locale: /en|mm/ do
|
|||||||
get '/addorders/get_menu_sub_category/:id' => "addorders#get_menu_sub_category",:as => "get_menu_sub_category", :defaults => { :format => 'json' }
|
get '/addorders/get_menu_sub_category/:id' => "addorders#get_menu_sub_category",:as => "get_menu_sub_category", :defaults => { :format => 'json' }
|
||||||
get '/addorders/products/list' => "addorders#get_all_product",:as => "get_all_product", :defaults => { :format => 'json' }
|
get '/addorders/products/list' => "addorders#get_all_product",:as => "get_all_product", :defaults => { :format => 'json' }
|
||||||
|
|
||||||
get '/:addorders/:id' => "addorders#detail"
|
# get '/:addorders/:id' => "addorders#detail"
|
||||||
post '/:addorders/create' => "addorders#create",:as => "addorder_create", :defaults => { :format => 'json' }
|
post '/:addorders/create' => "addorders#create",:as => "addorder_create", :defaults => { :format => 'json' }
|
||||||
post '/:addorders/add_to_existing_order' => "addorders#add_to_existing_order",:as => "add_to_existing_order", :defaults => { :format => 'json' }
|
post '/:addorders/add_to_existing_order' => "addorders#add_to_existing_order",:as => "add_to_existing_order", :defaults => { :format => 'json' }
|
||||||
|
|
||||||
@@ -717,6 +717,7 @@ scope "(:locale)", locale: /en|mm/ do
|
|||||||
post '/food_court/update_modify_order' => "orders#update_modify_order", :defaults => { :format => 'json' }
|
post '/food_court/update_modify_order' => "orders#update_modify_order", :defaults => { :format => 'json' }
|
||||||
get '/food_court/:order_id/request_bill' => 'orders#request_bill', :as => 'food_court_request_bill'
|
get '/food_court/:order_id/request_bill' => 'orders#request_bill', :as => 'food_court_request_bill'
|
||||||
get 'current_shift_order_count' => 'orders#current_shift_order_count', :as => 'food_court_order_count'
|
get 'current_shift_order_count' => 'orders#current_shift_order_count', :as => 'food_court_order_count'
|
||||||
|
get '/:sale_id/reprint' => 'payments#reprint', :defaults => {:format => 'json'}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user