diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 2b3d3f89727..da88369be51 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -91,7 +91,7 @@ class box_services_contracts extends ModeleBoxes $sql = "SELECT s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; $sql.= " c.rowid, c.ref, c.statut as contract_status, c.ref_customer, c.ref_supplier,"; $sql.= " cd.rowid as cdid, cd.label, cd.description, cd.tms as datem, cd.statut, cd.product_type as type,"; - $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as plabel, p.fk_product_type as ptype, p.entity"; + $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as product_type, p.entity"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; @@ -120,7 +120,8 @@ class box_services_contracts extends ModeleBoxes $contratlignestatic->fk_contrat=$objp->rowid; $contratlignestatic->label=$objp->label; $contratlignestatic->description=$objp->description; - $contratlignestatic->product_type = $objp->type; + $contratlignestatic->type = $objp->type; + $contratlignestatic->product_type = $objp->product_type; $contratlignestatic->product_id=$objp->product_id; $contratlignestatic->product_ref=$objp->product_ref; @@ -164,21 +165,21 @@ class box_services_contracts extends ModeleBoxes $productstatic->type=$objp->ptype; $productstatic->ref=$objp->product_ref; $productstatic->entity=$objp->pentity; - $productstatic->label=$objp->plabel; + $productstatic->label=$objp->product_label; $text = $productstatic->getNomUrl(1, '', 20); - if ($objp->plabel) + if ($objp->product_label) { $text .= ' - '; //$productstatic->ref=$objp->label; //$text .= $productstatic->getNomUrl(0,'',16); - $text .= $objp->plabel; + $text .= $objp->product_label; } $description = $objp->description; // Add description in form if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) { - //$text .= (! empty($objp->description) && $objp->description!=$objp->plabel)?'
'.dol_htmlentitiesbr($objp->description):''; + //$text .= (! empty($objp->description) && $objp->description!=$objp->product_label)?'
'.dol_htmlentitiesbr($objp->description):''; $description = ''; // Already added into main visible desc }