Jump to content
Fivewin Brasil

syspel

Membros
  • Posts

    511
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by syspel

  1. Olá Estou com um problema com impressão na rede, a cerca de dois meses. Meus relatórios não imprimem na rede. Já tentei de tudo e até agora nada! Estou usando xHarbour Fico no aguardo.
  2. Olá Estou com um problema com impressão na rede, a cerca de dois meses. Meus relatórios não imprimem na rede. Já tentei de tudo e até agora nada! Estou usando xHarbour Fico no aguardo.
  3. Fiz as alterações e ainda continua dando erro. =(
  4. Estou com esse problema ! No xharbour tenho uma macro nesse exemplo sa1="term" + varcod +".dbf" Usando o comando ferase(&sa1) não joga fora, e usando o outro comando delete file &sa1 tambem não joga fora, não do erro. E tambem não é deletado. No Clipper deleta, no fwh2.7 tbm deleta, só no xharb não. Como resolver ??? fwh2.7 bcc55 xharbour 0.99 0.61
  5. Estou com esse problema ! No xharbour tenho uma macro nesse exemplo sa1="term" + varcod +".dbf" Usando o comando ferase(&sa1) não joga fora, e usando o outro comando delete file &sa1 tambem não joga fora, não do erro. E tambem não é deletado. No Clipper deleta, no fwh2.7 tbm deleta, só no xharb não. Como resolver ??? fwh2.7 bcc55 xharbour 0.99 0.61
  6. Problema Resolvido ! vlw =D
  7. Tenho um arquivo fornecedor O arquivo fornecedor esta selecionado por cnpj, Quando eu gravo por cnpj ele grava corretamente, mas na hora de fazer a alteração de qualquer campo como rua, endereço, cep, ele grava sempre em cima do primeiro registro. fw 2.7 xharb 0.99 bcc 55 ai va o prg ! #Include 'Fivewin.ch' Static fro1,aget,cfo11 Function Forne_01 Local ofont,ofont1,ofont2,ao Close databases select 0 if net_use("Corneced",.f.,5) set index to forneced.efi,Fornome.efi go top else msgalert("Arquivo Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") close databases return endif pega=0 vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(40) vF_NO = space(6) vF_CID = space(30) vF_MUNI = space(30) vF_TEL = space(15) vF_CEP = space(8) vF_BAIRRO = space(30) vF_COMPLE = space(20) aget:=array(12) Select Corneced set order to 1 go Top vF_CGC =F_CGC vF_NOME =F_NOME vF_INSCRICA =F_INSCRICA vF_ESTADO =F_ESTADO vF_END =F_END vF_NO =F_NO vF_CEP =F_CEP vF_CID =F_CID vF_MUNI =F_MUNI vF_TELE =F_TELE vF_BAIRRO =F_BAIRRO vF_COMPLE =F_COMPLE pega=recno() define font ofont1 name "courier" size 8,13 define font ofont name "courier" size 8,13 define font ofont2 name "arial mt black" size 12,14 Define dialog fro1 from 7,4 to 30.1,78 title 'Cadastro/Alteração/Exclusão de Fornecedores' color 'b/w'; style 5 @ 0.5,12 say 'Fornecedores' of fro1 size 95,12 color 'r+/w' font ofont2 @ 2.1,02 say 'CNPJ/CPF___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3,02 say 'Nome_______: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,02 say 'Endereço___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,39 say 'No: ' of fro1 size 50,12 font ofont1 color 'b/w' @ 4.9,02 say 'Bairro_____: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 5.8,02 say 'Municipio__: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 5.7,29 say 'Cidade_:' of fro1 size 115,12 font ofont1 color 'b/w' @ 4.9,26.4 say 'Complemento: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 6.6,31 say 'Cep_: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 7.5,31.5 say 'Uf_: ' of fro1 size 90,12 font ofont1 color 'b/w' @ 6.6,02 say 'Inscrição__: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 7.5,02 say 'Telefone___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 2.5,08.4 get aget[1] var VF_CGC PICT '@R 99.999.999/9999-99' size 76,12 of fro1 font ofont VALID VEFORN2() .and. cnpf(vf_cgc) @ 3.5,08.4 get aget[2] var VF_NOME PICT '@!' size 164,12 of fro1 font ofont @ 4.5,08.4 get aget[3] var VF_END PICT '@!' size 164,12 of fro1 font ofont @ 4.5,31 get aget[4] var VF_NO PICT '99999' size 27,12 of fro1 font ofont @ 5.5,08.4 get aget[5] var VF_BAIRRO PICT '@!' size 90,12 of fro1 font ofont @ 5.5,25.9 get aget[6] var VF_COMPLE PICT '@!' size 76,12 of fro1 font ofont @ 6.5,08.4 get aget[7] var VF_MUNI PICT '@!' size 76,12 of fro1 font ofont @ 6.5,25.9 get aget var VF_CID PICT '@!' size 76,12 of fro1 font ofont @ 7.5,08.4 get aget[9] var VF_INSCRICA PICT '@!' size 76,12 of fro1 font ofont valid ver_se(vf_inscrica) @ 7.5,25.9 get aget[10] var VF_CEP PICT '@R 99999-999' size 40,12 of fro1 font ofont @ 8.5,08.4 get aget[11] var VF_TELE PICT '@!R XXX.XXXXXXXXXXX' size 62,12 of fro1 font ofont @ 8.5,25.9 get aget[12] var VF_ESTADO PICT '@!' size 13,12 of fro1 font ofont For x=1 to 12 aget[x]:refresh() next x aget[1]:setfocus() aget[1]:setpos(1) @ 145,04 Btnbmp size 41,13 noborder FILENAME "Inclui.bmp" of fro1 action inc_forn() @ 145,54 Btnbmp size 41,13 noborder FILENAME "Altera.bmp" of fro1 action alt_forn() @ 145,96 Btnbmp size 41,13 noborder FILENAME "bto5.bmp" of fro1 action Ante_forn() @ 145,142 Btnbmp size 41,13 noborder FILENAME "bto6.bmp" of fro1 action Pro_forn() @ 145,188 Btnbmp size 41,13 noborder FILENAME "Excluir.bmp" of fro1 action Exc_forn() @ 145,235.5 Btnbmp size 41,13 noborder FILENAME "Cancela.bmp" of fro1 action fro1:end() @ 0.5,35 button ao prompt ":" of fro1 size 14,11 action c_consult() ao:refresh() Activate dialog fro1 on paint wndboxraised(fro1:hdc,5,5,320,580) centered Close Databases Return nil Function inc_forn IF Empty(VF_CGC) msgstop("Cóigo em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif Select corneced set order to 1 Seek VF_CGC IF Found() msgalert("Codigo já Existe use o"+chr(13)+; "Botão que Altera","Aviso") aget[2]:setfocus() aget[2]:setpos(1) Return .f. endif Select Corneced set index to forneced.efi,Fornome.efi APPEND BLANK if ! Neterr() REPLACE F_CGC WITH VF_CGC REPLACE F_NOME WITH VF_NOME REPLACE F_INSCRICA WITH VF_INSCRICA REPLACE F_ESTADO WITH VF_ESTADO REPLACE F_END WITH VF_END REPLACE F_NO WITH VF_NO REPLACE F_BAIRRO WITH VF_BAIRRO REPLACE F_CID WITH VF_CID REPLACE F_CEP WITH VF_CEP REPLACE F_COMPLE WITH VF_COMPLE REPLACE F_MUNI WITH VF_MUNI REPLACE F_TELE WITH VF_TELE commit UNLOCK ALL vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(40) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) PEGA=0 for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) endif Return .T. Function Alt_forn IF Empty(VF_CGC) msgstop("Codigo em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif Select corneced set order to 1 Seek VF_CGC IF ! Found() msgalert("Codigo não Existe use o"+chr(13)+; "Botão que Inclui","Aviso") aget[2]:setfocus() aget[2]:setpos(1) Return .F. endif Select corneced Set index to forneced.efi,Fornome.efi go pega if ! lock() msgalert("Registro Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") return .f. endif REPLACE F_NOME WITH VF_NOME REPLACE F_INSCRICA WITH VF_INSCRICA REPLACE F_ESTADO WITH VF_ESTADO REPLACE F_END WITH VF_END REPLACE F_NO WITH VF_NO REPLACE F_BAIRRO WITH VF_BAIRRO REPLACE F_CID WITH VF_CID REPLACE F_CEP WITH VF_CEP REPLACE F_MUNI WITH VF_MUNI REPLACE F_TELE WITH VF_TELE REPLACE F_COMPLE WITH VF_COMPLE vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) pega=0 for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) Commit UNLOCK ALL Return .t. Function Pro_forn Select corneced skip vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pega=recno() if eof() tone(300,5) tone(300,7) msgstop('Fim do Arquivo','Aviso') skip -1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE pega=recno() select corneced Endif For x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() Return .t. Function Ante_forn Select corneced skip - 1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE pega=recno() if bof() tone(300,5) tone(300,7) msgstop('Inicio do Arquivo','Aviso') aget[2]:setfocus() endif for x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() return nil Function Exc_forn IF Empty(VF_CGC) msgstop("Código em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. Else Select corneced set order to 1 go pega if ! lock() msgalert("Registro Bloqueado por"+chr(13)+; "Outro Terminal","Aviso" ) return .f. endif if msgyesno("Exclui o fornecedor","Exclusão") DELETE vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) else return .F. endif ENDIF Return .T. Func VEFORN2() Select corneced set order to 1 seek VF_CGC IF ! EMPTY(VF_CGC) IF ! FOUND() msgyesno("Fornecedor não esta"+chr(13)+; "Cadastrado, Inclui","Aviso") vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for c=2 to 12 aget[c]:refresh() next c aget[2]:setfocus() aget[2]:setpos(1) Else Select corneced set order to 1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pega=recno() for c=1 to 12 aget[c]:refresh() next c aget[2]:setfocus() aget[2]:setpos(1) endif Endif Return .T. Function c_consult Local oba,ofnt,obb Select Corneced set order to 2 go top Define font ofnt name "fixedsys" size 4,13 Define font ofonts name "fixedsys" size 8,13 Define dialog cfo11 from 2.5,15 to 20.7,76.5 style 5 title 'Fornecedor ' color 'B/W' @ 0.5,0.5 LISTBOX OBb FIELDS transf(CORNECED->F_cgc,'@R 99.999.999/9999-99'),transf(corneced->f_nome,'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') ; ALIAS "Corneced" HEADERS 'CNPJ', 'NOME' Size 240,98 ; OF cfo11 On DblClick (Beep(),XTC33(aget),cfo11:end()) font ofnt color 'b*/w' obb:bkeydown={| nkey | fzzz33(nkey) } @ 110,186 Btnbmp size 41,12 noborder FILENAME "cancela.bmp" of cfo11 action(cfo11:end()) Activate dialog cfo11 aget[1]:setfocus() aget[1]:setpos(1) return nil Static Function XTC33(enget) aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() aget[1]:setpos(1) Select corneced set order to 1 unlock all Return(nil) Static Function fzzz33(nkey) if nkey=13 aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() aget[1]:setpos(1) select corneced set order to 1 cfo11:end() endif unlock all Return(nil)
  8. Tenho um arquivo fornecedor O arquivo fornecedor esta selecionado por cnpj, Quando eu gravo por cnpj ele grava corretamente, mas na hora de fazer a alteração de qualquer campo como rua, endereço, cep, ele grava sempre em cima do primeiro registro. fw 2.7 xharb 0.99 bcc 55 ai va o prg ! #Include 'Fivewin.ch' Static fro1,aget,cfo11 Function Forne_01 Local ofont,ofont1,ofont2,ao Close databases select 0 if net_use("Corneced",.f.,5) set index to forneced.efi,Fornome.efi go top else msgalert("Arquivo Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") close databases return endif pega=0 vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(40) vF_NO = space(6) vF_CID = space(30) vF_MUNI = space(30) vF_TEL = space(15) vF_CEP = space(8) vF_BAIRRO = space(30) vF_COMPLE = space(20) aget:=array(12) Select Corneced set order to 1 go Top vF_CGC =F_CGC vF_NOME =F_NOME vF_INSCRICA =F_INSCRICA vF_ESTADO =F_ESTADO vF_END =F_END vF_NO =F_NO vF_CEP =F_CEP vF_CID =F_CID vF_MUNI =F_MUNI vF_TELE =F_TELE vF_BAIRRO =F_BAIRRO vF_COMPLE =F_COMPLE pega=recno() define font ofont1 name "courier" size 8,13 define font ofont name "courier" size 8,13 define font ofont2 name "arial mt black" size 12,14 Define dialog fro1 from 7,4 to 30.1,78 title 'Cadastro/Alteração/Exclusão de Fornecedores' color 'b/w'; style 5 @ 0.5,12 say 'Fornecedores' of fro1 size 95,12 color 'r+/w' font ofont2 @ 2.1,02 say 'CNPJ/CPF___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3,02 say 'Nome_______: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,02 say 'Endereço___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,39 say 'No: ' of fro1 size 50,12 font ofont1 color 'b/w' @ 4.9,02 say 'Bairro_____: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 5.8,02 say 'Municipio__: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 5.7,29 say 'Cidade_:' of fro1 size 115,12 font ofont1 color 'b/w' @ 4.9,26.4 say 'Complemento: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 6.6,31 say 'Cep_: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 7.5,31.5 say 'Uf_: ' of fro1 size 90,12 font ofont1 color 'b/w' @ 6.6,02 say 'Inscrição__: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 7.5,02 say 'Telefone___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 2.5,08.4 get aget[1] var VF_CGC PICT '@R 99.999.999/9999-99' size 76,12 of fro1 font ofont VALID VEFORN2() .and. cnpf(vf_cgc) @ 3.5,08.4 get aget[2] var VF_NOME PICT '@!' size 164,12 of fro1 font ofont @ 4.5,08.4 get aget[3] var VF_END PICT '@!' size 164,12 of fro1 font ofont @ 4.5,31 get aget[4] var VF_NO PICT '99999' size 27,12 of fro1 font ofont @ 5.5,08.4 get aget[5] var VF_BAIRRO PICT '@!' size 90,12 of fro1 font ofont @ 5.5,25.9 get aget[6] var VF_COMPLE PICT '@!' size 76,12 of fro1 font ofont @ 6.5,08.4 get aget[7] var VF_MUNI PICT '@!' size 76,12 of fro1 font ofont @ 6.5,25.9 get aget var VF_CID PICT '@!' size 76,12 of fro1 font ofont @ 7.5,08.4 get aget[9] var VF_INSCRICA PICT '@!' size 76,12 of fro1 font ofont valid ver_se(vf_inscrica) @ 7.5,25.9 get aget[10] var VF_CEP PICT '@R 99999-999' size 40,12 of fro1 font ofont @ 8.5,08.4 get aget[11] var VF_TELE PICT '@!R XXX.XXXXXXXXXXX' size 62,12 of fro1 font ofont @ 8.5,25.9 get aget[12] var VF_ESTADO PICT '@!' size 13,12 of fro1 font ofont For x=1 to 12 aget[x]:refresh() next x aget[1]:setfocus() aget[1]:setpos(1) @ 145,04 Btnbmp size 41,13 noborder FILENAME "Inclui.bmp" of fro1 action inc_forn() @ 145,54 Btnbmp size 41,13 noborder FILENAME "Altera.bmp" of fro1 action alt_forn() @ 145,96 Btnbmp size 41,13 noborder FILENAME "bto5.bmp" of fro1 action Ante_forn() @ 145,142 Btnbmp size 41,13 noborder FILENAME "bto6.bmp" of fro1 action Pro_forn() @ 145,188 Btnbmp size 41,13 noborder FILENAME "Excluir.bmp" of fro1 action Exc_forn() @ 145,235.5 Btnbmp size 41,13 noborder FILENAME "Cancela.bmp" of fro1 action fro1:end() @ 0.5,35 button ao prompt ":" of fro1 size 14,11 action c_consult() ao:refresh() Activate dialog fro1 on paint wndboxraised(fro1:hdc,5,5,320,580) centered Close Databases Return nil Function inc_forn IF Empty(VF_CGC) msgstop("Cóigo em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif Select corneced set order to 1 Seek VF_CGC IF Found() msgalert("Codigo já Existe use o"+chr(13)+; "Botão que Altera","Aviso") aget[2]:setfocus() aget[2]:setpos(1) Return .f. endif Select Corneced set index to forneced.efi,Fornome.efi APPEND BLANK if ! Neterr() REPLACE F_CGC WITH VF_CGC REPLACE F_NOME WITH VF_NOME REPLACE F_INSCRICA WITH VF_INSCRICA REPLACE F_ESTADO WITH VF_ESTADO REPLACE F_END WITH VF_END REPLACE F_NO WITH VF_NO REPLACE F_BAIRRO WITH VF_BAIRRO REPLACE F_CID WITH VF_CID REPLACE F_CEP WITH VF_CEP REPLACE F_COMPLE WITH VF_COMPLE REPLACE F_MUNI WITH VF_MUNI REPLACE F_TELE WITH VF_TELE commit UNLOCK ALL vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(40) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) PEGA=0 for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) endif Return .T. Function Alt_forn IF Empty(VF_CGC) msgstop("Codigo em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif Select corneced set order to 1 Seek VF_CGC IF ! Found() msgalert("Codigo não Existe use o"+chr(13)+; "Botão que Inclui","Aviso") aget[2]:setfocus() aget[2]:setpos(1) Return .F. endif Select corneced Set index to forneced.efi,Fornome.efi go pega if ! lock() msgalert("Registro Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") return .f. endif REPLACE F_NOME WITH VF_NOME REPLACE F_INSCRICA WITH VF_INSCRICA REPLACE F_ESTADO WITH VF_ESTADO REPLACE F_END WITH VF_END REPLACE F_NO WITH VF_NO REPLACE F_BAIRRO WITH VF_BAIRRO REPLACE F_CID WITH VF_CID REPLACE F_CEP WITH VF_CEP REPLACE F_MUNI WITH VF_MUNI REPLACE F_TELE WITH VF_TELE REPLACE F_COMPLE WITH VF_COMPLE vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) pega=0 for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) Commit UNLOCK ALL Return .t. Function Pro_forn Select corneced skip vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pega=recno() if eof() tone(300,5) tone(300,7) msgstop('Fim do Arquivo','Aviso') skip -1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE pega=recno() select corneced Endif For x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() Return .t. Function Ante_forn Select corneced skip - 1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE pega=recno() if bof() tone(300,5) tone(300,7) msgstop('Inicio do Arquivo','Aviso') aget[2]:setfocus() endif for x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() return nil Function Exc_forn IF Empty(VF_CGC) msgstop("Código em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. Else Select corneced set order to 1 go pega if ! lock() msgalert("Registro Bloqueado por"+chr(13)+; "Outro Terminal","Aviso" ) return .f. endif if msgyesno("Exclui o fornecedor","Exclusão") DELETE vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) else return .F. endif ENDIF Return .T. Func VEFORN2() Select corneced set order to 1 seek VF_CGC IF ! EMPTY(VF_CGC) IF ! FOUND() msgyesno("Fornecedor não esta"+chr(13)+; "Cadastrado, Inclui","Aviso") vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for c=2 to 12 aget[c]:refresh() next c aget[2]:setfocus() aget[2]:setpos(1) Else Select corneced set order to 1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pega=recno() for c=1 to 12 aget[c]:refresh() next c aget[2]:setfocus() aget[2]:setpos(1) endif Endif Return .T. Function c_consult Local oba,ofnt,obb Select Corneced set order to 2 go top Define font ofnt name "fixedsys" size 4,13 Define font ofonts name "fixedsys" size 8,13 Define dialog cfo11 from 2.5,15 to 20.7,76.5 style 5 title 'Fornecedor ' color 'B/W' @ 0.5,0.5 LISTBOX OBb FIELDS transf(CORNECED->F_cgc,'@R 99.999.999/9999-99'),transf(corneced->f_nome,'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') ; ALIAS "Corneced" HEADERS 'CNPJ', 'NOME' Size 240,98 ; OF cfo11 On DblClick (Beep(),XTC33(aget),cfo11:end()) font ofnt color 'b*/w' obb:bkeydown={| nkey | fzzz33(nkey) } @ 110,186 Btnbmp size 41,12 noborder FILENAME "cancela.bmp" of cfo11 action(cfo11:end()) Activate dialog cfo11 aget[1]:setfocus() aget[1]:setpos(1) return nil Static Function XTC33(enget) aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() aget[1]:setpos(1) Select corneced set order to 1 unlock all Return(nil) Static Function fzzz33(nkey) if nkey=13 aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() aget[1]:setpos(1) select corneced set order to 1 cfo11:end() endif unlock all Return(nil)
  9. Não estou conseguindo grava as informações dentro do banco de dados ja tentei usar o menvar so que tbm não adianta . o programa não da nenhum erro. ele executa normal so que não grava. como resolver ? URGENTE. Obrigado desde ja ! *********************************************************** #Include 'Fivewin.ch' Static fro1,aget,cfo11 Function Forne_01 Local ofont,ofont1,ofont2 Close databases select 0 if net_use("Corneced",.f.,5) set index to forneced.efi,Fornome.efi go top else msgalert("Arquivo Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") close databases return endif aget:=array(12) pea=0 Select Corneced set order to 1 go Top memvar->vF_CGC :=F_CGC memvar->vF_NOME :=F_NOME memvar->vF_INSCRICA :=F_INSCRICA memvar->vF_ESTADO :=F_ESTADO memvar->vF_END :=F_END memvar->vF_NO :=F_NO memvar->vF_CEP :=F_CEP memvar->vF_CID :=F_CID memvar->vF_MUNI :=F_MUNI memvar->vF_TELE :=F_TELE memvar->vF_BAIRRO :=F_BAIRRO memvar->vF_COMPLE :=F_COMPLE pea=recno() define font ofont1 name "courier" size 8,13 define font ofont name "courier" size 8,13 define font ofont2 name "arial mt black" size 12,14 Define dialog fro1 from 7,4 to 30.1,78 title 'Cadastro/Alteração/Exclusão de Fornecedores' color 'b/w'; style 5 @ 0.5,12 say 'Fornecedores' of fro1 size 95,12 color 'r+/w' font ofont2 @ 2.1,02 say 'CNPJ/CPF___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3,02 say 'Nome_______: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,02 say 'Endereço___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,39 say 'No: ' of fro1 size 50,12 font ofont1 color 'b/w' @ 4.9,02 say 'Bairro_____: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 5.8,02 say 'Municipio__: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 5.7,29 say 'Cidade_:' of fro1 size 115,12 font ofont1 color 'b/w' @ 4.9,26.4 say 'Complemento: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 6.6,31 say 'Cep_: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 7.5,31.5 say 'Uf_: ' of fro1 size 90,12 font ofont1 color 'b/w' @ 6.6,02 say 'Inscrição__: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 7.5,02 say 'Telefone___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 2.5,08.4 get aget[1] var vF_CGC PICT '@R 99.999.999/9999-99' of fro1 size 76,12 font ofont VALID VEFORN2() .and. cnpf(vf_cgc) @ 3.5,08.4 get aget[2] var VF_NOME PICT '@!' size 164,12 of fro1 font ofont @ 4.5,08.4 get aget[3] var VF_END PICT '@!' size 164,12 of fro1 font ofont @ 4.5,31 get aget[4] var VF_NO PICT '99999' size 27,12 of fro1 font ofont @ 5.5,08.4 get aget[5] var VF_BAIRRO PICT '@!' size 90,12 of fro1 font ofont @ 5.5,25.9 get aget[6] var VF_COMPLE PICT '@!' size 76,12 of fro1 font ofont @ 6.5,08.4 get aget[7] var VF_MUNI PICT '@!' size 76,12 of fro1 font ofont @ 6.5,25.9 get aget var VF_CID PICT '@!' size 76,12 of fro1 font ofont @ 7.5,08.4 get aget[9] var VF_INSCRICA PICT '@!' size 76,12 of fro1 font ofont valid ver_se(vf_inscrica) @ 7.5,25.9 get aget[10] var VF_CEP PICT '@R 99999-999' size 40,12 of fro1 font ofont @ 8.5,08.4 get aget[11] var VF_TELE PICT '@!R XXX.XXXXXXXXXXX' size 62,12 of fro1 font ofont @ 8.5,25.9 get aget[12] var VF_ESTADO PICT '@!' size 13,12 of fro1 font ofont For x=1 to 12 aget[x]:refresh() next x aget[1]:setfocus() aget[1]:setpos(1) @ 145,04 Btnbmp size 41,13 noborder FILENAME "Inclui.bmp" of fro1 action inc_forn() @ 145,54 Btnbmp size 41,13 noborder FILENAME "Altera.bmp" of fro1 action alt_forn() @ 145,96 Btnbmp size 41,13 noborder FILENAME "bto5.bmp" of fro1 action Ante_forn() @ 145,142 Btnbmp size 41,13 noborder FILENAME "bto6.bmp" of fro1 action Pro_forn() @ 145,188 Btnbmp size 41,13 noborder FILENAME "Excluir.bmp" of fro1 action Exc_forn() @ 145,235.5 Btnbmp size 41,13 noborder FILENAME "Cancela.bmp" of fro1 action fro1:end() @ 0.5,35 button ":" of fro1 size 14,11 action c_consult() Activate dialog fro1 on paint wndboxraised(fro1:hdc,5,5,320,580) centered Close Databases Return nil Function Inc_forn //IF empty(vf_cgc) // msgstop("Codigo em Branco"+chr(13)+; // "não Vale" ) // aget[1]:setfocus() // aget[1]:setpos(1) // Return .F. //endif Select corneced set order to 1 Seek VF_CGC IF Found() msgalert("Código já Existe use o"+chr(13)+; "Botão que Altera","Aviso") aget[2]:setfocus() aget[2]:setpos(1) Return .f. endif Select Corneced set index to forneced.efi,Fornome.efi APPE BLAN if ! Neterr() REPLACE corneced->F_CGC WITH VF_CGC REPLACE corneced->F_NOME WITH VF_NOME REPLACE corneced->F_INSCRICA WITH VF_INSCRICA REPLACE corneced->F_ESTADO WITH VF_ESTADO REPLACE corneced->F_END WITH VF_END REPLACE corneced->F_NO WITH VF_NO REPLACE corneced->F_BAIRRO WITH VF_BAIRRO REPLACE corneced->F_CID WITH VF_CID REPLACE corneced->F_CEP WITH VF_CEP REPLACE corneced->F_COMPLE WITH vF_COMPLE REPLACE corneced->F_MUNI WITH VF_MUNI REPLACE corneced->F_TELE WITH VF_TELE endif commit UNLOCK ALL vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(40) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) Return .T. Function Alt_forn IF Empty(VF_CGC) msgstop("Código em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif select corneced set index to forneced.efi,Fornome.efi go pea if ! lock() msgalert("Registro Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") return .f. endif REPLACE F_NOME WITH VF_NOME,; F_INSCRICA WITH VF_INSCRICA,; F_ESTADO WITH VF_ESTADO,; F_END WITH VF_END,; F_NO WITH VF_NO,; F_BAIRRO WITH VF_BAIRRO,; F_CID WITH VF_CID,; F_CEP WITH VF_CEP,; F_MUNI WITH VF_MUNI,; F_TELE WITH VF_TELE,; F_COMPLE WITH VF_COMPLE Commit UNLOCK ALL vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) Return .T. Function Pro_forn Select corneced skip + 1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pea=recno() if eof() tone(300,5) tone(300,7) msgstop('Fim do Arquivo','Aviso') skip -1 pea=recno() vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE select corneced Endif For x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() Return .t. Function Ante_forn Select corneced skip - 1 pea=recno() vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE if bof() tone(300,5) tone(300,7) msgstop('Inicio do Arquivo','Aviso') aget[2]:setfocus() endif for x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() return .t. Function Exc_forn IF Empty(VF_CGC) msgstop("Código em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif select corneced set order to 1 pea=recno() if ! lock() msgalert("Registro Bloqueado por"+chr(13)+; "Outro Terminal","Aviso" ) return .f. endif if msgyesno("Exclui o fornecedor","Exclusão") DELETE vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) ENDIF Return .T. Func VEFORN2() if ! empty(VF_CGC) Select corneced set order to 1 seek VF_CGC IF ! FOUND() msgyesno("Fornecedor não esta"+chr(13)+; "Cadastrado, Inclui","Aviso") vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for a=1 to 12 aget[c]:refresh() next a aget[2]:setfocus() aget[2]:setpos(1) Endif Select corneced vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pea=recno() for a=1 to 12 aget[a]:refresh() next a aget[2]:setfocus() aget[2]:setpos(1) endif Return .T. Function c_consult Local oba,ofnt,obb Select Corneced set order to 2 go top Define font ofnt name "fixedsys" size 4,13 Define font ofonts name "fixedsys" size 8,13 Define dialog cfo11 from 2.5,15 to 20.7,76.5 style 5 title 'Fornecedor ' color 'B/W' @ 0.5,0.5 LISTBOX OBb FIELDS transf(CORNECED->F_cgc,'@R 99.999.999/9999-99'),transf(corneced->f_nome,'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') ; ALIAS "Corneced" HEADERS 'CNPJ', 'NOME' Size 240,98 ; OF cfo11 On DblClick (Beep(),XTC33(aget),cfo11:end()) font ofnt color 'b*/w' obb:bkeydown={| nkey | fzzz33(nkey) } @ 110,186 Btnbmp size 41,12 noborder FILENAME "cancela.bmp" of cfo11 action(cfo11:end()) Activate dialog cfo11 return .t. Static Function XTC33(enget) aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() Select corneced set order to 1 go top unlock all Return(nil) Static Function fzzz33(nkey) if nkey=13 aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() select corneced set order to 1 go top cfo11:end() endif unlock all Return(nil)
  10. Não estou conseguindo grava as informações dentro do banco de dados ja tentei usar o menvar so que tbm não adianta . o programa não da nenhum erro. ele executa normal so que não grava. como resolver ? URGENTE. Obrigado desde ja ! *********************************************************** #Include 'Fivewin.ch' Static fro1,aget,cfo11 Function Forne_01 Local ofont,ofont1,ofont2 Close databases select 0 if net_use("Corneced",.f.,5) set index to forneced.efi,Fornome.efi go top else msgalert("Arquivo Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") close databases return endif aget:=array(12) pea=0 Select Corneced set order to 1 go Top memvar->vF_CGC :=F_CGC memvar->vF_NOME :=F_NOME memvar->vF_INSCRICA :=F_INSCRICA memvar->vF_ESTADO :=F_ESTADO memvar->vF_END :=F_END memvar->vF_NO :=F_NO memvar->vF_CEP :=F_CEP memvar->vF_CID :=F_CID memvar->vF_MUNI :=F_MUNI memvar->vF_TELE :=F_TELE memvar->vF_BAIRRO :=F_BAIRRO memvar->vF_COMPLE :=F_COMPLE pea=recno() define font ofont1 name "courier" size 8,13 define font ofont name "courier" size 8,13 define font ofont2 name "arial mt black" size 12,14 Define dialog fro1 from 7,4 to 30.1,78 title 'Cadastro/Alteração/Exclusão de Fornecedores' color 'b/w'; style 5 @ 0.5,12 say 'Fornecedores' of fro1 size 95,12 color 'r+/w' font ofont2 @ 2.1,02 say 'CNPJ/CPF___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3,02 say 'Nome_______: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,02 say 'Endereço___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 3.9,39 say 'No: ' of fro1 size 50,12 font ofont1 color 'b/w' @ 4.9,02 say 'Bairro_____: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 5.8,02 say 'Municipio__: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 5.7,29 say 'Cidade_:' of fro1 size 115,12 font ofont1 color 'b/w' @ 4.9,26.4 say 'Complemento: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 6.6,31 say 'Cep_: ' of fro1 size 100,12 font ofont1 color 'b/w' @ 7.5,31.5 say 'Uf_: ' of fro1 size 90,12 font ofont1 color 'b/w' @ 6.6,02 say 'Inscrição__: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 7.5,02 say 'Telefone___: ' of fro1 size 115,12 font ofont1 color 'b/w' @ 2.5,08.4 get aget[1] var vF_CGC PICT '@R 99.999.999/9999-99' of fro1 size 76,12 font ofont VALID VEFORN2() .and. cnpf(vf_cgc) @ 3.5,08.4 get aget[2] var VF_NOME PICT '@!' size 164,12 of fro1 font ofont @ 4.5,08.4 get aget[3] var VF_END PICT '@!' size 164,12 of fro1 font ofont @ 4.5,31 get aget[4] var VF_NO PICT '99999' size 27,12 of fro1 font ofont @ 5.5,08.4 get aget[5] var VF_BAIRRO PICT '@!' size 90,12 of fro1 font ofont @ 5.5,25.9 get aget[6] var VF_COMPLE PICT '@!' size 76,12 of fro1 font ofont @ 6.5,08.4 get aget[7] var VF_MUNI PICT '@!' size 76,12 of fro1 font ofont @ 6.5,25.9 get aget var VF_CID PICT '@!' size 76,12 of fro1 font ofont @ 7.5,08.4 get aget[9] var VF_INSCRICA PICT '@!' size 76,12 of fro1 font ofont valid ver_se(vf_inscrica) @ 7.5,25.9 get aget[10] var VF_CEP PICT '@R 99999-999' size 40,12 of fro1 font ofont @ 8.5,08.4 get aget[11] var VF_TELE PICT '@!R XXX.XXXXXXXXXXX' size 62,12 of fro1 font ofont @ 8.5,25.9 get aget[12] var VF_ESTADO PICT '@!' size 13,12 of fro1 font ofont For x=1 to 12 aget[x]:refresh() next x aget[1]:setfocus() aget[1]:setpos(1) @ 145,04 Btnbmp size 41,13 noborder FILENAME "Inclui.bmp" of fro1 action inc_forn() @ 145,54 Btnbmp size 41,13 noborder FILENAME "Altera.bmp" of fro1 action alt_forn() @ 145,96 Btnbmp size 41,13 noborder FILENAME "bto5.bmp" of fro1 action Ante_forn() @ 145,142 Btnbmp size 41,13 noborder FILENAME "bto6.bmp" of fro1 action Pro_forn() @ 145,188 Btnbmp size 41,13 noborder FILENAME "Excluir.bmp" of fro1 action Exc_forn() @ 145,235.5 Btnbmp size 41,13 noborder FILENAME "Cancela.bmp" of fro1 action fro1:end() @ 0.5,35 button ":" of fro1 size 14,11 action c_consult() Activate dialog fro1 on paint wndboxraised(fro1:hdc,5,5,320,580) centered Close Databases Return nil Function Inc_forn //IF empty(vf_cgc) // msgstop("Codigo em Branco"+chr(13)+; // "não Vale" ) // aget[1]:setfocus() // aget[1]:setpos(1) // Return .F. //endif Select corneced set order to 1 Seek VF_CGC IF Found() msgalert("Código já Existe use o"+chr(13)+; "Botão que Altera","Aviso") aget[2]:setfocus() aget[2]:setpos(1) Return .f. endif Select Corneced set index to forneced.efi,Fornome.efi APPE BLAN if ! Neterr() REPLACE corneced->F_CGC WITH VF_CGC REPLACE corneced->F_NOME WITH VF_NOME REPLACE corneced->F_INSCRICA WITH VF_INSCRICA REPLACE corneced->F_ESTADO WITH VF_ESTADO REPLACE corneced->F_END WITH VF_END REPLACE corneced->F_NO WITH VF_NO REPLACE corneced->F_BAIRRO WITH VF_BAIRRO REPLACE corneced->F_CID WITH VF_CID REPLACE corneced->F_CEP WITH VF_CEP REPLACE corneced->F_COMPLE WITH vF_COMPLE REPLACE corneced->F_MUNI WITH VF_MUNI REPLACE corneced->F_TELE WITH VF_TELE endif commit UNLOCK ALL vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(40) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) Return .T. Function Alt_forn IF Empty(VF_CGC) msgstop("Código em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif select corneced set index to forneced.efi,Fornome.efi go pea if ! lock() msgalert("Registro Bloqueado pôr"+chr(13)+; "Outro Terminal","Aviso") return .f. endif REPLACE F_NOME WITH VF_NOME,; F_INSCRICA WITH VF_INSCRICA,; F_ESTADO WITH VF_ESTADO,; F_END WITH VF_END,; F_NO WITH VF_NO,; F_BAIRRO WITH VF_BAIRRO,; F_CID WITH VF_CID,; F_CEP WITH VF_CEP,; F_MUNI WITH VF_MUNI,; F_TELE WITH VF_TELE,; F_COMPLE WITH VF_COMPLE Commit UNLOCK ALL vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) Return .T. Function Pro_forn Select corneced skip + 1 vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pea=recno() if eof() tone(300,5) tone(300,7) msgstop('Fim do Arquivo','Aviso') skip -1 pea=recno() vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE select corneced Endif For x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() Return .t. Function Ante_forn Select corneced skip - 1 pea=recno() vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_COMPLE := F_COMPLE vF_MUNI := F_MUNI vF_TELE := F_TELE if bof() tone(300,5) tone(300,7) msgstop('Inicio do Arquivo','Aviso') aget[2]:setfocus() endif for x=1 to 12 aget[x]:refresh() next aget[2]:setfocus() return .t. Function Exc_forn IF Empty(VF_CGC) msgstop("Código em Branco"+chr(13)+; "não Vale" ) aget[1]:setfocus() aget[1]:setpos(1) Return .F. endif select corneced set order to 1 pea=recno() if ! lock() msgalert("Registro Bloqueado por"+chr(13)+; "Outro Terminal","Aviso" ) return .f. endif if msgyesno("Exclui o fornecedor","Exclusão") DELETE vF_CGC = space(14) vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for i=1 to 12 aget:refresh() next i aget[1]:setfocus() aget[1]:setpos(1) ENDIF Return .T. Func VEFORN2() if ! empty(VF_CGC) Select corneced set order to 1 seek VF_CGC IF ! FOUND() msgyesno("Fornecedor não esta"+chr(13)+; "Cadastrado, Inclui","Aviso") vF_NOME = space(40) vF_INSCRICA = space(18) vF_ESTADO = space(2) vF_END = space(50) vF_NO = space(5) vF_BAIRRO = space(30) vF_CID = space(30) vF_CEP = space(8) vF_MUNI = space(30) vF_TELE = space(15) vF_COMPLE = space(20) for a=1 to 12 aget[c]:refresh() next a aget[2]:setfocus() aget[2]:setpos(1) Endif Select corneced vF_CGC := F_CGC vF_NOME := F_NOME vF_INSCRICA := F_INSCRICA vF_ESTADO := F_ESTADO vF_END := F_END vF_NO := F_NO vF_BAIRRO := F_BAIRRO vF_CID := F_CID vF_CEP := F_CEP vF_MUNI := F_MUNI vF_TELE := F_TELE vF_COMPLE := F_COMPLE pea=recno() for a=1 to 12 aget[a]:refresh() next a aget[2]:setfocus() aget[2]:setpos(1) endif Return .T. Function c_consult Local oba,ofnt,obb Select Corneced set order to 2 go top Define font ofnt name "fixedsys" size 4,13 Define font ofonts name "fixedsys" size 8,13 Define dialog cfo11 from 2.5,15 to 20.7,76.5 style 5 title 'Fornecedor ' color 'B/W' @ 0.5,0.5 LISTBOX OBb FIELDS transf(CORNECED->F_cgc,'@R 99.999.999/9999-99'),transf(corneced->f_nome,'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') ; ALIAS "Corneced" HEADERS 'CNPJ', 'NOME' Size 240,98 ; OF cfo11 On DblClick (Beep(),XTC33(aget),cfo11:end()) font ofnt color 'b*/w' obb:bkeydown={| nkey | fzzz33(nkey) } @ 110,186 Btnbmp size 41,12 noborder FILENAME "cancela.bmp" of cfo11 action(cfo11:end()) Activate dialog cfo11 return .t. Static Function XTC33(enget) aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() Select corneced set order to 1 go top unlock all Return(nil) Static Function fzzz33(nkey) if nkey=13 aget[1]:VarPut(Corneced->f_cgc) aget[1]:Refresh() aget[1]:setfocus() select corneced set order to 1 go top cfo11:end() endif unlock all Return(nil)
  11. syspel

    ERRO

    Ola ObrigadO + ja conseguimos resolver ! vlw
  12. syspel

    ERRO

    Ola Tenho varias variáveis de memória "NUMERICA" da X01 a x18, no meu prg. Estão todas funcionando normalmente só que a ultima variável, quando puxa as informações do banco de dados. Ele assume 9 em vez de mostra o conteúdo da variável Ex: 4.000,00 ao em vez de aparecer assim na tela, ele assume 9, já conferir todo meu prg e não achei o erro. Como resolver? fwh2.7,xharb,bcc5.5
  13. syspel

    ERRO

    Ola Tenho varias variáveis de memória "NUMERICA" da X01 a x18, no meu prg. Estão todas funcionando normalmente só que a ultima variável, quando puxa as informações do banco de dados. Ele assume 9 em vez de mostra o conteúdo da variável Ex: 4.000,00 ao em vez de aparecer assim na tela, ele assume 9, já conferir todo meu prg e não achei o erro. Como resolver? fwh2.7,xharb,bcc5.5
  14. Ola Estou tentando gravar um arquivo em outro diretório e estou com esse problema na hora de gravar no append black Ele não grava Ex: arq="..\efc\a0001_08.dbf" select &arq append black Replace código with ccaixa->código O problema é que ele não esta gerando o arquivo em branco no windows xp e não faz a gravação e já no windows 2000 ele grava normal.
  15. Ola Estou tentando gravar um arquivo em outro diretório e estou com esse problema na hora de gravar no append black Ele não grava Ex: arq="..\efc\a0001_08.dbf" select &arq append black Replace código with ccaixa->código O problema é que ele não esta gerando o arquivo em branco no windows xp e não faz a gravação e já no windows 2000 ele grava normal.
  16. ola segue abaixo o font METHOD PrintPage( oPrn, cTxt ) CLASS TTxtPreview LOCAL nLines, nLin, cLine,oText LOCAL cTxtTmp, cPorta,cTexto:=" " cPorta:= ::cPort if Empt( cPorta ) cPorta:= Alltrim( PrnGetPort() ) else cPorta:= Alltrim( cPorta ) endif if ::lSpool cTxtTmp := Upper( cTmpName( ::cDir ) ) cTxtTmp := StrTran( cTxtTmp, ".DBF", ".TXT" ) MemoWrit( cTxtTmp, STrTran( cTxt, ::cFormFeed, "" ) + ::cFormFeed ) if Len( cPorta ) = 5 //--- Spool Local cPorta:= "PRN" WAITRUN("COMMAND.COM /C COPY /B " + cTxtTmp + " " + cPorta, 0 ) else WAITRUN("COMMAND.COM /C DOSPRINT.BAT " + cTxtTmp + " " + cPorta, 0 ) endif if redeusb=.T. __CopyFile ('TEST.PRN','C:\TEST.PRN') endif if File( cTxtTmp ) FErase( cTxtTmp ) endif else oPrn:StartPage() nLines:= MlCount( cTxt, 180 ) FOR nLin= 1 TO nLines cLine := Rtrim( MemoLine( cTxt, 180, nLin ) ) \\eu quero gravar o conteudo dessa variavel dentro de um arquivo "test.prn" \\ eu consegui grava com memowhrit so que ele grava a ultima pagina se eu pedir da pagina 1 até \\ a pagina 3 so grava a pagina 3 , como resolver isso ? ctexto=ctexto+cLine oPrn:Say( nLin, 00, STrTran( cLine, ::cFormFeed, "" ) ) NEXT nLin oPrn:EndPage() endif return Nil ************************************************************ Obrigado desde ja
  17. Pessoal Alguem consegue explicar para mim porque não consigo gravar dentro de um DBF esse programa? em vez dele gravar as informações do arquivo ele esta gravando BRANCO é um furo do XHARBOUR? Abaixo esta esta o PRG: #include 'fivewin.ch' ******************************************************************************** * * * atua378.prg * * * * fiscal * * conversao de arquivos * ******************************************************************************** static fonta,fontp static exce01,smet Function atua378 Set talk off Set delete on close databases set exclusive on Arqf4="NF"+varcod+vano arqf5="N"+varcod+'1'+vano+".EFi" Select 0 if Net_use("&Arqf4",.f.,5) // nota fiscal paulista set index to &arqf5 go top else msgalert("Arquivo Bloqueado por"+chr(13)+; "Outro Terminal","Aviso") close databases return endif Select 0 if Net_use("Arqnota",.t.,5) //aux diferencial zap else msgalert("Arquivo Bloqueado por"+chr(13)+; "Outro Terminal","Aviso") close databases return endif define font ofontp name "arial" size 10,10 bold define font ofonta name "fixedsys" size 5,10 Define dialog exce01 from 0,12 to 10,65 title 'Atualiza entrada saida 378' color 'b/w' style 5 @ 0.2,0.8 to 4.3,29.1 of exce01 @ 0.9,12 say "Nota Fiscal" of exce01 font ofontp size 55,13 color 'r/w' @ 1.9,2 meter ometer1 var smet total 30 of exce01 size 174,9 font ofontp @ 43,105 Btnbmp size 40,13 noborder FILENAME "bto4.bmp" of exce01 action not201() @ 43,153 Btnbmp size 40,13 noborder FILENAME "Cancela.bmp" of exce01 action exce01:end() Activate dialog exce01 on paint wndboxraised(exce01:hdc,5,5,125,412) centered Close databases set exclusive off Return nil Function not201 Select &Arqf4 // nota fiscal go top store ' ' to nfp_mes,no_nota,flag,item_1,nbm1,uniprod1 store ' ' to mec,cnpj,i_estadual,razao,frete,ser_frete,seguro,logradouro,uf_1,municipio,placa,uf_2 store ' ' to especie,marca,peso_liq,peso_bruto,frete,Quantidade store ' ' to com_1,com_2,com_3,com_4,com_5,com_6,com_7,com_8,com_9,cst,horaentra,horasaida store 0.00 to aliq_iss,vl_tot_iss,vl_tot_ser,desconto,iss_seguro,sub_trib_n store 0.00 to prod_1,desc_1,Qntd_1,vl_prod_1,vl_tot_1,icms_1,ipi_1 store 0.00 to prod_2,desc_2,Qntd_2,vl_prod_2,vl_tot_2,icms_2,ipi_2 store 0.00 to prod_3,desc_3,Qntd_3,vl_prod_3,vl_tot_3,icms_3,ipi_3 store 0.00 to prod_4,desc_4,Qntd_4,vl_prod_4,vl_tot_4,icms_4,ipi_4 store 0.00 to prod_5,desc_5,Qntd_5,vl_prod_5,vl_tot_5,icms_5,ipi_5 store 0.00 to prod_6,desc_6,Qntd_6,vl_prod_6,vl_tot_6,icms_6,ipi_6 store 0.00 to prod_7,desc_7,Qntd_7,vl_prod_7,vl_tot_7,icms_7,ipi_7 store 0.00 to prod_8,desc_8,Qntd_8,vl_prod_8,vl_tot_8,icms_8,ipi_8 store 0.00 to prod_9,desc_9,Qntd_9,vl_prod_9,vl_tot_9,icms_9,ipi_9 store 0.00 to prod_10,desc_10,Qntd_10,vl_prod_10,vl_tot_10,icms_10,ipi_10 Select &Arqf4 // nota fiscal go top Do while ! eof() Select &Arqf4 // nota fiscal nfp_mes = &arqf4->nfp_mes no_nota = &arqf4->no_nota flag = &arqf4->flag item_1 = &arqf4->item_1 prod_1 = &arqf4->prod_1 desc_1 = &arqf4->desc_1 Qntd_1 = &arqf4->Qntd_1 vl_prod_1 = &arqf4->vl_prod_1 vl_tot_1 = &arqf4->vl_tot_1 icms_1 = &arqf4->icms_1 ipi_1 = &arqf4->ipi_1 nbm1 = &arqf4->nbm1 uniprod1 = &arqf4->uniprod1 item_2 = &arqf4->item_2 prod_2 = &arqf4->prod_2 desc_2 = &arqf4->desc_2 Qntd_2 = &arqf4->Qntd_2 vl_prod_2 = &arqf4->vl_prod_2 vl_tot_2 = &arqf4->vl_tot_2 icms_2 = &arqf4->icms_2 ipi_2 = &arqf4->ipi_2 nbm2 = &arqf4->nbm2 uniprod2 = &arqf4->uniprod2 item_3 = &arqf4->item_3 prod_3 = &arqf4->prod_3 desc_3 = &arqf4->desc_3 Qntd_3 = &arqf4->Qntd_3 vl_prod_3 = &arqf4->vl_prod_3 vl_tot_3 = &arqf4->vl_tot_3 icms_3 = &arqf4->icms_3 ipi_3 = &arqf4->ipi_3 nbm3 = &arqf4->nbm3 uniprod3 = &arqf4-> uniprod3 item_4 = &arqf4->item_4 prod_4 = &arqf4->prod_4 desc_4 = &arqf4->desc_4 Qntd_4 = &arqf4->Qntd_4 vl_prod_4 = &arqf4->vl_prod_4 vl_tot_4 = &arqf4->vl_tot_4 icms_4 = &arqf4->icms_4 ipi_4 = &arqf4->ipi_4 nbm4 = &arqf4->nbm4 uniprod4 = &arqf4->uniprod4 item_5 = &arqf4->item_5 prod_5 = &arqf4->prod_5 desc_5 = &arqf4->desc_5 Qntd_5 = &arqf4->Qntd_5 vl_prod_5 = &arqf4->vl_prod_5 vl_tot_5 = &arqf4->vl_tot_5 icms_5 = &arqf4->icms_5 ipi_5 = &arqf4->ipi_5 nbm5 = &arqf4->nbm5 uniprod5 = &arqf4->uniprod5 item_6 = &arqf4->item_6 prod_6 = &arqf4->prod_6 desc_6 = &arqf4->desc_6 qntd_6 = &arqf4->Qntd_6 vl_prod_6 = &arqf4->vl_prod_6 vl_tot_6 = &arqf4->vl_tot_6 icms_6 = &arqf4->icms_6 ipi_6 = &arqf4->ipi_6 nbm6 = &arqf4->nbm6 uniprod6 = &arqf4->uniprod6 item_7 = &arqf4->item_7 prod_7 = &arqf4->prod_7 desc_7 = &arqf4->desc_7 Qntd_7 = &arqf4->Qntd_7 vl_prod_7 = &arqf4->vl_prod_7 vl_tot_7 = &arqf4->vl_tot_7 icms_7 = &arqf4->icms_7 ipi_7 = &arqf4->ipi_7 nbm7 = &arqf4->nbm7 uniprod7 = &arqf4->uniprod7 item_8 = &arqf4->item_8 prod_8 = &arqf4->prod_8 desc_8 = &arqf4->desc_8 Qntd_8 = &arqf4->Qntd_8 vl_prod_8 = &arqf4->vl_prod_8 vl_tot_8 = &arqf4->vl_tot_8 icms_8 = &arqf4->icms_8 ipi_8 = &arqf4->ipi_8 nbm8 = &arqf4->nbm8 uniprod8 = &arqf4->uniprod8 item_9 = &arqf4->item_9 prod_9 = &arqf4->prod_9 desc_9 = &arqf4->desc_9 Qntd_9 = &arqf4->Qntd_9 vl_prod_9 = &arqf4->vl_prod_9 vl_tot_9 = &arqf4->vl_tot_9 icms_9 = &arqf4->icms_9 ipi_9 = &arqf4->ipi_9 nbm9 = &arqf4->nbm9 uniprod9 = &arqf4->uniprod9 item_10 = &arqf4->item_10 prod_10 = &arqf4->prod_10 desc_10 = &arqf4->desc_10 Qntd_10 = &arqf4->Qntd_10 vl_prod_10 = &arqf4->vl_prod_10 vl_tot_10 = &arqf4->vl_tot_10 icms_10 = &arqf4->icms_10 ipi_10 = &arqf4->ipi_10 nbm10 = &arqf4->nbm10 uniprod10 = &arqf4->uniprod10 mec = &arqf4->mec cnpj = &arqf4->cnpj i_estadual = &arqf4->i_estadual razao = &arqf4->razao frete = &arqf4->frete ser_frete = &arqf4->ser_frete seguro = &arqf4->seguro aliq_iss = &arqf4->aliq_iss vl_tot_iss = &arqf4->vl_tot_iss vl_tot_ser = &arqf4->vl_tot_ser desconto = &arqf4->desconto iss_seguro = &arqf4->iss_seguro sub_trib_n = &arqf4->sub_trib_n logradouro = &arqf4->logradouro uf_1 = &arqf4->uf_1 municipio = &arqf4->municipio placa = &arqf4->placa uf_2 = &arqf4->uf_2 Quantidade = &arqf4->Quantidade nfp_mes = &arqf4->nfp_mes especie = &arqf4->especie marca = &arqf4->marca flag = &arqf4->flag peso_liq = &arqf4->peso_liq peso_bruto = &arqf4->peso_bruto frete = &arqf4->frete com_1 = &arqf4->com_1 com_2 = &arqf4->com_2 com_3 = &arqf4->com_3 com_4 = &arqf4->com_4 com_5 = &arqf4->com_5 com_6 = &arqf4->com_6 com_7 = &arqf4->com_7 com_8 = &arqf4->com_8 com_9 = &arqf4->com_9 cst = &arqf4->cst horaentra = &arqf4->horaentra horasaida = &arqf4->horasaida select Arqnota append blank replace arqnota->nfp_mes with nfp_mes replace arqnota->no_nota with no_nota replace arqnota->flag with flag replace arqnota->item_1 with item_1 replace arqnota->prod_1 with prod_1 replace arqnota->desc_1 with desc_1 replace arqnota->Qntd_1 with Qntd_1 replace arqnota->vl_prod_1 with vl_prod_1 replace arqnota->vl_tot_1 with vl_tot_1 replace arqnota->icms_1 with icms_1 replace arqnota->ipi_1 with ipi_1 replace arqnota->nbm1 with nbm1 replace arqnota->uniprod1 with uniprod1 replace arqnota->item_2 with item_2 replace arqnota->prod_2 with prod_2 replace arqnota->desc_2 with desc_2 replace arqnota->Qntd_2 with Qntd_2 replace arqnota->vl_prod_2 with vl_prod_2 replace arqnota->vl_tot_2 with vl_tot_2 replace arqnota->icms_2 with icms_2 replace arqnota->ipi_2 with ipi_2 replace arqnota->nbm2 with nbm2 replace arqnota->uniprod2 with uniprod2 replace arqnota->item_3 with item_3 replace arqnota->prod_3 with prod_3 replace arqnota->desc_3 with desc_3 replace arqnota->Qntd_3 with Qntd_3 replace arqnota->vl_prod_3 with vl_prod_3 replace arqnota->vl_tot_3 with vl_tot_3 replace arqnota->icms_3 with icms_3 replace arqnota->ipi_3 with ipi_3 replace arqnota->nbm3 with nbm3 replace arqnota-> uniprod3 with uniprod3 replace arqnota->item_4 with item_4 replace arqnota->prod_4 with prod_4 replace arqnota->desc_4 with desc_4 replace arqnota->Qntd_4 with Qntd_4 replace arqnota->vl_prod_4 with vl_prod_4 replace arqnota->vl_tot_4 with vl_tot_4 replace arqnota->icms_4 with icms_4 replace arqnota->ipi_4 with ipi_4 replace arqnota->nbm4 with nbm4 replace arqnota->uniprod4 with uniprod4 replace arqnota->item_5 with item_5 replace arqnota->prod_5 with prod_5 replace arqnota->desc_5 with desc_5 replace arqnota->Qntd_5 with Qntd_5 replace arqnota->vl_prod_5 with vl_prod_5 replace arqnota->vl_tot_5 with vl_tot_5 replace arqnota->icms_5 with icms_5 replace arqnota->ipi_5 with ipi_5 replace arqnota->nbm5 with nbm5 replace arqnota->uniprod5 with uniprod5 replace arqnota->item_6 with item_6 replace arqnota->prod_6 with prod_6 replace arqnota->desc_6 with desc_6 replace arqnota->Qntd_6 with Qntd_6 replace arqnota->vl_prod_6 with vl_prod_6 replace arqnota->vl_tot_6 with vl_tot_6 replace arqnota->icms_6 with icms_6 replace arqnota->ipi_6 with ipi_6 replace arqnota->nbm6 with nbm6 replace arqnota->uniprod6 with uniprod6 replace arqnota->item_7 with item_7 replace arqnota->prod_7 with prod_7 replace arqnota->desc_7 with desc_7 replace arqnota->Qntd_7 with Qntd_7 replace arqnota->vl_prod_7 with vl_prod_7 replace arqnota->vl_tot_7 with vl_tot_7 replace arqnota->icms_7 with icms_7 replace arqnota->ipi_7 with ipi_7 replace arqnota->nbm7 with nbm7 replace arqnota->uniprod7 with uniprod7 replace arqnota->item_8 with item_8 replace arqnota->prod_8 with prod_8 replace arqnota->desc_8 with desc_8 replace arqnota->Qntd_8 with Qntd_8 replace arqnota->vl_prod_8 with vl_prod_8 replace arqnota->vl_tot_8 with vl_tot_8 replace arqnota->icms_8 with icms_8 replace arqnota->ipi_8 with ipi_8 replace arqnota->nbm8 with nbm8 replace arqnota->uniprod8 with uniprod8 replace arqnota->item_9 with item_9 replace arqnota->prod_9 with prod_9 replace arqnota->desc_9 with desc_9 replace arqnota->Qntd_9 with Qntd_9 replace arqnota->vl_prod_9 with vl_prod_9 replace arqnota->vl_tot_9 with vl_tot_9 replace arqnota->icms_9 with icms_9 replace arqnota->ipi_9 with ipi_9 replace arqnota->nbm9 with nbm9 replace arqnota->uniprod9 with uniprod9 replace arqnota->item_10 with item_10 replace arqnota->prod_10 with prod_10 replace arqnota->desc_10 with desc_10 replace arqnota->Qntd_10 with Qntd_10 replace arqnota->vl_prod_10 with vl_prod_10 replace arqnota->vl_tot_10 with vl_tot_10 replace arqnota->icms_10 with icms_10 replace arqnota->ipi_10 with ipi_10 replace arqnota->nbm10 with nbm10 replace arqnota->uniprod10 with uniprod10 replace arqnota->mec with mec replace arqnota->cnpj with cnpj replace arqnota->i_estadual with i_estadual replace arqnota->razao with razao replace arqnota->frete with frete replace arqnota->ser_frete with ser_frete replace arqnota->seguro with seguro replace arqnota->aliq_iss with aliq_iss replace arqnota->vl_tot_iss with vl_tot_iss replace arqnota->vl_tot_ser with vl_tot_ser replace arqnota->desconto with desconto replace arqnota->iss_seguro with iss_seguro replace arqnota->sub_trib_n with sub_trib_n replace arqnota->logradouro with logradouro replace arqnota->uf_1 with uf_1 replace arqnota->municipio with municipio replace arqnota->placa with placa replace arqnota->uf_2 with uf_2 replace arqnota->Quantidade with Quantidade replace arqnota->nfp_mes with nfp_mes replace arqnota->especie with especie replace arqnota->marca with marca replace arqnota->flag with flag replace arqnota->peso_liq with peso_liq replace arqnota->peso_bruto with peso_bruto replace arqnota->frete with frete replace arqnota->com_1 with com_1 replace arqnota->com_2 with com_2 replace arqnota->com_3 with com_3 replace arqnota->com_4 with com_4 replace arqnota->com_5 with com_5 replace arqnota->com_6 with com_6 replace arqnota->com_7 with com_7 replace arqnota->com_8 with com_8 replace arqnota->com_9 with com_9 replace arqnota->cst with cst replace arqnota->horaentra with horaentra replace arqnota->horasaida with horasaida Select &arqf4 skip if eof() exit endif ometer1:set(smet+1) store ' ' to nfp_mes,no_nota,flag,item_1,nbm1,uniprod1 store ' ' to mec,cnpj,i_estadual,razao,frete,ser_frete,seguro,logradouro,uf_1,municipio,placa,uf_2 store ' ' to especie,marca,peso_liq,peso_bruto,frete,Quantidade store ' ' to com_1,com_2,com_3,com_4,com_5,com_6,com_7,com_8,com_9,cst,horaentra,horasaida store 0.00 to aliq_iss,vl_tot_iss,vl_tot_ser,desconto,iss_seguro,sub_trib_n store 0.00 to prod_1,desc_1,Qntd_1,vl_prod_1,vl_tot_1,icms_1,ipi_1 store 0.00 to prod_2,desc_2,Qntd_2,vl_prod_2,vl_tot_2,icms_2,ipi_2 store 0.00 to prod_3,desc_3,Qntd_3,vl_prod_3,vl_tot_3,icms_3,ipi_3 store 0.00 to prod_4,desc_4,Qntd_4,vl_prod_4,vl_tot_4,icms_4,ipi_4 store 0.00 to prod_5,desc_5,Qntd_5,vl_prod_5,vl_tot_5,icms_5,ipi_5 store 0.00 to prod_6,desc_6,Qntd_6,vl_prod_6,vl_tot_6,icms_6,ipi_6 store 0.00 to prod_7,desc_7,Qntd_7,vl_prod_7,vl_tot_7,icms_7,ipi_7 store 0.00 to prod_8,desc_8,Qntd_8,vl_prod_8,vl_tot_8,icms_8,ipi_8 store 0.00 to prod_9,desc_9,Qntd_9,vl_prod_9,vl_tot_9,icms_9,ipi_9 store 0.00 to prod_10,desc_10,Qntd_10,vl_prod_10,vl_tot_10,icms_10,ipi_10 Enddo ometer1:set(smet+30) close databases set exclusive off Arqf4="NF"+varcod+vano+'.dbf' File4="Arqnota.dbf" //__CopyFile (file4,arqf4) // nota paulista close databases exce01:end() indeza() //proginic set exclusive off unlock all return nil Agradeço desde Ja! Ailton - FHW 2.7 BCC55 XHARBOUR 0.99.61
  18. Pessoal Alguem consegue explicar para mim porque não consigo gravar dentro de um DBF esse programa? em vez dele gravar as informações do arquivo ele esta gravando BRANCO é um furo do XHARBOUR? Abaixo esta esta o PRG: #include 'fivewin.ch' ******************************************************************************** * * * atua378.prg * * * * fiscal * * conversao de arquivos * ******************************************************************************** static fonta,fontp static exce01,smet Function atua378 Set talk off Set delete on close databases set exclusive on Arqf4="NF"+varcod+vano arqf5="N"+varcod+'1'+vano+".EFi" Select 0 if Net_use("&Arqf4",.f.,5) // nota fiscal paulista set index to &arqf5 go top else msgalert("Arquivo Bloqueado por"+chr(13)+; "Outro Terminal","Aviso") close databases return endif Select 0 if Net_use("Arqnota",.t.,5) //aux diferencial zap else msgalert("Arquivo Bloqueado por"+chr(13)+; "Outro Terminal","Aviso") close databases return endif define font ofontp name "arial" size 10,10 bold define font ofonta name "fixedsys" size 5,10 Define dialog exce01 from 0,12 to 10,65 title 'Atualiza entrada saida 378' color 'b/w' style 5 @ 0.2,0.8 to 4.3,29.1 of exce01 @ 0.9,12 say "Nota Fiscal" of exce01 font ofontp size 55,13 color 'r/w' @ 1.9,2 meter ometer1 var smet total 30 of exce01 size 174,9 font ofontp @ 43,105 Btnbmp size 40,13 noborder FILENAME "bto4.bmp" of exce01 action not201() @ 43,153 Btnbmp size 40,13 noborder FILENAME "Cancela.bmp" of exce01 action exce01:end() Activate dialog exce01 on paint wndboxraised(exce01:hdc,5,5,125,412) centered Close databases set exclusive off Return nil Function not201 Select &Arqf4 // nota fiscal go top store ' ' to nfp_mes,no_nota,flag,item_1,nbm1,uniprod1 store ' ' to mec,cnpj,i_estadual,razao,frete,ser_frete,seguro,logradouro,uf_1,municipio,placa,uf_2 store ' ' to especie,marca,peso_liq,peso_bruto,frete,Quantidade store ' ' to com_1,com_2,com_3,com_4,com_5,com_6,com_7,com_8,com_9,cst,horaentra,horasaida store 0.00 to aliq_iss,vl_tot_iss,vl_tot_ser,desconto,iss_seguro,sub_trib_n store 0.00 to prod_1,desc_1,Qntd_1,vl_prod_1,vl_tot_1,icms_1,ipi_1 store 0.00 to prod_2,desc_2,Qntd_2,vl_prod_2,vl_tot_2,icms_2,ipi_2 store 0.00 to prod_3,desc_3,Qntd_3,vl_prod_3,vl_tot_3,icms_3,ipi_3 store 0.00 to prod_4,desc_4,Qntd_4,vl_prod_4,vl_tot_4,icms_4,ipi_4 store 0.00 to prod_5,desc_5,Qntd_5,vl_prod_5,vl_tot_5,icms_5,ipi_5 store 0.00 to prod_6,desc_6,Qntd_6,vl_prod_6,vl_tot_6,icms_6,ipi_6 store 0.00 to prod_7,desc_7,Qntd_7,vl_prod_7,vl_tot_7,icms_7,ipi_7 store 0.00 to prod_8,desc_8,Qntd_8,vl_prod_8,vl_tot_8,icms_8,ipi_8 store 0.00 to prod_9,desc_9,Qntd_9,vl_prod_9,vl_tot_9,icms_9,ipi_9 store 0.00 to prod_10,desc_10,Qntd_10,vl_prod_10,vl_tot_10,icms_10,ipi_10 Select &Arqf4 // nota fiscal go top Do while ! eof() Select &Arqf4 // nota fiscal nfp_mes = &arqf4->nfp_mes no_nota = &arqf4->no_nota flag = &arqf4->flag item_1 = &arqf4->item_1 prod_1 = &arqf4->prod_1 desc_1 = &arqf4->desc_1 Qntd_1 = &arqf4->Qntd_1 vl_prod_1 = &arqf4->vl_prod_1 vl_tot_1 = &arqf4->vl_tot_1 icms_1 = &arqf4->icms_1 ipi_1 = &arqf4->ipi_1 nbm1 = &arqf4->nbm1 uniprod1 = &arqf4->uniprod1 item_2 = &arqf4->item_2 prod_2 = &arqf4->prod_2 desc_2 = &arqf4->desc_2 Qntd_2 = &arqf4->Qntd_2 vl_prod_2 = &arqf4->vl_prod_2 vl_tot_2 = &arqf4->vl_tot_2 icms_2 = &arqf4->icms_2 ipi_2 = &arqf4->ipi_2 nbm2 = &arqf4->nbm2 uniprod2 = &arqf4->uniprod2 item_3 = &arqf4->item_3 prod_3 = &arqf4->prod_3 desc_3 = &arqf4->desc_3 Qntd_3 = &arqf4->Qntd_3 vl_prod_3 = &arqf4->vl_prod_3 vl_tot_3 = &arqf4->vl_tot_3 icms_3 = &arqf4->icms_3 ipi_3 = &arqf4->ipi_3 nbm3 = &arqf4->nbm3 uniprod3 = &arqf4-> uniprod3 item_4 = &arqf4->item_4 prod_4 = &arqf4->prod_4 desc_4 = &arqf4->desc_4 Qntd_4 = &arqf4->Qntd_4 vl_prod_4 = &arqf4->vl_prod_4 vl_tot_4 = &arqf4->vl_tot_4 icms_4 = &arqf4->icms_4 ipi_4 = &arqf4->ipi_4 nbm4 = &arqf4->nbm4 uniprod4 = &arqf4->uniprod4 item_5 = &arqf4->item_5 prod_5 = &arqf4->prod_5 desc_5 = &arqf4->desc_5 Qntd_5 = &arqf4->Qntd_5 vl_prod_5 = &arqf4->vl_prod_5 vl_tot_5 = &arqf4->vl_tot_5 icms_5 = &arqf4->icms_5 ipi_5 = &arqf4->ipi_5 nbm5 = &arqf4->nbm5 uniprod5 = &arqf4->uniprod5 item_6 = &arqf4->item_6 prod_6 = &arqf4->prod_6 desc_6 = &arqf4->desc_6 qntd_6 = &arqf4->Qntd_6 vl_prod_6 = &arqf4->vl_prod_6 vl_tot_6 = &arqf4->vl_tot_6 icms_6 = &arqf4->icms_6 ipi_6 = &arqf4->ipi_6 nbm6 = &arqf4->nbm6 uniprod6 = &arqf4->uniprod6 item_7 = &arqf4->item_7 prod_7 = &arqf4->prod_7 desc_7 = &arqf4->desc_7 Qntd_7 = &arqf4->Qntd_7 vl_prod_7 = &arqf4->vl_prod_7 vl_tot_7 = &arqf4->vl_tot_7 icms_7 = &arqf4->icms_7 ipi_7 = &arqf4->ipi_7 nbm7 = &arqf4->nbm7 uniprod7 = &arqf4->uniprod7 item_8 = &arqf4->item_8 prod_8 = &arqf4->prod_8 desc_8 = &arqf4->desc_8 Qntd_8 = &arqf4->Qntd_8 vl_prod_8 = &arqf4->vl_prod_8 vl_tot_8 = &arqf4->vl_tot_8 icms_8 = &arqf4->icms_8 ipi_8 = &arqf4->ipi_8 nbm8 = &arqf4->nbm8 uniprod8 = &arqf4->uniprod8 item_9 = &arqf4->item_9 prod_9 = &arqf4->prod_9 desc_9 = &arqf4->desc_9 Qntd_9 = &arqf4->Qntd_9 vl_prod_9 = &arqf4->vl_prod_9 vl_tot_9 = &arqf4->vl_tot_9 icms_9 = &arqf4->icms_9 ipi_9 = &arqf4->ipi_9 nbm9 = &arqf4->nbm9 uniprod9 = &arqf4->uniprod9 item_10 = &arqf4->item_10 prod_10 = &arqf4->prod_10 desc_10 = &arqf4->desc_10 Qntd_10 = &arqf4->Qntd_10 vl_prod_10 = &arqf4->vl_prod_10 vl_tot_10 = &arqf4->vl_tot_10 icms_10 = &arqf4->icms_10 ipi_10 = &arqf4->ipi_10 nbm10 = &arqf4->nbm10 uniprod10 = &arqf4->uniprod10 mec = &arqf4->mec cnpj = &arqf4->cnpj i_estadual = &arqf4->i_estadual razao = &arqf4->razao frete = &arqf4->frete ser_frete = &arqf4->ser_frete seguro = &arqf4->seguro aliq_iss = &arqf4->aliq_iss vl_tot_iss = &arqf4->vl_tot_iss vl_tot_ser = &arqf4->vl_tot_ser desconto = &arqf4->desconto iss_seguro = &arqf4->iss_seguro sub_trib_n = &arqf4->sub_trib_n logradouro = &arqf4->logradouro uf_1 = &arqf4->uf_1 municipio = &arqf4->municipio placa = &arqf4->placa uf_2 = &arqf4->uf_2 Quantidade = &arqf4->Quantidade nfp_mes = &arqf4->nfp_mes especie = &arqf4->especie marca = &arqf4->marca flag = &arqf4->flag peso_liq = &arqf4->peso_liq peso_bruto = &arqf4->peso_bruto frete = &arqf4->frete com_1 = &arqf4->com_1 com_2 = &arqf4->com_2 com_3 = &arqf4->com_3 com_4 = &arqf4->com_4 com_5 = &arqf4->com_5 com_6 = &arqf4->com_6 com_7 = &arqf4->com_7 com_8 = &arqf4->com_8 com_9 = &arqf4->com_9 cst = &arqf4->cst horaentra = &arqf4->horaentra horasaida = &arqf4->horasaida select Arqnota append blank replace arqnota->nfp_mes with nfp_mes replace arqnota->no_nota with no_nota replace arqnota->flag with flag replace arqnota->item_1 with item_1 replace arqnota->prod_1 with prod_1 replace arqnota->desc_1 with desc_1 replace arqnota->Qntd_1 with Qntd_1 replace arqnota->vl_prod_1 with vl_prod_1 replace arqnota->vl_tot_1 with vl_tot_1 replace arqnota->icms_1 with icms_1 replace arqnota->ipi_1 with ipi_1 replace arqnota->nbm1 with nbm1 replace arqnota->uniprod1 with uniprod1 replace arqnota->item_2 with item_2 replace arqnota->prod_2 with prod_2 replace arqnota->desc_2 with desc_2 replace arqnota->Qntd_2 with Qntd_2 replace arqnota->vl_prod_2 with vl_prod_2 replace arqnota->vl_tot_2 with vl_tot_2 replace arqnota->icms_2 with icms_2 replace arqnota->ipi_2 with ipi_2 replace arqnota->nbm2 with nbm2 replace arqnota->uniprod2 with uniprod2 replace arqnota->item_3 with item_3 replace arqnota->prod_3 with prod_3 replace arqnota->desc_3 with desc_3 replace arqnota->Qntd_3 with Qntd_3 replace arqnota->vl_prod_3 with vl_prod_3 replace arqnota->vl_tot_3 with vl_tot_3 replace arqnota->icms_3 with icms_3 replace arqnota->ipi_3 with ipi_3 replace arqnota->nbm3 with nbm3 replace arqnota-> uniprod3 with uniprod3 replace arqnota->item_4 with item_4 replace arqnota->prod_4 with prod_4 replace arqnota->desc_4 with desc_4 replace arqnota->Qntd_4 with Qntd_4 replace arqnota->vl_prod_4 with vl_prod_4 replace arqnota->vl_tot_4 with vl_tot_4 replace arqnota->icms_4 with icms_4 replace arqnota->ipi_4 with ipi_4 replace arqnota->nbm4 with nbm4 replace arqnota->uniprod4 with uniprod4 replace arqnota->item_5 with item_5 replace arqnota->prod_5 with prod_5 replace arqnota->desc_5 with desc_5 replace arqnota->Qntd_5 with Qntd_5 replace arqnota->vl_prod_5 with vl_prod_5 replace arqnota->vl_tot_5 with vl_tot_5 replace arqnota->icms_5 with icms_5 replace arqnota->ipi_5 with ipi_5 replace arqnota->nbm5 with nbm5 replace arqnota->uniprod5 with uniprod5 replace arqnota->item_6 with item_6 replace arqnota->prod_6 with prod_6 replace arqnota->desc_6 with desc_6 replace arqnota->Qntd_6 with Qntd_6 replace arqnota->vl_prod_6 with vl_prod_6 replace arqnota->vl_tot_6 with vl_tot_6 replace arqnota->icms_6 with icms_6 replace arqnota->ipi_6 with ipi_6 replace arqnota->nbm6 with nbm6 replace arqnota->uniprod6 with uniprod6 replace arqnota->item_7 with item_7 replace arqnota->prod_7 with prod_7 replace arqnota->desc_7 with desc_7 replace arqnota->Qntd_7 with Qntd_7 replace arqnota->vl_prod_7 with vl_prod_7 replace arqnota->vl_tot_7 with vl_tot_7 replace arqnota->icms_7 with icms_7 replace arqnota->ipi_7 with ipi_7 replace arqnota->nbm7 with nbm7 replace arqnota->uniprod7 with uniprod7 replace arqnota->item_8 with item_8 replace arqnota->prod_8 with prod_8 replace arqnota->desc_8 with desc_8 replace arqnota->Qntd_8 with Qntd_8 replace arqnota->vl_prod_8 with vl_prod_8 replace arqnota->vl_tot_8 with vl_tot_8 replace arqnota->icms_8 with icms_8 replace arqnota->ipi_8 with ipi_8 replace arqnota->nbm8 with nbm8 replace arqnota->uniprod8 with uniprod8 replace arqnota->item_9 with item_9 replace arqnota->prod_9 with prod_9 replace arqnota->desc_9 with desc_9 replace arqnota->Qntd_9 with Qntd_9 replace arqnota->vl_prod_9 with vl_prod_9 replace arqnota->vl_tot_9 with vl_tot_9 replace arqnota->icms_9 with icms_9 replace arqnota->ipi_9 with ipi_9 replace arqnota->nbm9 with nbm9 replace arqnota->uniprod9 with uniprod9 replace arqnota->item_10 with item_10 replace arqnota->prod_10 with prod_10 replace arqnota->desc_10 with desc_10 replace arqnota->Qntd_10 with Qntd_10 replace arqnota->vl_prod_10 with vl_prod_10 replace arqnota->vl_tot_10 with vl_tot_10 replace arqnota->icms_10 with icms_10 replace arqnota->ipi_10 with ipi_10 replace arqnota->nbm10 with nbm10 replace arqnota->uniprod10 with uniprod10 replace arqnota->mec with mec replace arqnota->cnpj with cnpj replace arqnota->i_estadual with i_estadual replace arqnota->razao with razao replace arqnota->frete with frete replace arqnota->ser_frete with ser_frete replace arqnota->seguro with seguro replace arqnota->aliq_iss with aliq_iss replace arqnota->vl_tot_iss with vl_tot_iss replace arqnota->vl_tot_ser with vl_tot_ser replace arqnota->desconto with desconto replace arqnota->iss_seguro with iss_seguro replace arqnota->sub_trib_n with sub_trib_n replace arqnota->logradouro with logradouro replace arqnota->uf_1 with uf_1 replace arqnota->municipio with municipio replace arqnota->placa with placa replace arqnota->uf_2 with uf_2 replace arqnota->Quantidade with Quantidade replace arqnota->nfp_mes with nfp_mes replace arqnota->especie with especie replace arqnota->marca with marca replace arqnota->flag with flag replace arqnota->peso_liq with peso_liq replace arqnota->peso_bruto with peso_bruto replace arqnota->frete with frete replace arqnota->com_1 with com_1 replace arqnota->com_2 with com_2 replace arqnota->com_3 with com_3 replace arqnota->com_4 with com_4 replace arqnota->com_5 with com_5 replace arqnota->com_6 with com_6 replace arqnota->com_7 with com_7 replace arqnota->com_8 with com_8 replace arqnota->com_9 with com_9 replace arqnota->cst with cst replace arqnota->horaentra with horaentra replace arqnota->horasaida with horasaida Select &arqf4 skip if eof() exit endif ometer1:set(smet+1) store ' ' to nfp_mes,no_nota,flag,item_1,nbm1,uniprod1 store ' ' to mec,cnpj,i_estadual,razao,frete,ser_frete,seguro,logradouro,uf_1,municipio,placa,uf_2 store ' ' to especie,marca,peso_liq,peso_bruto,frete,Quantidade store ' ' to com_1,com_2,com_3,com_4,com_5,com_6,com_7,com_8,com_9,cst,horaentra,horasaida store 0.00 to aliq_iss,vl_tot_iss,vl_tot_ser,desconto,iss_seguro,sub_trib_n store 0.00 to prod_1,desc_1,Qntd_1,vl_prod_1,vl_tot_1,icms_1,ipi_1 store 0.00 to prod_2,desc_2,Qntd_2,vl_prod_2,vl_tot_2,icms_2,ipi_2 store 0.00 to prod_3,desc_3,Qntd_3,vl_prod_3,vl_tot_3,icms_3,ipi_3 store 0.00 to prod_4,desc_4,Qntd_4,vl_prod_4,vl_tot_4,icms_4,ipi_4 store 0.00 to prod_5,desc_5,Qntd_5,vl_prod_5,vl_tot_5,icms_5,ipi_5 store 0.00 to prod_6,desc_6,Qntd_6,vl_prod_6,vl_tot_6,icms_6,ipi_6 store 0.00 to prod_7,desc_7,Qntd_7,vl_prod_7,vl_tot_7,icms_7,ipi_7 store 0.00 to prod_8,desc_8,Qntd_8,vl_prod_8,vl_tot_8,icms_8,ipi_8 store 0.00 to prod_9,desc_9,Qntd_9,vl_prod_9,vl_tot_9,icms_9,ipi_9 store 0.00 to prod_10,desc_10,Qntd_10,vl_prod_10,vl_tot_10,icms_10,ipi_10 Enddo ometer1:set(smet+30) close databases set exclusive off Arqf4="NF"+varcod+vano+'.dbf' File4="Arqnota.dbf" //__CopyFile (file4,arqf4) // nota paulista close databases exce01:end() indeza() //proginic set exclusive off unlock all return nil Agradeço desde Ja! Ailton - FHW 2.7 BCC55 XHARBOUR 0.99.61
  19. syspel

    erro

    faz tempo q tenho os mesmos prgs e não estava dando erro so agora q começou a dar erro. não tem uma outra forma de estar resolvendo esse erro, pos tenho muitos prgs?
  20. syspel

    erro

    Ola Alguem sabe como posso resolver esse problema ? fico no aguardo.
  21. syspel

    erro

    Ola Alguem sabe como posso resolver esse problema ? fico no aguardo.
  22. Opa pessoal Acho que não sobe me expressar então vou posta novamente o meu problema Eu tenho uma variável chamada ctxt essa variável tem um relatório de três paginas eu gostaria de grava essa variável dentro de um arquivo txt. O memowhrit ele grava a variável txt só com a ultima pagina To usando fw27 bcc55
  23. Coloquei esse código, mas não funciona! Voce tem um exemplo com prg, para podermos conferir? Obrigado
  24. syspel

    Relatorio

    deu certo ! ObrigadO pode dx que da proxima vez serei mais claro rsrsrs
  25. Tenho uma variavel de memoria que contem um relatorio com 3 paginas, gostaria de saber como que eu faço para gravar essa variavel dentro de um arquivo com as 3 paginas. Eu usei o memowhit e ele só grava a Ultima Pagina como fazer para gravar as 3 paginas? FW 2.7 BCC 55 AGRADEÇO DESDE JA! LUIZ...id='Comic Sans MS'>
×
×
  • Create New...