Phase 1: Wohnungen, Saisons & Preisberechnung
- Datenmodell Property/Season/Extra (Beträge in Cent), Seeder mit Preisliste 2026 - PriceCalculator: Saison-Splitting, Mindestaufenthalt, Zusatzperson, Endreinigung, Extras, Anzahlung/Restzahlung - Filament-Verwaltung: Wohnungen, Saisons (Überschneidungsprüfung, Lückenwarnung, Kopie ins Folgejahr, Preisrechner), Zusatzleistungen - Tests für Preisberechnung und Saisonverwaltung Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bf4c1c0838
commit
2e9a391b37
35 files changed
+1766
-12
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Pricing;
|
||||
|
||||
use App\Enums\QuoteLineType;
|
||||
|
||||
/**
|
||||
* One position of a price quote. Amounts are in euro cents.
|
||||
*/
|
||||
final readonly class QuoteLine
|
||||
{
|
||||
public function __construct(
|
||||
public QuoteLineType $type,
|
||||
public string $label,
|
||||
public int $quantity,
|
||||
public int $unitPrice,
|
||||
public int $amount,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @return array{type: string, label: string, quantity: int, unit_price: int, amount: int}
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'type' => $this->type->value,
|
||||
'label' => $this->label,
|
||||
'quantity' => $this->quantity,
|
||||
'unit_price' => $this->unitPrice,
|
||||
'amount' => $this->amount,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user