Exemplo n.º 1
0
        /// <summary>
        /// Получение позиций входящих накладных, проведенных до указанной даты и из которых на текущий момент возможно зарезервировать товар
        /// </summary>
        /// <param name="articleBatchSubquery">Подзапрос для партий товаров</param>
        /// <param name="storage">МХ</param>
        /// <param name="organization">Собственная организация</param>
        /// <param name="date">Дата, ограничивающая дату проводки выбираемых накладных</param>
        public IEnumerable <IncomingWaybillRow> GetAvailableToReserveList(ISubQuery articleBatchSubquery, Storage storage, AccountOrganization organization, DateTime date)
        {
            var receiptWaybillRows          = receiptWaybillRepository.GetAvailableToReserveRows(articleBatchSubquery, storage, organization, date).Select(x => ConvertToIncomingWaybillRow(x));
            var movementWaybillRows         = movementWaybillRepository.GetAvailableToReserveRows(articleBatchSubquery, storage, organization, date).Select(x => ConvertToIncomingWaybillRow(x));
            var changeOwnerWaybillRows      = changeOwnerWaybillRepository.GetAvailableToReserveRows(articleBatchSubquery, storage, organization, date).Select(x => ConvertToIncomingWaybillRow(x));
            var returnFromClientWaybillRows = returnFromClientWaybillRepository.GetAvailableToReserveRows(articleBatchSubquery, storage, organization, date).Select(x => ConvertToIncomingWaybillRow(x));

            return(receiptWaybillRows
                   .Concat(movementWaybillRows)
                   .Concat(changeOwnerWaybillRows)
                   .Concat(returnFromClientWaybillRows));
        }