Update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user