From 7fd3bb0aae105dc34afd36de899bd5af40d2932f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 May 2022 12:08:03 +0200 Subject: [PATCH] Remove deprecated code --- htdocs/comm/propal/class/propal.class.php | 9 --------- htdocs/commande/class/commande.class.php | 9 --------- htdocs/compta/facture/class/facture.class.php | 1 - htdocs/contrat/class/contrat.class.php | 2 -- htdocs/core/class/commonobjectline.class.php | 10 ++++++++++ htdocs/core/class/html.form.class.php | 1 - htdocs/fichinter/class/fichinter.class.php | 2 ++ htdocs/fichinter/class/fichinterrec.class.php | 4 ---- htdocs/fourn/class/fournisseur.commande.class.php | 3 --- .../class/supplier_proposal.class.php | 4 ---- 10 files changed, 12 insertions(+), 33 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 195629d3b4c..fc1f12afa04 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -490,7 +490,6 @@ class Propal extends CommonObject $line->subprice = -$remise->amount_ht; $line->fk_product = 0; // Id produit predefined $line->qty = 1; - $line->remise = 0; $line->remise_percent = 0; $line->rang = -1; $line->info_bits = 2; @@ -736,7 +735,6 @@ class Propal extends CommonObject // TODO deprecated $this->line->price = $price; - $this->line->remise = $remise; if (is_array($array_options) && count($array_options) > 0) { $this->line->array_options = $array_options; @@ -936,7 +934,6 @@ class Propal extends CommonObject // TODO deprecated $this->line->price = $price; - $this->line->remise = $remise; if (is_array($array_options) && count($array_options) > 0) { // We replace values in this->line->array_options only for entries defined into $array_options @@ -4134,9 +4131,6 @@ class PropaleLigne extends CommonObjectLine if (empty($this->rang)) { $this->rang = 0; } - if (empty($this->remise)) { - $this->remise = 0; - } if (empty($this->remise_percent) || !is_numeric($this->remise_percent)) { $this->remise_percent = 0; } @@ -4366,9 +4360,6 @@ class PropaleLigne extends CommonObjectLine if (empty($this->price)) { $this->price = 0; // TODO A virer } - if (empty($this->remise)) { - $this->remise = 0; // TODO A virer - } if (empty($this->remise_percent)) { $this->remise_percent = 0; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 827dc5ec591..5d5e5c2a7c4 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1666,7 +1666,6 @@ class Commande extends CommonOrder // TODO Ne plus utiliser $this->line->price = $price; - $this->line->remise = $remise; if (is_array($array_options) && count($array_options) > 0) { $this->line->array_options = $array_options; @@ -2010,7 +2009,6 @@ class Commande extends CommonOrder $line->price = -$remise->amount_ht; $line->fk_product = 0; // Id produit predefini $line->qty = 1; - $line->remise = 0; $line->remise_percent = 0; $line->rang = -1; $line->info_bits = 2; @@ -3264,7 +3262,6 @@ class Commande extends CommonOrder // TODO deprecated $this->line->price = $price; - $this->line->remise = $remise; if (is_array($array_options) && count($array_options) > 0) { // We replace values in this->line->array_options only for entries defined into $array_options @@ -4406,9 +4403,6 @@ class OrderLine extends CommonOrderLine if (empty($this->rang)) { $this->rang = 0; } - if (empty($this->remise)) { - $this->remise = 0; - } if (empty($this->remise_percent)) { $this->remise_percent = 0; } @@ -4581,9 +4575,6 @@ class OrderLine extends CommonOrderLine if (empty($this->marge_tx)) { $this->marge_tx = 0; } - if (empty($this->remise)) { - $this->remise = 0; - } if (empty($this->remise_percent)) { $this->remise_percent = 0; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c9921a34a60..64d83cb2123 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -560,7 +560,6 @@ class Facture extends CommonInvoice $this->array_options = $_facrec->array_options; - //if (! $this->remise) $this->remise = 0; if (!$this->mode_reglement_id) { $this->mode_reglement_id = 0; } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index cab5a05a22a..494c3cb1369 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2991,7 +2991,6 @@ class ContratLigne extends CommonObjectLine $this->localtax2_type = $obj->localtax2_type; $this->qty = $obj->qty; $this->remise_percent = $obj->remise_percent; - $this->remise = $obj->remise; $this->fk_remise_except = $obj->fk_remise_except; $this->subprice = $obj->subprice; $this->price_ht = $obj->price_ht; @@ -3049,7 +3048,6 @@ class ContratLigne extends CommonObjectLine $this->localtax2_tx = trim($this->localtax2_tx); $this->qty = trim($this->qty); $this->remise_percent = trim($this->remise_percent); - $this->remise = trim($this->remise); $this->fk_remise_except = (int) $this->fk_remise_except; $this->subprice = price2num($this->subprice); $this->price_ht = price2num($this->price_ht); diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index ff50b39ea96..509e97d6a17 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -76,6 +76,16 @@ abstract class CommonObjectLine extends CommonObject public $multilangs; + public $product_ref; + public $product_label; + public $product_type; + public $product_desc; + public $qty; + public $duree; + public $remise_percent; + public $info_bits; + public $special_code; + /** diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e96b042beae..56ec5133108 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2755,7 +2755,6 @@ class Form $objp->price = $objp2->price; $objp->unitprice = $objp2->unitprice; $objp->remise_percent = $objp2->remise_percent; - $objp->remise = $objp2->remise; //$objp->tva_tx is not overwritten by $objp2 value //$objp->default_vat_code is not overwritten by $objp2 value diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index b5e3a13f3c0..9c27843567a 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1420,6 +1420,8 @@ class FichinterLigne extends CommonObjectLine */ public $fk_element = 'fk_fichinter'; + + /** * Constructor * diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 4488b4643b8..a8e9d7cebd3 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -401,10 +401,6 @@ class FichinterRec extends Fichinter $line->special_code = $objp->special_code; $line->fk_unit = $objp->fk_unit; - // Ne plus utiliser - $line->price = $objp->price; - $line->remise = $objp->remise; - $this->lines[$i] = $line; $i++; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b780cbde926..16f7cf8d060 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3751,9 +3751,6 @@ class CommandeFournisseurLigne extends CommonOrderLine if (empty($this->rang)) { $this->rang = 0; } - if (empty($this->remise)) { - $this->remise = 0; - } if (empty($this->remise_percent)) { $this->remise_percent = 0; } diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index e755a0bab94..8f0c1d36919 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -331,7 +331,6 @@ class SupplierProposal extends CommonObject $supplier_proposalligne->subprice = -$remise->amount_ht; $supplier_proposalligne->fk_product = 0; // Id produit predefini $supplier_proposalligne->qty = 1; - $supplier_proposalligne->remise = 0; $supplier_proposalligne->remise_percent = 0; $supplier_proposalligne->rang = -1; $supplier_proposalligne->info_bits = 2; @@ -3006,9 +3005,6 @@ class SupplierProposalLine extends CommonObjectLine if (empty($this->rang)) { $this->rang = 0; } - if (empty($this->remise)) { - $this->remise = 0; - } if (empty($this->remise_percent)) { $this->remise_percent = 0; }