dolibarr  7.0.0-beta
extrafields_list_print_fields.tpl.php
1 <?php
2 
3 // Protection to avoid direct call of template
4 if (empty($conf) || ! is_object($conf))
5 {
6  print "Error, template page can't be called as URL";
7  exit;
8 }
9 
10 // Loop to show all columns of extrafields from $obj, $extrafields and $db
11 if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
12 {
13  foreach($extrafields->attribute_label as $key => $val)
14  {
15  if (! empty($arrayfields["ef.".$key]['checked']))
16  {
17  $align=$extrafields->getAlignFlag($key);
18  print '<td';
19  if ($align) print ' align="'.$align.'"';
20  print '>';
21  $tmpkey='options_'.$key;
22  if (in_array($extrafields->attribute_type[$key], array('date', 'datetime', 'timestamp')))
23  {
24  $value = $db->jdate($obj->$tmpkey);
25  }
26  else
27  {
28  $value = $obj->$tmpkey;
29  }
30  print $extrafields->showOutputField($key, $value, '');
31  print '</td>';
32  if (! $i) $totalarray['nbfield']++;
33  if (! empty($val['isameasure']))
34  {
35  if (! $i) $totalarray['pos'][$totalarray['nbfield']]='ef.'.$tmpkey;
36  $totalarray['val']['ef.'.$tmpkey] += $obj->$tmpkey;
37  }
38  }
39  }
40 }
print
Draft customers invoices.
Definition: index.php:91