commit
76f0d26f1e
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import cint, formatdate, flt
|
from frappe.utils import cint, formatdate, flt, getdate
|
||||||
from frappe import msgprint, _, throw
|
from frappe import msgprint, _, throw
|
||||||
from erpnext.setup.utils import get_company_currency
|
from erpnext.setup.utils import get_company_currency
|
||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
@ -389,7 +389,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
def validate_supplier_invoice(self):
|
def validate_supplier_invoice(self):
|
||||||
if self.bill_date:
|
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")
|
frappe.throw("Supplier Invoice Date cannot be greater than Posting Date")
|
||||||
if self.bill_no:
|
if self.bill_no:
|
||||||
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
|
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
|
||||||
|
@ -171,7 +171,7 @@ class ReceivablePayableReport(object):
|
|||||||
def get_gl_entries(self, party_type):
|
def get_gl_entries(self, party_type):
|
||||||
if not hasattr(self, "gl_entries"):
|
if not hasattr(self, "gl_entries"):
|
||||||
conditions, values = self.prepare_conditions(party_type)
|
conditions, values = self.prepare_conditions(party_type)
|
||||||
self.gl_entries = frappe.db.sql("""select posting_date, account, party_type, party, debit, credit,
|
self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party, debit, credit,
|
||||||
voucher_type, voucher_no, against_voucher_type, against_voucher from `tabGL Entry`
|
voucher_type, voucher_no, against_voucher_type, against_voucher from `tabGL Entry`
|
||||||
where docstatus < 2 and party_type=%s {0} order by posting_date, party"""
|
where docstatus < 2 and party_type=%s {0} order by posting_date, party"""
|
||||||
.format(conditions), values, as_dict=True)
|
.format(conditions), values, as_dict=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user