Pakete 8, 5 und 6: Beträge und Zahlungen, Ändern und Stornieren, A6 im Vorgang
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m44s

- Paket 8: Zahlungsarten (Gast an uns, laut Portal, Auszahlung, Erstattung),
  Portalbeträge als Angaben mit Quelle, Übersicht nach Zuständigkeit (R09).
- Paket 5: Ändern mit Folgenvorschau, vereinbart oder dem Gast vorgeschlagen
  (signierter Link), ein Stornoweg mit Grund und Erstattung, Portalstorno erst
  nach Bestätigung.
- Paket 6: eigene Nutzung, Besuch und Sperre als Vorgang mit Kurabgabe und
  Aufenthaltsbestätigung; Bestandsübernahme der Sperren mit identischem Export.
- Wirksame Einstellungen (Expertenansicht), Abnahmekatalog T01–T14, Ergebnis-,
  Abnahme- und Konfigurationsdokument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-01 22:16:47 +01:00
1 parent 33f8f899d6
commit 3bcfc09417
77 files changed
+3638 -122

No files matched your search

@@ -0,0 +1,94 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Packages 8, 5 and 6 of UMSETZUNGSPLAN_v0.10:
* - external amounts of a case with kind, source and date (case_amounts) and the kind of every payment – a payment of
* the guest to us, one the portal reports as paid to it, a payout of the portal, a refund (package 8);
* - changes of a booking with who asked, why, from when and on which basis, agreed or proposed to the guest (package 5);
* a cancellation records its reason and who entered it; a portal cancellation can wait for the portal's confirmation;
* - own use, private stays and blocks as cases (package 6): their kind, occasion, tourist tax and – for blocks taken over
* from the old block list – the calendar identity the portals already know.
* Purely additive; existing payments count as payments of the guest to us.
*/
return new class extends Migration
{
public function up(): void
{
Schema::table('payments', function (Blueprint $table): void {
$table->string('kind', 20)->default('guest');
$table->string('source', 120)->nullable();
});
Schema::create('case_amounts', function (Blueprint $table): void {
$table->id();
$table->foreignId('tenant_id')->nullable()->constrained()->cascadeOnDelete();
$table->foreignId('booking_id')->constrained()->cascadeOnDelete();
$table->string('kind', 20);
$table->string('label', 150)->nullable();
$table->integer('amount');
$table->string('source', 120)->nullable();
$table->date('stated_on')->nullable();
$table->date('due_on')->nullable();
$table->string('note', 500)->nullable();
$table->string('recorded_by', 120)->nullable();
$table->timestamps();
$table->index(['booking_id', 'kind']);
});
Schema::create('booking_changes', function (Blueprint $table): void {
$table->id();
$table->foreignId('tenant_id')->nullable()->constrained()->cascadeOnDelete();
$table->foreignId('booking_id')->constrained()->cascadeOnDelete();
$table->string('status', 12);
$table->string('requested_by', 12);
$table->string('basis', 20)->nullable();
$table->text('reason')->nullable();
$table->date('effective_on')->nullable();
$table->timestamp('agreed_at')->nullable();
$table->string('agreed_by', 120)->nullable();
$table->json('before');
$table->json('after');
$table->json('consequences')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamp('decided_at')->nullable();
$table->string('decision_ip_hash', 64)->nullable();
$table->timestamp('applied_at')->nullable();
$table->timestamp('confirmation_sent_at')->nullable();
$table->string('recorded_by', 120)->nullable();
$table->timestamps();
$table->index(['booking_id', 'status']);
});
Schema::table('cancellations', function (Blueprint $table): void {
$table->text('reason')->nullable();
$table->string('recorded_by', 120)->nullable();
});
Schema::table('bookings', function (Blueprint $table): void {
$table->string('internal_kind', 16)->nullable();
$table->string('occasion', 255)->nullable();
$table->string('export_uid', 120)->nullable();
$table->unsignedTinyInteger('tourist_tax_persons')->nullable();
$table->string('tourist_tax_note', 255)->nullable();
$table->timestamp('portal_cancellation_requested_at')->nullable();
});
Schema::table('properties', function (Blueprint $table): void {
$table->unsignedInteger('tourist_tax_rate')->nullable();
});
}
public function down(): void
{
Schema::table('properties', fn (Blueprint $table) => $table->dropColumn('tourist_tax_rate'));
Schema::table('bookings', fn (Blueprint $table) => $table->dropColumn(['internal_kind', 'occasion', 'export_uid', 'tourist_tax_persons', 'tourist_tax_note', 'portal_cancellation_requested_at']));
Schema::table('cancellations', fn (Blueprint $table) => $table->dropColumn(['reason', 'recorded_by']));
Schema::dropIfExists('booking_changes');
Schema::dropIfExists('case_amounts');
Schema::table('payments', fn (Blueprint $table) => $table->dropColumn(['kind', 'source']));
}
};