change credit payment query for dashboard and daily sales
This commit is contained in:
@@ -21,7 +21,7 @@ class SalePayment < ApplicationRecord
|
||||
invoice_sale_payments = invoice.sale_payments
|
||||
amount_due = invoice.grand_total
|
||||
end
|
||||
|
||||
|
||||
invoice_sale_payments.each do |payment|
|
||||
if (payment.payment_status == "paid" )
|
||||
amount_due = amount_due - payment.payment_amount
|
||||
|
||||
Reference in New Issue
Block a user