fix failing tests
This commit is contained in:
parent
ae0eb718a3
commit
99849f8eab
@ -769,6 +769,8 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
||||
references = get_outstanding_reference_documents(args=args)
|
||||
|
||||
for reference in references:
|
||||
if reference.voucher_no == dn:
|
||||
allocated_amount = min(paid_amount, reference.outstanding_amount)
|
||||
pe.append("references", {
|
||||
'reference_doctype': reference.voucher_type,
|
||||
'reference_name': reference.voucher_no,
|
||||
@ -777,6 +779,8 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
||||
'outstanding_amount': reference.outstanding_amount,
|
||||
'allocated_amount': reference.outstanding_amount
|
||||
})
|
||||
if paid_amount:
|
||||
paid_amount -= allocated_amount
|
||||
|
||||
pe.setup_party_account_field()
|
||||
pe.set_missing_values()
|
||||
@ -785,6 +789,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
||||
pe.set_amounts()
|
||||
return pe
|
||||
|
||||
|
||||
def get_paid_amount(dt, dn, party_type, party, account, due_date):
|
||||
if party_type=="Customer":
|
||||
dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
|
||||
|
Loading…
x
Reference in New Issue
Block a user