diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php
index 1560c6cc2bd..2869c66cd9f 100644
--- a/htdocs/contrat/services_list.php
+++ b/htdocs/contrat/services_list.php
@@ -218,7 +218,7 @@ $form = new Form($db);
$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut, c.ref_customer, c.ref_supplier,";
$sql .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur,";
$sql .= " cd.rowid, cd.description, cd.statut,";
-$sql .= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype, p.entity as pentity,";
+$sql .= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype, p.tobuy, p.tosell, p.barcode, p.entity as pentity,";
if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= " sc.fk_soc, sc.fk_user,";
}
@@ -707,6 +707,16 @@ while ($i < min($num, $limit)) {
$companystatic->client = $obj->client;
$companystatic->fournisseur = $obj->fournisseur;
+ $productstatic->id = $obj->pid;
+ $productstatic->type = $obj->ptype;
+ $productstatic->ref = $obj->pref;
+ $productstatic->entity = $obj->pentity;
+ $productstatic->status = $obj->tosell;
+ $productstatic->status_buy = $obj->tobuy;
+ $productstatic->label = $obj->label;
+ $productstatic->description = $obj->description;
+ $productstatic->barcode = $obj->barcode;
+
print '
';
// Ref
@@ -720,16 +730,12 @@ while ($i < min($num, $limit)) {
}
// Service
if (!empty($arrayfields['p.description']['checked'])) {
- print '| ';
+ print ' | ';
if ($obj->pid > 0) {
- $productstatic->id = $obj->pid;
- $productstatic->type = $obj->ptype;
- $productstatic->ref = $obj->pref;
- $productstatic->entity = $obj->pentity;
print $productstatic->getNomUrl(1, '', 24);
print $obj->label ? ' - '.dol_trunc($obj->label, 16) : '';
if (!empty($obj->description) && !empty($conf->global->PRODUCT_DESC_IN_LIST)) {
- print ' '.dol_nl2br($obj->description);
+ print ' '.dol_nl2br($obj->description).'';
}
} else {
if ($obj->type == 0) {
@@ -746,7 +752,7 @@ while ($i < min($num, $limit)) {
}
if (!empty($arrayfields['cd.tva_tx']['checked'])) {
- print ' | ';
+ print ' | ';
print price2num($obj->tva_tx).'%';
print ' | ';
if (!$i) {
@@ -754,7 +760,7 @@ while ($i < min($num, $limit)) {
}
}
if (!empty($arrayfields['cd.subprice']['checked'])) {
- print '';
+ print ' | ';
print price($obj->subprice);
print ' | ';
if (!$i) {
@@ -762,7 +768,7 @@ while ($i < min($num, $limit)) {
}
}
if (!empty($arrayfields['cd.qty']['checked'])) {
- print '';
+ print ' | ';
print $obj->qty;
print ' | ';
if (!$i) {
@@ -770,7 +776,7 @@ while ($i < min($num, $limit)) {
}
}
if (!empty($arrayfields['cd.total_ht']['checked'])) {
- print '';
+ print ' | ';
print ''.price($obj->total_ht).'';
print ' | ';
if (!$i) {
@@ -782,7 +788,7 @@ while ($i < min($num, $limit)) {
$totalarray['val']['cd.total_ht'] += $obj->total_ht;
}
if (!empty($arrayfields['cd.total_tva']['checked'])) {
- print '';
+ print ' | ';
print ''.price($obj->total_tva).'';
print ' | ';
if (!$i) {
@@ -806,7 +812,7 @@ while ($i < min($num, $limit)) {
// Start date
if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) {
- print '';
+ print ' | ';
print ($obj->date_ouverture_prevue ?dol_print_date($db->jdate($obj->date_ouverture_prevue), 'dayhour') : ' ');
if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0) {
print ' '.img_picto($langs->trans("Late"), "warning");
@@ -819,14 +825,14 @@ while ($i < min($num, $limit)) {
}
}
if (!empty($arrayfields['cd.date_ouverture']['checked'])) {
- print ' | '.($obj->date_ouverture ?dol_print_date($db->jdate($obj->date_ouverture), 'dayhour') : ' ').' | ';
+ print ''.($obj->date_ouverture ?dol_print_date($db->jdate($obj->date_ouverture), 'dayhour') : ' ').' | ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// End date
if (!empty($arrayfields['cd.date_fin_validite']['checked'])) {
- print ''.($obj->date_fin_validite ?dol_print_date($db->jdate($obj->date_fin_validite), 'dayhour') : ' ');
+ print ' | '.($obj->date_fin_validite ?dol_print_date($db->jdate($obj->date_fin_validite), 'dayhour') : ' ');
if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) {
$warning_delay = $conf->contrat->services->expires->warning_delay / 3600 / 24;
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
@@ -841,7 +847,7 @@ while ($i < min($num, $limit)) {
}
// Close date (real end date)
if (!empty($arrayfields['cd.date_cloture']['checked'])) {
- print ' | '.dol_print_date($db->jdate($obj->date_cloture), 'dayhour').' | ';
+ print ''.dol_print_date($db->jdate($obj->date_cloture), 'dayhour').' | ';
if (!$i) {
$totalarray['nbfield']++;
}
@@ -864,7 +870,7 @@ while ($i < min($num, $limit)) {
}
// Date modification
if (!empty($arrayfields['cd.tms']['checked'])) {
- print '';
+ print ' | ';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print ' | ';
if (!$i) {