|
|
|
@ -2899,6 +2899,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setClientCBBankPaySurCharge(JSONObject account, String clientMoniker, boolean paySurcharge) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "cbbank_surcharge", paySurcharge), true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setClientTaxInSurcharge(JSONObject account, String clientMoniker, boolean taxInSurcharge) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
@ -2906,7 +2916,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "tax_in_surcharge", taxInSurcharge));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -3434,6 +3443,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
.processClientConfigModify(new SwitchPermissionModify(account, client.getString("client_moniker"), "retail_surcharge", paySurcharge));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void changeCBBankPaySurcharge(JSONObject account, boolean paySurcharge) {
|
|
|
|
|
int clientId = account.getIntValue("client_id");
|
|
|
|
|
JSONObject client = getClientInfo(clientId);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
if (account.getIntValue("role") == 3) {
|
|
|
|
|
// cashier cannot change this config
|
|
|
|
|
throw new ForbiddenException("Cashier has no permission to switch retail surcharge");
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport
|
|
|
|
|
.processClientConfigModify(new SwitchPermissionModify(account, client.getString("client_moniker"), "cbbank_surcharge", paySurcharge),true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void changeRequireCustinfo(JSONObject account, boolean requireCustinfo) {
|
|
|
|
|
int clientId = account.getIntValue("client_id");
|
|
|
|
|