dolibarr.bankimport/vendor/nemiah/php-fints/Samples/balance.php
data 1fc10d3781 Version 1.1: PDF-Kontoauszüge, Dashboard, Menü-Integration
- Mehrfach-Upload von PDF-Kontoauszügen mit automatischer Metadaten-Erkennung
- Dashboard mit Übersichts-Widgets (letzte Buchungen und Kontoauszüge)
- Menü-Integration unter "Banken und Kasse" statt eigenem Top-Menü
- Erinnerungsfunktion bei veralteten Kontoauszügen (konfigurierbar)
- Verknüpfung von Buchungen mit PDF-Kontoauszügen
- Auszugsnummer wird automatisch aus dem Zeitraum abgeleitet (Monat/Jahr)
- Jahrfilter zeigt nur Jahre mit vorhandenen Kontoauszügen
- Modul-Icon auf fa-money-check-alt gesetzt
- README und ChangeLog aktualisiert
- .gitignore für Kontoauszüge und Build-Artefakte hinzugefügt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:11:46 +01:00

35 lines
1.3 KiB
PHP
Executable file

<?php /** @noinspection PhpUnhandledExceptionInspection */
/**
* SAMPLE - Displays the current balance of all accounts.
*/
// See login.php, it returns a FinTs instance that is already logged in.
/** @var \Fhp\FinTs $fints */
$fints = require_once 'login.php';
// Just pick the first account for the request, though we will request the balance of all accounts.
$getSepaAccounts = \Fhp\Action\GetSEPAAccounts::create();
$fints->execute($getSepaAccounts);
if ($getSepaAccounts->needsTan()) {
handleStrongAuthentication($getSepaAccounts); // See login.php for the implementation.
}
$oneAccount = $getSepaAccounts->getAccounts()[0];
$getBalance = \Fhp\Action\GetBalance::create($oneAccount, true);
$fints->execute($getBalance);
if ($getBalance->needsTan()) {
handleStrongAuthentication($getBalance); // See login.php for the implementation.
}
/** @var \Fhp\Segment\SAL\HISAL $hisal */
foreach ($getBalance->getBalances() as $hisal) {
$accNo = $hisal->getAccountInfo()->getAccountNumber();
if ($hisal->getKontoproduktbezeichnung() !== null) {
$accNo .= ' (' . $hisal->getKontoproduktbezeichnung() . ')';
}
$amnt = $hisal->getGebuchterSaldo()->getAmount();
$curr = $hisal->getGebuchterSaldo()->getCurrency();
$date = $hisal->getGebuchterSaldo()->getTimestamp()->format('Y-m-d');
echo "On $accNo you have $amnt $curr as of $date.\n";
}