From 65922d307900f58adca867681ae79bab35089a32 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 15 Jun 2015 10:23:53 +0530 Subject: [PATCH] [fix] supplier invoice date can not be after posting date --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 2516ded589..8820c87b40 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import frappe -from frappe.utils import cint, formatdate, flt +from frappe.utils import cint, formatdate, flt, getdate from frappe import msgprint, _, throw from erpnext.setup.utils import get_company_currency import frappe.defaults @@ -389,7 +389,7 @@ class PurchaseInvoice(BuyingController): def validate_supplier_invoice(self): if self.bill_date: - if self.bill_date > self.posting_date: + if getdate(self.bill_date) > getdate(self.posting_date): frappe.throw("Supplier Invoice Date cannot be greater than Posting Date") if self.bill_no: if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):