Compare commits

..

No commits in common. "ee297e8e77152463d246bd6109157b3774ca6ecb" and "6b9660a7d31077475c8bca11dc206e8fc6f077f6" have entirely different histories.

6 changed files with 112 additions and 440 deletions

1
.gitignore vendored
View File

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

30
TODO.md
View File

@ -1,30 +0,0 @@
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,24 +412,6 @@ 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,
@ -481,37 +463,6 @@ 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,34 +98,6 @@ 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 */
@ -176,30 +148,6 @@ 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,31 +70,14 @@
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/colorLightGray"/> android:background="@color/colorLightGray"/>
<!-- MMK Section Header -->
<LinearLayout <LinearLayout
android:layout_marginTop="12dp" android:layout_marginTop="19dp"
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"
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"
@ -116,8 +99,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.mmk_sale_count+``}" android:text="@={settleViewModel.sale_count+``}"
tools:text="2" tools:text="5"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -126,20 +109,38 @@
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.mmk_sale_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.sale_amount)}"
tools:text="10,000.00" tools:text="65.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>
<!-- MMK Void --> <FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="8dp" android:layout_marginTop="19dp"
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.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"
@ -161,7 +162,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.mmk_void_count+``}" android:text="@={settleViewModel.void_count+``}"
tools:text="1" tools:text="1"
android:textSize="16sp" /> android:textSize="16sp" />
@ -171,20 +172,38 @@
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.mmk_void_amount)}" android:text="@{`- ` + POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.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>
<!-- MMK Sale Completion --> <FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="8dp" android:layout_marginTop="19dp"
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.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"
@ -206,8 +225,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.mmk_pre_count+``}" android:text="@={settleViewModel.pre_count+``}"
tools:text="1" tools:text="0"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
@ -216,20 +235,38 @@
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.mmk_pre_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.pre_amount)}"
tools:text="8,000.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.pre_breakdown}"
android:textColor="@color/colorTextContent"
android:textSize="12sp"
tools:text="MMK 1 / 8,000.00 USD 1 / 15.00" />
</LinearLayout> </LinearLayout>
<!-- MMK Refund --> <FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="8dp" android:layout_marginTop="19dp"
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.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"
@ -251,7 +288,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.mmk_refund_count+``}" android:text="@={settleViewModel.refund_count+``}"
tools:text="0" tools:text="0"
android:textSize="16sp" /> android:textSize="16sp" />
@ -261,20 +298,39 @@
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.mmk_refund_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.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>
<!-- MMK Cash Advance --> <FrameLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLightGray"/>
<LinearLayout <LinearLayout
android:layout_marginTop="8dp" android:layout_marginTop="19dp"
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.mmk_section_visibility}"> android:visibility="@{settleViewModel.ca_count > 0 ? 0 : 8}"
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"
@ -296,122 +352,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.mmk_ca_count+``}" android:text="@={settleViewModel.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" />
@ -421,154 +362,30 @@
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.usd_void_amount)}" android:text="@{POSUtil.getInstance().getDecimalAmountSeparatorFormat(settleViewModel.ca_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="12dp" android:layout_marginTop="15dp"
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

View File

@ -1003,18 +1003,6 @@ public abstract class BaseXPrint {
return true; 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) { protected void printTransDetailSummary(PayDetail payDetail, List<PayDetail> list) {
printTransDetailSummary(payDetail, list, null); printTransDetailSummary(payDetail, list, null);
} }
@ -1035,7 +1023,6 @@ public abstract class BaseXPrint {
if (item == null) continue; if (item == null) continue;
if (!matchesSummaryHostType(item, hostType)) continue; if (!matchesSummaryHostType(item, hostType)) continue;
if (isUnsuccessfulQrTransaction(item)) continue;
String currency = item.getCurrencyCode(); String currency = item.getCurrencyCode();
TempSummary s = currencyMap.get(currency); TempSummary s = currencyMap.get(currency);