Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3170,15 +3170,6 @@ public CommandWrapperBuilder payClientCharge(final Long clientId, final Long cha
return this;
}

public CommandWrapperBuilder inactivateClientCharge(final Long clientId, final Long chargeId) {
this.actionName = ACTION_INACTIVATE;
this.entityName = ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME;
this.entityId = chargeId;
this.clientId = clientId;
this.href = "/clients/" + clientId + "/charges/" + chargeId + "?command=inactivate";
return this;
}

public CommandWrapperBuilder undoClientTransaction(final Long clientId, final Long transactionId) {
this.actionName = ClientApiConstants.CLIENT_TRANSACTION_ACTION_UNDO;
this.entityName = ClientApiConstants.CLIENT_RESOURCE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class ClientApiConstants {
public static final String CLIENT_CHARGE_ACTION_DELETE = "DELETE";
public static final String CLIENT_CHARGE_ACTION_WAIVE = "WAIVE";
public static final String CLIENT_CHARGE_ACTION_PAY = "PAY";
public static final String CLIENT_CHARGE_ACTION_INACTIVATE = "INACTIVATE";

// Client charge associations and query parameters
public static final String CLIENT_CHARGE_QUERY_PARAM_STATUS = "chargeStatus";
Expand All @@ -49,7 +48,6 @@ public class ClientApiConstants {
// Commands
public static final String CLIENT_CHARGE_COMMAND_WAIVE_CHARGE = "waive";
public static final String CLIENT_CHARGE_COMMAND_PAY_CHARGE = "paycharge";
public static final String CLIENT_CHARGE_COMMAND_INACTIVATE_CHARGE = "inactivate";
public static final String CLIENT_TRANSACTION_COMMAND_UNDO = "undo";

public static final String CLIENT_CLOSURE_REASON = "ClientClosureReason";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,10 @@ public String payOrWaiveClientCharge(@PathParam("clientId") @Parameter(descripti

final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest);

json = this.toApiJsonSerializer.serialize(result);
} else if (is(commandParam, ClientApiConstants.CLIENT_CHARGE_COMMAND_INACTIVATE_CHARGE)) {
final CommandWrapper commandRequest = new CommandWrapperBuilder().inactivateClientCharge(clientId, chargeId).build();

final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest);

json = this.toApiJsonSerializer.serialize(result);
} else {
throw new UnrecognizedQueryParamException("command", commandParam, ClientApiConstants.CLIENT_CHARGE_COMMAND_WAIVE_CHARGE,
ClientApiConstants.CLIENT_CHARGE_COMMAND_PAY_CHARGE, ClientApiConstants.CLIENT_CHARGE_COMMAND_INACTIVATE_CHARGE);
ClientApiConstants.CLIENT_CHARGE_COMMAND_PAY_CHARGE);
}

return json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,4 @@ public interface ClientChargeWritePlatformService {
@Transactional
CommandProcessingResult payCharge(Long clientId, Long clientChargeId, JsonCommand command);

@Transactional
CommandProcessingResult inactivateCharge(Long clientId, Long clientChargeId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,6 @@ public CommandProcessingResult updateCharge(@SuppressWarnings("unused") Long cli
return null;
}

@Override
@SuppressWarnings("unused")
public CommandProcessingResult inactivateCharge(Long clientId, Long clientChargeId) {
// functionality not yet supported
return null;
}

/**
* Ensures that the charge due date is not on a holiday or a non working day
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,5 @@
<include file="parts/0228_add_configuration_block_transactions_on_closed_overpaid_loans.xml" relativeToChangelogFile="true" />
<include file="parts/0229_trial_balance_summary_fix_empty_space.xml" relativeToChangelogFile="true" />
<include file="parts/0230_add_forgot_password.xml" relativeToChangelogFile="true" />
<include file="parts/0231_remove_clientcharge_inactivate_permissions.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
<changeSet author="ashharahmadkhan" id="1">
<comment>Remove INACTIVATE_CLIENTCHARGE permissions - command was never implemented and the client-charge inactivate write path is being removed.</comment>
<delete tableName="m_permission">
<where>code='INACTIVATE_CLIENTCHARGE'</where>
</delete>
<delete tableName="m_permission">
<where>code='INACTIVATE_CLIENTCHARGE_CHECKER'</where>
</delete>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -3738,13 +3738,11 @@ INSERT INTO `m_permission` (`id`, `grouping`, `code`, `entity_name`, `action_nam
(668, 'portfolio', 'DELETE_CLIENTCHARGE', 'CLIENTCHARGE', 'DELETE', 0),
(669, 'portfolio', 'WAIVE_CLIENTCHARGE', 'CLIENTCHARGE', 'WAIVE', 0),
(670, 'portfolio', 'PAY_CLIENTCHARGE', 'CLIENTCHARGE', 'PAY', 0),
(671, 'portfolio', 'INACTIVATE_CLIENTCHARGE', 'CLIENTCHARGE', 'INACTIVATE', 0),
(672, 'portfolio', 'UPDATE_CLIENTCHARGE', 'CLIENTCHARGE', 'UPDATE', 0),
(673, 'portfolio', 'CREATE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'CREATE_CHECKER', 0),
(674, 'portfolio', 'DELETE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'DELETE_CHECKER', 0),
(675, 'portfolio', 'WAIVE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'WAIVE_CHECKER', 0),
(676, 'portfolio', 'PAY_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'PAY_CHECKER', 0),
(677, 'portfolio', 'INACTIVATE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'INACTIVATE_CHECKER', 0),
(678, 'portfolio', 'UPDATE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'UPDATE_CHECKER', 0),
(679, 'transaction_client', 'READTRANSACTION_CLIENT', 'CLIENT', 'READTRANSACTION', 0),
(680, 'transaction_client', 'UNDOTRANSACTION_CLIENT', 'CLIENT', 'UNDOTRANSACTION', 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3910,13 +3910,11 @@ INSERT INTO `m_permission` (`id`, `grouping`, `code`, `entity_name`, `action_nam
(668, 'portfolio', 'DELETE_CLIENTCHARGE', 'CLIENTCHARGE', 'DELETE', 0),
(669, 'portfolio', 'WAIVE_CLIENTCHARGE', 'CLIENTCHARGE', 'WAIVE', 0),
(670, 'portfolio', 'PAY_CLIENTCHARGE', 'CLIENTCHARGE', 'PAY', 0),
(671, 'portfolio', 'INACTIVATE_CLIENTCHARGE', 'CLIENTCHARGE', 'INACTIVATE', 0),
(672, 'portfolio', 'UPDATE_CLIENTCHARGE', 'CLIENTCHARGE', 'UPDATE', 0),
(673, 'portfolio', 'CREATE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'CREATE_CHECKER', 0),
(674, 'portfolio', 'DELETE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'DELETE_CHECKER', 0),
(675, 'portfolio', 'WAIVE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'WAIVE_CHECKER', 0),
(676, 'portfolio', 'PAY_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'PAY_CHECKER', 0),
(677, 'portfolio', 'INACTIVATE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'INACTIVATE_CHECKER', 0),
(678, 'portfolio', 'UPDATE_CLIENTCHARGE_CHECKER', 'CLIENTCHARGE', 'UPDATE_CHECKER', 0),
(679, 'transaction_client', 'READTRANSACTION_CLIENT', 'CLIENT', 'READTRANSACTION', 0),
(680, 'transaction_client', 'UNDOTRANSACTION_CLIENT', 'CLIENT', 'UNDOTRANSACTION', 0),
Expand Down
Loading