Compare commits

..

2 Commits

Author SHA1 Message Date
moon
ee297e8e77 qr summary total fix 2026-08-01 00:25:21 +06:30
moon
1cdf045d99 view batch ui change 2026-07-28 13:27:42 +06:30
6 changed files with 445 additions and 117 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ local.properties
nexdlkey-lib/build/
/nexsdk-lib
/nexsdk-lib
/cmhl

30
TODO.md Normal file
View File

@ -0,0 +1,30 @@
1. QR Host
When we generate QR , this transaction not successful.
But this transaction included as success transaction in summary report and history.
Please remove "CANCEL" records in summary report and history.
2. Card Host
Settlement Screen
KBZ Host MMK - 3000 (Not include in total net amount for void , preauth , preauth cancel)
Sale - 2000
Void - 1000
Preauth - 2500
Preauth cancel - 500
Preauth complete - 2000
KBZ Host USD - 3000 (Not include in total net amount for void , preauth , preauth cancel)
Sale - 2000
Void - 1000
Preauth - 2500
Preauth cancel - 500
Preauth complete - 2000
MMQR Pay - 3000 (Not include in total net amount for refund transaction and cancel transaction)
QR pay - 4000
Refund - 1000
3. Reprint Last Settlement Report
Same process with settlement

View File

@ -412,6 +412,24 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
mmkBucket.voidCount, mmkBucket.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) {
SettleData settleData = new SettleData(
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.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));
// 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) {
SettleData settleData = new SettleData(saleCount,saleAmount,preCount,preAmount,refundCount,refundAmount,caCount,caAmount);
settleData.setVoidSaleCount(voidCount);

View File

@ -98,6 +98,34 @@ public class SettlementViewModel extends ViewModel {
public MutableLiveData<Long> ca_amount = 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<>();
/* check is there settlement transactions or not */
@ -148,6 +176,30 @@ public class SettlementViewModel extends ViewModel {
ca_amount.setValue(0L);
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)
.build();

View File

@ -70,14 +70,31 @@
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<!-- MMK Section Header -->
<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_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:visibility="@{settleViewModel.mmk_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
@ -99,8 +116,8 @@
android:layout_weight="1"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.sale_count+``}"
tools:text="5"
android:text="@={settleViewModel.mmk_sale_count+``}"
tools:text="2"
android:textSize="16sp" />
<TextView
@ -109,38 +126,20 @@
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.sale_amount)}"
tools:text="65.00"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_sale_amount)}"
tools:text="10,000.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</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>
<FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<!-- MMK Void -->
<LinearLayout
android:layout_marginTop="19dp"
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:visibility="@{settleViewModel.mmk_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
@ -162,7 +161,7 @@
android:layout_weight="1"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.void_count+``}"
android:text="@={settleViewModel.mmk_void_count+``}"
tools:text="1"
android:textSize="16sp" />
@ -172,38 +171,20 @@
android:layout_weight="2"
android:textColor="@color/black"
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"
android:textAlignment="textEnd"
android:textSize="16sp" />
</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>
<FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<!-- MMK Sale Completion -->
<LinearLayout
android:layout_marginTop="19dp"
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:visibility="@{settleViewModel.mmk_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
@ -225,8 +206,8 @@
android:layout_weight="1"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.pre_count+``}"
tools:text="0"
android:text="@={settleViewModel.mmk_pre_count+``}"
tools:text="1"
android:textSize="16sp" />
<TextView
@ -235,38 +216,20 @@
android:layout_weight="2"
android:textColor="@color/black"
android:fontFamily="@font/rubik_regular"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.pre_amount)}"
tools:text="0.00"
android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.mmk_pre_amount)}"
tools:text="8,000.00"
android:textAlignment="textEnd"
android:textSize="16sp" />
</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>
<FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<!-- MMK Refund -->
<LinearLayout
android:layout_marginTop="19dp"
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:visibility="@{settleViewModel.mmk_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
@ -288,7 +251,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/rubik_regular"
android:text="@={settleViewModel.refund_count+``}"
android:text="@={settleViewModel.mmk_refund_count+``}"
tools:text="0"
android:textSize="16sp" />
@ -298,39 +261,20 @@
android:layout_weight="2"
android:textColor="@color/black"
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"
android:textAlignment="textEnd"
android:textSize="16sp" />
</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>
<FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<!-- MMK Cash Advance -->
<LinearLayout
android:layout_marginTop="19dp"
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{settleViewModel.ca_count > 0 ? 0 : 8}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:visibility="@{settleViewModel.mmk_section_visibility}">
<LinearLayout
android:layout_width="match_parent"
@ -352,7 +296,122 @@
android:layout_height="wrap_content"
android:layout_weight="1"
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"
android:textSize="16sp" />
@ -362,30 +421,154 @@
android:layout_weight="2"
android:textColor="@color/black"
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"
android:textAlignment="textEnd"
android:textSize="16sp" />
</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>
<FrameLayout
android:layout_marginTop="15dp"
android:visibility="@{settleViewModel.ca_count > 0 ? 0 : 8}"
android:layout_marginTop="12dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
android:background="@color/colorLightGray"
android:visibility="@{settleViewModel.usd_section_visibility}"/>
<LinearLayout

View File

@ -1003,6 +1003,18 @@ public abstract class BaseXPrint {
return true;
}
private boolean isUnsuccessfulQrTransaction(PayDetail item) {
int transactionType = item.getTransactionType();
if (transactionType != TransactionsType.MMQR.value
&& transactionType != TransactionsType.MMQR_REFUND.value) {
return false;
}
// qrTransStatus 1: Success; -1: Failure; 2: Trying; 3: Comm Error
return item.getQrTransStatus() != 1;
}
protected void printTransDetailSummary(PayDetail payDetail, List<PayDetail> list) {
printTransDetailSummary(payDetail, list, null);
}
@ -1023,6 +1035,7 @@ public abstract class BaseXPrint {
if (item == null) continue;
if (!matchesSummaryHostType(item, hostType)) continue;
if (isUnsuccessfulQrTransaction(item)) continue;
String currency = item.getCurrencyCode();
TempSummary s = currencyMap.get(currency);