diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 63a198a2d..598bfd446 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1261,13 +1261,14 @@ Partial Class Bancos_IE GvRH.DataBind() UpGvRH.Update() End Sub - Private Sub CargaCorteCaja() + Private Sub CargaCorteCaja(CveCuenta As Integer) 'Checar si hay un Turno Abierto Dim ObjPVenta As New ClsPuntoVenta - If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then - If ObjPVenta.DtResultados.Rows.Count > 0 Then - CveCorte = ObjPVenta.CveCorte - End If + + If ObjPVenta.GetCortesPorCuenta(CveCuenta, UsuarioActual.CveEmpresa) Then + + CveCorte = ObjPVenta.CveCorte + End If ObjPVenta.Dispose() End Sub @@ -1637,8 +1638,8 @@ Partial Class Bancos_IE End If 'PAGAR NC CON C.CH DEBE DESCONTAR EN EL CORTE - If UsuarioActual.TienePermisoProceso(160) AndAlso Opcion IsNot Nothing AndAlso Opcion = "DevDinV" AndAlso dr("CveTipoCuenta").ToString.ToEntero = 1 Then - CargaCorteCaja() + If Opcion IsNot Nothing AndAlso Opcion = "DevDinV" AndAlso dr("CveTipoCuenta").ToString.ToEntero = 1 Then + CargaCorteCaja(DdlCuenta.SelectedValue.ToEntero) End If If dr("UsaTarjeta").ToString = "True" Then