
CREATE PROC [dbo].[sp_GetQuoteNoSales]

AS

DECLARE @quoteNo INT = 0

	SELECT	@quoteNo = IsNull(Max(invoiceNo), 0) + 1 
	FROM	pal_Sales
	WHERE	itemType = 'QT'


SELECT	@quoteNo AS QuoteNo

