| | |
| | | operation.Status = constvar.OperationStatus_Ready |
| | | operation.OperationTypeName = operationType.Name |
| | | operation.OperationTypeId = operationType.Id |
| | | operation.FromLocationID = fromLocation.Id |
| | | operation.ToLocationID = toLocation.Id |
| | | operation.BaseOperationType = constvar.BaseOperationTypeOutgoing |
| | | operation.Source = req.Source |
| | | operation.LocationID = fromLocation.Id |
| | | if req.OperationType == 1 { |
| | | operation.LocationID = toLocation.Id |
| | | } |
| | | or.WorkOrderId = operation.SourceNumber |
| | | or.Number = operation.Number |
| | | operationResp = append(operationResp, &or) |
| | |
| | | var detail models.OperationDetails |
| | | detail.ProductId = product.ProductNumber |
| | | detail.Amount = decimal.NewFromInt(product.Amount) |
| | | detail.FromLocationID = fromLocation.Id |
| | | detail.ToLocationID = toLocation.Id |
| | | details = append(details, &detail) |
| | | } |
| | | operation.Details = details |