Compare commits
No commits in common. "328f114ca0a1667d72ad47dfa6324c1cc9e8659b" and "b7830491d5525637bdb3a7cd683ea349807f13b7" have entirely different histories.
328f114ca0
...
b7830491d5
@ -479,19 +479,15 @@ public class InputRRNFragment extends DataBindingFragment {
|
||||
}
|
||||
|
||||
private void refundProcessEmv(boolean isECR) {
|
||||
rrnViewModel.searchPayDetail(cardNo, rrnNo).observe(getViewLifecycleOwner(), payDetail -> {
|
||||
if (payDetail != null && isCurrentBatchUnsettled(payDetail)) {
|
||||
terminatedTransRefund(isECR);
|
||||
return;
|
||||
}
|
||||
PayDetail payDetail = emvTransactionProcessViewModel.getPayDetail();
|
||||
payDetail.setReferNo(rrnNo);
|
||||
|
||||
PayDetail newPay = emvTransactionProcessViewModel.getPayDetail();
|
||||
newPay.setReferNo(rrnNo);
|
||||
emvTransactionProcessViewModel.setPayDetail(newPay);
|
||||
|
||||
emvTransactionProcessViewModel.setPayDetail(payDetail);
|
||||
|
||||
sharedViewModel.rrNNo.setValue(rrnNo);
|
||||
|
||||
callNextScreen();
|
||||
});
|
||||
}
|
||||
private void checkRRNRefund(boolean isECR) {
|
||||
|
||||
@ -522,11 +518,6 @@ public class InputRRNFragment extends DataBindingFragment {
|
||||
|
||||
LogUtil.d(TAG,"Trans Type:"+payDetail.getTransactionType());
|
||||
|
||||
if (isCurrentBatchUnsettled(payDetail)) {
|
||||
terminatedTransRefund(isECR);
|
||||
return;
|
||||
}
|
||||
|
||||
if(payDetail.getTransactionType() != TransactionsType.SALE.value) {
|
||||
terminatedTransRefund(isECR);
|
||||
return;
|
||||
@ -568,17 +559,6 @@ public class InputRRNFragment extends DataBindingFragment {
|
||||
|
||||
}
|
||||
|
||||
private boolean isCurrentBatchUnsettled(PayDetail payDetail) {
|
||||
if (payDetail == null) {
|
||||
return false;
|
||||
}
|
||||
String currentBatch = SystemParamsOperation.getInstance().getCurrentBatchNum();
|
||||
String batchNo = payDetail.getBatchNo();
|
||||
return batchNo != null
|
||||
&& batchNo.equals(currentBatch)
|
||||
&& !payDetail.isSettle;
|
||||
}
|
||||
|
||||
private void terminatedTransRefund(boolean isECR) {
|
||||
showDeclineDialog(getResourceString(R.string.txt_refund_not_allow));
|
||||
if (isECR) {
|
||||
|
||||
@ -28,7 +28,7 @@ import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
||||
public class PrintReceiptFragment extends DataBindingFragment implements DataBindingFragment.BackPressCallback {
|
||||
private SharedViewModel sharedViewModel;
|
||||
private static final String TAG = PrintReceiptFragment.class.getSimpleName();
|
||||
private boolean printerEnabled = true;
|
||||
private boolean printerEnabled = SystemParamsOperation.getInstance().getPrinterEnabled();
|
||||
|
||||
@Override
|
||||
protected int currentId() {
|
||||
@ -60,7 +60,6 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
printerEnabled = SystemParamsOperation.getInstance().getPrinterEnabled();
|
||||
|
||||
/*
|
||||
* check TMS parameter here
|
||||
@ -122,7 +121,6 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
printerEnabled = SystemParamsOperation.getInstance().getPrinterEnabled();
|
||||
|
||||
if (!printerEnabled) {
|
||||
sharedViewModel.setPrintStatus(PrintStatus.NOT_PRINT);
|
||||
@ -182,9 +180,6 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
||||
|
||||
|
||||
private void startPrintProcess(boolean isFirstPrint) {
|
||||
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PrintHelper.getInstance().checkPaperRollStatus(new PaperRollStatusCallback() {
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ public class TimeoutFragment extends DataBindingFragment {
|
||||
|
||||
private SharedViewModel sharedViewModel;
|
||||
|
||||
private int resultTimeOut = 5;
|
||||
private int resultTimeOut = 3;
|
||||
private CountDownTimer countDownTimer;
|
||||
private int routeId;
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ public class TransactionResultFragment extends DataBindingFragment implements Da
|
||||
private static final String TAG = TransactionResultFragment.class.getSimpleName();
|
||||
private TransProcessViewModel transProcessViewModel;
|
||||
private SharedViewModel sharedViewModel;
|
||||
private static final int resultTimeOut = 3;
|
||||
private static final int resultTimeOut = 1;
|
||||
private int routeId;
|
||||
|
||||
private final RxUtil<SiriusResponse> siriusRxUtil = new RxUtil<>();
|
||||
@ -165,9 +165,7 @@ public class TransactionResultFragment extends DataBindingFragment implements Da
|
||||
TransactionsType transactionType = sharedViewModel.transactionsType.getValue();
|
||||
|
||||
if (isNonApprovedTrade(payDetail) && isNonQRPayTransaction(transactionType)) {
|
||||
if (SystemParamsOperation.getInstance().getPrinterEnabled()) {
|
||||
startPrintProcess(false);
|
||||
}
|
||||
isCardInside();
|
||||
} else if (transactionType == TransactionsType.SETTLEMENT || transactionType == TransactionsType.MMQR_SETTLEMENT) {
|
||||
handleSettlementTransaction(siriusReq);
|
||||
|
||||
@ -894,81 +894,6 @@
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Clear Batch Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/clearBatchCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onClearBatchClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_clear_batch"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="@string/title_clear_batch"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="@string/clear_batch_description"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arrow"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- TMS Server URL Card -->
|
||||
<!-- android:onClick="@{()->click.onTmsAddressClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
|
||||
Loading…
Reference in New Issue
Block a user