QUAL: Removed no more used deprecated code

This commit is contained in:
ldestailleur 2025-09-03 21:53:43 +02:00
parent ca1c3d3781
commit d6fa374d84
3 changed files with 5 additions and 64 deletions

View file

@ -568,9 +568,6 @@ class Propal extends CommonObject
$line->rang = -1;
$line->info_bits = 2;
// TODO deprecated
$line->price = -(float) $remise->amount_ht;
$line->total_ht = -(float) $remise->amount_ht;
$line->total_tva = -(float) $remise->amount_tva;
$line->total_ttc = -(float) $remise->amount_ttc;
@ -785,15 +782,6 @@ class Propal extends CommonObject
$ranktouse = $rangmax + 1;
}
// TODO A virer
// Anciens indicateurs: $price, $remise (a ne plus utiliser)
$price = $pu;
$remise = 0;
if ((float) $remise_percent > 0) {
$remise = round(((float) $pu * (float) $remise_percent / 100), 2);
$price = (float) $pu - $remise;
}
// Insert line
$this->line = new PropaleLigne($this->db);
@ -848,9 +836,6 @@ class Propal extends CommonObject
$this->line->special_code = 3;
}
// TODO deprecated
$this->line->price = $price;
if (is_array($array_options) && count($array_options) > 0) {
$this->line->array_options = $array_options;
}
@ -1005,14 +990,6 @@ class Propal extends CommonObject
$multicurrency_total_ttc = $tabprice[18];
$pu_ht_devise = $tabprice[19];
// Anciens indicateurs: $price, $remise (a ne plus utiliser)
$price = $pu;
$remise = 0;
if ((float) $remise_percent > 0) {
$remise = round(((float) $pu * (float) $remise_percent / 100), 2);
$price = (float) $pu - $remise;
}
// Fetch current line from the database and then clone the object and set it in $oldline property
$line = new PropaleLigne($this->db);
$line->fetch($rowid);
@ -2020,7 +1997,6 @@ class Propal extends CommonObject
$line->subprice = $objp->subprice;
$line->fk_remise_except = $objp->fk_remise_except;
$line->remise_percent = $objp->remise_percent;
$line->price = $objp->price; // TODO deprecated
$line->info_bits = $objp->info_bits;
$line->total_ht = $objp->total_ht;
@ -3658,7 +3634,6 @@ class Propal extends CommonObject
$line->desc = $langs->trans("Description")." ".$xnbp;
$line->qty = 1;
$line->subprice = 100;
$line->price = 100;
$line->tva_tx = 20;
$line->localtax1_tx = 0;
$line->localtax2_tx = 0;

View file

@ -1754,15 +1754,6 @@ class Commande extends CommonOrder
$ranktouse = $rangmax + 1;
}
// TODO A virer
// Anciens indicateurs: $price, $remise (a ne plus utiliser)
$price = $pu;
$remise = 0;
if ($remise_percent > 0) {
$remise = round(((float) $pu * $remise_percent / 100), 2);
$price = (float) $pu - $remise;
}
// Insert line
$this->line = new OrderLine($this->db);
@ -1812,9 +1803,6 @@ class Commande extends CommonOrder
$this->line->multicurrency_total_tva = (float) $multicurrency_total_tva;
$this->line->multicurrency_total_ttc = (float) $multicurrency_total_ttc;
// TODO Do not use anymore
$this->line->price = $price;
if (is_array($array_options) && count($array_options) > 0) {
$this->line->array_options = $array_options;
}
@ -1911,8 +1899,10 @@ class Commande extends CommonOrder
// multiprix
if (getDolGlobalString('PRODUIT_MULTIPRICES') && $this->thirdparty->price_level) {
$price = $prod->multiprices[$this->thirdparty->price_level];
$price_ttc = $prod->multiprices_ttc[$this->thirdparty->price_level];
} else {
$price = $prod->price;
$price_ttc = $prod->price_ttc;
}
$line = new OrderLine($this->db);
@ -1923,6 +1913,7 @@ class Commande extends CommonOrder
$line->desc = $prod->description;
$line->qty = $qty;
$line->subprice = $price;
$line->subprice_ttc = $price_ttc;
$line->remise_percent = $remise_percent;
$line->vat_src_code = $vat_src_code;
$line->tva_tx = $tva_tx;
@ -3212,19 +3203,6 @@ class Commande extends CommonOrder
$multicurrency_total_ttc = $tabprice[18];
$pu_ht_devise = $tabprice[19];
// Anciens indicateurs: $price, $subprice (a ne plus utiliser)
$price = $pu_ht;
if ($price_base_type == 'TTC') {
$subprice = $pu_ttc;
} else {
$subprice = $pu_ht;
}
$remise = 0;
if ($remise_percent > 0) {
$remise = round(((float) $pu * $remise_percent / 100), 2);
$price = ((float) $pu - $remise);
}
// Fetch current line from the database and then clone the object and set it in $oldline property
$line = new OrderLine($this->db);
$line->fetch($rowid);
@ -3334,9 +3312,6 @@ class Commande extends CommonOrder
$this->line->multicurrency_total_tva = (float) $multicurrency_total_tva;
$this->line->multicurrency_total_ttc = (float) $multicurrency_total_ttc;
// TODO deprecated
$this->line->price = $price;
if (is_array($array_options) && count($array_options) > 0) {
// We replace values in this->line->array_options only for entries defined into $array_options
foreach ($array_options as $key => $value) {

View file

@ -446,7 +446,7 @@ class SupplierProposal extends CommonObject
*/
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $pu_ttc = 0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $array_options = [], $ref_supplier = '', $fk_unit = 0, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $date_start = 0, $date_end = 0)
{
global $mysoc, $conf, $langs;
global $mysoc, $langs;
dol_syslog(get_class($this)."::addline supplier_proposalid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type");
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
@ -591,15 +591,6 @@ class SupplierProposal extends CommonObject
$ranktouse = $rangmax + 1;
}
// TODO A virer
// Anciens indicateurs: $price, $remise (a ne plus utiliser)
$price = $pu;
$remise = 0;
if ($remise_percent > 0) {
$remise = round(((float) $pu * (float) $remise_percent / 100), 2);
$price = (float) $pu - $remise;
}
// Insert line
$this->line = new SupplierProposalLine($this->db);
@ -726,7 +717,7 @@ class SupplierProposal extends CommonObject
*/
public function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $array_options = [], $ref_supplier = '', $fk_unit = 0, $pu_ht_devise = 0)
{
global $conf, $user, $langs, $mysoc;
global $mysoc;
dol_syslog(get_class($this)."::updateLine $rowid, $pu, $qty, $remise_percent, $txtva, $desc, $price_base_type, $info_bits");
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';