SF_PV;Relacao de Prevendas;sys_tbbrow; 6;3;18;79;x;;
:SKEL
VARIAVEL zCliClosed=(Select('sccrcli')=0)
VARIAVEL zSelectOrig=Select()
VARIAVEL zNil=if(zCliClosed,Abra_Arq('sccrcli'),'')
VARIAVEL zNil=if(zCliClosed,DbSelectArea(zSelectOrig),'')
VARIAVEL Z_BLOCK = {|x_cli| sccrcli->(dbgoto(x_cli)), sccrcli->cr_nome }
COMANDO DEPOIS zNil=if(zCliClosed,sccrcli->(DbCloseArea()),'')
:TBMT
 13;psq_enter();Enter-Confirma Campo;
 80;tb_pesq(D_OB);P-Pesquisa ;
 32;CIBROW("SE_MOVRO",FNUMPED,"SE_MOVRO");Barra-Produtos ;
 79;tb_index(D_OB);O-Ordena ;
 70;tb_filter(d_ob);F-Filtra ;
:TBFI
Prevenda;fnumped;N;999999;  6;N;
Coo;fnumcoo;N;999999;  6;N;
Valor;Fval;N;@E 999,999.99; 10;N;
Cliente;if(fcli>0,Str(fcli,4)+":"+Eval(z_block,fcli),"     "+if(ftipoven="1","dinheiro",if(ftipoven="2","cheque","cartao")));C;@s25;25;N;
Prds+Unids;ftipoven+ftv+str(ftotprod,4)+str(ftotunid,4);C;@s11;11;N;
Emissao;left(dtoc(fdataemi),5)+" "+left(fhora,5);C;@s11;11;N;
