mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-27 23:21:32 +01:00
fix: use invoice outstanding on Dunning (#41817)
(cherry picked from commit cf0a29b05f)
This commit is contained in:
@@ -2678,6 +2678,10 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
|
|||||||
target.closing_text = letter_text.get("closing_text")
|
target.closing_text = letter_text.get("closing_text")
|
||||||
target.language = letter_text.get("language")
|
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()
|
target.validate()
|
||||||
|
|
||||||
return get_mapped_doc(
|
return get_mapped_doc(
|
||||||
|
|||||||
Reference in New Issue
Block a user