-- activación de combo
This commit is contained in:
@@ -128,7 +128,17 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property SeleccionLoteCaducidadCombo As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("SeleccionLoteCaducidadCombo") Is Nothing Then
|
||||||
|
ViewState("SeleccionLoteCaducidadCombo") = False
|
||||||
|
End If
|
||||||
|
Return CType(ViewState("SeleccionLoteCaducidadCombo"), Boolean)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("SeleccionLoteCaducidadCombo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property TipoEstatus As Integer
|
Private Property TipoEstatus As Integer
|
||||||
Get
|
Get
|
||||||
@@ -631,18 +641,13 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
TipoEntrega = 1
|
TipoEntrega = 1
|
||||||
BtnGuardar.Visible = True
|
BtnGuardar.Visible = True
|
||||||
|
|
||||||
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)"
|
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,4, 26)"
|
||||||
If UsuarioActual.CveSubProyecto = 8804 Then
|
|
||||||
StrAlmacenes = "CveTipoAlmacen IN (1,2,12)"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
|
|
||||||
If ObjInventario.EntregaAlmacenGet(CveVenta, UsuarioActual.CveEmpresa, CveAlmacen) Then
|
If ObjInventario.EntregaAlmacenGet(CveVenta, UsuarioActual.CveEmpresa, CveAlmacen) Then
|
||||||
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
Dim CveVentaPadre As Integer = -1
|
Dim CveVentaPadre As Integer = -1
|
||||||
|
|
||||||
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
If ArchivoBitacora <> "" Then
|
If ArchivoBitacora <> "" Then
|
||||||
@@ -902,6 +907,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Case Else
|
Case Else
|
||||||
Filtro = "CveConcepto = 9"
|
Filtro = "CveConcepto = 9"
|
||||||
End Select
|
End Select
|
||||||
|
'condicion especial cuando es tipo uso de material
|
||||||
|
'CveTipoVenta
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(5, 6) AndAlso TipoDocto = "Ped" Then
|
||||||
|
Filtro = "CveConcepto = 8" 'salida del almacen de consigna
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjInventario.GetInv_Mov(CveVentaPadre, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetInv_Mov(CveVentaPadre, UsuarioActual.CveEmpresa) Then
|
||||||
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro} " & FiltroPS)
|
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro} " & FiltroPS)
|
||||||
@@ -1064,8 +1074,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Private Sub CargaGvDatos(Optional RecargaVenta As Boolean = True)
|
Private Sub CargaGvDatos(Optional RecargaVenta As Boolean = True)
|
||||||
|
|
||||||
If DtDatos IsNot Nothing Then
|
If DtDatos IsNot Nothing Then
|
||||||
|
|
||||||
|
|
||||||
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
|
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
|
||||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||||
AplicaSerie = CBool(DtDatos.MAX("AplicaSerie"))
|
AplicaSerie = CBool(DtDatos.MAX("AplicaSerie"))
|
||||||
@@ -1079,6 +1087,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If AplicaCaducidad Then GvDatos.Columns(10).Visible = True
|
If AplicaCaducidad Then GvDatos.Columns(10).Visible = True
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
SeleccionLoteCaducidadCombo = True
|
||||||
GvDatos.Columns(8).Visible = True
|
GvDatos.Columns(8).Visible = True
|
||||||
GvDatos.Columns(9).Visible = False
|
GvDatos.Columns(9).Visible = False
|
||||||
GvDatos.Columns(10).Visible = False
|
GvDatos.Columns(10).Visible = False
|
||||||
@@ -1285,7 +1294,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||||
Dim ValorAsignado As String = ""
|
Dim ValorAsignado As String = ""
|
||||||
Dim DtDatosDevolucion As DataTable = Nothing
|
Dim DtDatosDevolucion As DataTable = Nothing
|
||||||
If GvDatos.Columns(8).Visible AndAlso EsDevolucionVenta = 1 Then
|
If SeleccionLoteCaducidadCombo AndAlso EsDevolucionVenta = 1 Then
|
||||||
ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}"
|
ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}"
|
||||||
DtDatosDevolucion = DtDatos.Copy()
|
DtDatosDevolucion = DtDatos.Copy()
|
||||||
End If
|
End If
|
||||||
@@ -1308,8 +1317,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim Lote As String = ArrayCaducidad(0)
|
Dim Lote As String = ArrayCaducidad(0)
|
||||||
Dim FechaCaducidad As String = ArrayCaducidad(1)
|
Dim FechaCaducidad As String = ArrayCaducidad(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If AplicaLote Then
|
If AplicaLote Then
|
||||||
GvRow.FCTextBox("TxtLote").Text = Lote
|
GvRow.FCTextBox("TxtLote").Text = Lote
|
||||||
End If
|
End If
|
||||||
@@ -1317,7 +1324,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If AplicaCaducidad Then
|
If AplicaCaducidad Then
|
||||||
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
|
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1347,7 +1353,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(ValorAsignado) Then
|
If Not String.IsNullOrEmpty(ValorAsignado) Then
|
||||||
DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado)
|
DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado)
|
||||||
End If
|
End If
|
||||||
@@ -1867,6 +1872,15 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
Dim Existe As Boolean = False
|
Dim Existe As Boolean = False
|
||||||
Dim PSTemp As String = ""
|
Dim PSTemp As String = ""
|
||||||
|
'validación de impresión con CódigoQR, ej. ?CvePS=711820&Lote=220078&Fecha=04/07/2027
|
||||||
|
If TxtCodigoPS.Text.Trim.Contains("?CvePS") Then
|
||||||
|
Dim query As String = TxtCodigoPS.Text.Trim '"?CvePS=711820&Lote=220078&Fecha=04/07/2027"
|
||||||
|
Dim parsedQuery = HttpUtility.ParseQueryString(Query)
|
||||||
|
|
||||||
|
Dim tCvePS As String = parsedQuery("CvePS")
|
||||||
|
Dim tLote As String = parsedQuery("Lote")
|
||||||
|
Dim tFecha As String = parsedQuery("Fecha")
|
||||||
|
End If
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
||||||
@@ -2053,7 +2067,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(Gvr.DataKey("AplicaCaducidad")) Then
|
If CBool(Gvr.DataKey("AplicaCaducidad")) Then
|
||||||
If GvDatos.Columns(8).Visible Then
|
If SeleccionLoteCaducidadCombo Then
|
||||||
If String.IsNullOrEmpty(Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim()) OrElse Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim() = "|" Then
|
If String.IsNullOrEmpty(Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim()) OrElse Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim() = "|" Then
|
||||||
ValidaCaducidad = True
|
ValidaCaducidad = True
|
||||||
End If
|
End If
|
||||||
@@ -2065,7 +2079,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(Gvr.DataKey("AplicaLote")) Then
|
If CBool(Gvr.DataKey("AplicaLote")) Then
|
||||||
If GvDatos.Columns(8).Visible Then
|
If SeleccionLoteCaducidadCombo Then
|
||||||
If String.IsNullOrEmpty(Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim()) OrElse Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim() = "|" Then
|
If String.IsNullOrEmpty(Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim()) OrElse Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim() = "|" Then
|
||||||
ValidaLote = True
|
ValidaLote = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user