error_slip print enable/disable
This commit is contained in:
parent
f0799455cb
commit
5bb07df9e3
@ -125,7 +125,9 @@ class TransactionResultViewModel @Inject constructor(
|
|||||||
when {
|
when {
|
||||||
isNonApprovedTrade(payDetail) &&
|
isNonApprovedTrade(payDetail) &&
|
||||||
isNonWavepayTransaction(transactionType) -> {
|
isNonWavepayTransaction(transactionType) -> {
|
||||||
startPrintProcess(sharedViewModel, false)
|
if (SystemParamsOperation.getInstance().isPrintErrorSlip) {
|
||||||
|
startPrintProcess(sharedViewModel, false)
|
||||||
|
}
|
||||||
isCardInside()
|
isCardInside()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -174,6 +174,7 @@ class TMSSetupsImpl : TMSSetups {
|
|||||||
"clear_batch_time" -> ops.clearBatchTime = data
|
"clear_batch_time" -> ops.clearBatchTime = data
|
||||||
"alert_sound_enable" -> ops.isAlertSound = parseBoolean(data)
|
"alert_sound_enable" -> ops.isAlertSound = parseBoolean(data)
|
||||||
"auto_print_enable" -> ops.isAutoPrintCustomerCopy = parseBoolean(data)
|
"auto_print_enable" -> ops.isAutoPrintCustomerCopy = parseBoolean(data)
|
||||||
|
"print_error_slip" -> ops.setPrintErrorSlip(parseBoolean(data))
|
||||||
"ecr_enable" -> ops.ecrStatus = parseBoolean(data)
|
"ecr_enable" -> ops.ecrStatus = parseBoolean(data)
|
||||||
"manual_entry_enable" -> ops.setManualEntyrStatus(parseBoolean(data))
|
"manual_entry_enable" -> ops.setManualEntyrStatus(parseBoolean(data))
|
||||||
"mmqr_interval_waiting_time" -> ops.waveIntervalTime = data
|
"mmqr_interval_waiting_time" -> ops.waveIntervalTime = data
|
||||||
@ -273,4 +274,4 @@ class TMSSetupsImpl : TMSSetups {
|
|||||||
}
|
}
|
||||||
private fun parseBoolean(data: String): Boolean =
|
private fun parseBoolean(data: String): Boolean =
|
||||||
data.toIntOrNull()?.let { it == 1 } ?: data.toBoolean();
|
data.toIntOrNull()?.let { it == 1 } ?: data.toBoolean();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -781,6 +781,11 @@ public class SystemParamsOperation {
|
|||||||
return params.isAutoPrintCustomerCopy();
|
return params.isAutoPrintCustomerCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPrintErrorSlip() {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
return params.isPrintErrorSlip();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getManualEntryStatus() {
|
public boolean getManualEntryStatus() {
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
return params.getManualEntryStatus();
|
return params.getManualEntryStatus();
|
||||||
@ -897,6 +902,12 @@ public class SystemParamsOperation {
|
|||||||
saveSystemParamsSettings(params);
|
saveSystemParamsSettings(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPrintErrorSlip(boolean printErrorSlip) {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
params.setPrintErrorSlip(printErrorSlip);
|
||||||
|
saveSystemParamsSettings(params);
|
||||||
|
}
|
||||||
|
|
||||||
public void setReceiptHeader(String receiptHeader) {
|
public void setReceiptHeader(String receiptHeader) {
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
params.setReceiptHeader(receiptHeader);
|
params.setReceiptHeader(receiptHeader);
|
||||||
@ -1501,4 +1512,4 @@ public class SystemParamsOperation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,6 +172,8 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
private boolean isAutoPrintCustomerCopy = false;
|
private boolean isAutoPrintCustomerCopy = false;
|
||||||
|
|
||||||
|
private boolean isPrintErrorSlip = false;
|
||||||
|
|
||||||
private boolean isRandomPinPad = false;
|
private boolean isRandomPinPad = false;
|
||||||
|
|
||||||
private boolean auto_update_status = true;
|
private boolean auto_update_status = true;
|
||||||
@ -420,6 +422,10 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
protected void setAutoPrintCustomerCopy(boolean flag) { this.isAutoPrintCustomerCopy = flag; }
|
protected void setAutoPrintCustomerCopy(boolean flag) { this.isAutoPrintCustomerCopy = flag; }
|
||||||
|
|
||||||
|
protected boolean isPrintErrorSlip() { return isPrintErrorSlip; }
|
||||||
|
|
||||||
|
protected void setPrintErrorSlip(boolean flag) { this.isPrintErrorSlip = flag; }
|
||||||
|
|
||||||
protected boolean getWavePayInquiryStatus() {
|
protected boolean getWavePayInquiryStatus() {
|
||||||
return wave_pay_inquiry_status;
|
return wave_pay_inquiry_status;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user