[fix issue No #1510]
This commit is contained in:
parent
9c3535307f
commit
2026148dbe
@ -88,7 +88,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
if (self.currency == default_currency and flt(self.conversion_rate) != 1.00) or not self.conversion_rate or (self.currency != default_currency and flt(self.conversion_rate) == 1.00):
|
if (self.currency == default_currency and flt(self.conversion_rate) != 1.00) or not self.conversion_rate or (self.currency != default_currency and flt(self.conversion_rate) == 1.00):
|
||||||
throw(_("Conversion rate cannot be 0 or 1"))
|
throw(_("Conversion rate cannot be 0 or 1"))
|
||||||
|
|
||||||
def validate_bill_no(self):
|
''' def validate_bill_no(self):
|
||||||
if self.bill_no:
|
if self.bill_no:
|
||||||
b_no = frappe.db.sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice`
|
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""",
|
where bill_no = %s and credit_to = %s and docstatus = 1 and name != %s""",
|
||||||
@ -103,7 +103,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
if not self.remarks:
|
if not self.remarks:
|
||||||
self.remarks = "No Remarks"
|
self.remarks = "No Remarks"
|
||||||
|
'''
|
||||||
def validate_credit_acc(self):
|
def validate_credit_acc(self):
|
||||||
if frappe.db.get_value("Account", self.credit_to, "report_type") != "Balance Sheet":
|
if frappe.db.get_value("Account", self.credit_to, "report_type") != "Balance Sheet":
|
||||||
frappe.throw(_("Account must be a balance sheet account"))
|
frappe.throw(_("Account must be a balance sheet account"))
|
||||||
|
Loading…
Reference in New Issue
Block a user