change tax in qrpay precreate

This commit is contained in:
Dev Team
2025-07-14 14:51:46 +06:30
parent a603223f1c
commit fc69dc2293
2 changed files with 14 additions and 2 deletions

View File

@@ -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

View File

@@ -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();
}
}
});