| | |
| | | } else { |
| | | if locAmount, aok := mapLocAmount[strconv.Itoa(operation.LocationID)+v.ProductId]; aok { |
| | | locAmount.Amount = locAmount.Amount.Add(v.Amount) |
| | | locAmount.ID = uint(locAmount.Id) |
| | | if err := models.NewLocationProductAmountSearch().SetOrm(tx).SetID(int(locAmount.ID)).Save(locAmount); err != nil { |
| | | return err |
| | | } |
| | |
| | | if v.IsInternalOutput { |
| | | var inputDetail models.OperationDetails |
| | | mapstructure.Decode(v, &inputDetail) |
| | | inputDetail.Id = 0 |
| | | inputDetail.OperationID = 0 |
| | | internalInputDetails = append(internalInputDetails, &inputDetail) |
| | | } |