From 9bd56b0f79af4970ce6c1762d647725fba4ebbf9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 1 Feb 2022 14:14:04 +0530 Subject: [PATCH] fix: typeerror on invoice creation from SO/PO --- 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 eab9e12641..29c2633237 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1315,6 +1315,9 @@ class AccountsController(TransactionBase): payment_schedule['discount_type'] = schedule.discount_type payment_schedule['discount'] = schedule.discount + if not schedule.invoice_portion: + payment_schedule['payment_amount'] = schedule.payment_amount + self.append("payment_schedule", payment_schedule) def set_due_date(self):