adamsaghy commented on code in PR #2614:
URL: https://github.com/apache/fineract/pull/2614#discussion_r980284552


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransaction.java:
##########
@@ -155,6 +155,15 @@ public static LoanTransaction repayment(final Office 
office, final Money amount,
         return new LoanTransaction(null, office, 
LoanTransactionType.REPAYMENT, paymentDetail, amount.getAmount(), paymentDate, 
externalId);
     }
 
+    public static LoanTransaction chargeback(final Loan loan, final Money 
amount, final PaymentDetail paymentDetail,
+            final LocalDate paymentDate, final String externalId) {
+        final BigDecimal negativeAmount = amount.getAmount().negate();

Review Comment:
   Transaction amount cannot be negative!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to