mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 15:00:27 +00:00
[fix] validate supplier invoice
- modified to check for the selected supplier only
This commit is contained in:
@@ -628,10 +628,12 @@ class PurchaseInvoice(BuyingController):
|
|||||||
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
|
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
|
||||||
where
|
where
|
||||||
bill_no = %(bill_no)s
|
bill_no = %(bill_no)s
|
||||||
|
and supplier = %(supplier)s
|
||||||
and name != %(name)s
|
and name != %(name)s
|
||||||
and docstatus < 2
|
and docstatus < 2
|
||||||
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
|
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
|
||||||
"bill_no": self.bill_no,
|
"bill_no": self.bill_no,
|
||||||
|
"supplier": self.supplier,
|
||||||
"name": self.name,
|
"name": self.name,
|
||||||
"year_start_date": fiscal_year.year_start_date,
|
"year_start_date": fiscal_year.year_start_date,
|
||||||
"year_end_date": fiscal_year.year_end_date
|
"year_end_date": fiscal_year.year_end_date
|
||||||
|
|||||||
Reference in New Issue
Block a user