-- activar la validación de cfdi, para traslados
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user