Exemple #1
0
        void list_view_CurrentObjectChanged(object sender, EventArgs e)
        {
//            throw new NotImplementedException();
            ListView         list_view = View as ListView;
            FmFinPlanDocLine current   = list_view.CurrentObject as FmFinPlanDocLine;

            SetNewState(current);
        }
Exemple #2
0
 private void SetNewState(FmFinPlanDocLine line)
 {
     if (NewController != null)
     {
         NewController.NewObjectAction.Active.SetItemValue(typeof(FmFinPlanDocLineController).FullName,
                                                           line != null && (line.SubLines.BindingBehavior & DevExpress.Xpo.CollectionBindingBehavior.AllowNew) != 0);
         DeleteController.DeleteAction.Active.SetItemValue(typeof(FmFinPlanDocLineController).FullName,
                                                           line != null && (line.SubLines.BindingBehavior & DevExpress.Xpo.CollectionBindingBehavior.AllowRemove) != 0);
     }
 }
        public FmFinPlanDocLine(Session session, FmFinPlanLineType line_type,
                                FmFinPlanDocLine top_line, FmFinPlanTotalType total_type,
                                String code, String name, HrmStructItemType struct_item) : base(session)
        {
            _LineType = line_type;
            TopLine   = top_line;
            TotalType = total_type;
            LineCode  = code;
            LineName  = name;
            DepStruct = struct_item;
            switch (LineType)
            {
            case FmFinPlanLineType.FMFPL_TOP:
                _Sheet = FmFinPlanSheetType.FMFPS_UNKNOW;
                break;

            case FmFinPlanLineType.FMFPL_COST_TOP:
                _Sheet = FmFinPlanSheetType.FMFPS_COST;
                break;

            case FmFinPlanLineType.FMFPL_CASH_TOP:
                _Sheet = FmFinPlanSheetType.FMFPS_CASH;
                break;

            case FmFinPlanLineType.FMFPL_PARTY_TOP:
                _Sheet = FmFinPlanSheetType.FMFPS_PARTY;
                break;

            case FmFinPlanLineType.FMFPL_MATERIAL_TOP:
                _Sheet = FmFinPlanSheetType.FMFPS_MATERIAL;
                break;

            case FmFinPlanLineType.FMFPL_NORMATIV_TOP:
                _Sheet = FmFinPlanSheetType.FMFPS_NORMATIV;
                break;

            default:
                _Sheet = TopLine.Sheet;
                break;
            }
            UpdateSubLines();
        }
        public void UpdateSubLines()
        {
            FmFinPlanDocLine sub_line = null;

            switch (LineType)
            {
            case FmFinPlanLineType.FMFPL_UNKNOW:
                break;

            case FmFinPlanLineType.FMFPL_TOP:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_TOP, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "Л1", "БСР", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_TOP, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "Л2", "БДДС", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_TOP, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "Л3", "Соисполнители", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_TOP, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "Л4", "ТМЦ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_TOP, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "Л5", "Нормативы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_COST_TOP:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_SALE, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "1", "Выручка", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2", "Совокупные затраты", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_TOTAL_CONS, this, FmFinPlanTotalType.FMFPT_ACCUMULATED,
                                                "2н", "Совокупные затраты нарастающим итогом", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_COST_SALE:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_SALE_COUNT, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.1", "- Выручка в штуках", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_VAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.2", "- Выручка от продаж  в валюте контракта (без НДС)", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_VAL_CONS, this, FmFinPlanTotalType.FMFPT_ACCUMULATED,
                                                "1.2н", "- Нарастающим итогом", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_RUB, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.3", "- Выручка от продаж  в рублях", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_RUB_CONS, this, FmFinPlanTotalType.FMFPT_ACCUMULATED,
                                                "1.3н", "- Нарастающим итогом", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_COST_SALE_COUNT:
            case FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_VAL:
            case FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_VAL_CONS:
            case FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_RUB:
            case FmFinPlanLineType.FMFPL_COST_SALE_SALE_NOVAT_RUB_CONS:
                break;

            case FmFinPlanLineType.FMFPL_COST_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_MATERIAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1", "Прямые затраты на материалы и ПКИ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2", "Прямые затраты труда", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_PARTY_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.3", "Затраты соисполнителей", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4", "Прочие непроизводственные", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_COST_MATERIAL:
                break;

            case FmFinPlanLineType.FMFPL_COST_WORK_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2.1", "- Затраты ЦКБМ", HrmStructItemType.HRM_STRUCT_KB);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2.2", "- Затраты КБ \"Орион\"", HrmStructItemType.HRM_STRUCT_ORION);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2.3", "- Затраты ОЗМ", HrmStructItemType.HRM_STRUCT_OZM);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2.4", "- Затраты по договорам подряда", HrmStructItemType.HRM_STRUCT_CONTRACT);
                break;

            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_TOTAL:
                if (DepStruct == HrmStructItemType.HRM_STRUCT_KB || DepStruct == HrmStructItemType.HRM_STRUCT_OZM)
                {
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".1", "-- ФОТ", DepStruct);
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_SOCIAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".2", "-- Страховые взносы", DepStruct);
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_ADDITION, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".3", "-- Накладные расходы", DepStruct);
                }
                else
                {
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_FOT, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".1", "-- ФОТ", DepStruct);
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_TIME, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".2", "--- Трудоемкость в н/ч", DepStruct);
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_SOCIAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".3", "-- Страховые взносы", DepStruct);
                    sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_ADDITION, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                    LineCode + ".4", "-- Накладные расходы", DepStruct);
                }
                break;

            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_FOT, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                LineCode + ".1", "--- Заработная плата", DepStruct);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_CF, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                LineCode + ".2", "--- Отчисления в ЦФ", DepStruct);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_TIME, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                LineCode + ".3", "--- Трудоемкость в н/ч", DepStruct);
                break;

            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_FOT:
            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_CF:
            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_FOT_TIME:
            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_SOCIAL:
            case FmFinPlanLineType.FMFPL_COST_WORK_ITEM_ADDITION:
                break;

            case FmFinPlanLineType.FMFPL_COST_PARTY_TOTAL:
            case FmFinPlanLineType.FMFPL_COST_PARTY_NPO:
            case FmFinPlanLineType.FMFPL_COST_PARTY_TRW:
            case FmFinPlanLineType.FMFPL_COST_PARTY_OTHER:
                break;

            case FmFinPlanLineType.FMFPL_COST_OTHER_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.1", "- Затраты на командировки", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.2", "- Оформление лицензий", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.3", "- Оформление паспорт сделки", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.4", "- Затраты по транспортировке продукции", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.5", "- Таможенное оформление груза", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.6", "- Страхование груза", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.7", "- Услуги ВП МО РФ по контролю качества и приемки продукции (военно-техническое сопровождение)", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.8", "- Отчисления за использование прав РФ на результаты интеллектуальной деятельности (ФАПРИД)", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_COST_OTHER, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.4.9", "- Прочие", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_COST_OTHER:
            case FmFinPlanLineType.FMFPL_COST_TOTAL_CONS:
                break;

            case FmFinPlanLineType.FMFPL_CASH_TOP:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1", "Выручка", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2", "Расходы по контракту, в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_CASH_IN_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_VAL_CASH, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.1", "Поступления в валюте контракта (с НДС), в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_VAL_SALE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.2", "Выручка в валюте с НДС", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_RUB_CASH, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.3", "Поступления в рублях по контракту (с НДС), в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_RUB_SALE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.4", "Выручка в рублях с НДС", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_CASH_IN_VAL_CASH:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_VAL_CASH_PRE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.1а", "Авансы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.PREPAYMENT;
                sub_line         = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_VAL_CASH_POST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                        "1.1р", "Выполненные работы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.POSTPAYMENT;
                break;

            case FmFinPlanLineType.FMFPL_CASH_IN_VAL_CASH_PRE:
            case FmFinPlanLineType.FMFPL_CASH_IN_VAL_CASH_POST:
            case FmFinPlanLineType.FMFPL_CASH_IN_VAL_SALE:
                break;

            case FmFinPlanLineType.FMFPL_CASH_IN_RUB_CASH:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_RUB_CASH_PRE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.3а", "Авансы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.PREPAYMENT;
                sub_line         = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_IN_RUB_CASH_POST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                        "1.3р", "Выполненные работы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.POSTPAYMENT;
                break;

            case FmFinPlanLineType.FMFPL_CASH_IN_RUB_CASH_PRE:
            case FmFinPlanLineType.FMFPL_CASH_IN_RUB_CASH_POST:
            case FmFinPlanLineType.FMFPL_CASH_IN_RUB_SALE:
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1", "Собственные работы, в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_PARTY_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2", "Оплата работ соисполнителей (с НДС),в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_MATERIAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1.1", "Оплата ТМЦ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1.2", "Структуры", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6", "Прочие прямые оплаты (с НДС),в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_MATERIAL:
            case FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM:
            case FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM:
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1.2", "Расходы ЦКБМ", HrmStructItemType.HRM_STRUCT_KB);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1.3", "Расходы ОЗМ", HrmStructItemType.HRM_STRUCT_OZM);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1.4", "Расходы КБ \"Орион\"", HrmStructItemType.HRM_STRUCT_ORION);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_WORK_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1.5", "Расходы по договорам подряда", HrmStructItemType.HRM_STRUCT_CONTRACT);
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6.1", "Командировки,", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6.2", "Лицензии,", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6.3", "Паспорт сделки,", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6.4", "Транспортировка,", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6.5", "Таможенное оформление груза,", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.6.6", "Страхование груза,", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.7.7", "Оплата услуг ВП МО РФ по контролю качества и приемки продукции (военно-техническое сопровождение),", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.8.8", "Отчисления за использование прав РФ на результаты интеллектуальной деятельности (ФАПРИД),", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_INTERNAL_OTHER_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.9.9", "Прочие", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_PARTY_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_PARTY_PRE_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2а", "Авансы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.PREPAYMENT;
                sub_line         = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_CASH_OUT_PARTY_POST_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                        "2.2р", "Расчет", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.POSTPAYMENT;
                break;

            case FmFinPlanLineType.FMFPL_CASH_OUT_PARTY_PRE_TOTAL:
            case FmFinPlanLineType.FMFPL_CASH_OUT_PARTY_POST_TOTAL:
                break;

            case FmFinPlanLineType.FMFPL_PARTY_TOP:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_TOTAL, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1", "Работы соисполнителей (руб), в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_PARTY_TOTAL:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_TOTAL_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "ТЗ", "Затраты", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_TOTAL_PAY, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "ТО", "Оплата", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_PARTY_TOTAL_PAY:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_TOTAL_PAY_PRE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "А", "Аванс", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_TOTAL_PAY_POST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "Р", "Расчет", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_PARTY_TOTAL_COST:
            case FmFinPlanLineType.FMFPL_PARTY_TOTAL_PAY_PRE:
            case FmFinPlanLineType.FMFPL_PARTY_TOTAL_PAY_POST:
                break;

            case FmFinPlanLineType.FMFPL_PARTY_PARTY:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "ВЗ", "Затраты", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_PAY, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "ВО", "Оплата", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "РЗ", "Затраты", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_PAY, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "РО", "Оплата", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_PAY:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_PAY_PRE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "А", "Аванс", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.PREPAYMENT;
                sub_line         = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_PAY_POST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                        "Р", "Расчет", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.POSTPAYMENT;
                break;

            case FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_PAY:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_PAY_PRE, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "А", "Аванс", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.PREPAYMENT;
                sub_line         = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_PAY_POST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                        "Р", "Расчет", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line.PayType = fmPRPayType.POSTPAYMENT;
                break;

            case FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_COST:
            case FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_COST:
            case FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_PAY_PRE:
            case FmFinPlanLineType.FMFPL_PARTY_PARTY_VAL_PAY_POST:
            case FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_PAY_PRE:
            case FmFinPlanLineType.FMFPL_PARTY_PARTY_RUB_PAY_POST:
                break;

            case FmFinPlanLineType.FMFPL_MATERIAL_TOP:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1", "Оплаты и затраты ТМЦ (покупные) в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BUILD, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2", "ТМЦ собственного производства в том числе:", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_MATERIAL_BAY:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_PAY, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.0", "Оплата", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.1", "Черные металлы, подшипники, метизы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.2", "Цветные металлы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.3", "Кабельно-проводная продукция, ЭРИ и электроматериалы", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.4", "Химикаты, ЛКП, спирт, резина, пластмасса, полимеры, ткани", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.5", "Штамповки (поковки)", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.6", "ПКИ (кроме крупных дорогостоящих)", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.7", "Инструмент и оснастка", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "1.8", "Прочие ТМЦ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_COST:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_PAY, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                this.LineCode + ".О", "Оплата", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_MATERIAL_BUILD:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BUILD_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.1", "ПКИ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_MATERIAL_BUILD_ITEM, this, FmFinPlanTotalType.FMFPT_HIERARCHICAL,
                                                "2.2", "Оснастка", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_MATERIAL_BAY_ITEM_PAY:
            case FmFinPlanLineType.FMFPL_MATERIAL_BUILD_ITEM:
                break;

            case FmFinPlanLineType.FMFPL_NORMATIV_TOP:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_VALUTA, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "1", "Курсы валют", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_EXPONENT, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "2", "Пересчет в единиц", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_COST_COMPONENTS, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "3", "Коэффициенты ФОТ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_NORMATIV_VALUTA:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_VALUTA_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "1.1", "РУБ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_VALUTA_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "1.2", "ДОЛ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_VALUTA_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "1.3", "ЕВР", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_VALUTA_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "1.4", " ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_NORMATIV_COST_COMPONENTS:
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_COST_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "3.1", "НормЦФ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_COST_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "3.2", "Накладные", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_COST_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "3.3", "СоцСтрах.", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_COST_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "3.4", "Стоим.Часа без ЦФ", HrmStructItemType.HRM_STRUCT_UNKNOW);
                sub_line = new FmFinPlanDocLine(this.Session, FmFinPlanLineType.FMFPL_NORMATIV_COST_ITEM, this, FmFinPlanTotalType.FMFPT_NOTOTAL,
                                                "3.5", "Стоим.Часа возм услуг", HrmStructItemType.HRM_STRUCT_UNKNOW);
                break;

            case FmFinPlanLineType.FMFPL_NORMATIV_EXPONENT:
            case FmFinPlanLineType.FMFPL_NORMATIV_VALUTA_ITEM:
            case FmFinPlanLineType.FMFPL_NORMATIV_COST_ITEM:
                break;
            }
        }