-- lectura de la versión generación de carta porte
This commit is contained in:
@@ -1713,8 +1713,13 @@ Partial Class PopUpVerFactura
|
||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||
Dim Version = ValorXML(XMLDoc.DocumentElement, "version")
|
||||
If Version = "3.3" Then
|
||||
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||
Else ' se considera que es la version 4.0
|
||||
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||
End If
|
||||
|
||||
If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
||||
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
|
||||
@@ -1722,6 +1727,7 @@ Partial Class PopUpVerFactura
|
||||
namespaces.AddNamespace("cartaporte", "http://www.sat.gob.mx/CartaPorte")
|
||||
namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20")
|
||||
|
||||
|
||||
Dim nodeComprobante As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", Prefijo), namespaces)
|
||||
If nodeComprobante IsNot Nothing Then
|
||||
LugarExpedicion = ValorXML(nodeComprobante, "LugarExpedicion")
|
||||
@@ -1755,7 +1761,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
|
||||
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces)
|
||||
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante/{0}:Complemento", Prefijo), namespaces)
|
||||
|
||||
Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", "cartaporte20"), namespaces)
|
||||
If nodeCartaPorte IsNot Nothing Then
|
||||
|
||||
Reference in New Issue
Block a user