fix for MIFOSX-474
This commit is contained in:
+10
-1
@@ -450,7 +450,16 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
final String noteText = command.stringValueOfParameterNamed("note");
|
final String noteText = command.stringValueOfParameterNamed("note");
|
||||||
if (StringUtils.isNotBlank(noteText)) {
|
if (StringUtils.isNotBlank(noteText)) {
|
||||||
changes.put("note", noteText);
|
changes.put("note", noteText);
|
||||||
Note note = Note.loanTransactionNote(loan, newTransactionDetail, noteText);
|
Note note = null;
|
||||||
|
/**
|
||||||
|
* If a new transaction is not created, associate note with the
|
||||||
|
* transaction to be adjusted
|
||||||
|
**/
|
||||||
|
if (newTransactionDetail.isGreaterThanZero(loan.getPrincpal().getCurrency())) {
|
||||||
|
note = Note.loanTransactionNote(loan, newTransactionDetail, noteText);
|
||||||
|
} else {
|
||||||
|
note = Note.loanTransactionNote(loan, transactionToAdjust, noteText);
|
||||||
|
}
|
||||||
this.noteRepository.save(note);
|
this.noteRepository.save(note);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user