Allow advance JV payments in Accounts Receivable/Payable
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.py b/erpnext/accounts/report/accounts_payable/accounts_payable.py
index 3ae741e..5ce2c56 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.py
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.py
@@ -30,7 +30,8 @@
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 3a0fb31..3dc81d1 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -79,6 +79,9 @@
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