|
@@ -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 as contractline_status, cd.product_type as type, cd.date_fin_validite as date_line,";
|
|
|
- $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as plabel, p.fk_product_type as ptype, p.entity, p.tobuy, p.tosell";
|
|
|
+ $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, p.tobuy, p.tosell";
|
|
|
$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";
|
|
@@ -125,6 +125,8 @@ class box_services_contracts extends ModeleBoxes
|
|
|
$contractlinestatic->type = $objp->type;
|
|
|
$contractlinestatic->product_id = $objp->product_id;
|
|
|
$contractlinestatic->product_ref = $objp->product_ref;
|
|
|
+ $contratlignestatic->product_type = $objp->product_type;
|
|
|
+
|
|
|
$contractlinestatic->statut = $objp->contractline_status;
|
|
|
|
|
|
$contractstatic->id = $objp->rowid;
|
|
@@ -150,27 +152,27 @@ class box_services_contracts extends ModeleBoxes
|
|
|
if ($objp->product_id > 0)
|
|
|
{
|
|
|
$productstatic->id = $objp->product_id;
|
|
|
- $productstatic->type = $objp->ptype;
|
|
|
+ $productstatic->type = $objp->product_type;
|
|
|
$productstatic->ref = $objp->product_ref;
|
|
|
$productstatic->entity = $objp->pentity;
|
|
|
- $productstatic->label = $objp->plabel;
|
|
|
+ $productstatic->label = $objp->product_label;
|
|
|
$productstatic->status = $objp->tosell;
|
|
|
$productstatic->status_buy = $objp->tobuy;
|
|
|
|
|
|
$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)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
|
|
+ //$text .= (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
|
|
$description = ''; // Already added into main visible desc
|
|
|
}
|
|
|
|