-- manejo caracter especial
This commit is contained in:
@@ -1855,7 +1855,8 @@ Partial Class Compras_Compras
|
||||
|
||||
If Validada And Not EnListadoEFOS Then
|
||||
Try
|
||||
XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", ""))
|
||||
' &HFEFF, es el código ZERO WIDTH NO-BREAK SPACE
|
||||
XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", "").Replace(ChrW(&HFEFF), ""))
|
||||
Catch ex As Exception
|
||||
Try
|
||||
Dim oReader As New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1"))
|
||||
@@ -1865,9 +1866,14 @@ Partial Class Compras_Compras
|
||||
GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString())
|
||||
End Try
|
||||
End Try
|
||||
|
||||
If XMLDoc.InnerXml = "" Then
|
||||
Alert("No se pudo procesar el archivo xml.", TipoMensaje.MsgError)
|
||||
Return ""
|
||||
End If
|
||||
|
||||
CreaDTConceptos()
|
||||
CargaComprobanteXML(XMLDoc)
|
||||
|
||||
If NuevaValidacionXML = 1 OrElse (Version = "3.3" OrElse Version = "4.0") Then
|
||||
Dim Xml As String
|
||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||
@@ -9265,7 +9271,7 @@ Partial Class Compras_Compras
|
||||
Dim CveProveedorConcepto As Integer = 0, CveIE As Integer = 0, CveCreditoDetalle As Integer = 0
|
||||
Dim ConceptoPersonal As String = "", Concepto As String = ""
|
||||
Dim tUsaInventarios As Boolean = UsuarioActual.Empresa.UsaInventarios
|
||||
If (UsuarioActual.CveEmpresa.Contiene(13, 83)) Then tUsaInventarios = False
|
||||
If (UsuarioActual.CveEmpresa.Contiene(13, 83, 7, 11, 12, 122, 145)) Then tUsaInventarios = False
|
||||
|
||||
If Not ObjConta.GetPrePolizasDetalleCompra(CveCompra, UsuarioActual.CveEmpresa) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -18533,10 +18539,12 @@ Partial Class Compras_Compras
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then
|
||||
TieneError = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'INGRESAMOS DETALLES
|
||||
If Not TieneError Then
|
||||
|
||||
Reference in New Issue
Block a user