129 lines
6.5 KiB
PHP
129 lines
6.5 KiB
PHP
<?php use Steuerkram\View; $h = fn($v) => View::h($v); ?>
|
||
|
||
<div class="card" style="max-width:700px">
|
||
<div class="card-body">
|
||
<form method="post" action="<?= $h($action) ?>">
|
||
<input type="hidden" name="_back" value="<?= $h($back ?? '/accounts') ?>">
|
||
|
||
<div class="form-grid form-grid-2">
|
||
<div class="form-group">
|
||
<label for="kontonummer">Kontonummer *</label>
|
||
<input type="text" id="kontonummer" name="kontonummer"
|
||
value="<?= $h($account['kontonummer'] ?? '') ?>"
|
||
class="<?= isset($errors['kontonummer']) ? 'input-error' : '' ?>"
|
||
required>
|
||
<?php if (isset($errors['kontonummer'])): ?>
|
||
<div class="error-text"><?= $h($errors['kontonummer']) ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="kontenart">Kontenart *</label>
|
||
<select id="kontenart" name="kontenart"
|
||
class="<?= isset($errors['kontenart']) ? 'input-error' : '' ?>" required>
|
||
<option value="">– wählen –</option>
|
||
<?php foreach (['Betriebseinnahme','Betriebsausgabe','Anlagevermögen','Zahlungskonto','Verbindlichkeit','Privat'] as $art): ?>
|
||
<option value="<?= $h($art) ?>"<?= ($account['kontenart'] ?? '') === $art ? ' selected' : '' ?>>
|
||
<?= $h($art) ?>
|
||
</option>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
<?php if (isset($errors['kontenart'])): ?>
|
||
<div class="error-text"><?= $h($errors['kontenart']) ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="bezeichnung">Bezeichnung *</label>
|
||
<input type="text" id="bezeichnung" name="bezeichnung"
|
||
value="<?= $h($account['bezeichnung'] ?? '') ?>"
|
||
class="<?= isset($errors['bezeichnung']) ? 'input-error' : '' ?>"
|
||
required>
|
||
<?php if (isset($errors['bezeichnung'])): ?>
|
||
<div class="error-text"><?= $h($errors['bezeichnung']) ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
|
||
<div class="form-grid form-grid-2">
|
||
<div class="form-group">
|
||
<label for="steuercode">Steuercode</label>
|
||
<select id="steuercode" name="steuercode">
|
||
<option value="">– kein –</option>
|
||
<?php foreach (['USt19','USt7','VSt19','VSt7'] as $sc): ?>
|
||
<option value="<?= $sc ?>"<?= ($account['steuercode'] ?? '') === $sc ? ' selected' : '' ?>>
|
||
<?= $sc ?>
|
||
</option>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
<div class="form-hint">USt = Ausgangs-USt, VSt = Vorsteuer</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="ustva_kz">UStVA Kennzahl (ELSTER)</label>
|
||
<input type="text" id="ustva_kz" name="ustva_kz"
|
||
value="<?= $h($account['ustva_kz'] ?? '') ?>"
|
||
placeholder="z.B. 81, 86, 66">
|
||
<div class="form-hint">Kennzahl im ELSTER-Formular</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-grid form-grid-2">
|
||
<div class="form-group">
|
||
<label for="euer_zeile">EÜR-Zeile</label>
|
||
<select id="euer_zeile" name="euer_zeile">
|
||
<option value="">– keine –</option>
|
||
<?php
|
||
$euerZeilen = [
|
||
'11' => '11 – Umsätze (Betriebseinnahmen)',
|
||
'12' => '12 – Umsätze (7 % USt)',
|
||
'13' => '13 – Umsätze (19 % USt)',
|
||
'21' => '21 – Waren/Roh-/Hilfsstoffe',
|
||
'22' => '22 – Bezogene Leistungen',
|
||
'23' => '23 – Löhne und Gehälter',
|
||
'26' => '26 – Miete/Pacht',
|
||
'27' => '27 – AfA',
|
||
'30' => '30 – Zinsen und ähnliche Aufwendungen',
|
||
'42' => '42 – Reisekosten',
|
||
'43' => '43 – Werbekosten',
|
||
'44' => '44 – Bewirtungskosten (70 % abzugsfähig)',
|
||
'45' => '45 – Versicherungen',
|
||
'46' => '46 – Sonstige Betriebsausgaben',
|
||
'48' => '48 – Abschreibungen GWG',
|
||
'51' => '51 – Nicht abzugsfähige Betriebsausgaben (KZ 165)',
|
||
'61' => '61 – Vorsteuer 19 %',
|
||
'62' => '62 – Vorsteuer 7 %',
|
||
'63' => '63 – Umsatzsteuer',
|
||
];
|
||
foreach ($euerZeilen as $val => $label):
|
||
?>
|
||
<option value="<?= $val ?>"<?= ($account['euer_zeile'] ?? '') === $val ? ' selected' : '' ?>>
|
||
<?= $h($label) ?>
|
||
</option>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
<div class="form-hint">Zeile 51 = erscheint in EÜR unter KZ 165</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="beschreibung">Beschreibung</label>
|
||
<textarea id="beschreibung" name="beschreibung"><?= $h($account['beschreibung'] ?? '') ?></textarea>
|
||
</div>
|
||
|
||
<?php if (!empty($account['id'])): ?>
|
||
<div class="form-group">
|
||
<label>
|
||
<input type="checkbox" name="aktiv" value="1"<?= ($account['aktiv'] ?? 1) ? ' checked' : '' ?>>
|
||
Konto aktiv
|
||
</label>
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<div style="display:flex;gap:.75rem;margin-top:1.5rem">
|
||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||
<a href="<?= $h($back ?? '/accounts') ?>" class="btn btn-secondary">Abbrechen</a>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|