SMS - 2024.02.22
This commit is contained in:
@@ -363,8 +363,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
GvDatosArmado.Columns(4).Visible = DtDatosArmado.MAX("AplicaSerie", "") = "True"
|
||||
GvDatosArmado.Columns(5).Visible = DtDatosArmado.MAX("AplicaSeccion") = "True"
|
||||
GvDatosArmado.Columns(6).Visible = DtDatosArmado.MAX("AplicaLote") = "True"
|
||||
GvDatosArmado.Columns(7).Visible = DtDatosArmado.MAX("AplicaCaducidad") = "True"
|
||||
GvDatosArmado.Columns(7).Visible = DtDatosArmado.MAX("AplicaLote") = "True"
|
||||
GvDatosArmado.Columns(8).Visible = DtDatosArmado.MAX("AplicaCaducidad") = "True"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
GvDatosArmado.Columns(6).Visible = True
|
||||
GvDatosArmado.Columns(7).Visible = False
|
||||
GvDatosArmado.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
'If ErrorExistencias Then
|
||||
' GvDatosArmado.Columns(4).Visible = False
|
||||
@@ -476,6 +483,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
GvDatosArmado.Columns(6).Visible = DtDatosDesArmado.MAX("AplicaLote") = "True"
|
||||
GvDatosArmado.Columns(7).Visible = DtDatosDesArmado.MAX("AplicaCaducidad") = "True"
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
GvDatosArmado.Columns(6).Visible = True
|
||||
GvDatosArmado.Columns(7).Visible = False
|
||||
GvDatosArmado.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
BtnGuadarDesarmado.Visible = True
|
||||
|
||||
TotalDesarmado.Visible = True
|
||||
@@ -534,21 +548,48 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
|
||||
Dim DdlCaducidadProducto As DropDownList = gvr.FCDropDownList("DdlCaducidadProducto")
|
||||
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
|
||||
Dim Lote As String = ArrayCaducidad(0)
|
||||
Dim FechaCaducidad As String = ArrayCaducidad(1)
|
||||
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If Lote = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If FechaCaducidad.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Case 2 ' DESARMADO
|
||||
@@ -645,6 +686,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
FechaCaducidad = If(CBool(GvRow.DataKey("AplicaCaducidad")) AndAlso GvRow.FCTextBox("TxtCaducidad").ToString().ToDate > MinFecha, GvRow.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha)
|
||||
Lote = If(CBool(GvRow.DataKey("AplicaLote")), GvRow.FCTextBox("TxtLote").Text.Trim, "-1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
|
||||
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
|
||||
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
|
||||
Lote = ArrayCaducidad(0)
|
||||
FechaCaducidad = ArrayCaducidad(1).ToDate
|
||||
|
||||
End If
|
||||
|
||||
Dim Existencia As Decimal = ObjInventarioVal.GetExistenciasPS(GvRow.DataKey("CvePS").ToEntero, GvRow.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenArmado.SelectedValue.ToEntero(), FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:="-1", Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||
|
||||
|
||||
@@ -750,6 +800,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
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)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
|
||||
Dim DdlCaducidadProducto As DropDownList = Gvr.FCDropDownList("DdlCaducidadProducto")
|
||||
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
|
||||
Lote = ArrayCaducidad(0)
|
||||
FechaCaducidad = ArrayCaducidad(1)
|
||||
|
||||
End If
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||
@@ -1134,10 +1194,64 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString()
|
||||
e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("Cantidad"), e.Row.FCButton("BtnDividir").ClientID))
|
||||
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||
|
||||
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlCaducidadProducto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, DropDownList)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim AplicaLote As Boolean = Boolean.Parse(GvRow.DataKey("AplicaLote"))
|
||||
Dim AplicaCaducidad As Boolean = Boolean.Parse(GvRow.DataKey("AplicaCaducidad"))
|
||||
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
|
||||
|
||||
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
|
||||
Dim Lote As String = ArrayCaducidad(0)
|
||||
Dim FechaCaducidad As String = ArrayCaducidad(1)
|
||||
|
||||
|
||||
|
||||
If AplicaLote Then
|
||||
GvRow.FCTextBox("TxtLote").Text = Lote
|
||||
End If
|
||||
|
||||
If AplicaCaducidad Then
|
||||
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
|
||||
End If
|
||||
|
||||
UpDatosArmado.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList)
|
||||
|
||||
Dim almacenes As String = DdlAlmacenArmado.SelectedValue
|
||||
If almacenes = "" Then
|
||||
almacenes = "-1"
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
|
||||
For Each dr As DataRow In ObjInventarios.DtResultados.Rows
|
||||
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
|
||||
Next
|
||||
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub Dividir(sender As Object, e As EventArgs)
|
||||
Dim index2 As Integer = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user