':
- print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
- $j++;
- if ($j < $nbofsalesrepresentative) {
- print ' ';
+ }
+
+ // Type
+ if (!empty($arrayfields['f.type']['checked'])) {
+ print '
';
+ print $facturestatic->getLibType(2);
+ 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
+ if (!empty($arrayfields['f.date_valid']['checked'])) {
+ print '
';
+ print dol_print_date($db->jdate($obj->date_valid), '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 ref
+ if (!empty($arrayfields['p.ref']['checked'])) {
+ print '
';
+ if ($obj->project_id > 0) {
+ print $projectstatic->getNomUrl(1);
+ }
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Project title
+ if (!empty($arrayfields['p.title']['checked'])) {
+ print '
';
+ if ($obj->project_id > 0) {
+ print dol_escape_htmltag($projectstatic->title);
+ }
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Third party
+ if (!empty($arrayfields['s.nom']['checked'])) {
+ print '
';
+ if ($contextpage == 'poslist') {
+ print dol_escape_htmltag($companystatic->name);
+ } else {
+ print $companystatic->getNomUrl(1, 'customer', 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($companystatic->name_alias);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Parent company
+ if (!empty($arrayfields['s2.nom']['checked'])) {
+ print '
';
+ if ($obj->fk_parent > 0) {
+ if (!isset($company_url_list[$obj->fk_parent])) {
+ $companyparent = new Societe($db);
+ $res = $companyparent->fetch($obj->fk_parent);
+ if ($res > 0) {
+ $company_url_list[$obj->fk_parent] = $companyparent->getNomUrl(1);
}
- //print '';
+ }
+ if (isset($company_url_list[$obj->fk_parent])) {
+ print $company_url_list[$obj->fk_parent];
}
}
- //else print $langs->trans("NoSalesRepresentativeAffected");
- } else {
- print ' ';
+ print " ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- 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 "
".dol_escape_htmltag($obj->state_name)." \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 (!is_array($typenArray) || count($typenArray) == 0) {
+ $typenArray = $formcompany->typent_array(1);
+ }
+ print $typenArray[$obj->typent_code];
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Staff
+ if (!empty($arrayfields['staff.code']['checked'])) {
+ print '
';
+ if (!is_array($conf->cache['staff']) || count($conf->cache['staff']) == 0) {
+ $conf->cache['staff'] = $formcompany->effectif_array(1);
+ }
+ print $conf->cache['staff'][$obj->staff_code];
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- if (!empty($arrayfields['f.retained_warranty']['checked'])) {
- print '
'.(!empty($obj->retained_warranty) ? price($obj->retained_warranty).'%' : ' ').' ';
- }
+ // 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 $s;
+ print ' ';
+ 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']++;
+ // Payment terms
+ if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
+ $s = $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 0, '', -1, -1, 1);
+ print '
';
+ print $s;
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'totalam';
- }
- $totalarray['val']['totalam'] += $totalpay;
- }
- // Pending amount
- if (!empty($arrayfields['rtp']['checked'])) {
- print '
';
- print (!empty($remaintopay) ? price($remaintopay, 0, $langs) : ' ');
- print ' '; // TODO Use a denormalized field
- if (!$i) {
- $totalarray['nbfield']++;
+ // Module Source
+ if (!empty($arrayfields['f.module_source']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($obj->module_source);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'rtp';
- }
- $totalarray['val']['rtp'] += $remaintopay;
- }
+ // POS Terminal
+ if (!empty($arrayfields['f.pos_source']['checked'])) {
+ print '
';
+ print dol_escape_htmltag($obj->pos_source);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
- // Currency
- if (!empty($arrayfields['f.multicurrency_code']['checked'])) {
- print '
';
- if (empty($conf->global->MAIN_SHOW_ONLY_CODE_MULTICURRENCY)) {
- print $langs->transnoentitiesnoconv('Currency'.$obj->multicurrency_code);
- } else {
- print dol_escape_htmltag($obj->multicurrency_code);
+ // 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;
}
- print "\n";
- if (!$i) {
- $totalarray['nbfield']++;
+ // Amount VAT
+ if (!empty($arrayfields['f.total_tva']['checked'])) {
+ print '
'.price($obj->total_tva)." \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'f.total_tva';
+ }
+ $totalarray['val']['f.total_tva'] += $obj->total_tva;
+ }
+ // 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;
}
- }
- // 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']++;
- }
- }
+ $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;
- // 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']++;
- }
- }
-
- // Total buying or cost price
- if (!empty($arrayfields['total_pa']['checked'])) {
- print '
'.price($marginInfo['pa_total']).' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Total margin
- if (!empty($arrayfields['total_margin']['checked'])) {
- print '
'.price($marginInfo['total_margin']).' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'total_margin';
- }
- $totalarray['val']['total_margin'] += $marginInfo['total_margin'];
- }
- // Total margin rate
- if (!empty($arrayfields['total_margin_rate']['checked'])) {
- print '
'.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Total mark rate
- if (!empty($arrayfields['total_mark_rate']['checked'])) {
- print '
'.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate';
- }
- if ($i >= $imaxinloop - 1) {
- if (!empty($total_ht)) {
- $totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT');
+ // Author
+ if (!empty($arrayfields['u.login']['checked'])) {
+ print '
';
+ if ($userstatic->id) {
+ print $userstatic->getNomUrl(-1);
} else {
- $totalarray['val']['total_mark_rate'] = '';
+ print ' ';
+ }
+ print " \n";
+ 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']++;
- }
- }
- // Date closing
- if (!empty($arrayfields['f.date_closing']['checked'])) {
- print '
';
- print dol_print_date($db->jdate($obj->date_closing), 'dayhour', 'tzuser');
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Note public
- if (!empty($arrayfields['f.note_public']['checked'])) {
- print '
';
- print dol_string_nohtmltag($obj->note_public);
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Note private
- if (!empty($arrayfields['f.note_private']['checked'])) {
- print '
';
- print dol_string_nohtmltag($obj->note_private);
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Template Invoice
- if (!empty($arrayfields['f.fk_fac_rec_source']['checked'])) {
- print '
';
- if (!empty($obj->fk_fac_rec_source)) {
- $facrec = new FactureRec($db);
- $result = $facrec->fetch($obj->fk_fac_rec_source);
- if ($result < 0) {
- setEventMessages($facrec->error, $facrec->errors, 'errors');
+ if (!empty($arrayfields['sale_representative']['checked'])) {
+ // Sales representatives
+ print ' ';
+ if ($obj->socid > 0) {
+ $listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
+ if ($listsalesrepresentatives < 0) {
+ dol_print_error($db);
+ }
+ $nbofsalesrepresentative = count($listsalesrepresentatives);
+ if ($nbofsalesrepresentative > 6) {
+ // We print only number
+ print $nbofsalesrepresentative;
+ } elseif ($nbofsalesrepresentative > 0) {
+ $j = 0;
+ foreach ($listsalesrepresentatives as $val) {
+ $userstatic->id = $val['id'];
+ $userstatic->lastname = $val['lastname'];
+ $userstatic->firstname = $val['firstname'];
+ $userstatic->email = $val['email'];
+ $userstatic->statut = $val['statut'];
+ $userstatic->entity = $val['entity'];
+ $userstatic->photo = $val['photo'];
+ $userstatic->login = $val['login'];
+ $userstatic->office_phone = $val['office_phone'];
+ $userstatic->office_fax = $val['office_fax'];
+ $userstatic->user_mobile = $val['user_mobile'];
+ $userstatic->job = $val['job'];
+ $userstatic->gender = $val['gender'];
+ //print '':
+ print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
+ $j++;
+ if ($j < $nbofsalesrepresentative) {
+ print ' ';
+ }
+ //print '
';
+ }
+ }
+ //else print $langs->trans("NoSalesRepresentativeAffected");
} else {
- print $facrec->getNomUrl();
+ print ' ';
+ }
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
}
- print '';
+
+ if (!empty($arrayfields['f.retained_warranty']['checked'])) {
+ print '
'.(!empty($obj->retained_warranty) ? price($obj->retained_warranty).'%' : ' ').' ';
+ }
+
+ 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;
+ }
+
+ // Pending amount
+ if (!empty($arrayfields['rtp']['checked'])) {
+ print '
';
+ print (!empty($remaintopay) ? price($remaintopay, 0, $langs) : ' ');
+ print ' '; // 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 '
';
+ if (empty($conf->global->MAIN_SHOW_ONLY_CODE_MULTICURRENCY)) {
+ print $langs->transnoentitiesnoconv('Currency'.$obj->multicurrency_code);
+ } else {
+ print dol_escape_htmltag($obj->multicurrency_code);
+ }
+ print " \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']++;
+ }
+ }
+
+ // Total buying or cost price
+ if (!empty($arrayfields['total_pa']['checked'])) {
+ print '
'.price($marginInfo['pa_total']).' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Total margin
+ if (!empty($arrayfields['total_margin']['checked'])) {
+ print '
'.price($marginInfo['total_margin']).' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'total_margin';
+ }
+ $totalarray['val']['total_margin'] += $marginInfo['total_margin'];
+ }
+ // Total margin rate
+ if (!empty($arrayfields['total_margin_rate']['checked'])) {
+ print '
'.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Total mark rate
+ if (!empty($arrayfields['total_mark_rate']['checked'])) {
+ print '
'.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate';
+ }
+ if ($i >= $imaxinloop - 1) {
+ if (!empty($total_ht)) {
+ $totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT');
+ } else {
+ $totalarray['val']['total_mark_rate'] = '';
+ }
+ }
+ }
+
+ // 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']++;
+ }
+ }
+ // Date closing
+ if (!empty($arrayfields['f.date_closing']['checked'])) {
+ print '
';
+ print dol_print_date($db->jdate($obj->date_closing), 'dayhour', 'tzuser');
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Note public
+ if (!empty($arrayfields['f.note_public']['checked'])) {
+ print '
';
+ print dol_string_nohtmltag($obj->note_public);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Note private
+ if (!empty($arrayfields['f.note_private']['checked'])) {
+ print '
';
+ print dol_string_nohtmltag($obj->note_private);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Template Invoice
+ if (!empty($arrayfields['f.fk_fac_rec_source']['checked'])) {
+ print '
';
+ if (!empty($obj->fk_fac_rec_source)) {
+ $facrec = new FactureRec($db);
+ $result = $facrec->fetch($obj->fk_fac_rec_source);
+ if ($result < 0) {
+ setEventMessages($facrec->error, $facrec->errors, 'errors');
+ } else {
+ print $facrec->getNomUrl();
+ }
+ }
+ 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 (Show the massaction button only when this page is not opend from the Extended POS)
+
+ if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ print '
';
+ if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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->id, $arrayofselected)) {
+ $selected = 1;
+ }
+ print ' ';
+ }
+ print ' ';
+ }
if (!$i) {
$totalarray['nbfield']++;
}
+ print "