26if (!defined(
'NOTOKENRENEWAL')) {
27 define(
'NOTOKENRENEWAL',
'1');
29if (!defined(
'NOREQUIREMENU')) {
30 define(
'NOREQUIREMENU',
'1');
32if (!defined(
'NOREQUIREAJAX')) {
33 define(
'NOREQUIREAJAX',
'1');
37require
'../main.inc.php';
45require DOL_DOCUMENT_ROOT.
'/core/lib/loan.lib.php';
50$source =
GETPOST(
'source',
'aZ09') ?
GETPOST(
'source',
'aZ09') :
'mens';
61$output =
loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm, $amort, $source, $grace_period, $interet);
63echo json_encode($output);
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
loanCalcMonthlyPayment($mens, $capital, $rate, $numactualloadterm, $nbterm, $amort=null, $source='mens', $grace_period=0, $int=null)
Calculate remaining loan mensuality and interests.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.