Readplace

:white_check_mark: Add the right calculation for $5001.00 loan amount · FagnerMartinsBrack/jack-the-moneylender@2af5de9

GitHub 1 min read
View original
  • current

This article is too short to summarise.

Original file line numberDiff line numberDiff line change

@@ -26,7 +26,7 @@

2626

interestAmount = interestAmount.plus(interestAmountForSecondRange);

2727
2828

const dollarsAboveThresholdForThirdRange = Money('$5001.00').minus(Money('$5000.00'));

29-

const interestAmountForThirdRange = Money('$0.14').multipliedBy(dollarsAboveThresholdForThirdRange);

29+

const interestAmountForThirdRange = Money('$0.14').minus(Money('$0.09')).multipliedBy(dollarsAboveThresholdForThirdRange);

3030

interestAmount = interestAmount.plus(interestAmountForThirdRange);

3131
3232

return interestAmount;