From 0da6c1688b3d37b21d25de81e202e3451fd8dac9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 16 May 2023 18:57:42 +0530 Subject: [PATCH] fix: unable to create partial invoice with auto fetch terms enabled (#35285) fix: fetch so/po terms if auto fetch is enabled --- erpnext/controllers/accounts_controller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 3d930d67e0..78bb05671d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1682,6 +1682,9 @@ class AccountsController(TransactionBase): d.base_payment_amount = flt( d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount") ) + else: + self.fetch_payment_terms_from_order(po_or_so, doctype) + self.ignore_default_payment_terms_template = 1 def get_order_details(self): if self.doctype == "Sales Invoice":