Filter for the Financial format.
More...
|
| record (Impacc_Csv $p_csv, Impacc_File $p_file) |
| insert file into the table import_detail More...
|
|
| adapt ($p_row) |
| Transform a group of rows to an array and set $jr_date_paid. More...
|
|
| insert ($a_group, Acc_Ledger_Fin $p_ledger) |
| Transfer operation with the status correct to the accountancy . More...
|
|
Filter for the Financial format.
Definition at line 29 of file class_impacc_csv_bank.php.
Impacc_Csv_Bank::adapt |
( |
|
$p_row | ) |
|
Transform a group of rows to an array and set $jr_date_paid.
useable by Acc_Ledger_Sold::insert
Definition at line 68 of file class_impacc_csv_bank.php.
References $array, $cn, and $g_parameter.
Referenced by insert().
71 $cn=Dossier::connect();
78 $all_row=$t->collect_objects(
"where import_id=$1 and id_code_group=$2",
79 array($p_row[
'import_id'],$p_row[
'id_code_group']));
83 $g_parameter->MY_ANALYTIC=
"N";
89 $array[
'nb_item']=count($all_row);
91 $array[
'e_other0']=$all_row[0]->id_acc;
93 $array[
'e_other0_comment']=$all_row[0]->id_label;
95 $array[
'dateop0']=$all_row[0]->id_date_conv;
96 $array[
'e_pj']=$all_row[0]->id_pj;
100 $array[
"e_other0_amount"]=$all_row[0]->id_amount_novat;
if(isset($_POST['remove'])) $array
Impacc_Csv_Bank::insert |
( |
|
$a_group, |
|
|
Acc_Ledger_Fin |
$p_ledger |
|
) |
| |
Transfer operation with the status correct to the accountancy .
Change the status of the row (id_status to 1) after because it can transferred several rows in one operation
Definition at line 106 of file class_impacc_csv_bank.php.
References $array, $cn, and adapt().
108 $cn=Dossier::connect();
109 $nb_group=count($a_group);
110 for ( $i=0;$i< $nb_group;$i++)
115 $array[
"p_jrn"]=$p_ledger->id;
118 if (trim(
$array[
'e_pj'])==
"")
$array[
"e_pj"]=$p_ledger->guess_pj();
119 $array[
'e_pj_suggest']=$p_ledger->guess_pj();
126 $p_ledger->insert(
$array);
130 $cn->exec_sql(
"update impacc.import_detail set id_status=2 where id_code_group=$1",
131 array($a_group[$i][
'id_code_group']));
adapt($p_row)
Transform a group of rows to an array and set $jr_date_paid.
if(isset($_POST['remove'])) $array
Impacc_Csv_Bank::record |
( |
Impacc_Csv |
$p_csv, |
|
|
Impacc_File |
$p_file |
|
) |
| |
insert file into the table import_detail
Definition at line 34 of file class_impacc_csv_bank.php.
References $aseparator, $cn, $nb_row, $row, and while.
38 $hFile=fopen($p_file->import_file->i_tmpname,
"r");
39 $cn=Dossier::connect();
40 $delimiter=$aseparator[$p_csv->detail->s_delimiter-1][
'label'];
41 $surrount=($p_csv->detail->s_surround==
"")?
'"':$p_csv->detail->s_surround;
43 while (
$row=fgetcsv($hFile, 0,$delimiter ,$surrount ))
46 $insert->import_id=$p_file->import_file->id;
50 $insert->id_status=-1;
51 $insert->id_message=join(
$row,$delimiter );
55 $insert->id_date=
$row[0];
56 $insert->id_code_group=
$row[1];
57 $insert->id_acc=
$row[2];
58 $insert->id_pj=
$row[3];
59 $insert->id_label=
$row[4];
60 $insert->id_amount_novat=
$row[5];
while(($row=fgetcsv($fbank, 0, $sp))!==false)
for($i=0;$i< Database::num_row($ret);$i++) $row
The documentation for this class was generated from the following file: