示例#1
0
 public SalesOrder ConfirmObject(SalesOrder salesOrder, DateTime ConfirmationDate, ISalesOrderDetailService _salesOrderDetailService,
                                 IStockMutationService _stockMutationService, IItemService _itemService, IBarringService _barringService,
                                 IWarehouseItemService _warehouseItemService)
 {
     salesOrder.ConfirmationDate = ConfirmationDate;
     if (_validator.ValidConfirmObject(salesOrder, _salesOrderDetailService))
     {
         IList <SalesOrderDetail> salesOrderDetails = _salesOrderDetailService.GetObjectsBySalesOrderId(salesOrder.Id);
         foreach (var detail in salesOrderDetails)
         {
             detail.Errors = new Dictionary <string, string>();
             _salesOrderDetailService.ConfirmObject(detail, ConfirmationDate, _stockMutationService, _itemService,
                                                    _barringService, _warehouseItemService);
         }
         _repository.ConfirmObject(salesOrder);
     }
     return(salesOrder);
 }