mejoras visuales agregar ps
This commit is contained in:
@@ -1220,11 +1220,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
UppGrid.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCodigoBarras()
|
||||
If DdlConcepto.SelectedValue.ToEntero = 1 Then
|
||||
DivCodigoBarras.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1574,7 +1569,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||
registro.Item("SeccionAlmacen") = SeccionAlmacen
|
||||
|
||||
|
||||
registro.Item("CodigoAF") = CodigoAF
|
||||
registro.Item("Codigo") = Codigo
|
||||
registro.Item("CveAF") = CveAF
|
||||
@@ -2210,98 +2204,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ADD INVENTARIO INICIAL "
|
||||
Protected Sub BtnCodigoBarras_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If TxtCodigoBarras.Text = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras= '{TxtCodigoBarras.Text}'")
|
||||
If DrPS Is Nothing Then
|
||||
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoBarras.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
TxtCodigoBarras.Text = ""
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
TdSeriePS.Visible = True
|
||||
TxtCodigoSerie.Focus()
|
||||
CvePSSerieLote = DrPS("CvePS").ToString.ToEntero
|
||||
CveUMSerieLote = DrPS("CveUnidadMedida").ToString.ToEntero
|
||||
CostoPromedioSerieLote = DrPS("CostoPromedio").ToString.ToDecimal
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
GuardaCodigoSerie(TxtCantidadProducto.Text.ToDecimal, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero, DrPS("CostoPromedio").ToString.ToDecimal)
|
||||
|
||||
TxtCodigoBarras.Text = ""
|
||||
TxtCodigoBarras.Focus()
|
||||
End Sub
|
||||
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||
If TxtCodigoSerie.Text.Trim = "" Then TxtCodigoSerie.Focus() : Exit Sub
|
||||
|
||||
GuardaCodigoSerie(1, CvePSSerieLote, CveUMSerieLote, CostoPromedioSerieLote, TxtCodigoSerie.Text.Trim)
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
End Sub
|
||||
Public Sub BtnAddCodigo_Click(sender As Object, e As EventArgs) Handles BtnAddCodigo.Click
|
||||
|
||||
If TxtCodigo.Text.Trim = "" And TxtCodigoBarras.Text.Trim = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim DrP As DataRow = Nothing
|
||||
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then
|
||||
DrP = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($" Codigo = '{TxtCodigo.Text.Trim}'")
|
||||
ElseIf TxtCodigoBarras.Text.Trim <> String.Empty Then
|
||||
DrP = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($" CodigoBarras = '{TxtCodigoBarras.Text.Trim}'")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim Costo As Decimal = TxtAltaCosto.Text.ToDecimal
|
||||
|
||||
If DrP IsNot Nothing AndAlso DrP("CvePS").ToString.ToEntero > 0 Then
|
||||
GuardaCodigoSerie(TxtCantidadProducto.Text.ToDecimal, DrP("CvePS").ToString.ToEntero, DrP("CveUnidadMedida").ToString.ToEntero, Costo)
|
||||
Else
|
||||
Alert("No se encontró el producto. Favor de verificar y volver a intentar.", TipoMensaje.MsgError, "window.setTimeout(Focus2,200);")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GuardaCodigoSerie(Cantidad As Decimal, CvePS As Integer, CveUM As Integer, CostoPromedio As Decimal, Optional SerieLote As String = "-1")
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If CveMovimiento <= 0 Then
|
||||
CveMovimiento = ObjInv.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, TxtFecha.Text.Replace(",", "").ToDate, TxtFolio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="ES/CS1")
|
||||
End If
|
||||
|
||||
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote)
|
||||
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
||||
ObjInv.Dispose()
|
||||
|
||||
CargaGVM(DtMovimientos)
|
||||
|
||||
TxtCodigoBarras.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
TxtCodigoSerie.Text = ""
|
||||
TxtCantidadProducto.Text = "1"
|
||||
|
||||
txtCantidad.Text = ""
|
||||
LblCodigo.Text = ""
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
|
||||
TxtCodigoBarras.Focus()
|
||||
RegistraScript("beep-07.wav')")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " DdlConcepto, DdlClasificacion, DdlAlmacen | Index CHANGED "
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -2459,7 +2361,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If CveMovimiento <= 0 Or EsNuevoMov Then SiguienteFolio()
|
||||
Dim CveConcepto As String = DdlConcepto.SelectedValue
|
||||
|
||||
DivCodigoBarras.Visible = False
|
||||
TxtFecha.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
|
||||
@@ -2471,8 +2372,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Select Case CveConcepto
|
||||
Case "1", "2", "22", "32", "33" ' ENTRADAS
|
||||
DivCodigoBarras.Visible = True
|
||||
TxtCodigoBarras.Focus()
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
@@ -2519,7 +2418,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlProveedor.DataBind()
|
||||
|
||||
Case Else
|
||||
DivCodigoBarras.Visible = False
|
||||
TrSubProyectoActivoFijo.Visible = False
|
||||
VisualizaAF(False)
|
||||
If GvM.Rows.Count > 0 Then GvM.FooterRow.Visible = True
|
||||
@@ -2527,7 +2425,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TrResponsable.Visible = False
|
||||
End Select
|
||||
|
||||
UpCodigoBarras.Update()
|
||||
UppGrid.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -2612,12 +2509,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -3385,7 +3281,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If TxtCodigoPS.Text.Trim = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
TdSeriePS.Visible = False
|
||||
TdSeccionPSAdd.Visible = False
|
||||
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras= '{TxtCodigoPS.Text}'")
|
||||
|
||||
Reference in New Issue
Block a user