diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 7b4f27ae87e78743adf08ca0dc926b4fc467cb96..f267091db401c83269e62a75699ababbfabb6b08 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -53,7 +53,9 @@ if (empty($usemargins)) $usemargins=0; <td align="center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td> <?php } ?> <td><?php $coldisplay++; ?><div id="line_<?php echo $line->id; ?>"></div> - <?php if (($line->info_bits & 2) == 2) { ?> + <?php + if (($line->info_bits & 2) == 2) { + ?> <a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid; ?>"> <?php $txt=''; @@ -90,9 +92,8 @@ if (empty($usemargins)) $usemargins=0; { if ($line->fk_product > 0) { - echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); - + // Show range echo get_date_range($line->date_start, $line->date_end); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index a1988b5c3ace33bd2a808799bd9b2c944e97be58..9de33f10fb5d7cf42fb2c9dae0383dd3149965dc 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -507,7 +507,8 @@ class FactureFournisseur extends CommonInvoice $this->lines[$i]->product_ref = $obj->product_ref; // Internal reference $this->lines[$i]->ref = $obj->product_ref; // deprecated. $this->lines[$i]->ref_supplier = $obj->ref_supplier; // Reference product supplier TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields it into updateline - $this->lines[$i]->libelle = $obj->label; // This field may contains label of product (when invoice create from order) + $this->lines[$i]->libelle = $obj->label; // Deprecated + $this->lines[$i]->label = $obj->label; // This field may contains label of product (when invoice create from order) $this->lines[$i]->product_desc = $obj->product_desc; // Description du produit $this->lines[$i]->subprice = $obj->pu_ht; $this->lines[$i]->pu_ht = $obj->pu_ht; @@ -525,6 +526,7 @@ class FactureFournisseur extends CommonInvoice $this->lines[$i]->total_ttc = $obj->total_ttc; $this->lines[$i]->fk_product = $obj->fk_product; $this->lines[$i]->product_type = $obj->product_type; + $this->lines[$i]->product_label = $obj->label; $this->lines[$i]->info_bits = $obj->info_bits; $this->lines[$i]->fk_parent_line = $obj->fk_parent_line; $this->lines[$i]->special_code = $obj->special_code; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 1691efc78a58b572bea789752ae85c6725178308..70c6c57812177fc70393807ce840cd0ebeb1ea79 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -547,27 +547,25 @@ if (empty($reshook)) { $up = price2num(GETPOST('price_ht')); $price_base_type = 'HT'; - $result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, 0, $type,'','', $date_start, $date_end); } else { $up = price2num(GETPOST('price_ttc')); $price_base_type = 'TTC'; - $result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type,'','', $date_start, $date_end); } - if (GETPOST('idprod')) + if (GETPOST('productid')) { $prod = new Product($db); - $prod->fetch($_POST['idprod']); + $prod->fetch(GETPOST('productid')); $label = $prod->description; - if (trim($_POST['desc']) != trim($label)) $label=$_POST['desc']; + if (trim($_POST['product_desc']) != trim($label)) $label=$_POST['product_desc']; $type = $prod->type; } else { - $label = $_POST['desc']; + $label = $_POST['product_desc']; $type = $_POST["type"]?$_POST["type"]:0; } @@ -589,7 +587,7 @@ if (empty($reshook)) } } - $result=$object->updateline(GETPOST('lineid'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('idprod'), $price_base_type, 0, $type, $remise_percent, 0, $date_start, $date_end, $array_options); + $result=$object->updateline(GETPOST('lineid'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('productid'), $price_base_type, 0, $type, $remise_percent, 0, $date_start, $date_end, $array_options); if ($result >= 0) { unset($_POST['label']);