-- limpieza
This commit is contained in:
@@ -3699,13 +3699,7 @@ Partial Class Compras_Compras
|
|||||||
Dim DtPS = GlobalDTPS(UsuarioActual.CveEmpresa).AsEnumerable
|
Dim DtPS = GlobalDTPS(UsuarioActual.CveEmpresa).AsEnumerable
|
||||||
Dim DtPSAlias = GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa).AsEnumerable
|
Dim DtPSAlias = GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa).AsEnumerable
|
||||||
|
|
||||||
''AGREGA EN TABLA TEMPORAL
|
|
||||||
'Dim DtPSTemp = TmpDT.Clone
|
|
||||||
'Dim Row As DataRow = Nothing
|
|
||||||
|
|
||||||
|
|
||||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
|
|
||||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||||
Dim VersionCFDI As String = ValorXML(nodo, "version")
|
Dim VersionCFDI As String = ValorXML(nodo, "version")
|
||||||
|
|
||||||
@@ -3770,9 +3764,6 @@ Partial Class Compras_Compras
|
|||||||
PU = ValorXML(node, "importe").ToDecimal / ValorXML(node, "cantidad").ToDecimal
|
PU = ValorXML(node, "importe").ToDecimal / ValorXML(node, "cantidad").ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'OBTIENE DESCUENTO
|
'OBTIENE DESCUENTO
|
||||||
If ValorXML(node, "descuento") IsNot Nothing Then Descuento = ValorXML(node, "descuento").Trim.ToDecimal
|
If ValorXML(node, "descuento") IsNot Nothing Then Descuento = ValorXML(node, "descuento").Trim.ToDecimal
|
||||||
|
|
||||||
@@ -3807,8 +3798,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'se le puso una condicion de que ignorara los acentos, porque en la bd, marcaria error porque no distingue acentos
|
'se le puso una condicion de que ignorara los acentos, porque en la bd, marcaria error porque no distingue acentos
|
||||||
'CONCEPTO PRUEBA "TRABAJOS DE CONSTRUCCION", RM/Compras/Compras.aspx?CveFactura=13402&RFC=ECO061206QW7
|
'CONCEPTO PRUEBA "TRABAJOS DE CONSTRUCCION", RM/Compras/Compras.aspx?CveFactura=13402&RFC=ECO061206QW7
|
||||||
'' u!PS.ToString.ToUpper.Trim = PSS
|
'' u!PS.ToString.ToUpper.Trim = PSS
|
||||||
@@ -3882,7 +3871,6 @@ Partial Class Compras_Compras
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ElseIf ValorXML(nodeTraslado, "Impuesto") = "003" Then
|
ElseIf ValorXML(nodeTraslado, "Impuesto") = "003" Then
|
||||||
IEPS = ValorXML(nodeTraslado, "Importe").Trim.ToDecimal
|
IEPS = ValorXML(nodeTraslado, "Importe").Trim.ToDecimal
|
||||||
PorcentajeIEPS = ValorXML(nodeTraslado, "TasaOCuota").Trim.ToDecimal
|
PorcentajeIEPS = ValorXML(nodeTraslado, "TasaOCuota").Trim.ToDecimal
|
||||||
@@ -3938,10 +3926,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Version = "3.2" Then
|
If Version = "3.2" Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
|
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
|
||||||
Dim ContadorTraslado = 0
|
Dim ContadorTraslado = 0
|
||||||
@@ -3960,14 +3944,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'' AGREGA PS
|
'' AGREGA PS
|
||||||
'AGREGA A TMPDT
|
'AGREGA A TMPDT
|
||||||
AddPS(ValorXML(node, "cantidad").ToDecimal, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
|
AddPS(ValorXML(node, "cantidad").ToDecimal, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10902,7 +10882,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
|
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
|
||||||
EmisorRFC = ValorXML(node, "RFC")
|
EmisorRFC = ValorXML(node, "RFC")
|
||||||
'EmisorNombre = ValorXML(node, "nombre")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||||
@@ -10934,29 +10913,23 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
TotalRetenciones = ValorXML(node, "totalImpuestosRetenidos", "0").ToDecimal
|
TotalRetenciones = ValorXML(node, "totalImpuestosRetenidos", "0").ToDecimal
|
||||||
|
|
||||||
If Version = "3.3" Or Version = "4.0" Then
|
If Version = "3.3" OrElse Version = "4.0" Then
|
||||||
|
|
||||||
For Each retencion As XmlNode In nodeRetenciones
|
For Each retencion As XmlNode In nodeRetenciones
|
||||||
If retencion.Attributes("Impuesto").Value = "002" Then
|
If retencion.Attributes("Impuesto").Value = "002" Then RetencionIVA += retencion.Attributes("Importe").Value.ToDecimal
|
||||||
RetencionIVA += retencion.Attributes("Importe").Value.ToDecimal
|
|
||||||
End If
|
If retencion.Attributes("Impuesto").Value = "001" Then RetencionISR += retencion.Attributes("Importe").Value.ToDecimal
|
||||||
If retencion.Attributes("Impuesto").Value = "001" Then
|
|
||||||
RetencionISR += retencion.Attributes("Importe").Value.ToDecimal
|
|
||||||
End If
|
|
||||||
' Do something.
|
|
||||||
Next
|
Next
|
||||||
GvOC1.Columns(6).Visible = True
|
GvOC1.Columns(6).Visible = True
|
||||||
GvOC2.Columns(4).Visible = True
|
GvOC2.Columns(4).Visible = True
|
||||||
Else
|
Else
|
||||||
|
|
||||||
For Each retencion As XmlNode In nodeRetenciones
|
For Each retencion As XmlNode In nodeRetenciones
|
||||||
If retencion.Attributes("impuesto").Value = "IVA" Then
|
If retencion.Attributes("impuesto").Value = "IVA" Then RetencionIVA += retencion.Attributes("importe").Value.ToDecimal
|
||||||
RetencionIVA += retencion.Attributes("importe").Value.ToDecimal
|
|
||||||
End If
|
If retencion.Attributes("impuesto").Value = "ISR" Then RetencionISR += retencion.Attributes("importe").Value.ToDecimal
|
||||||
If retencion.Attributes("impuesto").Value = "ISR" Then
|
|
||||||
RetencionISR += retencion.Attributes("importe").Value.ToDecimal
|
|
||||||
End If
|
|
||||||
' Do something.
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
SumaTotalRetenciones += RetencionIVA
|
SumaTotalRetenciones += RetencionIVA
|
||||||
@@ -10965,34 +10938,22 @@ Partial Class Compras_Compras
|
|||||||
TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDecimal
|
TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDecimal
|
||||||
Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces)
|
Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces)
|
||||||
|
|
||||||
If Version = "3.3" Or Version = "4.0" Then
|
If Version = "3.3" OrElse Version = "4.0" Then
|
||||||
|
|
||||||
For Each traslado As XmlNode In nodeTraslados
|
For Each traslado As XmlNode In nodeTraslados
|
||||||
If traslado.Attributes("Impuesto").Value = "002" Then
|
If traslado.Attributes("Impuesto").Value = "002" Then TrasladoIVA += traslado.Attributes("Importe").Value.ToDecimal
|
||||||
TrasladoIVA += traslado.Attributes("Importe").Value.ToDecimal
|
|
||||||
End If
|
If traslado.Attributes("Impuesto").Value = "003" Then TrasladoIEPS += traslado.Attributes("Importe").Value.ToDecimal
|
||||||
If traslado.Attributes("Impuesto").Value = "003" Then
|
|
||||||
TrasladoIEPS += traslado.Attributes("Importe").Value.ToDecimal
|
|
||||||
End If
|
|
||||||
If traslado.Attributes("Impuesto").Value = "001" Then
|
|
||||||
'TrasladoISR = traslado.Attributes("importe").Value
|
|
||||||
End If
|
|
||||||
' Do something.
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
For Each traslado As XmlNode In nodeTraslados
|
For Each traslado As XmlNode In nodeTraslados
|
||||||
If traslado.Attributes("impuesto").Value = "IVA" Then
|
If traslado.Attributes("impuesto").Value = "IVA" Then TrasladoIVA += traslado.Attributes("importe").Value.ToDecimal
|
||||||
TrasladoIVA += traslado.Attributes("importe").Value.ToDecimal
|
|
||||||
End If
|
If traslado.Attributes("impuesto").Value = "IEPS" Then TrasladoIEPS += traslado.Attributes("importe").Value.ToDecimal
|
||||||
If traslado.Attributes("impuesto").Value = "IEPS" Then
|
|
||||||
TrasladoIEPS += traslado.Attributes("importe").Value.ToDecimal
|
|
||||||
End If
|
|
||||||
'If traslado.Attributes("impuesto").Value = "ISR" Then
|
|
||||||
' TrasladoISR = traslado.Attributes("importe").Value
|
|
||||||
'End If
|
|
||||||
' Do something.
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -11014,53 +10975,15 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
node = node.SelectSingleNode(String.Format("//{0}:ImpuestosLocales", "implocal"), namespaces)
|
node = node.SelectSingleNode(String.Format("//{0}:ImpuestosLocales", "implocal"), namespaces)
|
||||||
|
|
||||||
|
|
||||||
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
|
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
|
||||||
OtrosImpuestos = ValorXML(node, "TotaldeTraslados", "0").ToDecimal
|
OtrosImpuestos = ValorXML(node, "TotaldeTraslados", "0").ToDecimal
|
||||||
OtrosImpuestosRetenciones = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal
|
'2022.06.04-- se quitan los datos de retenciones de impuestos locales, generan conflicto. RMF
|
||||||
|
'OtrosImpuestosRetenciones = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal
|
||||||
|
|
||||||
'If RetencionIVA <= 0 AndAlso ValorXML(node, "TotaldeRetenciones", "0").ToDouble > 0 Then RetencionIVA = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal
|
|
||||||
|
|
||||||
'For Each retencion As XmlNode In nodeImpLocales
|
|
||||||
' If retencion.Attributes("impuesto").Value = "IVA" Then
|
|
||||||
' RetencionIVA += retencion.Attributes("importe").Value.ToDouble
|
|
||||||
' End If
|
|
||||||
' If retencion.Attributes("impuesto").Value = "ISR" Then
|
|
||||||
' RetencionISR += retencion.Attributes("importe").Value.ToDouble
|
|
||||||
' End If
|
|
||||||
' ' Do something.
|
|
||||||
'Next
|
|
||||||
' SumaTotalRetenciones += RetencionIVA
|
|
||||||
' SumaTotalRetenciones += RetencionISR
|
|
||||||
|
|
||||||
'TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDouble
|
|
||||||
|
|
||||||
'Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Traslado", Prefijo), namespaces)
|
|
||||||
'For Each traslado As XmlNode In nodeTraslados
|
|
||||||
' If traslado.Attributes("impuesto").Value = "IVA" Then
|
|
||||||
' TrasladoIVA += traslado.Attributes("importe").Value.ToDouble
|
|
||||||
' End If
|
|
||||||
' If traslado.Attributes("impuesto").Value = "IEPS" Then
|
|
||||||
' TrasladoIEPS += traslado.Attributes("importe").Value.ToDouble
|
|
||||||
' End If
|
|
||||||
' 'If traslado.Attributes("impuesto").Value = "ISR" Then
|
|
||||||
' ' TrasladoISR = traslado.Attributes("importe").Value
|
|
||||||
' 'End If
|
|
||||||
' ' Do something.
|
|
||||||
'Next
|
|
||||||
'SumaTotalTraslados += TrasladoIVA
|
|
||||||
'SumaTotalTraslados += TrasladoIEPS
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Try
|
|
||||||
' _TFDUUID = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces).LastChild.Attributes("UUID").InnerText
|
|
||||||
'Catch ex As Exception
|
|
||||||
' _TFDUUID = ""
|
|
||||||
'End Try
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
Reference in New Issue
Block a user