Recepcion Almacen Bitacora recarga despues de guaraddo parcial

This commit is contained in:
rakcsle
2024-09-20 16:01:46 -07:00
parent afa2e0b2ec
commit 7a4c97573b
4 changed files with 372 additions and 67 deletions

View File

@@ -32,19 +32,37 @@ Partial Class Ventas_RepVentasUtilidadPadre
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
' GvDatos.Columns(3).Visible = False
' GvDatos.Columns(5).Visible = False
'End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
LnkModalPorcentajes.Visible = True
End If
CargaCombos()
End If
End Sub
Private Property SubProyectoConf As String
Get
If ViewState("SubProyectoConf") Is Nothing Then
ViewState("SubProyectoConf") = ""
End If
Return ViewState("SubProyectoConf").ToString
End Get
Set(value As String)
ViewState("SubProyectoConf") = value
End Set
End Property
#Region " INICIALIZA VALORES "
Private Sub CargaCombos()
TxtModalFechaInicio.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtModalFechaFin.Text = NowADS().LastDayOfMonth.ToShortDateString
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
@@ -108,6 +126,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
LblNeto.Text = "0"
LblPorNeto.Text = "0"
Dim LblSubProyectoConf As New Label
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoConf)
SubProyectoConf = LblSubProyectoConf.Text
End Sub
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -315,4 +339,42 @@ Partial Class Ventas_RepVentasUtilidadPadre
#End Region
Protected Sub LnkModalPorcentajes_Click(sender As Object, e As EventArgs)
GvPorcentajes.DataSource = Nothing
GvPorcentajes.DataBind()
UpModalPorcentajes.Update()
RegistraScript("$('#DivModalPorcetajes').modal(`show`);")
End Sub
Protected Sub BtnModalConsultaPorcentaje_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas()
Dim FechaI As Date = TxtModalFechaInicio.Text.ToDate
Dim FechaF As Date = TxtModalFechaFin.Text.ToDate
If TxtModalFechaInicio.Text = "" Then FechaI = MinFecha
If TxtModalFechaFin.Text = "" Then FechaF = MaxFecha
If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1) Then
GvPorcentajes.DataSource = ObjVentas.DtResultados.FiltraParametros($" CveVenta > 0 AND PorNeto <= {TxtModalPorcentaje.Text.ToDecimal} AND TipoDocto = 'Ing' AND CveEstatusFactura IN(2,3) ")
End If
ObjVentas.Dispose()
GvPorcentajes.DataBind()
ObjVentas.Dispose()
UpModalPorcentajes.Update()
End Sub
Protected Sub GvPorcentajes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(0).Text = SubProyectoConf
End If
End Sub
End Class