Browse Source

Service charge inclusive validation added for domestic transfer

master
Preyea Regmi 5 years ago
parent
commit
473c13f114
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 5
      app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/model/DomesticAccountsDTO.java
  3. 12
      app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/presenter/DomesticRemitPresenterImpl.java
  4. 6
      app/src/main/res/layout/activity_domestic_remit.xml

BIN
.idea/caches/build_file_checksums.ser

5
app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/model/DomesticAccountsDTO.java

@ -251,6 +251,11 @@ public class DomesticAccountsDTO {
this.tokenType = tokenType;
}
public boolean isAccountAutoDebitType()
{
return (type!=null&&type.equalsIgnoreCase("autodebit"));
}
@Override
public String toString() {
if("autodebit".equalsIgnoreCase(this.type))

12
app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/presenter/DomesticRemitPresenterImpl.java

@ -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;

6
app/src/main/res/layout/activity_domestic_remit.xml

@ -68,7 +68,7 @@
android:layout_marginBottom="@dimen/_5sdp"
android:id="@+id/currentBalanceTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:gravity="center"
@ -92,7 +92,7 @@
android:layout_marginBottom="@dimen/_5sdp"
android:id="@+id/checkBalanceTxt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:background="@drawable/ic_rounded_country_listing_gray"
@ -115,7 +115,7 @@
android:layout_marginBottom="5dp"
android:id="@+id/serviceChargeTxtView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:gravity="center"

Loading…
Cancel
Save