IE cancelacion, RegPrePolizasS contabilizar descontabilizar Folio opcional

This commit is contained in:
rakcsle
2022-04-27 20:52:34 -07:00
parent 928304a637
commit 1ee8b12041
11 changed files with 788 additions and 154 deletions

View File

@@ -713,18 +713,36 @@ Partial Class Compras_Proveedores
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 nodo As XmlNode = XMLDoc.DocumentElement
If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
namespaces.AddNamespace(Prefijo, cfdVer)
Dim nodo As XmlNode = XMLDoc.DocumentElement
Dim Version As String = ValorXml(nodo, "Version")
If Version = "3.2" Then
Prefijo = "cfd"
cfdVer = "http://www.sat.gob.mx/cfd/2"
ElseIf 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)
Dim node As XmlNode
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
If node IsNot Nothing Then
TxtRFC.Text = ValorXml(node, "rfc")
If Version = "3.3" Then
If Version = "3.3" Or Version = "4.0" Then
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
ChkEstado.Checked = True