-- =============================================
-- Author:		<Yonatan Gaete>
-- Create date: <06/03/2025>
-- Description:	<Cargar Pagos realizados en Punto de ventas>
-- =============================================
CREATE PROCEDURE sp_venPagosPvtPlanilla
(
	@codSII INT,
	@numinv INT
)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    SELECT 
		P.tipdoc,
		P.numdoc,
		P.tipopago,
		P.montopago,
		Fp.nompag
	FROM pvtPagos P 
	INNER JOIN cobFormasPago FP ON P.tipopago = FP.codpag
	WHERE P.tipdoc = @codSII
	AND P.numdoc = @numinv
END
GO
