CartaPorte manual sea agrega peso
This commit is contained in:
@@ -456,6 +456,7 @@
|
||||
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
||||
<th style="width: 88px" runat="server" id="THPesoKG" visible="true">Peso KG</th>
|
||||
|
||||
<th width="160px">Comandos</th>
|
||||
</tr>
|
||||
@@ -511,14 +512,17 @@
|
||||
<asp:CheckBox ID="ChkSugiereFechaCaducidad" runat="server" Text="Auto Sugiere" ToolTip="Auto Sugiere Fecha de caducidad" AutoPostBack="true" OnCheckedChanged="ChkSugiereFechaCaducidad_CheckedChanged" />
|
||||
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
</td>
|
||||
<td align="center">
|
||||
<td runat="server" id="TDPesoKG">
|
||||
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm" Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off" ></asp:TextBox>
|
||||
</td>
|
||||
<td align="center" style="width:160px!important">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad,PesoKg" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign="Right">
|
||||
@@ -535,12 +539,14 @@
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="90px" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SeccionAlmacen") %>' ID="ltlSec"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Peso" DataField="PesoKg" ItemStyle-Width="90px" />
|
||||
<asp:TemplateField ItemStyle-Width="160px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -372,7 +372,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||
|
||||
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, "", CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, "", CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie, PesoKg:=TxtPesoKg.Text.ToDecimal)
|
||||
|
||||
|
||||
End If
|
||||
@@ -382,7 +382,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
|
||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1)
|
||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1, Optional PesoKg As Decimal = 0D)
|
||||
If Cantidad <= 0 Then
|
||||
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -426,7 +426,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
registro.Item("PorcentajeIVA") = 0
|
||||
registro("ClaveMaterialPeligroso") = DrPS("ClaveMaterialPeligroso")
|
||||
registro("ClaveEmbalaje") = DrPS("ClaveEmbalaje")
|
||||
registro("PesoKg") = DrPS("PesoKg")
|
||||
registro("PesoKg") = PesoKg
|
||||
|
||||
DtMovimientos.Rows.Add(registro)
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
@@ -456,6 +456,8 @@ Partial Class Inventarios_CartaPorteManual
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
|
||||
txtCantidad.Focus()
|
||||
TxtPesoKg.Text = ""
|
||||
|
||||
'If TxtCodigoPS.Visible Then
|
||||
' TxtCodigoPS.Focus()
|
||||
'End If
|
||||
@@ -567,7 +569,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
|
||||
For Each GvRowPS As GridViewRow In GvDatos.Rows
|
||||
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, GvRowPS.DataKey("CvePS").ToEntero, GvRowPS.DataKey("Cantidad").ToEntero, GvRowPS.DataKey("CveUM").ToEntero, UsuarioActual.CveUsuario) Then
|
||||
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, GvRowPS.DataKey("CvePS").ToEntero, GvRowPS.DataKey("Cantidad").ToEntero, GvRowPS.DataKey("CveUM").ToEntero, UsuarioActual.CveUsuario, PesoKg:=GvRowPS.DataKey("PesoKg").ToDecimal) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -630,31 +632,34 @@ Partial Class Inventarios_CartaPorteManual
|
||||
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
|
||||
If drP IsNot Nothing Then
|
||||
|
||||
ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion"))
|
||||
|
||||
|
||||
ThSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
TdSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
TxtnSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'ThSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'TdSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'TxtnSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie"))
|
||||
|
||||
|
||||
TxtnLote.Visible = CBool(drP("AplicaLote"))
|
||||
ThLote.Visible = CBool(drP("AplicaLote"))
|
||||
TdLote.Visible = CBool(drP("AplicaLote"))
|
||||
'TxtnLote.Visible = CBool(drP("AplicaLote"))
|
||||
'ThLote.Visible = CBool(drP("AplicaLote"))
|
||||
'TdLote.Visible = CBool(drP("AplicaLote"))
|
||||
'GvDatos.Columns(7).Visible = CBool(drP("AplicaLote"))
|
||||
|
||||
|
||||
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
||||
|
||||
|
||||
TxtPesoKg.Text = drP("PesoKg").ToString.ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -697,11 +702,11 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
|
||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
'GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
'GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
'GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
'GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
'GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user