Data inconsistent in the balance column of the "detailed aging of portfolio at risk" report.

Description

In the "detailed aging of portfolio at risk" report "Balance" column should
contain the remaining loan balance (unpaid principal + unpaid interest + fees)
to be paid.
But balance column populating with only principle amount for some customer.

Apart from this, we are calculating unpaid_balance in the "loan_arrears_aging"
table with unpaid_principal+ unpaid_interest.
What about fees?
Fees can be waived off, so is this the reason behind not adding fees data in
the report?

Issue Repro Steps:
1. Run the "LoanArrearsAgingTask" batch job.
2. Log on to the mifos and go to reports tab.
3. Run the "detailed aging of portfolio at risk" report and check balance
column data with the "loan_arrears_aging" table data("UNPAID_BALANCE" column).

Expected result: "Balance" column should populate with remaining loan balance
(unpaid principal + unpaid interest + fees).

Actual result: "Balance" column is not populating with remaining loan balance
(unpaid principal + unpaid interest + fees).

Environment

Platform: All, OS: All

Assignee

emilytucker

Reporter

chandi_datta

Labels

None

URL

None

Story Points

None

Team

None

Scheduled For

None

Epic

None

Notify

None

productboard URL

None

Man Day Estimate

None

Components

Priority

Major
Configure