121 lines
6.3 KiB
PHP
121 lines
6.3 KiB
PHP
<section class="admin-section narrow-section">
|
|
<div class="section-header">
|
|
<div>
|
|
<p class="eyebrow">Manuelle Buchung</p>
|
|
<h1>Bestellung fuer Kunden anlegen</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; ?>
|
|
|
|
<form method="post" action="<?= h(url('admin/create')) ?>" class="booking-form admin-form" data-day-rate="<?= h((string) $defaults['price_per_day_cents']) ?>">
|
|
<div class="form-grid">
|
|
<label>
|
|
<span>Name</span>
|
|
<input type="text" name="customer_name" value="<?= h((string) ($old['customer_name'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Firma</span>
|
|
<input type="text" name="company" value="<?= h((string) ($old['company'] ?? '')) ?>">
|
|
</label>
|
|
<label>
|
|
<span>E-Mail</span>
|
|
<input type="email" name="email" value="<?= h((string) ($old['email'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Telefon</span>
|
|
<input type="text" name="phone" value="<?= h((string) ($old['phone'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Strasse</span>
|
|
<input type="text" name="street" value="<?= h((string) ($old['street'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>PLZ</span>
|
|
<input type="text" name="postal_code" value="<?= h((string) ($old['postal_code'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Ort</span>
|
|
<input type="text" name="city" value="<?= h((string) ($old['city'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Anlass</span>
|
|
<input type="text" name="event_type" value="<?= h((string) ($old['event_type'] ?? '')) ?>">
|
|
</label>
|
|
<label>
|
|
<span>Veranstaltungsort</span>
|
|
<input type="text" name="event_location" value="<?= h((string) ($old['event_location'] ?? '')) ?>">
|
|
</label>
|
|
<label>
|
|
<span>Mietbeginn</span>
|
|
<input type="date" name="start_date" data-booking-start value="<?= h((string) ($old['start_date'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Mietende</span>
|
|
<input type="date" name="end_date" data-booking-end value="<?= h((string) ($old['end_date'] ?? '')) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Tagespreis in Cent</span>
|
|
<input type="number" name="price_per_day_cents" min="0" value="<?= h((string) ($old['price_per_day_cents'] ?? $defaults['price_per_day_cents'])) ?>" required>
|
|
</label>
|
|
<label>
|
|
<span>Status</span>
|
|
<select name="status">
|
|
<option value="confirmed" <?= selected((string) ($old['status'] ?? $defaults['status']), 'confirmed') ?>>Bestaetigt</option>
|
|
<option value="reserved" <?= selected((string) ($old['status'] ?? ''), 'reserved') ?>>Reserviert</option>
|
|
<option value="requested" <?= selected((string) ($old['status'] ?? ''), 'requested') ?>>Neue Anfrage</option>
|
|
<option value="cancelled" <?= selected((string) ($old['status'] ?? ''), 'cancelled') ?>>Storniert</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Zahlungsstatus</span>
|
|
<select name="payment_status">
|
|
<option value="unpaid" <?= selected((string) ($old['payment_status'] ?? $defaults['payment_status']), 'unpaid') ?>>Offen</option>
|
|
<option value="paid" <?= selected((string) ($old['payment_status'] ?? ''), 'paid') ?>>Bezahlt</option>
|
|
<option value="refunded" <?= selected((string) ($old['payment_status'] ?? ''), 'refunded') ?>>Erstattet</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Lieferart</span>
|
|
<select name="delivery_mode">
|
|
<option value="self_pickup" <?= selected((string) ($old['delivery_mode'] ?? $defaults['delivery_mode']), 'self_pickup') ?>>Selbstabholung</option>
|
|
<option value="delivery_setup" <?= selected((string) ($old['delivery_mode'] ?? ''), 'delivery_setup') ?>>Lieferung und Aufbau</option>
|
|
<option value="on_site_support" <?= selected((string) ($old['delivery_mode'] ?? ''), 'on_site_support') ?>>Lieferung, Aufbau und Vor-Ort-Betreuung</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Zahlungsart</span>
|
|
<select name="payment_method">
|
|
<option value="invoice_transfer" <?= selected((string) ($old['payment_method'] ?? $defaults['payment_method']), 'invoice_transfer') ?>>Rechnung / Ueberweisung</option>
|
|
<option value="paypal" <?= selected((string) ($old['payment_method'] ?? ''), 'paypal') ?>>PayPal</option>
|
|
</select>
|
|
</label>
|
|
</div>
|
|
<label>
|
|
<span>Hinweis fuer Kunden</span>
|
|
<textarea name="notes_customer" rows="4"><?= h((string) ($old['notes_customer'] ?? '')) ?></textarea>
|
|
</label>
|
|
<label>
|
|
<span>Interne Notiz</span>
|
|
<textarea name="internal_notes" rows="4"><?= h((string) ($old['internal_notes'] ?? '')) ?></textarea>
|
|
</label>
|
|
<div class="price-summary">
|
|
<div>
|
|
<span>Mietdauer</span>
|
|
<strong data-summary-days>Noch nicht gewaehlt</strong>
|
|
</div>
|
|
<div>
|
|
<span>Gesamtpreis</span>
|
|
<strong data-summary-total><?= h(formatCurrency((int) $defaults['price_per_day_cents'])) ?></strong>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="button-primary">Bestellung speichern</button>
|
|
</form>
|
|
</section>
|