SCCPPED;Titulos a Pagar;skip_blk(x); 8; 0;18;79;pscppd1;;
:SKEL
VARIAVEL w_mensagem = "Sem mais Titulos de "+alltrim(sccpfor->cp_fantasi)
VARIAVEL w_chave    = Str(m_cp_cod_for,5)
VARIAVEL w_block    = {|| w_chave <> Str(cp_cod_for,5) }
variavel #TEXTO_FONTE
   dbSetFilter( {||day(cp_dt_lqd)=0}, 'day(cp_dt_lqd)=0' )
   dbSeek( w_chave )
   if (w_chave<>Str(cp_cod_for,5)).or.(day(cp_dt_lqd)<>0)
      Alert("Fornecedor "+alltrim(sccpfor->cp_fantasi)+" sem titulos em aberto !")
      MyKeyb(chr(27)+chr(27))
   endif
   //ONINIT
      hwg_TbFi(@D_oB, 'Dt Emis;CP_DT_EMIS;D;;8;N;')
      hwg_TbFi(@D_oB, 'Duplic;CP_DUPLIC;C;xxxxxxxxxx; 10;N;')
      hwg_TbFi(@D_oB, 'Comentario;CP_DESC;C;@s24;24;N;')
      hwg_TbFi(@D_oB, 'Dt Venc;CP_DT_VENC;D;;8;N;')
      hwg_TbFi(@D_oB, 'Valor;CP_VALOR;N;99999.99;8;N;')
      hwg_TbFi(@D_oB, 'Di;CP_DIVISAO;N;99;2;N;')
      hwg_TbFi(@D_oB, 'Dt Lqd;CP_DT_LQD;D;;8;N;')
      hwg_TbFi(@D_oB, 'Val Lqd;CP_VAL_LQD;N;9999999.99; 10;N;')
      hwg_TbFi(@D_oB, 'Cx;SI_CAIXA;N;99; 2;S;')
      hwg_TbFi(@D_oB, 'Prt;CP_LOCAL;N;999;3;N;')
      hwg_TbFi(@D_oB, 'Forn;fantforn(CP_COD_FOR);C;@s15; 15;N;')
      hwg_TbFi(@D_oB, 'Tl;CP_TIP_LQD;C;x;2;N;')
      hwg_TbFi(@D_oB, 'S;CP_SITUACA;N;1;1;N;')
      hwg_TbFi(@D_oB, 'Acesso;rec_del();N;;7;N;')
      hwg_TbFi(@D_oB, 'Pedido;CP_NUM_PED;C;xxxxxxxxxx; 10;N;')
   //ENDONINIT   
#FIM_TEXTO_FONTE
:TBMT
 13;psq_enter();Enter-Confirma ; 
 80;tb_pesq(D_OB);P-Pesquisa ;
 32;tb_cons();Barra-Exibe ;
 69;doget(D_ob);E-Edita ;
 73;lst_alias(D_OB);I-Imprime ;