import "layer92.dll" AlgorithmCalc(&info,&r) { return SysAlgorithmCalc(info,r); } SysAlgorithmCalc(&info,&r) { // ᭠砫 뢠 짮⥫ ⬮, ⮫쪮 // ⮬ - ⥬ int R_C=UserAlgorithmCalc(info,r); if ( R_C ) return R_C; int Ver = GetVerInfo(); if ( Ver ) { if ( Ver & V_UVD ) R_C=AlgorithmCalcSpecUVD(info,r); if ( R_C ) return R_C; if ( Ver & V_SCHOOL ) R_C=AlgorithmCalcSpecRONO(info,r); if ( R_C ) return R_C; if ( Ver & V_MEDICINE ) R_C=AlgorithmCalcSpecMedicine(info,r); if ( R_C ) return R_C; } switch(info.kod_alg) { case 3: return SysAlg3(info,r); case 4: return SysAlg4(info,r); case 5: case 192: return SysAlg5_192(info,r); case 6: return SysAlg6(info,r); case 12: case 15: case 25: case 115: return SysAlg12_15_25_115(info,r); case 13: return SysAlg13(info,r); case 14: return SysAlg14(info,r); case 17: return SysAlg17(info,r); case 23: return SysAlg23(info,r); case 27: return SysAlg27(info,r); case 35: return SysAlg35(info,r); case 7: case 10: case 47: return SysAlg7_10_47(info,r); case 96: case 97: case 186: case 187: return SysAlg96_97_186_187(info,r); case 98: case 99: return SysAlg98_99(info,r); case 121: return SysAlg121(info,r); case 178: return SysAlg178(info,r); case 184: return SysAlg184(info,r); case 185: return SysAlg185(info,r); case 215: return SysAlg215(info,r); case 218: return SysAlg218(info,r); case 225: return SysAlg225(info,r); case 228: return SysAlg228(info,r); // case 255: case 256: // return SysAlg255_256(info,r); case 897: return SysAlg897(info,r); case 247: return SysAlg247(info,r); default: return 0; } } SysAlg3(&info,&r) { worktime(info.crow,info.b3,0); // ࠡ. ⠡ if(r[2] == 0. && nkalend == knorm) // ᫨ ப ⠥ ᭮ 䨪 skoljko(r[2],data,info.z1,info.z2,rsimv,calm,cht); char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; if(FL_V_ALG && uprc != NO_SCREEN) infolist.add_record("祥 ६",r[2]); return code_Break; } SysAlg4(&info,&r) { return SysAlg4_6(info,r,false); } SysAlg4_6(&info,&r,bHours) { unsigned idxNorm = bHours?2:1; worktime(info.crow,info.b3,0); var ListBZ;// = CreateObject("MapString"); unsigned cnt=GetListBZ(info.kod,data+0.01,data+countday/100.,GetBase(info.crow),ListBZ); // if ( ListBZ.Size()<2 ) if ( cnt<2 ) { if(nkalend == knorm) //* ᫨ ப ⠥ ᭮ 䨪 { if ( bHours ) skoljko(r[2],data,info.z1,info.z2,rsimv,calm,cht); else r[2]=dney_v_tab(rsimv,calm,info.z1,info.z2); } char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=r[2]*info.bz/norm(idxNorm); if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("祥 ६",r[2]); infolist.add_record(bHours?"ଠ ᮢ":"ଠ ",norm(idxNorm)); infolist.add_record("",info.bz); infolist.add_record("",info.n1); } } else { if(FL_V_ALG&&uprc!=NO_SCREEN) { infolist.add_record(bHours?"ଠ ᮢ":"ଠ ",norm(idxNorm)); } // bool bCur = ListBZ.InitIterator(); unsigned idx=0; double DatB = ListBZ[idx][1];// atof(ListBZ.GetCurKey()); double _do = do_chisla(info.ikod); info.n1 = 0.; r[2]= 0.; var Tmp = CreateObject("KDate"); var Tmp1 = CreateObject("KDate"); // while ( bCur ) while ( idx 0) { var i=atoi(reinterpret_cast_to_string(Work.List_Par[0])); if( (i > 0 && i <= 99) || ( info.kod_alg >= 25 && i > SPECT && i <= SPECT+24 ) ) stolbec=i; } //-- ࠬ 2 - 砫 롮ન (⭮⥫쭮 ⭮) // ( 㬮砭 ⥪騩 ) if(Work.Count_Par > 1) { var i=atoi(reinterpret_cast_to_string(Work.List_Par[1])); if( (i >= (- P2MES) && i <= B2MES) || ( info.kod_alg >= 25 && i >= (-P2MES) && i <= B2MES ) ) mes1=mes2=i; } //-- ࠬ 3 - 롮ન (⭮⥫쭮 ⭮) // ( 㬮砭 , 㪠 ࠬ஬ 2) if(Work.Count_Par > 2) { var i=atoi(reinterpret_cast_to_string(Work.List_Par[2])); if( (i >= mes1 && i <= B2MES) || (info.kod_alg >= 25 && i >= mes1 && i <= B2MES) ) mes2=i; } //-- ࠬ 4 - ࠡ 䮩 : if(Work.Count_Par > 3) TipFillRV=atoi(reinterpret_cast_to_string(Work.List_Par[3])); //-- ࠬ 5 - ᨬ 롮ન if(Work.Count_Par > 4) sprintf(StrSimv,"%.50s",reinterpret_cast_to_string(Work.List_Par[4])); //-- ࠬ 6 - ᯮᮡ 롮ન // ⬮ 25 115 var Flag=(info.kod_alg == 25) ? ( CL_MV| CL_COL| CL_QUICK ) : ( CL_MV| CL_EXACT| CL_QUICK ); // 23.08.05 SVV 㫨 ⨯ ࠡ稬 , .. // 筮 룫廊, ६ ⠥ ய樮쭮 // ࠡ⠭ ६. ⮬ ⠪ 뫮 த ६. // ⭮ 祣 諨 ய樨 ଠ⨢ // (᪮॥ ᥣ ⮬ १ "ࠬ ⬮" ⨯ // 㬮砭 ࠢ 2, ᥩ ९ࠢ 4). int TipNep = 4; // ⨯ if ( Work.Count_Par>5 ) { if ( info.kod_alg<25 ) TipNep=atoi(reinterpret_cast_to_string(Work.List_Par[5])); else Flag=Tip__Flag(reinterpret_cast_to_string(Work.List_Par[5])); } //-- ࠬ 7 - ᥢ ࠭ 業 // ६ string ps=""; bool bTimeProc = false; if (Work.Count_Par>6) { string p = reinterpret_cast_to_string(Work.List_Par[6]); long idx = InStrN(1,p,"ps:"); if ( idx ) { ps = MidN(p,idx+3,0); int Pos = kch_num_sys(ps); if ( Pos!=EOF ) bTimeProc=true; else ps=""; } } var n5=0.; if(info.kod_alg >= 25) toMatrLS(); var hSrc=GetCurPropCountLS(); for(var m=mes1; m<=mes2; m++) { double r9; if(info.kod_alg < 25) s1001simv(StrSimv,"*",info.d1,info.d2,m,stolbec-1,r9,TipNep,0); else { // . . . ନ஢ // ⠬ if(info.kod_alg == 25) r9=CollectSummPropSimv( static_cast_to_string(StrSimv),stolbec-1,0,m+mrasch, Flag|CL_SOURCE,hSrc ); else r9=s1001simv_mvProp( StrSimv,info.d1,info.d2,m+mrasch,stolbec-1,TipNep, Flag|CL_SOURCE, hSrc ); } n5+=r9; } // 08.11.95 if( FL_V_ALG && uprc!=NO_SCREEN) { infolist.add_record(" 砫 롮ન",mes1); infolist.add_record(" 砭 롮ન",mes2); infolist.add_record("⮫ 롮ન",stolbec); infolist.add_record(" 롮ન",StrSimv); if ( info.kod_alg<25 ) infolist.add_record(" ",TipNep); infolist.add_record("㬬 롮ન",n5); } double SrednProc = 0.; int CountProc = 0; if ( bTimeProc ) // । "।" 業 ᫨ 業 ६ { // ⥯ ன ஢ // 쬥 㤠 祭 業⮢, ⢮訥 // 뢠 info.n1=0.; // 㫨 ⮣ 㬬 // ⢨ । 祭 業 // ᠬ 砫 ࠢ ᫥ . var DateEnd = CreateObject("KDate"); DateEnd.SetDateII(countday,mrasch); // 砫 ⢨ । 祭 業 char StrD[21]; GetKchDate(ps,StrD,10,DateEnd); var Date=CreateObject("KDate"); Date.SetDate(static_cast_to_string(StrD)); // ᫨ 砫 室 ࠬ ⭮ // , ⠭ ࠢ ࢮ ⭮ if ( Date.IsEqI(INVALID_DATE_VALUE) || Date.GetAbs()1)?"।.業":"業",rv); infolist.add_record("",info.n1); } return R_C; } SysAlg13(&info,&r) { // ६ 㬬 if(info.n1 == 0. && func[6]) info.n1=info.bz; return code_MDefault; } SysAlg14(&info,&r) { // -- ᢥ. // SVV 06.12.05 業 2 // ᫥饥 ६ ࠬਧ, ⮣ // ᯮ짮 // ᢥ. (0.5 1) ⠪ // ᢥ (1.5 2 ᮮ⢥⢥) struct Struct_Alg Work; Get_AlgWithParam(Work,info.ikod); // 31.01.1995 double pr1 = 0.5, pr2 = 1; // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - 業 2 ᮢ if (Work.Count_Par>0) { double i=atof(reinterpret_cast_to_string(Work.List_Par[0])); if ( i!=0 ) pr1 = i; } //-- ࠬ 2 - 業 ⠫ ᮢ if (Work.Count_Par>1) { double i=atof(reinterpret_cast_to_string(Work.List_Par[1])); if ( i!=0 ) pr2 = i; } // - r[2]=r[2]-info.h[2]; // char t[20]; indstr(scr04,mrasch,windrow,r,t,1); r[2]=r[2]+info.h[2]; // // if (mmimo==1) goto mdfault; // if (uprc!=NO_SCREEN) flagrow1[jf1]=crow; double n3=0.,n4=0.; // 4.02.94 if(uprc != NO_SCREEN) { flagrow[jf][2]=1; zaprosd( scr04,windrow+1,0, "筮 2 ", 7,r[2],n3,-500.,500.,0 ); zaprosd( scr04,windrow+2,0, "筮 ᫥騥 ", 7,0.,n4,-500.,500.,0 ); } var n5=info.bz; // var n6=0.5; // 業 2 var n7=1.; // 業 ᫥. info.n1=n5*(n3*n6+n4*n7)/100.; r[2]=n3+n4; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("",n5); infolist.add_record(". . 2 ",n6); infolist.add_record("६ 2 ",n3); infolist.add_record(". ᫥. ",n7); infolist.add_record("६ ᫥. ",n4); infolist.add_record("",info.n1); } return code_MDefault; } SysAlg17(&info,&r) { // . . ६; - // - 業 double n5; s96(info.d1,info.d2,n5,1); char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=n5*r[2]*info.bz/100.; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("⠢",n5); infolist.add_record("祥 ६",r[2]); infolist.add_record("業 믫",info.bz); infolist.add_record("",info.n1); } return code_Break; } SysAlg23(&info,&r) { // ࠧ 㬬 double n6; info.kod_alg=s98(0,n6); if(info.kod_alg == 1) // "" n6=dney_v_tab(rsimv,calm,info.z1,info.z2)/norm(1); else { double n2; // "ᮢ" skoljko(n2,data,info.z1,info.z2,rsimv,calm,cht); n6=n2/norm(2); } // n6 - ⭮襭 / info.n1=n6*info.bz; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("⭮襭 /",n6); infolist.add_record("",info.bz); infolist.add_record("",info.n1); } return code_MDefault; } SysAlg27(&info,&r) { // 襭 double n6; var m1=s98(0,n6); double n2; double k; if(m1 == 1) s97(info.d1,info.d2,n2,k,1); // else s96(info.d1,info.d2,n2,1); // ᮢ char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=r[2]*n2*info.bz/100.; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("祥 ६",r[2]); infolist.add_record("⠢",n2); infolist.add_record("業",info.bz); infolist.add_record("",info.n1); } return code_Break; } SysAlg35(&info,&r) { double n2; double k; // 祡 , -業 ⠢筮 s97(data+.01,data+countday/100.,n2,k,1); if(nkalend == knorm) // ᫨ ப ⠥ ᭮ 䨪 r[2]=dney_v_tab("",calm,info.z1,info.z2); char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=r[2]*n2*info.bz/100.; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("祡 ",r[2]); infolist.add_record("⠢",n2); infolist.add_record("業",info.bz); infolist.add_record("",info.n1); } return code_Break; } SysAlg96_97_186_187(&info,&r) { r[2] = DefineSevS(mrasch, info.d1, info.d2)*100.; double r9; if(info.kod_alg == 97 || info.kod_alg == 187) // s1001simv("1","",info.d1,info.d2,0,ST_RK,r9,2,0); if(info.kod_alg == 96 || info.kod_alg == 186) // s1001simv("2","",info.d1,info.d2,0,ST_RK,r9,2,0); char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=r9*r[2]/100.; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("㬬",r9); infolist.add_record(" 業",r[2]); infolist.add_record("",info.n1); } return code_Break; } DefineSevS(month, d1, d2) { return PriorityCall("UserDefineSev","SysDefineSev",month, d1, d2); } SysDefineSev(month, d1, d2) { return DefineSev(month, d1, d2); /* double proc_sev = 0; char Str_Work[11]; double p1,p2; kch_from("data_r",Str_Work); // ஦ var DR=CreateObject("KDate"); DR.SetDate(static_cast_to_string(Str_Work)); DR.ImproveDay(); if ( kch_tip_ps("sever")!='T' ) kch_from("sever",Str_Work); else { char StrStag[81]; var D = CreateObject("KDate"); D.SetDateII(1,month); GetKchDate("sever",Str_Work,10,D); GetKchValue("sever",StrStag,50,D); var DateBeg = CreateObject("KDate"); DateBeg.SetDate(static_cast_to_string(Str_Work)); DateBeg.ImproveDay(); var DatTmp = CreateObject("KDate"); DatTmp.SetDate(static_cast_to_string(StrStag)); DatTmp.ImproveDay(); if ( !DatTmp.IsEqI(INVALID_DATE_VALUE) && DateBeg.IsEqI(INVALID_DATE_VALUE) ) DateBeg.SetDate(DatTmp.GetStr()); else if ( !DateBeg.IsEqI(INVALID_DATE_VALUE) && Str_Cmp(StrStag," "," ") ) { // : ⠪ 祫 ⠪- ⠦ // ⮬ var Param = CreateObject("ParamFuncRW"); Param.IInitial(static_cast_to_string(StrStag),",./|;()[]<>\\- mM",3); int CountParam = Param.Count(); if ( CountParam ) { int off_year=atoi(Param.Get(0)); int off_m =0, off_d=0; if ( CountParam>1 ) off_m=atoi(Param.Get(1)); if ( CountParam>2 ) off_d=atoi(Param.Get(2)); if ( off_year>-1 && off_m>-1 && off_d>-1 ) { int CountM = off_year*12+off_m; DateBeg.SetDateII(DateBeg.GetDay(), DateBeg.GetAbs()-CountM); DateBeg.SetDateD(DateBeg.GetOffs(-off_d)); } } } stccpy(Str_Work,DateBeg.GetStr('.'),11); } var DS=CreateObject("KDate"); DS.SetDate(static_cast_to_string(Str_Work)); DS.ImproveDay(); var MRasch=CreateObject("KMonth"); MRasch.SetMonth(month); // if(MRasch.GetAbs()-DR.GetAbs() <= 360 && !DR.IsEqI(INVALID_DATE_VALUE) ) procent_ot_staga(80,"sever",1,0,1,EOF,d1,d2,proc_sev); // ᥢ 30 else // ᥢ tabl=81; { procent_ot_staga(80,"sever",1,0,1,EOF,d1,d2,p1); procent_ot_staga(81,"sever",1,0,1,EOF,d1,d2,p2); if(p1 == p2) proc_sev=p1; // ᥢ else { if( (DR.GetAbs()+360 < DS.GetAbs() && !DS.IsEqI(INVALID_DATE_VALUE) ) || DR.IsEqI(INVALID_DATE_VALUE)) // ᥢ ⠦ 砫 procent_ot_staga(81,"sever",1,0,1,EOF,d1,d2,proc_sev);// ᫥ 30 else { DR.SetMonthYear(DR.GetMonth(),DR.GetYear()+30); // 30 ⨥ // 室 ᫨ "ᬥ饭" 砫 ⠦: // 1) - 楢 30- " " ( ⮫쪮 // ᫥ 12 楢, 12 楢 , // 30 , ᫥ 30 ) var i=DR.GetAbs()-DS.GetAbs(); if(i-12 >= 0) i=(i-12)*2+12; // else i=0; // 祣 - ६ ! // 2) - 楢 ᫥ 30- i += month-DR.GetAbs(); var DS1=CreateObject("KDate"); DS1.SetDateII(DS.GetDay(),month-i); procent_ot_staga(81,"",1,0,1,EOF,DS1.GetDouble(),d2,proc_sev);// 稫 % ⮬ 30 } } } double Epsilon = 0.0000001; return proc_sev / 100.; */ } SysAlg7_10_47(&info,&r) // 7: /* " ।"; -業 믫 */ // 47: /* 室 ᮡ */ // 10: /* ।; -業 믫 */ { struct Struct_Alg Work; Get_AlgWithParam(Work,info.ikod); // 31.01.1995 // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - ᨬ ⠡ char SimvTab[2]; SimvTab=""; // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - ᯨ᮪ ᨬ 㬬஢ if(Work.Count_Par > 0) { char Simv = reinterpret_cast_to_string(Work.List_Par[0])[0]; if ( Simv>' ' ) SimvTab[0]=Simv; } // , ண 㦥 㢥祭 // ⠢ ਮ ᪠ " ।" double DATA_M_SRED=199501.; double Eps = 0.000001; double r9=0.; int FLAG_M_SRED; char str[256]; char t[20]; if ( strlen(GetCommonCnf("FL_M_SRED","r0alg",str,10)) < 1 ) FLAG_M_SRED = 1; else FLAG_M_SRED = atoi(str); //--- ᯮ⥫ 뢮 ப r[2]=r[2]-info.h[2]; // indstr(scr04,mrasch,windrow,r,t,1); r[2]=r[2]+info.h[2]; // var Dat=CreateObject("KDate"); var PoSredn = CreateObject("KCalcSredn"); if ( PoSredn.InitSredn(info.crow,info.kod_alg,Dat,uprc!=NO_SCREEN?2:0)==ESC ) return code_Break; // - ⠡ । 맮 tabl_sredn s145(colc2,1); //--- । ६ PoSredn.Calculate(0,2); // if (uprc==3) menuras(0); // ॢ뢮 var Nastr = PoSredn.GetNastr(); double d1m= Nastr.GetMonthSr().GetDouble(); //--- if ( info.kod_alg == 7 ) // 7 -" ।" { int day1=Nastr.GetDateSr().GetDay(), day2=Nastr.GetDateEndSr().GetDay(); zamena_simv_v_tab(simv_nr,SimvTab,calm,day1,day2,info.crow,0); if (nkalend==knorm) /* ᫨ ப ⠥ ᭮ 䨪 */ { if ( Nastr.GetNastr(TIP_RV)==1) r[2]=dney_v_tab(SimvTab,calm,day1,day2); else skoljko(r[2],data,day1,day2,SimvTab,calm,cht); } } if ( info.kod_alg == 10 ) // 10 - । { if (nkalend==knorm) /* ᫨ ப ⠥ ᭮ 䨪 */ { if (Nastr.GetNastr(TIP_RV)==1) r[2]=dney_v_tab(rsimv,calm,info.z1,info.z2); else skoljko(r[2],data,info.z1,info.z2,rsimv,calm,cht); } } if ( (info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1 ) return code_ReturnCode; // 20.03.95 //--- 㬬 double stavka_1d, stavka_p, koef=1.; int flag_tarif=0; // ⨯ ᭮ : 0-, 1- if ( FLAG_M_SRED ) { if ( info.kod_alg!=47 && KDateFromD(data).GE(KDateFromD(DATA_M_SRED)) ) { // !=47 - 室 ᮡ 楢 01.95 // - ⠡ । 맮 s50 s145(colc2,1); int mvrem=mrasch; // ===== , 祭 " ।" // ⠢ // --- ⠢ " ।" s50(absmec(d1m)); s97(d1m,d1m,stavka_1d,r9,2); if ( nabs(r9)>Eps ) flag_tarif=1; if (flag_tarif==0) // - ⠢ stavka_1d=stavka_1d*norm(1); else // 䭨 - ⠢ s96(d1m,d1m,stavka_1d,3); //--- ⠢ // " ।" mrasch s50(mvrem); if (flag_tarif==0) { // - ⠢ if (info.kod_alg==10) s97(info.d1,info.d2,stavka_p,r9,4); else s97(info.d1,info.d2,stavka_p,r9,SimvTab[0]); stavka_p=stavka_p*norm(1); } else { // 䭨 - ⠢ if (info.kod_alg==10) s96(info.d1,info.d2,stavka_p,5); else s96(info.d1,info.d2,stavka_p,300+SimvTab[0]); } // - 宦 樥 if (nabs(stavka_1d)>Eps) koef=stavka_p/stavka_1d; if (nabs(koef)<1.) koef=1.; // - , 㦭 㢥稢 if ( uprc!=NO_SCREEN && nabs(r[2])>Eps && nabs(PoSredn.SumSredn())>Eps && nabs(info.bz)>Eps && nabs(koef)>1.-Eps /* && !func[4] */ ) // func[4]=1 (⮬.) - 訢 (???) { //- ᯮ⥫ ॢ뢮 ப r[2]=r[2]-info.h[2]; // indstr(scr04,mrasch,windrow,r,t,1); r[2]=r[2]+info.h[2]; // //- - zaprosd(scr04,windrow+1,0, " ਮ 㢥稫 ⠢. 稢 㬬 ###### ? (0-)", 6,koef,koef,-summax,summax,13); if (nabs(koef) 0) { int i = atoi(reinterpret_cast_to_string(Work.List_Par[0])); if ( i>0 ) NumSet = i; } // 㣠 // 17.04.97 //procent_ot_staga(78,"datavys",1,0,31,info.crow,d1,d2,&n3); //-஬ double n3; procent_ot_staga(NumSet,"datavys",1,0,1,info.crow,info.d1,info.d2,n3); // n3 - % ⠦ double n6; s98(0,n6); r[2]=n6*norm(1); // r[2] - ࠡ⠭ char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; double n2; double n5; s97(info.d1,info.d2,n2,n5,1); // n2 - ⠢ info.n1=r[2]*n2*n3/100.; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record(" ",r[2]); infolist.add_record("⠢",n2); infolist.add_record("業 㣨",n3); infolist.add_record("",info.n1); } return code_Break; } SysAlg184(&info,&r) { // var pcW; struct Struct_Alg Work; Get_AlgWithParam(Work,info.ikod); // 31.01.1995 // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - ᯨ᮪ ᨬ 㬬஢ if(Work.Count_Par > 0) pcW=Work.List_Par[0]; else pcW=reinterpret_cast_to_long(rsimv); r[2]=dney_v_tab(reinterpret_cast_to_string(pcW),calm,info.z1,info.z2); char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=r[2]*info.bz; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record(" ⠡",reinterpret_cast_to_string(pcW)); infolist.add_record("᫮ ",r[2]); infolist.add_record("㬬 ",info.bz); infolist.add_record("",info.n1); } return code_Break; } SysAlg185(&info,&r) { // ⠭ var n3=dney_v_tab("",calm,info.z1,info.z2); r[2]=norm(1)-n3; char t[20]; if((info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; info.n1=r[2]*info.bz/norm(1); if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("ଠ",norm(1)); infolist.add_record("ண, ࠢ, ࠡ.",n3); infolist.add_record("稥 ",r[2]); infolist.add_record(" ⠭",info.bz); infolist.add_record("",info.n1); } return code_Break; } SysAlg215(&info,&r) { // = if(info.n1 == 0.) info.n1=info.bz; return code_MDefault; } SysAlg218(&info,&r) { // // 06.10.1999 struct Struct_Alg Work; int TypeCalc = 0; Get_AlgWithParam(Work,info.ikod); // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - ⨯ ( 㬮砭 = 0, ਭ, 1 - ᫥) if(Work.Count_Par > 0) TypeCalc = atoi(reinterpret_cast_to_string(Work.List_Par[0])); double n3=0.; double n4=0.; if ( TypeCalc==1 || TypeCalc==2 ) { toMatrLS(); var CurProp = GetCurPropCountLS(); if ( TypeCalc==1 ) { //--- 롮ઠ ᫥ ⥪騩 info.n1 = s1001simv_mvProp("1",info.d1,info.d2,mrasch,ST_ALIMENT,2, CL_EXACT | CL_MV | CL_NACH, CurProp); //--- 롮ઠ 㤥ঠ ⥪騩 n3 = s1001simv_mvProp("1",info.d1,info.d2,mrasch,ST_ALIMENT,2, CL_EXACT | CL_MV | CL_UD, CurProp); } else { //--- 롮ઠ ᫥ ⥪騩 info.n1 = CollectSummPropSimv("1", ST_ALIMENT, 0, mrasch, CL_MV | CL_COL | CL_NACH, CurProp); //--- 롮ઠ 㤥ঠ ⥪騩 n3 = CollectSummPropSimv("1", ST_ALIMENT, 0, mrasch, CL_MV | CL_COL | CL_UD, CurProp); } } else { //--- 롮ઠ ᫥ ⥪騩 s1001simv("1","",info.d1,info.d2,0,ST_ALIMENT,info.n1,2,0); // 08.11.95 //--- 롮ઠ 㤥ঠ ⥪騩 s1001simv("1","",info.d1,info.d2,0,ST_ALIMENT,n3,2,0); //--- 롮ઠ 㤥ঠ , ᫨ 祭 s1001simv("2","",info.d1,info.d2,-1,ST_ALIMENT,n4,2,0); } var t_nu=info.n1-n3-n4; info.n1=info.n1-n3-n4; info.n1=info.n1*info.bz/100.; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("⮫ /",ST_ALIMENT+1); infolist.add_record(". - থঠ",t_nu); infolist.add_record(". ⮢",info.bz); infolist.add_record("",info.n1); } var simv=poiskprch(info.ikod); if(simv == 4) { char str[256]; char str1[256]; Rkv_from(GetCode(info.crow),"",str1,str); // ⠬ 㬥蠥 室 // 㬬, ᫥ var r9=atof(str); if(r9 && r9 < info.n1) { // ⠬ // ⠬ < 㬬 ⮢ char str1[80]; sprintf(str1," ⠬ %-8.2f",r9); if(uprc != NO_SCREEN) vwriteat(scr04,windrow+1,0,str1); info.n1=r9; } } return code_MDefault; } SysAlg225(&info,&r) { // . double r9; s1001("",info.d1,info.d2,0,ST_PROFS,r9,2); // 08.11.95 info.n1=static_cast_to_long(r9)*0.01; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record("⮫ /",ST_PROFS+1); infolist.add_record("롮ઠ",r9); infolist.add_record("業",1.); infolist.add_record("",info.n1); } return code_MDefault; } SysAlg228(&info,&r) { // ᫥ , ᫨ ( /, ); // - 筠 㬬 ᫥ if(info.n1 == 0.) { toMatrLS(); var n7=CollectSummProp( 'a',0,mrasch, CL_MV|CL_COL| CL_REAL|CL_SOURCE, GetCurPropCountLS() ); var n6 = CollectSummProp(info.kod,mrasch,mrasch, CL_M|CL_MV|CL_REAL|CL_SOURCE|CL_EXACT,GetCurPropCountLS()); n7 += n6; //n7=sum[1]-sum[5]; /* sum[1]-ᥣ ᫥ */ // sum[5]-ᥣ 㤥ঠ if(n7+0.001-info.bz < 0.) info.n1=0.; else info.n1=info.bz; } return code_MDefault; } SysAlg255_256(&info,&r) { /* ⮢ ᡮ - kod_alg==255 */ /* ⮢ ᡮ - kod_alg==256*/ if ( info.kod_alg=255 && (info.b3==B3_OTPUSK || info.b3==B3_UVL || mrasch!=mtek) ) return code_MDefault; /* - 譨 , 稢 ᡮ*/ /* 뢠 ⮫쪮 " " */ /* ⥪饣 */ { /* 騥 ६ ।祭 ன : */ int reg=2; /* ० 㣫 㬬 ⮢ ᡮ: 0 - 㣫, 1 - 뢠, 2 - */ double _do=1.; /* 㬬 ⮢ ᡮ 㣫 (뢠, ) 㪠 _do 㡫 稭, ਬ, _do=1000.; - 㡫. */ double dop_sum=0.; /* ⥫쭠 㬬, ਡ塞 ⮢ ᡮ ᨬ ᫥ 㬬 ⮢ ᡮ */ double oldsumm=0.; char str_proc[256],str_comm[256]; int setka=0; double kod_rkv=info.kod; // 塞 ७ double int_kod=Extern_To_InternE(info.bz); if ( int_kod<0. ) return code_MDefault; toMatrLS(); // /ᡮ 塞 㬬 // if ( info.kod_alg == 256 ) { kod_rkv = int_kod; oldsumm = CollectSummProp(int_kod,0,mrasch, CL_MV | CL_EXACT | CL_SOURCE, GetCurPropCountLS()); poiskbz(0,int_kod,1," ",int_kod); int_kod=Extern_To_InternE(int_kod); } struct Struct_Alg Work; Get_AlgWithParam(Work,kod_rkv+0.000001); // 14.01.98 // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - 稭 ன 㣫 (뢠, // ) 㬬 ⮢ ᡮ ( 㬮砭 1 .) if (Work.Count_Par>0) { double i = atof(reinterpret_cast_to_string(Work.List_Par[0])); if ( i>=0 ) _do=i; } var Dat = CreateObject("KDate"); Dat.SetDate("01.01.1998"); if ( mrasch1) { int i=atoi(reinterpret_cast_to_string(Work.List_Par[1])); if (0<=i && i<=2 ) reg = i; } //-- ࠬ 3 - ⥫쭠 㬬 ⮢ ᡮ // ( 㬮砭 0) if (Work.Count_Par>2) { double i=atof(reinterpret_cast_to_string(Work.List_Par[2])); if (i>=0) dop_sum=i; } //-- ࠬ 4 - 쭠 㬬 ⮢ ᡮ, । // 㬬 ன ⮢ ᡮ double min_sum=0.; /* 쭠 㬬 ⮢ ᡮ */ if (Work.Count_Par>3) min_sum=atof(reinterpret_cast_to_string(Work.List_Par[3])); double sum_mes=0.,sum_for=0.; info.n1=0.; // ⠥ .४ Rkv_from(kod_rkv,"業", str_comm,str_proc); double proc=atof(str_proc); // 塞 業 ⪥ Rkv_from(kod_rkv,"⪠", str_comm, str_proc); setka=atoi(str_proc); // ᫨ ⪨ ⠭ 㫥 業, ६ 㬮砭 if (setka == 0 && nabs(proc)<0.0001) setka = 84; Rkv_from(int_kod,"_ᯨ",str_comm,str_proc); int numsp = atoi(str_proc); Rkv_from(int_kod,"",str_comm,str_proc); string Who=str_proc; // 塞 㬬 for (int idxrow=0; idxrow0.00000001 && Sim_For_Intern_Cod(iCod,ST_PRCH) != '4') || GetEndDate(idxrow)<0.00001 ) continue; double kod = GetCode(idxrow); // ᫨ 㪠 ᯨ᪠, ᮡࠥ ଠ 㣨 窠 ⠪ ஬ if ( nabs(kod-int_kod)>0.00000001 ) { if ( !numsp ) continue; Rkv_from(kod,"_ᯨ",str_comm,str_proc); int num = atoi(str_proc); if ( numsp!=num ) continue; Rkv_from(kod,"",str_comm,str_proc); if ( Str_Cmpi(str_proc,Who," .,;") ) continue; } if ( mrasch == mtek ) { for ( int mes=-P2MES;mes<=B2MES; mes++ ) sumvid("=",kod,mes,sum_mes), sum_for+=sum_mes; } else { sum_for += CollectSummProp(kod,0,mrasch, CL_MV | CL_EXACT | CL_SOURCE, GetCurPropCountLS()); } } // ⮢ ᡮ ⥫ // 㬬 if ( sum_for<0. ) sum_for = 0.; // 㣫 㬬 round2(sum_for,reg,_do,sum_for); // ஢ਬ, ॣᨢ ⪠ 㦭 ஬ // ॣᨢ ⪠, "" // 㯨 ⢨ फ᪮ 07.2002 int NumSetP = GetNumFileSetP(setka,-1, mrasch, 0); // 業 ⪥ int FlagRegress=0; // 01.07.2002 ॣᨢ 誠 var DatRegr = CreateObject("KDate"); DatRegr.SetDate("01.07.2002"); if ( setka > 0 && NumSetP==EOF ) { double proc_value=0.; int CodOrg = GetOrgForPodr(GetPodrOfCod(info.kod)); if ( Value_Procent_SetkiO(setka,CodOrg,sum_for,data,proc_value) >=0 ) proc=proc_value; else if ( mrasch>=DatRegr.GetAbs() ) FlagRegress=1; } else if ( (proc<=0.001 && mrasch>=DatRegr.GetAbs()) || NumSetP!=EOF ) { // ᫨ ⪠ 業 ॣᨢ ⪨ FlagRegress=1; } // ᮡ⢥ if ( !FlagRegress ) info.n1=sum_for*proc*0.01; else if (sum_for>0.001) { if ( NumSetP!=EOF ) info.n1=CalculatedSumSetkaP(sum_for, NumSetP, proc, 2); else { if (FL_V_ALG&&uprc!=NO_SCREEN) infolist.add_record(" ॣ.⪨","஢ ⪨"); info.n1=0.; /* if ( sum_for+0.001>50000.00 ) info.n1 = 1810.00 + (sum_for-50000.00)*0.02; else if ( sum_for+0.001>25000.00 ) info.n1 = 1060.00 + (sum_for-25000.00)*0.03; else if ( sum_for+0.001>6000.00 ) info.n1 = 300.00 + (sum_for- 6000.00)*0.04; else if ( sum_for+0.001>200.00 ) info.n1 = sum_for*0.05; else info.n1 = 10.; */ } } // ⥫쭠 㬬 info.n1+=dop_sum; if (Work.Count_Par>3 && sum_for>0.001 && info.n13) infolist.add_record(". 㬬",min_sum); infolist.add_record("",info.n1); } } return code_MDefault; } SysAlg250(&info,&r) { /* ᫥ ⪠ ( , ᡥઠ); */ /* - ᪮쪨 뢠 १ ॢ */ /* (0 - ) */ if ( info.b3==B3_OTPUSK || info.b3==B3_UVL || mrasch!=mtek) { info.kod_alg = 1000+'0'; return code_ReturnCode; } /* 뢠 ⮫쪮 " " */ /* ⥪饣 */ //r9=sum[1]-sum[5]; /* ⮪ = ᫥ - ঠ */ toMatrLS(); double r9 = CollectSummProp('a',0,0,CL_MTEK|CL_COL|CL_REAL|CL_SOURCE,GetCurPropCountLS()); double n6 = CollectSummProp(info.kod,mtek,0,CL_M|CL_MTEK|CL_REAL|CL_SOURCE|CL_EXACT,GetCurPropCountLS()); r9 += n6; if ( r9>0.) { info.n1=r9; round2(info.n1,1,info.bz,info.n1); } else info.n1=0.; return code_MDefault; } GetListBZobsolete(ikod,dateB,dateE,bz,&pmap) //// ikod- ,dateB- 砫,dateE- ,bz- 祭,pmap- /// ⫨稥 㭪樨 bz_kod - 砥 祭, // ਮ [dateB,dateE] (᫨ 祭 ஢ ⪨) //////////////// { // 饭!!! ᫨ 祭 bz_kod 砫 ਮ ਮ // ⥬ , ।, 﫮! ࠡ뢠 ।, // 祭 㪠 ਮ var Date = CreateObject("KDate"); double Epsilon = 0.0000001; double rzB=0.,rzE=0.; bz_kod(ikod,dateB,bz,rzB); bz_kod(ikod,dateE,bz,rzE); Date.SetDateD(dateB); Date.ImproveDay(); char key[256];sprintf(key,"%.2f",Date.GetDouble()); char value[256];sprintf(value,"%.2f",rzB); pmap.Add(static_cast_to_string(key),static_cast_to_string(value)); double rz=rzB; while ( nabs(rzB-rzE)>Epsilon ) { while(nabs(rzB-rz)1 ) { // 㦥 ᥬ 筨 var ts = CreateObject("TempCommonSrc"); ts.TempCommonSrcInitial(CMN_SRC_COUNT_LS); var Src=CreateObject("APropBE"); SetCommonProp(CMN_SRC_COUNT_LS,Src); sumVychIspolz = GetDiscount311(mrasch-mtek-mcal+1,mrasch-mtek-1); } if (Sim=="*") //㦭 ।⠢ ⠫ 筨 { sumVychIspolz+= GetDiscount311(mrasch-mtek,mrasch-mtek); //塞 㬬 311 ⥪. ( 筨) sumVychIspolz-= CashSumm(0,info.kod,mrasch,0,32,CL_EXACT|CL_M,0);//㡨ࠥ 㬬 ⥪饬 } double sumVychMes = min(NDFLBase,info.bz-sumVychIspolz); // C㬬 // ᫨ 祭 (뫨 室, ⠭ ) // ⮬ 砥 ⥫ 㬬 , 祬 ।⠢ ⮢ । if ( sumVychMes<0. ) if ( sumVychIspolz>-0.0001 ) sumVychMes = max(sumVychMes,-sumVychIspolz); else sumVychMes = 0.; info.n1 = sumVychMes; if(FL_V_ALG && uprc != NO_SCREEN) { infolist.add_record(" ", NDFLBase); infolist.add_record("ᯮ짮 ࠭", sumVychIspolz); infolist.add_record(" ", info.n1); } return code_Break; } SysAlg897 ( &info, &r ) /* */ { double Epsilon = 0.00001; struct Struct_Alg Work; //祭 ࠬ஢ 㬮砭: 19,86,0,0,0,0 Get_AlgWithParamEx(Work, info.ikod, "19,86,0,0,0,0,4"); //-- ࠬ 1 - ⮫ ⠡ 室 ( 㬮砭 25) int stolbec =19; int param=atoi(reinterpret_cast_to_string(Work.List_Par[0])); if ( param>0 && param<=99 ) stolbec=param; //-- ࠬ 2 - ⪨ ( 㬮砭 86) int numberSet=86; param=atoi(reinterpret_cast_to_string(Work.List_Par[1])); if ( param>0 ) numberSet = param; //-- ࠬ 3 - ப ⪥ ( 㬮砭 0) int rowSet=0; param=atoi(reinterpret_cast_to_string(Work.List_Par[2])); if ( param > 0 && param <= 999) rowSet=param; //-- ࠬ 4 - : // 0 - ( 㬮砭) // 1 - bool bHours= atoi(reinterpret_cast_to_string(Work.List_Par[3]))==0; int idxNorm = bHours?2:1; //-- ࠬ 5 - (⠭ 07.12.2017 38-) // 0 - "⮣ " ( 㬮砭) // 1 - "*( + )" bool bUseRk=atoi(reinterpret_cast_to_string(Work.List_Par[4]))!=0; //-- ࠬ 6 - ᮡ (䫠): // 0x01 - 뢠 , ᫨ /<1 // 0x02 - ࠭ / 楩 // 0x04 - / १ s98() // 0x08 - ⠡ ( "ᥣ" ⮡ 㢮 ) // 0x10 - (蠥 ᢮ 롮ઠ) int Flag=atoi(reinterpret_cast_to_string(Work.List_Par[5])); bool calcOnlyFullMonth=(Flag & 0x01)!=0; bool limitFrv =(Flag & 0x02)!=0; bool useS98 =(Flag & 0x04)!=0; bool fillTabel =(Flag & 0x08)==0; bool fillRv =(Flag & 0x10)==0; //-- ࠬ 7 - 롮ન 㬬: int tipnep=atoi(reinterpret_cast_to_string(Work.List_Par[6])); double frv_nrv=1.; if(fillTabel) worktime(info.crow,info.b3,0); /* ࠡ. ⠡ */ // if (useS98) s98(0,frv_nrv); else { if (nkalend==knorm) { if (!bHours) r[2]=dney_v_tab(rsimv,calm,info.z1,info.z2); else skoljko(r[2],data,info.z1,info.z2,rsimv,calm,cht); } char t[20]; if(fillRv && (info.c=korrv(r,t,0,info.h,flagrow,jf)) != 1) return code_ReturnCode; frv_nrv=r[2]/norm(idxNorm); } // 04.2018 뫮 㫥 樥. ࠫ ⮫쪮 04.2018 // ⮡  . if ( mrasch<364 ) roundd(frv_nrv, 2, frv_nrv); if ( limitFrv && frv_nrv>1+Epsilon ) frv_nrv=1.; //㬬 롮ન double summ=0.; s1001("",info.d1,info.d2,0,stolbec-1,summ,tipnep); //㬬 롮ન ⥫쭮 if(summ<-Epsilon) summ=0.; // 樥 double k_employ=1.; char strTemp[11]; var mraschLastDay = KDateFromInt_WithDay(countday,mrasch); var rowLastDay= KDateFromD(info.d2); // 砭 ப 砭 mrasch var D=(rowLastDay.IsValid()&&rowLastDay.LE(mraschLastDay))? rowLastDay: mraschLastDay; GetKchValue("k_employ",strTemp,10,D); if (Str_Cmp(strTemp," "," ")!=0) k_employ=atof(strTemp); //double k_employ=GetKoefEmployment(D,0,0x1); //"" double mrot=0.; int CodOrg = GetOrgForPodr(GetPodrOfCod(info.kod)); if (Value_For_Table_CodO(numberSet, CodOrg, rowSet, data, mrot) == EOF) mrot=info.bz; // ।塞 ࠩ묨 ᥢ묨 double rk_sev = 0.; if( bUseRk ) { rk_sev= DefineRkFull(data+countday/100.,false); //2018.03.20 - 業 ᥢ ।塞 ⮫쪮 ⮬ 砥, ᫨ 諨 ப "ᥢ୮ " //  "ᥢ୮ ", ᫨ : "96,97,186,187" if (FindSevNu(mrasch)) rk_sev += DefineSev(mrasch,0.,0.); } // double mrot_frv_nrv=mrot*k_employ*frv_nrv*(1 + rk_sev); roundd(mrot_frv_nrv, 2, mrot_frv_nrv); info.n1 = ( summ>mrot_frv_nrv || calcOnlyFullMonth && frv_nrv+Epsilon<1. ) ? 0. : mrot_frv_nrv-summ; if( FL_V_ALG && uprc!=NO_SCREEN ) { if( !useS98 ) { infolist.add_record("",r[2]); infolist.add_record("",norm(idxNorm)); } if ( limitFrv ) infolist.add_record("/ 1", ""); infolist.add_record("/",frv_nrv); infolist.add_record("⮫ 롮ન",stolbec); infolist.add_record("㬬 롮ન",summ); infolist.add_record(" ",tipnep); infolist.add_record("-----------------------","------------------------------"); infolist.add_record(" ⪨ ",numberSet); infolist.add_record(" ப ⪥",rowSet); infolist.add_record("",mrot); infolist.add_record(".",k_employ); if (bUseRk) infolist.add_record("% ", rk_sev*100.); infolist.add_record(" ",mrot_frv_nrv); infolist.add_record("-----------------------","------------------------------"); if (calcOnlyFullMonth && frv_nrv+Epsilon<1. ) infolist.add_record(" 㦭", "/<1"); infolist.add_record("",info.n1); } if (!fillRv) r[2] = 0; return code_Break; } FindSevNu(month) { double dmonth = KDateFromInt(month).GetDouble(); // ⬮, ᯮ "ᥢ" var sevNuList; int cnt = CodeAlgToListNUSafeArray("96,97,186,187", ",",sevNuList); for (int i = 0; i < cnt; ++i) { int code = sevNuList[i]; //७ if (poisk_row(code,0, dmonth,0) == EOF) // . code 諨, 室 ᫥饬 continue; return true;//諨 ப code, month } return false; } SysAlg121 ( &info, &r ) // ⮥ // 5 ࠬ஢ // 1: - 1; - 2 // 2: - 0; ⠡ ᨬ '' // ࠡ⮤⥫ '' ࠡ⮤⥫ ᫨ // 5- ࠬ஬ । 㣮 ᨬ // 3: 䭮 ⠢ - 0; । ࠡ - 1 // 4: 樥 ( 2/3) // 5: ᨬ 祭 ⠡ ࠡ⭨ { double Epsilon = 0.00001; int tip_rv=1; // 1 - ; 2 - int where_rv=1; // 0 - ; 1 - ⠡ ᨬ '' int tip_ras=1; // 0- 䭮 ⠢; 1- । ࠡ double koef_prost=2./3.; // 樥 char SimvTab[2]; SimvTab[0]=SimvTab[1]='\0'; struct Struct_Alg Work; //祭 ࠬ஢ 㬮砭: Get_AlgWithParamEx(Work, info.ikod, "1,1,1,0,0"); // Work.Count_Par - ᫮ pp p⬠ //-- ࠬ 1 - - 0; - 1 int param=atoi(reinterpret_cast_to_string(Work.List_Par[0])); if ( param>=1 && param<=2 ) tip_rv=param; //-- ࠬ 2 - - 0 // ⠡ ᨬ ''- 1; 㬮砭 - 0 param = atoi(reinterpret_cast_to_string(Work.List_Par[1])); if (param >= 0 && param <= 1) where_rv = param; //-- ࠬ 3 - ⮩ 䭮 ⠢ - 0; // । ࠡ - 1 param = atoi(reinterpret_cast_to_string(Work.List_Par[2])); if (param >= 0 && param <= 1) tip_ras = param; //-- ࠬ 4 - 樥 ( 2/3) double paramf = atof(reinterpret_cast_to_string(Work.List_Par[3])); if ( paramf >= Epsilon ) koef_prost = paramf; //-- ࠬ 5 - ᨬ ⠡ // 㬮砭 '' - ⮩ ࠡ⮤⥫ // '' - ⮩ ࠡ⮤⥫ SimvTab[0]= (tip_ras)?'':''; if ( Work.List_Par[4] && GetCharFromStr(reinterpret_cast_to_string(Work.List_Par[4]),0)>'0' ) { char Simv = GetCharFromStr(reinterpret_cast_to_string(Work.List_Par[4]),0); if ( Simv>' ' ) SimvTab[0] = Simv; } //--- ᯮ⥫ 뢮 ப r[2]=r[2]-info.h[2]; // char t[20]; indstr(scr04,mrasch,windrow,r,t,1); r[2]=r[2]+info.h[2]; // if (where_rv==1 && uprc!=NO_SCREEN) { // ᬠਢ ⮫쪮 ⮩ ப, 뢠 var ts = CreateObject("TempCommonSrc"); ts.TempCommonSrcInitial(CMN_SRC_INT_LS); SetCommonProp(CMN_SRC_INT_LS,GetPropOfCod(info.kod)); corcal(mrasch,3); } int day1 = info.z1, day2 = info.z2; double base_sum = 0.; if (tip_ras) // ⠥ । ࠡ { var Dat=CreateObject("KDate"); var PoSredn = CreateObject("KCalcSredn"); if ( PoSredn.InitSredn(info.crow,info.kod_alg,Dat,uprc!=NO_SCREEN?2:0)==ESC ) return code_Break; var Nastr = PoSredn.GetNastr(); Nastr.SetNastr(TIP_RV,tip_rv); // - ⠡ । 맮 tabl_sredn s145(colc2,1); //--- । ६ PoSredn.Calculate(0,2); // if (uprc==3) menuras(0); // ॢ뢮 // ⮩ ⠥ + 㬬 ன day1 = Nastr.GetDateSr().GetDay(), day2 = Nastr.GetDateEndSr().GetDay(); base_sum = PoSredn.SumSredn(); } else // ⠥ 䭮 ⠢ { double stavka=0.,r9=0.; if (tip_rv==1) // - ⠢ s97(info.d1,info.d2,stavka,r9,0); else // 䭨 - ⠢ s96(info.d1,info.d2,stavka,3); if (nabs(stavka)