diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 7986c3d480..9a6044f8d7 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1947,7 +1947,7 @@ class AccountsController(TransactionBase): 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 @@ -2130,7 +2130,7 @@ class AccountsController(TransactionBase): ) 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")