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

This commit is contained in:
Moe Su
2017-06-11 17:40:53 +06:30
7 changed files with 54 additions and 7 deletions

View File

@@ -134,7 +134,7 @@ class SalePayment < ApplicationRecord
self.payment_method = method
self.payment_amount = self.received_amount
self.payment_reference = self.card_payment_reference
self.outstanding_amount = self.sale.grand_total- self.received_amount
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
self.payment_status = "paid"
payment_method = self.save!