Compare commits
No commits in common. "40fa96bb558d5d24a10bb5b3e1b704f345b71bea" and "ee297e8e77152463d246bd6109157b3774ca6ecb" have entirely different histories.
40fa96bb55
...
ee297e8e77
8
TODO.md
8
TODO.md
@ -1,3 +1,7 @@
|
|||||||
|
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
|
2. Card Host
|
||||||
@ -10,6 +14,7 @@ Preauth - 2500
|
|||||||
Preauth cancel - 500
|
Preauth cancel - 500
|
||||||
Preauth complete - 2000
|
Preauth complete - 2000
|
||||||
|
|
||||||
|
|
||||||
KBZ Host USD - 3000 (Not include in total net amount for void , preauth , preauth cancel)
|
KBZ Host USD - 3000 (Not include in total net amount for void , preauth , preauth cancel)
|
||||||
Sale - 2000
|
Sale - 2000
|
||||||
Void - 1000
|
Void - 1000
|
||||||
@ -20,3 +25,6 @@ Preauth complete - 2000
|
|||||||
MMQR Pay - 3000 (Not include in total net amount for refund transaction and cancel transaction)
|
MMQR Pay - 3000 (Not include in total net amount for refund transaction and cancel transaction)
|
||||||
QR pay - 4000
|
QR pay - 4000
|
||||||
Refund - 1000
|
Refund - 1000
|
||||||
|
|
||||||
|
3. Reprint Last Settlement Report
|
||||||
|
Same process with settlement
|
||||||
@ -140,7 +140,7 @@ public class ManagementFunctionFragment extends DataBindingFragment {
|
|||||||
|
|
||||||
// observeLastSettlement();
|
// observeLastSettlement();
|
||||||
sharedViewModel.setTransMenu(TransMenu.LAST_SETTLEMENT);
|
sharedViewModel.setTransMenu(TransMenu.LAST_SETTLEMENT);
|
||||||
routeId = R.id.action_managementFunctionFragment_to_settlementTransactionFragment;
|
routeId = R.id.action_managementFunctionFragment_to_selectHostFragment;
|
||||||
safeNavigateToRouteId();
|
safeNavigateToRouteId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,12 +3,10 @@ package com.utsmm.kbz.ui.management;
|
|||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.lifecycle.LiveData;
|
|
||||||
import androidx.lifecycle.Observer;
|
import androidx.lifecycle.Observer;
|
||||||
|
|
||||||
import com.github.gcacace.signaturepad.BR;
|
import com.github.gcacace.signaturepad.BR;
|
||||||
@ -44,7 +42,6 @@ public class ReprintReceiptFragment extends DataBindingFragment {
|
|||||||
private static final String TAG = ReprintReceiptFragment.class.getSimpleName();
|
private static final String TAG = ReprintReceiptFragment.class.getSimpleName();
|
||||||
|
|
||||||
private PayDetail payDetail;
|
private PayDetail payDetail;
|
||||||
private List<QRSettleData> lastQrSettleData;
|
|
||||||
private ObjectAnimator slideUpAnimator;
|
private ObjectAnimator slideUpAnimator;
|
||||||
private View printingCard;
|
private View printingCard;
|
||||||
|
|
||||||
@ -168,12 +165,7 @@ public class ReprintReceiptFragment extends DataBindingFragment {
|
|||||||
transType = "";
|
transType = "";
|
||||||
}
|
}
|
||||||
payDetail.setTransType(transType + "(REPRINT)");
|
payDetail.setTransType(transType + "(REPRINT)");
|
||||||
|
|
||||||
if (payDetail.getTransactionType() == TransactionsType.SETTLEMENT.value) {
|
|
||||||
observeLastQrSettlement(payDetail);
|
|
||||||
} else {
|
|
||||||
checkPaperExists(payDetail);
|
checkPaperExists(payDetail);
|
||||||
}
|
|
||||||
// managementViewModel.payDetail.observe(getViewLifecycleOwner(), new Observer<PayDetail>() {
|
// managementViewModel.payDetail.observe(getViewLifecycleOwner(), new Observer<PayDetail>() {
|
||||||
// @Override
|
// @Override
|
||||||
// public void onChanged(PayDetail pay) {
|
// public void onChanged(PayDetail pay) {
|
||||||
@ -193,41 +185,12 @@ public class ReprintReceiptFragment extends DataBindingFragment {
|
|||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void observeLastQrSettlement(PayDetail settlePayDetail) {
|
|
||||||
lastQrSettleData = null;
|
|
||||||
LiveData<List<PayDetail>> liveData = managementViewModel.getLastSettlementQR(SystemParamsOperation.getInstance().getCurrentSerialNum());
|
|
||||||
liveData.observe(getViewLifecycleOwner(), new Observer<List<PayDetail>>() {
|
|
||||||
@Override
|
|
||||||
public void onChanged(List<PayDetail> qrSettlements) {
|
|
||||||
liveData.removeObserver(this);
|
|
||||||
if (qrSettlements != null) {
|
|
||||||
for (int i = qrSettlements.size() - 1; i >= 0; i--) {
|
|
||||||
PayDetail qrSettle = qrSettlements.get(i);
|
|
||||||
if (qrSettle != null
|
|
||||||
&& qrSettle.getTransactionType() == TransactionsType.MMQR_SETTLEMENT.value
|
|
||||||
&& TextUtils.equals(qrSettle.getBatchNo(), settlePayDetail.getBatchNo())
|
|
||||||
&& qrSettle.getQrSettleData() != null
|
|
||||||
&& !qrSettle.getQrSettleData().isEmpty()) {
|
|
||||||
lastQrSettleData = qrSettle.getQrSettleData();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
checkPaperExists(settlePayDetail);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void printReceipt(PayDetail payDetail) {
|
private void printReceipt(PayDetail payDetail) {
|
||||||
|
|
||||||
if (payDetail.getTransactionType() == TransactionsType.MMQR_SETTLEMENT.value) {
|
if (payDetail.getTransactionType() == TransactionsType.MMQR_SETTLEMENT.value) {
|
||||||
|
|
||||||
PrintXReceipt.getInstance().printQRSettlementReport(payDetail, payDetail.getQrSettleData(), printXStatus);
|
PrintXReceipt.getInstance().printQRSettlementReport(payDetail, payDetail.getQrSettleData(), printXStatus);
|
||||||
|
|
||||||
} else if (lastQrSettleData != null && !lastQrSettleData.isEmpty()) {
|
|
||||||
|
|
||||||
PrintXReceipt.getInstance().printSmileSettlementReport(payDetail, lastQrSettleData, printXStatus);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
PrintXReceipt.getInstance().printSmileSettlementReport(payDetail, printXStatus);
|
PrintXReceipt.getInstance().printSmileSettlementReport(payDetail, printXStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -226,9 +226,6 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
|
|||||||
sharedViewModel.payDetail.setValue(payDetail);
|
sharedViewModel.payDetail.setValue(payDetail);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
settlementViewModel.isNoData.setValue(true);
|
|
||||||
setSettlementViewModelData(0, 0, 0, 0, 0, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user