agregando los cuatro campos de la tabla movimientos detalles
This commit is contained in:
@@ -216,18 +216,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
|
||||
<asp:TemplateField HeaderText="Serie">
|
||||
<asp:TemplateField HeaderText="Serie Paquete">
|
||||
<ItemTemplate>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Visible="false" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección Almacén">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -240,14 +240,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim AplicaSerie As String = ""
|
||||
If ErrorExistencias Then
|
||||
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
CveTipoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
||||
AplicaSerie = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie")
|
||||
BtnGuadarArmado.Visible = True
|
||||
End If
|
||||
|
||||
If CveTipoPS = 5 Then
|
||||
If AplicaSerie = "True" Then
|
||||
DivSeriesPaqueteArmado.Visible = True
|
||||
Dim Dt As New DataTable
|
||||
Dt.Columns.Add("Row", GetType(Integer))
|
||||
@@ -468,6 +469,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
||||
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
||||
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
||||
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
||||
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
||||
@@ -476,7 +480,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
|
||||
CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
@@ -488,7 +493,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero,
|
||||
Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
|
||||
FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
@@ -661,44 +668,44 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
'If Tipo = 1 Then
|
||||
|
||||
BtnGuadarArmado.Visible = False
|
||||
DivSeriesPaqueteArmado.Visible = False
|
||||
GvDatosArmado.Columns(4).Visible = False
|
||||
DivSeriesPaqueteArmado.Visible = False
|
||||
GvDatosArmado.Columns(4).Visible = False
|
||||
|
||||
LbPaqueteArmado.Text = ""
|
||||
CvePaqueteArmado = -1
|
||||
LbCantidadArmado.Text = ""
|
||||
LbAlmacenArmado.Text = ""
|
||||
CveAlmacenArmado = -1
|
||||
LbFechaArmado.Text = ""
|
||||
TxtObservacionesArmado.Text = ""
|
||||
UpGeneralesArmado.Update()
|
||||
LbPaqueteArmado.Text = ""
|
||||
CvePaqueteArmado = -1
|
||||
LbCantidadArmado.Text = ""
|
||||
LbAlmacenArmado.Text = ""
|
||||
CveAlmacenArmado = -1
|
||||
LbFechaArmado.Text = ""
|
||||
TxtObservacionesArmado.Text = ""
|
||||
UpGeneralesArmado.Update()
|
||||
|
||||
GvDatosArmado.DataBind()
|
||||
UpDatosArmado.Update()
|
||||
UpSeriesPaqueteArmado.Update()
|
||||
GvDatosArmado.DataBind()
|
||||
UpDatosArmado.Update()
|
||||
UpSeriesPaqueteArmado.Update()
|
||||
'Else
|
||||
|
||||
LbPaqueteDesarmado.Text = ""
|
||||
CvePaqueteDesarmado = -1
|
||||
LbCantidadDesarmado.Text = ""
|
||||
LbAlmacenDesarmado.Text = ""
|
||||
CveAlmacenDesarmado = -1
|
||||
LbFechaDesarmado.Text = ""
|
||||
TxtObservacionesDesarmado.Text = ""
|
||||
UpGeneralesDesarmado.Update()
|
||||
CvePaqueteDesarmado = -1
|
||||
LbCantidadDesarmado.Text = ""
|
||||
LbAlmacenDesarmado.Text = ""
|
||||
CveAlmacenDesarmado = -1
|
||||
LbFechaDesarmado.Text = ""
|
||||
TxtObservacionesDesarmado.Text = ""
|
||||
UpGeneralesDesarmado.Update()
|
||||
|
||||
BtnGuadarDesarmado.Visible = False
|
||||
TotalDesarmado.Visible = False
|
||||
BtnGuadarDesarmado.Visible = False
|
||||
TotalDesarmado.Visible = False
|
||||
|
||||
DtSeriesDesarmado.Clear()
|
||||
GvDatosDesarmado.Columns(4).Visible = False
|
||||
DivSeriesPaqueteDesarmado.Visible = False
|
||||
GvSeriesPaqueteDesarmado.DataBind()
|
||||
BtnAgregarSerieDesarmado.Enabled = True
|
||||
DtSeriesDesarmado.Clear()
|
||||
GvDatosDesarmado.Columns(4).Visible = False
|
||||
DivSeriesPaqueteDesarmado.Visible = False
|
||||
GvSeriesPaqueteDesarmado.DataBind()
|
||||
BtnAgregarSerieDesarmado.Enabled = True
|
||||
|
||||
LbTotalCalculado.Text = "0.00"
|
||||
LbTotalCalculado.Text = "0.00"
|
||||
|
||||
GvDatosDesarmado.DataBind()
|
||||
GvDatosDesarmado.DataBind()
|
||||
UpDatosDesarmado.Update()
|
||||
UpSeriesPaqueteDesarmado.Update()
|
||||
|
||||
@@ -730,6 +737,19 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
e.Row.FCButton("BtnSerie").Visible = False
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("AplicaSeccion") = "False" Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
|
||||
|
||||
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
||||
|
||||
e.Row.FCTextBox("TxtSerie").Visible = e.Row.DataKey("AplicaSerie") = "True"
|
||||
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
' e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
|
||||
Reference in New Issue
Block a user