|
Curso Acbr com Windev - CTE - |
Iniciado por amarildo, dez., 28 2017 10:26 AM - 5 respostas |
| |
| | | |
|
| |
Membro registado 535 mensagems |
|
Publicado em dezembro, 28 2017 - 10:26 AM |
Procedure VERIFICA_ARQUIVO_SAIDA_CONHECIMENTO(_diretorio_Arquivo_saida is string="")
IF fFileExist(_diretorio_Arquivo_saida) THEN fDelete(_diretorio_Arquivo_saida) END
Procedure VERIFICA_ARQUIVO_RETORNO_CONHECIMENTO(s_DIRETORIO_ARQUIVO_ENTRADA is string="",s_XML is string="", ... s_DIRETORIO_ARQUIVO_SAIDA is string="",sVem_onde is string="",_numero_nota is int=0, ... s_titulo_arquivo is string="",s_diretorio is string="") s_RETORNO is string="" t_hora is Time=TimeSys() s_nome_resumo_arquivo is string=s_titulo_arquivo+"_" IF _numero_nota<>0 THEN s_nome_resumo_arquivo+=NumToString(_numero_nota,"06d")+"_" END IF sVem_onde<>"" THEN s_nome_resumo_arquivo+=NoSpace(sVem_onde)+"_" END s_nome_resumo_arquivo+="h"+t_hora..Hour+"_"+"m"+t_hora..Minute+"_"+"s"+t_hora..Second s_diretorio_auditoria is string=s_diretorio+"MATOS\201712\22_12_2017\" IF fMakeDir(s_diretorio_auditoria) THEN END s_ARQUIVO is string=s_diretorio_auditoria+s_nome_resumo_arquivo+"_ent.txt" fSaveText(s_ARQUIVO,s_XML) fSaveText(s_DIRETORIO_ARQUIVO_ENTRADA,s_XML) s_RETORNO="" b_existe is boolean=False n_CONTADOR is int=0 LOOP IF fFileExist(s_DIRETORIO_ARQUIVO_SAIDA) THEN s_RETORNO=fLoadText(s_DIRETORIO_ARQUIVO_SAIDA) IF s_RETORNO<>"" THEN b_existe=True BREAK END END n_CONTADOR++ Message(n_CONTADOR) Multitask(-1) IF KeyPressed(VK_SPACE) = True THEN IF YesNo(sVem_onde+CR+"VAI SAIR DESEJA?") THEN s_ARQUIVO="" s_RETORNO="" BREAK END END END IF b_existe=True THEN s_ARQUIVO=s_diretorio_auditoria+s_nome_resumo_arquivo+"_sai.txt" fSaveText(s_ARQUIVO,s_RETORNO) END RESULT (s_RETORNO,s_ARQUIVO)
AULA 1316 WINDEV ACBR 023 - CTE.CriarCTe
Hoje estou iniciando Cte com Acbr
http://windevdesenvolvimento.blogspot.com.br/2017/12/aula-1316-windev-acbr-023-ctecriarcte.html
|
| |
| |
| | | |
|
| | |
| |
Membro registado 535 mensagems |
|
Publicado em janeiro, 01 2018 - 11:08 AM |
EDT_TXT_CriarCTe=[ [infCte] versao=3.0 #ide# #toma3# #toma4# #compl# #emit# #rem# #locColeta# #infNF001# #infNFe001# #Dest# #vPrest# #ICMSSN# #infCarga# #infQ001# #Rodo# #occ# ]
s_xml is string=""
s_xml=_0920_010_ide() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#ide#",s_xml)
s_xml=_0930_010_toma3() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#toma3#",s_xml)
...
s_xml=_1060_010_Rodo() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#Rodo#",s_xml)
s_xml=_1070_010_occ() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#occ#",s_xml)
Procedure _0920_010_ide() s_nfe_xml is string=[ [ide] cCT=12345678 CFOP=5353 natOp=TRANSPORTE forPag=0 mod=57 serie=1 nCT=1 dhEmi=15/12/2012 tpImp=1 tpemis=1 procEmi=3 verProc=000 dhCont=30/12/1899 xJust= tpCTe=0 refCTe= cMunEnv=4112009 xMunEnv=XXXXXXX UFEnv=XX modal=01 tpServ=0 cMunIni=1234567 xMunIni=xxxxxxx UFIni=XX cMunFim=1234567 xMunFim=xxxxxx UFFim=XX retira=1 xDetRetira= cUF=41 indGlobalizado=0 indIEToma=1 ] RESULT s_nfe_xml
http://windevdesenvolvimento.blogspot.com.br/2017/12/aula-1320-windev-acbr-025-ctecriarcte.html
http://windevdesenvolvimento.blogspot.com.br/2017/12/aula-1318-windev-acbr-024-ctecriarcte.html
Mensagem modificada, janeiro, 01 2018 - 11:13 AM |
| |
| |
| | | |
|
| | |
| |
Membro registado 535 mensagems |
|
Publicado em janeiro, 03 2018 - 12:40 PM |
AULA 1327 WINDEV ACBR 026 - CTE.CRIARCTE TOMADOR
EDT_TXT_CriarCTe=[ [infCte] versao=3.0 #ide# #tomador# #compl# #emit# #rem# #locColeta# #infNF001# #infNFe001# #Dest# #vPrest# #ICMSSN# #infCarga# #infQ001# #Rodo# #occ# ]
s_xml is string=""
SWITCH empresa_parametro_conhecimento.versao_xml CASE "3.00" SWITCH conhecimento.modelo CASE "57" s_xml=_0920_010_ide() CASE "67" s_xml=_0920_010_ide() OTHER CASE END OTHER CASE END
EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#ide#",s_xml) //
s_xml=_0925_010_tomador() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#tomador#",s_xml)
http://windevdesenvolvimento.blogspot.com.br/2018/01/aula-1327-windev-acbr-026-ctecriarcte.html
Mensagem modificada, janeiro, 03 2018 - 12:49 PM |
| |
| |
| | | |
|
| | |
| |
Membro registado 535 mensagems |
|
Publicado em janeiro, 07 2018 - 6:45 PM |
Procedure _0915_010_GERAR_TXT_CriarCTe()
EDT_TXT_CriarCTe=[ [infCte] versao=3.0 #ide# #tomador# #compl# #emit# #rem# #locColeta# #infNF001# #infNFe001# #Dest# #vPrest# #ICMSSN# #infCarga# #infQ001# #Rodo# #occ# ]
s_xml is string=""
SWITCH empresa_parametro_conhecimento.versao_xml CASE "3.00" SWITCH conhecimento.modelo CASE "57" s_xml=_0920_010_ide() CASE "67" s_xml=_0920_010_ide() OTHER CASE END OTHER CASE END
EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#ide#",s_xml)
s_xml=_0925_010_tomador() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#tomador#",s_xml)
s_xml=_0950_010_compl() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#compl#",s_xml)
s_xml is string=""
SWITCH empresa_parametro_conhecimento.versao_xml CASE "3.00" SWITCH conhecimento.modelo CASE "57" s_xml=_0920_010_ide() CASE "67" s_xml=_0920_010_ide() OTHER CASE END OTHER CASE END
EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#ide#",s_xml)
s_xml=_0925_010_tomador() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#tomador#",s_xml)
s_xml=_0950_010_compl() EDT_TXT_CriarCTe=Replace(EDT_TXT_CriarCTe,"#compl#",s_xml)
Procedure _0950_010_compl() s_nfe_xml is string=[ [compl] xEmi=#xEmi# tpPer=#tpPer# tpHor=#tpHor# origCalc=#origCalc# destCalc=#destCalc# xObx=#xObx# ] _xEmi is string="" _tpPer is string="" _tpHor is string="" _origCalc is string="" _destCalc is string="" _xObx is string=conhecimento.x_obs_90 s_nfe_xml=Replace(s_nfe_xml,"#xEmi#",_xEmi) s_nfe_xml=Replace(s_nfe_xml,"#tpPer#",_tpPer) s_nfe_xml=Replace(s_nfe_xml,"#tpHor#",_tpHor) s_nfe_xml=Replace(s_nfe_xml,"#origCalc#",_origCalc) s_nfe_xml=Replace(s_nfe_xml,"#destCalc#",_destCalc) s_nfe_xml=Replace(s_nfe_xml,"#xObx#",_xObx)
RESULT s_nfe_xml
Aula 1336 DE 1602 VIDEOS - WINDEV ACBR 027 - CTE.CRIARCTE COMPL
http://acbr.sourceforge.net/ACBrMonitor/CTECriarCTe.html
http://windevdesenvolvimento.blogspot.com.br/2018/01/aula-1336-de-1602-videos-windev-acbr.html
|
| |
| |
| | | |
|
| | |
| |
Membro registado 535 mensagems |
|
Publicado em janeiro, 07 2018 - 8:41 PM |
Procedure _0960_010_emit() s_nfe_xml is string=[ [emit] CNPJ=#CNPJ# IE=#IE# xNome=#xNome# xFant=#xFant# xLgr=#xLgr# nro=#nro# xCpl=#xCpl# xBairro=#xBairro# cMun=#cMun# xMun=#xMun# cep=#cep# UF=#UF# fone=#fone# ]
s_CNPJ is string=empresa.cnpj s_IE is string=empresa.inscricao_estadual s_xNome is string=empresa.razao_social s_xFant is string=empresa.nome_fantasia s_xLgr is string=empresa.endereco_rua s_nro is string=empresa.endereco_numero s_xCpl is string=empresa.endereco_complemento s_xBairro is string=empresa.endereco_bairro s_cMun is string=empresa.codigo_municipio s_xMun is string=empresa.endereco_cidade s_cep is string=empresa.endereco_cep s_UF is string=empresa.endereco_uf s_fone is string="" IF empresa.telefone<>"" THEN s_ddd_telefone is string="51" IF empresa.telefone_ddd="" THEN ELSE s_ddd_telefone=empresa.telefone_ddd END s_fone=s_ddd_telefone+empresa.telefone END
s_nfe_xml=Replace(s_nfe_xml,"#CNPJ#",s_CNPJ) s_nfe_xml=Replace(s_nfe_xml,"#IE#",s_IE) s_nfe_xml=Replace(s_nfe_xml,"#xNome#",s_xNome) s_nfe_xml=Replace(s_nfe_xml,"#xFant#",s_xFant) s_nfe_xml=Replace(s_nfe_xml,"#xLgr#",s_xLgr) s_nfe_xml=Replace(s_nfe_xml,"#nro#",s_nro) s_nfe_xml=Replace(s_nfe_xml,"#xCpl#",s_xCpl) s_nfe_xml=Replace(s_nfe_xml,"#xBairro#",s_xBairro) s_nfe_xml=Replace(s_nfe_xml,"#cMun#",s_cMun) s_nfe_xml=Replace(s_nfe_xml,"#xMun#",s_xMun) s_nfe_xml=Replace(s_nfe_xml,"#cep#",s_cep) s_nfe_xml=Replace(s_nfe_xml,"#UF#",s_UF) s_nfe_xml=Replace(s_nfe_xml,"#fone#",s_fone)
RESULT s_nfe_xml
BOA TARDE
Aula 1337 DE 1603 VIDEOS - WINDEV ACBR 028 - CTE.CRIARCTE EMITENTE
http://acbr.sourceforge.net/ACBrMonitor/CTECriarCTe.html
http://windevdesenvolvimento.blogspot.com.br/2018/01/aula-1337-de-1603-videos-windev-acbr.html
|
| |
| |
| | | |
|
| | |
| |
Membro registado 535 mensagems |
|
Publicado em janeiro, 07 2018 - 9:46 PM |
Procedure _0970_010_rem() s_nfe_xml is string=[ [rem] CNPJCPF=#CNPJCPF# IE=#IE# xNome=#xNome# xFant=#xFant# fone=#fone# xLgr=#xLgr# nro=#nro# xCpl=#xCpl# xBairro=#xBairro# cMun=#cMun# xMun=#xMun# cep=#cep# UF=#UF# PaisCod=#PaisCod# pais=#pais# Email=#email# ]
_CNPJCPF is string="" _IE is string="" _xNome is string="" _xFant is string="" _fone is string="" _xLgr is string="" _nro is string="" _xCpl is string="" _xBairro is string="" _cMun is string="" _xMun is string="" _cep is string="" _UF is string="" _PaisCod is string="" _pais is string="" _email is string=""
HReadSeekFirst(cliente,id_empresa_cliente,conhecimento.codigo_remetente_112) IF HFound(cliente) THEN
_CNPJCPF=cliente.cnpj_cpf _IE=cliente.inscricao_estadual _xNome=cliente.razao_social_nome _xFant=cliente.nome_fantasia _fone="" IF cliente.telefone<>"" THEN _fone="51" IF cliente.telefone_ddd<>"" THEN _fone=cliente.telefone_ddd END _fone=cliente.telefone END _xLgr=cliente.endereco_rua _nro=cliente.endereco_numero _xCpl=cliente.endereco_complemento _xBairro=cliente.endereco_bairro _cMun=cliente.endereco_cmun _xMun=cliente.endereco_cidade _cep=cliente.endereco_cep _UF=cliente.endereco_uf _PaisCod=cliente.Endereco_cpais _pais=cliente.endereco_pais _email=cliente.email END
s_nfe_xml=Replace(s_nfe_xml,"#CNPJCPF#",_CNPJCPF) s_nfe_xml=Replace(s_nfe_xml,"#IE#",_IE) s_nfe_xml=Replace(s_nfe_xml,"#xNome#",_xNome) s_nfe_xml=Replace(s_nfe_xml,"#xFant#",_xFant) s_nfe_xml=Replace(s_nfe_xml,"#fone#",_fone) s_nfe_xml=Replace(s_nfe_xml,"#xLgr#",_xLgr) s_nfe_xml=Replace(s_nfe_xml,"#nro#",_nro) s_nfe_xml=Replace(s_nfe_xml,"#xCpl#",_xCpl) s_nfe_xml=Replace(s_nfe_xml,"#xBairro#",_xBairro) s_nfe_xml=Replace(s_nfe_xml,"#cMun#",_cMun) s_nfe_xml=Replace(s_nfe_xml,"#xMun#",_xMun) s_nfe_xml=Replace(s_nfe_xml,"#cep#",_cep) s_nfe_xml=Replace(s_nfe_xml,"#UF#",_UF) s_nfe_xml=Replace(s_nfe_xml,"#PaisCod#",_PaisCod) s_nfe_xml=Replace(s_nfe_xml,"#pais#",_pais) s_nfe_xml=Replace(s_nfe_xml,"#email#",_email)
RESULT s_nfe_xml
BOA TARDE
Aula 1338 DE 1604 VIDEOS - WINDEV ACBR 029 - CTE.CRIARCTE REMETENTE
http://acbr.sourceforge.net/ACBrMonitor/CTECriarCTe.html
http://windevdesenvolvimento.blogspot.com.br/2018/01/aula-1338-de-1604-videos-windev-acbr.html
|
| |
| |
| | | |
|
| | | | |
| | |
|