3if (!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;
10if (isset($totalarray[
'pos'])) {
11 print
'<tr class="liste_total">';
13 while ($i < $totalarray[
'nbfield']) {
15 if (!empty($totalarray[
'pos'][$i])) {
16 switch ($totalarray[
'pos'][$i]) {
18 print
'<td class="right">';
19 print (!empty($totalarray[
'val'][$totalarray[
'pos'][$i]]) ?
convertSecondToTime($totalarray[
'val'][$totalarray[
'pos'][$i]],
'allhourmin') : 0);
23 print
'<td class="left">';
24 print (!empty($totalarray[
'val'][$totalarray[
'pos'][$i]]) ? $totalarray[
'val'][$totalarray[
'pos'][$i]] :
'');
28 print
'<td class="right">';
29 print
price2num(!empty($totalarray[
'val'][$totalarray[
'pos'][$i]]) ? $totalarray[
'val'][$totalarray[
'pos'][$i]] : 0,
'MS');
33 print
'<td class="right">';
34 print
price(!empty($totalarray[
'val'][$totalarray[
'pos'][$i]]) ? $totalarray[
'val'][$totalarray[
'pos'][$i]] : 0);
40 if (is_null($limit) || $num < $limit) {
41 print
'<td>'.$langs->trans(
"Total").
'</td>';
44 if (is_object($form)) {
45 print $form->textwithpicto($langs->trans(
"Total"), $langs->transnoentitiesnoconv(
"Totalforthispage"));
47 print $langs->trans(
"Totalforthispage");
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
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.