This commit is contained in:
Nweni
2017-06-11 16:57:31 +06:30
parent a809818324
commit 05286ce7a6
8 changed files with 54 additions and 8 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!