Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -271,9 +271,24 @@ func buildOrderPDFBytesForMail(db *sql.DB, pgDB *sql.DB, orderID string) ([]byte
|
||||
return nil, nil, err
|
||||
}
|
||||
rows := normalizeOrderLinesForPdf(lines, sizeMatchData)
|
||||
for _, rr := range rows {
|
||||
if strings.TrimSpace(rr.Category) == "" {
|
||||
return nil, nil, fmt.Errorf("product-size-match unmapped row: %s/%s/%s", rr.Model, rr.GroupMain, rr.GroupSub)
|
||||
for i := range rows {
|
||||
if strings.TrimSpace(rows[i].Category) != "" {
|
||||
continue
|
||||
}
|
||||
bedenList := make([]string, 0, len(rows[i].SizeQty))
|
||||
for s := range rows[i].SizeQty {
|
||||
bedenList = append(bedenList, s)
|
||||
}
|
||||
rows[i].Category = detectBedenGroupGo(
|
||||
sizeMatchData,
|
||||
bedenList,
|
||||
rows[i].GroupMain,
|
||||
rows[i].GroupSub,
|
||||
rows[i].YetiskinGarson,
|
||||
rows[i].YetiskinGarson,
|
||||
)
|
||||
if strings.TrimSpace(rows[i].Category) == "" {
|
||||
rows[i].Category = catTak
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user