source: trunk/Modules/FinanceBankAPI/FioDemo.php

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