mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix failing tests
This commit is contained in:
@@ -769,14 +769,18 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
|||||||
references = get_outstanding_reference_documents(args=args)
|
references = get_outstanding_reference_documents(args=args)
|
||||||
|
|
||||||
for reference in references:
|
for reference in references:
|
||||||
pe.append("references", {
|
if reference.voucher_no == dn:
|
||||||
'reference_doctype': reference.voucher_type,
|
allocated_amount = min(paid_amount, reference.outstanding_amount)
|
||||||
'reference_name': reference.voucher_no,
|
pe.append("references", {
|
||||||
'due_date': reference.due_date,
|
'reference_doctype': reference.voucher_type,
|
||||||
'total_amount': reference.invoice_amount,
|
'reference_name': reference.voucher_no,
|
||||||
'outstanding_amount': reference.outstanding_amount,
|
'due_date': reference.due_date,
|
||||||
'allocated_amount': reference.outstanding_amount
|
'total_amount': reference.invoice_amount,
|
||||||
})
|
'outstanding_amount': reference.outstanding_amount,
|
||||||
|
'allocated_amount': reference.outstanding_amount
|
||||||
|
})
|
||||||
|
if paid_amount:
|
||||||
|
paid_amount -= allocated_amount
|
||||||
|
|
||||||
pe.setup_party_account_field()
|
pe.setup_party_account_field()
|
||||||
pe.set_missing_values()
|
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()
|
pe.set_amounts()
|
||||||
return pe
|
return pe
|
||||||
|
|
||||||
|
|
||||||
def get_paid_amount(dt, dn, party_type, party, account, due_date):
|
def get_paid_amount(dt, dn, party_type, party, account, due_date):
|
||||||
if party_type=="Customer":
|
if party_type=="Customer":
|
||||||
dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
|
dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
|
||||||
|
|||||||
Reference in New Issue
Block a user