Anti-waste: themed border, rich info badges, fix latte di montagna shelf-life, exclude opened from expiring_soon

This commit is contained in:
dadaloop82
2026-04-29 06:19:35 +00:00
parent 0f247a3132
commit 7c4dd99289
7 changed files with 73 additions and 18 deletions
+3 -1
View File
@@ -269,7 +269,9 @@ function estimateOpenedExpiryDaysPHP(string $name, string $category, string $loc
// ── F: Fridge — short-life perishables ──────────────────────────────
if (preg_match('/latte\s+(fresco|intero|parzial|scremato)/', $n)) return 3;
if (preg_match('/latte\s+(uht|a\s+lunga)/', $n)) return 5;
if (preg_match('/latte\s+(uht|a\s+lunga)/', $n)) return 7;
// Long-life mountain/brand milks stored in pantry before use (UHT)
if (preg_match('/latte.*(montagna|alta\s+qual|parmalat|granarolo|esselunga|conservaz|microfiltrat)/i', $n)) return 7;
if (preg_match('/\blatte\b/', $n)) return 4;
if (preg_match('/\byogurt\b/', $n)) return 5;
if (preg_match('/mozzarella|burrata|stracciatella/', $n)) return 3;