Skip to content

Commit

Permalink
FINERACT-1971: Fix boolean values used in Loan product charge-off rea…
Browse files Browse the repository at this point in the history
…sons accounting mappings
  • Loading branch information
Jose Alberto Hernandez authored and adamsaghy committed Dec 17, 2024
1 parent 3735aea commit 8716751
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public Map<String, Object> mapRow(final ResultSet rs, @SuppressWarnings("unused"
final String codeValue = rs.getString("codeValueName");
final String codeDescription = rs.getString("codeDescription");
final Integer orderPosition = rs.getInt("orderPosition");
final Integer isActive = rs.getInt("isActive");
final Integer isMandatory = rs.getInt("isMandatory");
final Boolean isActive = rs.getBoolean("isActive");
final Boolean isMandatory = rs.getBoolean("isMandatory");

final Map<String, Object> loanProductToGLAccountMap = new LinkedHashMap<>(5);
loanProductToGLAccountMap.put("id", id);
Expand Down Expand Up @@ -377,10 +377,8 @@ private List<ChargeOffReasonToGLAccountMapper> fetchChargeOffReasonMappings(fina
final String codeValue = (String) chargeOffReasonMap.get("codeValue");
final String codeDescription = (String) chargeOffReasonMap.get("codeDescription");
final Integer orderPosition = (Integer) chargeOffReasonMap.get("orderPosition");
final Integer isActive = (Integer) chargeOffReasonMap.get("isActive");
final Integer isMandatory = (Integer) chargeOffReasonMap.get("isMandatory");
final boolean active = isActive != null && isActive == 1;
final boolean mandatory = isMandatory != null && isMandatory == 1;
final Boolean active = (Boolean) chargeOffReasonMap.get("isActive");
final Boolean mandatory = (Boolean) chargeOffReasonMap.get("isMandatory");
final CodeValueData chargeOffReasonsCodeValue = CodeValueData.builder().id(Long.valueOf(chargeOffReasonId)).name(codeValue)
.description(codeDescription).position(orderPosition).active(active).mandatory(mandatory).build();

Expand Down

0 comments on commit 8716751

Please sign in to comment.