From b42ea13755251066ac8b17b5aed99434ea95bf87 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 9 Jun 2023 13:30:57 -0700 Subject: [PATCH] =?UTF-8?q?--=20activar=20la=20validaci=C3=B3n=20de=20cfdi?= =?UTF-8?q?,=20para=20traslados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/eFacturas.aspx.vb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 6540170f5..5464021b3 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -4866,7 +4866,36 @@ Partial Class Compras_eFacturas End Sub + Protected Sub GvTraslados_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvTraslados.RowCommand + Dim ImgBtn As LinkButton = DirectCast(e.CommandSource, LinkButton) + Dim GvRow As GridViewRow = DirectCast(ImgBtn.BindingContainer, GridViewRow) + Dim ObjDatos As New ClsCompras + Dim Correcto As Boolean = False + Select Case e.CommandName + Case "ValidarCFDi" + Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), 0) + If ObjValidacion.EsValida > 0 Then + If ObjValidacion.EsValida = 2 Then + Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion) + End If + Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) + Else + Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia) + End If + ObjValidacion.Dispose() + Case "ValidarCFD" + Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) + + Case "Omitir" + Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) + End Select + + ObjDatos.Dispose() + If Correcto Then + CargaDatos() + End If + End Sub Protected Sub LnkAgregarTraslado_Click(sender As Object, e As EventArgs)