Fixed that if creditorIban is empty, then empty search result overrides creditorBic

This commit is contained in:
dankito 2020-06-13 15:59:52 +02:00
parent b571fc2398
commit 80680a16b6
1 changed files with 4 additions and 1 deletions

View File

@ -198,8 +198,11 @@ open class TransferMoneyDialog : DialogFragment() {
preselectedValues?.let { data -> preselectedValues?.let { data ->
rootView.edtxtRemitteeName.setText(data.creditorName) rootView.edtxtRemitteeName.setText(data.creditorName)
if (data.creditorIban.isNotBlank()) { // set only if creditorIban has a value as otherwise creditorBic would be overridden by empty search result
rootView.edtxtRemitteeIban.setText(data.creditorIban) rootView.edtxtRemitteeIban.setText(data.creditorIban)
}
// a little bit inconsistent as if IBAN is not set bank's name won't be displayed even though it can be retrieved by BIC
rootView.edtxtRemitteeBic.setText(data.creditorBic) rootView.edtxtRemitteeBic.setText(data.creditorBic)
if (data.amount > BigDecimal.ZERO) { if (data.amount > BigDecimal.ZERO) {