White Label WL-02: verbindliche Tiegelfarbe, Etikettposition und gemeinsamer Resolver
- products.whitelabel_variant_id, product_images.position/size_cm mit Backfill aus Produktnamen - WhiteLabelResolver: Farbe vom Produkt, Kundenlogo je Position, Fehler statt stillem Rückfall; Altlogik für Produkte ohne Variante - Attribute: Variantenwert-Parsing und Farbname ohne Größe - Produkt- und Kundenformular um Variante, Position und Größe ergänzt - Lieferschein noch nicht umgestellt (WL-03, wartet auf K6/K7) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0dc3dea85e
commit
cff749b133
14 changed files with 1159 additions and 280 deletions
|
|
@ -363,18 +363,10 @@ class InvoiceRepository extends BaseRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* Attributwert "Volumen#Größe" (z. B. "40#3,5") in Volumen (ml) und Etikettgröße (cm) zerlegen.
|
||||
* Die Größe steht mit deutschem Komma im Bestand; ein reiner (float)-Cast würde "3,5" zu 3.0 kürzen.
|
||||
*
|
||||
* @return array{0: float, 1: float}
|
||||
*/
|
||||
public static function parseVariantValue(?string $value): array
|
||||
{
|
||||
$parts = explode('#', (string) $value);
|
||||
|
||||
return [
|
||||
(float) reFormatNumber($parts[0] ?? ''),
|
||||
(float) reFormatNumber($parts[1] ?? ''),
|
||||
];
|
||||
return Attribute::parseVariantValue($value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue