fix: generic 'latte' opened shelf life 4→7 days (UHT default)

Fresh milk is explicitly matched by 'latte fresco/intero/parzial/scremato' (3 days).
Generic 'Latte' without qualifier is almost always UHT in Italian households — 7 days.
This commit is contained in:
dadaloop82
2026-05-11 17:07:59 +00:00
parent 8407dea781
commit 85090ecc9f
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ function estimateOpenedExpiryDaysPHP(string $name, string $category, string $loc
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('/\blatte\b/', $n)) return 7; // generic: default to UHT (most common in IT households)
if (preg_match('/\b(yogurt|yaourt|yoghurt)\b/', $n)) return 5;
if (preg_match('/mozzarella|burrata|stracciatella/', $n)) return 3;
if (preg_match('/philadelphia|spalmabile/', $n)) return 7;