Merge pull request #6518 from nabinhait/ar_ap_fix

Minor fix AR/AP
This commit is contained in:
Nabin Hait 2016-10-01 17:03:09 +05:30 committed by GitHub
commit c158ccd884

View File

@ -94,9 +94,10 @@ class ReceivablePayableReport(object):
data = [] data = []
for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")): for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")):
if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers): if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers):
outstanding_amount = self.get_outstanding_amount(gle, self.filters.report_date, dr_or_cr) outstanding_amount = flt(self.get_outstanding_amount(gle,
if abs(outstanding_amount) > 0.1/10**currency_precision: self.filters.report_date, dr_or_cr), currency_precision)
if abs(outstanding_amount) > 0.1/10**currency_precision:
row = [gle.posting_date, gle.party] row = [gle.posting_date, gle.party]
# customer / supplier name # customer / supplier name
@ -228,7 +229,7 @@ class ReceivablePayableReport(object):
account_currency, remarks, {0} account_currency, remarks, {0}
from `tabGL Entry` from `tabGL Entry`
where docstatus < 2 and party_type=%s and (party is not null and party != '') {1} where docstatus < 2 and party_type=%s and (party is not null and party != '') {1}
group by voucher_type, voucher_no, against_voucher_type, against_voucher group by voucher_type, voucher_no, against_voucher_type, against_voucher, party
order by posting_date, party""" order by posting_date, party"""
.format(select_fields, conditions), values, as_dict=True) .format(select_fields, conditions), values, as_dict=True)