| ';
+ print ' ';
}
- print ' | ';
- }
- // Ref
- if (!empty($arrayfields['cf.ref']['checked'])) {
- print '';
- // Picto + Ref
- print $objectstatic->getNomUrl(1, '', 0, -1, 1);
- // Other picto tool
- $filename = dol_sanitizeFileName($obj->ref);
- $filedir = $conf->fournisseur->commande->dir_output.'/'.dol_sanitizeFileName($obj->ref);
- print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
-
- print ' | '."\n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Ref Supplier
- if (!empty($arrayfields['cf.ref_supplier']['checked'])) {
- print ''.dol_escape_htmltag($obj->ref_supplier).' | '."\n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Project
- if (!empty($arrayfields['cf.fk_projet']['checked'])) {
- $projectstatic->id = $obj->project_id;
- $projectstatic->ref = $obj->project_ref;
- $projectstatic->title = $obj->project_title;
- print '';
- if ($obj->project_id > 0) {
- print $projectstatic->getNomUrl(1);
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Author
- $userstatic->id = $obj->fk_user_author;
- $userstatic->lastname = $obj->lastname;
- $userstatic->firstname = $obj->firstname;
- $userstatic->login = $obj->login;
- $userstatic->photo = $obj->photo;
- $userstatic->email = $obj->user_email;
- $userstatic->statut = $obj->user_status;
- if (!empty($arrayfields['u.login']['checked'])) {
- print '';
- if ($userstatic->id) {
- print $userstatic->getNomUrl(1);
- }
- print " | ";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Thirdparty
- if (!empty($arrayfields['cf.fk_soc']['checked'])) {
- print '';
$thirdpartytmp->id = $obj->socid;
$thirdpartytmp->name = $obj->name;
$thirdpartytmp->email = $obj->email;
$thirdpartytmp->name_alias = $obj->alias;
$thirdpartytmp->client = $obj->client;
$thirdpartytmp->fournisseur = $obj->fournisseur;
- print $thirdpartytmp->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
- print ' | '."\n";
- if (!$i) {
- $totalarray['nbfield']++;
+ $objectstatic->socid = $thirdpartytmp->getNomUrl('supplier', 0, 0, -1);
+ // Output Kanban
+ print $objectstatic->getKanbanView('');
+ if ($i == (min($num, $limit) - 1)) {
+ print '';
+ print '
';
}
- }
- //alias
- if (!empty($arrayfields['s.name_alias']['checked'])) {
- 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->rowid, $arrayofselected)) {
+ $selected = 1;
+ }
+ print '';
+ }
+ print ' | ';
}
- }
- // Town
- if (!empty($arrayfields['s.town']['checked'])) {
- print '';
- print $obj->town;
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Zip
- if (!empty($arrayfields['s.zip']['checked'])) {
- print '';
- print $obj->zip;
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // State
- if (!empty($arrayfields['state.nom']['checked'])) {
- print "".$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 (empty($typenArray)) {
- $typenArray = $formcompany->typent_array(1);
- }
- print $typenArray[$obj->typent_code];
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
+ // Ref
+ if (!empty($arrayfields['cf.ref']['checked'])) {
+ print '';
- // Order date
- if (!empty($arrayfields['cf.date_commande']['checked'])) {
- print ' | ';
- print dol_print_date($db->jdate($obj->date_commande), 'day');
- if ($objectstatic->statut != $objectstatic::STATUS_ORDERSENT && $objectstatic->statut != $objectstatic::STATUS_RECEIVED_PARTIALLY) {
- if ($objectstatic->hasDelay()) {
- print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
+ // Picto + Ref
+ print $objectstatic->getNomUrl(1, '', 0, -1, 1);
+ // Other picto tool
+ $filename = dol_sanitizeFileName($obj->ref);
+ $filedir = $conf->fournisseur->commande->dir_output.'/'.dol_sanitizeFileName($obj->ref);
+ print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
+
+ print ' | '."\n";
+ if (!$i) {
+ $totalarray['nbfield']++;
}
}
- print '';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Plannned date of delivery
- if (!empty($arrayfields['cf.date_livraison']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_livraison), 'day');
- if ($objectstatic->statut == $objectstatic::STATUS_ORDERSENT || $objectstatic->statut == $objectstatic::STATUS_RECEIVED_PARTIALLY) {
- if ($objectstatic->hasDelay()) {
- print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
+ // Ref Supplier
+ if (!empty($arrayfields['cf.ref_supplier']['checked'])) {
+ print ' | '.dol_escape_htmltag($obj->ref_supplier).' | '."\n";
+ if (!$i) {
+ $totalarray['nbfield']++;
}
}
- print '';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Amount HT
- if (!empty($arrayfields['cf.total_ht']['checked'])) {
- print ''.price($obj->total_ht)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_ht';
- }
- $totalarray['val']['cf.total_ht'] += $obj->total_ht;
- }
- // Amount VAT
- if (!empty($arrayfields['cf.total_tva']['checked'])) {
- print ''.price($obj->total_tva)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_tva';
- }
- $totalarray['val']['cf.total_tva'] += $obj->total_tva;
- }
- // Amount TTC
- if (!empty($arrayfields['cf.total_ttc']['checked'])) {
- print ''.price($obj->total_ttc)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_ttc';
- }
- $totalarray['val']['cf.total_ttc'] += $obj->total_ttc;
- }
-
- // Currency
- if (!empty($arrayfields['cf.multicurrency_code']['checked'])) {
- print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Currency rate
- if (!empty($arrayfields['cf.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['cf.multicurrency_total_ht']['checked'])) {
- print ''.price($obj->multicurrency_total_ht)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Amount VAT
- if (!empty($arrayfields['cf.multicurrency_total_tva']['checked'])) {
- print ''.price($obj->multicurrency_total_tva)." | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Amount TTC
- if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) {
- print ''.price($obj->multicurrency_total_ttc)." | \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); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- // Date creation
- if (!empty($arrayfields['cf.date_creation']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Date modification
- if (!empty($arrayfields['cf.tms']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Status
- if (!empty($arrayfields['cf.fk_statut']['checked'])) {
- print ''.$objectstatic->LibStatut($obj->fk_statut, 5, $obj->billed).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Billed
- if (!empty($arrayfields['cf.billed']['checked'])) {
- print ''.yn($obj->billed).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // valid date
- if (!empty($arrayfields['cf.date_valid']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_valid), 'day');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // approve date
- if (!empty($arrayfields['cf.date_approve']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_approve), 'day');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Note public
- if (!empty($arrayfields['cf.note_public']['checked'])) {
- print '';
- print dol_string_nohtmltag($obj->note_public);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Note private
- if (!empty($arrayfields['cf.note_private']['checked'])) {
- print '';
- print dol_string_nohtmltag($obj->note_private);
- 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->rowid, $arrayofselected)) {
- $selected = 1;
+ // Project
+ if (!empty($arrayfields['cf.fk_projet']['checked'])) {
+ $projectstatic->id = $obj->project_id;
+ $projectstatic->ref = $obj->project_ref;
+ $projectstatic->title = $obj->project_title;
+ print ' | ';
+ if ($obj->project_id > 0) {
+ print $projectstatic->getNomUrl(1);
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Author
+ $userstatic->id = $obj->fk_user_author;
+ $userstatic->lastname = $obj->lastname;
+ $userstatic->firstname = $obj->firstname;
+ $userstatic->login = $obj->login;
+ $userstatic->photo = $obj->photo;
+ $userstatic->email = $obj->user_email;
+ $userstatic->statut = $obj->user_status;
+ if (!empty($arrayfields['u.login']['checked'])) {
+ print '';
+ if ($userstatic->id) {
+ print $userstatic->getNomUrl(1);
+ }
+ print " | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Thirdparty
+ if (!empty($arrayfields['cf.fk_soc']['checked'])) {
+ print '';
+ $thirdpartytmp->id = $obj->socid;
+ $thirdpartytmp->name = $obj->name;
+ $thirdpartytmp->email = $obj->email;
+ $thirdpartytmp->name_alias = $obj->alias;
+ $thirdpartytmp->client = $obj->client;
+ $thirdpartytmp->fournisseur = $obj->fournisseur;
+ print $thirdpartytmp->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
+ print ' | '."\n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ //alias
+ if (!empty($arrayfields['s.name_alias']['checked'])) {
+ print '';
+ print $obj->alias;
+ print ' | '."\n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Town
+ if (!empty($arrayfields['s.town']['checked'])) {
+ print '';
+ print $obj->town;
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Zip
+ if (!empty($arrayfields['s.zip']['checked'])) {
+ print '';
+ print $obj->zip;
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // State
+ if (!empty($arrayfields['state.nom']['checked'])) {
+ print "".$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 (empty($typenArray)) {
+ $typenArray = $formcompany->typent_array(1);
+ }
+ print $typenArray[$obj->typent_code];
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
- print '';
}
- print '';
- }
- if (!$i) {
- $totalarray['nbfield']++;
- }
- print "
\n";
+ // Order date
+ if (!empty($arrayfields['cf.date_commande']['checked'])) {
+ print '