rounding adj in credit and other

This commit is contained in:
Yan
2017-12-07 12:19:07 +06:30
parent 69b786a91d
commit e4b4a3d986
6 changed files with 40 additions and 4 deletions

View File

@@ -213,14 +213,12 @@ class SalePayment < ApplicationRecord
def external_terminal_card_payment(method)
payment_status = false
self.payment_method = method
self.payment_amount = self.received_amount
self.payment_reference = self.card_payment_reference
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
self.payment_status = "paid"
payment_method = self.save!
sale_update_payment_status(self.received_amount)
return payment_status
end