fix: grand_total assigment before reference
This commit is contained in:
parent
4c4c0df7bd
commit
1f3cc7553c
@ -93,6 +93,7 @@ def resolve_dunning(doc, state):
|
||||
|
||||
def calculate_interest_and_amount(posting_date, outstanding_amount, rate_of_interest, dunning_fee, overdue_days):
|
||||
interest_amount = 0
|
||||
grand_total = 0
|
||||
if rate_of_interest:
|
||||
interest_per_year = flt(outstanding_amount) * flt(rate_of_interest) / 100
|
||||
interest_amount = (interest_per_year * cint(overdue_days)) / 365
|
||||
|
Loading…
Reference in New Issue
Block a user