2
0
forked from Wavyzz/dolibarr

Retrieve extraparams from db to objectline

This commit is contained in:
yannis
2025-03-03 12:05:27 +01:00
parent 5ebd1921ed
commit cf83c6668e
6 changed files with 18 additions and 6 deletions

View File

@@ -2154,7 +2154,7 @@ class Commande extends CommonOrder
$sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.product_type, l.fk_commande, l.label as custom_label, l.description, l.price, l.qty, l.vat_src_code, l.tva_tx, l.ref_ext,';
$sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.fk_remise_except, l.remise_percent, l.subprice, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht, l.rang, l.info_bits, l.special_code,';
$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_unit, l.extraparams,';
$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.tosell as product_tosell, p.tobuy as product_tobuy, p.tobatch as product_tobatch, p.barcode as product_barcode,';
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units, p.packaging';
@@ -2228,6 +2228,8 @@ class Commande extends CommonOrder
$line->fk_product_type = $objp->fk_product_type; // Produit ou service
$line->fk_unit = $objp->fk_unit;
$line->extraparams = !empty($objp->extraparams) ? (array) json_decode($objp->extraparams, true) : array();
$line->weight = $objp->weight;
$line->weight_units = $objp->weight_units;
$line->volume = $objp->volume;