3 if (!empty($totalarray[
'totalizable']) && is_array($totalarray[
'totalizable'])) {
4 foreach ($totalarray[
'totalizable'] as $keytotalizable => $valtotalizable) {
5 $totalarray[
'pos'][$valtotalizable[
'pos']] = $keytotalizable;
6 $totalarray[
'val'][$keytotalizable] = isset($valtotalizable[
'total']) ? $valtotalizable[
'total'] : 0;
10 if (isset($totalarray[
'pos'])) {
11 print
'<tr class="liste_total">';
13 while ($i < $totalarray[
'nbfield']) {
15 if (!empty($totalarray[
'pos'][$i])) {
16 print
'<td class="right">';
17 if (isset($totalarray[
'type']) && $totalarray[
'type'][$i] ==
'duration') {
18 print (!empty($totalarray[
'val'][$totalarray[
'pos'][$i]])?
convertSecondToTime($totalarray[
'val'][$totalarray[
'pos'][$i]],
'allhourmin'):0);
20 print
price(!empty($totalarray[
'val'][$totalarray[
'pos'][$i]])?$totalarray[
'val'][$totalarray[
'pos'][$i]]:0);
25 if (is_null($limit) || $num < $limit) {
26 print
'<td>'.$langs->trans(
"Total").
'</td>';
29 if (is_object(
$form)) {
30 print
$form->textwithpicto($langs->trans(
"Total"), $langs->transnoentitiesnoconv(
"Totalforthispage"));
32 print $langs->trans(
"Totalforthispage");
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.