{"text_format":"2","workbook":"xls","n_sheets":2,"sheets":["ПП","Настройка"],"not_rendered":{"charts":0,"images":0,"macros":0,"external_links":2,"defined_names":56,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900","formulas":"cached_only"}

{"sheet":"ПП","index":0,"n_rows":39,"n_cols":19,"rows_kept":39,"cut":false,"hidden":false,"merged":[],"flags":["formulas_cached_only"]}
[{"$nulls":16},"0401060"]
["Поступ. в банк плат.",null,null,null,"  Списано со сч. плат."]
[]
["ПЛАТЕЖНОЕ ПОРУЧЕНИЕ №",{"$nulls":4},"355",null,"12.07.2010",null,null,null,"",{"$nulls":6},"14"]
[{"$nulls":7},"                  Дата",{"$nulls":4},"       Вид платежа"]
["Сумма","Семь тысяч восемьсот шесть рублей 00 копеек"]
["прописью",""]
["ИНН ",null,null,null,"КПП ",null,null,null,"Сумма",null,"7806-00"]
["ООО"]
[""]
["",{"$nulls":7},"Сч. №",null,"4070381000000000000"]
[""]
["Плательщик"]
["ГРКЦ ГУ Банка России по Тюменской обл.",{"$nulls":7},"БИК",null,"047102001"]
["г.Тюмень",{"$nulls":7},"Сч. №",null,""]
["Банк плательщика "]
["ГРКЦ ГУ Банка России по Тюменской обл.",{"$nulls":7},"БИК",null,"047102001"]
["г.Тюмень",{"$nulls":7},"Сч. №",null,""]
["Банк получателя"]
["ИНН 7204006780",null,null,null,"КПП 720401001",null,null,null,"Сч. №",null,"40101810300000010005"]
["УФК по Тюменской области (ИФНС России по"]
["г.Тюмени №4)"]
["",{"$nulls":7},"Вид оп.",null,"01",null,"Срок. плат.",null,""]
["",{"$nulls":7},"Наз. пл.",null,null,null,"Очер. плат.",null,"4"]
["Получатель",{"$nulls":7},"Код",null,null,null,"Рез. поле"]
["18210501010011000110",null,null,"71401000000",null,"ТП","КВ.02.2010",null,null,"0",null,null,null,"0",null,null,null,"АВ"]
["Единый налог по УСН за 2 квартал 2010г. (объект налогообложения - доходы)"]
[""]
[""]
[""]
[""]
[""]
["Назначение платежа"]
[{"$nulls":5},"Подписи",{"$nulls":5},"Отметки банка"]
[]
[]
[]
[]
[null,"М.П."]

{"sheet":"Настройка","index":1,"n_rows":267,"n_cols":4,"rows_kept":267,"cut":false,"hidden":false,"merged":[],"flags":["formulas_cached_only"]}
[null,"SET DATE TO SHORT","Header","Для вывода даты прописью,напр."]
[null,"__p_doc = \" № \" + allt(vBank.Num_doc) + \" от \" + DTOC(vBank.Date_doc)","Header"]
[null,"This.RepCaption = \"ПП \" + __p_doc","Header"]
[null,"__p_SumEx = This.__SumExpression('BankSpec','Master_RN=vBank.RN','Sum_Base', '*' , '')","Header"]
[null,"__p_m5 = 'Сумма в заголовке платежного поручения должна быть равна итоговой сумме зарегистрированных проводок!'","Header"]
[null,"IIF(vBank.Summa_itog # __p_SumEx AND __p_SumEx # 0, InfoMes(\"Платежное поручение\"+__p_doc + CHR(13) +CHR(13)+ __p_m5), \"\")","Header"]
["НомерДокумента","allt( vBank.NUM_DOC )","Header","07 июня 2002 г.,введите в стр.1"]
["ДатаДокумента","DTOC( vBank.DATE_DOC)","Header","Set date to long,а в последней строке"]
[null,"__p_Mask = \"999999999999.99\"","Header","Set date to short."]
[null,"__p_lfind = .F.","Header"]
[null,"__p_nazn0 = \"\"","Header","Отчет настроен таким образом,что шаблон финансирования ищется в 1 уровне аналитики счета-Кр, а экономическая статья-во 2 уровне.При необходимости можно изменить эти значения в строках 100-105 в переменных RN_KR_A*"]
[null,"__p_nazn1 = \"\"","Header"]
[null,"__p_nazn = \"\"","Header"]
[null,"__p_exc = \"\"","Header"]
[null,"__p_gsm = \"\"","Header"]
[null,"__p_nds = \"\"","Header"]
[null,"__p_exc_str = \"\"","Header"]
[null,"__p_gsm_str = \"\"","Header"]
[null,"__p_nds_str = \"\"","Header"]
[null,"__p_nds_s = IIF(AT(\"@NDS\",BANK.NOTE)#0 OR (vBank.SUMMA_NDS=0 and EMPTY(vBank.Kbk_Rn)),rtrim(\" НДС не облагается.\"),\"\")","Header"]
[null,"__p_Cnt = 0","Header"]
[null,"__p_sumpr = \"\"","Header"]
[null,"__p_sum = 0","Header"]
[null,"__p_SUM_SumEq = 0","Header"]
[null,"__p_DO_Type = allt( This.SEEK_TABLEFIELDS( \"docbase\", \"Rn\", \"docbase.NAME_DOC\", vBank.RN_BASE ))","Header"]
[null,"__p_DO_NUM = allt( vBank.NUM_BASE )","Header"]
[null,"__p_DO_DAT = dtoc( vBank.DATE_BASE )","Header"]
[null,"__p_Summ = Allt( Transform( vBank.SUMMA_ITOG, __p_Mask ) )","Header"]
[null,"Store \"\" to __p_BankName","Header"]
[null,"This.__getBankRek(vBank.rn_org_fr, vBank.rn_rek_fr, @__p_BankName,\"\",\"\")","Header"]
[null,"__p_OrgTypeFR = This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.TYPE\", vBank.rn_org_fr)","Header"]
[null,"__p_INN_FLD = allt(This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", vBank.rn_org_fr))","Header"]
[null,"__p_INN_FR = IIF(AT(\"/\",__p_INN_FLD)=0, __p_INN_FLD , LEFT(__p_INN_FLD, AT(\"/\",__p_INN_FLD) - 1))","Header"]
[null,"__p_KPP_FR = IIF(AT(\"/\",__p_INN_FLD)=0, \"000000000\", RIGHT(__p_INN_FLD, LEN(__p_INN_FLD)-AT(\"/\",__p_INN_FLD)))","Header"]
[null,"__p_INNBank= \"ИНН \" +Iif(!Empty(__p_INN_FR),__p_INN_FR,\"000000000000\")","Header"]
[null,"__p_FR_INNBANK = __p_INN_FR","Header"]
[null,"__p_KPPBANK=IIF(__p_OrgTypeFR==\"1\", \"КПП \" + __p_KPP_FR, \"КПП 000000000\")","Header"]
[null,"__p_FR_KPPBANK= __p_KPP_FR","Header"]
[null,"__p_FR_KPPBANK=IIF(!Empty(__p_FR_KPPBANK), \" КПП \"+__p_FR_KPPBANK, \"\")","Header"]
[null,"__p_FR_BANK=\"ИНН \" + __p_FR_INNBANK +  __p_FR_KPPBANK+ \", \"+ allt(This.__GetOrgName(vBank.Rn_Org_Fr))","Header"]
[null,"__p_BankName=allt(This.__GetOrgName(vBank.Rn_Org_Fr))","Header"]
[null,"__p_FR_RNKAZNA = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.BANK_RN\", vBank.Rn_Org_FR + vBank.Rn_Rek_Fr ))","Header"]
[null,"__p_FR_KAZNANAME = IIF(!Empty(__p_FR_RNKAZNA), allt(This.__GetOrgName(__p_FR_RNKAZNA)), \"\")","Header"]
[null,"__p_INNKAZNA = \"ИНН \" + Iif(!Empty(This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", vBank.Rn_Org_FR)),Left( This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", vBank.Rn_Org_FR),10),\"000000000000\")","Header"]
[null,"__p_FR_LCHET = \", л/с \" + allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNT\", vBank.Rn_Org_FR + vBank.Rn_Rek_Fr ))","Header"]
[null,"__p_KPPKAZNA = IIF(AT(\"/\",This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", vBank.rn_org_fr))=0,\"КПП 000000000\", \"КПП \"+__p_KPP_FR)","Header"]
[null,"_p_Fr_OrgINN=allt(This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", __p_FR_RNKAZNA))","Header"]
[null,"__p_FR_KAZNA=__p_FR_KAZNANAME+\" (\" +allt(This.__GetOrgName(vBank.Rn_Org_Fr))+__p_FR_LCHET +\")\"","Header"]
[null,"__p_FR_RN_KAZ = allt( This.SEEK_TABLEFIELDS( \"FKAZNACH\", \"ORGBASE_RN\", \"FKAZNACH.ORGBASE_RN\", __p_FR_RNKAZNA ))","Header"]
["ИНН","IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA),__p_INNKAZNA,__p_INNBank)","Header"]
["КПП","IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA),__p_KPPKAZNA,__p_KPPBANK)","Header"]
[null,"__p_FR = IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA), __p_FR_KAZNA , __p_BankName) ","Header"]
[null,"__p_A1=subs(__p_FR,1,43)","Header"]
[null,"__p_A1=IIF(CHR(13)$__p_A1,subs(__p_A1,1,AT(chr(13),__p_A1)-1)+\"  \",__p_A1)","Header"]
[null,"__p_AtA1=rat(\" \",__p_A1,1)","Header"]
[null,"__p_AtA1=IIF(__p_AtA1=0,LEN(__p_A1),__p_AtA1)","Header"]
["ОтКого1","iif(len(__p_A1)<43,allt(__p_A1),allt(subst(__p_A1,1,__p_AtA1)))","Header"]
[null,"__p_A2=subs(__p_FR,__p_AtA1+1,43)","Header"]
[null,"__p_A2=IIF(CHR(13)$__p_A2,subs(__p_A2,1,AT(chr(13),__p_A2)-1)+\"  \",__p_A2)","Header"]
[null,"__p_AtA2=iif(len(__p_A2)<43,len(__p_A2),rat(\" \",__p_A2,1))","Header"]
[null,"__p_AtA2=IIF(__p_AtA2=0,LEN(__p_A2),__p_AtA2)","Header"]
["ОтКого2","iif(len(__p_FR)<43,\"\",iif(len(__p_A2)<43,allt(__p_A2),allt(subs(__p_A2,1,__p_AtA2))))","Header"]
[null,"__p_A3=subs(__p_FR,__p_AtA1+__p_AtA2+1,43)","Header"]
[null,"__p_A3=IIF(CHR(13)$__p_A3,subs(__p_A3,1,AT(chr(13),__p_A3)-1)+\"  \",__p_A3)","Header"]
[null,"__p_AtA3=iif(len(__p_A3)<43,len(__p_A3),rat(\" \",__p_A3,1))","Header"]
[null,"__p_AtA3=IIF(__p_AtA3=0,LEN(__p_A3),__p_AtA3)","Header"]
["ОтКого3","iif(len(__p_FR)<43,\"\",iif(len(__p_A3)<43,allt(__p_A3),allt(subs(__p_A3,1,__p_AtA3))))","Header"]
[null,"__p_A4=subs(__p_FR,__p_AtA1+__p_AtA2+__p_AtA3+1,43)","Header"]
[null,"__p_A4=IIF(CHR(13)$__p_A4,subs(__p_A4,1,AT(chr(13),__p_A4)-1)+\"  \",__p_A4)","Header"]
[null,"__p_AtA4=iif(len(__p_A4)<43,len(__p_A4),rat(\" \",__p_A4,1))","Header"]
[null,"__p_AtA4=IIF(__p_AtA4=0,LEN(__p_A4),__p_AtA4)","Header"]
["ОтКого4","iif(len(__p_FR)<43,\"\",iif(len(__p_A4)<43,allt(__p_A4),allt(subs(__p_A4,1,__p_AtA4))))","Header"]
["Сумма","LEFT(__p_Summ,LEN(__p_Summ)-3)+'-'+RIGHT(__p_Summ,2)","Header"]
[null,"__p_Sumpr = This.__Dig2Text(vBank.SUMMA_ITOG,.F.,vBank.RN_CURR)","Header"]
[null,"__p_Sp1_Count = 75","Header"]
[null,"__p_Sp1=subs(__p_Sumpr,1,__p_Sp1_Count)","Header"]
[null,"__p_AtSp1=iif(rat(\" \",__p_Sp1,1)>0,rat(\" \",__p_Sp1,1),len(__p_Sp1))","Header"]
["СуммаПроп1","iif(len(__p_Sp1)<__p_Sp1_Count,allt(__p_Sp1),allt(subst(__p_Sp1,1,__p_AtSp1)))","Header"]
[null,"__p_Sp2=subs(__p_Sumpr,__p_AtSp1+1,__p_Sp1_Count)","Header"]
[null,"__p_AtSp2=iif(len(__p_Sp2)<__p_Sp1_Count or rat(\" \",__p_Sp2,1)=0,len(__p_Sp2),rat(\" \",__p_Sp2,1))","Header"]
["СуммаПроп2","iif(len(__p_Sumpr)<__p_Sp1_Count,\"\",iif(len(__p_Sp2)<__p_Sp1_Count,allt(__p_Sp2),allt(subs(__p_Sp2,1,__p_AtSp2))))","Header"]
[null,"__p_vlnazn1 =__p_nazn + IIF(Empty(vBank.NOTE),\"\",allt(vBank.NOTE)) + iif(empty(__p_DO_Type),\"\",iif(Empty(vBank.NOTE),\"основание: \",\", основание: \") +__p_DO_Type+\"  № \"+__p_DO_NUM+\"   от \"+__p_DO_DAT +\",\") ","Header"]
[null,"__p_vlnazn=__p_vlnazn1","Header"]
[null,"__p_str =space(85-len(__p_vlnazn)+int(len(__p_vlnazn)/85)*85)","Header"]
[null,"__p_str = CHR(13)+CHR(10)","Header"]
[null,"__p_nazn =__p_str + Iif(vBank.USE_TAX_SP, \"\", (Iif( vBank.SUMMA_NDS=0, __p_nds_s,\"в том числе НДС \"+ Allt( Transform( vBank.ST_NDS))+ \"%:  \"+ Allt(str(vBank.SUMMA_NDS,18,2)))))","Header"]
[null,"__p_nazn = allt(__p_vlnazn + __p_nazn)","Header"]
[null,"__p_nazn = __p_nazn + Iif(vBank.USE_TAX_SP, \"\", (Iif( vBank.SUMMA_EXC=0, \"\", \", в том числе акциз \"+ Allt( Transform( vBank.ST_EXC))+ \"%:  \"+ allt(str(vBank.SUMMA_EXC,18,2)))))","Header"]
[null,"__p_nazn = __p_nazn + Iif(vBank.USE_TAX_SP, \"\", (Iif( vBank.SUMMA_GSM=0, \"\", \", в том числе ГСМ \"+ Allt( Transform( vBank.ST_GSM))+ \"%:  \"+ allt(str(vBank.SUMMA_GSM,18,2)))))","Header"]
[null,"__p_kod=IIF(EMPTY(vBank.Rn_Trans),\"\",AllTrim(This.SEEK_TABLEFIELDS( \"Comdicbs\", \"Rn\", \"Comdicbs.Code\", vBank.Rn_Trans)))","Header"]
[null,"__p_kbk1=alltr(This.Seek_TableFields(\"bKlsDoh\",\"Rn\",\"bKlsDoh.Code\",vBank.Kbk_Rn))","Header"]
[null,"__p_kod1=Iif(__p_kod=='АВ' or __p_kod=='ГП' or ((__p_kod=='НС' or __p_kod=='ПЛ' or __p_kod=='ВЗ') and AT(\"пени\",vBank.NOTE)=0 and AT(\"штраф\",vBank.NOTE)=0),\"1\",subs(__p_kbk1,14,1))","Header"]
[null,"__p_kod1=Iif(__p_kod=='ПЕ' or __p_kod=='ПЦ' or ((__p_kod=='НС' or __p_kod=='ПЛ' or __p_kod=='ВЗ') and AT(\"пени\",vBank.NOTE)#0),\"2\",__p_kod1)","Header"]
[null,"__p_kod1=Iif(__p_kod=='СА' or __p_kod=='АШ' or __p_kod=='ИШ' or ((__p_kod=='НС' or __p_kod=='ПЛ' or __p_kod=='ВЗ') and AT(\"штраф\",vBank.NOTE)#0),\"3\",__p_kod1)","Header"]
[null,"__p_kbk=IIF(EMPTY(vBank.Kbk_Rn),\"\",Iif(__p_kbk1$'18210908020061000140,18210908030071000140,18210908040081000140,18210908050091000140,18210908060011000140',__p_kbk1,Left(__p_kbk1,13)+__p_kod1+subs(__p_kbk1,15,6)))","Header"]
[null,"_my=\"182\"","Header","Код администратора доходов (присвоить переменной _my в кавычках)"]
["КБК","IIF(LEFT(__p_kbk,3)=\"000\",_my,LEFT(__p_kbk,3))+SUBSTR(__p_kbk,4)","Header"]
[null,"__p_status=Iif(EMPTY(vBank.TaxState),This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.TaxState\", vBank.rn_org_fr),vBank.TaxState)","Header"]
["Статус","Iif(EMPTY(vBank.Kbk_Rn),\"\",__p_status)","Header"]
[null,"__p_okato=This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.Okato\", vBank.rn_org_to)","Header"]
["ОКАТО","Iif(EMPTY(vBank.Kbk_Rn),\"\",IIF(EMPTY(__p_okato),\"\",__p_okato))","Header"]
["Основание","IIF(EMPTY(vBank.Rn_Pay),\"0\",alltr(This.SEEK_TABLEFIELDS( \"Comdicbs\", \"Rn\", \"Comdicbs.Code\", vBank.Rn_Pay)))","Header"]
[null,"__p_dt=LEFT(vBank.Date_Trans,2)+\".\"+subs(vBank.Date_Trans,3,2)+\".\"+subs(vBank.Date_Trans,5,4)","Header"]
["Дата","IIF(EMPTY(vBank.Date_Trans),\"0\",__p_dt)","Header"]
["Номер","IIF(EMPTY(vBank.Num_Pay),\"0\",alltr(vBank.Num_Pay))","Header"]
["ДатаДок","IIF(EMPTY(vBank.Date_b_Pay),\"0\",alltr(DTOC(vBank.Date_b_Pay)))","Header"]
["ТипПлат","__p_kod","Header"]
[null,"__p_lfind = at(allt(str(vbank_tax.st_nds,8,2))+ \";\",__p_nds_str) # 0","TaxSpec"]
[null,"__p_sum= Iif(__p_lfind, 0, This.__sumexpression([bank_tax], [master_rn =\"]+vbank.rn+[\" and st_nds=] + allt(str(vbank_tax.st_nds,2)), [summa_nds], [summa_nds]))","TaxSpec"]
[null,"__p_nds = Iif(!Empty(__p_sum), __p_nds + \" НДС \" +   allt(Transform(vbank_tax.st_nds))+\"%:  \" + allt(str(__p_sum, 30, 2)), __p_nds)","TaxSpec"]
[null,"__p_nds_str=Iif(__p_lfind, __p_nds_str, __p_nds_str + allt(str(vbank_tax.st_nds,8,2))+\";\")","TaxSpec"]
[null,"__p_lfind = at(allt(str(vbank_tax.st_exc,8,2))+ \";\",__p_exc_str) # 0","TaxSpec"]
[null,"__p_sum=Iif(__p_lfind, 0, This.__sumexpression([bank_tax], [master_rn =\"]+vbank.rn+[\" and st_exc=] + allt(str(vbank_tax.st_exc,2)), [summa_exc], [summa_exc]))","TaxSpec"]
[null,"__p_exc =Iif(!Empty(__p_sum), __p_exc + \" акциз \" +   allt(Transform(vbank_tax.st_exc))+\"%:  \" + allt(str(__p_sum, 30, 2)), __p_exc)","TaxSpec"]
[null,"__p_exc_str=Iif(__p_lfind, __p_exc_str, __p_exc_str + allt(str(vbank_tax.st_exc,8,2))+\";\")","TaxSpec"]
[null,"__p_lfind = at(allt(str(vbank_tax.st_gsm,8,2))+ \";\",__p_gsm_str) # 0","TaxSpec"]
[null,"__p_sum=Iif(__p_lfind, 0, This.__sumexpression([bank_tax], [master_rn =\"]+vbank.rn+[\" and st_gsm=] + allt(str(vbank_tax.st_gsm,2)), [summa_gsm], [summa_gsm]))","TaxSpec"]
[null,"__p_gsm =Iif(!Empty(__p_sum), __p_gsm + \" ГСМ \" +   allt(Transform(vbank_tax.st_gsm))+\"%:  \" + allt(str(__p_sum, 30, 2)), __p_gsm)","TaxSpec"]
[null,"__p_gsm_str=Iif(__p_lfind, __p_gsm_str, __p_gsm_str + allt(str(vbank_tax.st_gsm,8,2))+\";\")","TaxSpec"]
[null,"__p_nalog1 = Iif(!Empty(__p_nds),\"в том числе\"+rtrim(__p_nds),\"\") + Iif(!Empty(__p_exc),\", в том числе\"+rtrim(__p_exc),\"\") + Iif(!Empty(__p_gsm),\", в том числе\"+rtrim(__p_gsm),\"\")","Footer"]
[null,"__p_nalog = Iif(vBank.USE_TAX_SP,__p_nalog1, \"\")","Footer"]
[null,"__p_nazn = Iif(vBank.USE_TAX_SP, Iif(Empty(__p_nazn), __p_nazn+ __p_nalog, __p_nazn + __p_str +__p_nalog),__p_nazn)","Footer"]
[null,"__p_nazn=IIF(AT(\"в том числе\",__p_nazn)=0,__p_nazn,__p_nazn+\",\")","Footer"]
[null,"__p_nazn = Iif(!EMPTY(vBank.Kbk_Rn), __p_vlnazn, __p_nazn)","Footer"]
[null,"__p_SbfRN = 'IIF(Empty(This.SEEK_TABLEFIELDS(\"AccBase\",\"RN\",\"AccBase.RN_TFIN\",RN_KR)),This.SEEK_TABLEFIELDS(\"AccSpec\",\"RN\",\"AccSpec.RN_TFIN\",RN_KR_A1),This.SEEK_TABLEFIELDS(\"AccBase\",\"RN\",\"AccBase.RN_TFIN\",RN_KR))'","Footer"]
[null,"_p_KR='IIF(!Empty(RN_KR_A1),allt( This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\",\"FsbFBase.Rasp_Code\",' + __p_SbfRN + ' )),\"\")'","Footer"]
[null,"_p_PR1 = 'IIF(Empty(This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\",\"FsbFBase.FKRPR_RN\",' + __p_SbfRN + ')), \"\",'","Footer"]
[null,"_p_PR='+IIF(!Empty(RN_KR_A1),'+_p_PR1+'\"-\"+allt( This.SEEK_TABLEFIELDS( \"fFuncCl\", \"RN\", \"fFuncCl.Code\",allt( This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\", \"FsbFBase.FKRPR_RN\",' + __p_SbfRN + '))))),\"\")'","Footer"]
[null,"_p_CSt1 = 'IIF(Empty(This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\",\"FsbFBase.RN_CSR\",' + __p_SbfRN + ')), \"\",'","Footer"]
[null,"_p_CSt=' +IIF(!EMPTY(RN_KR_A1),'+_p_CSt1+'\"-\"+allt( This.SEEK_TABLEFIELDS( \"bCELESTA\", \"RN\", \"bCELESTA.Code\",allt( This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\", \"FsbFBase.RN_CSR\",' + __p_SbfRN + '))))),\"\")'","Footer"]
[null,"_p_FR='+IIF(!Empty(RN_KR_A1),allt( This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\",\"FsbFBase.Prg_Code\",' + __p_SbfRN + ' )),\"\")'","Footer"]
[null,"_p_VR1 = 'IIF(Empty(This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\",\"FsbFBase.RN_VIDR\",' + __p_SbfRN + ')), \"\",'","Footer"]
[null,"_p_VR=' +IIF(!EMPTY(RN_KR_A1),'+_p_VR1+'\"-\" +allt( This.SEEK_TABLEFIELDS( \"bEXPKIND\", \"RN\", \"bEXPKIND.Code\",allt( This.SEEK_TABLEFIELDS( \"FsbFBase\", \"RN\", \"FsbFBase.RN_VIDR\",' + __p_SbfRN + '))))),\"\")'","Footer"]
[null,"_p_EKR1 = '+IIF(!EMPTY(RN_KR_A2),\"-\"+allt(This.SEEK_TABLEFIELDS(\"FsbsSpec\", \"RN\", \"FsbsSpec.Code\",This.SEEK_TABLEFIELDS(\"AccSpec\",\"RN\",\"AccSpec.RN_Tstat\",RN_KR_A2))),'","Footer"]
[null,"_p_EKR2 = 'IIF(!EMPTY(RN_KR_A1),\"-\"+allt(This.SEEK_TABLEFIELDS(\"FsbsSpec\",\"RN\",\"FsbsSpec.Code\",This.SEEK_TABLEFIELDS(\"AccSpec\",\"RN\",\"AccSpec.RN_Tstat\",RN_KR_A1))),\"\"))+ \"=\"+chrtranc(Allt(STR(Sum_Base,20,2)),\",\",\".\")+\"; \"'","Footer"]
[null,"_p_EKR =_p_EKR1 + _p_EKR2","Footer"]
[null,"__p_SumExp=This.__SumExpression('vBankSpec','Master_RN=vBank.Rn and (!Empty(RN_KR_A1) or !Empty(RN_KR_A2)) and Sum_base<>0',_p_KR+_p_PR+_p_CSt+_p_FR+_p_VR+_p_EKR, ' * ')","Footer"]
[null,"__p_nazn=IIF(Empty(__p_SumExp),__p_nazn,\"(\"+substr(__p_SumExp,1,Len(__p_SumExp)-2) + \")\"+ \" \"+__p_nazn)","Footer"]
[null,"__p_S1=subs(__p_nazn,1,85)","Footer"]
[null,"__p_S1=IIF(AT(chr(13),__p_S1)=1,\" \"+subs(__p_S1,3)+\" \",__p_S1)","Footer"]
[null,"__p_S1=IIF(CHR(13)$__p_S1,subs(__p_S1,1,AT(chr(13),__p_S1)-1)+\"  \",__p_S1)","Footer"]
[null,"__p_At1=iif(rat(\" \",__p_S1,1)>0,rat(\" \",__p_S1,1),len(__p_S1))","Footer"]
[null,"__p_At1=IIF(__p_At1=0,LEN(__p_S1),__p_At1)","Footer"]
[null,"__p_At1=IIF(LEN(__p_nazn)<85,85,__p_At1)","Footer"]
["Назначение1c","iif(len(__p_S1)<85,allt(__p_S1),allt(subst(__p_S1,1,__p_At1)))","Footer"]
[null,"__p_S2=subs(__p_nazn,__p_At1+1,85)","Footer"]
[null,"__p_S2=IIF(CHR(13)$__p_S2,subs(__p_S2,1,AT(chr(13),__p_S2)-1)+\"  \",__p_S2)","Footer"]
[null,"__p_At2=iif(len(__p_S2)<85 or rat(\" \",__p_S2,1)=0,len(__p_S2),rat(\" \",__p_S2,1))","Footer"]
[null,"__p_At2=IIF(__p_At2=0,LEN(__p_S2),__p_At2)","Footer"]
["Назначение2c","iif(Empty(__p_S2),\"\",iif(len(__p_S2)<85,allt(__p_S2),allt(subs(__p_S2,1,__p_At2))))","Footer"]
[null,"__p_S3=subs(__p_nazn,__p_At1+__p_At2+1,85)","Footer"]
[null,"__p_S3=IIF(CHR(13)$__p_S3,subs(__p_S3,1,AT(chr(13),__p_S3)-1)+\"  \",__p_S3)","Footer"]
[null,"__p_At3=iif(len(__p_S3)<85 or rat(\" \",__p_S3,1)=0,len(__p_S3),rat(\" \",__p_S3,1))","Footer"]
[null,"__p_At3=IIF(__p_At3=0,LEN(__p_S3),__p_At3)","Footer"]
["Назначение3c","iif(Empty(__p_S3),\"\",iif(len(__p_S3)<85,allt(__p_S3),allt(subs(__p_S3,1,__p_At3))))","Footer"]
[null,"__p_S4=subs(__p_nazn,__p_At1+__p_At2+__p_At3+1,85)","Footer"]
[null,"__p_S4=IIF(CHR(13)$__p_S4,subs(__p_S4,1,AT(chr(13),__p_S4)-1)+\"  \",__p_S4)","Footer"]
[null,"__p_At4=iif(len(__p_S4)<85 or rat(\" \",__p_S4,1)=0,len(__p_S4),rat(\" \",__p_S4,1))","Footer"]
[null,"__p_At4=IIF(__p_At4=0,LEN(__p_S4),__p_At4)","Footer"]
["Назначение4c","iif(Empty(__p_S4),\"\",iif(len(__p_S4)<85,allt(__p_S4),allt(subs(__p_S4,1,__p_At4))))","Footer"]
[null,"__p_S5=subs(__p_nazn,__p_At1+__p_At2+__p_At3+__p_At4+1,85)","Footer"]
[null,"__p_S5=IIF(CHR(13)$__p_S5,subs(__p_S5,1,AT(chr(13),__p_S5)-1)+\"  \",__p_S5)","Footer"]
[null,"__p_At5=iif(len(__p_S5)<85 or rat(\" \",__p_S5,1)=0,len(__p_S5),rat(\" \",__p_S5,1))","Footer"]
[null,"__p_At5=IIF(__p_At5=0,LEN(__p_S5),__p_At5)","Footer"]
["Назначение5c","iif(Empty(__p_S5),\"\",iif(len(__p_S5)<85,allt(__p_S5),allt(subs(__p_S5,1,__p_At5))))","Footer"]
[null,"__p_S6=subs(__p_nazn,__p_At1+__p_At2+__p_At3+__p_At4+__p_At5+1,85)","Footer"]
[null,"__p_S6=IIF(CHR(13)$__p_S6,subs(__p_S6,1,AT(chr(13),__p_S6)-1)+\"  \",__p_S6)","Footer"]
[null,"__p_At6=iif(len(__p_S6)<85 or rat(\" \",__p_S6,1)=0,len(__p_S6),rat(\" \",__p_S6,1))","Footer"]
[null,"__p_At6=IIF(__p_At6=0,LEN(__p_S6),__p_At6)","Footer"]
["Назначение6c","iif(Empty(__p_S6),\"\",iif(len(__p_S6)<85,allt(__p_S6),allt(subs(__p_S6,1,__p_At6))))","Footer"]
["ВидПлат1","Iif(!Empty(vBank.App_Pay), g_platezh_type(vBank.App_Pay, 1), \"\")","Header"]
[null,"Store \"\" to __p_BankName, __p_BankBIC, __p_BankINN","Header"]
[null,"This.__getBankRek( vBank.rn_org_fr, vBank.rn_rek_fr, @__p_BankName, @__p_BankBIC, @__p_BankINN)","Header"]
[null,"__p_FR_RCKAZNA = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNTC\", vBank.rn_org_fr+ vBank.rn_rek_fr))","Header"]
[null,"__p_FR_KCBANK= allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNTC\", vBank.rn_org_fr+ vBank.rn_rek_fr))","Header"]
[null,"__p_FR_BankRN = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.Bank_RN\", vBank.Rn_Org_FR + vBank.Rn_Rek_Fr))","Header"]
[null,"SELECT 'BankAcc'","Header"]
[null,"Locate for allt(BankAcc.Account)==__p_FR_RCKAZNA AND BankAcc.Orbase_RN==__p_FR_BankRN","Header"]
[null,"__p_FR_KCKAZNA=IIF(Found(),BankAcc.AccountC,\"\")","Header"]
[null,"__p_FR_BICKAZNA=IIF(Found(),BankAcc.BankBIC,\"\")","Header"]
["ОтКогоКС","IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA),__p_FR_KCKAZNA,__p_FR_KCBANK) ","Header"]
[null,"__p_FR_BICBANK = m.__p_BankBIC","Header"]
["ОтКогоБИК","IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA),__p_FR_BICKAZNA,__p_FR_BICBANK) ","Header"]
[null,"__p_FR_RCBANK = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNT\", vBank.rn_org_fr+ vBank.rn_rek_fr ))","Header"]
["ОтКогоРС","IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA),__p_FR_RCKAZNA,__p_FR_RCBANK) ","Header"]
[null,"__p_FR_BankNameBank = m.__p_BankName","Header"]
[null,"__p_FR_BankAccC = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.AccountC\", vBank.Rn_Org_FR + vBank.Rn_Rek_Fr))","Header"]
[null,"SELECT 'BankAcc'","Header"]
[null,"Locate for allt(BankAcc.Account)==__p_FR_BankAccC AND BankAcc.Orbase_RN==__p_FR_BankRN","Header"]
[null,"__p_FR_BankNameKAZNA=IIF(Found(), allt(This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.ShowName\", BankAcc.Bank_rn)),\"\")","Header"]
[null,"__p_BankName = IIF(__p_FR_RN_KAZ == __p_FR_RNKAZNA and !Empty(__p_FR_RN_KAZ) and !Empty(__p_FR_RNKAZNA), __p_FR_BankNameKAZNA ,__p_FR_BankNameBANK) ","Header"]
[null,"__p_Bpl1=subs(__p_BankName,1,44)","Header"]
[null,"__p_D1=rat(\" \",__p_Bpl1,1)","Header"]
["БанкПлат1","iif(len(__p_BankName)<44,__p_BankName,iif(len(__p_Bpl1)<44,__p_Bpl1,allt(subs(__p_Bpl1,1,__p_D1))))","Header"]
[null,"__p_Bpl2=subs(__p_BankName,__p_D1+1,44)","Header"]
["БанкПлат2","iif(len(__p_BankName)<44,\"\",allt(__p_Bpl2))","Header"]
[null,"Store \"\" to __p_BankName, __p_BankBIC, __p_BankINN","Header"]
[null,"This.__getBankRek( vBank.rn_org_to, vBank.rn_rek_to, @__p_BankName, @__p_BankBIC, @__p_BankINN)","Header"]
[null,"__p_OrgTypeTO = This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.TYPE\", vBank.rn_org_to)","Header"]
[null,"__p_INN_FLD2 = allt(This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", vBank.rn_org_to))","Header"]
[null,"__p_INN_TO = IIF(AT(\"/\",__p_INN_FLD2)=0, __p_INN_FLD2 , LEFT(__p_INN_FLD2, AT(\"/\",__p_INN_FLD2) - 1))","Header"]
[null,"__p_KPP_TO = IIF(AT(\"/\",__p_INN_FLD2)=0, \"\", RIGHT(__p_INN_FLD2, LEN(__p_INN_FLD2)-AT(\"/\",__p_INN_FLD2)))","Header"]
[null,"__p_INNB=\"ИНН \" +__p_INN_TO","Header"]
[null,"__p_TO_INNBANK =__p_INN_TO","Header"]
[null,"__p_KPPB=IIF(__p_OrgTypeTO==\"1\", \"КПП \" + __p_KPP_TO, \"КПП \")","Header"]
[null,"__p_TO_KPPBANK=IIF(__p_OrgTypeTO==\"1\", __p_KPP_TO, \"\")","Header"]
[null,"__p_To_BANK=\"ИНН \" + __p_TO_INNBANK + __p_TO_KPPBANK+ \", \" + allt(This.__GetOrgName(vBank.Rn_Org_To))","Header"]
[null,"__p_BankNameP=allt(This.__GetOrgName(vBank.Rn_Org_To))","Header"]
[null,"__p_To_CODE = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.CODE\", vBank.Rn_Org_To + vBank.Rn_Rek_To ))","Header"]
[null,"__p_To_RNKAZNA = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.BANK_RN\", vBank.Rn_Org_To + vBank.Rn_Rek_To ))","Header"]
[null,"__p_To_KAZNANAME =IIF(!Empty(__p_To_RNKAZNA),allt(This.__GetOrgName(__p_To_RNKAZNA)), \"\")","Header"]
[null,"__p_To_INNKAZNA = \"ИНН \" + Left( This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", __p_To_RNKAZNA),10)","Header"]
[null,"__p_INNK=\"ИНН \" + Left( This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", vBank.Rn_Org_to),10)","Header"]
[null,"__p_To_LCHET = \", л/с \" + allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNT\", vBank.Rn_Org_To + vBank.Rn_Rek_To ))","Header"]
[null,"__p_To_KPPKAZNA=RIGHT( This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", __p_To_RNKAZNA),9)","Header"]
[null,"__p_KPPK=\"КПП \" + __p_KPP_TO","Header"]
[null,"_p_To_OrgINN=allt(This.SEEK_TABLEFIELDS( \"Orgbase\", \"Rn\", \"Orgbase.INN\", __p_To_RNKAZNA))","Header"]
[null,"__p_To_KAZNA=__p_To_KAZNANAME + \" (\" +allt(This.__GetOrgName(vBank.Rn_Org_To))+__p_To_LCHET +\")\"","Header"]
[null,"__p_TO_RN_KAZ = allt( This.SEEK_TABLEFIELDS( \"FKAZNACH\", \"ORGBASE_RN\", \"FKAZNACH.ORGBASE_RN\", __p_TO_RNKAZNA ))","Header"]
["ИННП","IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) ,__p_INNK ,__p_INNB)","Header"]
["КППК","IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) ,__p_KPPK,__p_KPPB)","Header"]
[null,"__p_TO = IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) ,__p_TO_KAZNA , __p_BankNameP) ","Header"]
[null,"__p_B1=subs(__p_TO,1,43)","Header"]
[null,"__p_B1=IIF(CHR(13)$__p_B1,subs(__p_B1,1,AT(chr(13),__p_B1)-1)+\"  \",__p_B1)","Header"]
[null,"__p_AtB1=rat(\" \",__p_B1,1)","Header"]
[null,"__p_AtB1=IIF(__p_AtB1=0,LEN(__p_B1),__p_AtB1)","Header"]
["Кому","iif(len(__p_B1)<43,allt(__p_B1),allt(subst(__p_B1,1,__p_AtB1)))","Header"]
[null,"__p_B2=subs(__p_TO,__p_AtB1+1,43)","Header"]
[null,"__p_B2=IIF(CHR(13)$__p_B2,subs(__p_B2,1,AT(chr(13),__p_B2)-1)+\"  \",__p_B2)","Header"]
[null,"__p_AtB2=iif(len(__p_B2)<43,len(__p_B2),rat(\" \",__p_B2,1))","Header"]
[null,"__p_AtB2=IIF(__p_AtB2=0,LEN(__p_B2),__p_AtB2)","Header"]
["Кому1","iif(len(__p_TO)<43,\"\",iif(len(__p_B2)<43,allt(__p_B2),allt(subs(__p_B2,1,__p_AtB2))))","Header"]
[null,"__p_B3=subs(__p_TO,__p_AtB1+__p_AtB2+1,43)","Header"]
[null,"__p_B3=IIF(CHR(13)$__p_B3,subs(__p_B3,1,AT(chr(13),__p_B3)-1)+\"  \",__p_B3)","Header"]
[null,"__p_AtB3=iif(len(__p_B3)<43,len(__p_B3),rat(\" \",__p_B3,1))","Header"]
[null,"__p_AtB3=IIF(__p_AtB3=0,LEN(__p_B3),__p_AtB3)","Header"]
["Кому2","iif(len(__p_TO)<43,\"\",iif(len(__p_B3)<43,allt(__p_B3),allt(subs(__p_B3,1,__p_AtB3))))","Header"]
[null,"__p_B4=subs(__p_TO,__p_AtB1+__p_AtB2+__p_AtB3+1,43)","Header"]
[null,"__p_B4=IIF(CHR(13)$__p_B4,subs(__p_B4,1,AT(chr(13),__p_B4)-1)+\"  \",__p_B4)","Header"]
[null,"__p_AtB4=iif(len(__p_B4)<43,len(__p_B4),rat(\" \",__p_B4,1))","Header"]
[null,"__p_AtB4=IIF(__p_AtB4=0,LEN(__p_B4),__p_AtB4)","Header"]
["Кому3","iif(len(__p_TO)<43,\"\",iif(len(__p_B4)<43,allt(__p_B4),allt(subs(__p_B4,1,__p_AtB4))))","Header"]
[null,"__p_TO_BankNameBank = m.__p_BankName","Header"]
[null,"__p_TO_BankAccC = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.AccountC\", vBank.Rn_Org_To + vBank.Rn_Rek_To))","Header"]
[null,"__p_TO_BankRN = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.Bank_RN\", vBank.Rn_Org_To + vBank.Rn_Rek_To))","Header"]
[null,"SELECT 'BankAcc'","Header"]
[null,"Locate for allt(BankAcc.Account)==__p_TO_BankAccC AND BankAcc.Orbase_RN==__p_TO_BankRN","Header"]
[null,"__p_TO_BankNameKAZNA=IIF(Found(), allt(BankAcc.BankName),\"\")","Header"]
[null,"__p_TO_BankName = IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) , __p_TO_BankNameKAZNA , __p_TO_BankNameBANK) ","Header"]
[null,"__p_Bpol1=subs(__p_TO_BankName,1,44)","Header"]
[null,"__p_D1=rat(\" \",__p_Bpol1,1)","Header"]
["БанкПолуч1","iif(len(__p_TO_BankName)<44,__p_TO_BankName,iif(len(__p_Bpol1)<44,__p_Bpol1,allt(subs(__p_Bpol1,1,__p_D1))))","Header"]
[null,"__p_Bpol2=subs(__p_TO_BankName,__p_D1+1,44)","Header"]
["БанкПолуч2","iif(len(__p_TO_BankName)<44,\"\", allt(__p_Bpol2))","Header"]
[null,"__p_TO_KCBANK= allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNTC\", vBank.rn_org_TO+ vBank.rn_rek_TO))","Header"]
[null,"__p_TO_RCKAZNA = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNTC\", vBank.rn_org_TO+ vBank.rn_rek_TO))","Header"]
[null,"SELECT 'BankAcc'","Header"]
[null,"Locate for allt(BankAcc.Account)==__p_TO_RCKAZNA AND BankAcc.Orbase_RN==__p_TO_BankRN","Header"]
[null,"__p_TO_KCKAZNA=IIF(Found(),BankAcc.AccountC,\"\")","Header"]
[null,"__p_TO_BICKAZNA=IIF(Found(),BankAcc.BankBIC,\"\")","Header"]
["КомуКС","IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) , __p_TO_KCKAZNA , __p_TO_KCBANK) ","Header"]
[null,"__p_TO_BICBANK = m.__p_BankBIC","Header"]
["КомуБИК","IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) ,__p_TO_BICKAZNA,__p_TO_BICBANK) ","Header"]
[null,"__p_TO_RCBANK = allt( This.SEEK_TABLEFIELDS( \"BANKACC\", \"Rn\", \"BANKACC.ACCOUNT\", vBank.rn_org_TO+ vBank.rn_rek_TO ))","Header"]
["КомуРС","IIF(__p_TO_RN_KAZ == __p_TO_RNKAZNA and !Empty(__p_TO_RN_KAZ) and !Empty(__p_TO_RNKAZNA) , __p_TO_RCKAZNA,__p_TO_RCBANK) ","Header"]
["ОчерПлат","allt( Transform( vBank.TURN_PAY,\"99\" ))","Header"]
["СрокПлат","Iif(!Empty(vBank.DATE_PAY),DTOC(vBank.DATE_PAY),\"\")","Header"]