From 9c3535307fcc51222637049b50db682d4b0b2a24 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 19 Aug 2014 10:41:34 +0530 Subject: [PATCH] [fix] frappe/erpnext#1510 --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 4 ++-- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 9d85cdb96b..d3e99d5e07 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -117,7 +117,7 @@ "search_index": 1 }, { - "description": "If not applicable please enter: NA", + "description": "", "fieldname": "bill_no", "fieldtype": "Data", "in_filter": 1, @@ -758,7 +758,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-08-12 05:25:16.261614", + "modified": "2014-08-19 10:36:33.177267", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 68a21d9117..2c762f3a23 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -89,8 +89,7 @@ class PurchaseInvoice(BuyingController): throw(_("Conversion rate cannot be 0 or 1")) def validate_bill_no(self): - if self.bill_no and self.bill_no.lower().strip() \ - not in ['na', 'not applicable', 'none']: + if self.bill_no: b_no = frappe.db.sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice` where bill_no = %s and credit_to = %s and docstatus = 1 and name != %s""", (self.bill_no, self.credit_to, self.name))