Skip to content

Commit 768a888

Browse files
joezsweetnabinhait
joezsweet
authored andcommitted
[fix] validate supplier invoice
- modified to check for the selected supplier only
1 parent 8037a0e commit 768a888

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,12 @@ def validate_supplier_invoice(self):
628628
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
629629
where
630630
bill_no = %(bill_no)s
631+
and supplier = %(supplier)s
631632
and name != %(name)s
632633
and docstatus < 2
633634
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
634635
"bill_no": self.bill_no,
636+
"supplier": self.supplier,
635637
"name": self.name,
636638
"year_start_date": fiscal_year.year_start_date,
637639
"year_end_date": fiscal_year.year_end_date

0 commit comments

Comments
 (0)