Compare commits

..

6 Commits

Author SHA1 Message Date
MooN
fccf781c3b print button hidden in Detail Report 2026-02-05 22:46:40 +06:30
MooN
fc4e3558f7 print button hide in Report Summary 2026-02-05 22:37:39 +06:30
MooN
dcaf00e542 hide print buttons in Re-prints 2026-02-05 21:33:17 +06:30
MooN
3b08569a48 print button hide in hostConfigScreen 2026-02-05 21:04:08 +06:30
MooN
74e9e21ee0 printer disable apply for transaction success 2026-02-05 21:03:42 +06:30
MooN
4867644d69 added new history screen 2026-02-05 15:23:16 +06:30
15 changed files with 577 additions and 244 deletions

View File

@ -973,6 +973,11 @@ public class MainFragment extends DataBindingFragment {
}
}
public void onClickHistory(){
routeId = R.id.action_nav_main_to_dashboardHistoryFragment;
safeRouteTo(currentId(), routeId, hostId());
}
public void onClickReport() {
routeId = R.id.action_nav_main_to_manageFunctionFragment;
safeRouteTo(currentId(), routeId, hostId());

View File

@ -106,6 +106,7 @@ public class ConfirmTransactionFragment extends DataBindingFragment implements D
setToolBarTitleWithBackIcon(getResourceString(R.string.txt_title_trans_info));
isMerchantCopy = true;
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
if(sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW) {
@ -124,7 +125,7 @@ public class ConfirmTransactionFragment extends DataBindingFragment implements D
sharedViewModel.reprintTransTypeMsg.setValue(getResourceString(R.string.txt_print_merchant_copy));
sharedViewModel.oneBtnLayout.setValue(8);
sharedViewModel.twoBtnLayout.setValue(8);
sharedViewModel.reprintBtnLayout.setValue(0);
sharedViewModel.reprintBtnLayout.setValue(sharedViewModel.printerDisabled.getValue() != null && sharedViewModel.printerDisabled.getValue() ? 8 : 0);
// printReceipt(true);
@ -258,6 +259,10 @@ public class ConfirmTransactionFragment extends DataBindingFragment implements D
}
public void onPrint() {
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
printReceipt(isMerchantCopy);

View File

@ -75,8 +75,8 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
sharedViewModel.printReceiptButtons.setValue(0);
sharedViewModel.printerDisabled.setValue(printerEnabled);
sharedViewModel.printReceiptButtons.setValue(printerEnabled ? 0 : 8);
sharedViewModel.printerDisabled.setValue(!printerEnabled);
PayDetail payDetail = sharedViewModel.payDetail.getValue();
@ -122,16 +122,14 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT);
if(!printerEnabled){
if (!printerEnabled) {
sharedViewModel.setPrintStatus(PrintStatus.NOT_PRINT);
sharedViewModel.setVisibilityPrintReceiptButtons(8);
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
} else {
sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT);
observePrintProcess();
}
// else{
// sharedViewModel.postPrintReceiptMsg("Print Receipt for Merchant?");
// }
observePrintProcess();
setBackPressCallback(this);
}

View File

@ -0,0 +1,190 @@
package com.utsmm.kbz.ui.dashboard;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
import com.utsmyanmar.baselib.util.DataBindingConfig;
import com.utsmyanmar.baselib.util.DialogCallback;
import com.utsmyanmar.paylibs.model.PayDetail;
import com.utsmyanmar.paylibs.model.TradeData;
import com.utsmyanmar.paylibs.print.PrintHelper;
import com.utsmyanmar.paylibs.print.printx.PrintXReceipt;
import com.utsmyanmar.paylibs.print.printx.PrintXStatus;
import com.utsmyanmar.paylibs.utils.POSUtil;
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
import com.utsmyanmar.paylibs.utils.enums.HostType;
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType;
import com.utsmyanmar.paylibs.utils.params.Params;
import com.nexgo.oaf.apiv3.SdkResult;
import com.utsmm.kbz.BR;
import com.utsmm.kbz.R;
import com.utsmm.kbz.config.Constants;
import com.utsmm.kbz.databinding.FragmentDashboardHistoryScreenBinding;
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
import com.utsmm.kbz.ui.management.HistoryAdapter;
import com.utsmm.kbz.ui.management.ManagementViewModel;
import java.util.ArrayList;
public class DashboardHistoryFragment extends DataBindingFragment {
private ManagementViewModel managementViewModel;
private SharedViewModel sharedViewModel;
private HistoryAdapter detailReportAdapter;
private int routeId;
private final ArrayList<PayDetail> lists = new ArrayList<>();
@Override
protected void initViewModel() {
managementViewModel = getFragmentScopeViewModel(ManagementViewModel.class);
sharedViewModel = getFragmentScopeViewModel(SharedViewModel.class);
}
@Override
protected DataBindingConfig getDataBindingConfig() {
return new DataBindingConfig(R.layout.fragment_dashboard_history_screen, BR.manageViewModel, managementViewModel)
.addBindingParam(BR.sharedViewModel, sharedViewModel)
.addBindingParam(BR.click, new ClickEvent());
}
@Override
protected int currentId() {
return R.id.dashboardHistoryFragment;
}
@Override
protected int hostId() {
return Constants.NAV_HOST_ID;
}
@Override
protected int routeId() {
return routeId;
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
observeHistory();
}
@Override
public void onResume() {
super.onResume();
setToolBarTitleWithBackIcon(getString(R.string.title_history));
managementViewModel.detailReportLayoutVisibility.setValue(0);
managementViewModel.detailReportBottomLayoutVisibility.setValue(0);
}
private void observeHistory() {
managementViewModel.getTransactionHistory().observe(getViewLifecycleOwner(), payDetailList -> {
if (payDetailList == null) {
return;
}
lists.clear();
if (payDetailList.isEmpty()) {
managementViewModel.detailReportLayoutVisibility.setValue(0);
managementViewModel.detailReportBottomLayoutVisibility.setValue(8);
} else {
managementViewModel.detailReportLayoutVisibility.setValue(8);
managementViewModel.detailReportBottomLayoutVisibility.setValue(0);
}
HostType hostType = sharedViewModel.hostType.getValue();
for (PayDetail payDetail : payDetailList) {
if (hostType == HostType.MPU) {
if (payDetail.getTransactionType() != TransactionsType.MMQR.value
&& payDetail.getTransactionType() != TransactionsType.REVERSAL.value
&& payDetail.getTransactionType() != TransactionsType.SETTLEMENT.value
&& POSUtil.getInstance().getYesterdayDate()
.compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1) {
lists.add(payDetail);
}
} else if (hostType == HostType.QR) {
if (payDetail.getTransactionType() == TransactionsType.MMQR.value
&& payDetail.getQrTransStatus() == 1) {
lists.add(payDetail);
}
} else {
lists.add(payDetail);
}
}
if (lists.isEmpty()) {
managementViewModel.detailReportBottomLayoutVisibility.setValue(8);
managementViewModel.detailReportLayoutVisibility.setValue(0);
}
detailReportAdapter = new HistoryAdapter(lists);
((FragmentDashboardHistoryScreenBinding) mBinding).setAdapter(detailReportAdapter);
});
}
private void navigateMain() {
routeId = R.id.action_dashboardHistoryFragment_to_nav_main;
safeNavigateToRouteId();
}
public class ClickEvent {
public void onCancel() {
navigateMain();
}
public void onPrint() {
TradeData tradeData = Params.newTrade(false);
PayDetail payDetail = tradeData.getPayDetail();
payDetail.setTransType(TransactionsType.DETAIL_REPORT.name);
payDetail.setTransactionType(TransactionsType.DETAIL_REPORT.value);
if (PrintHelper.getInstance().paperRollStatus() == SdkResult.Printer_PaperLack) {
showPrinterAlertDialog(getString(R.string.txt_paper_roll_not_ready), new DialogCallback() {
@Override
public void onClickCancel() {
dismissPrinterAlertDialog();
}
@Override
public void onClickRetry() {
dismissPrinterAlertDialog();
if (PrintHelper.getInstance().paperRollStatus() != SdkResult.Success) {
return;
}
PrintXReceipt.getInstance().printDetailReport(payDetail, lists, sharedViewModel.hostType.getValue(), new PrintXStatus() {
@Override
public void onSuccess() {
}
@Override
public void onFailure() {
}
});
}
});
if (SystemParamsOperation.getInstance().isAlertSound()) {
startSound(getString(R.string.txt_audio_printer_alert));
}
} else if (PrintHelper.getInstance().paperRollStatus() == SdkResult.Success) {
PrintXReceipt.getInstance().printDetailReport(payDetail, lists, sharedViewModel.hostType.getValue(), new PrintXStatus() {
@Override
public void onSuccess() {
}
@Override
public void onFailure() {
}
});
}
}
}
}

View File

@ -157,9 +157,6 @@ public class DashboardTransFragment extends DataBindingFragment {
case CASH_ADVANCE:
new DashboardTransFragment.ClickEvent().onClickCashAdvance();
break;
case HISTORY:
new DashboardTransFragment.ClickEvent().onClickHistory();
break;
case DEVICE_CONFIG:
new DashboardTransFragment.ClickEvent().onClickDeviceConfig();
break;
@ -262,12 +259,6 @@ public class DashboardTransFragment extends DataBindingFragment {
safeRouteTo(currentId,routeId,hostId);
}
public void onClickHistory() {
routeId = R.id.action_dashboardTransFragment_to_manageFunctionFragment;
safeRouteTo(currentId,routeId,hostId);
}
public void onClickDeviceConfig(){
routeId = R.id.action_dashboardTransFragment_to_deviceConfig;
safeRouteTo(currentId, routeId, hostId);

View File

@ -72,6 +72,7 @@ public class DetailReportFragment extends DataBindingFragment {
super.onResume();
setToolBarTitleWithBackIcon(getResourceString(R.string.txt_subtitle_print_detail_report));
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
showLoadingView();
}
@ -222,6 +223,10 @@ public class DetailReportFragment extends DataBindingFragment {
}
public void onPrint() {
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
TradeData tradeData = Params.newTrade(false);
PayDetail payDetail = tradeData.getPayDetail();
payDetail.setTransType(TransactionsType.DETAIL_REPORT.name);

View File

@ -62,6 +62,7 @@ public class TransactionSummaryFragment extends DataBindingFragment {
protected DataBindingConfig getDataBindingConfig() {
return new DataBindingConfig(R.layout.fragment_transaction_summary_screen, BR.manageViewModel,managementViewModel)
.addBindingParam(BR.summaryViewModel,summaryViewModel)
.addBindingParam(BR.sharedViewModel, sharedViewModel)
.addBindingParam(BR.click,new ClickEvent());
}
@ -86,6 +87,8 @@ public class TransactionSummaryFragment extends DataBindingFragment {
setToolBarTitleWithBackIcon(getString(R.string.title_trans_summary));
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
summaryViewModel.resetField();
}
@ -561,6 +564,10 @@ public class TransactionSummaryFragment extends DataBindingFragment {
public void onPrint() {
try {
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
if (summaryViewModel.validateField()) {
LogUtil.d(TAG, "Print button clicked - validation passed");
startSearchProcess();

View File

@ -36,6 +36,7 @@ public class HostConfigFragment extends DataBindingFragment {
@Override
protected DataBindingConfig getDataBindingConfig() {
return new DataBindingConfig(R.layout.fragment_host_config, BR.viewModel, viewModel)
.addBindingParam(BR.sharedViewModel, sharedViewModel)
.addBindingParam(BR.click, new ClickHandler());
}
@ -52,6 +53,7 @@ public class HostConfigFragment extends DataBindingFragment {
super.onResume();
setToolBarTitleWithBackIcon("Host Configs");
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
}
@Override
@ -75,7 +77,11 @@ public class HostConfigFragment extends DataBindingFragment {
}
public void onPrint(){
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
sharedViewModel.printTerminalHostConfigs();
}
}
}
}

View File

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="sharedViewModel"
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
<variable
name="manageViewModel"
type="com.utsmm.kbz.ui.management.ManagementViewModel" />
<variable
name="adapter"
type="com.utsmm.kbz.ui.management.HistoryAdapter" />
<variable
name="click"
type="com.utsmm.kbz.ui.dashboard.DashboardHistoryFragment.ClickEvent" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:padding="12dp"
android:layout_height="match_parent">
<LinearLayout
android:visibility="@{manageViewModel.detailReportLayoutVisibility}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:orientation="vertical">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lav_no_trans"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_margin="8dp"
app:lottie_autoPlay="true"
app:lottie_fileName="lottie_no_trans.json"
app:lottie_loop="true" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/rubik_regular"
android:text="@string/txt_trans_not_found"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="22sp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lav_no_trans" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:adapter="@{adapter}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_view_history" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:orientation="horizontal"
android:visibility="@{manageViewModel.detailReportBottomLayoutVisibility}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_amount_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:background="@drawable/bg_rounded_btn_cancel_cv"
android:onClick="@{()->click.onCancel()}"
android:text="@string/layout_cancel"
android:textColor="@color/colorPrimary" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_amount_confirm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:background="@drawable/bg_rounded_btn_cv"
android:onClick="@{()->click.onPrint()}"
android:text="@string/layout_print"
android:textColor="@color/white" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -168,10 +168,7 @@
android:layout_width="120dp"
android:layout_height="120dp"
android:background="@drawable/honey"
android:clickable="@{mainViewModel.voidStatus}"
android:focusable="@{mainViewModel.voidStatus}"
android:alpha="@{mainViewModel.voidStatus ? 1f : 0.5f}"
android:onClick="@{() -> click.onClickVoid()}"
android:onClick="@{() -> click.onClickHistory()}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/bt4"
app:layout_constraintTop_toTopOf="parent">
@ -186,14 +183,14 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginBottom="6dp"
android:src="@drawable/ic_void_dash"
android:src="@drawable/ic_history"
app:tint="@color/colorPrimary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/rubik_medium"
android:text="Void"
android:text="History"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="14sp"

View File

@ -6,6 +6,7 @@
<data>
<import type="com.utsmyanmar.paylibs.utils.POSUtil"/>
<import type="com.utsmyanmar.paylibs.utils.enums.HostType"/>
<import type="android.view.View"/>
<variable
name="sharedViewModel"
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
@ -186,136 +187,136 @@
android:orientation="vertical">
<!-- Report Header Table -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="16dp">
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!-- android:layout_marginBottom="16dp">-->
<!-- Table Headers Row 1 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:background="@color/colorPrimary"
android:alpha="0.1">
<!-- &lt;!&ndash; Table Headers Row 1 &ndash;&gt;-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:paddingVertical="8dp"-->
<!-- android:background="@color/colorPrimary"-->
<!-- android:alpha="0.1">-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{sharedViewModel.hostType == HostType.QR ? `PAYMENT NAME`:`CARD NAME`}"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center"
tools:text="CARD NAME" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? `PAYMENT NAME`:`CARD NAME`}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center"-->
<!-- tools:text="CARD NAME" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{sharedViewModel.hostType == HostType.QR ? ` `:`CARD NUMBER`}"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center"
tools:text="CARD NUMBER" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? ` `:`CARD NUMBER`}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center"-->
<!-- tools:text="CARD NUMBER" />-->
</LinearLayout>
<!-- </LinearLayout>-->
<!-- Table Headers Row 2 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:background="@color/colorPrimary"
android:alpha="0.1">
<!-- &lt;!&ndash; Table Headers Row 2 &ndash;&gt;-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:paddingVertical="8dp"-->
<!-- android:background="@color/colorPrimary"-->
<!-- android:alpha="0.1">-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/txt_exp_date"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@string/txt_exp_date"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/txt_trace_no"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@string/txt_trace_no"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center" />-->
</LinearLayout>
<!-- </LinearLayout>-->
<!-- Table Headers Row 3 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:background="@color/colorPrimary"
android:alpha="0.1">
<!-- &lt;!&ndash; Table Headers Row 3 &ndash;&gt;-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:paddingVertical="8dp"-->
<!-- android:background="@color/colorPrimary"-->
<!-- android:alpha="0.1">-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/txt_transaction"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@string/txt_transaction"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/txt_amount"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@string/txt_amount"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center" />-->
</LinearLayout>
<!-- </LinearLayout>-->
<!-- Table Headers Row 4 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:background="@color/colorPrimary"
android:alpha="0.1">
<!-- &lt;!&ndash; Table Headers Row 4 &ndash;&gt;-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:paddingVertical="8dp"-->
<!-- android:background="@color/colorPrimary"-->
<!-- android:alpha="0.1">-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{sharedViewModel.hostType == HostType.QR ? `WAVE TRXN ID`:`REF NUM`}"
android:textColor="@color/colorPrimary"
android:textSize="12sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center"
tools:text="REF NUM" />
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? `WAVE TRXN ID`:`REF NUM`}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="12sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center"-->
<!-- tools:text="REF NUM" />-->
</LinearLayout>
<!-- </LinearLayout>-->
</LinearLayout>
<!-- </LinearLayout>-->
<!-- Dotted Divider -->
<View
@ -337,116 +338,116 @@
tools:listitem="@layout/item_view_detail_report" />
<!-- Report Summary -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="24dp"
android:padding="16dp"
android:background="@color/colorPrimary"
android:alpha="0.1">
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!-- android:layout_marginTop="24dp"-->
<!-- android:padding="16dp"-->
<!-- android:background="@color/colorPrimary"-->
<!-- android:alpha="0.1">-->
<!-- Summary Title -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{manageViewModel.hostTypeDR}"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="18sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:layout_marginBottom="16dp"
tools:text="MPU" />
<!-- &lt;!&ndash; Summary Title &ndash;&gt;-->
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="@{manageViewModel.hostTypeDR}"-->
<!-- android:textAlignment="center"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:layout_marginBottom="16dp"-->
<!-- tools:text="MPU" />-->
<!-- Summary Row -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- &lt;!&ndash; Summary Row &ndash;&gt;-->
<!-- <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:text="@{sharedViewModel.hostType == HostType.QR ? `TYPE`:`CARD TYPE`}"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="textStart"
tools:text="CARD TYPE" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="2"-->
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? `TYPE`:`CARD TYPE`}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="14sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="textStart"-->
<!-- tools:text="CARD TYPE" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/txt_title_count"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="center" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@string/txt_title_count"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="14sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="center" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/txt_amount"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="textEnd" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="2"-->
<!-- android:text="@string/txt_amount"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="14sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="textEnd" />-->
</LinearLayout>
<!-- </LinearLayout>-->
<!-- Summary Data Row -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<!-- &lt;!&ndash; Summary Data Row &ndash;&gt;-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:layout_marginTop="8dp">-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@{manageViewModel.cardTypeDR}"
android:textColor="@color/colorPrimary"
android:textSize="16sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="textStart"
tools:text="MPU" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="2"-->
<!-- android:text="@{manageViewModel.cardTypeDR}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="16sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="textStart"-->
<!-- tools:text="MPU" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{manageViewModel.trnxCountDR}"
android:textColor="@color/colorPrimary"
android:textSize="16sp"
android:textStyle="bold"
android:fontFamily="monospace"
android:textAlignment="center"
tools:text="5" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:text="@{manageViewModel.trnxCountDR}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="16sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="monospace"-->
<!-- android:textAlignment="center"-->
<!-- tools:text="5" />-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@{`MMK ` + POSUtil.getInstance().getDecimalAmountFormat(manageViewModel.totalAmountDR)}"
android:textColor="@color/colorPrimary"
android:textSize="16sp"
android:textStyle="bold"
android:fontFamily="sans-serif-medium"
android:textAlignment="textEnd"
tools:text="MMK 10,000.00" />
<!-- <TextView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="2"-->
<!-- android:text="@{`MMK ` + POSUtil.getInstance().getDecimalAmountFormat(manageViewModel.totalAmountDR)}"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:textSize="16sp"-->
<!-- android:textStyle="bold"-->
<!-- android:fontFamily="sans-serif-medium"-->
<!-- android:textAlignment="textEnd"-->
<!-- tools:text="MMK 10,000.00" />-->
</LinearLayout>
<!-- </LinearLayout>-->
</LinearLayout>
<!-- </LinearLayout>-->
</LinearLayout>
@ -464,7 +465,7 @@
android:orientation="horizontal"
android:padding="16dp"
android:paddingBottom="24dp"
android:visibility="@{manageViewModel.detailReportBottomLayoutVisibility}"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : manageViewModel.detailReportBottomLayoutVisibility}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">

View File

@ -257,6 +257,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">

View File

@ -6,6 +6,7 @@
<data>
<import type="com.utsmyanmar.paylibs.utils.POSUtil"/>
<import type="android.view.View"/>
<variable
name="voidViewModel"
type="com.utsmm.kbz.ui.sale_void.VoidViewModel" />
@ -504,7 +505,7 @@
<!-- Reprint Buttons -->
<LinearLayout
android:visibility="@{sharedViewModel.reprintBtnLayout}"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : sharedViewModel.reprintBtnLayout}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"

View File

@ -4,12 +4,16 @@
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View"/>
<variable
name="summaryViewModel"
type="com.utsmm.kbz.ui.management.SummaryViewModel" />
<variable
name="manageViewModel"
type="com.utsmm.kbz.ui.management.ManagementViewModel" />
<variable
name="sharedViewModel"
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
<variable
name="click"
type="com.utsmm.kbz.ui.management.TransactionSummaryFragment.ClickEvent" />
@ -536,6 +540,7 @@
android:orientation="horizontal"
android:padding="16dp"
android:paddingBottom="24dp"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">

View File

@ -147,6 +147,9 @@
<action
android:id="@+id/action_nav_main_to_versionFragment"
app:destination="@id/versionFragment" />
<action
android:id="@+id/action_nav_main_to_dashboardHistoryFragment"
app:destination="@id/dashboardHistoryFragment" />
<action
android:id="@+id/action_nav_main_to_QRTransactionFragment"
app:destination="@id/QRTransactionFragment" />
@ -617,8 +620,8 @@
app:launchSingleTop="true"
app:popUpTo="@+id/dashboardTransFragment"
app:popUpToInclusive="true"
android:id="@+id/action_dashboardTransFragment_to_manageFunctionFragment"
app:destination="@id/managementFunctionFragment" />
android:id="@+id/action_dashboardTransFragment_to_dashboardHistoryFragment"
app:destination="@id/dashboardHistoryFragment" />
<action
app:launchSingleTop="true"
app:popUpTo="@+id/dashboardTransFragment"
@ -674,6 +677,18 @@
android:id="@+id/action_dashboardPreAuthCancelBottomSheet_to_inputPasswordFragment"
app:destination="@id/inputPasswordFragment" />
</dialog>
<fragment
tools:layout="@layout/fragment_dashboard_history_screen"
android:id="@+id/dashboardHistoryFragment"
android:name="com.utsmm.kbz.ui.dashboard.DashboardHistoryFragment"
android:label="@string/title_history" >
<action
app:launchSingleTop="true"
app:popUpTo="@+id/mobile_navigation"
app:popUpToInclusive="true"
android:id="@+id/action_dashboardHistoryFragment_to_nav_main"
app:destination="@id/nav_main" />
</fragment>
<fragment
tools:layout="@layout/fragment_print_receipt_screen"
android:id="@+id/printReceiptFragment"
@ -1225,4 +1240,4 @@
app:destination="@id/nav_main" />
</fragment>
</navigation>
</navigation>