Skip to content

Commit

Permalink
Merge pull request #41879 from frappe/mergify/bp/version-15/pr-41817
Browse files Browse the repository at this point in the history
fix: use invoice outstanding on Dunning (backport #41817)
  • Loading branch information
ruthra-kumar authored Jun 12, 2024
2 parents 4d2d38c + a89b4f4 commit 59be55f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2678,6 +2678,10 @@ def postprocess_dunning(source, target):
target.closing_text = letter_text.get("closing_text")
target.language = letter_text.get("language")

# update outstanding
if source.payment_schedule and len(source.payment_schedule) == 1:
target.overdue_payments[0].outstanding = source.get("outstanding_amount")

target.validate()

return get_mapped_doc(
Expand Down

0 comments on commit 59be55f

Please sign in to comment.