fix: isSuspiciousDefaultQty — use package_unit threshold for pz+g/ml products

This commit is contained in:
dadaloop82
2026-05-23 08:28:58 +00:00
parent b38bdc45f5
commit 3c8a9693b2
+1 -1
View File
@@ -4551,7 +4551,7 @@ function isSuspiciousQty(qty, unit) {
function isSuspiciousDefaultQty(defaultQty, unit, packageUnit) {
const n = parseFloat(defaultQty);
if (!n || n <= 0) return false;
const checkUnit = (unit === 'conf' && packageUnit) ? packageUnit : unit;
const checkUnit = ((unit === 'conf' || unit === 'pz') && packageUnit) ? packageUnit : unit;
const th = QTY_THRESHOLDS[checkUnit] || QTY_THRESHOLDS['pz'];
return n > th.max;
}