1 | <?php
|
---|
2 |
|
---|
3 | include('FioAPI.php');
|
---|
4 |
|
---|
5 | $Fio = new FioAPI();
|
---|
6 | $Fio->Token = 'YEEd9LlZ5SJ5VcxFcdbAwCji6UTtxve2ns5sClfCbii8Taq63uP7JNsa7OeN1Oum';
|
---|
7 | $Records = $Fio->Import(time() - 3600 * 24 * 31 * 2, time());
|
---|
8 | //print_r($Records);
|
---|
9 |
|
---|
10 | echo('<!DOCTYPE html>');
|
---|
11 | echo('<html><head><meta charset="utf-8"></head><body>');
|
---|
12 | echo('<table border="1">');
|
---|
13 | foreach($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 | }
|
---|
51 | echo('</table>');
|
---|
52 | echo('</body></html>');
|
---|
53 |
|
---|
54 | ?>
|
---|