|
|
@ -254,7 +254,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti |
|
|
|
@Override |
|
|
|
public void checkBalance() { |
|
|
|
compositeDisposable.add( |
|
|
|
this.gateway.checkPaymentAccountBalance(gateway.getAuth(), gateway.getUserIDNumber(), domesticRemitDataValidator.selectedSenderAccount.getFintechUseNo(),domesticRemitDataValidator.selectedSenderAccount.getType()) |
|
|
|
this.gateway.checkPaymentAccountBalance(gateway.getAuth(), gateway.getUserIDNumber(), domesticRemitDataValidator.selectedSenderAccount.getFintechUseNo(), domesticRemitDataValidator.selectedSenderAccount.getType()) |
|
|
|
.doOnSubscribe(disposable -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text))) |
|
|
|
.subscribeOn(Schedulers.io()) |
|
|
|
.observeOn(AndroidSchedulers.mainThread()) |
|
|
@ -439,9 +439,15 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti |
|
|
|
double formattedSendAmount = Double.parseDouble(sendAmount); |
|
|
|
double formattedServiceCharge = 0.0; |
|
|
|
|
|
|
|
//Current business requirement: service charge is not inclusive with net sending amount |
|
|
|
// if (serviceCharge != null && serviceCharge.length() > 0) |
|
|
|
// formattedServiceCharge = Double.parseDouble(serviceCharge); |
|
|
|
if (selectedSenderAccount != null) { |
|
|
|
if (selectedSenderAccount.isAccountAutoDebitType()) { |
|
|
|
if (serviceCharge != null && serviceCharge.length() > 0) |
|
|
|
formattedServiceCharge = Double.parseDouble(serviceCharge); |
|
|
|
} else { |
|
|
|
if (serviceChargeWallet != null && serviceChargeWallet.length() > 0) |
|
|
|
formattedServiceCharge = Double.parseDouble(serviceChargeWallet); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
double netSendingAmount = formattedSendAmount + formattedServiceCharge; |
|
|
|
|
|
|
|