fix: Post Dated unallocated amount not considered in Advance Amount in AR/AP summary (#21837)

* fix: Post Dated unallocateed amount not considered in Advance Amount in AR/AP summary report

* fix: Add future payment filter in AR/AP summary

* fix: Show unallocated future payments only till current creation date

* fix: Remove extra query

* fix: Remove debug

* fix: Condition
This commit is contained in:
Deepesh Garg
2020-05-27 12:46:12 +05:30
committed by GitHub
parent a18c896a56
commit ed2c1803df
4 changed files with 23 additions and 7 deletions

View File

@@ -602,10 +602,14 @@ def get_party_shipping_address(doctype, name):
else:
return ''
def get_partywise_advanced_payment_amount(party_type, posting_date = None, company=None):
def get_partywise_advanced_payment_amount(party_type, posting_date = None, future_payment=0, company=None):
cond = "1=1"
if posting_date:
cond = "posting_date <= '{0}'".format(posting_date)
if future_payment:
cond = "posting_date <= '{0}' OR DATE(creation) <= '{0}' """.format(posting_date)
else:
cond = "posting_date <= '{0}'".format(posting_date)
if company:
cond += "and company = '{0}'".format(company)