New: Add product_label into substitution tags for ODT.

This commit is contained in:
Laurent Destailleur 2012-02-20 23:58:36 +01:00
parent f74440aa65
commit b8a61e73a0
5 changed files with 14 additions and 9 deletions

View File

@ -337,6 +337,7 @@ class FactureRec extends Facture
$line->product_type = $objp->product_type; // Type of line $line->product_type = $objp->product_type; // Type of line
$line->product_ref = $objp->product_ref; // Ref product $line->product_ref = $objp->product_ref; // Ref product
$line->libelle = $objp->label; // Label product $line->libelle = $objp->label; // Label product
$line->product_label = $objp->product_label;
$line->product_desc = $objp->product_desc; // Description product $line->product_desc = $objp->product_desc; // Description product
$line->fk_product_type = $objp->fk_product_type; // Type of product $line->fk_product_type = $objp->fk_product_type; // Type of product
$line->qty = $objp->qty; $line->qty = $objp->qty;

View File

@ -856,6 +856,7 @@ class Facture extends CommonObject
$line->product_type = $objp->product_type; // Type of line $line->product_type = $objp->product_type; // Type of line
$line->product_ref = $objp->product_ref; // Ref product $line->product_ref = $objp->product_ref; // Ref product
$line->libelle = $objp->label; // Label product $line->libelle = $objp->label; // Label product
$line->product_label = $objp->product_label;
$line->product_desc = $objp->product_desc; // Description product $line->product_desc = $objp->product_desc; // Description product
$line->fk_product_type = $objp->fk_product_type; // Type of product $line->fk_product_type = $objp->fk_product_type; // Type of product
$line->qty = $objp->qty; $line->qty = $objp->qty;

View File

@ -841,7 +841,7 @@ class Expedition extends CommonObject
$sql = "SELECT cd.rowid, cd.fk_product, cd.description, cd.qty as qty_asked"; $sql = "SELECT cd.rowid, cd.fk_product, cd.description, cd.qty as qty_asked";
$sql.= ", ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot"; $sql.= ", ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot";
$sql.= ", p.ref as product_ref, p.fk_product_type, p.label, p.weight, p.weight_units, p.volume, p.volume_units"; $sql.= ", p.ref as product_ref, p.label as product_label, p.fk_product_type, p.weight, p.weight_units, p.volume, p.volume_units";
$sql.= " FROM (".MAIN_DB_PREFIX."expeditiondet as ed,"; $sql.= " FROM (".MAIN_DB_PREFIX."expeditiondet as ed,";
$sql.= " ".MAIN_DB_PREFIX."commandedet as cd)"; $sql.= " ".MAIN_DB_PREFIX."commandedet as cd)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = cd.fk_product"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = cd.fk_product";
@ -866,8 +866,9 @@ class Expedition extends CommonObject
$line->fk_product_type = $obj->fk_product_type; $line->fk_product_type = $obj->fk_product_type;
$line->ref = $obj->product_ref; // TODO deprecated $line->ref = $obj->product_ref; // TODO deprecated
$line->product_ref = $obj->product_ref; $line->product_ref = $obj->product_ref;
$line->label = $obj->label; $line->product_label = $obj->product_label;
$line->libelle = $obj->label; // TODO deprecated $line->label = $obj->product_label;
$line->libelle = $obj->product_label; // TODO deprecated
$line->description = $obj->description; $line->description = $obj->description;
$line->qty_asked = $obj->qty_asked; $line->qty_asked = $obj->qty_asked;
$line->qty_shipped = $obj->qty_shipped; $line->qty_shipped = $obj->qty_shipped;

View File

@ -176,7 +176,7 @@ class CommandeFournisseur extends Commande
$sql.= " l.tva_tx, l.remise_percent, l.subprice,"; $sql.= " l.tva_tx, l.remise_percent, l.subprice,";
$sql.= " l.localtax1_tx, l. localtax2_tx, l.total_localtax1, l.total_localtax2,"; $sql.= " l.localtax1_tx, l. localtax2_tx, l.total_localtax1, l.total_localtax2,";
$sql.= " l.total_ht, l.total_tva, l.total_ttc,"; $sql.= " l.total_ht, l.total_tva, l.total_ttc,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc"; $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc";
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l"; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
$sql.= " WHERE l.fk_commande = ".$this->id; $sql.= " WHERE l.fk_commande = ".$this->id;
@ -213,7 +213,9 @@ class CommandeFournisseur extends Commande
$line->product_type = $objp->product_type; $line->product_type = $objp->product_type;
$line->fk_product = $objp->fk_product; // Id du produit $line->fk_product = $objp->fk_product; // Id du produit
$line->libelle = $objp->label; // Label produit
$line->libelle = $objp->product_label; // TODO deprecated
$line->product_label = $objp->product_label; // Label produit
$line->product_desc = $objp->product_desc; // Description produit $line->product_desc = $objp->product_desc; // Description produit
$line->ref = $objp->product_ref; // TODO deprecated $line->ref = $objp->product_ref; // TODO deprecated