#MIFOSX-886,#MIFOSX-835,#MIFOSX-996,#MIFOSX-990,#MIFOSX-957

This commit is contained in:
Madhukar
2014-03-19 21:31:41 +05:30
parent e496ccf02a
commit e2ee6d1f5e
4 changed files with 40 additions and 5 deletions
@@ -200,7 +200,7 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
.append("LEFT JOIN m_staff sf ON sf.id = gp.staff_id ")
.append("JOIN m_group_client gc ON gc.group_id = gp.id ")
.append("JOIN m_client cl ON cl.id = gc.client_id ")
.append("LEFT JOIN m_loan ln ON cl.id = ln.client_id AND ln.group_id is not null AND ( ln.loan_status_id = 300 OR ( ln.loan_status_id =200 AND ln.expected_disbursedon_date <= :dueDate )) ")
.append("LEFT JOIN m_loan ln ON cl.id = ln.client_id and ln.group_id=gp.id AND ln.group_id is not null AND ( ln.loan_status_id = 300 OR ( ln.loan_status_id =200 AND ln.expected_disbursedon_date <= :dueDate )) ")
.append("LEFT JOIN m_product_loan pl ON pl.id = ln.product_id ")
.append("LEFT JOIN m_currency rc on rc.`code` = ln.currency_code ")
.append("LEFT JOIN m_loan_repayment_schedule ls ON ls.loan_id = ln.id AND ls.completed_derived = 0 AND ls.duedate <= :dueDate ")
@@ -421,14 +421,19 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa
existingLoanApplication.updateLoanSchedule(loanSchedule);
}
this.loanRepository.saveAndFlush(existingLoanApplication);
// FIXME: adding loan installment charges along with the other
// charges,
// is trying to add extra entries with null values. Because of that
// persisting charges separately
final String chargesParamName = "charges";
if (changes.containsKey(chargesParamName)) {
final Set<LoanCharge> loanCharges = this.loanChargeAssembler.fromParsedJson(command.parsedJson());
existingLoanApplication.updateLoanCharges(loanCharges);
this.loanRepository.saveAndFlush(existingLoanApplication);
}
this.loanRepository.saveAndFlush(existingLoanApplication);
final String submittedOnNote = command.stringValueOfParameterNamed("submittedOnNote");
if (StringUtils.isNotBlank(submittedOnNote)) {
final Note note = Note.loanNote(existingLoanApplication, submittedOnNote);