2012-09-05 03:26:57 +02:00
< ? php
2016-01-09 01:18:53 +01:00
/* Copyright ( C ) 2007 - 2016 Laurent Destailleur < eldy @ users . sourceforge . net >
2012-09-05 03:57:26 +02:00
* Copyright ( C ) 2011 Dimitri Mouillard < dmouillard @ teclib . com >
2020-06-25 14:36:42 +02:00
* Copyright ( C ) 2020 Tobias Sekan < tobias . sekan @ startmail . com >
2012-09-05 03:57:26 +02:00
*
* 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
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2012-09-05 03:57:26 +02:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2012-09-05 03:57:26 +02:00
*/
2012-09-05 03:26:57 +02:00
/**
* Displays the log of actions performed in the module .
*
2012-12-20 20:16:10 +01:00
* \file htdocs / holiday / view_log . php
2012-09-05 03:26:57 +02:00
* \ingroup holiday
*/
2018-07-26 11:57:25 +02:00
require '../main.inc.php' ;
2012-09-07 17:23:16 +02:00
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/holiday/common.inc.php' ;
2014-08-06 03:09:59 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php' ;
2012-09-05 03:26:57 +02:00
2020-06-25 14:36:42 +02:00
$action = GETPOST ( 'action' , 'aZ09' ) ? GETPOST ( 'action' , 'aZ09' ) : 'view' ; // The action 'add', 'create', 'edit', 'update', 'view', ...
$massaction = GETPOST ( 'massaction' , 'alpha' ); // The bulk action (combo box choice into lists)
$show_files = GETPOST ( 'show_files' , 'int' ); // Show files area generated by bulk actions ?
$confirm = GETPOST ( 'confirm' , 'alpha' ); // Result of a confirmation
$cancel = GETPOST ( 'cancel' , 'alpha' ); // We click on a Cancel button
$toselect = GETPOST ( 'toselect' , 'array' ); // Array of ids of elements selected into a list
$contextpage = GETPOST ( 'contextpage' , 'aZ' ) ? GETPOST ( 'contextpage' , 'aZ' ) : 'myobjectlist' ; // To manage different context of search
$backtopage = GETPOST ( 'backtopage' , 'alpha' ); // Go back to a dedicated page
$optioncss = GETPOST ( 'optioncss' , 'aZ' ); // Option for the css output (always '' except when 'print')
$search_id = GETPOST ( 'search_id' , 'alpha' );
$search_prev_solde = GETPOST ( 'search_prev_solde' , 'alpha' );
$search_new_solde = GETPOST ( 'search_new_solde' , 'alpha' );
2020-06-25 14:37:09 +02:00
$year = GETPOST ( 'year' );
2019-02-08 13:26:59 +01:00
if ( empty ( $year ))
{
2020-04-10 10:59:32 +02:00
$tmpdate = dol_getdate ( dol_now ());
$year = $tmpdate [ 'year' ];
2019-02-08 13:26:59 +01:00
}
// Load variable for pagination
2020-06-25 14:36:42 +02:00
$limit = GETPOST ( 'limit' , 'int' ) ? GETPOST ( 'limit' , 'int' ) : $conf -> liste_limit ;
2019-02-08 13:26:59 +01:00
$sortfield = GETPOST ( 'sortfield' , 'alpha' );
$sortorder = GETPOST ( 'sortorder' , 'alpha' );
2020-03-13 13:07:11 +01:00
$page = GETPOSTISSET ( 'pageplusone' ) ? ( GETPOST ( 'pageplusone' ) - 1 ) : GETPOST ( " page " , 'int' );
2019-02-08 13:26:59 +01:00
if ( empty ( $page ) || $page == - 1 || GETPOST ( 'button_search' , 'alpha' ) || GETPOST ( 'button_removefilter' , 'alpha' ) || ( empty ( $toselect ) && $massaction === '0' )) { $page = 0 ; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
$offset = $limit * $page ;
$pageprev = $page - 1 ;
$pagenext = $page + 1 ;
2020-06-25 14:36:42 +02:00
if ( ! $sortfield ) $sortfield = " cpl.rowid " ;
if ( ! $sortorder ) $sortorder = " DESC " ;
2019-02-08 13:26:59 +01:00
2012-09-05 03:26:57 +02:00
// Protection if external user
2019-10-31 20:46:31 +01:00
if ( $user -> socid > 0 ) accessforbidden ();
2012-09-05 03:26:57 +02:00
// Si l'utilisateur n'a pas le droit de lire cette page
2020-04-10 10:59:32 +02:00
if ( ! $user -> rights -> holiday -> read_all ) accessforbidden ();
2012-09-05 03:26:57 +02:00
2019-02-08 13:26:59 +01:00
// Load translation files required by the page
$langs -> load ( 'users' );
// Initialize technical objects
$object = new Holiday ( $db );
$extrafields = new ExtraFields ( $db );
//$diroutputmassaction = $conf->mymodule->dir_output . '/temp/massgeneration/'.$user->id;
2020-04-10 10:59:32 +02:00
$hookmanager -> initHooks ( array ( 'leavemovementlist' )); // Note that conf->hooks_modules contains array
2019-02-08 13:26:59 +01:00
2020-04-10 10:59:32 +02:00
$arrayfields = array ();
$arrayofmassactions = array ();
2019-02-08 13:26:59 +01:00
/*
* Actions
*/
2020-04-10 10:59:32 +02:00
if ( GETPOST ( 'cancel' , 'alpha' )) { $action = 'list' ; $massaction = '' ; }
if ( ! GETPOST ( 'confirmmassaction' , 'alpha' ) && $massaction != 'presend' && $massaction != 'confirm_presend' ) { $massaction = '' ; }
2019-02-08 13:26:59 +01:00
2020-04-10 10:59:32 +02:00
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'doActions' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2019-02-08 13:26:59 +01:00
if ( $reshook < 0 ) setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
if ( empty ( $reshook ))
2014-08-06 03:09:59 +02:00
{
2019-02-08 13:26:59 +01:00
// Selection of new fields
include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php' ;
// Purge search criteria
2020-04-10 10:59:32 +02:00
if ( GETPOST ( 'button_removefilter_x' , 'alpha' ) || GETPOST ( 'button_removefilter.x' , 'alpha' ) || GETPOST ( 'button_removefilter' , 'alpha' )) // All tests are required to be compatible with all browsers
2019-02-08 13:26:59 +01:00
{
2020-04-10 10:59:32 +02:00
$search_id = '' ;
$toselect = '' ;
$search_array_options = array ();
2019-02-08 13:26:59 +01:00
}
2020-06-25 14:37:09 +02:00
if ( GETPOST ( 'button_removefilter_x' , 'alpha' )
|| GETPOST ( 'button_removefilter.x' , 'alpha' )
|| GETPOST ( 'button_removefilter' , 'alpha' )
|| GETPOST ( 'button_search_x' , 'alpha' )
|| GETPOST ( 'button_search.x' , 'alpha' )
|| GETPOST ( 'button_search' , 'alpha' ))
2019-02-08 13:26:59 +01:00
{
2020-04-10 10:59:32 +02:00
$massaction = '' ; // Protection to avoid mass action if we force a new search during a mass action confirmation
2019-02-08 13:26:59 +01:00
}
// Mass actions
/* $objectclass = 'MyObject' ;
$objectlabel = 'MyObject' ;
2019-11-04 15:33:49 +01:00
$permissiontoread = $user -> rights -> mymodule -> read ;
$permissiontodelete = $user -> rights -> mymodule -> delete ;
2019-02-08 13:26:59 +01:00
$uploaddir = $conf -> mymodule -> dir_output ;
include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php' ;
*/
2014-08-06 03:09:59 +02:00
}
2012-09-05 03:26:57 +02:00
2015-06-27 11:45:23 +02:00
2020-06-25 14:36:42 +02:00
// Definition of fields for lists
$arrayfields = array (
'cpl.rowid' => array ( 'label' => $langs -> trans ( " ID " ), 'checked' => 1 ),
'cpl.date_action' => array ( 'label' => $langs -> trans ( " Date " ), 'checked' => 1 ),
'cpl.fk_user_action' => array ( 'label' => $langs -> trans ( " ActionByCP " ), 'checked' => 1 ),
'cpl.fk_user_update' => array ( 'label' => $langs -> trans ( " UserUpdateCP " ), 'checked' => 1 ),
'cpl.type_action' => array ( 'label' => $langs -> trans ( " Description " ), 'checked' => 1 ),
'cpl.fk_type' => array ( 'label' => $langs -> trans ( " Type " ), 'checked' => 1 ),
'cpl.prev_solde' => array ( 'label' => $langs -> trans ( " PrevSoldeCP " ), 'checked' => 1 ),
'variation' => array ( 'label' => $langs -> trans ( " Variation " ), 'checked' => 1 ),
'cpl.new_solde' => array ( 'label' => $langs -> trans ( " NewSoldeCP " ), 'checked' => 1 ),
);
2012-09-05 03:26:57 +02:00
/*
* View
2014-08-05 17:45:41 +02:00
*/
2012-09-05 03:26:57 +02:00
2019-02-08 13:26:59 +01:00
$form = new Form ( $db );
2013-04-30 00:26:37 +02:00
2020-04-10 10:59:32 +02:00
$alltypeleaves = $object -> getTypes ( 1 , - 1 ); // To have labels
2016-07-01 17:53:16 +02:00
2016-04-09 16:04:07 +02:00
llxHeader ( '' , $langs -> trans ( 'CPTitreMenu' ) . ' (' . $langs -> trans ( " Year " ) . ' ' . $year . ')' );
2012-09-05 03:26:57 +02:00
2020-06-25 14:37:09 +02:00
$sqlwhere = " AND date_action BETWEEN " .
$sqlwhere .= " ' " . $db -> idate ( dol_get_first_day ( $year , 1 , 1 )) . " ' " ;
$sqlwhere .= " AND " ;
$sqlwhere .= " ' " . $db -> idate ( dol_get_last_day ( $year , 12 , 1 )) . " ' " ;
2019-02-08 13:26:59 +01:00
2020-06-25 14:36:42 +02:00
if ( $search_id != '' ) $sqlwhere .= natural_search ( 'rowid' , $search_id , 1 );
if ( $search_prev_solde != '' ) $sqlwhere .= natural_search ( 'prev_solde' , $search_prev_solde , 1 );
if ( $search_new_solde != '' ) $sqlwhere .= natural_search ( 'new_solde' , $search_new_solde , 1 );
2019-02-08 13:26:59 +01:00
2020-06-25 14:36:42 +02:00
$sqlorder = $db -> order ( $sortfield , $sortorder );
2019-02-08 13:26:59 +01:00
2014-08-05 17:45:41 +02:00
// Recent changes are more important than old changes
2020-04-10 10:59:32 +02:00
$log_holiday = $object -> fetchLog ( $sqlorder , $sqlwhere ); // Load $object->logs
2019-02-08 13:26:59 +01:00
2020-04-10 10:59:32 +02:00
$param = '' ;
if ( ! empty ( $contextpage ) && $contextpage != $_SERVER [ " PHP_SELF " ]) $param .= '&contextpage=' . urlencode ( $contextpage );
if ( $limit > 0 && $limit != $conf -> liste_limit ) $param .= '&limit=' . urlencode ( $limit );
if ( $search_id ) $param = '&search_id=' . urlencode ( $search_id );
2012-09-05 03:26:57 +02:00
2019-02-08 13:26:59 +01:00
print '<form method="POST" id="searchFormList" action="' . $_SERVER [ " PHP_SELF " ] . '">' ;
if ( $optioncss != '' ) print '<input type="hidden" name="optioncss" value="' . $optioncss . '">' ;
2019-12-18 23:12:31 +01:00
print '<input type="hidden" name="token" value="' . newToken () . '">' ;
2019-02-08 13:26:59 +01:00
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">' ;
print '<input type="hidden" name="action" value="list">' ;
print '<input type="hidden" name="sortfield" value="' . $sortfield . '">' ;
print '<input type="hidden" name="sortorder" value="' . $sortorder . '">' ;
print '<input type="hidden" name="page" value="' . $page . '">' ;
print '<input type="hidden" name="contextpage" value="' . $contextpage . '">' ;
2020-06-25 14:37:09 +02:00
$pagination = '<div class="pagination">' ;
$pagination .= '<ul>' ;
$pagination .= '<li class="pagination">' ;
$pagination .= '<a href="' . $_SERVER [ " PHP_SELF " ] . '?year=' . ( $year - 1 ) . $param . '">' ;
$pagination .= '<i class="fa fa-chevron-left" title="Previous"></i>' ;
$pagination .= '</a>' ;
$pagination .= '<li class="pagination">' ;
$pagination .= '<span class="active">' . $langs -> trans ( " Year " ) . ' ' . $year . '</span>' ;
$pagination .= '</li>' ;
$pagination .= '<li class="pagination">' ;
$pagination .= '<a href="' . $_SERVER [ " PHP_SELF " ] . '?year=' . ( $year + 1 ) . $param . '">' ;
$pagination .= '<i class="fa fa-chevron-right" title="Next"></i>' ;
$pagination .= '</a>' ;
$pagination .= '</li>' ;
$pagination .= '</li>' ;
$pagination .= '</ul>' ;
$pagination .= '</div>' ;
2017-06-10 22:57:25 +02:00
print load_fiche_titre ( $langs -> trans ( 'LogCP' ), $pagination , 'title_hrm.png' );
2012-09-05 03:26:57 +02:00
2015-06-27 11:45:23 +02:00
print '<div class="info">' . $langs -> trans ( 'LastUpdateCP' ) . ': ' . " \n " ;
2020-06-25 14:37:09 +02:00
2019-02-08 13:26:59 +01:00
$lastUpdate = $object -> getConfCP ( 'lastUpdate' );
2016-07-14 15:31:56 +02:00
if ( $lastUpdate )
{
$monthLastUpdate = $lastUpdate [ 4 ] . $lastUpdate [ 5 ];
$yearLastUpdate = $lastUpdate [ 0 ] . $lastUpdate [ 1 ] . $lastUpdate [ 2 ] . $lastUpdate [ 3 ];
2019-02-08 13:26:59 +01:00
print '<strong>' . dol_print_date ( $db -> jdate ( $object -> getConfCP ( 'lastUpdate' )), 'dayhour' , 'tzuser' ) . '</strong>' ;
2016-07-14 15:31:56 +02:00
print '<br>' . $langs -> trans ( " MonthOfLastMonthlyUpdate " ) . ': <strong>' . $yearLastUpdate . '-' . $monthLastUpdate . '</strong>' . " \n " ;
2020-06-25 14:37:09 +02:00
}
2020-06-25 14:44:57 +02:00
else {
2020-06-25 14:37:09 +02:00
print $langs -> trans ( 'None' );
}
2015-06-27 11:45:23 +02:00
print " </div><br> \n " ;
2020-04-10 10:59:32 +02:00
$moreforfilter = '' ;
2016-11-27 13:49:46 +01:00
2020-04-10 10:59:32 +02:00
$varpage = empty ( $contextpage ) ? $_SERVER [ " PHP_SELF " ] : $contextpage ;
$selectedfields = '' ;
2020-06-25 14:36:42 +02:00
$selectedfields = $form -> multiSelectArrayWithCheckbox ( 'selectedfields' , $arrayfields , $varpage ); // This also change content of $arrayfields
$selectedfields .= ( count ( $arrayofmassactions ) ? $form -> showCheckAddButtons ( 'checkforselect' , 1 ) : '' );
2019-02-08 13:26:59 +01:00
2016-11-27 13:49:46 +01:00
print '<div class="div-table-responsive">' ;
2020-04-10 10:59:32 +02:00
print '<table class="tagtable liste' . ( $moreforfilter ? " listwithfilterbefore " : " " ) . '" id="tablelines3">' . " \n " ;
2016-11-27 13:49:46 +01:00
2012-09-05 03:26:57 +02:00
print '<tbody>' ;
2016-12-22 16:09:12 +01:00
print '<tr class="liste_titre">' ;
2020-06-25 14:36:42 +02:00
if ( ! empty ( $arrayfields [ 'cpl.rowid' ][ 'checked' ])) print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_id" value="' . $search_id . '"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.date_action' ][ 'checked' ])) print '<td class="liste_titre"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.fk_user_action' ][ 'checked' ])) print '<td class="liste_titre"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.fk_user_update' ][ 'checked' ])) print '<td class="liste_titre"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.type_action' ][ 'checked' ])) print '<td class="liste_titre"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.fk_type' ][ 'checked' ])) print '<td class="liste_titre"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.prev_solde' ][ 'checked' ])) print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_prev_solde" value="' . $search_prev_solde . '"></td>' ;
if ( ! empty ( $arrayfields [ 'variation' ][ 'checked' ])) print '<td class="liste_titre"></td>' ;
if ( ! empty ( $arrayfields [ 'cpl.new_solde' ][ 'checked' ])) print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_new_solde" value="' . $search_new_solde . '"></td>' ;
2019-02-08 13:26:59 +01:00
// Action column
2019-05-19 13:51:47 +02:00
print '<td class="liste_titre maxwidthsearch">' ;
2020-04-10 10:59:32 +02:00
$searchpicto = $form -> showFilterButtons ();
2019-02-08 13:26:59 +01:00
print $searchpicto ;
print '</td>' ;
2012-09-05 03:26:57 +02:00
print '</tr>' ;
2016-12-22 16:09:12 +01:00
2017-06-10 22:57:25 +02:00
print '<tr class="liste_titre">' ;
2020-06-25 14:36:42 +02:00
if ( ! empty ( $arrayfields [ 'cpl.rowid' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.rowid' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'rowid' , '' , '' , '' , $sortfield , $sortorder );
if ( ! empty ( $arrayfields [ 'cpl.date_action' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.date_action' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'date_action' , '' , '' , '' , $sortfield , $sortorder , 'center ' );
if ( ! empty ( $arrayfields [ 'cpl.fk_user_action' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.fk_user_action' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'fk_user_action' , '' , '' , '' , $sortfield , $sortorder );
if ( ! empty ( $arrayfields [ 'cpl.fk_user_update' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.fk_user_update' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'fk_user_update' , '' , '' , '' , $sortfield , $sortorder );
if ( ! empty ( $arrayfields [ 'cpl.type_action' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.type_action' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'type_action' , '' , '' , '' , $sortfield , $sortorder );
if ( ! empty ( $arrayfields [ 'cpl.fk_type' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.fk_type' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'fk_type' , '' , '' , '' , $sortfield , $sortorder );
if ( ! empty ( $arrayfields [ 'cpl.prev_solde' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.prev_solde' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'prev_solde' , '' , '' , '' , $sortfield , $sortorder , 'right ' );
if ( ! empty ( $arrayfields [ 'variation' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'variation' ][ 'label' ], $_SERVER [ " PHP_SELF " ], '' , '' , '' , '' , $sortfield , $sortorder , 'right ' );
if ( ! empty ( $arrayfields [ 'cpl.new_solde' ][ 'checked' ])) print_liste_field_titre ( $arrayfields [ 'cpl.new_solde' ][ 'label' ], $_SERVER [ " PHP_SELF " ], 'new_solde' , '' , '' , '' , $sortfield , $sortorder , 'right ' );
2019-03-10 09:32:19 +01:00
print getTitleFieldOfList ( $selectedfields , 0 , $_SERVER [ " PHP_SELF " ], '' , '' , '' , '' , $sortfield , $sortorder , 'center maxwidthsearch ' ) . " \n " ;
2017-06-10 22:57:25 +02:00
print '</tr>' ;
2016-12-22 16:09:12 +01:00
2012-09-05 03:26:57 +02:00
2020-04-10 10:59:32 +02:00
foreach ( $object -> logs as $logs_CP )
2012-09-05 03:26:57 +02:00
{
2020-06-25 14:37:09 +02:00
$user_action = new User ( $db );
$user_action -> fetch ( $logs_CP [ 'fk_user_action' ]);
2012-09-05 03:26:57 +02:00
2020-06-25 14:37:09 +02:00
$user_update = new User ( $db );
$user_update -> fetch ( $logs_CP [ 'fk_user_update' ]);
2012-09-05 03:26:57 +02:00
2020-06-25 14:37:09 +02:00
$delta = price2num ( $logs_CP [ 'new_solde' ] - $logs_CP [ 'prev_solde' ], 5 );
$detasign = ( $delta > 0 ? '+' : '' );
2019-02-08 13:26:59 +01:00
2020-06-25 14:37:09 +02:00
print '<tr class="oddeven">' ;
if ( ! empty ( $arrayfields [ 'cpl.rowid' ][ 'checked' ])) print '<td>' . $logs_CP [ 'rowid' ] . '</td>' ;
if ( ! empty ( $arrayfields [ 'cpl.date_action' ][ 'checked' ])) print '<td style="text-align: center;">' . $logs_CP [ 'date_action' ] . '</td>' ;
if ( ! empty ( $arrayfields [ 'cpl.fk_user_action' ][ 'checked' ])) print '<td>' . $user_action -> getNomUrl ( - 1 ) . '</td>' ;
if ( ! empty ( $arrayfields [ 'cpl.fk_user_update' ][ 'checked' ])) print '<td>' . $user_update -> getNomUrl ( - 1 ) . '</td>' ;
2020-06-25 14:36:42 +02:00
if ( ! empty ( $arrayfields [ 'cpl.type_action' ][ 'checked' ])) print '<td>' . $logs_CP [ 'type_action' ] . '</td>' ;
if ( ! empty ( $arrayfields [ 'cpl.fk_type' ][ 'checked' ]))
{
print '<td>' ;
$label = (( $alltypeleaves [ $logs_CP [ 'fk_type' ]][ 'code' ] && $langs -> trans ( $alltypeleaves [ $logs_CP [ 'fk_type' ]][ 'code' ]) != $alltypeleaves [ $logs_CP [ 'fk_type' ]][ 'code' ]) ? $langs -> trans ( $alltypeleaves [ $logs_CP [ 'fk_type' ]][ 'code' ]) : $alltypeleaves [ $logs_CP [ 'fk_type' ]][ 'label' ]);
print $label ? $label : $logs_CP [ 'fk_type' ];
print '</td>' ;
}
if ( ! empty ( $arrayfields [ 'cpl.prev_solde' ][ 'checked' ])) print '<td style="text-align: right;">' . price2num ( $logs_CP [ 'prev_solde' ], 5 ) . ' ' . $langs -> trans ( 'days' ) . '</td>' ;
if ( ! empty ( $arrayfields [ 'variation' ][ 'checked' ])) print '<td style="text-align: right;">' . $detasign . $delta . '</td>' ;
if ( ! empty ( $arrayfields [ 'cpl.new_solde' ][ 'checked' ])) print '<td style="text-align: right;">' . price2num ( $logs_CP [ 'new_solde' ], 5 ) . ' ' . $langs -> trans ( 'days' ) . '</td>' ;
2020-06-25 14:37:09 +02:00
print '<td></td>' ;
print '</tr>' . " \n " ;
2012-09-05 03:26:57 +02:00
}
2016-01-09 01:18:53 +01:00
if ( $log_holiday == '2' )
2012-09-05 03:26:57 +02:00
{
2019-02-08 13:26:59 +01:00
print '<tr class="opacitymedium">' ;
print '<td colspan="10" class="opacitymedium">' . $langs -> trans ( 'NoRecordFound' ) . '</td>' ;
2012-09-05 03:26:57 +02:00
print '</tr>' ;
}
print '</tbody>' . " \n " ;
print '</table>' . " \n " ;
2016-11-27 13:49:46 +01:00
print '</div>' ;
2012-09-05 03:26:57 +02:00
2019-02-08 13:26:59 +01:00
print '</form>' ;
2018-08-13 10:20:21 +02:00
// End of page
2012-09-05 03:26:57 +02:00
llxFooter ();
2015-06-27 11:45:23 +02:00
$db -> close ();