-- seccion al registrar la salida de almacen
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user