Uhrzeiten, Miete und Lieferkosten ergänzen; Server-Stand übernehmen
- bookings um optionale start_time/end_time sowie rent_cents und delivery_cents erweitert; Gesamtbetrag ist Miete + Lieferkosten (Migration 003, Schema und Doku nachgezogen) - Formular, Detailansicht, Panel, Kalender und Kopiertext zeigen Uhrzeiten und die getrennten Beträge - Live-Stand nachgezogen: Impressum/Datenschutz, Privacy-Cleanup im Cron-Lauf, Löschsperre für Buchungen mit Rechnung - Cache-Buster auf Version 10 erhöht
This commit is contained in:
parent
672df3d0a7
commit
d47a72820d
24 changed files with 1157 additions and 92 deletions
14
sql/migrations/003_booking_times_fees.sql
Normal file
14
sql/migrations/003_booking_times_fees.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- Uhrzeiten (optional) und getrennte Beträge Miete / Lieferkosten.
|
||||
--
|
||||
-- Die Felder entsprechen der Vorlage „Neuanlage“ aus docs/App DC.xlsx:
|
||||
-- Von/Bis mit Uhrzeit sowie Miete und Lieferkosten, deren Summe der
|
||||
-- Gesamtbetrag ist. Bestehende Buchungen behalten ihren Gesamtbetrag; er
|
||||
-- wird als Miete übernommen, damit Miete + Lieferkosten = Gesamt gilt.
|
||||
|
||||
ALTER TABLE bookings
|
||||
ADD COLUMN start_time TIME NULL DEFAULT NULL AFTER end_date,
|
||||
ADD COLUMN end_time TIME NULL DEFAULT NULL AFTER start_time,
|
||||
ADD COLUMN rent_cents INT UNSIGNED NOT NULL DEFAULT 0 AFTER deposit_cents,
|
||||
ADD COLUMN delivery_cents INT UNSIGNED NOT NULL DEFAULT 0 AFTER rent_cents;
|
||||
|
||||
UPDATE bookings SET rent_cents = total_cents WHERE rent_cents = 0 AND total_cents > 0;
|
||||
|
|
@ -61,7 +61,11 @@ CREATE TABLE IF NOT EXISTS bookings (
|
|||
employee_id BIGINT UNSIGNED NOT NULL,
|
||||
start_date DATE NOT NULL,
|
||||
end_date DATE NOT NULL,
|
||||
start_time TIME NULL DEFAULT NULL,
|
||||
end_time TIME NULL DEFAULT NULL,
|
||||
deposit_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
rent_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
delivery_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
total_cents INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
invoice TINYINT(1) NOT NULL DEFAULT 0,
|
||||
kind ENUM('pickup', 'delivery') NOT NULL DEFAULT 'pickup',
|
||||
|
|
@ -163,6 +167,7 @@ INSERT IGNORE INTO employees (name, sort_order, created_at) VALUES
|
|||
|
||||
INSERT IGNORE INTO schema_migrations (version, applied_at) VALUES (1, UTC_TIMESTAMP());
|
||||
INSERT IGNORE INTO schema_migrations (version, applied_at) VALUES (2, UTC_TIMESTAMP());
|
||||
INSERT IGNORE INTO schema_migrations (version, applied_at) VALUES (3, UTC_TIMESTAMP());
|
||||
|
||||
-- Web-Push-Abos (VAPID) und Versandprotokoll für Erinnerungen.
|
||||
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue