diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.py b/erpnext/accounts/report/accounts_payable/accounts_payable.py index 3ae741e772..5ce2c562a3 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.py @@ -30,7 +30,8 @@ def execute(filters=None): data = [] for gle in entries: if cstr(gle.against_voucher) == gle.voucher_no or not gle.against_voucher \ - or [gle.against_voucher_type, gle.against_voucher] in entries_after_report_date: + or [gle.against_voucher_type, gle.against_voucher] in entries_after_report_date \ + or (gle.against_voucher_type == "Purchase Order"): voucher_details = voucher_detail_map.get(gle.voucher_type, {}).get(gle.voucher_no, {}) invoiced_amount = gle.credit > 0 and gle.credit or 0 diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 3a0fb31dea..3dc81d1341 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -79,6 +79,9 @@ class AccountsReceivableReport(object): return ( # advance (not gle.against_voucher) or + + # against sales order + (gle.against_voucher_type == "Sales Order") or # sales invoice (gle.against_voucher==gle.voucher_no and gle.debit > 0) or