USE [Clinica]
GO
/****** Object:  View [Caja].[VWMovimientoCaja]    Script Date: 18-08-2025 21:40:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE   VIEW [Caja].[VWMovimientoCaja] AS
SELECT 
    mc.IdMovimientoCaja,
    mc.IdCicloCaja,
    mc.IdCaja,
    mc.IdTipoModalidadPago,
    mc.IdTipoCopago,
    mc.Monto,
    mc.FechaMovimiento,
    c.Descripcion AS Caja,
    mp.Descripcion AS TipoModalidadPago,
    tc.Descripcion AS TipoCopago
FROM 
    Clinica.Caja.MovimientoCaja mc
INNER JOIN 
    Clinica.Caja.Caja c ON mc.IdCaja = c.IdCaja
INNER JOIN 
    Clinica.Caja.CicloCaja cc ON mc.IdCicloCaja = cc.IdCicloCaja
INNER JOIN 
    Clinica.Caja.TipoModalidadPago mp ON mc.IdTipoModalidadPago = mp.IdTipoModalidadPago
INNER JOIN 
    Clinica.Caja.TipoCopago tc ON mc.IdTipoCopago = tc.IdTipoCopago;

GO
