Resguardo material, permitir consultar con empresa 140

This commit is contained in:
rakcsle
2022-03-16 21:16:21 -07:00
parent 4af1707636
commit c1e871a0fb
7 changed files with 115 additions and 33 deletions

View File

@@ -635,29 +635,53 @@ Partial Class Inventarios_ResguardoMaterial
#Region " CARGA RESGUARDOS PARA LIBERACION "
Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs)
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not DdlPersonalLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 1 Then
Alert("Tiene que seleccionar un personal.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not DdlClienteLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 2 Then
Alert("Tiene que seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
Exit Sub
If UsuarioActual.CveEmpresa <> 140 Then
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not DdlPersonalLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 1 Then
Alert("Tiene que seleccionar un personal.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not DdlClienteLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 2 Then
Alert("Tiene que seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
CargaResguardos()
If UsuarioActual.CveEmpresa = 140 Then
If DdlProveedorLiberacion.SelectedValue.ToEntero <= 0 Or DdlPersonalLiberacion.SelectedValue.ToEntero <= 0 Or DdlClienteLiberacion.SelectedValue.ToEntero <= 0 Then
DVInformacionMoviminetoLiberacion.Visible = False
BtnGuardarLiberacion.Visible = False
Else
DVInformacionMoviminetoLiberacion.Visible = True
BtnGuardarLiberacion.Visible = True
End If
UpGenerales.Update()
End If
End Sub
Private Sub CargaResguardos()
Dim ObjInventario As New ClsInventarios()
Dim Existencias As Double = 0
If ObjInventario.GetMovimientosDetallePorPersonal(DdlPersonalLiberacion.SelectedValue.ToEntero, DdlAlmacenLiberacion.SelectedValue.ToEntero, DdlClienteLiberacion.SelectedValue.ToEntero, DdlProveedorLiberacion.SelectedValue.ToEntero) Then
If ObjInventario.GetMovimientosDetallePorPersonal(DdlPersonalLiberacion.SelectedValue.ToEntero, DdlAlmacenLiberacion.SelectedValue.ToEntero, DdlClienteLiberacion.SelectedValue.ToEntero, DdlProveedorLiberacion.SelectedValue.ToEntero, DdlTipo.SelectedValue.ToEntero) Then
DtMovimientosLiberacion = ObjInventario.DtResultados
DtMovimientosLiberacion.Columns("No").AutoIncrement = True