change tax in qrpay precreate
This commit is contained in:
@@ -35,6 +35,18 @@ class Foodcourt::QrpayController < BaseFoodcourtController
|
||||
@member_discount = MembershipSetting.find_by_discount(1)
|
||||
@membership_rebate_balance=0
|
||||
|
||||
@changable_tax = true
|
||||
lookup_changable_tax = Lookup.collection_of('changable_tax')
|
||||
if !lookup_changable_tax.empty?
|
||||
lookup_changable_tax.each do |changable_tax|
|
||||
if changable_tax[0].downcase == "change"
|
||||
if changable_tax[1] == '0'
|
||||
@changable_tax = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if Sale.exists?(sale_id)
|
||||
begin
|
||||
@cash = 0.0
|
||||
|
||||
@@ -465,7 +465,7 @@ var paymalcount = <%= @paymalcount %>;
|
||||
var customer_paypar_account = '<%= @sale_data.customer.paypar_account_no %>';
|
||||
// console.log(pdf_view)
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
$.post('/foodcourt/customer_view', {
|
||||
data: {
|
||||
items: <%= raw @sale_data.sale_items.to_json %>,
|
||||
@@ -1188,7 +1188,7 @@ $(document).ready(function(){
|
||||
if(data.status){
|
||||
// console.log(type);
|
||||
localStorage.setItem("tax_type", type);
|
||||
window.location.href = '/foodcourt/sale/'+sale_id+'/'+cashier_type+'/payment';
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user