-- seccion al registrar la salida de almacen
This commit is contained in:
@@ -105,6 +105,14 @@ Partial Class AF_AF
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("AFInvCveAlmacen") = value
|
ViewState("AFInvCveAlmacen") = value
|
||||||
End Set
|
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
|
End Property
|
||||||
Private Property AFInvSerie As String
|
Private Property AFInvSerie As String
|
||||||
Get
|
Get
|
||||||
@@ -2102,8 +2110,8 @@ Partial Class AF_AF
|
|||||||
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
|
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
|
||||||
Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero
|
Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero
|
||||||
If CveUMInv > 0 Then
|
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}")
|
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) Then
|
If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then
|
||||||
ErrorGuardar = True
|
ErrorGuardar = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -3051,6 +3059,7 @@ Partial Class AF_AF
|
|||||||
AFInvSerie = ""
|
AFInvSerie = ""
|
||||||
AFInvCvePS = -1
|
AFInvCvePS = -1
|
||||||
AFInvCveAlmacen = -1
|
AFInvCveAlmacen = -1
|
||||||
|
AFInvCveSeccionAlmacen = -1
|
||||||
|
|
||||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If DrPS Is Nothing Then Exit Sub
|
If DrPS Is Nothing Then Exit Sub
|
||||||
@@ -3076,6 +3085,7 @@ Partial Class AF_AF
|
|||||||
AFInvSerie = ""
|
AFInvSerie = ""
|
||||||
AFInvCvePS = -1
|
AFInvCvePS = -1
|
||||||
AFInvCveAlmacen = -1
|
AFInvCveAlmacen = -1
|
||||||
|
AFInvCveSeccionAlmacen = -1
|
||||||
|
|
||||||
Alert("No hay existencias suficientes del producto. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencias suficientes del producto. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -3094,7 +3104,7 @@ Partial Class AF_AF
|
|||||||
|
|
||||||
AFInvCvePS = DdlAFInvPS.SelectedValue.ToEntero
|
AFInvCvePS = DdlAFInvPS.SelectedValue.ToEntero
|
||||||
AFInvCveAlmacen = DdlAFInvAlmacen.SelectedValue.ToEntero
|
AFInvCveAlmacen = DdlAFInvAlmacen.SelectedValue.ToEntero
|
||||||
|
AFInvCveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||||
RegistraScript("$('#ModalAFInv').modal('hide')", "hide")
|
RegistraScript("$('#ModalAFInv').modal('hide')", "hide")
|
||||||
|
|
||||||
DivAFInvAdvertencia.Visible = True
|
DivAFInvAdvertencia.Visible = True
|
||||||
@@ -3652,12 +3662,12 @@ Partial Class AF_AF
|
|||||||
DivSeccion.Visible = CBool(drr("AplicaSeccion"))
|
DivSeccion.Visible = CBool(drr("AplicaSeccion"))
|
||||||
DdlSeccionAlmacen.Items.Clear()
|
DdlSeccionAlmacen.Items.Clear()
|
||||||
If CBool(drr("AplicaSeccion")) Then
|
If CBool(drr("AplicaSeccion")) Then
|
||||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
'CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero)
|
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero)
|
||||||
'DdlSeccionAlmacen.DataSource = dtt
|
DdlSeccionAlmacen.DataSource = dtt
|
||||||
'DdlSeccionAlmacen.DataBind()
|
DdlSeccionAlmacen.DataBind()
|
||||||
|
|
||||||
'dtt.Dispose()
|
dtt.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user