This commit is contained in:
Neil Trini Lasrado 2014-08-19 10:41:34 +05:30
parent 5e893ef8fd
commit 9c3535307f
2 changed files with 3 additions and 4 deletions

View File

@ -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",

View File

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