Cambios de formatos de traspaso, carta porte,etc

This commit is contained in:
janeth arvizu
2019-09-06 12:52:53 -07:00
parent 4cd6edf2e8
commit ed4a6edab1
7 changed files with 235 additions and 71 deletions

View File

@@ -294,7 +294,8 @@
<th width="500px">Clasificación
<br />
Producto
</th>
</th>
<th width="100px">Observaciones</th>
<th style="width: 88px" runat="server" id="ThSerieLote" visible="false">Serie - Lote </th>
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
<th style="width: 88px" runat="server" id="ThBatch" visible="false">Batch</th>
@@ -330,6 +331,9 @@
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>
<asp:TextBox ID="TxtnObservaciones" CssClass="form-control input-sm" runat="server" Width="100px"></asp:TextBox>
</td>
<td runat="server" id="TdSerieLote" visible="false">
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
<asp:TextBox ID="TxtnSerieLote" Visible="false" runat="server" Width="80px"></asp:TextBox>
@@ -363,6 +367,7 @@
<%-- <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-Width="100px" />--%>
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="86px" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="500px" />
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="90px" />

View File

@@ -240,6 +240,7 @@ Partial Class Inventarios_TraspasoAlmacen
dt.Columns.Add("CvePS", Type.GetType("System.Int32"))
dt.Columns.Add("CveAF", Type.GetType("System.Int32"))
dt.Columns.Add("PS")
dt.Columns.Add("Observaciones")
dt.Columns.Add("SerieLote")
dt.Columns.Add("Lote")
dt.Columns.Add("Batch")
@@ -512,7 +513,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1"), If(TxtnLote.Visible, TxtnLote.Text, "-1"), If(TxtnBatch.Visible, TxtnBatch.Text, "-1"))
If Valido Then
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
End If
End If
@@ -537,7 +538,7 @@ Partial Class Inventarios_TraspasoAlmacen
Return Retorno
End Function
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "", Optional Lote As String = "", Optional Batch As String = "", Optional Limpia As Boolean = True)
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional SerieLote As String = "", Optional Lote As String = "", Optional Batch As String = "", Optional Limpia As Boolean = True)
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')")
@@ -557,6 +558,7 @@ Partial Class Inventarios_TraspasoAlmacen
registro.Item("UnidadMedida") = DrUM("UnidadMedida")
registro.Item("CvePS") = CvePS
registro.Item("PS") = DrPS("PSCodigo")
registro.Item("Observaciones") = Observaciones
registro.Item("SerieLote") = SerieLote
registro.Item("Lote") = Lote
registro.Item("Batch") = Batch
@@ -593,6 +595,7 @@ Partial Class Inventarios_TraspasoAlmacen
DdlClasificacion.SelectedValue = "-1"
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
txtCantidad.Text = ""
TxtnObservaciones.Text = ""
TxtnSerieLote.Text = ""
TxtnSerieLote.Visible = False
TxtnLote.Text = ""
@@ -759,7 +762,7 @@ Partial Class Inventarios_TraspasoAlmacen
Else
Dim Cont As Integer = 0
For Each Dr As DataRow In DtMovimientos.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, Observaciones:=Dr("Observaciones").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
@@ -794,7 +797,7 @@ Partial Class Inventarios_TraspasoAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim Cont As Integer = 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.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, Observaciones:=Dr("Observaciones").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For
@@ -1089,34 +1092,34 @@ Partial Class Inventarios_TraspasoAlmacen
TxtnSerieLote.Visible = False
ThSerieLote.Visible = False
TdSerieLote.Visible = False
GvDatos.Columns(4).Visible = False
GvDatos.Columns(5).Visible = False
TxtnLote.Visible = False
ThLote.Visible = False
TdLote.Visible = False
GvDatos.Columns(5).Visible = False
GvDatos.Columns(6).Visible = False
TxtnBatch.Visible = False
ThBatch.Visible = False
TdBatch.Visible = False
GvDatos.Columns(6).Visible = False
GvDatos.Columns(7).Visible = False
If DtTemp.MAX("SerieLote").ToString <> "" Then
TxtnSerieLote.Visible = True
ThSerieLote.Visible = True
TdSerieLote.Visible = True
GvDatos.Columns(4).Visible = True
GvDatos.Columns(5).Visible = True
End If
If DtTemp.MAX("Lote").ToString <> "" Then
TxtnLote.Visible = True
ThLote.Visible = True
TdLote.Visible = True
GvDatos.Columns(5).Visible = True
GvDatos.Columns(6).Visible = True
TxtnBatch.Visible = True
ThBatch.Visible = True
TdBatch.Visible = True
GvDatos.Columns(6).Visible = True
GvDatos.Columns(7).Visible = True
End If
End Sub