Compare commits

...

3 Commits

Author SHA1 Message Date
moon
9b9d827d47 clear reversal moved into "See More" 2026-04-09 15:30:30 +06:30
moon
1287c45c0d fixTransactionType 2026-04-09 15:09:34 +06:30
moon
e45f61b4c2 change trace num to inv num 2026-04-09 15:00:53 +06:30
8 changed files with 25 additions and 26 deletions

View File

@ -462,20 +462,6 @@ public class ProcessingFragment extends DataBindingFragment {
});
}
private String mapDE3ToShortCode(String de3) {
if (de3 == null) return "UNK";
switch (de3) {
case "000000": return "S"; // Sale
case "020000": return "V"; // Void
case "200000": return "R"; // Refund
case "030000": return "P"; // Preauth
case "310000": return "PC"; // Preauth Complete
}
return "UNK"; // Unknown
}
public static String mapTransactionType(int type) {
switch (type) {
case 1: // SALE
@ -570,7 +556,7 @@ public class ProcessingFragment extends DataBindingFragment {
EReceiptCardRequest request = new EReceiptCardRequest();
request.setDE2(PrintUtils.getInstance().maskCardNumberPciDss(payDetail.getCardNo()));
request.setDE3(mapDE3ToShortCode(payDetail.getProcessCode()));
request.setDE3(mapTransactionType(payDetail.getTransactionType()));
request.setDE4(amount);
request.setDE7(currentTimestamp);
request.setDE11(payDetail.getVoucherNo());

View File

@ -503,14 +503,14 @@ public class SharedViewModel extends ViewModel {
// Parse JSON to model
EReceiptResponse res = new Gson().fromJson(errorJson, EReceiptResponse.class);
Log.e("E-Receipt", "Parsed Error => " + res.getMessage());
postToastMsg("E-Receipt save failed!");
postToastMsg("E-Receipt could not save!");
} catch (Exception e) {
e.printStackTrace();
postToastMsg("E-Receipt save failed!");
postToastMsg("E-Receipt could not save!");
}
} else {
Log.e("E-Receipt", "Unexpected error => " + error.getMessage());
postToastMsg("E-Receipt save failed!");
postToastMsg("E-Receipt could not save!");
}
}
);

View File

@ -160,6 +160,9 @@ public class DashboardTransFragment extends DataBindingFragment {
case CASH_ADVANCE:
new DashboardTransFragment.ClickEvent().onClickCashAdvance();
break;
case CLEAR_REVERSAL:
new DashboardTransFragment.ClickEvent().onClickClearReversal();
break;
case DEVICE_CONFIG:
new DashboardTransFragment.ClickEvent().onClickDeviceConfig();
break;
@ -272,6 +275,14 @@ public class DashboardTransFragment extends DataBindingFragment {
});
}
public void onClickClearReversal() {
sharedViewModel.transactionsType.postValue(TransactionsType.CLEAR_REVERSAL);
sharedViewModel.setTransMenu(TransMenu.CLEAR_REVERSAL);
routeId = R.id.action_dashboardTransFragment_to_inputPasswordFragment;
safeRouteTo(currentId, routeId, hostId);
}
public void onClickDeviceConfig(){
routeId = R.id.action_dashboardTransFragment_to_deviceConfig;
safeRouteTo(currentId, routeId, hostId);

View File

@ -22,5 +22,6 @@ public enum FeaturesType {
QR_INQUIRY,
QR_REFUND,
LOG_OUT,
DEVICE_CONFIG
}
DEVICE_CONFIG,
CLEAR_REVERSAL
}

View File

@ -223,6 +223,7 @@ public class TMSUtil {
// featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus));
featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus));
// featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true));
featuresList.add(new Features(11, "Clear Reversal", R.drawable.ic_clear_all, FeaturesType.CLEAR_REVERSAL, true));
featuresList.add(new Features(10, "Configs", R.drawable.ic_host, FeaturesType.DEVICE_CONFIG, true));
}

View File

@ -53,7 +53,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enter_trace_text"
android:text="Enter Invoice Number"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="17sp"
@ -65,7 +65,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Enter the transaction trace number"
android:text="Enter the transaction invoice number"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="12sp"

View File

@ -279,7 +279,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{sharedViewModel.payDetail.invoiceNo}"
android:text="@{sharedViewModel.payDetail.voucherNo}"
android:textAlignment="textEnd"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
@ -355,7 +355,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{sharedViewModel.payDetail.voucherNo}"
android:text="@{sharedViewModel.payDetail.invoiceNo}"
android:textAlignment="textEnd"
android:textColor="@color/colorPrimary"
android:textSize="15sp"

View File

@ -1190,7 +1190,7 @@ public abstract class BaseXPrint {
printString("CARD TYPE:" + pay.getAccountType());
printString("CARD NO :" + PrintUtils.getInstance().maskCardNumberPciDss(pay.getCardNo()));
printString("TRACE NO :" + pay.getVoucherNo());
printString("INV NO :" + pay.getVoucherNo());
printString("RRN :" + pay.getReferNo());
printString("DATE :" + POSUtil.getInstance().formatDisplayDate(pay.getTransDate()));
printString(" " + pay.getTransTime());
@ -1213,7 +1213,7 @@ public abstract class BaseXPrint {
: pay.getCustomerMobile()));
printString("DATE :" + POSUtil.getInstance().formatDisplayDate(pay.getTransDate()));
printString(" " + pay.getTransTime());
printString("TRACE NO:" + pay.getVoucherNo());
printString("INV NO :" + pay.getVoucherNo());
if (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
printString("RRN :" + pay.getReferNo());