NFE NT 2017.002
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
NFE NT 2017.002
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
NFE NT 2017.002
Mas geralmente um aplicativo já conhece o que emite, e já tem relatório pra isso.
Vai complicar porque vai ter que fazer a relação de cada documento primeiro, porque pode ter repetido em pastas diferentes.
Algo mais ou menos assim:
Vai complicar porque vai ter que fazer a relação de cada documento primeiro, porque pode ter repetido em pastas diferentes.
Algo mais ou menos assim:
Código: Selecionar todos
#define CFOP 1
#define VALOR 2
#define NUMERO 3
aLista := {}
aFiles := Directory( "*.*" )
FOR EACH oElement IN aFiles
oDoc := XmlToDoc( MemoRead( oElement[ F_NAME ] ) )
IF AScan( aLista, { | e | e[ NUMERO ] == oDoc:ChaveAcesso } ) == 0
AAdd( aLista, { oDoc:ChaveAcesso, oDoc:valor, oDoc:cfop } )
ENDIF
NEXT
ASort( aLista, { | a, b | a[ cfop ] < b[ cfop ] } )
aLista2 := {}
FOR EACH oElement IN aLista
IF nItem := AScan( aLista2, { | x | x[ CFOP ] == aLista[ CFOP ] } ) == 0
AAdd( aLista2, { oElement[ CFOP ], oElement[ Valor ] )
ELSE
aLista2[ nItem, VALOR ] += oElement[ Valor ]
ENDIF
NEXT
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
NFE NT 2017.002
Só pra avisar.
A última NT 2017.002 é 1.20, de 11/04/2019.
A última NT 2017.002 é 1.20, de 11/04/2019.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/