protected virtual IPhysicalInventoryStateMergePatched Map(IMergePatchPhysicalInventory c) { var stateEventId = new PhysicalInventoryEventId(c.DocumentNumber, c.Version); IPhysicalInventoryStateMergePatched e = NewPhysicalInventoryStateMergePatched(stateEventId); e.WarehouseId = c.WarehouseId; e.LocatorIdPattern = c.LocatorIdPattern; e.ProductIdPattern = c.ProductIdPattern; e.Posted = c.Posted; e.Processed = c.Processed; e.Processing = c.Processing; e.DocumentTypeId = c.DocumentTypeId; e.MovementDate = c.MovementDate; e.Description = c.Description; e.IsApproved = c.IsApproved; e.ApprovalAmount = c.ApprovalAmount; e.IsQuantityUpdated = c.IsQuantityUpdated; e.ReversalDocumentNumber = c.ReversalDocumentNumber; e.Active = c.Active; e.IsPropertyWarehouseIdRemoved = c.IsPropertyWarehouseIdRemoved; e.IsPropertyLocatorIdPatternRemoved = c.IsPropertyLocatorIdPatternRemoved; e.IsPropertyProductIdPatternRemoved = c.IsPropertyProductIdPatternRemoved; e.IsPropertyPostedRemoved = c.IsPropertyPostedRemoved; e.IsPropertyProcessedRemoved = c.IsPropertyProcessedRemoved; e.IsPropertyProcessingRemoved = c.IsPropertyProcessingRemoved; e.IsPropertyDocumentTypeIdRemoved = c.IsPropertyDocumentTypeIdRemoved; e.IsPropertyMovementDateRemoved = c.IsPropertyMovementDateRemoved; e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved; e.IsPropertyIsApprovedRemoved = c.IsPropertyIsApprovedRemoved; e.IsPropertyApprovalAmountRemoved = c.IsPropertyApprovalAmountRemoved; e.IsPropertyIsQuantityUpdatedRemoved = c.IsPropertyIsQuantityUpdatedRemoved; e.IsPropertyReversalDocumentNumberRemoved = c.IsPropertyReversalDocumentNumberRemoved; e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; foreach (IPhysicalInventoryLineCommand innerCommand in c.PhysicalInventoryLineCommands) { ThrowOnInconsistentCommands(c, innerCommand); IPhysicalInventoryLineEvent innerEvent = Map(innerCommand, c, version, _state); e.AddPhysicalInventoryLineEvent(innerEvent); } return(e); }
public override void When(IMergePatchPhysicalInventory c) { AssertDocumentStatus(c.DocumentNumber, DocumentStatusIds.Drafted); base.When(c); }
public virtual void When(IMergePatchPhysicalInventory c) { Update(c, ar => ar.MergePatch(c)); }
void IPhysicalInventoryApplicationService.When(IMergePatchPhysicalInventory c) { this.When((MergePatchPhysicalInventoryDto)c); }
public virtual void MergePatch(IMergePatchPhysicalInventory c) { IPhysicalInventoryStateMergePatched e = Map(c); Apply(e); }