--filtro por compuesto
This commit is contained in:
@@ -91,6 +91,13 @@
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TrCompuesto" visible="false">
|
||||
<td class="text-right"><b>Compuesto:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCompuesto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
@@ -130,11 +137,12 @@
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad Medida" />
|
||||
<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pte. Por Surtir" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
|
||||
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
|
||||
<asp:BoundField DataField="Compuesto" HeaderText="Compuesto" Visible="false"/>
|
||||
<%-- <asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/>
|
||||
<asp:BoundField DataField="ImportePromocion" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Promoción" DataFormatString="{0:N2}"/>--%>
|
||||
</Columns>
|
||||
|
||||
@@ -73,6 +73,9 @@ Partial Class Inventarios_Default
|
||||
DivEquivalentes.Visible = True
|
||||
DivPS.Visible = False
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
|
||||
TrCompuesto.Visible = True
|
||||
End If
|
||||
Dim Txt As String = IfNull(Request("Txt"), "").ToString
|
||||
If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt)
|
||||
|
||||
@@ -91,6 +94,8 @@ Partial Class Inventarios_Default
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
CargarDatosMedRin()
|
||||
CargaEquivalencia()
|
||||
ElseIf UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
|
||||
CargaDatosCompuesto()
|
||||
Else
|
||||
CargaDatos(DDlPS.SelectedValue.ToEntero, 1)
|
||||
End If
|
||||
@@ -107,9 +112,34 @@ Partial Class Inventarios_Default
|
||||
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
|
||||
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then
|
||||
CargaPS(CvePS)
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
GV.DataSource = ObjInventarios.DtResultados
|
||||
Else
|
||||
GV.DataSource = Nothing
|
||||
Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GV.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
|
||||
Else
|
||||
Alert("Seleccione un producto", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPS(CvePS As Integer)
|
||||
If CvePS <= 0 Then Exit Sub
|
||||
|
||||
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
TblBusqueda.Visible = True
|
||||
LtPs.Text = $"Producto: <b>{dr("PSCodigo").ToString}</b>"
|
||||
Dim CvePrecioLista As Integer = -1
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'sino manneja precios de lista
|
||||
@@ -148,31 +178,12 @@ Partial Class Inventarios_Default
|
||||
LtlIVAPorcentaje.Visible = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoPagina(624) Then
|
||||
HlPendiente.Visible = True
|
||||
HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
|
||||
End If
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
GV.DataSource = ObjInventarios.DtResultados
|
||||
Else
|
||||
GV.DataSource = Nothing
|
||||
Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GV.DataBind()
|
||||
|
||||
|
||||
|
||||
UPDatos.Update()
|
||||
TblBusqueda.Visible = True
|
||||
Else
|
||||
Alert("Seleccione un producto", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
@@ -199,7 +210,22 @@ Partial Class Inventarios_Default
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosCompuesto()
|
||||
Dim Compuesto As String = TxtCompuesto.Text.Trim
|
||||
If Compuesto = "" Then Compuesto = "-1"
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistencias119(DDlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, Compuesto) Then
|
||||
GV.DataSource = ObjInventarios.DtResultados
|
||||
TblBusqueda.Visible = False
|
||||
CargaPS(DDlPS.SelectedValue.ToEntero)
|
||||
GV.Columns(6).Visible = True
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
GV.DataBind()
|
||||
UPDatos.Update()
|
||||
DivMedRin.Visible = True
|
||||
End Sub
|
||||
|
||||
#Region " BUSCA | CODIGO - SERIE "
|
||||
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user