fix: NameError due to invalid variable

This commit is contained in:
Suraj Shetty 2020-05-03 20:17:47 +05:30
parent 9fffe254fc
commit 9a8512d01d

View File

@ -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):