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
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
If DdlTipoDeposito.SelectedValue <> "8" Then
|
||||||
Dim FechaI, FechaF As Date
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
Dim FechaI, FechaF As Date
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
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
|
If DdlSubProyectos.SelectedValue.ToEntero > 0 Then
|
||||||
CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero
|
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
|
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
|
Else
|
||||||
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
|
'SI ES TRANSFERENCIA PERMITIR CERRAR
|
||||||
Respuesta = False
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
ObjMovtos.Dispose()
|
|
||||||
Else
|
Else
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user