Files
fewo-stommer/app/Pricing/QuoteLine.php
Lars StommerandClaude Opus 5.5 2e9a391b37 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>
2026-10-22 09:19:49 +02:00

34 lines
758 B
PHP

<?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,
];
}
}