Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…bile into fix#1432
  • Loading branch information
rutvik-panchal committed Nov 29, 2020
2 parents d9fd53c + 8611532 commit 9f017a6
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@ class LoanAccountsDetailFragment : BaseFragment(), LoanAccountsDetailView {
* @param loanWithAssociations object containing details of each loan account,
*/
fun showDetails(loanWithAssociations: LoanWithAssociations?) {
tvOutstandingBalanceName?.text = resources.getString(R.string.string_and_string,
loanWithAssociations?.summary?.currency?.displaySymbol, CurrencyUtil.formatCurrency(activity,
loanWithAssociations?.summary?.totalOutstanding))

var currencyRepresentation = loanWithAssociations?.summary?.currency?.displaySymbol
if (currencyRepresentation == null) {
currencyRepresentation = loanWithAssociations?.summary?.currency?.code
}
if (loanWithAssociations?.repaymentSchedule?.periods != null) for ((_, _, dueDate, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, totalDueForPeriod) in loanWithAssociations.repaymentSchedule?.periods!!) {
if (dueDate == loanWithAssociations.summary?.getOverdueSinceDate()) {
tvNextInstallmentName?.text = resources.getString(R.string.string_and_string,
loanWithAssociations.summary?.currency?.displaySymbol,
CurrencyUtil.formatCurrency(activity,
totalDueForPeriod))
tvNextInstallmentName?.text = currencyRepresentation +
CurrencyUtil.formatCurrency(activity, totalDueForPeriod)
break
} else if (loanWithAssociations.summary?.getOverdueSinceDate() == null) {
tvNextInstallmentName?.setText(R.string.not_available)
Expand Down

0 comments on commit 9f017a6

Please sign in to comment.