check payment and ability for split bill
This commit is contained in:
@@ -93,6 +93,11 @@ class Ability
|
||||
can :index, :home
|
||||
can :show, :home
|
||||
|
||||
#ability for split_bill
|
||||
can :index, :split_bill
|
||||
can :create, :split_bill
|
||||
can :update_sale, :split_bill
|
||||
|
||||
elsif user.role == "cashier"
|
||||
|
||||
# can :overall_void, :void
|
||||
@@ -191,6 +196,11 @@ class Ability
|
||||
|
||||
can :index, :home
|
||||
can :show, :home
|
||||
|
||||
#ability for split_bill
|
||||
can :index, :split_bill
|
||||
can :create, :split_bill
|
||||
can :update_sale, :split_bill
|
||||
elsif user.role == "waiter"
|
||||
can :index, :home
|
||||
can :show, :home
|
||||
|
||||
@@ -914,14 +914,15 @@ var customer_name = "<%= @customer.name %>";
|
||||
|
||||
function customer_display_view(data,status) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '../../../customer_view',
|
||||
data: {"data":data,"status":status},
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
}
|
||||
});
|
||||
}
|
||||
type: "POST",
|
||||
url: '../../../customer_view',
|
||||
data: {"data":data,"status":status},
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function calculate_member_discount(sale_id) {
|
||||
var sub_total = $('#sub-total').text();
|
||||
var member_id = $('#membership_id').text();
|
||||
@@ -969,12 +970,12 @@ var customer_name = "<%= @customer.name %>";
|
||||
data: params,
|
||||
success:function(result){
|
||||
console.log(result);
|
||||
customer_display_view(null,"reload");
|
||||
// if (cashier_type=="cashier") {
|
||||
// window.location.href = '/origami';
|
||||
// }else{
|
||||
// window.location.href = '/origami/quick_service';
|
||||
// }
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service';
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user