Compare commits

..

No commits in common. "9b9d827d47fc992f76b3e270e5c4135d1884577f" and "ec7f04eb85635949c6344ea076b6c8ed1ee5b563" have entirely different histories.

8 changed files with 26 additions and 25 deletions

View File

@ -462,6 +462,20 @@ 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) { public static String mapTransactionType(int type) {
switch (type) { switch (type) {
case 1: // SALE case 1: // SALE
@ -556,7 +570,7 @@ public class ProcessingFragment extends DataBindingFragment {
EReceiptCardRequest request = new EReceiptCardRequest(); EReceiptCardRequest request = new EReceiptCardRequest();
request.setDE2(PrintUtils.getInstance().maskCardNumberPciDss(payDetail.getCardNo())); request.setDE2(PrintUtils.getInstance().maskCardNumberPciDss(payDetail.getCardNo()));
request.setDE3(mapTransactionType(payDetail.getTransactionType())); request.setDE3(mapDE3ToShortCode(payDetail.getProcessCode()));
request.setDE4(amount); request.setDE4(amount);
request.setDE7(currentTimestamp); request.setDE7(currentTimestamp);
request.setDE11(payDetail.getVoucherNo()); request.setDE11(payDetail.getVoucherNo());

View File

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

View File

@ -160,9 +160,6 @@ public class DashboardTransFragment extends DataBindingFragment {
case CASH_ADVANCE: case CASH_ADVANCE:
new DashboardTransFragment.ClickEvent().onClickCashAdvance(); new DashboardTransFragment.ClickEvent().onClickCashAdvance();
break; break;
case CLEAR_REVERSAL:
new DashboardTransFragment.ClickEvent().onClickClearReversal();
break;
case DEVICE_CONFIG: case DEVICE_CONFIG:
new DashboardTransFragment.ClickEvent().onClickDeviceConfig(); new DashboardTransFragment.ClickEvent().onClickDeviceConfig();
break; break;
@ -275,14 +272,6 @@ 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(){ public void onClickDeviceConfig(){
routeId = R.id.action_dashboardTransFragment_to_deviceConfig; routeId = R.id.action_dashboardTransFragment_to_deviceConfig;
safeRouteTo(currentId, routeId, hostId); safeRouteTo(currentId, routeId, hostId);

View File

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

View File

@ -223,7 +223,6 @@ 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(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(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(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)); featuresList.add(new Features(10, "Configs", R.drawable.ic_host, FeaturesType.DEVICE_CONFIG, true));
} }

View File

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

View File

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

View File

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