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