DEFINE E    _OVL       := .t.
DEFINE E    _LPI_6     := IF(_OVL,IF(p_bhview,"@{P_LPI6}"   ,P_LPI6   ),"")
DEFINE E    _LPI_8     := IF(_OVL,IF(p_bhview,"@{P_LPI8}"   ,P_LPI8   ),"")
DEFINE E    _CPI_10    := IF(_OVL,IF(p_bhview,"@{P_CPI10}"  ,P_CPI10  ),"")
DEFINE E    _CPI_12    := IF(_OVL,IF(p_bhview,"@{P_CPI12}"  ,P_CPI12  ),"")
DEFINE E    _CPI_15    := IF(_OVL,IF(p_bhview,"@{P_CPI15}"  ,P_CPI15  ),"")
DEFINE E    _TUCNEN    := IF(_OVL,IF(p_bhview,"@{P_TUCNEN}" ,P_TUCNEN ),"")
DEFINE E    _TUCNEZ    := IF(_OVL,IF(p_bhview,"@{P_TUCNEZ}" ,P_TUCNEZ ),"")
DEFINE E    _PODCN     := IF(_OVL,IF(p_bhview,"@{P_PODCN}"  ,P_PODCN  ),"")
DEFINE E    _PODCZ     := IF(_OVL,IF(p_bhview,"@{P_PODCZ}"  ,P_PODCZ  ),"")
DEFINE E    _KURZN     := IF(_OVL,IF(p_bhview,"@{P_KURZN}"  ,P_KURZN  ),"")
DEFINE E    _KURZZ     := IF(_OVL,IF(p_bhview,"@{P_KURZZ}"  ,P_KURZZ  ),"")
DEFINE E    _SPREDPIS  := str(MesSuc("MDPredp",1,mes),8)
DEFINE E    _SVYUCT    := str(MesSuc("Vyuct",1,mes),8)
DEFINE E    _SDOUCT    := str(MesSuc("Douct",1,mes),10,1)
DEFINE E    _SSTORNO   := str(MesSuc("Storno",1,mes),8,1)
DEFINE E    _SDALPREDP := str(MesSuc("DalPredp",1,mes),8)
DEFINE E    _SMPLATBA  := str(MesSuc("MPlatba",1,mes),10,1)
DEFINE E    _SUVYUCT   := str(MesSuc("UVyuct",1,mes),10,1)
DEFINE E    _SPREPL    := str(MesSuc("Prepl",1,mes),8)
DEFINE E    _RRPBH     := val(substr(MesRok1,3,4))
""+_cpi_12
"     "+_cpi_10+_lpi_6+"Jmno    "+_tucnen+trim(Matrika->Priezvisko)+" "+trim(Matrika->Meno)+" "+trim(matrika->titul)+_tucnez+_cpi_12
"     "+_cpi_10+"Adresa   "+_tucnen+alltrim(Ulice->txt)+" "+alltrim(pasdkm->dom_trakt)+" ,"+alltrim(Obce->txt)+_tucnez+_cpi_12
"     "+_cpi_10+"Dm      "+_tucnen+substr(alltrim(C_pas_domu)+space(7),1,7)+_tucnez+space(3)+"Byt  "+_tucnen+alltrim(C_pas_bytu)+_tucnez+_cpi_12
_prtl(_riadok,5,_riadok,93,,3)
"     "+_tucnen+"  Ms.  Pedpis  Vyt.    Dot.  Storno  hrada    hrada     Uhrada   Vrc.   Nedopl."
"     "+"                                                I         P     vyt.  pepl.          "+_tucnez
_prtl(_riadok,5,_riadok,93,,3)
if(MDPredp0<>0.00,preskoc_r(),preskoc_r(2))
"     "+"Zstatek z roku "+str(_RRPBH-1,4)+"                                                          "+str(MDPredp0,10,2)
if(Mes>0,preskoc_r(),preskoc_r(30))
"     "+substr(Mesrok1,1,2)+"/"+substr(Mesrok1,3,4)+str(MDPredp1,8)+str(Vyuct1,8)+str(Douct1,10,1)+str(Storno1,8,1)+str(DalPredp1,8)+str(MPlatba1,10,1)+str(UVyuct1,10,1)+str(Prepl1,8)+str(Zostatok(0,1),11,2)
if(Mes>1,preskoc_r(),preskoc_r(28))
"     "+substr(Mesrok2,1,2)+"/"+substr(Mesrok2,3,4)+str(MDPredp2,8)+str(Vyuct2,8)+str(Douct2,10,1)+str(Storno2,8,1)+str(DalPredp2,8)+str(MPlatba2,10,1)+str(UVyuct2,10,1)+str(Prepl2,8)+str(Zostatok(0,2),11,2)
if(Mes>2,preskoc_r(),preskoc_r(26))
"     "+substr(Mesrok3,1,2)+"/"+substr(Mesrok3,3,4)+str(MDPredp3,8)+str(Vyuct3,8)+str(Douct3,10,1)+str(Storno3,8,1)+str(DalPredp3,8)+str(MPlatba3,10,1)+str(UVyuct3,10,1)+str(Prepl3,8)+str(Zostatok(0,3),11,2)
if(Mes>3,preskoc_r(),preskoc_r(24))
"     "+substr(Mesrok4,1,2)+"/"+substr(Mesrok4,3,4)+str(MDPredp4,8)+str(Vyuct4,8)+str(Douct4,10,1)+str(Storno4,8,1)+str(DalPredp4,8)+str(MPlatba4,10,1)+str(UVyuct4,10,1)+str(Prepl4,8)+str(Zostatok(0,4),11,2)
if(Mes>4,preskoc_r(),preskoc_r(22))
"     "+substr(Mesrok5,1,2)+"/"+substr(Mesrok5,3,4)+str(MDPredp5,8)+str(Vyuct5,8)+str(Douct5,10,1)+str(Storno5,8,1)+str(DalPredp5,8)+str(MPlatba5,10,1)+str(UVyuct5,10,1)+str(Prepl5,8)+str(Zostatok(0,5),11,2)
if(Mes>5,preskoc_r(),preskoc_r(20))
"     "+substr(Mesrok6,1,2)+"/"+substr(Mesrok6,3,4)+str(MDPredp6,8)+str(Vyuct6,8)+str(Douct6,10,1)+str(Storno6,8,1)+str(DalPredp6,8)+str(MPlatba6,10,1)+str(UVyuct6,10,1)+str(Prepl6,8)+str(Zostatok(0,6),11,2)
if(Mes>6,preskoc_r(),preskoc_r(18))
"     "+substr(Mesrok7,1,2)+"/"+substr(Mesrok7,3,4)+str(MDPredp7,8)+str(Vyuct7,8)+str(Douct7,10,1)+str(Storno7,8,1)+str(DalPredp7,8)+str(MPlatba7,10,1)+str(UVyuct7,10,1)+str(Prepl7,8)+str(Zostatok(0,7),11,2)
if(Mes>7,preskoc_r(),preskoc_r(16))
"     "+substr(Mesrok8,1,2)+"/"+substr(Mesrok8,3,4)+str(MDPredp8,8)+str(Vyuct8,8)+str(Douct8,10,1)+str(Storno8,8,1)+str(DalPredp8,8)+str(MPlatba8,10,1)+str(UVyuct8,10,1)+str(Prepl8,8)+str(Zostatok(0,8),11,2)
if(Mes>8,preskoc_r(),preskoc_r(14))
"     "+substr(Mesrok9,1,2)+"/"+substr(Mesrok9,3,4)+str(MDPredp9,8)+str(Vyuct9,8)+str(Douct9,10,1)+str(Storno9,8,1)+str(DalPredp9,8)+str(MPlatba9,10,1)+str(UVyuct9,10,1)+str(Prepl9,8)+str(Zostatok(0,9),11,2)
if(Mes>9,preskoc_r(),preskoc_r(12))
"     "+substr(Mesrok10,1,2)+"/"+substr(Mesrok10,3,4)+str(MDPredp10,8)+str(Vyuct10,8)+str(Douct10,10,1)+str(Storno10,8,1)+str(DalPredp10,8)+str(MPlatba10,10,1)+str(UVyuct10,10,1)+str(Prepl10,8)+str(Zostatok(0,10),11,2)
if(Mes>10,preskoc_r(),preskoc_r(10))
"     "+substr(Mesrok11,1,2)+"/"+substr(Mesrok11,3,4)+str(MDPredp11,8)+str(Vyuct11,8)+str(Douct11,10,1)+str(Storno11,8,1)+str(DalPredp11,8)+str(MPlatba11,10,1)+str(UVyuct11,10,1)+str(Prepl11,8)+str(Zostatok(0,11),11,2)
if(Mes>11,preskoc_r(),preskoc_r(8))
"     "+substr(Mesrok12,1,2)+"/"+substr(Mesrok12,3,4)+str(MDPredp12,8)+str(Vyuct12,8)+str(Douct12,10,1)+str(Storno12,8,1)+str(DalPredp12,8)+str(MPlatba12,10,1)+str(UVyuct12,10,1)+str(Prepl12,8)+str(Zostatok(0,12),11,2)
if(Mes>12,preskoc_r(),preskoc_r(6))
"     "+substr(Mesrok13,1,2)+"/"+substr(Mesrok13,3,4)+str(MDPredp13,8)+str(Vyuct13,8)+str(Douct13,10,1)+str(Storno13,8,1)+str(DalPredp13,8)+str(MPlatba13,10,1)+str(UVyuct13,10,1)+str(Prepl13,8)+str(Zostatok(0,13),11,2)
if(Mes>13,preskoc_r(),preskoc_r(4))
"     "+substr(Mesrok14,1,2)+"/"+substr(Mesrok14,3,4)+str(MDPredp14,8)+str(Vyuct14,8)+str(Douct14,10,1)+str(Storno14,8,1)+str(DalPredp14,8)+str(MPlatba14,10,1)+str(UVyuct14,10,1)+str(Prepl14,8)+str(Zostatok(0,14),11,2)
if(Mes>14,preskoc_r(),preskoc_r(2))
"     "+substr(Mesrok15,1,2)+"/"+substr(Mesrok15,3,4)+str(MDPredp15,8)+str(Vyuct15,8)+str(Douct15,10,1)+str(Storno15,8,1)+str(DalPredp15,8)+str(MPlatba15,10,1)+str(UVyuct15,10,1)+str(Prepl15,8)+str(Zostatok(0,15),11,2)
_prtl(_riadok,5,_riadok,93,,3)
"     "+"Souet "+_tucnen+_SPREDPIS+_SVYUCT+_SDOUCT+_SSTORNO+_SDALPREDP+_SMPLATBA+_SUVYUCT+_SPREPL+str(Zostatok(0,mes),11,2)+_tucnez
_prtl(_riadok,5,_riadok,93,,3)
