FONTE NFE VB.NET
Gostaria muito da ajuda de vocês, estou tendo problemas para manifestar as NFe de BA e PR (só consigo manifestar manualmente entrando na secretaria, copiando a chave e colando no código), todos os outros estados estão normais.
Procurei aqui no fórum e encontrei o código que o DOUGLASJ postou, porém mesmo assim não consegui.
O Código ficou assim.
Alguém poderia me ajudar por favor?
Obrigado
[ô]------------------------------------------------------------------------------
[ô] <auto-generated>
[ô] This code was generated by a tool.
[ô] Runtime Version:2.0.50727.5485
[ô]
[ô] Changes to this file may cause incorrect behavior and will be lost if
[ô] the code is regenerated.
[ô] </auto-generated>
[ô]------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization
Namespace NfeConsulta3
<System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.ServiceModel[Ô], [Ô]3.0.0.0[Ô]), _
System.ServiceModel.ServiceContractAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3[Ô], ConfigurationName:=[Ô]NfeConsulta3.NfeConsultaSoap12[Ô])> _
Public Interface NfeConsultaSoap12
<System.ServiceModel.OperationContractAttribute(Action:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3/nfeConsultaNF[Ô], ReplyAction:=[Ô]*[Ô]), _
System.ServiceModel.XmlSerializerFormatAttribute()> _
Function nfeConsultaNF(ByVal request As NfeConsulta3.nfeConsultaNFRequest) As NfeConsulta3.nfeConsultaNFResponse
<System.ServiceModel.OperationContractAttribute(AsyncPattern:=True, Action:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3/nfeConsultaNF[Ô], ReplyAction:=[Ô]*[Ô])> _
Function BeginnfeConsultaNF(ByVal request As NfeConsulta3.nfeConsultaNFRequest, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
Function EndnfeConsultaNF(ByVal result As System.IAsyncResult) As NfeConsulta3.nfeConsultaNFResponse
End Interface
[ô][ô][ô]<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.Xml[Ô], [Ô]2.0.50727.5485[Ô]), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute([Ô]code[Ô]), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3[Ô])> _
[ô]System.Xml.Serialization.XmlRootAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta2[Ô], IsNullable:=False)> _
Partial Public Class nfeCabecMsg
Inherits Object
Implements System.ComponentModel.INotifyPropertyChanged
Private cUFField As String
Private versaoDadosField As String
Private anyAttrField() As System.Xml.XmlAttribute
[ô][ô][ô]<remarks/>
<System.Xml.Serialization.XmlElementAttribute(Order:=0)> _
Public Property cUF() As String
Get
Return Me.cUFField
End Get
Set(ByVal value As String)
Me.cUFField = value
Me.RaisePropertyChanged([Ô]cUF[Ô])
End Set
End Property
[ô][ô][ô]<remarks/>
<System.Xml.Serialization.XmlElementAttribute(Order:=1)> _
Public Property versaoDados() As String
Get
Return Me.versaoDadosField
End Get
Set(ByVal value As String)
Me.versaoDadosField = value
Me.RaisePropertyChanged([Ô]versaoDados[Ô])
End Set
End Property
[ô][ô][ô]<remarks/>
<System.Xml.Serialization.XmlAnyAttributeAttribute()> _
Public Property AnyAttr() As System.Xml.XmlAttribute()
Get
Return Me.anyAttrField
End Get
Set(ByVal value As System.Xml.XmlAttribute())
Me.anyAttrField = value
Me.RaisePropertyChanged([Ô]AnyAttr[Ô])
End Set
End Property
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
If (Not (propertyChanged) Is Nothing) Then
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.ServiceModel[Ô], [Ô]3.0.0.0[Ô]), _
System.ServiceModel.MessageContractAttribute(IsWrapped:=False)> _
Partial Public Class nfeConsultaNFRequest
<System.ServiceModel.MessageHeaderAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3[Ô])> _
Public nfeCabecMsg As NfeConsulta3.nfeCabecMsg
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3[Ô], Order:=0)> _
Public nfeDadosMsg As System.Xml.XmlNode
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal nfeCabecMsg As NfeConsulta3.nfeCabecMsg, ByVal nfeDadosMsg As System.Xml.XmlNode)
MyBase.New()
Me.nfeCabecMsg = nfeCabecMsg
Me.nfeDadosMsg = nfeDadosMsg
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.ServiceModel[Ô], [Ô]3.0.0.0[Ô]), _
System.ServiceModel.MessageContractAttribute(IsWrapped:=False)> _
Partial Public Class nfeConsultaNFResponse
<System.ServiceModel.MessageHeaderAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3[Ô])> _
Public nfeCabecMsg As NfeConsulta3.nfeCabecMsg
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:=[Ô]http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta3[Ô], Order:=0)> _
Public nfeConsultaNFResult As System.Xml.XmlNode
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal nfeCabecMsg As NfeConsulta3.nfeCabecMsg, ByVal nfeConsultaNFResult As System.Xml.XmlNode)
MyBase.New()
Me.nfeCabecMsg = nfeCabecMsg
Me.nfeConsultaNFResult = nfeConsultaNFResult
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
End Class
<System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.ServiceModel[Ô], [Ô]3.0.0.0[Ô])> _
Public Interface NfeConsultaSoap12Channel
Inherits NfeConsulta3.NfeConsultaSoap12, System.ServiceModel.IClientChannel
End Interface
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.ServiceModel[Ô], [Ô]3.0.0.0[Ô])> _
Partial Public Class nfeConsultaNFCompletedEventArgs
Inherits System.ComponentModel.AsyncCompletedEventArgs
Private results() As Object
Public Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
MyBase.New(exception, cancelled, userState)
Me.results = results
End Sub
Public ReadOnly Property Result() As NfeConsulta3.nfeConsultaNFResponse
Get
MyBase.RaiseExceptionIfNecessary()
Return CType(Me.results(0), NfeConsulta3.nfeConsultaNFResponse)
End Get
End Property
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute([Ô]System.ServiceModel[Ô], [Ô]3.0.0.0[Ô])> _
Partial Public Class NfeConsultaSoap12Client
Inherits System.ServiceModel.ClientBase(Of NfeConsulta3.NfeConsultaSoap12)
Implements NfeConsulta3.NfeConsultaSoap12
Private onBeginnfeConsultaNFDelegate As BeginOperationDelegate
Private onEndnfeConsultaNFDelegate As EndOperationDelegate
Private onnfeConsultaNFCompletedDelegate As System.Threading.SendOrPostCallback
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal endpointConfigurationName As String)
MyBase.New(endpointConfigurationName)
End Sub
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String)
MyBase.New(endpointConfigurationName, remoteAddress)
End Sub
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
MyBase.New(endpointConfigurationName, remoteAddress)
End Sub
Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
MyBase.New(binding, remoteAddress)
End Sub
Public Event nfeConsultaNFCompleted As System.EventHandler(Of nfeConsultaNFCompletedEventArgs)
Public Function nfeConsultaNF(ByVal request As NfeConsulta3.nfeConsultaNFRequest) As NfeConsulta3.nfeConsultaNFResponse Implements NfeConsulta3.NfeConsultaSoap12.nfeConsultaNF
Return MyBase.Channel.nfeConsultaNF(request)
End Function
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
Public Function BeginnfeConsultaNF(ByVal request As NfeConsulta3.nfeConsultaNFRequest, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements NfeConsulta3.NfeConsultaSoap12.BeginnfeConsultaNF
Return MyBase.Channel.BeginnfeConsultaNF(request, callback,
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
Public Function BeginnfeConsultaNF(ByVal request As NfeConsulta3.nfeConsultaNFRequest, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements NfeConsulta3.NfeConsultaSoap12.BeginnfeConsultaNF
Return MyBase.Channel.BeginnfeConsultaNF(request, callback, asyncState)
End Function
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
Public Function EndnfeConsultaNF(ByVal result As System.IAsyncResult) As System.Xml.XmlNode
Dim results() As Object = Me.EndInvoke(asyncResult)
Return CType(results(0), System.Xml.XmlNode)
End Function
[ô][ô][ô]<remarks/>
Public Overloads Sub nfeConsultaNFAsync(ByVal nfeDadosMsg As System.Xml.XmlNode)
Me.nfeConsultaNFAsync(nfeDadosMsg, Nothing)
End Sub
[ô][ô][ô]<remarks/>
Public Overloads Sub nfeConsultaNFAsync(ByVal nfeDadosMsg As System.Xml.XmlNode, ByVal userState As Object)
If (Me.nfeConsultaNFOperationCompleted Is Nothing) Then
Me.nfeConsultaNFOperationCompleted = AddressOf Me.OnnfeConsultaNFOperationCompleted
End If
Me.InvokeAsync([Ô]nfeConsultaNf[Ô], New Object() {nfeDadosMsg}, Me.nfeConsultaNFOperationCompleted, userState)
End Sub
Private Sub OnnfeConsultaNFOperationCompleted(ByVal arg As Object)
If (Not (Me.nfeConsultaNFCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg, System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent nfeConsultaNFCompleted(Me, New nfeConsultaNFCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
[ô][ô][ô]<remarks/>
Public Shadows Sub CancelAsync(ByVal userState As Object)
MyBase.CancelAsync(userState)
End Sub
End Class
End Namespace
Não me lembro de quais estados, mas estão caminhando nesta direção... Será que se torna nacional?
Citação:Não me lembro de quais estados, mas estão caminhando nesta direção... Será que se torna nacional?
O Caminho parece ser esse mesmo, o SAT é mamão com açucar.
Uma pergunta alguem ja esta atualizando para a nova NT 2015/003
acabei de ler a NT e fiquei perdido (pra variar) hehehe
alguem entendeu as mudanças do ICMS e o IE?
Citação:acabei de ler a NT e fiquei perdido (pra variar) hehehe
EU + = IGUAL
Citação::
acabei de ler a NT e fiquei perdido (pra variar) hehehe
EU + = IGUAL
Pelo que entendi Mudaram algumas regras de ICMS para vendas fora do Estado
mais não entendi como aplicar e quais as Tag que mudaram
fui ver o emissor de teste para ver como estaria lidando com essas mudanças e ele não tem nada ainda sobre alteração e divisão dos impostos.
não entendi nada tbm sobre CEST. tentei importar a tabela para a base de dados e não dá... não achei uma tabela de CEST com formato padrão que desse leitura e importação.
pelo visto vou passar natal mexendo nisso.. vigência é 01/01/2016
Porém eu estou tentando adicionar este campo ao XML e não estou conseguindo, pois dá erro de validação. Alguém conseguiu informar este campo?
Como estou passando no XML.
<prod>
<cProd>1</cProd>
<cEAN />
<xProd>PRODUTO TESTE</xProd>
<NCM>07133399</NCM>
<CFOP>5405</CFOP>
<uCom>UN</uCom>
<qCom>1.0000</qCom>
<vUnCom>10.0000000000</vUnCom>
<CEST>0800200</CEST>
<vProd>10.00</vProd>
<cEANTrib />
<uTrib>UN</uTrib>
<qTrib>1.0000</qTrib>
<vUnTrib>10.0000000000</vUnTrib>
<indTot>1</indTot>
</prod>
Citação::
Pessoal, estive verificando a NT 2015_003_v110, informa que houve um adiamento na data de validação do campo CEST, para data a ser confirmada.
Porém eu estou tentando adicionar este campo ao XML e não estou conseguindo, pois dá erro de validação. Alguém conseguiu informar este campo?
Como estou passando no XML.
<prod>
<cProd>1</cProd>
<cEAN />
<xProd>PRODUTO TESTE</xProd>
<NCM>07133399</NCM>
<CFOP>5405</CFOP>
<uCom>UN</uCom>
<qCom>1.0000</qCom>
<vUnCom>10.0000000000</vUnCom>
<CEST>0800200</CEST>
<vProd>10.00</vProd>
<cEANTrib />
<uTrib>UN</uTrib>
<qTrib>1.0000</qTrib>
<vUnTrib>10.0000000000</vUnTrib>
<indTot>1</indTot>
</prod>
Atualizou os schemas ????