-- mejora visual al editar
This commit is contained in:
@@ -539,10 +539,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function isWhitFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
Protected Sub CreaDT()
|
||||
Dim dt As New DataTable
|
||||
@@ -603,16 +599,16 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
'Llenar el dropdownlist de Secciones
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
'If UsuarioActual.CveEmpresa = 66 Then
|
||||
' DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
'Else
|
||||
' Dim ObjClasificaciones As New ClsClasificaciones
|
||||
' If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
' DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
' End If
|
||||
' ObjClasificaciones.Dispose()
|
||||
'End If
|
||||
'DdlClasificacion.DataBind()
|
||||
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
@@ -1293,7 +1289,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarAgregar()
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
'DdlClasificacion.SelectedValue = "-1"
|
||||
txtCantidad.Text = ""
|
||||
TxtnLote.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
@@ -1459,7 +1455,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnLote.Text = ""
|
||||
LblCodigo.Text = ""
|
||||
TxtnSerie.Text = ""
|
||||
TxtnLote.Text = ""
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
@@ -2540,30 +2535,22 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtFolio.Text = Folio.ToString
|
||||
FolioAsignado = Folio
|
||||
End Sub
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
ChangeDdlProducto()
|
||||
End Sub
|
||||
'Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
' ChangeDdlProducto()
|
||||
'End Sub
|
||||
Private Sub ChangeDdlProducto()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
Dim filtro As String = ""
|
||||
If Not (DdlClasificacion.SelectedValue = "-1") Then
|
||||
|
||||
If isWhitFamily() Then
|
||||
filtro = String.Format("CveSubFamilia={0}", DdlClasificacion.SelectedValue)
|
||||
Else
|
||||
filtro = String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
||||
End If
|
||||
End If
|
||||
'If Not (DdlClasificacion.SelectedValue = "-1") Then
|
||||
' filtro = String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
||||
'End If
|
||||
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros($"{filtro} AND CveTipoPS = 2", "PSCodigo")
|
||||
DdlProducto2.DataBind()
|
||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
If isWhitFamily() Then
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.SelectedValue)
|
||||
Else
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
||||
End If
|
||||
'DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -2571,27 +2558,20 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ElProductoChange()
|
||||
End Sub
|
||||
Private Sub ElProductoChange()
|
||||
TxtnSerie.Visible = False
|
||||
divSerie.Visible = False
|
||||
|
||||
TxtnLote.Visible = False
|
||||
divSerie.Visible = False
|
||||
divLote.Visible = False
|
||||
|
||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
If CBool(dr("AplicaSerie")) Then
|
||||
|
||||
TxtnSerie.Visible = True
|
||||
divSerie.Visible = True
|
||||
|
||||
End If
|
||||
If CBool(dr("AplicaLote")) Then
|
||||
TxtnLote.Visible = True
|
||||
divLote.Visible = True
|
||||
|
||||
End If
|
||||
If CBool(dr("AplicaSeccion")) Then
|
||||
divSeccionAlmacen.Visible = True
|
||||
@@ -2604,7 +2584,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
If CBool(dr("AplicaCaducidad")) Then
|
||||
divCaducidad.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2628,7 +2607,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
'LblSerie.Visible = False
|
||||
TxtnSerie.Visible = False
|
||||
divSerie.Visible = False
|
||||
'TrSerieLote.Visible = False
|
||||
'TrSerieLote2.Visible = False
|
||||
|
||||
@@ -2641,16 +2620,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnSerie.Visible = True
|
||||
End If
|
||||
|
||||
TxtnLote.Visible = False
|
||||
'divLote.Visible = False
|
||||
'TrLote.Visible = False
|
||||
'TrLote2.Visible = False
|
||||
GvM.Columns(10).Visible = False
|
||||
|
||||
'TxtnBatch.Visible = False
|
||||
'TrBatch.Visible = False
|
||||
'TrBatch2.Visible = False
|
||||
'GvM.Columns(11).Visible = False
|
||||
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
tdPUExtranjero.Visible = False
|
||||
tdPUExtranjero2.Visible = False
|
||||
@@ -2724,12 +2698,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If (CveMovimiento > 0) Or (TieneRelacionado > 0 Or CveMovimientoRelacionado > 0) Then 'CveMovimiento > 0 And e.Row.DBCampo("TienePrePoliza").ToEntero > 0
|
||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
||||
e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||
e.Row.FCTextBox("TxtLote").Enabled = False
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||
'e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||
'e.Row.FCTextBox("TxtLote").Enabled = False
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False'
|
||||
End If
|
||||
e.Row.FCTextBox("TxtSerie").Enabled = True
|
||||
'e.Row.FCTextBox("TxtSerie").Enabled = True
|
||||
End If
|
||||
|
||||
If EsNuevoMov Then
|
||||
@@ -2795,7 +2768,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
txtCantidad.Enabled = False
|
||||
DdlClasificacion.Enabled = False
|
||||
'DdlClasificacion.Enabled = False
|
||||
DdlProducto2.Enabled = False
|
||||
DdlUnidad.Enabled = False
|
||||
|
||||
@@ -2808,7 +2781,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ElProductoChange()
|
||||
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
||||
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.ToString("0.00########")
|
||||
TxtnSerie.Text = GvRow.DataKey("Serie")
|
||||
TxtnLote.Text = GvRow.DataKey("Lote")
|
||||
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
|
||||
@@ -5313,7 +5286,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Private Sub limpiarModalDetalle()
|
||||
txtCantidad.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
'DdlClasificacion.Enabled = True
|
||||
DdlProducto2.Enabled = True
|
||||
DdlUnidad.Enabled = True
|
||||
divCantidad.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user