-ajustes de secciones

This commit is contained in:
rrene
2020-07-24 18:50:28 -07:00
parent 080af0b7cb
commit 8b80d6c127
8 changed files with 61 additions and 37 deletions

View File

@@ -836,7 +836,7 @@ Partial Class Inventarios_Apartados
GvDatosDesapartado.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
GvDatosDesapartado.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
GvDatosDesapartado.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("AplicaSeccion") = "True"
GvDatosDesapartado.DataSource = DtTemp
GvDatosDesapartado.DataBind()

View File

@@ -21,20 +21,22 @@
}
.gvInventario tr td:nth-child(4) {
width: 18% !important;
width: 12% !important;
text-align: center !important;
}
.gvInventario tr th:nth-child(4) {
width: 18% !important;
width: 12% !important;
}
.gvEscondeColumna tr td:nth-child(3) {
display: none;
width:0px;
}
.gvEscondeColumna tr th:nth-child(3) {
display: none;
width:0px;
}
.btn.default:hover {
@@ -406,6 +408,12 @@
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
<div class="col-md-2 pull-right">
<div class="btn-group" style="float: right;">
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
</div>
</div>
<div class="col-md-4 pull-right">
<table style="float: right;">
<tr>
@@ -429,40 +437,32 @@
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<div class="col-md-12">
<div class="btn-group pull-right">
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
</div>
</div>
</div>
<%--GV DATOS--%>
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
<HeaderStyle Height="58px" />
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
<HeaderStyle Height="30px" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="5%" />
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
</asp:TemplateField>
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Cant. a Surtir" ItemStyle-Width="10%">
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="Cant. a Surtir" >
<ItemTemplate>
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF") %>'></asp:TextBox>
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
</ItemTemplate>
<HeaderStyle CssClass="Titulos" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate>
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>

View File

@@ -927,7 +927,7 @@ Partial Class Inventarios_EntregaAlmacen
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
Else
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero()
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
End If
End If

View File

@@ -168,9 +168,9 @@ Partial Class Inventarios_Kardex
TxtSerie.Text = ""
If ddlProducto2.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
If Dr IsNot Nothing Then
If Dr("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
If Dr("AplicaSerie").ToString = "True" Then
DivSerie.Visible = True
Else
DivSerie.Visible = False

View File

@@ -242,7 +242,7 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td runat="server" id="TrSeccion" visible="false">
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>

View File

@@ -275,8 +275,8 @@ Partial Class Inventarios_ResguardoMaterial
DdlAlmacenDestinoLiberacion.DataBind()
DdlAlmacenDestinoLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
DdlSeccionAlmacen.DataBind()
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
'DdlSeccionAlmacen.DataBind()
CargaPS()
End Sub
@@ -335,9 +335,11 @@ Partial Class Inventarios_ResguardoMaterial
End Sub
Private Sub VerificaProducto()
If DdlProducto2.SelectedValue.ToEntero > 0 Then
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
Dim drp As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
If drp IsNot Nothing Then
'activa Serie
If CBool(drp("AplicaSerie")) Then
ThSerie.Visible = True
@@ -349,6 +351,16 @@ Partial Class Inventarios_ResguardoMaterial
If CBool(drp("AplicaSeccion")) Then
ThSeccion.Visible = True
TrSeccion.Visible = True
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
DdlSeccionAlmacen.Items.Clear()
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
DdlSeccionAlmacen.DataSource = dtt
DdlSeccionAlmacen.DataBind()
If dtt.Rows.Count > 1 Then
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
dtt.Dispose()
End If
End If
'activa lote
If CBool(drp("AplicaLote")) Then
@@ -445,7 +457,7 @@ Partial Class Inventarios_ResguardoMaterial
registro.Item("Estatus") = ""
registro.Item("SeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedItem.Text, "")
registro.Item("Serie") = TxtnSerie.Text
registro.Item("Lote") = If(TxtLote.Text = "", "-1", TxtLote.Text)
registro.Item("Lote") = If(TxtLote.Text = "", "", TxtLote.Text)
registro.Item("FechaCaducidad") = If(TxtCaducidad.Text = "", MinFecha.ToString, TxtCaducidad.Text)
registro.Item("CveSeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
registro.Item("Observaciones") = TxtObservacionesdetalle.Text
@@ -823,10 +835,17 @@ Partial Class Inventarios_ResguardoMaterial
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
TieneError = True
Else
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim CveSeccionAlmacen As Integer = 0
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Else
CveSeccionAlmacen = -1
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero,
Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen,
Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
TieneError = True
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"

View File

@@ -2072,7 +2072,7 @@
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAlmacen" Width="50%" runat="server" CssClass="form-control select2me" DataValueField="CveAlmacen" DataTextField="Almacen" AppendDataBoundItems="true"></asp:DropDownList>
<asp:DropDownList ID="DdlAlmacen" Width="50%" runat="server" CssClass="form-control select2me" DataValueField="CveAlmacen" DataTextField="Almacen" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvAlmacen" runat="server" ControlToValidate="DdlAlmacen" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalSeccionAlmacen"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacen"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacen:</label>

View File

@@ -2558,10 +2558,6 @@ Partial Class ProductosyServicios
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
DdlAlmacen.DataBind()
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
DdlSeccionAlmacen.DataBind()
UpModalSeccionAlmacen.Update()
End Sub
@@ -2661,4 +2657,13 @@ Partial Class ProductosyServicios
UpSeccionAlmacen.Update()
End Sub
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlSeccionAlmacen.Items.Clear()
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
DdlSeccionAlmacen.DataBind()
UpModalSeccionAlmacen.Update()
End Sub
End Class