change printer_disabled to printer_enabled bez of user confusing

This commit is contained in:
MooN 2026-02-04 11:21:49 +06:30
parent 8482e4145d
commit eed5980cfa
4 changed files with 16 additions and 16 deletions

View File

@ -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 printerDisabled = SystemParamsOperation.getInstance().getPrinterDisabled();
private boolean printerEnabled = SystemParamsOperation.getInstance().getPrinterEnabled();
@Override
protected int currentId() {
@ -76,7 +76,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
sharedViewModel.printReceiptButtons.setValue(0);
sharedViewModel.printerDisabled.setValue(printerDisabled);
sharedViewModel.printerDisabled.setValue(printerEnabled);
PayDetail payDetail = sharedViewModel.payDetail.getValue();
@ -124,7 +124,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT);
if(printerDisabled){
if(!printerEnabled){
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
}
// else{

View File

@ -647,8 +647,8 @@ public class TMSSetupsImpl implements TMSSetups{
else if(TextUtils.equals(name,"bin_list")) {
SystemParamsOperation.getInstance().setBinValue(data);
}
else if(TextUtils.equals(name, "printer_disabled")){
SystemParamsOperation.getInstance().setPrinterDisabled(parseBoolean(data));
else if(TextUtils.equals(name, "printer_enabled")){
SystemParamsOperation.getInstance().setPrinterEnabled(parseBoolean(data));
}
}

View File

@ -1751,14 +1751,14 @@ public class SystemParamsOperation {
saveSystemParamsSettings(paramsSettings);
}
public void setPrinterDisabled(boolean printerDisabled) {
public void setPrinterEnabled(boolean printerDisabled) {
SystemParamsSettings paramsSettings = getSystemParamsSettings();
paramsSettings.setPrinterDisabled(printerDisabled);
paramsSettings.setPrinterEnabled(printerDisabled);
saveSystemParamsSettings(paramsSettings);
}
public boolean getPrinterDisabled() {
public boolean getPrinterEnabled() {
SystemParamsSettings paramsSettings = getSystemParamsSettings();
return paramsSettings.getPrinterDisabled();
return paramsSettings.getPrinterEnabled();
}
}

View File

@ -260,7 +260,7 @@ public class SystemParamsSettings implements Serializable {
private String terminalIdForEreceipt = "";
private String certificateUrl = "";
private String certificateClientUrl = "";
private boolean printerDisabled = false;
private boolean printerEnabled = true;
public boolean isQrPartialRefundEnable(){
return qrPartialRefundEnable;
@ -1068,16 +1068,16 @@ public class SystemParamsSettings implements Serializable {
this.certificateClientUrl = url;
}
public boolean isPrinterDisabled() {
return printerDisabled;
public boolean isPrinterEnabled() {
return printerEnabled;
}
public void setPrinterDisabled(boolean printerDisabled) {
this.printerDisabled = printerDisabled;
public void setPrinterEnabled(boolean printerDisabled) {
this.printerEnabled = printerDisabled;
}
public boolean getPrinterDisabled() {
return printerDisabled;
public boolean getPrinterEnabled() {
return printerEnabled;
}
/* // 流水号起始