class - PHP: PPMT in 365 days -
i using php financial class
http://www.phpclasses.org/package/892-php-financial-functions-with-the-excel-function-names-.html
the ppmt function calculating in 360 days need in 365 days.
the function in class looks this:
function ppmt($rate, $per, $nper, $pv, $fv = 0.0, $type = 0) { if (($per < 1) || ($per >= ($nper + 1))) return null; else { $pmt = $this->_calculate_pmt ($rate, $nper, $pv, $fv, $type); $ipmt = $this->_calculate_interest_part ($pv, $pmt, $rate, $per - 1); return ((is_finite($pmt) && is_finite($ipmt)) ? $pmt - $ipmt: null); } }
cannot find documentation nor has same issue on internet.
Comments
Post a Comment