1 En Depositos de caja, omitir validacion de que esten todos los cobros aplicados en caja, solo en la opcion de transferencias
This commit is contained in:
@@ -512,40 +512,46 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
Dim FechaI, FechaF As Date
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||
If DdlTipoDeposito.SelectedValue <> "8" Then
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
Dim FechaI, FechaF As Date
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
|
||||
If DdlSubProyectos.SelectedValue.ToEntero > 0 Then
|
||||
CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
Dim CveSubProyectoCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
|
||||
If CveSubProyectoCuenta > 0 Then
|
||||
CveSubProyecto = CveSubProyectoCuenta
|
||||
End If
|
||||
|
||||
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, CveSubProyecto, FechaI, FechaF, UsuarioActual.CveUsuario) Then
|
||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem') AND RemisionEspecial = 0")
|
||||
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
||||
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||
|
||||
If dtt.Rows.Count = 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("No se puede realizar el depósito, ya que hay cobros pendientes por aplicar.", TipoMensaje.MsgAdvertencia)
|
||||
If DdlSubProyectos.SelectedValue.ToEntero > 0 Then
|
||||
CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
Dim CveSubProyectoCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
|
||||
If CveSubProyectoCuenta > 0 Then
|
||||
CveSubProyecto = CveSubProyectoCuenta
|
||||
End If
|
||||
|
||||
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, CveSubProyecto, FechaI, FechaF, UsuarioActual.CveUsuario) Then
|
||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem') AND RemisionEspecial = 0")
|
||||
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
||||
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||
|
||||
If dtt.Rows.Count = 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("No se puede realizar el depósito, ya que hay cobros pendientes por aplicar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = False
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
Else
|
||||
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = False
|
||||
'SI ES TRANSFERENCIA PERMITIR CERRAR
|
||||
Respuesta = True
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user