source: tools/fio/test.php

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Skript pro import GPC exportu z Fio banky.
File size: 1.6 KB
Line 
1<?php
2
3include('fio.php');
4
5$Fio = new Fio();
6$Fio->Account = '123456789';
7$Fio->UserName = 'user';
8$Fio->Password = 'pass';
9$Records = $Fio->Import(time() - 3600 * 24 * 31 * 2, time());
10//print_r($Records);
11
12echo('<table border="1">');
13foreach($Records as $Record)
14{
15 echo('<tr>');
16 if($Record['Type'] == GPC_TYPE_REPORT)
17 {
18 echo('<td>Jméno účtu: '.$Record['AccountName'].'</td>');
19 echo('<td>Číslo účtu: '.$Record['AccountNumber'].'</td>');
20 echo('<td>Ke dni '.date('j.n.Y', $Record['OldBalanceDate']).' je stav účtu '.$Record['OldBalanceValue'].' Kč</td>');
21 echo('<td>Ke dni '.date('j.n.Y', $Record['Date']).' je stav účtu '.$Record['NewBalanceValue'].' Kč</td>');
22 echo('<td>Suma příjmů: '.$Record['CreditValue'].' Kč</td>');
23 echo('<td>Suma vÜdajů: '.$Record['DebitValue'].' Kč</td>');
24
25 echo('</tr></table><br><br>');
26 echo('<table border="1"><tr>');
27
28 echo('<th>Datum</th>');
29 echo('<th>Částka</th>');
30 echo('<th>Účet protistrany</th>');
31 echo('<th>Kód banky</th>');
32 echo('<th>KS</th>');
33 echo('<th>VS</th>');
34 echo('<th>SS</th>');
35 echo('<th>Uşivatelská identifikace</th>');
36 } else
37 if($Record['Type'] == GPC_TYPE_ITEM)
38 {
39 echo('<td>'.date('j.n.Y', $Record['DueDate']).'</td>');
40 echo('<td>'.$Record['Value'].'</td>');
41 echo('<td>'.$Record['OffsetAccount'].'</td>');
42 echo('<td>'.$Record['BankCode'].'</td>');
43 echo('<td>'.$Record['ConstantSymbol'].'</td>');
44 echo('<td>'.$Record['VariableSymbol'].'</td>');
45 echo('<td>'.$Record['SpecificSymbol'].'</td>');
46 echo('<td>'.$Record['ClientName'].'</td>');
47 }
48 echo('</tr>');
49
50}
51echo('</table>');
52
53?>
Note: See TracBrowser for help on using the repository browser.