From 1820877bc6ad9dc5f6f31eaacc900de3db155cee Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 15 May 2020 10:53:15 -0700 Subject: [PATCH] -- cambios Series,Lote,Caducidad --- Inventarios/Apartados.aspx | 8 +- Inventarios/Apartados.aspx.vb | 24 +- Inventarios/ConsignacionesMaterial.aspx.vb | 2 +- Inventarios/EntregaAlmacen.aspx | 9 +- Inventarios/EntregaAlmacen.aspx.vb | 69 +++--- Inventarios/KardexAlmacen.aspx.vb | 2 +- Inventarios/PaquetesArmadoDesarmado.aspx | 16 +- Inventarios/PaquetesArmadoDesarmado.aspx.vb | 40 ++-- Inventarios/RecepcionAlmacen.aspx.vb | 8 +- Inventarios/RecepcionUsados.aspx.vb | 42 ++-- Inventarios/RepApartados.aspx | 2 +- Inventarios/RepTraspasoAlmacen.aspx | 2 +- Inventarios/ResguardoMaterial.aspx | 14 +- Inventarios/ResguardoMaterial.aspx.vb | 38 ++-- Inventarios/TraspasoAlmacen.aspx | 35 +-- Inventarios/TraspasoAlmacen.aspx.vb | 237 +++++++++++--------- 16 files changed, 293 insertions(+), 255 deletions(-) diff --git a/Inventarios/Apartados.aspx b/Inventarios/Apartados.aspx index 37846e8bc..dc0fbdef7 100644 --- a/Inventarios/Apartados.aspx +++ b/Inventarios/Apartados.aspx @@ -222,7 +222,7 @@
- + @@ -234,7 +234,7 @@ - + ssss @@ -381,7 +381,7 @@
- + @@ -393,7 +393,7 @@ - + ssss diff --git a/Inventarios/Apartados.aspx.vb b/Inventarios/Apartados.aspx.vb index 867255d9a..faef671d2 100644 --- a/Inventarios/Apartados.aspx.vb +++ b/Inventarios/Apartados.aspx.vb @@ -446,14 +446,14 @@ Partial Class Inventarios_Apartados End If End Sub - Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1") As Boolean + Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean Dim Retorno = True Dim Inv As New ClsInventarios - Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=SerieLote) + Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Serie:=Serie) Inv.Dispose() - If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(SerieLote <> "-1", $" AND SerieLote = '{SerieLote}'", "")}") < 0 Then + If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}") < 0 Then If Existencia < 0 Then Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia) RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") @@ -541,12 +541,12 @@ Partial Class Inventarios_Apartados e.Row.FCTextBox("TxtCantidad2").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad"))) End If - If If(e.Row.DBCampo("SerieLote").ToString = "", "-1", e.Row.DBCampo("SerieLote").ToString) <> "-1" Then + If If(e.Row.DBCampo("Serie").ToString = "", "-1", e.Row.DBCampo("Serie").ToString) <> "-1" Then TxtnSerieLote.Visible = True ThSerieLote.Visible = True TdSerieLote.Visible = True GvDatos.Columns(4).Visible = True - e.Row.Cells(4).Text = e.Row.DBCampo("SerieLote").ToString + e.Row.Cells(4).Text = e.Row.DBCampo("Serie").ToString Else e.Row.Cells(4).Text = "" End If @@ -610,8 +610,8 @@ Partial Class Inventarios_Apartados If Not CargadoDeMov Then For Each dr As DataRow In DtMovimientos.Rows - Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(dr("SerieLote").ToString = "", "-1", dr("SerieLote").ToString)) - Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("SerieLote").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}") + Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Serie:=If(dr("Serie").ToString = "", "-1", dr("Serie").ToString)) + Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("Serie").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}") 'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero)) If Existencia < 0 Then @@ -623,7 +623,7 @@ Partial Class Inventarios_Apartados Next Else For Each gvr As GridViewRow In GvDatos.Rows - Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(gvr.DataKey("SerieLote").ToString = "", "-1", gvr.DataKey("SerieLote").ToString)) + Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Serie:=If(gvr.DataKey("Serie").ToString = "", "-1", gvr.DataKey("Serie").ToString)) Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero If Existencia < 0 Then ErrorExistencia = True @@ -666,7 +666,7 @@ Partial Class Inventarios_Apartados ErrorMovInv = True Else 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) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de salida" Exit For @@ -690,7 +690,7 @@ Partial Class Inventarios_Apartados Else If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then 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("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de entrada" Exit For @@ -896,7 +896,7 @@ Partial Class Inventarios_Apartados Else For Each Gvr As GridViewRow In GvDatosDesapartado.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("SerieLote").ToString, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero) 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, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de salida" Exit For @@ -918,7 +918,7 @@ Partial Class Inventarios_Apartados Else If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then 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("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then + 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, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de entrada" Exit For diff --git a/Inventarios/ConsignacionesMaterial.aspx.vb b/Inventarios/ConsignacionesMaterial.aspx.vb index 92caaee2d..77c1d9fe2 100644 --- a/Inventarios/ConsignacionesMaterial.aspx.vb +++ b/Inventarios/ConsignacionesMaterial.aspx.vb @@ -231,7 +231,7 @@ Partial Class Inventarios_ConsignacionesMaterial End Sub Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged - DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa) + DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) DdlSeccion.DataBind() DdlSeccion.Items.Insert(0, New ListItem("Seleccione Sección.", "-1")) UPEncabezado.Update() diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 549d8088d..e9e0c1115 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -453,17 +453,18 @@ - +
- + - + - + +
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index ef000a2d1..c9d121ee1 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -601,8 +601,8 @@ Partial Class Inventarios_EntregaAlmacen If Not DtDatos.Columns.Contains("CveSeccion") Then DtDatos.Columns.Add("CveSeccion", GetType(Integer)) End If - If Not DtDatos.Columns.Contains("Caducidad") Then - DtDatos.Columns.Add("Caducidad", GetType(Date)) + If Not DtDatos.Columns.Contains("FechaCaducidad") Then + DtDatos.Columns.Add("FechaCaducidad", GetType(Date)) End If If Not DtDatos.Columns.Contains("Seleccionado") Then DtDatos.Columns.Add("Seleccionado", GetType(Boolean)) @@ -611,9 +611,6 @@ Partial Class Inventarios_EntregaAlmacen DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double)) End If - For Each Dr As DataRow In DtDatos.Rows - Dr("Caducidad") = Now - Next 'TxtFecha.Text = If(EsDevolucionVenta = 1, Now.ToShortDateString, DtDatos.Rows(0)("Fecha").ToString) End If @@ -1001,7 +998,7 @@ Partial Class Inventarios_EntregaAlmacen If DtSerie.Rows.Count > 0 Then Dim Mensaje As New StringBuilder - Mensaje.AppendFormat("Serie / Lote Recomendado: {0}", DtSerie.Rows(0)("Serie")) + Mensaje.AppendFormat("Serie Recomendado: {0}", DtSerie.Rows(0)("Serie")) If AplicaCaducidad Then Mensaje.AppendFormat(", Caducicdad: {0}", DtSerie.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString) LbSerieRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString) Else @@ -1592,7 +1589,7 @@ Partial Class Inventarios_EntregaAlmacen If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal DtDatos.Rows(Index)("CveSeccion") = gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero - DtDatos.Rows(Index)("Caducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate + DtDatos.Rows(Index)("FechaCaducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate DtDatos.Rows(Index)("Lote") = gvr.FCTextBox("TxtLote").Text End If Index += 1 @@ -1651,10 +1648,10 @@ Partial Class Inventarios_EntregaAlmacen If CBool(Dr("AplicaSerie")) Then DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) For Each Dr1 As DataRow In DtDetalle.Rows - StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToShortDateString) + StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd")) Next Else - StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToShortDateString) + StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd")) End If End If Next @@ -1705,7 +1702,7 @@ Partial Class Inventarios_EntregaAlmacen DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) For Each Dr1 As DataRow In DtDetalle.Rows - If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows 'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO @@ -1734,7 +1731,7 @@ Partial Class Inventarios_EntregaAlmacen CantidadPendiente = 1 - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un Error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For @@ -1749,11 +1746,11 @@ Partial Class Inventarios_EntregaAlmacen If ErrorMovInv Then Exit For Next - ElseIf Dr("Inv_CveMetodoInventario").ToString = "6" Then + ElseIf CBool(Dr("AplicaLote")) Then DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) For Each Dr1 As DataRow In DtDetalle.Rows - If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then CantidadSaldo = Dr("CantidadGV").ToString.ToDecimal @@ -1784,7 +1781,7 @@ Partial Class Inventarios_EntregaAlmacen CantidadPendiente = If(Dr1("Cantidad").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("Cantidad").ToString.ToDecimal) - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Lote:=Dr1("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Lote:=Dr1("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For @@ -1802,7 +1799,7 @@ Partial Class Inventarios_EntregaAlmacen Else - If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then CantidadSaldo = Dr("CantidadGV").ToString.ToDecimal @@ -1837,7 +1834,7 @@ Partial Class Inventarios_EntregaAlmacen If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, - FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), + FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True @@ -1883,7 +1880,7 @@ Partial Class Inventarios_EntregaAlmacen If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For @@ -1981,7 +1978,7 @@ Partial Class Inventarios_EntregaAlmacen End If For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For @@ -2011,7 +2008,7 @@ Partial Class Inventarios_EntregaAlmacen PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND Serie = '{Dr1("Serie").ToString}'").ToString.ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") Exit For @@ -2020,10 +2017,10 @@ Partial Class Inventarios_EntregaAlmacen ElseIf DtDetalleLote.Rows.Count > 0 Then For Each Dr1 As DataRow In DtDetalleLote.Rows If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then - PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND SerieLote = '{Dr1("SerieLote").ToString}'").ToString.ToDecimal + PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND Serie = '{Dr1("Serie").ToString}'").ToString.ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") Exit For @@ -2034,7 +2031,7 @@ Partial Class Inventarios_EntregaAlmacen PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero}").ToString.ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.") Exit For @@ -2527,21 +2524,21 @@ Partial Class Inventarios_EntregaAlmacen 'VERIFICAR EXISTENCIA Dim StrXML As New StringBuilder + Dim Lote As String = "" + Dim FechaCaducidad As Date StrXML.Append("") For Each Dr As DataRow In DtDatos.Rows + FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString <> "", Dr("FechaCaducidad").ToString.ToDate, MinFecha) + Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1") + If Dr("CantidadGV").ToString.ToDecimal > 0 Then - If Dr("Inv_CveMetodoInventario").ToString = "5" Then + If CBool(Dr("AplicaSerie")) Then DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) For Each Dr1 As DataRow In DtDetalle.Rows - StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, Dr1("Serie")) - Next - ElseIf Dr("Inv_CveMetodoInventario").ToString = "6" Then - DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) - For Each Dr1 As DataRow In DtDetalle.Rows - StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), DtDatosDetalleLote.SUM("Cantidad", $"Lote = '{Dr1("Lote").ToString}' "), Dr1("Lote")) + StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("YYYY/MM/DD")) Next Else - StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), "-1") + StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("YYYY/MM/DD")) End If End If Next @@ -2581,7 +2578,7 @@ Partial Class Inventarios_EntregaAlmacen For Each Dr As DataRow In DtDatos.Rows DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec"))) DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec"))) - If DtDetalle.Rows.Count > 0 Then 'SI FUE POR SERIELOTE + If DtDetalle.Rows.Count > 0 Then 'SI FUE POR SERIE For Each Dr1 As DataRow In DtDetalle.Rows If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=-1, CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero) Then ErrorMovInv = True @@ -2875,7 +2872,7 @@ Partial Class Inventarios_EntregaAlmacen Row("CveSeccion") = GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero End If If GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text <> "" Then - Row("Caducidad") = GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text.ToDate + Row("FechaCaducidad") = GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text.ToDate End If index2 += 1 Next @@ -2934,8 +2931,8 @@ Partial Class Inventarios_EntregaAlmacen If Row("CveSeccion").ToString <> "" Then GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString End If - If Row("Caducidad").ToString <> "" Then - GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("Caducidad").ToString.ToDate.ToShortDateString + If Row("FechaCaducidad").ToString <> "" Then + GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("FechaCaducidad").ToString.ToDate.ToShortDateString End If index2 += 1 Next @@ -3022,7 +3019,7 @@ Partial Class Inventarios_EntregaAlmacen Dim Index = 1 For Each Dr As DataRow In DtDatosSugerencias.Rows Dr("Consec") = Index - 'Dr("Caducidad") = Now + Index += 1 Next @@ -3032,7 +3029,7 @@ Partial Class Inventarios_EntregaAlmacen GvSugerencias.Columns(2).Visible = DtDatosSugerencias.MAX("Seccion") <> "" GvSugerencias.Columns(3).Visible = DtDatosSugerencias.MAX("Serie") <> "" GvSugerencias.Columns(4).Visible = DtDatosSugerencias.MAX("Lote") <> "" - GvSugerencias.Columns(5).Visible = DtDatosSugerencias.MAX("Caducidad") <> "" + GvSugerencias.Columns(5).Visible = DtDatosSugerencias.MAX("FechaCaducidad") <> "" End If diff --git a/Inventarios/KardexAlmacen.aspx.vb b/Inventarios/KardexAlmacen.aspx.vb index e894daab8..70c9ebda8 100644 --- a/Inventarios/KardexAlmacen.aspx.vb +++ b/Inventarios/KardexAlmacen.aspx.vb @@ -13,7 +13,7 @@ Partial Class Inventarios_KardexAlmacen ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) 'If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 13, 66) Then - ' GvDatos.Columns(6).Visible = True ' SerieLote + ' GvDatos.Columns(7).Visible = True ' FCaducidad 'End If If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero) diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx b/Inventarios/PaquetesArmadoDesarmado.aspx index fd7f4be1d..b6b4271e3 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx +++ b/Inventarios/PaquetesArmadoDesarmado.aspx @@ -222,9 +222,9 @@ - + - + @@ -484,9 +484,9 @@ - + - +
@@ -558,15 +558,15 @@ Serie/Lote: - - - + + + - + diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb index 077c657b7..54ec0779b 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb +++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb @@ -470,13 +470,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then 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"), SerieLote:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then + 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 MensajeError = String.Format("El Producto {0} con Serie: {1} no tiene existencia suficiente", Dr("PS"), Dr("Serie")) TieneError = True Exit For End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, SerieLote:=Dr("Serie").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar." TieneError = True Exit For @@ -520,7 +520,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Dim DtSeriesComponentes As New DataTable For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows 'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, -1, SerieLote:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, -1, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then TieneError = True MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada" Exit For @@ -577,7 +577,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado If CveTipoPS = 5 Then For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows 'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, -1, SerieLote:=Gvr.DataKey("Serie").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, -1, Serie:=Gvr.DataKey("Serie").ToString) Then TieneError = True MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida" Exit For @@ -611,7 +611,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then 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.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1, SerieLote:=Dr("Serie").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1, Serie:=Dr("Serie").ToString) Then MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada. Por favor vuelva a intentar." TieneError = True Exit For @@ -805,11 +805,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Dim VariableCampoSerie = "" If TipoMovimiento = 1 Then Dim ObjInventarios As New ClsInventarios - If ObjInventarios.SerieLoteRecomendadoGet(CvePSSerieLote, UsuarioActual.CveEmpresa, If(TipoMovimiento = 1, CveAlmacenArmado, CveAlmacenDesarmado)) Then + If ObjInventarios.SerieRecomendadoGet(CvePSSerieLote, UsuarioActual.CveEmpresa, If(TipoMovimiento = 1, CveAlmacenArmado, CveAlmacenDesarmado)) Then DtSerieLote = ObjInventarios.DtResultados End If ObjInventarios.Dispose() - VariableCampoSerie = "SerieLote" + VariableCampoSerie = "Serie" Else DtSerieLote = If(DtExistenciasDesarmado IsNot Nothing, DtExistenciasDesarmado.Copy, Nothing) VariableCampoSerie = "SeriePS" @@ -835,12 +835,12 @@ Partial Class Inventarios_PaquetesArmadoDesarmado If DtSerieLote.Rows.Count > 0 Then Dim Mensaje As New StringBuilder Mensaje.AppendFormat("Serie / Lote Recomendado: {0}", DtSerieLote.Rows(0)(VariableCampoSerie)) - LbSerieLoteRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString) + LbSerieRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("Serie"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString) Else - LbSerieLoteRecomendado.Text = "No se encontro ningun Serie/Lote." + LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote." End If Else - LbSerieLoteRecomendado.Text = "No se encontro ningun Serie/Lote." + LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote." End If If DtSerieLote IsNot Nothing Then DtSerieLote.Dispose() UpSerie.Update() @@ -848,17 +848,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End Sub Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) - AgregaSerieLote(TxtSerieLote.Text.Trim, 1) + AgregaSerieLote(TxtSerie.Text.Trim, 1) End Sub - Private Sub AgregaSerieLote(SerieLote As String, Tipo As Integer) + Private Sub AgregaSerieLote(Serie As String, Tipo As Integer) - If SerieLote.Trim = "" Then + If Serie.Trim = "" Then Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Exit Sub End If - Dim SeriesArreglo = SerieLote.Split(";"c) + Dim SeriesArreglo = Serie.Split(";"c) 'VALIDACION DE SERIES DUPLICADAS Dim MensajeAlert As New StringBuilder @@ -897,7 +897,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado 'VERIFICA EXISTENCIAS Dim Existencia = 0.0D If TipoMovimiento = 1 Then - Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) + Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Else Existencia = If(DtExistenciasDesarmado Is Nothing, 0, DtExistenciasDesarmado.FiltraParametros($"CvePS={CvePSSerieLote} AND SeriePS='{Serie}'").Rows.Count.ToString.ToDecimal) End If @@ -931,7 +931,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado ObjInventarios.Dispose() If Tipo = 1 Then - TxtSerieLote.Text = "" + TxtSerie.Text = "" End If CargaSerie(2) @@ -988,20 +988,20 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End If End Sub Protected Sub BtnAgregarSerieDesarmado_Click(sender As Object, e As EventArgs) - Dim SerieLote = TxtSerieDesarmado.Text.Trim + Dim Serie = TxtSerieDesarmado.Text.Trim 'VERIFICA EXISTENCIAS Dim ObjInventarios As New ClsInventarios Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero - Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=LbFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) + Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=LbFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) If Existencia < 1 Then - Alert($"No hay existencia suficiente con la Serie definida ""{SerieLote}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia) + Alert($"No hay existencia suficiente con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") Exit Sub End If - If ObjInventarios.GetPaqueteRelacionSeries(CvePaqueteDesarmado, SerieLote) Then + If ObjInventarios.GetPaqueteRelacionSeries(CvePaqueteDesarmado, Serie) Then If DtExistenciasDesarmado Is Nothing Then DtExistenciasDesarmado = ObjInventarios.DtResultados.Copy Else diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 14eb25827..6ec6e2e25 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1612,7 +1612,7 @@ Partial Class Inventarios_RecepcionAlmacen End If If TipoMovimiento = 2 Then - If DtExistencias.SUM("Existencia", $"SerieLote = {Serie}") = 0 Then + If DtExistencias.SUM("Existencia", $"Serie = {Serie}") = 0 Then MensajeSinExistencias.Append($"Serie: {Serie}.
") Continue For End If @@ -2324,7 +2324,7 @@ Partial Class Inventarios_RecepcionAlmacen If Not ErrorMovInv AndAlso Dt IsNot Nothing Then For Each Dr As DataRow In Dt.FiltraParametros($"CveVenta={CveVenta}").Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True Exit For End If @@ -2385,12 +2385,12 @@ Partial Class Inventarios_RecepcionAlmacen Exit For End If - If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True Exit For End If - If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True Exit For End If diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 1145c7f0f..101e8490f 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -458,7 +458,7 @@ Partial Class Inventarios_RecepcionUsados dt.Columns.Add("CostoIndirecto", Type.GetType("System.Double")) dt.Columns.Add("CodigoAF") dt.Columns.Add("CveAF") - dt.Columns.Add("SerieLote", Type.GetType("System.String")) + dt.Columns.Add("Serie", Type.GetType("System.String")) dt.Columns.Add("Lote", Type.GetType("System.String")) dt.Columns.Add("Observaciones") @@ -860,9 +860,9 @@ Partial Class Inventarios_RecepcionUsados #End Region #Region " AGREGAR - GUARDAR " - Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double + Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double Dim Inv As New ClsInventarios - Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, FechaCaducidad:=FechaCaducidad) + Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Inv.Dispose() Return Existencia End Function @@ -884,7 +884,7 @@ Partial Class Inventarios_RecepcionUsados End If AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedItem.Text, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, PU, - "", "-1", "-1", "-1", TxtObservacionesdetalle.Text, "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", HdnCveTamaño.Value.ToEntero) + "", "-1", "-1", "-1", TxtObservacionesdetalle.Text, "", -1, "", "", HdnCveTamaño.Value.ToEntero) LimpiarAgregar() txtCantidad.Text = "" @@ -901,8 +901,8 @@ Partial Class Inventarios_RecepcionUsados End Sub - Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, SerieLote As String, CodigoAF As String, Codigo As String, - CveAF As String, Observaciones As String, Lote As String, Batch As String, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Tamaño As String, CveTamaño As Integer) + Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, + CveAF As String, Observaciones As String, Lote As String, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Tamaño As String, CveTamaño As Integer) 'If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub @@ -940,8 +940,8 @@ Partial Class Inventarios_RecepcionUsados End If 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS - If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then - Alert($"La serie indicada {SerieLote} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + If Serie <> "" And (Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then + Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -964,7 +964,7 @@ Partial Class Inventarios_RecepcionUsados registro.Item("CodigoAF") = CodigoAF registro.Item("Codigo") = Codigo registro.Item("CveAF") = CveAF - registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "") + registro.Item("Serie") = If(Serie <> "", Serie, "") registro.Item("Lote") = If(Lote <> "", Lote, "") registro.Item("Observaciones") = Observaciones @@ -1000,7 +1000,7 @@ Partial Class Inventarios_RecepcionUsados DtMovimientos.Rows(IndexDTUsado)("CodigoAF") = CodigoAF DtMovimientos.Rows(IndexDTUsado)("Codigo") = Codigo DtMovimientos.Rows(IndexDTUsado)("CveAF") = CveAF - DtMovimientos.Rows(IndexDTUsado)("SerieLote") = If(SerieLote <> "", SerieLote, "") + DtMovimientos.Rows(IndexDTUsado)("Serie") = If(Serie <> "", Serie, "") DtMovimientos.Rows(IndexDTUsado)("Lote") = If(Lote <> "", Lote, "") DtMovimientos.Rows(IndexDTUsado)("Observaciones") = Observaciones @@ -1121,7 +1121,7 @@ Partial Class Inventarios_RecepcionUsados ImporteConcepto = Dr("PU").ToString.ToDecimal End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then Mensaje = "Error al guardar los movimientos" ErrorMovInv = True Exit For @@ -1253,7 +1253,7 @@ Partial Class Inventarios_RecepcionUsados End Sub - Private Sub GuardaCodigoSerie(Cantidad As Double, CvePS As Integer, CveUM As Integer, CostoPromedio As Decimal, Optional SerieLote As String = "-1") + Private Sub GuardaCodigoSerie(Cantidad As Double, CvePS As Integer, CveUM As Integer, CostoPromedio As Decimal, Optional Serie As String = "-1") Dim ObjInv As New ClsInventarios If CveMovimiento <= 0 Then @@ -1261,7 +1261,7 @@ Partial Class Inventarios_RecepcionUsados -1, -1, -1, -1, Modulo:="RU/G") End If - ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote) + ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=Serie) ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable ObjInv.Dispose() @@ -1359,7 +1359,7 @@ Partial Class Inventarios_RecepcionUsados 'Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201) If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then - If DtTemp.MAX("SerieLote").ToString <> "" Then + If DtTemp.MAX("Serie").ToString <> "" Then End If If DtTemp.MAX("Lote").ToString <> "" Then @@ -1398,7 +1398,7 @@ Partial Class Inventarios_RecepcionUsados Dim Precio As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDouble Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero - Dim serielote As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerieLote").Text.Replace(" ", String.Empty) + Dim serie As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerie").Text.Replace(" ", String.Empty) Dim Observaciones As String = GvM.Rows(e.RowIndex).FCTextBox("TxtObservaciones").Text Dim CveSeccionAlmacen As Integer = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero Dim SeccionAlmacen As String = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedItem.Text @@ -1408,7 +1408,7 @@ Partial Class Inventarios_RecepcionUsados Drs(0)("PU") = Precio Drs(0)("Total") = Drs(0)("Cantidad").ToString.ToDouble * Precio Drs(0)("Estatus") = "U" - Drs(0)("SerieLote") = serielote + Drs(0)("Serie") = serie Drs(0)("Observaciones") = Observaciones Drs(0)("CveSeccionAlmacen") = CveSeccionAlmacen Drs(0)("SeccionAlmacen") = SeccionAlmacen @@ -1999,7 +1999,7 @@ Partial Class Inventarios_RecepcionUsados Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero() Dim PU As Double = RowUsado("PU").ToString().ToDouble() - AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño) + AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño) Next End If @@ -2150,7 +2150,7 @@ Partial Class Inventarios_RecepcionUsados Private Function AddPSRNC(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String, PU As Decimal, Descuento As Decimal, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, - Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, + Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D, Optional CveTamaño As Integer = 0) As Boolean @@ -2176,7 +2176,7 @@ Partial Class Inventarios_RecepcionUsados Row("Proyecto") = Proyecto Row("CveSubProyecto") = CveSubProyecto Row("SubProyecto") = SubProyecto - Row("SerieLote") = SerieLote + Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega Row("Orden") = TmpDT.Rows.Count + 1 Row("Cantidad") = Cantidad @@ -2293,7 +2293,7 @@ Partial Class Inventarios_RecepcionUsados TmpDT.Columns.Add("NoIdentificacion", GetType(String)) TmpDT.Columns.Add("CveTipoPS", GetType(Integer)) TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer)) - TmpDT.Columns.Add("SerieLote", GetType(String)) + TmpDT.Columns.Add("Serie", GetType(String)) TmpDT.Columns.Add("CuentaPredial", GetType(String)) TmpDT.Columns.Add("Obs", GetType(String)) TmpDT.Columns.Add("TiempoEntrega", GetType(String)) @@ -2763,7 +2763,7 @@ Partial Class Inventarios_RecepcionUsados drTamañoPS = ObjPS.DtResultados.FiltroPrimero("") 'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe, - "", "-1", "-1", "-1", "", "", "", -1, "", "", CveTamaño) + "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño) End If Else diff --git a/Inventarios/RepApartados.aspx b/Inventarios/RepApartados.aspx index 57ed9337b..6cb599ee9 100644 --- a/Inventarios/RepApartados.aspx +++ b/Inventarios/RepApartados.aspx @@ -102,7 +102,7 @@ - + diff --git a/Inventarios/RepTraspasoAlmacen.aspx b/Inventarios/RepTraspasoAlmacen.aspx index 2a68e5765..fb7c223f9 100644 --- a/Inventarios/RepTraspasoAlmacen.aspx +++ b/Inventarios/RepTraspasoAlmacen.aspx @@ -210,7 +210,7 @@ - + diff --git a/Inventarios/ResguardoMaterial.aspx b/Inventarios/ResguardoMaterial.aspx index b1085efd1..05c36bef0 100644 --- a/Inventarios/ResguardoMaterial.aspx +++ b/Inventarios/ResguardoMaterial.aspx @@ -208,7 +208,7 @@ Clasificación
Producto U.M. - Serie - Lote + Serie - Lote Observaciones @@ -238,8 +238,8 @@ - - + + @@ -263,13 +263,13 @@