request bill error on promotion. fix for compute sale's totals on promotion.

This commit is contained in:
Thein Lin Kyaw
2019-11-08 20:35:26 +06:30
parent 1e2ff8b1be
commit 8046b7210b
13 changed files with 117 additions and 127 deletions

View File

@@ -419,7 +419,7 @@ class SalePayment < ApplicationRecord
SaleItem.update_existing_item(item.qty, item, self.sale.sale_id, "foc", item.unit_price, item.price)
end
sale = Sale.find(self.sale.sale_id)
sale.compute_by_sale_items(sale.id, sale.sale_items, sale.total_discount,'','','',"foc")
sale.compute_by_sale_items(sale.total_discount,'','','',"foc")
self.payment_method = "foc"
self.payment_amount = self.received_amount