Fix reset of budget

This commit is contained in:
Laurent Destailleur
2025-11-09 04:29:02 +01:00
parent e41910b146
commit 2ff17df01a

View File

@@ -127,7 +127,7 @@ if ($action == 'update' && !GETPOST("cancel") && $user->hasRight('projet', 'cree
$object->date_start = dol_mktime(GETPOSTINT('date_starthour'), GETPOSTINT('date_startmin'), 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear'));
$object->date_end = dol_mktime(GETPOSTINT('date_endhour'), GETPOSTINT('date_endmin'), 0, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear'));
$object->progress = price2num(GETPOST('progress', 'alphanohtml'));
$object->budget_amount = GETPOSTFLOAT('budget_amount');
$object->budget_amount = (GETPOST('budget_amount') != '' ? GETPOSTFLOAT('budget_amount'): null);
$object->billable = (GETPOST('billable', 'aZ') == 'yes' ? 1 : 0);
if (GETPOST('progress') == '100') {
$object->status = $object::STATUS_CLOSED;