diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index f0890567b3e4e37db91b0004579720bac7641eb5..1dedf3dafd3d72bd00a05554bb0fc9b5f1cb6b80 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -2248,7 +2248,6 @@ class Commande extends CommonObject $line->total_ht=100; $line->total_ttc=119.6; $line->total_tva=19.6; - $line->produit_id=$prodids[$prodid]; $line->fk_product=$prodids[$prodid]; $this->lignes[$xnbp]=$line; // TODO: deprecated @@ -2388,7 +2387,6 @@ class OrderLine $this->remise = $objp->remise; $this->remise_percent = $objp->remise_percent; $this->fk_remise_except = $objp->fk_remise_except; - $this->produit_id = $objp->fk_product; $this->fk_product = $objp->fk_product; $this->product_type = $objp->product_type; $this->info_bits = $objp->info_bits; diff --git a/htdocs/compta/facture/facture-rec.class.php b/htdocs/compta/facture/facture-rec.class.php index 0ada15496a2e81d7d7bf743bdb04fc99adc15359..96513d50b80b3e5447534479187c79e0955c23b9 100644 --- a/htdocs/compta/facture/facture-rec.class.php +++ b/htdocs/compta/facture/facture-rec.class.php @@ -329,7 +329,6 @@ class FactureRec extends Facture $faclig->tva_tx = $objp->tva_tx; $faclig->remise_percent = $objp->remise_percent; $faclig->fk_remise_except = $objp->fk_remise_except; - $faclig->produit_id = $objp->fk_product; $faclig->fk_product = $objp->fk_product; $faclig->date_start = $objp->date_start; $faclig->date_end = $objp->date_end; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 542515235b77b43fa480972295d767a2e9c9e5df..8c553b63d0342983e8352a7769b91625cba7a996 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -305,10 +305,10 @@ class Facture extends CommonObject { foreach ($_facrec->lignes as $i => $val) { - if ($_facrec->lignes[$i]->produit_id) + if ($_facrec->lignes[$i]->fk_product) { - $prod = new Product($this->db, $_facrec->lignes[$i]->produit_id); - $res=$prod->fetch($_facrec->lignes[$i]->produit_id); + $prod = new Product($this->db, $_facrec->lignes[$i]->fk_product); + $res=$prod->fetch($_facrec->lignes[$i]->fk_product); } $tva_tx = get_default_tva($mysoc,$soc,($prod->tva_tx?$prod->tva_tx:0)); @@ -318,7 +318,7 @@ class Facture extends CommonObject $_facrec->lignes[$i]->subprice, $_facrec->lignes[$i]->qty, $tva_tx, - $_facrec->lignes[$i]->produit_id, + $_facrec->lignes[$i]->fk_product, $_facrec->lignes[$i]->remise_percent, '','',0,0,'','HT',0, $_facrec->lignes[$i]->product_type @@ -697,7 +697,6 @@ class Facture extends CommonObject $faclig->tva_tx = $objp->tva_tx; $faclig->remise_percent = $objp->remise_percent; $faclig->fk_remise_except = $objp->fk_remise_except; - $faclig->produit_id = $objp->fk_product; $faclig->fk_product = $objp->fk_product; $faclig->date_start = $this->db->jdate($objp->date_start); $faclig->date_end = $this->db->jdate($objp->date_end); @@ -2789,7 +2788,7 @@ class Facture extends CommonObject $ligne->total_ttc=107.64; // 90 * 1.196 $ligne->total_tva=17.64; $prodid = rand(1, $num_prods); - $ligne->produit_id=$prodids[$prodid]; + $ligne->fk_product=$prodids[$prodid]; $this->lignes[$xnbp]=$ligne; $xnbp++; } @@ -2933,7 +2932,6 @@ class FactureLigne $this->tva_tx = $objp->tva_tx; $this->remise_percent = $objp->remise_percent; $this->fk_remise_except = $objp->fk_remise_except; - $this->produit_id = $objp->fk_product; // Ne plus utiliser $this->fk_product = $objp->fk_product; $this->product_type = $objp->product_type; $this->date_start = $this->db->jdate($objp->date_start); diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index 144aecfd790a97b583cf432a235466392eea94da..58a476a73973ddd9ea697b7c50b7794b0bb989f7 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -756,7 +756,7 @@ class Fichinter extends CommonObject $ligne->price=100; $ligne->tva_tx=19.6; $prodid = rand(1, $num_prods); - $ligne->produit_id=$prodids[$prodid]; + $ligne->fk_product=$prodids[$prodid]; $this->lignes[$xnbp]=$ligne; $xnbp++; } diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index 48af7390db90f1ad241254ffb8db14ef7c72f356..37f85cf55360c51c7add9ffc457593e7bad9b941 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -1445,7 +1445,7 @@ class CommandeFournisseur extends Commande $ligne->tva_tx=19.6; $ligne->ref_fourn='SUPPLIER_REF_'.$xnbp; $prodid = rand(1, $num_prods); - $ligne->produit_id=$prodids[$prodid]; + $ligne->fk_product=$prodids[$prodid]; $this->lignes[$xnbp]=$ligne; $xnbp++; } @@ -1517,7 +1517,7 @@ class CommandeFournisseurLigne extends OrderLine $this->tva_tx = $objp->tva_tx; $this->remise = $objp->remise; $this->remise_percent = $objp->remise_percent; - $this->produit_id = $objp->fk_product; + $this->fk_product = $objp->fk_product; $this->info_bits = $objp->info_bits; $this->total_ht = $objp->total_ht; $this->total_tva = $objp->total_tva; diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php index b05f95cfd0d009f4701439ab11988459ec92550b..bf8df957d794455d9113c7dd4629dfb8299ddb27 100644 --- a/htdocs/fourn/fournisseur.facture.class.php +++ b/htdocs/fourn/fournisseur.facture.class.php @@ -1024,7 +1024,7 @@ class FactureFournisseur extends Facture $ligne->price=100; $ligne->tva_tx=19.6; $prodid = rand(1, $num_prods); - $ligne->produit_id=$prodids[$prodid]; + $ligne->fk_product=$prodids[$prodid]; $ligne->product_type=0; $this->lignes[$xnbp]=$ligne; diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index c3f5ac626ed745514a38126f43a6839165c57e0c..b6a5d3ca86ab8eaf43444997052bab16608262fd 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -239,7 +239,7 @@ function pdf_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierli { global $db, $conf, $langs; - $idprod=$line->fk_product; if (empty($idprod)) $idprod=$line->produit_id; + $idprod=$line->fk_product; $label=$line->label; if (empty($label)) $label=$line->libelle; $desc=$line->desc; if (empty($desc)) $desc=$line->description; $ref_supplier=$line->ref_supplier; if (empty($ref_supplier)) $ref_supplier=$line->ref_fourn; // TODO Not yeld saved for supplier invoices, only supplier orders diff --git a/htdocs/projet/project.class.php b/htdocs/projet/project.class.php index ba98207d772627f8ca5b39cf7ccc74eb4c0e411b..cc50afd15586dc774c7f14cc3383e401849b6711 100644 --- a/htdocs/projet/project.class.php +++ b/htdocs/projet/project.class.php @@ -663,11 +663,11 @@ class Project extends CommonObject $xnbp = 0; while ($xnbp < $nbp) { - $ligne=new Task($this->db); - $ligne->desc=$langs->trans("Description")." ".$xnbp; - $ligne->qty=1; + $line=new Task($this->db); + $line->desc=$langs->trans("Description")." ".$xnbp; + $line->qty=1; $prodid = rand(1, $num_prods); - $ligne->produit_id=$prodids[$prodid]; + $line->fk_product=$prodids[$prodid]; $xnbp++; } } diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 8dda65efae5ad12a64de1077ec02c51d9df66a39..2c1ec1d9e732a61834454c9908438fca9d3c00f6 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -1958,7 +1958,7 @@ class Propal extends CommonObject $ligne->total_ttc=119.6; $ligne->total_tva=19.6; $prodid = rand(1, $num_prods); - $ligne->produit_id=$prodids[$prodid]; + $ligne->fk_product=$prodids[$prodid]; $this->lignes[$xnbp]=$ligne; $xnbp++; } @@ -2197,7 +2197,7 @@ class PropaleLigne $this->remise = $objp->remise; $this->remise_percent = $objp->remise_percent; $this->fk_remise_except = $objp->fk_remise_except; - $this->produit_id = $objp->fk_product; + $this->fk_product = $objp->fk_product; $this->info_bits = $objp->info_bits; $this->total_ht = $objp->total_ht;