FIX several warning with the barcode use in ODT templates
This commit is contained in:
parent
9cb5673c36
commit
5822fcfbed
@ -1344,7 +1344,6 @@ class Propal extends CommonObject
|
||||
|
||||
// Load source object
|
||||
$object->fetch($this->id);
|
||||
$object->fetch_lines();
|
||||
|
||||
$objsoc = new Societe($this->db);
|
||||
|
||||
@ -1738,7 +1737,7 @@ class Propal extends CommonObject
|
||||
$sql = 'SELECT d.rowid, d.fk_propal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.vat_src_code, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.localtax1_type, d.localtax2_type, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,';
|
||||
$sql .= ' d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,';
|
||||
$sql .= ' d.fk_unit,';
|
||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_batch,';
|
||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_tobatch, p.barcode as product_barcode,';
|
||||
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units,';
|
||||
$sql .= ' d.date_start, d.date_end,';
|
||||
$sql .= ' d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc';
|
||||
@ -1800,11 +1799,14 @@ class Propal extends CommonObject
|
||||
$line->fk_product = $objp->fk_product;
|
||||
|
||||
$line->ref = $objp->product_ref; // deprecated
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->product_label = $objp->product_label;
|
||||
$line->product_desc = $objp->product_desc; // Description produit
|
||||
$line->product_tobatch = $objp->product_tobatch;
|
||||
$line->product_barcode = $objp->product_barcode;
|
||||
|
||||
$line->fk_product_type = $objp->fk_product_type; // deprecated
|
||||
$line->fk_unit = $objp->fk_unit;
|
||||
$line->weight = $objp->weight;
|
||||
@ -3924,6 +3926,18 @@ class PropaleLigne extends CommonObjectLine
|
||||
*/
|
||||
public $product_desc;
|
||||
|
||||
/**
|
||||
* Product use lot
|
||||
* @var string
|
||||
*/
|
||||
public $product_tobatch;
|
||||
|
||||
/**
|
||||
* Product barcode
|
||||
* @var string
|
||||
*/
|
||||
public $product_barcode;
|
||||
|
||||
public $localtax1_tx; // Local tax 1
|
||||
public $localtax2_tx; // Local tax 2
|
||||
public $localtax1_type; // Local tax 1 type
|
||||
|
||||
@ -2033,7 +2033,7 @@ class Commande extends CommonOrder
|
||||
$sql .= ' l.total_ht, l.total_ttc, l.total_tva, l.total_localtax1, l.total_localtax2, l.date_start, l.date_end,';
|
||||
$sql .= ' l.fk_unit,';
|
||||
$sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,';
|
||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_tobatch,';
|
||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_tobatch, p.barcode as product_barcode,';
|
||||
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)';
|
||||
@ -2091,11 +2091,14 @@ class Commande extends CommonOrder
|
||||
$line->fk_parent_line = $objp->fk_parent_line;
|
||||
|
||||
$line->ref = $objp->product_ref;
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->libelle = $objp->product_label;
|
||||
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->product_label = $objp->product_label;
|
||||
$line->product_desc = $objp->product_desc;
|
||||
$line->product_tobatch = $objp->product_tobatch;
|
||||
$line->product_barcode = $objp->product_barcode;
|
||||
|
||||
$line->fk_product_type = $objp->fk_product_type; // Produit ou service
|
||||
$line->fk_unit = $objp->fk_unit;
|
||||
|
||||
|
||||
@ -529,10 +529,13 @@ abstract class CommonDocGenerator
|
||||
$resarray = array(
|
||||
'line_pos' => $linenumber,
|
||||
'line_fulldesc'=>doc_getlinedesc($line, $outputlangs),
|
||||
'line_product_ref'=>$line->product_ref,
|
||||
'line_product_ref_fourn'=>$line->ref_fourn, // for supplier doc lines
|
||||
'line_product_label'=>$line->product_label,
|
||||
'line_product_type'=>$line->product_type,
|
||||
|
||||
'line_product_ref'=>(empty($line->product_ref) ? '' : $line->product_ref),
|
||||
'line_product_ref_fourn'=>(empty($line->ref_fourn) ? '' : $line->ref_fourn), // for supplier doc lines
|
||||
'line_product_label'=>(empty($line->product_label) ? '' :$line->product_label),
|
||||
'line_product_type'=>(empty($line->product_type) ? '' : $line->product_type),
|
||||
'line_product_barcode'=>(empty($line->product_barcode) ? '' : $line->product_barcode),
|
||||
|
||||
'line_desc'=>$line->desc,
|
||||
'line_vatrate'=>vatrate($line->tva_tx, true, $line->info_bits),
|
||||
'line_localtax1_rate'=>vatrate($line->localtax1_tx),
|
||||
|
||||
@ -71,6 +71,18 @@ abstract class CommonOrderLine extends CommonObjectLine
|
||||
*/
|
||||
public $product_desc;
|
||||
|
||||
/**
|
||||
* Product use lot
|
||||
* @var string
|
||||
*/
|
||||
public $product_tobatch;
|
||||
|
||||
/**
|
||||
* Product barcode
|
||||
* @var string
|
||||
*/
|
||||
public $product_barcode;
|
||||
|
||||
/**
|
||||
* Quantity
|
||||
* @var float
|
||||
|
||||
Loading…
Reference in New Issue
Block a user