| | |
| | | } |
| | | operations := make([]*models.Operation, 0, len(outputList)) |
| | | for _, output := range outputList { |
| | | location, err := models.NewLocationSearch().SetType(int(constvar.LocationTypeCustomer)).First() |
| | | if err != nil { |
| | | return err |
| | | } |
| | | details := make([]*models.OperationDetails, 0, len(output.Products)) |
| | | for _, product := range output.Products { |
| | | details = append(details, &models.OperationDetails{ |
| | |
| | | ProductId: product.ProductID, |
| | | Amount: product.Amount, |
| | | FromLocationID: output.LocationID, |
| | | ToLocationID: location.Id, |
| | | }) |
| | | } |
| | | if opTypeMap[output.WarehouseID] == nil { |