bill api return updated
This commit is contained in:
@@ -211,6 +211,7 @@ class SalePayment < ApplicationRecord
|
||||
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)
|
||||
puts " sale update ......"
|
||||
self.sale.payment_status = "paid"
|
||||
self.sale.sale_status = "completed"
|
||||
self.sale.save!
|
||||
|
||||
Reference in New Issue
Block a user