From 800ae46a2e413f8275d6c4466c6d577551cb22d1 Mon Sep 17 00:00:00 2001 From: fiter-julius-oketayot <140818859+fiter-julius-oketayot@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:28:09 +0300 Subject: [PATCH] FBR-333: Guarantee status fix (#272) * FBR-333: Guarantee status fix * FBR-333: Guarantee status fix --------- Co-authored-by: Julius Peter Oketayot --- .../bankcheque/service/ChequeReadPlatformServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeReadPlatformServiceImpl.java index 14a01e3a508..fbca5911e75 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeReadPlatformServiceImpl.java @@ -410,11 +410,12 @@ public List retrieveGuarantees(String caseId, final String locale for (int i = 0; i < jsonArray.size(); i++) { final JsonElement element = jsonArray.get(i); final Long id = this.fromApiJsonHelper.extractLongNamed("id", element); + final String status = ObjectUtils.defaultIfNull(this.fromApiJsonHelper.extractStringNamed("estado", element), + "Nueva Solicitud"); final JsonElement data = this.fromApiJsonHelper.extractJsonObjectNamed("datos", element); final String clientNo = this.fromApiJsonHelper.extractStringNamed("numero_cliente", data); final String clientName = this.fromApiJsonHelper.extractStringNamed("name", data); final String withdrawalReason = this.fromApiJsonHelper.extractStringNamed("razon_retiro", data); - final String status = this.fromApiJsonHelper.extractStringNamed("razon_retiro", data); final BigDecimal requestedAmount = this.fromApiJsonHelper.extractBigDecimalNamed("monto", data, reqLocale); final GuaranteeData guarantee = GuaranteeData.builder().id(id).caseId(caseId).clientNo(clientNo).clientName(clientName) .withdrawalReason(withdrawalReason).requestedAmount(requestedAmount).status(status).build();