Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need overpayment boundaries on "extra monthly payments" #20

Open
meddlin opened this issue Aug 5, 2023 · 0 comments
Open

Need overpayment boundaries on "extra monthly payments" #20

meddlin opened this issue Aug 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@meddlin
Copy link
Owner

meddlin commented Aug 5, 2023

Sale price: 10000
terms: 120
interest rate: 10
extra monthly payment: 100

Place some boundary checks in the amortizationPeriod() function, so we don't have negative values in "remaining principal" and "interest". This amortization schedule should've ended at month: 54, not 55.

Classic off-by-1 error.

image

@meddlin meddlin added the bug Something isn't working label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant