Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Nweni
2017-06-15 10:10:19 +06:30

View File

@@ -212,7 +212,7 @@ class SalePayment < ApplicationRecord
def sale_update_payment_status(paid_amount)
#update amount_outstanding
self.sale.amount_received = self.sale.amount_received.to_f + paid_amount.to_f
self.sale.save!
self.sale.amount_changed = self.sale.amount_received.to_f - self.sale.grand_total.to_f
all_received_amount = 0.0
sObj = Sale.find(self.sale_id)