From 7c08cd489522abfdeb6a147c486890b487c21359 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 Aug 2020 11:16:09 -0700 Subject: [PATCH] -- seccion al registrar la salida de almacen --- AF/AF.aspx.vb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index f4cf2ee95..d5be1124a 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -105,6 +105,14 @@ Partial Class AF_AF Set(value As Integer) ViewState("AFInvCveAlmacen") = value End Set + End Property + Private Property AFInvCveSeccionAlmacen As Integer + Get + Return If(ViewState("AFInvCveSeccionAlmacen") Is Nothing, -1, ViewState("AFInvCveSeccionAlmacen").ToString.ToEntero()) + End Get + Set(value As Integer) + ViewState("AFInvCveSeccionAlmacen") = value + End Set End Property Private Property AFInvSerie As String Get @@ -2102,8 +2110,8 @@ Partial Class AF_AF If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero If CveUMInv > 0 Then - CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}") - If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie) Then + CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1") + If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then ErrorGuardar = True End If Else @@ -3051,6 +3059,7 @@ Partial Class AF_AF AFInvSerie = "" AFInvCvePS = -1 AFInvCveAlmacen = -1 + AFInvCveSeccionAlmacen = -1 Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("") If DrPS Is Nothing Then Exit Sub @@ -3076,6 +3085,7 @@ Partial Class AF_AF AFInvSerie = "" AFInvCvePS = -1 AFInvCveAlmacen = -1 + AFInvCveSeccionAlmacen = -1 Alert("No hay existencias suficientes del producto. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") @@ -3094,7 +3104,7 @@ Partial Class AF_AF AFInvCvePS = DdlAFInvPS.SelectedValue.ToEntero AFInvCveAlmacen = DdlAFInvAlmacen.SelectedValue.ToEntero - + AFInvCveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero RegistraScript("$('#ModalAFInv').modal('hide')", "hide") DivAFInvAdvertencia.Visible = True @@ -3652,12 +3662,12 @@ Partial Class AF_AF DivSeccion.Visible = CBool(drr("AplicaSeccion")) DdlSeccionAlmacen.Items.Clear() If CBool(drr("AplicaSeccion")) Then - CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) - 'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero) - 'DdlSeccionAlmacen.DataSource = dtt - 'DdlSeccionAlmacen.DataBind() + 'CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) + Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero) + DdlSeccionAlmacen.DataSource = dtt + DdlSeccionAlmacen.DataBind() - 'dtt.Dispose() + dtt.Dispose() End If