CREATE PROC [dbo].[sp_ReceiptListingByDate]
(
	@DateFrom DATETIME
	,@DateTo DATETIME
)
AS

SELECT	*
FROM	v_ReceiptListing R
WHERE	LEFT(CONVERT(VARCHAR(50), R.PaymentDateTime, 120) , 10)  
			BETWEEN LEFT(CONVERT(VARCHAR(50), @DateFrom, 120) , 10) AND LEFT(CONVERT(VARCHAR(50), @DateTo, 120) , 10)
ORDER BY R.PaymentDateTime
		,R.ReceiptNumber
