fix: Due date for month end payment term
This commit is contained in:
parent
12637cda84
commit
bfb81ef56f
@ -2311,7 +2311,7 @@ def get_due_date(term, posting_date=None, bill_date=None):
|
||||
elif term.due_date_based_on == "Day(s) after the end of the invoice month":
|
||||
due_date = add_days(get_last_day(date), term.credit_days)
|
||||
elif term.due_date_based_on == "Month(s) after the end of the invoice month":
|
||||
due_date = add_months(get_last_day(date), term.credit_months)
|
||||
due_date = get_last_day(add_months(date, term.credit_months))
|
||||
return due_date
|
||||
|
||||
|
||||
@ -2323,7 +2323,7 @@ def get_discount_date(term, posting_date=None, bill_date=None):
|
||||
elif term.discount_validity_based_on == "Day(s) after the end of the invoice month":
|
||||
discount_validity = add_days(get_last_day(date), term.discount_validity)
|
||||
elif term.discount_validity_based_on == "Month(s) after the end of the invoice month":
|
||||
discount_validity = add_months(get_last_day(date), term.discount_validity)
|
||||
discount_validity = get_last_day(add_months(date, term.discount_validity))
|
||||
return discount_validity
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user