From 324a8568def74b52856a0bf3b7971ce38927188a Mon Sep 17 00:00:00 2001 From: tabrez-fiter Date: Thu, 12 Dec 2024 11:19:30 +0800 Subject: [PATCH] SU-488 : Archivo de Cartera - Departamento --- .../ArchiveLoansHistoryTasklet.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/archiveloanhistory/ArchiveLoansHistoryTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/archiveloanhistory/ArchiveLoansHistoryTasklet.java index 7e4c397099..77fc01697b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/archiveloanhistory/ArchiveLoansHistoryTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/archiveloanhistory/ArchiveLoansHistoryTasklet.java @@ -236,15 +236,14 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon } } - String cuoEstado = dataLoan.getCuoEstado(); - if (cuoEstado == null || cuoEstado.equals("CASTIGO")) { - cuoEstado = loan.getStatus().name(); - } + String estadoCuota = loan.getStatus().name(); + String cuoEstado = estadoCuota; String estadoCliente = dataLoan.getEstadoCliente(); if (estadoCliente == null || estadoCliente.equals("CASTIGO")) { estadoCliente = ClientStatus.fromInt(loan.getClient().getStatus()).name(); } + if (existingLoanArchive.isPresent()) { LoanArchiveHistory existingEntry = existingLoanArchive.get(); @@ -301,7 +300,7 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon existingEntry.setEmpresa(ally); existingEntry.setMarca(brand); existingEntry.setCiudadPuntoCredito(cityPoinfsales); - existingEntry.setEstadoCuota(dataLoan.getEstadoCuota()); + existingEntry.setEstadoCuota(estadoCuota); existingEntry.setIvaInteresDeMora(BigDecimal.ZERO); existingEntry.setFechaFinanciacion(loan.getDisbursementDate()); existingEntry.setPuntoDeVenta(pointOfSale); @@ -365,7 +364,7 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon loanArchiveHistory.setEmpresa(ally); loanArchiveHistory.setMarca(brand); loanArchiveHistory.setCiudadPuntoCredito(cityPoinfsales); - loanArchiveHistory.setEstadoCuota(dataLoan.getEstadoCuota()); + loanArchiveHistory.setEstadoCuota(estadoCuota); loanArchiveHistory.setIvaInteresDeMora(BigDecimal.ZERO); loanArchiveHistory.setFechaFinanciacion(loan.getDisbursementDate()); loanArchiveHistory.setPuntoDeVenta(pointOfSale);