This commit is contained in:
shoopea 2020-01-14 11:42:00 +08:00
parent 416a59e3c1
commit 26b3368057

3
job.go
View File

@ -1447,10 +1447,13 @@ func jobGWithdraw(j Job) {
logOnError(err, "jobGWithdraw : getMsgParsingRule") logOnError(err, "jobGWithdraw : getMsgParsingRule")
cwm, err := parseSubTypeMessageGStockAnyAck(m, rule.re) cwm, err := parseSubTypeMessageGStockAnyAck(m, rule.re)
logOnError(err, "jobGWithdraw : parseSubTypeMessageGStockAnyAck") logOnError(err, "jobGWithdraw : parseSubTypeMessageGStockAnyAck")
for k, req := range p.Items { for k, req := range p.Items {
for _, disp := range cwm.Stock { for _, disp := range cwm.Stock {
if req.Code == disp.Code { if req.Code == disp.Code {
p.Items[k].Available = disp.Quantity p.Items[k].Available = disp.Quantity
p.Items[k].Name = disp.Name
log.Printf("jobGWithdraw[%d] : Found %s - %s : %d.\n", j.ID64, disp.Code, disp.Name, disp.Quantity)
} }
} }
} }