diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 61f0823560d..02e44ce2e73 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -1,8 +1,8 @@ - * Copyright (C) 2015 Frederic France - * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2020 Maxime DEMAREST +/* Copyright (C) 2014-2025 Alexandre Spangaro + * Copyright (C) 2015 Frederic France + * Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2020 Maxime DEMAREST * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -106,7 +106,7 @@ if (empty($reshook)) { if (!$cancel) { $datestart = dol_mktime(12, 0, 0, GETPOSTINT('startmonth'), GETPOSTINT('startday'), GETPOSTINT('startyear')); $dateend = dol_mktime(12, 0, 0, GETPOSTINT('endmonth'), GETPOSTINT('endday'), GETPOSTINT('endyear')); - $capital = price2num(GETPOST('capital')); + $capital = price2num(GETPOSTFLOAT('capital')); $rate = price2num(GETPOST('rate')); if (!$capital) { @@ -141,7 +141,7 @@ if (empty($reshook)) { $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); $object->fk_project = GETPOSTINT('projectid'); - $object->insurance_amount = GETPOSTINT('insurance_amount'); + $object->insurance_amount = GETPOSTFLOAT('insurance_amount'); $accountancy_account_capital = GETPOST('accountancy_account_capital'); $accountancy_account_insurance = GETPOST('accountancy_account_insurance'); @@ -181,7 +181,7 @@ if (empty($reshook)) { $datestart = dol_mktime(12, 0, 0, GETPOSTINT('startmonth'), GETPOSTINT('startday'), GETPOSTINT('startyear')); $dateend = dol_mktime(12, 0, 0, GETPOSTINT('endmonth'), GETPOSTINT('endday'), GETPOSTINT('endyear')); - $capital = price2num(GETPOST('capital')); + $capital = price2num(GETPOSTFLOAT('capital')); if (!$capital) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("LoanCapital")), null, 'errors'); @@ -192,7 +192,7 @@ if (empty($reshook)) { $object->capital = $capital; $object->nbterm = GETPOSTINT("nbterm"); $object->rate = price2num(GETPOST("rate", 'alpha')); - $object->insurance_amount = price2num(GETPOSTINT('insurance_amount')); + $object->insurance_amount = price2num(GETPOSTFLOAT('insurance_amount')); $accountancy_account_capital = GETPOST('accountancy_account_capital'); $accountancy_account_insurance = GETPOST('accountancy_account_insurance');