Skip to content

Commit

Permalink
FINERACT-1806: Unify Charge-off reason mapping fields
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsaghy committed Dec 19, 2024
1 parent 8123276 commit e94e6c4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private List<ChargeOffReasonToGLAccountMapper> fetchChargeOffReasonMappings(fina
.description(codeDescription).position(orderPosition).active(isActive).mandatory(isMandatory).build();

final ChargeOffReasonToGLAccountMapper chargeOffReasonToGLAccountMapper = new ChargeOffReasonToGLAccountMapper()
.setChargeOffReasonCodeValue(chargeOffReasonsCodeValue).setChargeOffExpenseAccount(chargeOffExpenseAccount);
.setChargeOffReasonCodeValue(chargeOffReasonsCodeValue).setExpenseAccount(chargeOffExpenseAccount);
chargeOffReasonToGLAccountMappers.add(chargeOffReasonToGLAccountMapper);
}
return chargeOffReasonToGLAccountMappers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public enum LoanProductAccountingParams {
INCOME_FROM_GOODWILL_CREDIT_FEES("incomeFromGoodwillCreditFeesAccountId"), //
INCOME_FROM_GOODWILL_CREDIT_PENALTY("incomeFromGoodwillCreditPenaltyAccountId"), //
CHARGE_OFF_REASON_TO_EXPENSE_ACCOUNT_MAPPINGS("chargeOffReasonToExpenseAccountMappings"), //
EXPENSE_GL_ACCOUNT_ID("expenseGLAccountId"), //
EXPENSE_GL_ACCOUNT_ID("expenseAccountId"), //
CHARGE_OFF_REASON_CODE_VALUE_ID("chargeOffReasonCodeValueId"); //

private final String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ public class ChargeOffReasonToGLAccountMapper implements Serializable {

private static final long serialVersionUID = 1L;
private CodeValueData chargeOffReasonCodeValue;
private GLAccountData chargeOffExpenseAccount;
private GLAccountData expenseAccount;
}
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private PostChargeOffReasonToExpenseAccountMappings() {}
@Schema(example = "1")
public Long chargeOffReasonCodeValueId;
@Schema(example = "1")
public Long expenseGLAccountId;
public Long expenseAccountId;
}
}

Expand Down Expand Up @@ -1234,7 +1234,7 @@ static final class GetChargeOffReasonToExpenseAccountMappings {
private GetChargeOffReasonToExpenseAccountMappings() {}

public GetCodeValueData chargeOffReasonCodeValue;
public GetGLAccountData chargeOffExpenseAccount;
public GetGLAccountData expenseAccount;

static final class GetCodeValueData {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testCreateAndUpdateLoanProductWithValidChargeOffReason() {

GetLoanProductsProductIdResponse loanProductDetails = loanTransactionHelper.getLoanProduct(localLoanProductId.intValue());
Assertions.assertEquals(expenseAccount.getAccountID().longValue(),
loanProductDetails.getChargeOffReasonToExpenseAccountMappings().get(0).getChargeOffExpenseAccount().getId());
loanProductDetails.getChargeOffReasonToExpenseAccountMappings().get(0).getExpenseAccount().getId());
Assertions.assertEquals(Long.valueOf(chargeOffReasons),
loanProductDetails.getChargeOffReasonToExpenseAccountMappings().get(0).getChargeOffReasonCodeValue().getId());

Expand All @@ -71,7 +71,7 @@ public void testCreateAndUpdateLoanProductWithValidChargeOffReason() {

loanProductDetails = loanTransactionHelper.getLoanProduct(localLoanProductId.intValue());
Assertions.assertEquals(otherExpenseAccount.getAccountID().longValue(),
loanProductDetails.getChargeOffReasonToExpenseAccountMappings().get(0).getChargeOffExpenseAccount().getId());
loanProductDetails.getChargeOffReasonToExpenseAccountMappings().get(0).getExpenseAccount().getId());
Assertions.assertEquals(Long.valueOf(chargeOffReasons),
loanProductDetails.getChargeOffReasonToExpenseAccountMappings().get(0).getChargeOffReasonCodeValue().getId());
});
Expand Down Expand Up @@ -232,7 +232,7 @@ private static List<PostChargeOffReasonToExpenseAccountMappings> createPostCharg
List<PostChargeOffReasonToExpenseAccountMappings> chargeOffReasonToExpenseAccountMappings = new ArrayList<>();
PostChargeOffReasonToExpenseAccountMappings chargeOffReasonToExpenseAccountMapping = new PostChargeOffReasonToExpenseAccountMappings();
chargeOffReasonToExpenseAccountMapping.setChargeOffReasonCodeValueId(chargeOffReasonId);
chargeOffReasonToExpenseAccountMapping.setExpenseGLAccountId(glAccountId);
chargeOffReasonToExpenseAccountMapping.setExpenseAccountId(glAccountId);
chargeOffReasonToExpenseAccountMappings.add(chargeOffReasonToExpenseAccountMapping);
return chargeOffReasonToExpenseAccountMappings;
}
Expand Down

0 comments on commit e94e6c4

Please sign in to comment.