diff --git a/html/admin/sql/patch/upgrade55.sql b/html/admin/sql/patch/upgrade55.sql new file mode 100644 index 000000000..447fe32ca --- /dev/null +++ b/html/admin/sql/patch/upgrade55.sql @@ -0,0 +1,6 @@ +begin; +alter table import_tmp alter bq_account type text; + +update version set val=56; + +commit; diff --git a/include/constant.php b/include/constant.php index a4d26e9f8..348558afc 100644 --- a/include/constant.php +++ b/include/constant.php @@ -25,7 +25,7 @@ */ require_once ('config.inc.php'); -define ("DBVERSION",55); +define ("DBVERSION",56); define ("MAX_COMPTE",4); define ('MAX_BUD_DETAIL',20); diff --git a/include/fortis_be.inc.php b/include/fortis_be.inc.php index 04f54b798..263b1367c 100644 --- a/include/fortis_be.inc.php +++ b/include/fortis_be.inc.php @@ -27,15 +27,20 @@ // Fortis Bank //----------------------------------------------------- $row=1; +$must_field=7; // The mandatory number of fields while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { $num = count($data); + for ($c=0; $c < $num; $c++) { - + $nb_field=substr_count($data[$c],";"); // first line is skipped - if ( $row>1) { + if ( $row>1 && $nb_field == $must_field) { - $code=""; $date_exec=""; $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser=""; + $code=""; $date_exec=""; + $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser=""; + + list($code, $date_exec, $date_valeur, $montant, $devise, $compte_ordre, $detail, $num_compte) = split(";", $data[$c]); echo "line : $row > ".$data[$c]."