Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -10,6 +10,7 @@ Imports System.Threading.Tasks
|
||||
Imports Newtonsoft.Json
|
||||
Imports Extensiones
|
||||
Imports MoreLinq
|
||||
Imports ClbNegBICFDv3_3
|
||||
|
||||
Partial Class Compras_Compras
|
||||
Inherits ClsPaginas
|
||||
@@ -1341,7 +1342,7 @@ Partial Class Compras_Compras
|
||||
CambiaEjercicioAC()
|
||||
End If
|
||||
UpConsignaciones.Update()
|
||||
UpINV.Update()
|
||||
UpInv.Update()
|
||||
'DdlIVA.Visible = True ' cuando es compra manual
|
||||
'If UsuarioActual.CveEmpresa = 126 Then
|
||||
' CargaOrdenCorte()
|
||||
@@ -1735,6 +1736,50 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim SbValRet As New StringBuilder
|
||||
For Each concepto As XmlNode In nodeconceptos
|
||||
' Obtener la descripción del concepto
|
||||
Dim descripcion As String = ValorXML(concepto, "Descripcion")
|
||||
Dim importeValue As Decimal = Decimal.Parse(ValorXML(concepto, "Importe"))
|
||||
|
||||
' Seleccionar el nodo de Impuestos dentro de Concepto, si existe
|
||||
Dim impuestosNode As XmlNode = concepto.SelectSingleNode("cfdi:Impuestos", namespaces)
|
||||
|
||||
If Not impuestosNode Is Nothing Then
|
||||
' Seleccionar los nodos de Retencion dentro de Impuestos
|
||||
Dim retenciones As XmlNodeList = impuestosNode.SelectNodes("cfdi:Retenciones/cfdi:Retencion", namespaces)
|
||||
For Each retencion As XmlNode In retenciones
|
||||
' Obtener los valores de los atributos Base e Importe
|
||||
Dim baseValue As Decimal = Decimal.Parse(ValorXML(retencion, "Base"))
|
||||
Dim impuesto As String = ValorXML(retencion, "Impuesto")
|
||||
|
||||
If impuesto = "001" Then
|
||||
impuesto = "Retención ISR"
|
||||
ElseIf impuesto = "002" Then
|
||||
impuesto = "Retención IVA"
|
||||
ElseIf impuesto = "003" Then
|
||||
impuesto = "IEPS"
|
||||
End If
|
||||
|
||||
|
||||
' Validar si Base coincide con Importe
|
||||
If baseValue <> importeValue Then
|
||||
'SbValRet.Append($"La base e importe de la retención del impuesto {impuesto} no coinciden para {descripcion}. Base: {baseValue.ToString()}, Importe: {importeValue.ToString()} <br>")
|
||||
SbValRet.Append($"Producto: {descripcion} La base e importe del impuesto {impuesto} no coincide Base: {baseValue.ToString()}, Importe Producto: {importeValue.ToString()} <br>")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
If SbValRet.ToString.Trim.Length > 0 Then
|
||||
Alert(SbValRet.ToString, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
CargaConceptosXML(XMLDoc)
|
||||
End If
|
||||
@@ -5107,11 +5152,7 @@ Partial Class Compras_Compras
|
||||
' Next
|
||||
'End If
|
||||
|
||||
If DdlTipoCompra.SelectedValue = "14" Then 'recolección
|
||||
If Not ObjGrales.UpdateInvEntregaAlmacenEstatus(DdlRecoleccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2, CveCompra) Then
|
||||
ErrorDetalles = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'AGREGA AF COMPRA - Cuando es Compra se guarda CveCompraDetalle en AF
|
||||
If Row("TipoAF").ToString.ToEntero = 2 Then
|
||||
@@ -5136,6 +5177,12 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
''TERMINA: INSERTA DETALLES DE LA COMPRA
|
||||
|
||||
If DdlTipoCompra.SelectedValue = "14" Then 'recolección
|
||||
If Not ObjGrales.UpdateInvEntregaAlmacenEstatus(DdlRecoleccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2, CveCompra) Then
|
||||
ErrorDetalles = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
||||
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||
@@ -19742,6 +19789,10 @@ Partial Class Compras_Compras
|
||||
Dim cantidad As Decimal = dr("CantidadDisponible").ToString.ToDecimal
|
||||
AddPS(cantidad, dr("CveUM").ToString.ToEntero, "", dr("CveClasificacion").ToString.ToEntero, "", dr("CvePS").ToString.ToEntero, dr("PS").ToString, 2, tCveSub.ToString, "SE", "SE", "", "", pu, Total, Porcentaje, 0, 0, 0, 0, 0, PorcentajeIVA:=Porcentaje, TCalculaTotales:=True, CveTipoGasto:=tCveTipoGasto)
|
||||
Next
|
||||
'cambia si hay ps con uso de serie
|
||||
For Each dr As DataRow In TmpDT.Rows
|
||||
dr("CveMetodoInventario") = 1
|
||||
Next
|
||||
AddPS2()
|
||||
|
||||
End If
|
||||
@@ -20085,6 +20136,10 @@ Partial Class Compras_Compras
|
||||
DdlRefacturacionFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnRecolecciónAplicar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user