diff --git a/app/src/main/java/org/mifos/mobile/ui/fragments/LoanAccountsDetailFragment.kt b/app/src/main/java/org/mifos/mobile/ui/fragments/LoanAccountsDetailFragment.kt index a7e5399934..c88663a4a7 100644 --- a/app/src/main/java/org/mifos/mobile/ui/fragments/LoanAccountsDetailFragment.kt +++ b/app/src/main/java/org/mifos/mobile/ui/fragments/LoanAccountsDetailFragment.kt @@ -152,15 +152,13 @@ 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)