in payment matching tool only show outstanding invoices

This commit is contained in:
Nabin Hait 2013-01-21 12:29:20 +05:30
parent 8f4c78c4bf
commit ec44cd763e

View File

@ -40,7 +40,7 @@ cur_frm.fields_dict.voucher_no.get_query = function(doc) {
and ifnull(gle.is_cancelled, 'No') = 'No'\ and ifnull(gle.is_cancelled, 'No') = 'No'\
and (select sum(debit) - sum(credit) from `tabGL Entry` \ and (select sum(debit) - sum(credit) from `tabGL Entry` \
where against_voucher_type = '%(dt)s' and against_voucher = gle.voucher_no \ where against_voucher_type = '%(dt)s' and against_voucher = gle.voucher_no \
and ifnull(is_cancelled, 'No') = 'No') > 0 \ and ifnull(is_cancelled, 'No') = 'No') != 0 \
ORDER BY gle.posting_date DESC, gle.voucher_no DESC LIMIT 50 \ ORDER BY gle.posting_date DESC, gle.voucher_no DESC LIMIT 50 \
", {dt:doc.voucher_type, acc:doc.account}); ", {dt:doc.voucher_type, acc:doc.account});
} }