fixed conflict
This commit is contained in:
@@ -207,7 +207,9 @@ 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.amount_changed = paid_amount.to_f - self.sale.amount_received.to_f
|
||||
|
||||
if (self.sale.grand_total <= self.sale.amount_received.to_f && self.sale.amount_changed.to_f > 0)
|
||||
self.sale.payment_status = "paid"
|
||||
self.sale.sale_status = "completed"
|
||||
|
||||
Reference in New Issue
Block a user