view batch ui change

This commit is contained in:
moon 2026-07-28 13:27:42 +06:30
parent 6b9660a7d3
commit 1cdf045d99
3 changed files with 401 additions and 117 deletions

View File

@ -412,6 +412,24 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
mmkBucket.voidCount, mmkBucket.voidAmount, mmkBucket.voidCount, mmkBucket.voidAmount,
usdBucket.voidCount, usdBucket.voidAmount)); usdBucket.voidCount, usdBucket.voidAmount));
// Update MMK separate fields
settlementViewModel.mmk_sale_count.setValue(mmkBucket.saleCount + canceledMmkCount);
settlementViewModel.mmk_sale_amount.setValue(mmkBucket.saleAmount + canceledMmkAmount);
settlementViewModel.mmk_void_count.setValue(mmkBucket.voidCount);
settlementViewModel.mmk_void_amount.setValue(mmkBucket.voidAmount);
// Update USD separate fields
settlementViewModel.usd_sale_count.setValue(usdBucket.saleCount + canceledUsdCount);
settlementViewModel.usd_sale_amount.setValue(usdBucket.saleAmount + canceledUsdAmount);
settlementViewModel.usd_void_count.setValue(usdBucket.voidCount);
settlementViewModel.usd_void_amount.setValue(usdBucket.voidAmount);
// Update section visibility
boolean hasMmkTransactions = (mmkBucket.saleCount + canceledMmkCount) > 0 || mmkBucket.voidCount > 0 || mmkBucket.preCount > 0 || mmkBucket.refundCount > 0 || mmkBucket.caCount > 0;
boolean hasUsdTransactions = (usdBucket.saleCount + canceledUsdCount) > 0 || usdBucket.voidCount > 0 || usdBucket.preCount > 0 || usdBucket.refundCount > 0 || usdBucket.caCount > 0;
settlementViewModel.mmk_section_visibility.setValue(hasMmkTransactions ? 0 : 8);
settlementViewModel.usd_section_visibility.setValue(hasUsdTransactions ? 0 : 8);
if (sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW_BATCH) { if (sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW_BATCH) {
SettleData settleData = new SettleData( SettleData settleData = new SettleData(
saleCount + canceledSaleCount, saleCount + canceledSaleCount,
@ -463,6 +481,37 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
settlementViewModel.pre_breakdown.setValue(buildBreakdownText(mmkBucket.preCount, mmkBucket.preAmount, usdBucket.preCount, usdBucket.preAmount)); settlementViewModel.pre_breakdown.setValue(buildBreakdownText(mmkBucket.preCount, mmkBucket.preAmount, usdBucket.preCount, usdBucket.preAmount));
settlementViewModel.refund_breakdown.setValue(buildBreakdownText(mmkBucket.refundCount, mmkBucket.refundAmount, usdBucket.refundCount, usdBucket.refundAmount)); settlementViewModel.refund_breakdown.setValue(buildBreakdownText(mmkBucket.refundCount, mmkBucket.refundAmount, usdBucket.refundCount, usdBucket.refundAmount));
settlementViewModel.ca_breakdown.setValue(buildBreakdownText(mmkBucket.caCount, mmkBucket.caAmount, usdBucket.caCount, usdBucket.caAmount)); settlementViewModel.ca_breakdown.setValue(buildBreakdownText(mmkBucket.caCount, mmkBucket.caAmount, usdBucket.caCount, usdBucket.caAmount));
// MMK separate fields
settlementViewModel.mmk_sale_count.setValue(mmkBucket.saleCount);
settlementViewModel.mmk_sale_amount.setValue(mmkBucket.saleAmount);
settlementViewModel.mmk_void_count.setValue(mmkBucket.voidCount);
settlementViewModel.mmk_void_amount.setValue(mmkBucket.voidAmount);
settlementViewModel.mmk_pre_count.setValue(mmkBucket.preCount);
settlementViewModel.mmk_pre_amount.setValue(mmkBucket.preAmount);
settlementViewModel.mmk_refund_count.setValue(mmkBucket.refundCount);
settlementViewModel.mmk_refund_amount.setValue(mmkBucket.refundAmount);
settlementViewModel.mmk_ca_count.setValue(mmkBucket.caCount);
settlementViewModel.mmk_ca_amount.setValue(mmkBucket.caAmount);
// USD separate fields
settlementViewModel.usd_sale_count.setValue(usdBucket.saleCount);
settlementViewModel.usd_sale_amount.setValue(usdBucket.saleAmount);
settlementViewModel.usd_void_count.setValue(usdBucket.voidCount);
settlementViewModel.usd_void_amount.setValue(usdBucket.voidAmount);
settlementViewModel.usd_pre_count.setValue(usdBucket.preCount);
settlementViewModel.usd_pre_amount.setValue(usdBucket.preAmount);
settlementViewModel.usd_refund_count.setValue(usdBucket.refundCount);
settlementViewModel.usd_refund_amount.setValue(usdBucket.refundAmount);
settlementViewModel.usd_ca_count.setValue(usdBucket.caCount);
settlementViewModel.usd_ca_amount.setValue(usdBucket.caAmount);
// Section visibility
boolean hasMmkTransactions = mmkBucket.saleCount > 0 || mmkBucket.voidCount > 0 || mmkBucket.preCount > 0 || mmkBucket.refundCount > 0 || mmkBucket.caCount > 0;
boolean hasUsdTransactions = usdBucket.saleCount > 0 || usdBucket.voidCount > 0 || usdBucket.preCount > 0 || usdBucket.refundCount > 0 || usdBucket.caCount > 0;
settlementViewModel.mmk_section_visibility.setValue(hasMmkTransactions ? 0 : 8);
settlementViewModel.usd_section_visibility.setValue(hasUsdTransactions ? 0 : 8);
if(sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW_BATCH) { if(sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW_BATCH) {
SettleData settleData = new SettleData(saleCount,saleAmount,preCount,preAmount,refundCount,refundAmount,caCount,caAmount); SettleData settleData = new SettleData(saleCount,saleAmount,preCount,preAmount,refundCount,refundAmount,caCount,caAmount);
settleData.setVoidSaleCount(voidCount); settleData.setVoidSaleCount(voidCount);

View File

@ -98,6 +98,34 @@ public class SettlementViewModel extends ViewModel {
public MutableLiveData<Long> ca_amount = new MutableLiveData<>(); public MutableLiveData<Long> ca_amount = new MutableLiveData<>();
public MutableLiveData<String> ca_breakdown = new MutableLiveData<>(); public MutableLiveData<String> ca_breakdown = new MutableLiveData<>();
// MMK separate fields
public MutableLiveData<Integer> mmk_sale_count = new MutableLiveData<>();
public MutableLiveData<Long> mmk_sale_amount = new MutableLiveData<>();
public MutableLiveData<Integer> mmk_void_count = new MutableLiveData<>();
public MutableLiveData<Long> mmk_void_amount = new MutableLiveData<>();
public MutableLiveData<Integer> mmk_pre_count = new MutableLiveData<>();
public MutableLiveData<Long> mmk_pre_amount = new MutableLiveData<>();
public MutableLiveData<Integer> mmk_refund_count = new MutableLiveData<>();
public MutableLiveData<Long> mmk_refund_amount = new MutableLiveData<>();
public MutableLiveData<Integer> mmk_ca_count = new MutableLiveData<>();
public MutableLiveData<Long> mmk_ca_amount = new MutableLiveData<>();
// USD separate fields
public MutableLiveData<Integer> usd_sale_count = new MutableLiveData<>();
public MutableLiveData<Long> usd_sale_amount = new MutableLiveData<>();
public MutableLiveData<Integer> usd_void_count = new MutableLiveData<>();
public MutableLiveData<Long> usd_void_amount = new MutableLiveData<>();
public MutableLiveData<Integer> usd_pre_count = new MutableLiveData<>();
public MutableLiveData<Long> usd_pre_amount = new MutableLiveData<>();
public MutableLiveData<Integer> usd_refund_count = new MutableLiveData<>();
public MutableLiveData<Long> usd_refund_amount = new MutableLiveData<>();
public MutableLiveData<Integer> usd_ca_count = new MutableLiveData<>();
public MutableLiveData<Long> usd_ca_amount = new MutableLiveData<>();
// Section visibility
public MutableLiveData<Integer> mmk_section_visibility = new MutableLiveData<>(8);
public MutableLiveData<Integer> usd_section_visibility = new MutableLiveData<>(8);
public MutableLiveData<SettlementType> settlementType = new MutableLiveData<>(); public MutableLiveData<SettlementType> settlementType = new MutableLiveData<>();
/* check is there settlement transactions or not */ /* check is there settlement transactions or not */
@ -148,6 +176,30 @@ public class SettlementViewModel extends ViewModel {
ca_amount.setValue(0L); ca_amount.setValue(0L);
ca_breakdown.setValue(""); ca_breakdown.setValue("");
// MMK fields
mmk_sale_count.setValue(0);
mmk_sale_amount.setValue(0L);
mmk_void_count.setValue(0);
mmk_void_amount.setValue(0L);
mmk_pre_count.setValue(0);
mmk_pre_amount.setValue(0L);
mmk_refund_count.setValue(0);
mmk_refund_amount.setValue(0L);
mmk_ca_count.setValue(0);
mmk_ca_amount.setValue(0L);
// USD fields
usd_sale_count.setValue(0);
usd_sale_amount.setValue(0L);
usd_void_count.setValue(0);
usd_void_amount.setValue(0L);
usd_pre_count.setValue(0);
usd_pre_amount.setValue(0L);
usd_refund_count.setValue(0);
usd_refund_amount.setValue(0L);
usd_ca_count.setValue(0);
usd_ca_amount.setValue(0L);
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.BOTH_HEADER_TPDU,HostName.BPC) isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.BOTH_HEADER_TPDU,HostName.BPC)
.build(); .build();

View File

@ -70,14 +70,31 @@
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/colorLightGray"/> android:background="@color/colorLightGray"/>
<!-- MMK Section Header -->
<LinearLayout <LinearLayout
android:layout_marginTop="19dp" android:layout_marginTop="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="@{settleViewModel.mmk_section_visibility}">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:text="MMK"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- MMK Sale -->
<LinearLayout
android:layout_marginTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent" android:visibility="@{settleViewModel.mmk_section_visibility}">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -99,8 +116,8 @@
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.sale_count+``}" android:text="@={settleViewModel.mmk_sale_count+``}"
tools:text="5" tools:text="2"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -109,38 +126,20 @@
android:layout_weight="2" android:layout_weight="2"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.sale_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_sale_amount)}"
tools:text="65.00" tools:text="10,000.00"
android:textAlignment="textEnd" android:textAlignment="textEnd"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:fontFamily="@font/rubik_regular"
android:text="@{settleViewModel.sale_breakdown}"
android:textColor="@color/colorTextContent"
android:textSize="12sp"
tools:text="MMK 2 / 10,000.00 USD 1 / 25.00" />
</LinearLayout> </LinearLayout>
<FrameLayout <!-- MMK Void -->
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="19dp" android:layout_marginTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent" android:visibility="@{settleViewModel.mmk_section_visibility}">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -162,7 +161,7 @@
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.void_count+``}" android:text="@={settleViewModel.mmk_void_count+``}"
tools:text="1" tools:text="1"
android:textSize="16sp" /> android:textSize="16sp" />
@ -172,38 +171,20 @@
android:layout_weight="2" android:layout_weight="2"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@{`- ` + POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.void_amount)}" android:text="@{`- ` + POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_void_amount)}"
tools:text="- 500.00" tools:text="- 500.00"
android:textAlignment="textEnd" android:textAlignment="textEnd"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:fontFamily="@font/rubik_regular"
android:text="@{settleViewModel.void_breakdown}"
android:textColor="@color/colorTextContent"
android:textSize="12sp"
tools:text="MMK 1 / - 500.00 USD 0 / - 0.00" />
</LinearLayout> </LinearLayout>
<FrameLayout <!-- MMK Sale Completion -->
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="19dp" android:layout_marginTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent" android:visibility="@{settleViewModel.mmk_section_visibility}">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -225,8 +206,8 @@
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.pre_count+``}" android:text="@={settleViewModel.mmk_pre_count+``}"
tools:text="0" tools:text="1"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -235,38 +216,20 @@
android:layout_weight="2" android:layout_weight="2"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.pre_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_pre_amount)}"
tools:text="0.00" tools:text="8,000.00"
android:textAlignment="textEnd" android:textAlignment="textEnd"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:fontFamily="@font/rubik_regular"
android:text="@{settleViewModel.pre_breakdown}"
android:textColor="@color/colorTextContent"
android:textSize="12sp"
tools:text="MMK 1 / 8,000.00 USD 1 / 15.00" />
</LinearLayout> </LinearLayout>
<FrameLayout <!-- MMK Refund -->
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="19dp" android:layout_marginTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent" android:visibility="@{settleViewModel.mmk_section_visibility}">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -288,7 +251,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.refund_count+``}" android:text="@={settleViewModel.mmk_refund_count+``}"
tools:text="0" tools:text="0"
android:textSize="16sp" /> android:textSize="16sp" />
@ -298,39 +261,20 @@
android:layout_weight="2" android:layout_weight="2"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.refund_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_refund_amount)}"
tools:text="0.00" tools:text="0.00"
android:textAlignment="textEnd" android:textAlignment="textEnd"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:fontFamily="@font/rubik_regular"
android:text="@{settleViewModel.refund_breakdown}"
android:textColor="@color/colorTextContent"
android:textSize="12sp"
tools:text="MMK 0 / 0.00 USD 1 / 10.00" />
</LinearLayout> </LinearLayout>
<FrameLayout <!-- MMK Cash Advance -->
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="19dp" android:layout_marginTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:visibility="@{settleViewModel.ca_count > 0 ? 0 : 8}" android:visibility="@{settleViewModel.mmk_section_visibility}">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -352,7 +296,122 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.ca_count+``}" android:text="@={settleViewModel.mmk_ca_count+``}"
tools:text="1"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_ca_amount)}"
tools:text="5,000.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_marginTop="12dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"
android:visibility="@{settleViewModel.mmk_section_visibility}"/>
<!-- USD Section Header -->
<LinearLayout
android:layout_marginTop="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="@{settleViewModel.usd_section_visibility}">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:text="USD"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- USD Sale -->
<LinearLayout
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{settleViewModel.usd_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@string/txt_subtitle_sale"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.usd_sale_count+``}"
tools:text="1"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.usd_sale_amount)}"
tools:text="25.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<!-- USD Void -->
<LinearLayout
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{settleViewModel.usd_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@string/txt_subtitle_void"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.usd_void_count+``}"
tools:text="0" tools:text="0"
android:textSize="16sp" /> android:textSize="16sp" />
@ -362,30 +421,154 @@
android:layout_weight="2" android:layout_weight="2"
android:textColor="@color/black" android:textColor="@color/black"
android:fontFamily="@font/rubik_regular" android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.ca_amount)}" android:text="@{`- ` + POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.usd_void_amount)}"
tools:text="- 0.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<!-- USD Sale Completion -->
<LinearLayout
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{settleViewModel.usd_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="Pre-Auth Comp"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.usd_pre_count+``}"
tools:text="1"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.usd_pre_amount)}"
tools:text="15.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<!-- USD Refund -->
<LinearLayout
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{settleViewModel.usd_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@string/txt_subtitle_refund"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:textColor="@color/black"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.usd_refund_count+``}"
tools:text="1"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.usd_refund_amount)}"
tools:text="10.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<!-- USD Cash Advance -->
<LinearLayout
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{settleViewModel.usd_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@string/text_cash_advance"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:textColor="@color/black"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.usd_ca_count+``}"
tools:text="0"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.usd_ca_amount)}"
tools:text="0.00" tools:text="0.00"
android:textAlignment="textEnd" android:textAlignment="textEnd"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:fontFamily="@font/rubik_regular"
android:text="@{settleViewModel.ca_breakdown}"
android:textColor="@color/colorTextContent"
android:textSize="12sp"
tools:text="MMK 1 / 5,000.00 USD 0 / 0.00" />
</LinearLayout> </LinearLayout>
<FrameLayout <FrameLayout
android:layout_marginTop="15dp" android:layout_marginTop="12dp"
android:visibility="@{settleViewModel.ca_count > 0 ? 0 : 8}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/colorLightGray"/> android:background="@color/colorLightGray"
android:visibility="@{settleViewModel.usd_section_visibility}"/>
<LinearLayout <LinearLayout