fix payment amount mismatch
This commit is contained in:
@@ -1404,7 +1404,7 @@ def self.get_payment_method_by_shift(shift_sale_range,shift,from,to,payment_type
|
||||
if payment_type.present?
|
||||
sale_payment = sale_payment.where(payment_method: payment_type)
|
||||
end
|
||||
|
||||
|
||||
return payments_total, sale_payment
|
||||
end
|
||||
|
||||
@@ -1438,10 +1438,10 @@ end
|
||||
cash = 0.0
|
||||
self.sale_payments.each do |pay|
|
||||
if pay.payment_method == 'cash'
|
||||
cash = pay.payment_amount-self.amount_changed
|
||||
cash += pay.payment_amount
|
||||
end
|
||||
end
|
||||
return cash
|
||||
return cash - self.amount_changed
|
||||
end
|
||||
|
||||
def get_credit_amount
|
||||
|
||||
Reference in New Issue
Block a user