[fix] frappe/erpnext#1510
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 9d85cdb..d3e99d5 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 68a21d9..2c762f3 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -89,8 +89,7 @@
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))