NF_NFREF;NF Referenciadas;sys_tbbrow; 4; 0;20;79;padrao;;
:SKEL
VARIAVEL zwFnum := if(type('m_FNUM')='U',0,m_FNUM)
VARIAVEL zwFSERIE := if(type('m_FSERIE')='U',Ltrim(Str(if(s_nf_serie<=1,1,s_nf_serie),2)),m_FSERIE)
VARIAVEL zwFMODELO := if(type('m_FSERIE')='U','55',m_fModelo)
VARIAVEL wChave := Pad(zwFMODELO,2)+str(zwFnum,10)+Pad(zwFSERIE,3)
VARIAVEL zNIL := if(zwFnum>0, (OrdScope(0,wChave),OrdScope(1,wChave),DbGoTop()), '')
// 43;tb_insert(D_OB,"NF_NFREF_NFE");+-NFE ;
:TBMT
 22;tb_insert(D_OB,"NF_NFREF_NFE");Ins-NFE ;
 32;tb_insert(D_OB,"NF_NFREF_COO");Barra-COO  ;
 47;tb_insert(D_OB,"NF_NFREF_NFP");/-NFP ;
 65;tb_update(D_OB);A-Altera ;
  7;tb_del(D_ob);DEL-DELeta ;
 13;doget(D_ob);Enter-Edita ;
 73;lst_alias(D_OB);I-Imprime ;
 80;tb_pesq(D_OB);P-Pesquisa ;
 84;tb_locate(D_oB);T-Busca_Trecho ;
 76;tb_locate(D_oB);L-Busca_Iniciais ;
 67;tb_locate(D_oB);C-Repete_Busca ;
 79;tb_index(D_OB);O-Ordena ;
 70;tb_filter(d_ob);F-Filtra ;
 69;tb_filter(d_ob,"Exp");E-Filtra_Expressao ;
 61;doget(D_ob,,.t.);=-Repete_Edicao ;
:TBFI
NFE;FNUM;N;9999999999; 10;;
Ser;FSERIE;C;xxx; 3;;
Mod;FMODELO;C;xx; 3;;
Doc;TIPO;C;xxx;  3;;
ChaveNFE_Referenciada;REFNFE;C;@S44; 44;;
modECF;MODECF;C;xx;  6;;
nECF;NECF;C;xxx;  3;;
NumCOO;NCOO;C;@S7;  7;;
cUF;CUF;C;xx;  2;;
AAMM;AAMM;C;xxxx;  4;;
Cnpj/Cpf;CNPJCPF;C;@S14; 14;;
MODELO;MODELO;C;xx;  2;;
SERIE;SERIE;C;xx;  2;;
nNF;NNF;C;@S10; 10;;
IE da NFP;IE;C;@S14; 14;;