diff --git a/api/database.php b/api/database.php index e9e87d7..66e1068 100644 --- a/api/database.php +++ b/api/database.php @@ -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; diff --git a/assets/js/app.js b/assets/js/app.js index 3c2b2ca..8b95bb9 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -1669,7 +1669,7 @@ function estimateOpenedExpiryDays(product, location) { if (/latte\s+(uht|a\s+lunga)/.test(name)) return 7; // Long-life mountain/brand milks stored in pantry before use (UHT) if (/latte.*(montagna|alta\s+qual|parmalat|granarolo|esselunga|conservaz|microfiltrat)/i.test(name)) return 7; - if (/\blatte\b/.test(name)) return 4; + if (/\blatte\b/.test(name)) return 7; // generic: default to UHT (most common in IT households) if (/\b(yogurt|yaourt|yoghurt)\b/.test(name)) return 5; if (/mozzarella|burrata|stracciatella/.test(name)) return 3; if (/philadelphia|spalmabile/.test(name)) return 7; diff --git a/index.html b/index.html index de8ce76..322a21e 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ EverShelf - + @@ -1469,6 +1469,6 @@ - +