-- htmldoce en xml. y caracteres especiales

This commit is contained in:
2022-09-20 16:58:32 -07:00
parent cbc35bacc6
commit 8a601da150

View File

@@ -1782,7 +1782,7 @@ Partial Class Compras_Compras
CargaComprobanteXML(XMLDoc)
If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then
Dim Xml As New StringBuilder
Dim Xml As String
Dim nodo As XmlNode = XMLDoc.DocumentElement
Dim Version = ValorXML(nodo, "version")
@@ -1810,10 +1810,17 @@ Partial Class Compras_Compras
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces)
Xml = Replace(nodeconceptos.OuterXml, "<cfdi:", "<")
Xml = Xml.Replace("</cfdi:", "</")
Xml = Xml.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", "")
Xml = Xml.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/4""", "")
Xml = Xml.Replace("&quot;", "") 'comillas
Xml = System.Web.HttpUtility.HtmlDecode(Xml.ToString)
Xml = Xml.Replace(Chr(13), "") 'salto de linea
Xml = Xml.Replace(Chr(10), "")
Xml = Xml.Replace("&", "") 'adicional, si hay otros
Xml.Append(Replace(Replace(Replace(Replace(Replace(nodeconceptos.OuterXml, "<cfdi:", "<"), "</cfdi:", "</"), "xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", ""), "xmlns:cfdi=""http://www.sat.gob.mx/cfd/4""", ""), "&quot;", ""))
If ObjeFacturas.GetFacturasComparacionXML(Version, System.Web.HttpUtility.HtmlDecode(Xml.ToString).Replace(Chr(13), "").Replace(Chr(10), ""), UsuarioActual.CveEmpresa) Then
If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa) Then
TmpDT = ObjeFacturas.DtResultados
TmpDT.Columns.Add("CveSATPSActualizado")
SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL