Merge pull request #17622 from atm-maxime/fix/expense_id

Fix id of expense report must be before object fetch (HOT FIX)
This commit is contained in:
Laurent Destailleur 2021-05-17 07:01:25 +02:00 committed by GitHub
commit 0cc519a26d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ $action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$id = GETPOST('id', 'int');
$date_start = dol_mktime(0, 0, 0, GETPOST('date_debutmonth', 'int'), GETPOST('date_debutday', 'int'), GETPOST('date_debutyear', 'int'));
$date_end = dol_mktime(0, 0, 0, GETPOST('date_finmonth', 'int'), GETPOST('date_finday', 'int'), GETPOST('date_finyear', 'int'));
$date = dol_mktime(0, 0, 0, GETPOST('datemonth', 'int'), GETPOST('dateday', 'int'), GETPOST('dateyear', 'int'));
@ -120,7 +121,6 @@ if ($object->id > 0) {
}
// Security check
$id = GETPOST("id", 'int');
if ($user->socid) {
$socid = $user->socid;
}