hide/show auto-reversal
This commit is contained in:
parent
9b9d827d47
commit
c9032de30d
@ -163,6 +163,10 @@ public class SettingsFragment extends DataBindingFragment {
|
||||
}
|
||||
|
||||
private void updateReversalSettings() {
|
||||
boolean isVisible = SystemParamsOperation.getInstance().getAutoReversalEnable();
|
||||
LogUtil.d("SettingsFragment", "isVisible " + isVisible);
|
||||
binding.reversalCard.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||
|
||||
boolean isEnabled = SystemParamsOperation.getInstance().isReversalOn();
|
||||
binding.reversalSwitch.setChecked(isEnabled);
|
||||
binding.reversalSummary.setText(isEnabled ?
|
||||
|
||||
@ -654,6 +654,8 @@ public class TMSSetupsImpl implements TMSSetups{
|
||||
}
|
||||
else if(TextUtils.equals(name, "pre_auth_manual_enabled")) {
|
||||
SystemParamsOperation.getInstance().setPreAuthManualEnabled(parseBoolean(data));
|
||||
}else if(TextUtils.equals(name, "auto_reversal_enable")) {
|
||||
SystemParamsOperation.getInstance().setAutoReversalEnable(parseBoolean(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -729,7 +729,9 @@
|
||||
android:onClick="@{()->click.onReversalClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
app:cardElevation="2dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -1916,4 +1916,14 @@ public class SystemParamsOperation {
|
||||
}
|
||||
|
||||
|
||||
public void setAutoReversalEnable(boolean autoReversalEnable) {
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
params.setAutoReversalEnable(autoReversalEnable);
|
||||
saveSystemParamsSettings(params);
|
||||
}
|
||||
|
||||
public boolean getAutoReversalEnable(){
|
||||
SystemParamsSettings params = getSystemParamsSettings();
|
||||
return params.getAutoReversalEnable();
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,6 +276,7 @@ public class SystemParamsSettings implements Serializable {
|
||||
private String certificateClientUrl = "";
|
||||
private boolean printerEnabled = true;
|
||||
private boolean duelCurrencyStatus = false;
|
||||
private boolean autoReversalEnable = false;
|
||||
|
||||
public boolean isQrPartialRefundEnable(){
|
||||
return qrPartialRefundEnable;
|
||||
@ -1179,6 +1180,14 @@ public class SystemParamsSettings implements Serializable {
|
||||
return duelCurrencyStatus;
|
||||
}
|
||||
|
||||
public void setAutoReversalEnable(boolean autoReversalEnable) {
|
||||
this.autoReversalEnable = autoReversalEnable;
|
||||
}
|
||||
|
||||
public boolean getAutoReversalEnable(){
|
||||
return autoReversalEnable;
|
||||
}
|
||||
|
||||
/* // 流水号起始
|
||||
private String serialNum = Configs.getInstance().SERIAL_NUM();
|
||||
// 批次号起始
|
||||
|
||||
Loading…
Reference in New Issue
Block a user