| | |
| | | for _, detail := range details { |
| | | var resp response.InventoryHistory |
| | | resp.Amount = detail.Amount |
| | | resp.Unit = params.Unit |
| | | resp.ProductName = params.ProductName |
| | | resp.Unit = detail.Product.Unit |
| | | resp.ProductName = detail.Product.Name |
| | | for _, operation := range operations { |
| | | if detail.OperationID == operation.Id { |
| | | resp.Number = operation.Number |
| | |
| | | resp.ContactedName = operation.ContacterName |
| | | resp.FromLocation = operation.FromLocation.Name |
| | | resp.ToLocation = operation.ToLocation.Name |
| | | resp.BaseOperationType = operation.BaseOperationType |
| | | result = append(result, resp) |
| | | break |
| | | } |