-- 0 Dejó de pedir autorizacion de aplicacion de anticipos. - poner bitácora de autorización. - una vez aplicado se pone estatus de bloqueado.

This commit is contained in:
2025-01-10 16:47:52 -07:00
parent 27938cf515
commit b48ca152d5
2 changed files with 98 additions and 9 deletions

View File

@@ -10764,17 +10764,34 @@ Partial Class Clientes
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
If CveVenta > 0 OrElse CveIE > 0 Then
Dim Actualizo As Boolean = False
Using ObjVentas As New ClsVentas
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
Alert("El anticipo se autorizó correctamente")
Actualizo = True
End If
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
Alert("El anticipo se autorizó correctamente")
Actualizo = True
End If
End If
End Using
If Actualizo Then
Dim ObjEventoBitacora As New ClsOIEventos
If ObjEventoBitacora.AddEventoBitacora($"El folio '{GvRow.DataKey("Folio")}' ha sido autorizado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
GvEB.DataSource = ObjEventoBitacora.DtResultados
End If
ObjEventoBitacora.Dispose()
GvEB.DataBind()
UPEventoBitacora.Update()
CargaEventoBitacora()
End If
End If
CargaAnticipos()
@@ -10783,13 +10800,38 @@ Partial Class Clientes
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
If CveVenta > 0 Then
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
If CveVenta > 0 OrElse CveIE > 0 Then
Dim Actualizo As Boolean = False
Using ObjVentas As New ClsVentas
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
Alert("El anticipo se desautorizó correctamente")
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
Alert("El anticipo se desautorizó correctamente")
Actualizo = True
End If
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
Alert("El anticipo se desautorizó correctamente")
Actualizo = True
End If
End If
End Using
CargaAnticipos()
If Actualizo Then
Dim ObjEventoBitacora As New ClsOIEventos
If ObjEventoBitacora.AddEventoBitacora($"El folio '{GvRow.DataKey("Folio")}' ha sido bloqueado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
GvEB.DataSource = ObjEventoBitacora.DtResultados
End If
ObjEventoBitacora.Dispose()
GvEB.DataBind()
UPEventoBitacora.Update()
CargaEventoBitacora()
End If
End If
End Sub
End Class