Nächster Schritt sofort sichtbar, Saisonkopie ohne Preislücke
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m34s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m34s
- Vorgang: Die Kopfaktionen werden nach jeder Aktion neu aufgebaut, damit der große Schalter gleich den nächsten Schritt zeigt (Filament baut sie vor der Aktion auf). - In Folgejahr kopieren: Reicht eine bestehende Saison (z. B. Neujahr über den Jahreswechsel) nur über Beginn oder Ende der Kopie, wird die Kopie dort gekürzt statt ganz übersprungen; sonst blieb z. B. Januar bis März ohne Preis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
150a64e100
commit
2d2ffffa33
6 files changed
+90
-6
No files matched your search
@@ -104,6 +104,22 @@ public function test_copying_seasons_moves_their_start_to_the_weekday_and_keeps_
|
||||
$this->assertTrue($copies->every(fn (Season $season): bool => $season->starts_on->isSaturday()));
|
||||
}
|
||||
|
||||
public function test_a_season_over_the_turn_of_the_year_shortens_the_copy_instead_of_leaving_a_gap(): void
|
||||
{
|
||||
Season::factory()->for($this->property)->create(['name' => 'Winter', 'starts_on' => '2026-01-03', 'ends_on' => '2026-03-07', 'nightly_rate' => 5500, 'min_nights' => 2]);
|
||||
Season::factory()->for($this->property)->create(['name' => 'Nebensaison', 'starts_on' => '2026-03-07', 'ends_on' => '2026-04-03', 'nightly_rate' => 6500, 'min_nights' => 2]);
|
||||
Season::factory()->for($this->property)->create(['name' => 'Neujahr', 'starts_on' => '2026-12-26', 'ends_on' => '2027-01-03', 'nightly_rate' => 11500, 'min_nights' => 6]);
|
||||
|
||||
$result = app(CopySeasonsToNextYear::class)->handle($this->property, 2026, 6);
|
||||
|
||||
$winter = $this->property->seasons()->where('name', 'Winter')->whereYear('starts_on', 2027)->sole();
|
||||
$this->assertSame(['2027-01-03', '2027-03-06'], [$winter->starts_on->toDateString(), $winter->ends_on->toDateString()]);
|
||||
$this->assertSame([0, 1], [$result['skipped'], $result['trimmed']]);
|
||||
|
||||
$again = app(CopySeasonsToNextYear::class)->handle($this->property, 2026, 6);
|
||||
$this->assertSame([0, 0], [$again['created'], $again['trimmed']]);
|
||||
}
|
||||
|
||||
public function test_rules_are_edited_next_to_the_seasons(): void
|
||||
{
|
||||
$this->actingAs(User::factory()->create());
|
||||
|
||||
Reference in new issue
Block a user