From ff231b5e62202384986ae209c5e190644a8bc2a6 Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Fri, 10 Oct 2014 13:13:39 +0530 Subject: [PATCH] Allow advance JV payments in Accounts Receivable/Payable --- erpnext/accounts/report/accounts_payable/accounts_payable.py | 3 ++- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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