Der gesamte FinTS-Dialog (gesendete und empfangene Meldungen) wird je Durchlauf in bank_protokolle gespeichert, im Erfolgs- wie im Fehlerfall. Im Zahlungsverkehr öffnet der Status das Protokoll der Überweisung als modalen Dialog; unter Online-Banking › Protokoll gibt es das Gesamtprotokoll mit Filter nach Bank, Datum und Freitext. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
119 lines
5.3 KiB
PHP
119 lines
5.3 KiB
PHP
<?php
|
||
|
||
use Finanzmanager\Models\Adresse;
|
||
use Finanzmanager\Models\Zahlungsauftrag;
|
||
use Finanzmanager\View;
|
||
|
||
/**
|
||
* @var list<array<string,mixed>> $auftraege
|
||
* @var string $status
|
||
* @var int $offen
|
||
* @var bool $wartetTan
|
||
* @var string $csrfToken
|
||
*/
|
||
|
||
include __DIR__ . '/../layout/kopf.php';
|
||
?>
|
||
|
||
<div class="tableiste">
|
||
<a href="/zahlungsverkehr" class="tab <?= $status === '' ? 'aktiv' : '' ?>">Alle</a>
|
||
<?php foreach (Zahlungsauftrag::STATUS as $schluessel => $name): ?>
|
||
<a href="/zahlungsverkehr?status=<?= View::h($schluessel) ?>"
|
||
class="tab <?= $status === $schluessel ? 'aktiv' : '' ?>">
|
||
<?= View::h(ucfirst($name)) ?><?= $schluessel === 'entwurf' && $offen > 0 ? ' (' . $offen . ')' : '' ?>
|
||
</a>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
|
||
<?php if ($wartetTan): ?>
|
||
<p class="meldung meldung-hinweis" role="status">
|
||
Eine Überweisung wartet auf die Freigabe.
|
||
<a href="/zahlungsverkehr/tan">Jetzt freigeben</a>.
|
||
</p>
|
||
<?php endif; ?>
|
||
|
||
<div class="seitenaktionen">
|
||
<a href="/zahlungsverkehr/neu" class="knopf primaer">Überweisung erfassen</a>
|
||
<a href="/vertraege/adressen" class="knopf">Adressbuch</a>
|
||
</div>
|
||
|
||
<p class="hinweis">
|
||
Eine Überweisung wird erst gebucht, wenn die Bank sie angenommen hat – vorher steht sie
|
||
als Entwurf hier. Ohne Ausführungstermin geht sie sofort hinaus, mit Termin als
|
||
Terminüberweisung.
|
||
</p>
|
||
|
||
<?php if ($auftraege === []): ?>
|
||
<p class="platzhalter">Keine Zahlungsaufträge.</p>
|
||
<?php else: ?>
|
||
<table class="liste">
|
||
<thead>
|
||
<tr>
|
||
<th>Empfänger</th><th>IBAN</th><th>Konto</th><th class="rechts">Betrag</th>
|
||
<th>Ausführung</th><th>Status</th><th class="rechts">Aktion</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php foreach ($auftraege as $auftrag): ?>
|
||
<tr<?= $auftrag['status'] === 'storniert' ? ' class="inaktiv"' : '' ?>>
|
||
<td>
|
||
<a href="/zahlungsverkehr/<?= (int)$auftrag['id'] ?>"><?= View::h($auftrag['empfaenger']) ?></a>
|
||
<?php if (($auftrag['verwendungszweck'] ?? '') !== ''): ?>
|
||
<span class="nebentext"><?= View::h($auftrag['verwendungszweck']) ?></span>
|
||
<?php endif; ?>
|
||
</td>
|
||
<td class="klein"><?= View::h(Adresse::ibanFormatiert($auftrag['iban'])) ?></td>
|
||
<td><?= View::h($auftrag['kontoname']) ?></td>
|
||
<td class="rechts negativ"><?= View::betrag($auftrag['betrag']) ?></td>
|
||
<td>
|
||
<?= $auftrag['ausfuehrung_am'] === null
|
||
? '<span class="nebentext">sofort</span>'
|
||
: View::h(View::datum($auftrag['ausfuehrung_am'])) ?>
|
||
</td>
|
||
<td>
|
||
<?php if ((int)$auftrag['protokolle'] > 0): ?>
|
||
<?php /* Der Status öffnet das Übermittlungsprotokoll; ohne
|
||
Skript führt der Link auf dieselbe Ansicht als Seite. */ ?>
|
||
<a href="/zahlungsverkehr/<?= (int)$auftrag['id'] ?>/protokoll"
|
||
class="marke marke-<?= View::h($auftrag['status']) ?>" data-protokoll
|
||
title="Übermittlungsprotokoll anzeigen">
|
||
<?= View::h(Zahlungsauftrag::STATUS[$auftrag['status']]) ?>
|
||
</a>
|
||
<?php else: ?>
|
||
<span class="marke marke-<?= View::h($auftrag['status']) ?>">
|
||
<?= View::h(Zahlungsauftrag::STATUS[$auftrag['status']]) ?>
|
||
</span>
|
||
<?php endif; ?>
|
||
<?php if (($auftrag['meldung'] ?? '') !== '' && $auftrag['status'] === 'fehler'): ?>
|
||
<span class="nebentext"><?= View::h($auftrag['meldung']) ?></span>
|
||
<?php endif; ?>
|
||
</td>
|
||
<td class="rechts nowrap">
|
||
<?php if ($auftrag['status'] === 'gesendet'): ?>
|
||
<?php if ($auftrag['buchung_id'] !== null): ?>
|
||
<a href="/buchungen/<?= (int)$auftrag['buchung_id'] ?>" class="knopf klein">Buchung</a>
|
||
<?php endif; ?>
|
||
<?php else: ?>
|
||
<form method="post" action="/zahlungsverkehr/<?= (int)$auftrag['id'] ?>/senden"
|
||
class="inline"
|
||
data-bestaetigen="Überweisung über <?= View::h(View::betrag($auftrag['betrag'])) ?> an <?= View::h($auftrag['empfaenger']) ?> jetzt an die Bank senden?">
|
||
<input type="hidden" name="csrf_token" value="<?= View::h($csrfToken) ?>">
|
||
<button type="submit" class="knopf klein primaer">Senden</button>
|
||
</form>
|
||
<a href="/zahlungsverkehr/<?= (int)$auftrag['id'] ?>" class="knopf klein">Bearbeiten</a>
|
||
<?php endif; ?>
|
||
</td>
|
||
</tr>
|
||
<?php endforeach; ?>
|
||
</tbody>
|
||
</table>
|
||
<?php endif; ?>
|
||
|
||
<dialog class="splitdialog protokolldialog" id="protokolldialog">
|
||
<div data-protokoll-inhalt></div>
|
||
<form method="dialog" class="knopfleiste">
|
||
<button type="submit" class="knopf klein">Schließen</button>
|
||
</form>
|
||
</dialog>
|
||
|
||
<?php include __DIR__ . '/../layout/fuss.php'; ?>
|