';
+ }
+ // Output Kanban
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($object->id, $arrayofselected)) {
+ $selected = 1;
}
}
- if ($mode == 'kanban') {
- if ($i == 0) {
- print '
| ';
- print ' ';
- }
- // Output Kanban
- $facturestatic->socid = $thirdparty->getNomUrl(1, 'supplier', 3);
- $facturestatic->total_ht = $obj->total_ht;
- $facturestatic->date = $obj->datef;
- print $facturestatic->getKanbanView('');
- if ($i == ($imaxinloop - 1)) {
- print ' ';
- print ' |
';
- }
- } else {
- print '
';
- // Action column
- if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
- print '| ';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->facid, $arrayofselected)) {
- $selected = 1;
- }
- print '';
+ $arraydata = array('alreadypaid' => $paiement);
+ print $facturestatic->getKanbanView('', $arraydata);
+ if ($i == ($imaxinloop - 1)) {
+ print '';
+ print ' |
';
+ }
+ } else {
+ // Show here line of result
+ $j = 0;
+ print '
';
+ // Action column
+ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
+ print '| ';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->facid, $arrayofselected)) {
+ $selected = 1;
}
- print ' | ';
+ print '';
}
- if (!empty($arrayfields['f.ref']['checked'])) {
- print '';
+ print ' | ';
+ }
+ if (!empty($arrayfields['f.ref']['checked'])) {
+ print '';
- print '';
- // Picto + Ref
- print '';
- print $facturestatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
+ print '';
+ // Picto + Ref
+ print '| ';
+ print $facturestatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
- $filename = dol_sanitizeFileName($obj->ref);
- $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
- $subdir = get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
- print $formfile->getDocumentsLink('facture_fournisseur', $subdir, $filedir);
- print ' | ';
+ $filename = dol_sanitizeFileName($obj->ref);
+ $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
+ $subdir = get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
+ print $formfile->getDocumentsLink('facture_fournisseur', $subdir, $filedir);
+ print ' | ';
- print " | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Supplier ref
- if (!empty($arrayfields['f.ref_supplier']['checked'])) {
- print '';
- print $obj->ref_supplier;
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Type
- if (!empty($arrayfields['f.type']['checked'])) {
- print '';
- print $facturestatic->getLibType();
- print " | ";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Label
- if (!empty($arrayfields['f.label']['checked'])) {
- print '';
- print dol_escape_htmltag($obj->label);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Date
- if (!empty($arrayfields['f.datef']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->datef), 'day');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Date limit
- if (!empty($arrayfields['f.date_lim_reglement']['checked'])) {
- print ''.dol_print_date($datelimit, 'day');
- if ($facturestatic->hasDelay()) {
- print img_warning($langs->trans('Alert').' - '.$langs->trans('Late'));
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Project
- if (!empty($arrayfields['p.ref']['checked'])) {
- print '';
- if ($obj->project_id > 0) {
- $projectstatic->id = $obj->project_id;
- $projectstatic->ref = $obj->project_ref;
- $projectstatic->title = $obj->project_label;
- print $projectstatic->getNomUrl(1);
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Third party
- if (!empty($arrayfields['s.nom']['checked'])) {
- print '';
- print $thirdparty->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Alias
- if (!empty($arrayfields['s.name_alias']['checked'])) {
- print '';
- print dol_escape_htmltag($thirdparty->name_alias);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Town
- if (!empty($arrayfields['s.town']['checked'])) {
- print '';
- print dol_escape_htmltag($obj->town);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Zip
- if (!empty($arrayfields['s.zip']['checked'])) {
- print '';
- print dol_escape_htmltag($obj->zip);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // State
- if (!empty($arrayfields['state.nom']['checked'])) {
- print '';
- print dol_escape_htmltag($obj->state_name);
- print " | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Country
- if (!empty($arrayfields['country.code_iso']['checked'])) {
- print '';
- $tmparray = getCountry($obj->fk_pays, 'all');
- print $tmparray['label'];
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Type ent
- if (!empty($arrayfields['typent.code']['checked'])) {
- print '';
- if (empty($typenArray)) {
- $typenArray = $formcompany->typent_array(1);
- }
- print $typenArray[$obj->typent_code];
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Payment condition
- if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
- $s = $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 1, '', -1, -1, 1);
- print '';
- print dol_escape_htmltag($s);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Payment mode
- if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
- $s = $form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1, 0, '', 1);
- print '';
- print dol_escape_htmltag($s);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Amount HT
- if (!empty($arrayfields['f.total_ht']['checked'])) {
- print ''.price($obj->total_ht)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
- }
- $totalarray['val']['f.total_ht'] += $obj->total_ht;
- }
- // Amount VAT
- if (!empty($arrayfields['f.total_vat']['checked'])) {
- print ''.price($obj->total_vat)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat';
- }
- $totalarray['val']['f.total_vat'] += $obj->total_vat;
- }
- // Amount LocalTax1
- if (!empty($arrayfields['f.total_localtax1']['checked'])) {
- print ''.price($obj->total_localtax1)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax1';
- }
- $totalarray['val']['f.total_localtax1'] += $obj->total_localtax1;
- }
- // Amount LocalTax2
- if (!empty($arrayfields['f.total_localtax2']['checked'])) {
- print ''.price($obj->total_localtax2)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax2';
- }
- $totalarray['val']['f.total_localtax2'] += $obj->total_localtax2;
- }
- // Amount TTC
- if (!empty($arrayfields['f.total_ttc']['checked'])) {
- print ''.price($obj->total_ttc)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ttc';
- }
- $totalarray['val']['f.total_ttc'] += $obj->total_ttc;
- }
-
- $userstatic->id = $obj->fk_user_author;
- $userstatic->login = $obj->login;
- $userstatic->lastname = $obj->lastname;
- $userstatic->firstname = $obj->firstname;
- $userstatic->email = $obj->user_email;
- $userstatic->statut = $obj->user_statut;
- $userstatic->entity = $obj->entity;
- $userstatic->photo = $obj->photo;
- $userstatic->office_phone = $obj->office_phone;
- $userstatic->office_fax = $obj->office_fax;
- $userstatic->user_mobile = $obj->user_mobile;
- $userstatic->job = $obj->job;
- $userstatic->gender = $obj->gender;
-
- // Author
- if (!empty($arrayfields['u.login']['checked'])) {
- print '';
- if ($userstatic->id) {
- print $userstatic->getLoginUrl(-1);
- } else {
- print ' ';
- }
- print " | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- if (!empty($arrayfields['dynamount_payed']['checked'])) {
- print ''.(!empty($totalpay) ?price($totalpay, 0, $langs) : '').' | '; // TODO Use a denormalized field
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'totalam';
- }
- $totalarray['val']['totalam'] += $totalpay;
- }
-
- if (!empty($arrayfields['rtp']['checked'])) {
- print ''.(!empty($remaintopay) ?price($remaintopay, 0, $langs) : ' ').' | '; // TODO Use a denormalized field
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'rtp';
- }
- $totalarray['val']['rtp'] += $remaintopay;
- }
-
- // Currency
- if (!empty($arrayfields['f.multicurrency_code']['checked'])) {
- print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Currency rate
- if (!empty($arrayfields['f.multicurrency_tx']['checked'])) {
- print '';
- $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
- print " | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Amount HT
- if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
- print ''.price($obj->multicurrency_total_ht)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Amount VAT
- if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) {
- print ''.price($obj->multicurrency_total_vat)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Amount TTC
- if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) {
- print ''.price($obj->multicurrency_total_ttc)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) {
- print ''.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : '').' | '; // TODO Use a denormalized field
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Pending amount
- if (!empty($arrayfields['multicurrency_rtp']['checked'])) {
- print '';
- print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : '');
- print ' | '; // TODO Use a denormalized field
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
-
- // Extra fields
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
- // Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
- $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
-
- // Date creation
- if (!empty($arrayfields['f.datec']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Date modification
- if (!empty($arrayfields['f.tms']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Status
- if (!empty($arrayfields['f.fk_statut']['checked'])) {
- print '';
- print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $paiement, $obj->type);
- print " | ";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Action column
- if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
- print '';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->facid, $arrayofselected)) {
- $selected = 1;
- }
- print '';
- }
- print ' | ';
- }
+ print "\n";
if (!$i) {
$totalarray['nbfield']++;
}
-
- print "
\n";
}
- $i++;
+ // Supplier ref
+ if (!empty($arrayfields['f.ref_supplier']['checked'])) {
+ print '
';
+ print $obj->ref_supplier;
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Type
+ if (!empty($arrayfields['f.type']['checked'])) {
+ print '
';
+ print $facturestatic->getLibType();
+ print " | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Label
+ if (!empty($arrayfields['f.label']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($obj->label);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Date
+ if (!empty($arrayfields['f.datef']['checked'])) {
+ print '
';
+ print dol_print_date($db->jdate($obj->datef), 'day');
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Date limit
+ if (!empty($arrayfields['f.date_lim_reglement']['checked'])) {
+ print '
'.dol_print_date($datelimit, 'day');
+ if ($facturestatic->hasDelay()) {
+ print img_warning($langs->trans('Alert').' - '.$langs->trans('Late'));
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Project
+ if (!empty($arrayfields['p.ref']['checked'])) {
+ print '
';
+ if ($obj->project_id > 0) {
+ $projectstatic->id = $obj->project_id;
+ $projectstatic->ref = $obj->project_ref;
+ $projectstatic->title = $obj->project_label;
+ print $projectstatic->getNomUrl(1);
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Third party
+ if (!empty($arrayfields['s.nom']['checked'])) {
+ print '
';
+ print $thirdparty->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Alias
+ if (!empty($arrayfields['s.name_alias']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($thirdparty->name_alias);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Town
+ if (!empty($arrayfields['s.town']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($obj->town);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Zip
+ if (!empty($arrayfields['s.zip']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($obj->zip);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // State
+ if (!empty($arrayfields['state.nom']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($obj->state_name);
+ print " | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Country
+ if (!empty($arrayfields['country.code_iso']['checked'])) {
+ print '
';
+ $tmparray = getCountry($obj->fk_pays, 'all');
+ print $tmparray['label'];
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Type ent
+ if (!empty($arrayfields['typent.code']['checked'])) {
+ print '
';
+ if (empty($typenArray)) {
+ $typenArray = $formcompany->typent_array(1);
+ }
+ print $typenArray[$obj->typent_code];
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Payment condition
+ if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
+ $s = $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 1, '', -1, -1, 1);
+ print '
';
+ print dol_escape_htmltag($s);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Payment mode
+ if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
+ $s = $form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1, 0, '', 1);
+ print '
';
+ print dol_escape_htmltag($s);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Amount HT
+ if (!empty($arrayfields['f.total_ht']['checked'])) {
+ print '
'.price($obj->total_ht)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
+ }
+ $totalarray['val']['f.total_ht'] += $obj->total_ht;
+ }
+ // Amount VAT
+ if (!empty($arrayfields['f.total_vat']['checked'])) {
+ print '
'.price($obj->total_vat)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat';
+ }
+ $totalarray['val']['f.total_vat'] += $obj->total_vat;
+ }
+ // Amount LocalTax1
+ if (!empty($arrayfields['f.total_localtax1']['checked'])) {
+ print '
'.price($obj->total_localtax1)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax1';
+ }
+ $totalarray['val']['f.total_localtax1'] += $obj->total_localtax1;
+ }
+ // Amount LocalTax2
+ if (!empty($arrayfields['f.total_localtax2']['checked'])) {
+ print '
'.price($obj->total_localtax2)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax2';
+ }
+ $totalarray['val']['f.total_localtax2'] += $obj->total_localtax2;
+ }
+ // Amount TTC
+ if (!empty($arrayfields['f.total_ttc']['checked'])) {
+ print '
'.price($obj->total_ttc)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ttc';
+ }
+ $totalarray['val']['f.total_ttc'] += $obj->total_ttc;
+ }
+
+ // Author
+ if (!empty($arrayfields['u.login']['checked'])) {
+ print '
';
+ if ($userstatic->id) {
+ print $userstatic->getLoginUrl(-1);
+ } else {
+ print ' ';
+ }
+ print " | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ if (!empty($arrayfields['dynamount_payed']['checked'])) {
+ print '
'.(!empty($totalpay) ?price($totalpay, 0, $langs) : '').' | '; // TODO Use a denormalized field
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'totalam';
+ }
+ $totalarray['val']['totalam'] += $totalpay;
+ }
+
+ if (!empty($arrayfields['rtp']['checked'])) {
+ print '
'.(!empty($remaintopay) ?price($remaintopay, 0, $langs) : ' ').' | '; // TODO Use a denormalized field
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'rtp';
+ }
+ $totalarray['val']['rtp'] += $remaintopay;
+ }
+
+ // Currency
+ if (!empty($arrayfields['f.multicurrency_code']['checked'])) {
+ print '
'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Currency rate
+ if (!empty($arrayfields['f.multicurrency_tx']['checked'])) {
+ print '
';
+ $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
+ print " | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Amount HT
+ if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
+ print '
'.price($obj->multicurrency_total_ht)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Amount VAT
+ if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) {
+ print '
'.price($obj->multicurrency_total_vat)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Amount TTC
+ if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) {
+ print '
'.price($obj->multicurrency_total_ttc)." | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) {
+ print '
'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : '').' | '; // TODO Use a denormalized field
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Pending amount
+ if (!empty($arrayfields['multicurrency_rtp']['checked'])) {
+ print '
';
+ print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : '');
+ print ' | '; // TODO Use a denormalized field
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+
+ // Extra fields
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
+ // Fields from hook
+ $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
+ $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
+
+ // Date creation
+ if (!empty($arrayfields['f.datec']['checked'])) {
+ print '
';
+ print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Date modification
+ if (!empty($arrayfields['f.tms']['checked'])) {
+ print '
';
+ print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Status
+ if (!empty($arrayfields['f.fk_statut']['checked'])) {
+ print '
';
+ print $facturestatic->getLibStatut(5, $paiement);
+ print " | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Action column
+ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
+ print '
';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->facid, $arrayofselected)) {
+ $selected = 1;
+ }
+ print '';
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ print '