 1; 2;0;22;79;Conciliacao do Caixa;;;;;
:SKEL
COMANDO ANTES M_USU_conf = IF(m_abonadif=" ".and.EMPTY(M_USU_conf), SYS_USUARIO, M_USU_conf)
COMANDO ANTES M_DATAconf = IF(m_abonadif=" ".and.EMPTY(M_DATAconf), s_datual, M_DATAconf)
COMANDO ANTES M_HORAconf = IF(m_abonadif=" ".and.EMPTY(M_HORAconf), TIME(), M_HORAconf)

COMANDO ANTES z_cdinh=fdinh+VDINH+VPMDINH +vcrdinh-vpag_caixa 
COMANDO ANTES z_ccheq=fcheq+VCHEQ+VPMCHEQ +vcrcheq 
COMANDO ANTES z_ccart=fcart+VCART+VPMCART +vcrcart
COMANDO ANTES z_cconv=fconv+VCONV+VPMCONV +vcrconv
COMANDO ANTES z_ccarn=fcarn+VCARN+VPMCarn +vcrcarn

COMANDO ANTES  ZD_DINH = VIDINH-z_cdinh
COMANDO ANTES  ZD_CHEQ = VICHEQ-z_ccheq
COMANDO ANTES  ZD_CART = VICART-z_ccart
COMANDO ANTES  ZD_CONV = VICONV-z_cconv
COMANDO ANTES  ZD_CARN = VICARN-z_ccarn

COMANDO ANTES z_strdinh = transform(fdinh,"@E 999999.99")+"|"+transform(VDINH+VPMDINH,"@E 999999.99")+"|"+transform(z_cdinh,"@E 999999.99")+"|"+transform(ViDINH,"@E 999999.99")+"|"
COMANDO ANTES z_strcheq = transform(fcheq,"@E 999999.99")+"|"+transform(VCHEQ+VPMCHEQ,"@E 999999.99")+"|"+transform(z_ccheq,"@E 999999.99")+"|"+transform(ViCHEQ,"@E 999999.99")+"|"
COMANDO ANTES z_strcart = transform(fcart,"@E 999999.99")+"|"+transform(VCART+VPMCART,"@E 999999.99")+"|"+transform(z_ccart,"@E 999999.99")+"|"+transform(ViCART,"@E 999999.99")+"|"
COMANDO ANTES z_strconv = transform(fconv,"@E 999999.99")+"|"+transform(VCONV+VPMCONV,"@E 999999.99")+"|"+transform(z_cconv,"@E 999999.99")+"|"+transform(ViCONV,"@E 999999.99")+"|"
COMANDO ANTES z_strcarn = transform(fcarn,"@E 999999.99")+"|"+transform(VCARN+VPMCarn,"@E 999999.99")+"|"+transform(z_ccarn,"@E 999999.99")+"|"+transform(ViCARN,"@E 999999.99")+"|"

COMANDO ANTES z_strdinh = z_strdinh + transform(ZD_DINH,"@E 999999.99")+"|"
COMANDO ANTES z_strcheq = z_strcheq + transform(ZD_CHEQ,"@E 999999.99")+"|"
COMANDO ANTES z_strcart = z_strcart + transform(ZD_CART,"@E 999999.99")+"|"
COMANDO ANTES z_strconv = z_strconv + transform(ZD_CONV,"@E 999999.99")+"|"
COMANDO ANTES z_strcarn = z_strcarn + transform(ZD_CARN,"@E 999999.99")+"|"

:TFIE
//pag;l;c;desc;tipo;tam;campo;pict;when;valid;dbname;objcons;chave?;seek?;le;ce;cexib;pictexib

 1; 2; 2;("Abertura: "+USU_OPEN      +"   Fechamento: "+USU_FECH       +"   Conciliacao: "+m_USU_conf);
 1; 3; 2;("Data....: "+Dtoc(DATAOPEN)+"   Data......: "+Dtoc(DATAFECH) +"   Data.......: "+Dtoc(m_DATAconf));
 1; 4; 2;("Hora....: "+HORAOPEN      +"   Hora......: "+HORAFECH       +"   Hora.......: "+m_HORAconf);

 1; 6; 2;("Receb.Avulsos.: "+transform(vrec_caixa,"@E 999999.99")+" ("+Str(nrec_caixa,4)+" rcs)" );
 1; 7; 2;("Pagto.Avulsos.: "+transform(vpag_caixa,"@E 999999.99")+" ("+Str(npag_caixa,4)+" pgs)");
 1; 8; 2;("Transferencias: "+transform(VTRANSF,"@E 999999.99")+" ("+Str(nven6,4)+" tfs)" );
 1; 9; 2;("Cancelamentos.: "+transform(VCANC,"@E 999999.99")+" ("+Str(ncanc,4)+" cnc)" );
 1;10; 2;("Dif.Trocas....: "+transform(VDEV,"@E 999999.99")+" ("+Str(ndev,4)+" trc)" );

 1; 6;40;Ocorrencias:;M;10;Obs;9Memo];;Editor(@m_obs,"Ocorrencias",7,30,19,77);;;N;; 0; 0;;;

 1;12; 2;("FormaPg  Fundo Cxa     Venda  Tot.Calc  Tot.Inf.  Tot.Dif.   Conciliacao");
//       ("         999999.99 999999.99 999999.99 999999.99 999999.99   999999.99");
 1;13; 2;("========|=========|=========|=========|=========|=========|=============");

 1;14; 9;;N;12;fdinh;999999.99;
 1;15; 9;;N;12;fcheq;999999.99;
 1;16; 9;;N;12;fcart;999999.99;
 1;17; 9;;N;12;fconv;999999.99;
 1;18; 9;;N;12;fcarn;999999.99;

 1;14; 2;("Dinheiro|"+z_strdinh);N;12;VcnDINH;9999999.99;
 1;15; 2;("Cheques |"+z_strcheq);N;12;VcnCHEQ;9999999.99;
 1;16; 2;("Cartoes |"+z_strcart);N;12;VcnCART;9999999.99;
 1;17; 2;("Convenio|"+z_strconv);N;12;VcnCONV;9999999.99;
 1;18; 2;("Carnes  |"+z_strcarn);N;12;VcnCarn;9999999.99;
