Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -565,18 +565,12 @@ func productSeriesRuleFitsGroup(group string, rule productSeriesAutoRule) bool {
|
||||
if rule.GroupKey != "" && rule.GroupKey != group {
|
||||
return false
|
||||
}
|
||||
groupSizes := map[string]struct{}{}
|
||||
for _, size := range productSeriesSizeGroups[group] {
|
||||
groupSizes[normalizeProductSeriesSize(size)] = struct{}{}
|
||||
}
|
||||
if len(groupSizes) == 0 {
|
||||
return true
|
||||
}
|
||||
for size := range rule.Ratio {
|
||||
if _, ok := groupSizes[size]; !ok {
|
||||
return false
|
||||
}
|
||||
}
|
||||
// NOTE: In this installation, Nebim ItemDim1Code (size_code) can be numeric tokens that do not match the
|
||||
// hardcoded group size lists (e.g. "XS/S/M..."). Enforcing those lists causes valid rules to be rejected
|
||||
// and series assignment to stay blank across many products.
|
||||
//
|
||||
// We therefore rely only on explicit rule.GroupKey when provided, and otherwise allow the rule to compete
|
||||
// based on actual stock consumption.
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user