osaka menu update and void tax calc fix

This commit is contained in:
Yan
2017-07-21 14:56:40 +06:30
parent 13e274eefb
commit 2e8c866761
4 changed files with 30 additions and 10 deletions

View File

@@ -42,8 +42,8 @@ class Sale < ApplicationRecord
booking.sale_id = sale_id
end
order = booking.booking_orders.take.order
link_order_sale(order.id)
order = booking.booking_orders.take.order
link_order_sale(order.id)
return status, sale_id
end
@@ -323,7 +323,8 @@ class Sale < ApplicationRecord
sale_tax.tax_rate = tax.rate
#include or execulive
# sale_tax.tax_payable_amount = total_taxable * tax.rate
sale_tax.tax_payable_amount = total_taxable * tax.rate / 100
total_tax = total_taxable - self.total_discount
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
#new taxable amount is standard rule for step by step
# total_taxable = total_taxable + sale_tax.tax_payable_amount