secciones
This commit is contained in:
@@ -284,11 +284,11 @@
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Sección" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
<%--<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -439,7 +439,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">Almacén destino:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlAlmacenDestinoLiberacion" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacenDestinoLiberacion" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvAlmacenDestinoLiberacion" Display="None" ValidationGroup="GrpGuardarLiberacion" runat="server" ControlToValidate="DdlAlmacenDestinoLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Almacén destino''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacenDestinoLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacenDestinoLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -473,7 +473,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpGridLiberacion" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMLiberacion" OnRowCreated="GvMLiberacion_RowCreated" OnRowDataBound="GvMLiberacion_RowDataBound" runat="server" GridLines="none" CssClass="table table-striped table-hover Widthall" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CveUM,CvePS,Serie,Observaciones,PU" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||
<asp:GridView ID="GvMLiberacion" OnRowCreated="GvMLiberacion_RowCreated" OnRowDataBound="GvMLiberacion_RowDataBound" runat="server" GridLines="none" CssClass="table table-striped table-hover Widthall" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CveUM,CvePS,Serie,Observaciones,PU,CveSeccionAlmacen,Lote,FechaCaducidad" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%-- <asp:BoundField HeaderText="Cant. Disponible" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
@@ -490,13 +490,15 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="20%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="20%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" ItemStyle-Width="20%" Visible="false"/>
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
xx
|
||||
<asp:DropDownlist ID="DdlSeccionAlmacen" runat="server" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="form-control input-sm select2me" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -582,6 +582,18 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLabel("LblCantidad").Text = e.Row.FCLabel("LblCantidad").Text.FormatoNumero(2)
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero > 0 Then
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
If dtt.Rows.Count = 0 Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
dtt.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -661,13 +673,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvMLiberacion()
|
||||
GvM.Columns(5).Visible = False
|
||||
For Each Dr As DataRow In DtMovimientosLiberacion.Rows
|
||||
If Dr("Serie").ToString <> "" Then
|
||||
GvM.Columns(5).Visible = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
GvMLiberacion.Columns(5).Visible = DtMovimientosLiberacion.MAX("Serie").ToString <> ""
|
||||
GvMLiberacion.Columns(6).Visible = DtMovimientosLiberacion.MAX("Lote").ToString <> ""
|
||||
GvMLiberacion.Columns(7).Visible = DtMovimientosLiberacion.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvMLiberacion.Columns(8).Visible = DtMovimientosLiberacion.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 Or DtMovimientosLiberacion.MAX("AplicaSeccion") = "True"
|
||||
|
||||
|
||||
GvMLiberacion.DataSource = DtMovimientosLiberacion
|
||||
GvMLiberacion.DataBind()
|
||||
@@ -863,6 +874,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
'SALIDA ORIGEN - RESGUARDO
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenLiberación, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveAlmacenDestino:=DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True)
|
||||
FolioSalida = ObjInventario.Folio
|
||||
Dim DiccionarioSecciones As New HybridDictionary
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
TieneError = True
|
||||
@@ -873,11 +885,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Cont As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvMLiberacion.Rows
|
||||
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Observaciones").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Observaciones:=Gvr.DataKey("Observaciones").ToString) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
|
||||
Else
|
||||
DiccionarioSecciones.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue)
|
||||
End If
|
||||
End If
|
||||
Cont += 1
|
||||
@@ -895,7 +908,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Cont = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
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, -1, Dr("Serie").ToString, Dr("Observaciones").ToString) Then
|
||||
Dim CveSeccionAlmacen As Integer = DiccionarioSecciones(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero
|
||||
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:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
@@ -1038,4 +1052,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DdlAlmacenDestinoLiberacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacenDestinoLiberacion.SelectedIndexChanged
|
||||
CargaResguardos()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user