2
0
forked from Wavyzz/dolibarr

QUAL: Removed deprecated field remise, remise_percent, remise_absolute

This commit is contained in:
Laurent Destailleur
2023-10-20 10:47:08 +02:00
parent 7a694d3485
commit e1bf377f20
16 changed files with 79 additions and 209 deletions

View File

@@ -328,10 +328,6 @@ class Commande extends CommonOrder
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
'fk_user_cloture' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
//'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'AmountHT', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
//'remise_percent' =>array('type'=>'double', 'label'=>'RelativeDiscount', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
'remise_absolue' =>array('type'=>'double', 'label'=>'CustomerRelativeDiscount', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
//'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
'total_tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', 'enabled'=>1, 'visible'=>-1, 'position'=>125, 'isameasure'=>1),
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LocalTax1', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LocalTax2', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
@@ -340,7 +336,6 @@ class Commande extends CommonOrder
'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>150),
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>155),
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'PDFTemplate', 'enabled'=>1, 'visible'=>0, 'position'=>160),
//'facture' =>array('type'=>'tinyint(4)', 'label'=>'ParentInvoice', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>'isModEnabled("banque")', 'visible'=>-1, 'position'=>170),
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'MulticurrencyID', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
@@ -955,7 +950,6 @@ class Commande extends CommonOrder
$sql .= ", model_pdf, fk_cond_reglement, deposit_percent, fk_mode_reglement, fk_account, fk_availability, fk_input_reason, date_livraison, fk_delivery_address";
$sql .= ", fk_shipping_method";
$sql .= ", fk_warehouse";
$sql .= ", remise_absolue, remise_percent";
$sql .= ", fk_incoterms, location_incoterms";
$sql .= ", entity, module_source, pos_source";
$sql .= ", fk_multicurrency";
@@ -981,8 +975,6 @@ class Commande extends CommonOrder
$sql .= ", ".($this->fk_delivery_address > 0 ? ((int) $this->fk_delivery_address) : 'NULL');
$sql .= ", ".(!empty($this->shipping_method_id) && $this->shipping_method_id > 0 ? ((int) $this->shipping_method_id) : 'NULL');
$sql .= ", ".(!empty($this->warehouse_id) && $this->warehouse_id > 0 ? ((int) $this->warehouse_id) : 'NULL');
$sql .= ", ".($this->remise_absolue > 0 ? $this->db->escape($this->remise_absolue) : 'NULL');
$sql .= ", ".($this->remise_percent > 0 ? $this->db->escape($this->remise_percent) : 0); // TODO deprecated
$sql .= ", ".(int) $this->fk_incoterms;
$sql .= ", '".$this->db->escape($this->location_incoterms)."'";
$sql .= ", ".setEntity($this);
@@ -1863,7 +1855,7 @@ class Commande extends CommonOrder
$sql .= ', c.date_livraison as delivery_date';
$sql .= ', c.fk_shipping_method';
$sql .= ', c.fk_warehouse';
$sql .= ', c.fk_projet as fk_project, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed';
$sql .= ', c.fk_projet as fk_project, c.source, c.facture as billed';
$sql .= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.model_pdf, c.last_main_doc, c.fk_delivery_address, c.extraparams';
$sql .= ', c.fk_incoterms, c.location_incoterms';
$sql .= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc";
@@ -1930,9 +1922,6 @@ class Commande extends CommonOrder
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_validation = $this->db->jdate($obj->date_valid);
$this->date_modification = $this->db->jdate($obj->tms);
$this->remise = $obj->remise;
$this->remise_percent = $obj->remise_percent; // TODO deprecated
$this->remise_absolue = $obj->remise_absolue;
$this->source = $obj->source;
$this->billed = $obj->billed;
$this->note = $obj->note_private; // deprecated
@@ -2528,6 +2517,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
/*
public function set_remise_absolue($user, $remise, $notrigger = 0)
{
// phpcs:enable
@@ -2583,7 +2573,7 @@ class Commande extends CommonOrder
return 0;
}
*/
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**