adamsaghy commented on code in PR #6285:
URL: https://github.com/apache/fineract/pull/6285#discussion_r3934036519
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansTasklet.java:
##########
@@ -78,9 +84,27 @@ public RepeatStatus execute(StepContribution contribution,
ChunkContext chunkCon
break;
}
final boolean isExceptionForBalanceCheck = false;
+ BigDecimal amountWithTax =
installmentChargeData.getAmountOutstanding();
+ if (loanCharge != null) {
+ if (loanCharge.getCharge().getTaxGroup() !=
null && log.isInfoEnabled()) {
+ log.info(
+ "Scheduled charge payment tax
evaluation: loanId={}, loanChargeId={}, installmentNumber={}, txDate={},
baseAmount={}, applicableTaxComponents={}",
+ chargeData.getLoanId(),
chargeData.getId(), installmentChargeData.getInstallmentNumber(),
+ DateUtils.getBusinessLocalDate(),
amountWithTax, TaxUtils.getApplicableTaxComponentSummaries(
+
loanCharge.getCharge().getTaxGroup(), DateUtils.getBusinessLocalDate()));
+ }
+ amountWithTax =
TaxUtils.calculateChargeAmountWithTax(amountWithTax,
loanCharge.getCharge().getTaxGroup(),
+ DateUtils.getBusinessLocalDate(),
loanCharge.getLoan().getCurrency().getDigitsAfterDecimal());
+ if (loanCharge.getCharge().getTaxGroup() !=
null && log.isInfoEnabled()) {
+ log.info(
+ "Scheduled charge payment tax
result: loanId={}, loanChargeId={}, installmentNumber={}, txDate={},
amountAfterTax={}",
+ chargeData.getLoanId(),
chargeData.getId(), installmentChargeData.getInstallmentNumber(),
+ DateUtils.getBusinessLocalDate(),
amountWithTax);
+ }
Review Comment:
Please remove this
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansTasklet.java:
##########
@@ -98,12 +122,28 @@ public RepeatStatus execute(StepContribution contribution,
ChunkContext chunkCon
continue;
}
final boolean isExceptionForBalanceCheck = false;
- final AccountTransferDTO accountTransferDTO = new
AccountTransferDTO(DateUtils.getBusinessLocalDate(),
- chargeData.getAmountOutstanding(),
PortfolioAccountType.SAVINGS, PortfolioAccountType.LOAN,
- portfolioAccountData.getId(),
chargeData.getLoanId(), "Loan Charge Payment", null, null, null, null,
- LoanTransactionType.CHARGE_PAYMENT.getValue(),
chargeData.getId(), null,
- AccountTransferType.CHARGE_PAYMENT.getValue(),
null, null, ExternalId.empty(), null, null, null,
- isRegularTransaction, isExceptionForBalanceCheck);
+ BigDecimal amountWithTax =
chargeData.getAmountOutstanding();
+ if (loanCharge != null) {
+ if (loanCharge.getCharge().getTaxGroup() != null &&
log.isInfoEnabled()) {
+ log.info(
+ "Scheduled charge payment tax evaluation:
loanId={}, loanChargeId={}, installmentNumber={}, txDate={}, baseAmount={},
applicableTaxComponents={}",
+ chargeData.getLoanId(),
chargeData.getId(), null, DateUtils.getBusinessLocalDate(), amountWithTax,
+
TaxUtils.getApplicableTaxComponentSummaries(loanCharge.getCharge().getTaxGroup(),
+ DateUtils.getBusinessLocalDate()));
+ }
Review Comment:
Please remove this
--
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]