Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -10759,17 +10759,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 anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", 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()
|
||||
@@ -10778,13 +10795,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 anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", 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
|
||||
|
||||
Reference in New Issue
Block a user