public SalesOrder UnconfirmObject(SalesOrder salesOrder, ISalesOrderDetailService _salesOrderDetailService, IDeliveryOrderService _deliveryOrderService, IDeliveryOrderDetailService _deliveryOrderDetailService, IStockMutationService _stockMutationService, IItemService _itemService, IBarringService _barringService, IWarehouseItemService _warehouseItemService) { if (_validator.ValidUnconfirmObject(salesOrder, _deliveryOrderService)) { IList <SalesOrderDetail> salesOrderDetails = _salesOrderDetailService.GetObjectsBySalesOrderId(salesOrder.Id); foreach (var detail in salesOrderDetails) { detail.Errors = new Dictionary <string, string>(); _salesOrderDetailService.UnconfirmObject(detail, this, _deliveryOrderDetailService, _stockMutationService, _itemService, _barringService, _warehouseItemService); } _repository.UnconfirmObject(salesOrder); } return(salesOrder); }