Skip to content

Commit

Permalink
Merge pull request #39256 from deepeshgarg007/opening_ignore_tempplate
Browse files Browse the repository at this point in the history
fix: Ignore default payment terms template for opening invoices
  • Loading branch information
deepeshgarg007 authored Jan 10, 2024
2 parents 6f9fe6a + 53bf44d commit f057dc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ def group_similar_items(self):
self.remove(item)

def set_payment_schedule(self):
if self.doctype == "Sales Invoice" and self.is_pos:
if (self.doctype == "Sales Invoice" and self.is_pos) or self.get("is_opening") == "Yes":
self.payment_terms_template = ""
return

Expand Down Expand Up @@ -2145,7 +2145,7 @@ def validate_payment_schedule_dates(self):
)

def validate_payment_schedule_amount(self):
if self.doctype == "Sales Invoice" and self.is_pos:
if (self.doctype == "Sales Invoice" and self.is_pos) or self.get("is_opening") == "Yes":
return

party_account_currency = self.get("party_account_currency")
Expand Down

0 comments on commit f057dc6

Please sign in to comment.