+10
-1
@@ -450,7 +450,16 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
final String noteText = command.stringValueOfParameterNamed("note");
|
||||
if (StringUtils.isNotBlank(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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user