--ocultar solicitud de anticipo en ventas

This commit is contained in:
2025-01-20 19:40:16 -07:00
parent dae8be91a4
commit 30a493fc0a

View File

@@ -17219,7 +17219,7 @@ Partial Class Ventas
Private Sub CargaAnticipos(CveCliente As Integer)
Dim CargaAnticipos As Boolean = True
If UsuarioActual.CveEmpresa = 189 Then
CargaAnticipos = False
CargaAnticipos = UsuarioActual.TienePermisoProceso(406)
End If
HdnTieneAnticipos.Value = "0"
If CveCliente > 0 AndAlso CargaAnticipos Then
@@ -17463,11 +17463,11 @@ Partial Class Ventas
End If
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
End If
'If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
' e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
' e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
' e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
'End If
End If
If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = DdlMoneda.SelectedValue.ToEntero() Then
@@ -40467,6 +40467,17 @@ Partial Class Ventas
Next
End If
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal()
Dim ObjVta As New ClsVentas
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
Dim msgAlert = "La autorización se agregó correctamente."
Alert(msgAlert, TipoMensaje.ToastInformacionB)
End If
ObjVta.Dispose()
End Sub
#End Region