FONTE NFE VB.NET

 Tópico anterior Próximo tópico Novo tópico

FONTE NFE VB.NET

VB.NET

 Compartilhe  Compartilhe  Compartilhe
#339177 - 13/04/2010 10:31:07

KILLER
JM
Cadast. em:Março/2010


pessoal eu acho que o erro está no xml de retorno da versao 2.00

<?xml version="1.0" encoding="utf-8"?>
<consReciNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
   <tpAmb>2</tpAmb>
   <nRec>310000008554999</nRec>
</consReciNFe>

faca assim mesmo?

A mente que se abre a uma nova idéia jamais voltará ao seu tamanho original. Albert Einstein

#339197 - 13/04/2010 12:48:52

OTAVIOFAVERO
SP
Cadast. em:Novembro/2009


alguem ja conseguiu selecionar certificado digital em formato A3???

alguem pode me ajudar???

Nada e tão Rui que não possa ser Piorado........
OnePass http://www.OnePass.com.br/
Otavio Favero

#339216 - 13/04/2010 15:59:43

KILLER
JM
Cadast. em:Março/2010


pessoal consegui

obrigado pela atenção

A mente que se abre a uma nova idéia jamais voltará ao seu tamanho original. Albert Einstein

#339592 - 16/04/2010 11:53:24

DUHHH
HORTOLANDIA
Cadast. em:Janeiro/2009


Quem tiver com alguma duvida posta que eu ajudo. Um cara pediu o codigo de como faço as coisas enviei a ele.



#339760 - 20/04/2010 08:32:14

KILLER
JM
Cadast. em:Março/2010


ai pessoal alguém sabe como fazer para quando der erro de validação avisar o usuário o que ele deve modificar,
por enquanto só fala a linha do erro, quero que avise que o erro é por exemplo no CNPJ, para ficar mais fácil de arrumar
parecido com o UniNFe faz

vlw

A mente que se abre a uma nova idéia jamais voltará ao seu tamanho original. Albert Einstein

#339761 - 20/04/2010 08:48:02

DANIELCPAETE
PORTO ALEGRE
Cadast. em:Dezembro/2003


Amigo se estiver usando o exemplo que coloquei a aqui no forum de uma olhada nesta rotina dentro do modulo de validação

    Private Sub reader_ValidationEventHandler(ByVal sender As Object, ByVal e As ValidationEventArgs)
        Erro = (("Linha: " & e.Exception.LineNumber & " Coluna: ") + e.Exception.LinePosition & " Erro: ") + e.Exception.Message & vbCr & vbLf
    End Sub


Aqui vem o nome do campo que possui erro é só tratar esta mensagem.
e.Exception.Message


Um abraço

Status MSN(danielcpaete@hotmail.com)


#339768 - 20/04/2010 09:19:06

KILLER
JM
Cadast. em:Março/2010


vlw daniel vou dar uma olhada

A mente que se abre a uma nova idéia jamais voltará ao seu tamanho original. Albert Einstein

#340142 - 24/04/2010 20:03:43

GERSON
RIO DE JANEIRO
Cadast. em:Outubro/2009


Daniel,

Estou enviando um modelo de geração do xml na versão 2.0. Peguei esse exemplo e dei uma melhorada.

Agora eu estou precisando que alguém me ajude como passar um parâmetro para URL do Web Service. Olhei o do nosso amigo Looze e a lógica é adicionar Web Service para cada Estado e módulos. Eu queria uma ideia que fosse dinâmico.

Olhei o seu fonte e vi que vc colocou fixo a me.URL da classe web service, tem algum jeito de passar por parâmetros.

----------------
Public Class Cls_GerarXML20
    Private dsNFe As New DataSet
    Public _TotaisIndice As String

#Region "Variaveis para gerar a NF-e"
    'Objetos do tipo Datarow que representão
    'Novas linhas no dataset Carregado com o Schema XSD da Versão 2.00
    'da Nota Fiscal Eletronica
    'Com essas Datarow´s  manipulo os dados Indexando e inserindo valores
    'separadamente por Tabelas.Após as principais tabelas serem preenchidas
    'corretamente adiono as novas linhas ao dataset e gero um XML atravês dele.
    '
    '
    '
    '

    Dim drNFe As DataRow = dsNFe.Tables("NFe").NewRow
    Dim drInfNfe As DataRow = dsNFe.Tables("InfNFe").NewRow
    Dim drNFref As DataRow = dsNFe.Tables("NFref").NewRow
    Dim dride As DataRow = dsNFe.Tables("ide").NewRow
    Dim dremit As DataRow = dsNFe.Tables("emit").NewRow
    Dim drenderEmit As DataRow = dsNFe.Tables("enderEmit").NewRow
    Dim drdest As DataRow = dsNFe.Tables("dest").NewRow
    Dim drenderDest As DataRow = dsNFe.Tables("enderDest").NewRow
    Dim drdet As DataRow = dsNFe.Tables("det").NewRow
    Dim drprod As DataRow = dsNFe.Tables("prod").NewRow
    Dim drmed As DataRow = dsNFe.Tables("med").NewRow
    Dim drarma As DataRow = dsNFe.Tables("arma").NewRow
    Dim drcomb As DataRow = dsNFe.Tables("comb").NewRow
    Dim drICMS00 As DataRow = dsNFe.Tables("ICMS00").NewRow
    Dim drICMS10 As DataRow = dsNFe.Tables("ICMS10").NewRow
    Dim drICMS20 As DataRow = dsNFe.Tables("ICMS20").NewRow
    Dim drICMS30 As DataRow = dsNFe.Tables("ICMS30").NewRow
    Dim drICMS40 As DataRow = dsNFe.Tables("ICMS40").NewRow
    Dim drICMS51 As DataRow = dsNFe.Tables("ICMS51").NewRow
    Dim drICMS60 As DataRow = dsNFe.Tables("ICMS60").NewRow
    Dim drICMS70 As DataRow = dsNFe.Tables("ICMS70").NewRow
    Dim drICMS90 As DataRow = dsNFe.Tables("ICMS90").NewRow
    Dim drICMSPart As DataRow = dsNFe.Tables("ICMSPart").NewRow
    Dim drICMSST As DataRow = dsNFe.Tables("ICMSST").NewRow
    Dim drICMSSN101 As DataRow = dsNFe.Tables("ICMSSN101").NewRow
    Dim drICMSSN102 As DataRow = dsNFe.Tables("ICMSSN102").NewRow
    Dim drICMSSN201 As DataRow = dsNFe.Tables("ICMSSN201").NewRow
    Dim drICMSSN202 As DataRow = dsNFe.Tables("ICMSSN202 ").NewRow
    Dim drICMSSN500 As DataRow = dsNFe.Tables("ICMSSN500").NewRow
    Dim drICMSSN900 As DataRow = dsNFe.Tables("ICMSSN900").NewRow
    Dim drrefNF As DataRow = dsNFe.Tables("refNF").NewRow
    Dim drrefNFP As DataRow = dsNFe.Tables("refNFP").NewRow
    Dim drrefECF As DataRow = dsNFe.Tables("refECF").NewRow
    Dim dravulsa As DataRow = dsNFe.Tables("avulsa").NewRow
    Dim drretirada As DataRow = dsNFe.Tables("retirada").NewRow
    Dim drentrega As DataRow = dsNFe.Tables("entrega").NewRow
    Dim drDI As DataRow = dsNFe.Tables("DI").NewRow
    Dim dradi As DataRow = dsNFe.Tables("adi").NewRow
    Dim drveicProd As DataRow = dsNFe.Tables("veicProd").NewRow
    Dim drCIDE As DataRow = dsNFe.Tables("CIDE").NewRow
    Dim drIPI As DataRow = dsNFe.Tables("IPI").NewRow
    Dim drIPITrib As DataRow = dsNFe.Tables("IPITrib").NewRow
    Dim drIPINT As DataRow = dsNFe.Tables("IPINT").NewRow
    Dim drII As DataRow = dsNFe.Tables("II").NewRow
    Dim drISSQN As DataRow = dsNFe.Tables("ISSQN").NewRow
    Dim drPISAliq As DataRow = dsNFe.Tables("PISAliq").NewRow
    Dim drPISQtde As DataRow = dsNFe.Tables("PISQtde").NewRow
    Dim drPISNT As DataRow = dsNFe.Tables("PISNT").NewRow
    Dim drPISOutr As DataRow = dsNFe.Tables("PISOutr").NewRow
    Dim drPISST As DataRow = dsNFe.Tables("PISST").NewRow
    Dim drCOFINSAliq As DataRow = dsNFe.Tables("COFINSAliq").NewRow
    Dim drCOFINSQtde As DataRow = dsNFe.Tables("COFINSQtde").NewRow
    Dim drCOFINSNT As DataRow = dsNFe.Tables("COFINSNT").NewRow
    Dim drCOFINSOutr As DataRow = dsNFe.Tables("COFINSOutr").NewRow
    Dim drCOFINSST As DataRow = dsNFe.Tables("COFINSST").NewRow
    Dim drICMSTot As DataRow = dsNFe.Tables("ICMSTot").NewRow
    Dim drISSQNtot As DataRow = dsNFe.Tables("ISSQNtot").NewRow
    Dim drretTrib As DataRow = dsNFe.Tables("retTrib").NewRow
    Dim drtransp As DataRow = dsNFe.Tables("transp").NewRow
    Dim drtransporta As DataRow = dsNFe.Tables("transporta").NewRow
    Dim drretTransp As DataRow = dsNFe.Tables("retTransp").NewRow
    Dim drveicTransp As DataRow = dsNFe.Tables("veicTransp").NewRow
    Dim drreboque As DataRow = dsNFe.Tables("reboque").NewRow
    Dim drvol As DataRow = dsNFe.Tables("vol").NewRow
    Dim drlacres As DataRow = dsNFe.Tables("lacres").NewRow
    Dim drfat As DataRow = dsNFe.Tables("fat").NewRow
    Dim drdup As DataRow = dsNFe.Tables("dup").NewRow
    Dim drinfAdic As DataRow = dsNFe.Tables("infAdic").NewRow
    Dim drobsCont As DataRow = dsNFe.Tables("obsCont").NewRow
    Dim drobsFisco As DataRow = dsNFe.Tables("obsFisco").NewRow
    Dim drprocRef As DataRow = dsNFe.Tables("procRef").NewRow
    Dim drexporta As DataRow = dsNFe.Tables("exporta").NewRow
    Dim drcompra As DataRow = dsNFe.Tables("compra").NewRow
    Dim drcana As DataRow = dsNFe.Tables("cana").NewRow
    Dim drforDia As DataRow = dsNFe.Tables("forDia").NewRow
    Dim drdeduc As DataRow = dsNFe.Tables("deduc").NewRow
    Dim drICMS As DataRow = dsNFe.Tables("ICMS").NewRow
    Dim drImposto As DataRow = dsNFe.Tables("imposto").NewRow
#End Region

    Public WriteOnly Property l_SCHEMAxsd() As String
        'Get
        '    Dim _xml As String
        '    _xml = dsNFe.GetXml
        '    _xml = Replace(_xml, "standalone=""yes""", "encoding=""UTF-8""")
        '    _xml = Replace(_xml, "<NewDataSet xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns=""http://www.portalfiscal.inf.br/nfe"">", "")
        '    _xml = Replace(_xml, "</NewDataSet>", "</NFe>")
        '    Return _xml
        'End Get
        Set(ByVal value As String)
            If IO.File.Exists(value) = True And value.Substring(value.Length - 4) = ".xsd" Then
                dsNFe.ReadXmlSchema(value)
            Else
                MsgBox("Não consegui encontrar o Schema da NF-e 2.00")
            End If
        End Set
    End Property

#Region "PRINCIPAIS FUNÇÕES PARA GERAR O XML"

    Public Sub Gera_Indices(ByVal Indice As Integer)
        With drNFe
            .Item("Nfe_Id") = Indice
            .Table.Namespace = "http://www.portalfiscal.inf.br/nfe"
        End With
        dsNFe.Tables("Nfe").Rows.Add(drNFe)

        With drInfNfe

            .Item("NFe_Id") = drNFe.Item("Nfe_Id")
            .Item("versao") = "2.00"
        End With
        dsNFe.Tables("infNfe").Rows.Add(drInfNfe)

    End Sub

    Public Sub NFRef(ByVal CAMPO_refNFe As String, Optional ByVal CAMPO_refCTe As String = "")
        With drNFref
            .Item("refNFe") = CAMPO_refNFe
            '.Item("refCTe") = CAMPO_refCTe
        End With
        dsNFe.Tables("NFref").Rows.Add(drNFref)
    End Sub

    Public Sub Gerar_IDE(ByVal CAMPO_natOp As String, ByVal CAMPO_indPag As Integer, ByVal CAMPO_mod As String, _
                         ByVal CAMPO_serie As String, ByVal CAMPO_nNF As Integer, ByVal CAMPO_dEmi As Date, _
                         ByVal CAMPO_hSaiEnt As DateTime, ByVal CAMPO_dSaiEnt As Date, ByVal CAMPO_tpNF As Integer, _
                         ByVal CAMPO_cMunFG As Integer, ByVal CAMPO_tpImp As Integer, ByVal CAMPO_tpEmis As Integer, _
                         ByVal CAMPO_tpAmb As Integer, ByVal CAMPO_finNFe As Integer, ByVal CAMPO_procEmi As Integer, _
                         ByVal CAMPO_verProc As String, ByVal CAMPO_dhCont As String)


        With dride
            '.Item("cUF") = CAMPO_cUF 'Codigo que deverá ser pego após Informar a UF do Emitente
            '.Item("cNF") = CAMPO_cNF 'Deverá ser inserido após o HASH da NF-e ser Gerado
            .Item("natOp") = CAMPO_natOp
            .Item("indPag") = CAMPO_indPag
            .Item("mod") = CAMPO_mod
            .Item("serie") = CAMPO_serie
            .Item("nNF") = CAMPO_nNF
            .Item("dEmi") = CAMPO_dEmi
            .Item("dSaiEnt") = CAMPO_dSaiEnt
            .Item("hSaiEnt") = CAMPO_hSaiEnt
            .Item("tpNF") = CAMPO_tpNF
            .Item("cMunFG") = CAMPO_cMunFG
            .Item("tpImp") = CAMPO_tpImp
            .Item("tpEmis") = CAMPO_tpEmis
            '.Item("cDV") = CAMPO_cDV 'Esse campo deverá ser inserido após ser gerado o Numero HASH da Nota
            .Item("tpAmb") = CAMPO_tpAmb
            .Item("finNFe") = CAMPO_finNFe
            .Item("procEmi") = CAMPO_procEmi
            .Item("verProc") = CAMPO_verProc
            .Item("dhCont") = CAMPO_dhCont
            .Item("InfNFe_Id") = drInfNfe.Item("infNFe_Id")
        End With

    End Sub

    Public Sub Gerar_Emitente(ByVal CAMPO_CNPJ As String, ByVal CAMPO_CPF As String, ByVal CAMPO_xNome As String, _
                         ByVal CAMPO_xFant As String, ByVal CAMPO_IE As String, ByVal CAMPO_IEST As String, _
                         ByVal CAMPO_IM As String, ByVal CAMPO_xLgr As String, ByVal CAMPO_nro As String, _
                        ByVal CAMPO_xCpl As String, ByVal CAMPO_xBairro As String, ByVal CAMPO_xMun As String, _
                        ByVal CAMPO_UF As String, ByVal CAMPO_CEP As Integer, ByVal CAMPO_xPais As String, _
                         ByVal CAMPO_fone As Integer, Optional ByVal CAMPO_CRT As String = "", Optional ByVal CAMPO_CNAE As String = "")

        With dremit
            .Item("CNPJ") = C



#340143 - 24/04/2010 20:05:44

GERSON
RIO DE JANEIRO
Cadast. em:Outubro/2009


Segunda parte

With dremit
            .Item("CNPJ") = CAMPO_CNPJ
            .Item("CPF") = CAMPO_CPF
            .Item("xNome") = CAMPO_xNome
            .Item("xFant") = CAMPO_xFant
            .Item("IE") = CAMPO_IE
            .Item("IEST") = CAMPO_IEST
            .Item("IM") = CAMPO_IM
            .Item("CNAE") = CAMPO_CNAE
            .Item("CRT") = CAMPO_CRT
            .Item("infNFe_Id") = drInfNfe.Item("infNFe_Id")
        End With

        With drenderEmit
            .Item("xLgr") = CAMPO_xLgr
            .Item("nro") = CAMPO_nro
            .Item("xCpl") = CAMPO_xCpl
            .Item("xBairro") = CAMPO_xBairro
            '.Item("cMun") = 'FuncaoMunicipios(CAMPO_xMun)
            .Item("xMun") = CAMPO_xMun
            .Item("UF") = CAMPO_UF
            .Item("CEP") = CAMPO_CEP
            .Item("cPais") = 1058  'FuncaoPais(CAMPO_xPais)
            .Item("xPais") = CAMPO_xPais
            .Item("fone") = CAMPO_fone
            .Item("emit_Id") = dremit.Item("emit_Id")
        End With
        'Complementando as informações da TAG IDE
        dsNFe.Tables("ide").Rows(0).Item("cUF") = "MG" 'FuncaoEstado(CAMPO_UF)
    End Sub

    Public Sub Gerar_destinatario(ByVal CAMPO_CNPJ As String, ByVal CAMPO_CPF As String, ByVal CAMPO_xNome As String, _
                         ByVal CAMPO_xFant As String, ByVal CAMPO_IE As String, ByVal CAMPO_ISUF As String, _
                         ByVal CAMPO_email As String, ByVal CAMPO_xLgr As String, ByVal CAMPO_nro As String, _
                        ByVal CAMPO_xCpl As String, ByVal CAMPO_xBairro As String, ByVal CAMPO_xMun As String, _
                        ByVal CAMPO_UF As String, ByVal CAMPO_CEP As Integer, ByVal CAMPO_xPais As String, _
                         ByVal CAMPO_fone As Integer)
        With drdest
            .Item("CNPJ") = CAMPO_CNPJ
            .Item("CPF") = CAMPO_CPF
            .Item("xNome") = CAMPO_xNome
            .Item("IE") = CAMPO_IE
            .Item("ISUF") = CAMPO_ISUF
            .Item("email") = CAMPO_email
            .Item("infNFe_Id") = drInfNfe.Item("infNFe_Id")
        End With

        With drenderDest

            .Item("xLgr") = CAMPO_xLgr
            .Item("nro") = CAMPO_nro
            .Item("xCpl") = CAMPO_xCpl
            .Item("xBairro") = CAMPO_xBairro
            '.Item("cMun") = 'FuncaoMunicipios(CAMPO_xMun)
            .Item("xMun") = CAMPO_xMun
            .Item("UF") = CAMPO_UF
            .Item("CEP") = CAMPO_CEP
            .Item("cPais") = 1058 'FuncaoPais(CAMPO_xPais)
            .Item("xPais") = CAMPO_xPais
            .Item("fone") = CAMPO_fone
            .Item("dest_Id") = drdest.Item("dest_Id")
        End With

    End Sub

    Public Sub Gerar_Produtos(ByVal INDICE_Prod As Integer, ByVal CAMPO_cProd As Integer, ByVal CAMPO_cEAN As String, _
                              ByVal CAMPO_xProd As String, ByVal CAMPO_NCM As String, ByVal CAMPO_EXTIPI As String, _
                              ByVal CAMPO_CFOP As String, ByVal CAMPO_uCom As String, ByVal CAMPO_qCom As Double, _
                              ByVal CAMPO_vUnCom As Double, ByVal CAMPO_vProd As Double, ByVal CAMPO_cEANTrib As String, _
                              ByVal CAMPO_uTrib As String, ByVal CAMPO_qTrib As Double, ByVal CAMPO_vUnTrib As Double, _
                              ByVal CAMPO_vFrete As Double, ByVal CAMPO_vSeg As Double, ByVal CAMPO_vDesc As Double, _
                              Optional ByVal CAMPO_vOutro As Double = 0, Optional ByVal CAMPO_indTot As String = "", _
                              Optional ByVal CAMPO_xPed As String = "", Optional ByVal CAMPO_nItemPed As String = "", Optional ByVal CAMPO_infAdProd As String = "")



        With drdet
            .Item("nItem") = INDICE_Prod + 1
            .Item("det_Id") = INDICE_Prod
            .Item("infAdProd") = CAMPO_infAdProd

        End With

        With drprod
            .Item("cProd") = CAMPO_cProd
            .Item("cEAN") = CAMPO_cEAN
            .Item("xProd") = CAMPO_xProd
            .Item("NCM") = CAMPO_NCM
            .Item("EXTIPI") = CAMPO_EXTIPI
            .Item("CFOP") = CAMPO_CFOP
            .Item("uCom") = CAMPO_uCom
            .Item("qCom") = CAMPO_qCom
            .Item("vUnCom") = CAMPO_vUnCom
            .Item("vProd") = CAMPO_vProd
            .Item("cEANTrib") = CAMPO_cEANTrib
            .Item("uTrib") = CAMPO_uTrib
            .Item("qTrib") = CAMPO_qTrib
            .Item("vUnTrib") = CAMPO_vUnTrib
            .Item("vFrete") = CAMPO_vFrete
            .Item("vSeg") = CAMPO_vSeg
            .Item("vDesc") = CAMPO_vDesc
            .Item("vOutro") = CAMPO_vOutro
            .Item("indTot") = CAMPO_indTot
            .Item("xPed") = CAMPO_xPed
            .Item("nItemPed") = CAMPO_nItemPed
            .Item("det_Id") = drdet.Item("det_Id")
        End With

        With drImposto

            .Item("det_id") = drdet.Item("det_Id")

        End With

        dsNFe.Tables("imposto").Rows.Add(drImposto)

        With drICMS

            .Item("imposto_Id") = drImposto.Item("imposto_Id")

        End With

        dsNFe.Tables("ICMS").Rows.Add(drICMS)


    End Sub

#End Region

#Region "FUNÇÕES QUE COMPLEMENTAM A DESCRIÇÃO DO PRODUTO"

    Public Sub Complementar_Produto(ByVal MEDICAMENTO_nLote As String, ByVal MEDICAMENTO_qLote As Double, ByVal MEDICAMENTO_dFab As Date, ByVal MEDICAMENTO_dVal As Date, ByVal MEDICAMENTO_vPMC As Double)


        With drmed
            .Item("nLote") = MEDICAMENTO_nLote
            .Item("qLote") = MEDICAMENTO_qLote
            .Item("dFab") = MEDICAMENTO_dFab
            .Item("dVal") = MEDICAMENTO_dVal
            .Item("vPMC") = MEDICAMENTO_vPMC
            .Item("prod_Id") = drprod.Item("prod_Id")
        End With
    End Sub

    Public Sub Complementar_Produto(ByVal ARMA_tpArma As String, ByVal ARMA_nSerie As String, ByVal ARMA_nCano As String, ByVal ARMA_descr As String)


        With drarma
            .Item("tpArma") = ARMA_tpArma
            .Item("nSerie") = ARMA_nSerie
            .Item("nCano") = ARMA_nCano
            .Item("descr") = ARMA_descr
            .Item("prod_Id") = drprod.Item("prod_Id")
        End With

    End Sub

    Public Sub Complementar_Produto(ByVal COMBUSTIVEL_cProdANP As String, ByVal COMBUSTIVEL_CODIF As String, ByVal COMBUSTIVEL_qTemp As Double, ByVal COMBUSTIVEL_UFCons As String)

        With drcomb

            .Item("cProdANP") = COMBUSTIVEL_cProdANP
            .Item("CODIF") = COMBUSTIVEL_CODIF
            .Item("qTemp") = COMBUSTIVEL_qTemp
            .Item("UFCons") = COMBUSTIVEL_UFCons
            .Item("prod_Id") = drprod.Item("prod_Id")
        End With
    End Sub

#End Region

#Region "FUNÇÕES PARA GERAR OS ICMS"
    Public Sub Gerar_000(ByVal ICMS00_orig As Integer, ByVal ICMS00_CST As String, ByVal ICMS00_modBC As String, ByVal ICMS00_vBC As Double, ByVal ICMS00_pICMS As Double, ByVal ICMS00_vICMS As Double)


        With drICMS00
            .Item("orig") = ICMS00_orig
            .Item("CST") = ICMS00_CST
            .Item("modBC") = ICMS00_modBC
            .Item("vBC") = ICMS00_vBC
            .Item("pICMS") = ICMS00_pICMS
            .Item("vICMS") = ICMS00_vICMS
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_010(ByVal ICMS10_orig As Integer, ByVal ICMS10_CST As String, ByVal ICMS10_modBC As String, _
                                         ByVal ICMS10_vBC As Double, ByVal ICMS10_pICMS As Double, ByVal ICMS10_vICMS As Double, _
                                          ByVal ICMS10_modBCST As String, ByVal ICMS10_pMVAST As Double, ByVal ICMS10_pRedBCST As Double, _
                                           ByVal ICMS10_vBCST As Double, ByVal ICMS10_pICMSST As Double, ByVal ICMS10_vICMSST As Double)



        With drICMS10
            .Item("orig") = ICMS10_orig
            .Item("CST") = ICMS10_CST
            .Item("modBC") = ICMS10_modBC
            .Item("vBC") = ICMS10_vBC
            .Item("pICMS") = ICMS10_pICMS
            .Item("vICMS") = ICMS10_vICMS
            .Item("modBCST") = ICMS10_modBCST
            .Item("pMVAST") = ICMS10_pMVAST
            .Item("pRedBCST") = ICMS10_pRedBCST
            .Item("vBCST") = ICMS10_vBCST
            .Item("pICMSST") = ICMS10_pICMSST
            .Item("vICMSST") = ICMS10_vICMSST
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_020(ByVal ICMS20_orig As Integer, ByVal ICMS20_CST As String, ByVal ICMS20_modBC As String, _
                                         ByVal ICMS20_pRedBC As Double, ByVal ICMS20_vBC As Double, ByVal ICMS20_pICMS As Double, _
                                         ByVal ICMS20_vICMS As Double)




        With drICMS20
            .Item("orig") = ICMS20_orig
            .Item("CST") = ICMS20_CST
            .Item("modBC") = ICMS20_modBC
            .Item("pRedBC") = ICMS20_pRedBC
            .Item("vBC") = ICMS20_vBC
            .Item("pICMS") = ICMS20_pICMS
            .Item("vICMS") = ICMS20_vICMS
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With

    End Sub
    Public Sub Gerar_030(ByVal ICMS30_orig As Integer, ByVal ICMS30_CST As String, ByVal ICMS30_modBCST As String, _
                                         ByVal ICMS30_pMVAST As Double, ByVal ICMS30_pRedBCST As Double, ByVal ICMS30_vBCST As Double, _
                                         ByVal ICMS30_pICMSST As Double, ByVal ICMS30_vICMSST As Double)


        With drICMS30
            .Item("orig") = ICMS30_orig
            .Item("CST") = ICMS30_CST
            .Item("modBCST") = ICMS30_modBCST
            .Item("pMVAST") = ICMS30_pMVAST
            .Item("pRedBCST") = ICMS30_pRedBCST
            .Item("vBCST") = ICMS30_vBCST
          



#340144 - 24/04/2010 20:08:28

GERSON
RIO DE JANEIRO
Cadast. em:Outubro/2009


Terceira parte

.Item("pICMSST") = ICMS30_pICMSST
            .Item("vICMSST") = ICMS30_vICMSST
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_040(ByVal ICMS40_orig As Integer, ByVal ICMS40_CST As String, ByVal ICMS40_vICMS As Double, ByVal ICMS40_motDesICMS As String)



        With drICMS40
            .Item("orig") = ICMS40_orig
            .Item("CST") = ICMS40_CST
            .Item("vICMS") = ICMS40_vICMS
            .Item("motDesICMS") = ICMS40_motDesICMS
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With

    End Sub
    Public Sub Gerar_051(ByVal ICMS51_orig As Integer, ByVal ICMS51_CST As String, ByVal ICMS51_modBC As String, ByVal ICMS51_pRedBC As Double, _
                                         ByVal ICMS51_vBC As Double, ByVal ICMS51_pICMS As Double, ByVal ICMS51_vICMS As Double)


        With drICMS51
            .Item("orig") = ICMS51_orig
            .Item("CST") = ICMS51_CST
            .Item("modBC") = ICMS51_modBC
            .Item("pRedBC") = ICMS51_pRedBC
            .Item("vBC") = ICMS51_vBC
            .Item("pICMS") = ICMS51_pICMS
            .Item("vICMS") = ICMS51_vICMS
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_060(ByVal ICMS60_orig As Integer, ByVal ICMS60_CST As String, ByVal ICMS60_vBCSTRet As Double, ByVal ICMS60_vICMSSTRet As Double)



        With drICMS60
            .Item("orig") = ICMS60_orig
            .Item("CST") = ICMS60_CST
            .Item("vBCSTRet") = ICMS60_vBCSTRet
            .Item("vICMSSTRet") = ICMS60_vICMSSTRet
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_070(ByVal ICMS70_orig As Integer, ByVal ICMS70_CST As String, ByVal ICMS70_modBC As String, ByVal ICMS70_pRedBC As Double, ByVal ICMS70_vBC As Double, ByVal ICMS70_pICMS As Double, ByVal ICMS70_vICMS As Double, _
                              ByVal ICMS70_modBCST As String, ByVal ICMS70_pMVAST As Double, ByVal ICMS70_pRedBCST As Double, _
                              ByVal ICMS70_vBCST As Double, ByVal ICMS70_pICMSST As Double, ByVal ICMS70_vICMSST As Double)



        With drICMS70
            .Item("orig") = ICMS70_orig
            .Item("CST") = ICMS70_CST
            .Item("modBC") = ICMS70_modBC
            .Item("pRedBC") = ICMS70_pRedBC
            .Item("vBC") = ICMS70_vBC
            .Item("pICMS") = ICMS70_pICMS
            .Item("vICMS") = ICMS70_vICMS
            .Item("modBCST") = ICMS70_modBCST
            .Item("pMVAST") = ICMS70_pMVAST
            .Item("pRedBCST") = ICMS70_pRedBCST
            .Item("vBCST") = ICMS70_vBCST
            .Item("pICMSST") = ICMS70_pICMSST
            .Item("vICMSST") = ICMS70_vICMSST
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_090(ByVal ICMS90_orig As Integer, ByVal ICMS90_CST As String, ByVal ICMS90_modBC As String, _
                             ByVal ICMS90_vBC As Double, ByVal ICMS90_pRedBC As Double, ByVal ICMS90_pICMS As Double, _
                             ByVal ICMS90_vICMS As Double, ByVal ICMS90_modBCST As String, ByVal ICMS90_pMVAST As Double, _
                             ByVal ICMS90_pRedBCST As Double, ByVal ICMS90_vBCST As Double, ByVal ICMS90_pICMSST As Double, _
                             ByVal ICMS90_vICMSST As Double)



        With drICMS90
            .Item("orig") = ICMS90_orig
            .Item("CST") = ICMS90_CST
            .Item("modBC") = ICMS90_modBC
            .Item("vBC") = ICMS90_vBC
            .Item("pRedBC") = ICMS90_pRedBC
            .Item("pICMS") = ICMS90_pICMS
            .Item("vICMS") = ICMS90_vICMS
            .Item("modBCST") = ICMS90_modBCST
            .Item("pMVAST") = ICMS90_pMVAST
            .Item("pRedBCST") = ICMS90_pRedBCST
            .Item("vBCST") = ICMS90_vBCST
            .Item("pICMSST") = ICMS90_pICMSST
            .Item("vICMSST") = ICMS90_vICMSST
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_ICMSPart(ByVal ICMSPart_orig As Integer, ByVal ICMSPart_CST As String, ByVal ICMSPart_modBC As String, _
                              ByVal ICMSPart_vBC As Double, ByVal ICMSPart_pRedBC As Double, ByVal ICMSPart_pICMS As Double, _
                              ByVal ICMSPart_vICMS As Double, ByVal ICMSPart_modBCST As String, ByVal ICMSPart_pMVAST As Double, _
                              ByVal ICMSPart_pRedBCST As Double, ByVal ICMSPart_vBCST As Double, ByVal ICMSPart_pICMSST As Double, ByVal ICMSPart_vICMSST As Double, _
                              ByVal ICMSPart_pBCOp As Double, ByVal ICMSPart_UFST As String)



        With drICMSPart
            .Item("orig") = ICMSPart_orig
            .Item("CST") = ICMSPart_CST
            .Item("modBC") = ICMSPart_modBC
            .Item("vBC") = ICMSPart_vBC
            .Item("pRedBC") = ICMSPart_pRedBC
            .Item("pICMS") = ICMSPart_pICMS
            .Item("vICMS") = ICMSPart_vICMS
            .Item("modBCST") = ICMSPart_modBCST
            .Item("pMVAST") = ICMSPart_pMVAST
            .Item("pRedBCST") = ICMSPart_pRedBCST
            .Item("vBCST") = ICMSPart_vBCST
            .Item("pICMSST") = ICMSPart_pICMSST
            .Item("vICMSST") = ICMSPart_vICMSST
            .Item("pBCOp") = ICMSPart_pBCOp
            .Item("UFST") = ICMSPart_UFST
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")

        End With
    End Sub
    Public Sub Gerar_ICMSST(ByVal ICMSST_orig As Integer, ByVal ICMSST_CST As String, ByVal ICMSST_vBCSTRet As Double, ByVal ICMSST_vICMSSTRet As Double, ByVal ICMSST_vBCSTDest As Double, ByVal ICMSST_vICMSSTDest As Double)



        With drICMSST
            .Item("orig") = ICMSST_orig
            .Item("CST") = ICMSST_CST
            .Item("vBCSTRet") = ICMSST_vBCSTRet
            .Item("vICMSSTRet") = ICMSST_vICMSSTRet
            .Item("vBCSTDest") = ICMSST_vBCSTDest
            .Item("vICMSSTDest") = ICMSST_vICMSSTDest
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_ICMSSN101(ByVal ICMSSN101_orig As Integer, ByVal ICMSSN101_CSOSN As String, ByVal ICMSSN101_pCredSN As Double, ByVal ICMSSN101_vCredICMSSN As Double)


        With drICMSSN101
            .Item("orig") = ICMSSN101_orig
            .Item("CSOSN") = ICMSSN101_CSOSN
            .Item("pCredSN") = ICMSSN101_pCredSN
            .Item("vCredICMSSN") = ICMSSN101_vCredICMSSN
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_ICMSSN102(ByVal ICMSSN102_orig As Integer, ByVal ICMSSN102_CSOSN As String)

        With drICMSSN102
            .Item("orig") = ICMSSN102_orig
            .Item("CSOSN") = ICMSSN102_CSOSN
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_ICMSSN201(ByVal ICMSSN201_orig As Integer, ByVal ICMSSN201_CSOSN As String, ByVal ICMSSN201_modBCST As String, _
                               ByVal ICMSSN201_pMVAST As Double, ByVal ICMSSN201_pRedBCST As Double, ByVal ICMSSN201_vBCST As Double, _
                               ByVal ICMSSN201_pICMSST As Double, ByVal ICMSSN201_vICMSST As Double, ByVal ICMSSN201_pCredSN As Double, _
                               ByVal ICMSSN201_vCredICMSSN As Double)


        With drICMSSN201
            .Item("orig") = ICMSSN201_orig
            .Item("CSOSN") = ICMSSN201_CSOSN
            .Item("modBCST") = ICMSSN201_modBCST
            .Item("pMVAST") = ICMSSN201_pMVAST
            .Item("pRedBCST") = ICMSSN201_pRedBCST
            .Item("vBCST") = ICMSSN201_vBCST
            .Item("pICMSST") = ICMSSN201_pICMSST
            .Item("vICMSST") = ICMSSN201_vICMSST
            .Item("pCredSN") = ICMSSN201_pCredSN
            .Item("vCredICMSSN") = ICMSSN201_vCredICMSSN
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With

    End Sub
    Public Sub Gerar_ICMSSN202(ByVal CMSSN202_orig As Integer, ByVal CMSSN202_CSOSN As String, ByVal CMSSN202_modBCST As String, ByVal CMSSN202_pMVAST As Double, _
                               ByVal CMSSN202_pRedBCST As Double, ByVal CMSSN202_vBCST As Double, ByVal CMSSN202_pICMSST As Double, ByVal CMSSN202_vICMSST As Double)



        With drICMSSN202
            .Item("orig") = CMSSN202_orig
            .Item("CSOSN") = CMSSN202_CSOSN
            .Item("modBCST") = CMSSN202_modBCST
            .Item("pMVAST") = CMSSN202_pMVAST
            .Item("pRedBCST") = CMSSN202_pRedBCST
            .Item("vBCST") = CMSSN202_vBCST
            .Item("pICMSST") = CMSSN202_pICMSST
            .Item("vICMSST") = CMSSN202_vICMSST
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")
        End With
    End Sub
    Public Sub Gerar_ICMSSN500(ByVal ICMSSN500_orig As Integer, ByVal ICMSSN500_CSOSN As String, ByVal ICMSSN500_vBCSTRet As Double, ByVal ICMSSN500_vICMSSTRet As Double)


        With drICMSSN500
            .Item("orig") = ICMSSN500_orig
            .Item("CSOSN") = ICMSSN500_CSOSN
            .Item("vBCSTRet") = ICMSSN500_vBCSTRet
            .Item("vICMSSTRet") = ICMSSN500_vICMSSTRet
            .Item("ICMS_id") = drICMS.Item("ICMS_Id")

        End With
    End Sub
    Public Sub Gerar_ICMSSN900(ByVal ICMSSN900_orig As Integer, ByVal ICMSSN900_CSOSN As String, ByVal ICMSSN900_modBC As String, ByVal ICMSSN900_vBC As Double, ByVal ICMSSN900_pRedBC As Double, _
                               ByVal ICMSSN900_pICMS As Double, ByVal ICMSSN900_vICMS As Double, ByVal ICMSSN900_modBCST As String, ByVal ICMSSN900_pMVAST As Double, ByVal ICMSSN900_pRedBCST As Double, _
                               ByVal ICMSSN900_vBCST As Double, ByVal ICMSSN900_pICMSST As Double, ByVal ICMSSN900_vICMSST As Double, ByVal ICMS



 Tópico anterior Próximo tópico Novo tópico


Para responder este tópico o login é requerido
Se você já possui uma conta de usuário por favor faça seu login
Se você não possui uma conta de usuário use a opção Criar usuário