From c3f2fb7355ec457edca6f1972063e367d66f2c6f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 12 Dec 2013 14:55:25 +0530 Subject: [PATCH] [fix] [minor] payment to invoice patching tool --- .../payment_to_invoice_matching_tool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py index 6a31191969..dea5fb59c9 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py @@ -145,6 +145,8 @@ def gl_entry_details(doctype, txt, searchfield, start, page_len, filters): and voucher_no != gle.voucher_no) != abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0) ) + and if(gle.voucher_type='Sales Invoice', (select is_pos from `tabSales Invoice` + where name=gle.voucher_no), 0)=0 %(mcond)s ORDER BY gle.posting_date desc, gle.voucher_no desc limit %(start)s, %(page_len)s""" % {