From 258662e6163e03603442908924103ebd5319855a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Jul 2016 15:31:56 +0200 Subject: [PATCH] Fix: missing month of update in leave "view log" page. --- htdocs/holiday/define_holiday.php | 3 --- htdocs/holiday/view_log.php | 13 ++++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 6af57716648..7a94e686173 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -169,9 +169,6 @@ if ($lastUpdate) print '
'.$langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''."\n"; } else print $langs->trans('None'); - - - print "
\n"; $result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user. diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index e4b5070f097..1b0e779488a 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -60,7 +60,14 @@ $log_holiday = $cp->fetchLog('ORDER BY cpl.rowid DESC', " AND date_action BETWEE print load_fiche_titre($langs->trans('LogCP'), '', 'title_hrm.png'); print '
'.$langs->trans('LastUpdateCP').': '."\n"; -if ($cp->getConfCP('lastUpdate')) print ''.dol_print_date($db->jdate($cp->getConfCP('lastUpdate')),'dayhour','tzuser').''; +$lastUpdate = $cp->getConfCP('lastUpdate'); +if ($lastUpdate) +{ + $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; + $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3]; + print ''.dol_print_date($db->jdate($cp->getConfCP('lastUpdate')),'dayhour','tzuser').''; + print '
'.$langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''."\n"; +} else print $langs->trans('None'); print "

\n"; @@ -108,8 +115,8 @@ foreach($cp->logs as $logs_CP) if ($log_holiday == '2') { - print ''; - print ''.$langs->trans('None').''; + print ''; + print ''.$langs->trans('NoRecordFound').''; print ''; }