diff --git a/include/cbc_be.inc.php b/include/cbc_be.inc.php index a20bbee52..d46555a54 100644 --- a/include/cbc_be.inc.php +++ b/include/cbc_be.inc.php @@ -1,3 +1,35 @@ +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +///////////////////////////////////////////////////////////////////////////////////////////////////// +// Bank CBC +///////////////////////////////////////////////////////////////////////////////////////////////////// +$row=1; +while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) { + $num = count($data); + for ($c=0; $c < $num; $c++) { + + } // for ($c=0;$c<$num;$c++) + $row++; +} // file is read +fclose($handle); echo "Encore rien désolé"; ?> diff --git a/include/eub_be.inc.php b/include/eub_be.inc.php index 52cfea869..01bb68194 100644 --- a/include/eub_be.inc.php +++ b/include/eub_be.inc.php @@ -22,46 +22,55 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////// // Bank type = eub ///////////////////////////////////////////////////////////////////////////////////////////////////// -// first line is skipped -if ( $row > 1) { -$code=""; $date_exec=""; $detail=""; $montant=""; -list($code, $date_exec, $detail, $montant) = split(";", $data[$c]); +$row=1; +while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) { + $num = count($data); + for ($c=0; $c < $num; $c++) { -$date_exec = str_replace("\t", "", $date_exec); -$date_exec = str_replace(" ", "", $date_exec); - -list($annee,$mois,$jour) = explode("-", $date_exec); - -$montant = str_replace(".", "", $montant); -$montant = str_replace(",", ".", $montant); -$montant = str_replace("+", "", $montant); - -if($code < 10) $code = "000".$code; -if($code >= 10 and $code < 100) $code = "00".$code; -if($code >= 100) $code = "0".$code; - -$code = $annee."-".$code; - - -$Sql="insert into import_tmp (code, - date_exec , - date_valeur, - montant, - devise, - detail, - num_compte, - bq_account , - jrn, - ok) -values ('$code', - '$date_exec', - '$date_exec', - '$montant', - 'EUR', - '".addslashes($detail)."', - '$p_bq_account', - $p_jrn, - false)"; -$Res=ExecSql($p_cn,$Sql); -} + // first line is skipped + if ( $row > 1) { + $code=""; $date_exec=""; $detail=""; $montant=""; + list($code, $date_exec, $detail, $montant) = split(";", $data[$c]); + + $date_exec = str_replace("\t", "", $date_exec); + $date_exec = str_replace(" ", "", $date_exec); + + list($annee,$mois,$jour) = explode("-", $date_exec); + + $montant = str_replace(".", "", $montant); + $montant = str_replace(",", ".", $montant); + $montant = str_replace("+", "", $montant); + + if($code < 10) $code = "000".$code; + if($code >= 10 and $code < 100) $code = "00".$code; + if($code >= 100) $code = "0".$code; + + $code = $annee."-".$code; + + + $Sql="insert into import_tmp (code, + date_exec , + date_valeur, + montant, + devise, + detail, + num_compte, + bq_account , + jrn, + ok) + values ('$code', + '$date_exec', + '$date_exec', + '$montant', + 'EUR', + '".addslashes($detail)."', + '$p_bq_account', + $p_jrn, + false)"; + $Res=ExecSql($p_cn,$Sql); + } + } // for ($c=0;$c<$num;$c++) + $row++; +} // file is read +fclose($handle); ?> \ No newline at end of file diff --git a/include/fortis_be.inc.php b/include/fortis_be.inc.php index 2fbc0fe23..c8033544b 100644 --- a/include/fortis_be.inc.php +++ b/include/fortis_be.inc.php @@ -22,78 +22,88 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////// // Fortis Bank ///////////////////////////////////////////////////////////////////////////////////////////////////// +$row=1; +while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) { + $num = count($data); + for ($c=0; $c < $num; $c++) { + // first line is skipped -if ( $row>1) { - - $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]."