Merge pull request #15023 from Ahuahuachi/10.0
FIX #14927 Change ContratLigne property type to product_type
This commit is contained in:
commit
4eddcb7503
@ -753,6 +753,7 @@ class Contrat extends CommonObject
|
||||
$sql.= " d.total_localtax1,";
|
||||
$sql.= " d.total_localtax2,";
|
||||
$sql.= " d.total_ttc,";
|
||||
$sql .= " d.product_type,";
|
||||
$sql.= " d.info_bits, d.fk_product,";
|
||||
$sql.= " d.date_ouverture_prevue, d.date_ouverture,";
|
||||
$sql.= " d.date_fin_validite, d.date_cloture,";
|
||||
@ -799,6 +800,7 @@ class Contrat extends CommonObject
|
||||
$line->total_ttc = $objp->total_ttc;
|
||||
$line->fk_product = (($objp->fk_product > 0)?$objp->fk_product:0);
|
||||
$line->info_bits = $objp->info_bits;
|
||||
$line->type = $objp->type;
|
||||
|
||||
$line->fk_fournprice = $objp->fk_fournprice;
|
||||
$marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht);
|
||||
@ -811,6 +813,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$line->ref = $objp->product_ref; // deprecated
|
||||
$line->product_ref = $objp->product_ref; // Product Ref
|
||||
$line->product_type = $objp->product_type; // Product Type
|
||||
$line->product_desc = $objp->product_desc; // Product Description
|
||||
$line->product_label = $objp->product_label; // Product Label
|
||||
|
||||
@ -2563,7 +2566,7 @@ class ContratLigne extends CommonObjectLine
|
||||
public $fk_product;
|
||||
|
||||
public $statut; // 0 inactive, 4 active, 5 closed
|
||||
public $type; // 0 for product, 1 for service
|
||||
public $type; // 0 for product, 1 for service
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@ -2582,6 +2585,7 @@ class ContratLigne extends CommonObjectLine
|
||||
*/
|
||||
public $description;
|
||||
|
||||
public $product_type; // 0 for product, 1 for service
|
||||
public $product_ref;
|
||||
public $product_label;
|
||||
|
||||
|
||||
@ -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->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)?'<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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user