Merge pull request #22541 from hregis/fix_missing_quote

Fix missing quote for string field
This commit is contained in:
Laurent Destailleur 2022-10-13 00:39:42 +02:00 committed by GitHub
commit 851fd96665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1703,8 +1703,8 @@ class Contrat extends CommonObject
$total_localtax1 = $tabprice[9];
$total_localtax2 = $tabprice[10];
$localtax1_type = $localtaxes_type[0];
$localtax2_type = $localtaxes_type[2];
$localtax1_type = (empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]);
$localtax2_type = (empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]);
// TODO A virer
// Anciens indicateurs: $price, $remise (a ne plus utiliser)
@ -1737,8 +1737,8 @@ class Contrat extends CommonObject
$sql .= ",tva_tx = ".((float) price2num($tvatx));
$sql .= ",localtax1_tx = ".((float) price2num($localtax1tx));
$sql .= ",localtax2_tx = ".((float) price2num($localtax2tx));
$sql .= ",localtax1_type='".$this->db->escape($localtax1_type);
$sql .= ",localtax2_type='".$this->db->escape($localtax2_type);
$sql .= ",localtax1_type='".$this->db->escape($localtax1_type)."'";
$sql .= ",localtax2_type='".$this->db->escape($localtax2_type)."'";
$sql .= ", total_ht = ".((float) price2num($total_ht));
$sql .= ", total_tva = ".((float) price2num($total_tva));
$sql .= ", total_localtax1 = ".((float) price2num($total_localtax1));