mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(accounts): render dunning letters after calculating totals
(cherry picked from commit f1ae497fde)
This commit is contained in:
@@ -3021,7 +3021,6 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
|
||||
target.income_account = dunning_type.income_account
|
||||
target.cost_center = dunning_type.cost_center
|
||||
target.language = source.language
|
||||
target.get_dunning_letter_text()
|
||||
|
||||
# update outstanding from doc
|
||||
if source.payment_schedule and len(source.payment_schedule) == 1:
|
||||
@@ -3030,6 +3029,8 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
|
||||
row.outstanding = source.get("outstanding_amount")
|
||||
|
||||
target.validate()
|
||||
if dunning_type:
|
||||
target.get_dunning_letter_text()
|
||||
|
||||
return get_mapped_doc(
|
||||
from_doctype="Sales Invoice",
|
||||
|
||||
Reference in New Issue
Block a user