diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 9ef9072d16a..4fb5582e187 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -2623,7 +2623,7 @@ if ($resql) {
// Import key
if (!empty($arrayfields['c.import_key']['checked'])) {
- print '
'.$obj->import_key.' | ';
+ print ''.dol_escape_htmltag($obj->import_key).' | ';
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql
index 6c96cb46605..72cff6afde7 100644
--- a/htdocs/install/mysql/data/llx_c_tva.sql
+++ b/htdocs/install/mysql/data/llx_c_tva.sql
@@ -194,7 +194,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (14
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1402, 140, '14','0','VAT rate - intermediary',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1403, 140, '8','0','VAT rate - reduced', 1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1404, 140, '3','0','VAT rate - super-reduced', 1);
-insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '17','0','VAT rate - standard',1);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '16','0','VAT rate - standard',1);
-- MALI (id country=147)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1471, 147, '0','0','VAT rate 0', 1);
diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php
index d1ca4ef2db1..34365e05792 100644
--- a/htdocs/recruitment/recruitmentjobposition_card.php
+++ b/htdocs/recruitment/recruitmentjobposition_card.php
@@ -401,7 +401,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Back to draft
if ($object->status == $object::STATUS_VALIDATED) {
if ($permissiontoadd) {
- print ''.$langs->trans("SetToDraft").'';
+ print ''.$langs->trans("SetToDraft").'';
}
}
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 4b898a75645..c9dc776c9c5 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -591,10 +591,8 @@ if (empty($reshook)) {
$prod_entry_mode = GETPOST('prod_entry_mode', 'aZ09');
if ($prod_entry_mode == 'free') {
$idprod = 0;
- $tva_tx = (GETPOST('tva_tx', 'alpha') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx', 'alpha'))) : 0);
} else {
$idprod = GETPOST('idprod', 'int');
- $tva_tx = '';
}
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index f283295aeb5..e13900bab4f 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -2584,7 +2584,7 @@ class SupplierProposal extends CommonObject
// For other object, here we call fetch_lines. But fetch_lines does not exists on supplier proposal
$sql = 'SELECT pt.rowid, pt.label as custom_label, pt.description, pt.fk_product, pt.fk_remise_except,';
- $sql .= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,';
+ $sql .= ' pt.qty, pt.tva_tx, pt.vat_src_code, pt.remise_percent, pt.subprice, pt.info_bits,';
$sql .= ' pt.total_ht, pt.total_tva, pt.total_ttc, pt.fk_product_fournisseur_price as fk_fournprice, pt.buy_price_ht as pa_ht, pt.special_code, pt.localtax1_tx, pt.localtax2_tx,';
$sql .= ' pt.product_type, pt.rang, pt.fk_parent_line,';
$sql .= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,';
@@ -2620,6 +2620,7 @@ class SupplierProposal extends CommonObject
$this->lines[$i]->fk_remise_except = $obj->fk_remise_except;
$this->lines[$i]->remise_percent = $obj->remise_percent;
$this->lines[$i]->tva_tx = $obj->tva_tx;
+ $this->lines[$i]->vat_src_code = $obj->vat_src_code;
$this->lines[$i]->info_bits = $obj->info_bits;
$this->lines[$i]->total_ht = $obj->total_ht;
$this->lines[$i]->total_tva = $obj->total_tva;
@@ -2988,6 +2989,9 @@ class SupplierProposalLine extends CommonObjectLine
if (empty($this->tva_tx)) {
$this->tva_tx = 0;
}
+ if (empty($this->vat_src_code)) {
+ $this->vat_src_code = '';
+ }
if (empty($this->localtax1_tx)) {
$this->localtax1_tx = 0;
}
@@ -3056,7 +3060,7 @@ class SupplierProposalLine extends CommonObjectLine
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'supplier_proposaldet';
$sql .= ' (fk_supplier_proposal, fk_parent_line, label, description, fk_product, product_type,';
$sql .= ' date_start, date_end,';
- $sql .= ' fk_remise_except, qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,';
+ $sql .= ' fk_remise_except, qty, tva_tx, vat_src_code, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,';
$sql .= ' subprice, remise_percent, ';
$sql .= ' info_bits, ';
$sql .= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,';
@@ -3073,6 +3077,7 @@ class SupplierProposalLine extends CommonObjectLine
$sql .= " ".($this->fk_remise_except ? ((int) $this->fk_remise_except) : "null").",";
$sql .= " ".price2num($this->qty, 'MS').",";
$sql .= " ".price2num($this->tva_tx).",";
+ $sql .= " '".$this->db->escape($this->vat_src_code)."',";
$sql .= " ".price2num($this->localtax1_tx).",";
$sql .= " ".price2num($this->localtax2_tx).",";
$sql .= " '".$this->db->escape($this->localtax1_type)."',";