FIX: holiday balances: revert part of commit 1e7df0ba9 to still increment on page visit
This commit is contained in:
parent
82feb57fcf
commit
4d6372dda1
@ -193,6 +193,10 @@ llxHeader('', $langs->trans('CPTitreMenu'));
|
||||
|
||||
|
||||
$typeleaves = $holiday->getTypes(1, 1);
|
||||
$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user.
|
||||
if ($result < 0) {
|
||||
setEventMessages($holiday->error, $holiday->errors, 'errors');
|
||||
}
|
||||
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -231,6 +231,9 @@ $formfile = new FormFile($db);
|
||||
$fuser = new User($db);
|
||||
$holidaystatic = new Holiday($db);
|
||||
|
||||
// Update sold
|
||||
$result = $object->updateBalance();
|
||||
|
||||
$title = $langs->trans('CPTitreMenu');
|
||||
llxHeader('', $title);
|
||||
|
||||
|
||||
@ -68,6 +68,16 @@ if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INF
|
||||
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Update sold
|
||||
if (!empty($conf->holiday->enabled) && !empty($setupcompanynotcomplete)) {
|
||||
$holidaystatic = new Holiday($db);
|
||||
$result = $holidaystatic->updateBalance();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
|
||||
Loading…
Reference in New Issue
Block a user