--Autorizacion de anticipos
This commit is contained in:
@@ -1873,7 +1873,12 @@ Partial Class Clientes
|
||||
GVAnticiposHistorial.DataSource = Nothing
|
||||
DtAnticipoHistorial = Nothing
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
|
||||
GVAnticipos.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
GVAnticiposHistorial.DataBind()
|
||||
|
||||
@@ -1889,7 +1894,6 @@ Partial Class Clientes
|
||||
RegistraScript("OrdenarGVAnticiposHistorial();")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaOrdenesServiciosCliente()
|
||||
Dim ObjOS As New ClsOS
|
||||
@@ -2957,10 +2961,24 @@ Partial Class Clientes
|
||||
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
|
||||
If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString() = "Ant" Then
|
||||
If e.Row.DBCampo("AnticipoAutorizado").ToString() = "False" Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "R H"
|
||||
@@ -10691,6 +10709,31 @@ Partial Class Clientes
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkAutorizarAnticipo_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
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
End If
|
||||
End Using
|
||||
CargaAnticipos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
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
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
End If
|
||||
End Using
|
||||
CargaAnticipos()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user