/// <summary>
        /// Обрабатывает итоги по приходным накладным..
        /// </summary>
        /// <param name="token">Токен безопасности.</param>
        /// <param name="data">Данные по другим статьям.</param>
        /// <param name="input">Данные ввода пользователя. </param>
        /// <param name="financialGroup">Финансовая группы. </param>
        private void ProcessWarehouseIncomingDocTotals(SecurityToken token, List <RevenueAndExpenditureReportItem> data, RevenueAndExpenditureReportInput input, FinancialGroupItem financialGroup)
        {
            var totals = RemontinkaServer.Instance.EntitiesFacade.GetWarehouseDocTotalItems(token,
                                                                                            input.FinancialGroupID,
                                                                                            input.BeginDate,
                                                                                            input.EndDate);

            var finItem =
                RemontinkaServer.Instance.DataStore.GetFinancialItemByFinancialItemKind(
                    FinancialItemKindSet.WarhouseItemsPaid.FinancialItemKindID,
                    token.User.UserDomainID);

            foreach (var warehouseDocTotalItem in totals)
            {
                var reportItem = new RevenueAndExpenditureReportItem
                {
                    EventDate = warehouseDocTotalItem.DocDate,
                    FinancialGroupLegalName = financialGroup.LegalName,
                    FinancialGroupTitle     = financialGroup.Title
                };

                if (finItem != null)
                {
                    reportItem.Title = finItem.Title;
                    if (finItem.TransactionKindID == TransactionKindSet.Revenue.TransactionKindID)
                    {
                        reportItem.RevenueAmount = warehouseDocTotalItem.SumInitPriceTotal;
                    } //if
                    else
                    {
                        reportItem.ExpenditureAmount = warehouseDocTotalItem.SumInitPriceTotal;
                    } //else
                }     //if
                else
                {
                    reportItem.Title             = IncomingDocTitleDefault;
                    reportItem.ExpenditureAmount = warehouseDocTotalItem.SumInitPriceTotal;
                } //else

                reportItem.Title = string.Format("{0} (накладная номер {1} от {2})", reportItem.Title,
                                                 warehouseDocTotalItem.DocNumber,
                                                 Utils.DateTimeToString(warehouseDocTotalItem.DocDate));

                data.Add(reportItem);
            }
        }
        /// <summary>
        /// Обрабатывает статью о приходе сервисном дейстельности и ремонте.
        /// </summary>
        /// <param name="token">Токен безопасности.</param>
        /// <param name="data">Данные по другим статьям.</param>
        /// <param name="input">Данные ввода пользователя. </param>
        /// <param name="financialGroup">Финансовая группы. </param>
        private void ProcessWorkAndDeviceTotals(SecurityToken token, List <RevenueAndExpenditureReportItem> data, RevenueAndExpenditureReportInput input, FinancialGroupItem financialGroup)
        {
            var totals = RemontinkaServer.Instance.EntitiesFacade.GetOrderPaidAmountByOrderIssueDate(token,
                                                                                                     input.
                                                                                                     FinancialGroupID,
                                                                                                     input.
                                                                                                     BeginDate,
                                                                                                     input.
                                                                                                     EndDate);

            if (totals != null)
            {
                var finItem =
                    RemontinkaServer.Instance.DataStore.GetFinancialItemByFinancialItemKind(
                        FinancialItemKindSet.OrderPaid.FinancialItemKindID,
                        token.User.UserDomainID);

                var reportItem = new RevenueAndExpenditureReportItem
                {
                    EventDate = input.EndDate,
                    FinancialGroupLegalName = financialGroup.LegalName,
                    FinancialGroupTitle     = financialGroup.Title
                };
                if (finItem != null)
                {
                    reportItem.Title = finItem.Title;
                    if (finItem.TransactionKindID == TransactionKindSet.Revenue.TransactionKindID)
                    {
                        reportItem.RevenueAmount = totals.TotalAmount ?? decimal.Zero;
                    } //if
                    else
                    {
                        reportItem.ExpenditureAmount = totals.TotalAmount ?? decimal.Zero;
                    } //else
                }     //if
                else
                {
                    reportItem.Title         = OrderPaidTitleDefault;
                    reportItem.RevenueAmount = totals.TotalAmount ?? decimal.Zero;
                } //else
                data.Add(reportItem);
            }     //if
        }