fix(JW Import): Don't match invoices posted after a payment is debited

This commit is contained in:
Glen Whitney 2020-11-23 00:27:40 +00:00
parent 423a906e2a
commit 03941c2f0e
1 changed files with 1 additions and 0 deletions

View File

@ -170,6 +170,7 @@ class JWImport(Document):
suplr = suppliers[0].name suplr = suppliers[0].name
invoices = frappe.get_all('Purchase Invoice', invoices = frappe.get_all('Purchase Invoice',
filters={'supplier': suplr, filters={'supplier': suplr,
'posting_date': ['<=', rec.debit_date],
'company': self.justworks_company}, 'company': self.justworks_company},
fields=['name', 'posting_date as date', 'grand_total', fields=['name', 'posting_date as date', 'grand_total',
'rounded_total', 'outstanding_amount']) 'rounded_total', 'outstanding_amount'])