diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 5a882a4e68e..f8ffa809a86 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -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)); diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 9eac5d7b5e7..23b9ea85639 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2021 Alexandre Spangaro + * Copyright (C) 2022 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -239,7 +240,7 @@ class modFacture extends DolibarrModules 'f.ref' => 'InvoiceRef*', 'f.ref_ext' => 'ExternalRef', 'f.ref_int' => 'ExternalRef', - 'f.ref_client' => 'CutomerRef', + 'f.ref_client' => 'CustomerRef', 'f.type' => 'Type*', 'f.fk_soc' => 'Customer*', 'f.datec' => 'InvoiceDateCreation', @@ -352,7 +353,7 @@ class modFacture extends DolibarrModules ) ); - //Import Supplier Invoice Lines + // Import Invoice Lines $r++; $this->import_code[$r] = $this->rights_class.'_'.$r; $this->import_label[$r] = "InvoiceLine"; // Translation key