From 041390dc2242745efe913e076e7629558240bc3d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 19 Feb 2021 06:49:24 +0100 Subject: [PATCH] Code enhanced - Standardize field name #14697 --- ChangeLog | 1 + htdocs/comm/propal/class/propal.class.php | 14 ++++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b73c4b2212..de736200364 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup. * API /setup/shipment_methods has been replaced with API /setup/shipping_methods +* Field tva move to total_tva in llx_propal diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 51ec7e6e53a..aadc1f55281 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -185,12 +185,6 @@ class Propal extends CommonObject */ public $total; - public $total_ht = 0; - public $total_tva = 0; - public $total_localtax1 = 0; - public $total_localtax2 = 0; - public $total_ttc = 0; - public $cond_reglement_code; public $mode_reglement_code; public $remise = 0; @@ -1044,7 +1038,7 @@ class Propal extends CommonObject $sql .= ", remise"; $sql .= ", remise_percent"; $sql .= ", remise_absolue"; - $sql .= ", tva"; + $sql .= ", total_tva"; $sql .= ", total"; $sql .= ", datep"; $sql .= ", datec"; @@ -1431,7 +1425,7 @@ class Propal extends CommonObject public function fetch($rowid, $ref = '', $ref_ext = '') { $sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; - $sql .= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht"; + $sql .= ", p.total, p.total_tva, p.localtax1, p.localtax2, p.total_ht"; $sql .= ", p.datec"; $sql .= ", p.date_valid as datev"; $sql .= ", p.datep as dp"; @@ -1489,7 +1483,7 @@ class Propal extends CommonObject $this->remise_absolue = $obj->remise_absolue; $this->total = $obj->total; // TODO deprecated $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->tva; + $this->total_tva = $obj->total_tva; $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; $this->total_ttc = $obj->total; @@ -1624,7 +1618,7 @@ class Propal extends CommonObject $sql .= " datep=".(strval($this->date) != '' ? "'".$this->db->idate($this->date)."'" : 'null').","; if (!empty($this->fin_validite)) $sql .= " fin_validite=".(strval($this->fin_validite) != '' ? "'".$this->db->idate($this->fin_validite)."'" : 'null').","; $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; - $sql .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; + $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; $sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").","; $sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").","; $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").",";