106 lines
5.6 KiB
PHP
106 lines
5.6 KiB
PHP
<section class="admin-section narrow-section">
|
|
<div class="section-header">
|
|
<div>
|
|
<p class="eyebrow">Auftragsdetail</p>
|
|
<h1><?= h($booking['reference']) ?></h1>
|
|
</div>
|
|
<a class="button-secondary" href="<?= h(url('admin')) ?>">Zurueck zum Dashboard</a>
|
|
</div>
|
|
|
|
<?php if (!empty($flashSuccess)): ?>
|
|
<div class="flash flash-success"><?= h((string) $flashSuccess) ?></div>
|
|
<?php endif; ?>
|
|
<?php if (!empty($flashError)): ?>
|
|
<div class="flash flash-error"><?= h((string) $flashError) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<div class="detail-grid">
|
|
<article class="table-card">
|
|
<h2>Kundendaten</h2>
|
|
<dl class="detail-list">
|
|
<div><dt>Name</dt><dd><?= h($booking['customer']['name']) ?></dd></div>
|
|
<div><dt>Firma</dt><dd><?= h($booking['customer']['company'] ?: '-') ?></dd></div>
|
|
<div><dt>E-Mail</dt><dd><?= h($booking['customer']['email']) ?></dd></div>
|
|
<div><dt>Telefon</dt><dd><?= h($booking['customer']['phone']) ?></dd></div>
|
|
<div><dt>Adresse</dt><dd><?= h($booking['customer']['street']) ?>, <?= h($booking['customer']['postal_code']) ?> <?= h($booking['customer']['city']) ?></dd></div>
|
|
<div><dt>Anlass</dt><dd><?= h($booking['customer']['event_type'] ?: '-') ?></dd></div>
|
|
<div><dt>Ort</dt><dd><?= h($booking['customer']['event_location'] ?: '-') ?></dd></div>
|
|
<div><dt>Mietzeitraum</dt><dd><?= h(formatDate($booking['start_date'])) ?> bis <?= h(formatDate($booking['end_date'])) ?></dd></div>
|
|
<div><dt>Leistung</dt><dd><?= h($booking['delivery_mode_label']) ?></dd></div>
|
|
<div><dt>Zahlungsart</dt><dd><?= h($booking['payment_method_label']) ?></dd></div>
|
|
<div><dt>Gesamt</dt><dd><?= h(formatCurrency((int) $booking['subtotal_cents'])) ?></dd></div>
|
|
</dl>
|
|
</article>
|
|
|
|
<article class="table-card">
|
|
<h2>Verwaltung</h2>
|
|
<form method="post" action="<?= h(url('admin/order/update')) ?>" class="stack-form">
|
|
<input type="hidden" name="booking_id" value="<?= h($booking['id']) ?>">
|
|
<label>
|
|
<span>Status</span>
|
|
<select name="status">
|
|
<?php foreach ($statusOptions as $value => $label): ?>
|
|
<option value="<?= h($value) ?>" <?= selected((string) $booking['status'], (string) $value) ?>><?= h($label) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Zahlungsstatus</span>
|
|
<select name="payment_status">
|
|
<?php foreach ($paymentOptions as $value => $label): ?>
|
|
<option value="<?= h($value) ?>" <?= selected((string) $booking['payment_status'], (string) $value) ?>><?= h($label) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Kundennotiz</span>
|
|
<textarea name="notes_customer" rows="4"><?= h((string) $booking['notes_customer']) ?></textarea>
|
|
</label>
|
|
<label>
|
|
<span>Interne Notiz</span>
|
|
<textarea name="internal_notes" rows="4"><?= h((string) $booking['internal_notes']) ?></textarea>
|
|
</label>
|
|
<button type="submit" class="button-primary">Aenderungen speichern</button>
|
|
</form>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="detail-grid">
|
|
<article class="table-card">
|
|
<h2>Rechnung</h2>
|
|
<?php if ($invoice !== null): ?>
|
|
<p>Rechnung <strong><?= h($invoice['invoice_number']) ?></strong> ist erstellt.</p>
|
|
<ul class="check-list compact-list">
|
|
<li>Faellig am <?= h(formatDate($invoice['due_date'])) ?></li>
|
|
<li>Gesamtbetrag <?= h(formatCurrency((int) $invoice['total_cents'])) ?></li>
|
|
<li>Zahlungsart <?= h($invoice['payment_method_label']) ?></li>
|
|
</ul>
|
|
<a class="button-secondary" href="<?= h(url('admin/invoice/pdf?id=' . urlencode($invoice['id']))) ?>" target="_blank">PDF oeffnen</a>
|
|
<?php else: ?>
|
|
<p>Fuer diesen Auftrag wurde noch keine Rechnung erstellt.</p>
|
|
<form method="post" action="<?= h(url('admin/order/invoice')) ?>" class="stack-form">
|
|
<input type="hidden" name="booking_id" value="<?= h($booking['id']) ?>">
|
|
<label>
|
|
<span>Faelligkeitsdatum</span>
|
|
<input type="date" name="due_date">
|
|
</label>
|
|
<label>
|
|
<span>Rechnungsnotiz</span>
|
|
<textarea name="invoice_notes" rows="4">Vielen Dank fuer deinen Auftrag.</textarea>
|
|
</label>
|
|
<button type="submit" class="button-primary">Rechnung erstellen</button>
|
|
</form>
|
|
<?php endif; ?>
|
|
</article>
|
|
<article class="table-card">
|
|
<h2>Systeminfos</h2>
|
|
<dl class="detail-list">
|
|
<div><dt>ID</dt><dd><?= h($booking['id']) ?></dd></div>
|
|
<div><dt>Quelle</dt><dd><?= h($booking['source']) ?></dd></div>
|
|
<div><dt>Erstellt</dt><dd><?= h($booking['created_at']) ?></dd></div>
|
|
<div><dt>Aktualisiert</dt><dd><?= h($booking['updated_at']) ?></dd></div>
|
|
</dl>
|
|
</article>
|
|
</div>
|
|
</section>
|