codesmithtech/amortize
Composer 安装命令:
composer require codesmithtech/amortize
包简介
PHP library for calculating the amortization of mortgages, or any other loan, over a period of time
README 文档
README
Amortize calculates the amortization of loans over their term, taking care of the math for you.
- Calculates principal and interest for each month over the loan term
- Calculate total repayable over the term of the loan
- Add overpayments part way through the term and have the loan term shortened, or the monthly payment recalculated and reduced for the remainder of the term
Install
composer require codesmithtech/amortize
Usage
<?php
$amortize = new Amortize();
$amortize->setInterestRate(3.5);
$amortize->setPrincipal(15000.0);
$amortize->setTerm(36); // months
$amortize->totalAmountDueOverTerm(); // returns a float with a value equal to the principal + interest owed over the term of the loan
$amortize->getBreakdownByMonth(); // returns an array of AmortizedMonth objects, each containing the amount of principal and interest due that month
统计信息
- 总下载量: 68
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-06