This commit is contained in:
Nweni
2017-06-12 13:26:09 +06:30
parent b6bba9ecd4
commit ee208a5dcd
7 changed files with 60 additions and 54 deletions

View File

@@ -211,18 +211,18 @@ class SalePayment < ApplicationRecord
sObj.sale_payments.each do |spay|
all_received_amount += spay.payment_amount.to_f
end
if (self.sale.grand_total <= all_received_amount)
self.sale.payment_status = "paid"
self.sale.sale_status = "completed"
self.sale.save!
#TODO: table status
rebat()
end
end
def rebat
end
private