change printer_disabled to printer_enabled bez of user confusing
This commit is contained in:
parent
8482e4145d
commit
eed5980cfa
@ -28,7 +28,7 @@ import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
|||||||
public class PrintReceiptFragment extends DataBindingFragment implements DataBindingFragment.BackPressCallback {
|
public class PrintReceiptFragment extends DataBindingFragment implements DataBindingFragment.BackPressCallback {
|
||||||
private SharedViewModel sharedViewModel;
|
private SharedViewModel sharedViewModel;
|
||||||
private static final String TAG = PrintReceiptFragment.class.getSimpleName();
|
private static final String TAG = PrintReceiptFragment.class.getSimpleName();
|
||||||
private boolean printerDisabled = SystemParamsOperation.getInstance().getPrinterDisabled();
|
private boolean printerEnabled = SystemParamsOperation.getInstance().getPrinterEnabled();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int currentId() {
|
protected int currentId() {
|
||||||
@ -76,7 +76,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
|||||||
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
|
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
|
||||||
|
|
||||||
sharedViewModel.printReceiptButtons.setValue(0);
|
sharedViewModel.printReceiptButtons.setValue(0);
|
||||||
sharedViewModel.printerDisabled.setValue(printerDisabled);
|
sharedViewModel.printerDisabled.setValue(printerEnabled);
|
||||||
|
|
||||||
|
|
||||||
PayDetail payDetail = sharedViewModel.payDetail.getValue();
|
PayDetail payDetail = sharedViewModel.payDetail.getValue();
|
||||||
@ -124,7 +124,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
|||||||
|
|
||||||
sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT);
|
sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT);
|
||||||
|
|
||||||
if(printerDisabled){
|
if(!printerEnabled){
|
||||||
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
|
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
|
||||||
}
|
}
|
||||||
// else{
|
// else{
|
||||||
|
|||||||
@ -647,8 +647,8 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
else if(TextUtils.equals(name,"bin_list")) {
|
else if(TextUtils.equals(name,"bin_list")) {
|
||||||
SystemParamsOperation.getInstance().setBinValue(data);
|
SystemParamsOperation.getInstance().setBinValue(data);
|
||||||
}
|
}
|
||||||
else if(TextUtils.equals(name, "printer_disabled")){
|
else if(TextUtils.equals(name, "printer_enabled")){
|
||||||
SystemParamsOperation.getInstance().setPrinterDisabled(parseBoolean(data));
|
SystemParamsOperation.getInstance().setPrinterEnabled(parseBoolean(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1751,14 +1751,14 @@ public class SystemParamsOperation {
|
|||||||
saveSystemParamsSettings(paramsSettings);
|
saveSystemParamsSettings(paramsSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPrinterDisabled(boolean printerDisabled) {
|
public void setPrinterEnabled(boolean printerDisabled) {
|
||||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||||
paramsSettings.setPrinterDisabled(printerDisabled);
|
paramsSettings.setPrinterEnabled(printerDisabled);
|
||||||
saveSystemParamsSettings(paramsSettings);
|
saveSystemParamsSettings(paramsSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getPrinterDisabled() {
|
public boolean getPrinterEnabled() {
|
||||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||||
return paramsSettings.getPrinterDisabled();
|
return paramsSettings.getPrinterEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -260,7 +260,7 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
private String terminalIdForEreceipt = "";
|
private String terminalIdForEreceipt = "";
|
||||||
private String certificateUrl = "";
|
private String certificateUrl = "";
|
||||||
private String certificateClientUrl = "";
|
private String certificateClientUrl = "";
|
||||||
private boolean printerDisabled = false;
|
private boolean printerEnabled = true;
|
||||||
|
|
||||||
public boolean isQrPartialRefundEnable(){
|
public boolean isQrPartialRefundEnable(){
|
||||||
return qrPartialRefundEnable;
|
return qrPartialRefundEnable;
|
||||||
@ -1068,16 +1068,16 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
this.certificateClientUrl = url;
|
this.certificateClientUrl = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPrinterDisabled() {
|
public boolean isPrinterEnabled() {
|
||||||
return printerDisabled;
|
return printerEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPrinterDisabled(boolean printerDisabled) {
|
public void setPrinterEnabled(boolean printerDisabled) {
|
||||||
this.printerDisabled = printerDisabled;
|
this.printerEnabled = printerDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getPrinterDisabled() {
|
public boolean getPrinterEnabled() {
|
||||||
return printerDisabled;
|
return printerEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* // 流水号起始
|
/* // 流水号起始
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user