var names

This commit is contained in:
shoopea 2020-04-18 16:19:51 +08:00
parent f68f7665bc
commit 0b3c646da4

View File

@ -318,14 +318,14 @@ func loadObjItem() error {
log.Printf("loadObjItem : %s : name missing.\n", objItems[k].Code)
} else {
if idc, okc := cacheObjItem[objItems[k].Code]; okc {
log.Printf("loadObjItem : %s : duplicate code found. Belong to %s\n", objItems[id].Code, objItems[id].Names[0])
log.Printf("loadObjItem : %s : duplicate code found. Belong to %s\n", objItems[idc].Code, objItems[idc].Names[0])
} else {
cacheObjItem[objItems[k].Code] = k
objItems[k].ItemTypeID = cacheObjSubType[objItems[k].ItemType]
for _, n := range objItems[k].Names {
if idn, okn := cacheObjItem[n]; okn {
log.Printf("loadObjItem : %s - %s : duplicate name found. Belongs to %s\n", objItems[k].Code, n, objItems[id].Code)
log.Printf("loadObjItem : %s - %s : duplicate name found. Belongs to %s\n", objItems[k].Code, n, objItems[idn].Code)
} else {
cacheObjItem[n] = k
}