From 9a8512d01d0779fdf543de950a76d4f42c4feb51 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 3 May 2020 20:17:47 +0530 Subject: [PATCH] fix: NameError due to invalid variable --- erpnext/accounts/doctype/share_transfer/share_transfer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/share_transfer/share_transfer.py b/erpnext/accounts/doctype/share_transfer/share_transfer.py index d4aa0f0ef8..4024b8155a 100644 --- a/erpnext/accounts/doctype/share_transfer/share_transfer.py +++ b/erpnext/accounts/doctype/share_transfer/share_transfer.py @@ -178,10 +178,10 @@ class ShareTransfer(Document): frappe.throw(_('The shareholder does not belong to this company')) if not doc.folio_no: doc.folio_no = self.from_folio_no \ - if (shareholder == 'from_shareholder') else self.to_folio_no + if (shareholder_field == 'from_shareholder') else self.to_folio_no doc.save() else: - if doc.folio_no and doc.folio_no != (self.from_folio_no if (shareholder == 'from_shareholder') else self.to_folio_no): + if doc.folio_no and doc.folio_no != (self.from_folio_no if (shareholder_field == 'from_shareholder') else self.to_folio_no): frappe.throw(_('The folio numbers are not matching')) def autoname_folio(self, shareholder, is_company=False):