check click event when add invoice

This commit is contained in:
phyusin
2018-04-05 17:44:07 +06:30
parent 7c15dac2aa
commit d1bd0764d8
2 changed files with 8 additions and 0 deletions

View File

@@ -838,6 +838,8 @@ $('#back').on('click',function(){
})
$('#add_invoice').on('click',function(){
$("#first_bill").prop('disabled',true);
$("#pay").prop('disabled',true);
var dining_id = "<%= @room.id %>"
var sale_id = $("#sale_id").val(); //<%= @obj_sale.sale_id rescue "" %>
var ajax_url = "/origami/sale/append_order";
@@ -854,6 +856,8 @@ $('#add_invoice').on('click',function(){
closeOnCancel: false,
allowOutsideClick: false
}, function () {
$("#first_bill").removeAttr('disabled');
$("#pay").removeAttr('disabled');
window.location.reload();
});
}