-- cambios Series,Lote,Caducidad
This commit is contained in:
@@ -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 <b>{SerieLote}</b> 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 <b>{Serie}</b> 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
|
||||
|
||||
Reference in New Issue
Block a user