CREATE PROCEDURE [dbo].[GA_FixAllotment] @FormatedStartDate CHAR(8), @FormatedEndDate CHAR(8)  AS
SET NOCOUNT ON
/*
DELETE FROM AllotmentLines WHERE (TotalChange-CurrentCount = 0) and (InitialCount = 0) and (CurrentCount = 0) -- Moved from ModifyAllotment to avoid locking
UPDATE AllotmentLines SET TotalChange=-(InitialCount-CurrentCount) WHERE DateStamp >= @FormatedStartDate AND DateStamp <= @FormatedEndDate AND (InitialCount+TotalChange-CurrentCount<0)   -- Moved from ReleaseAllotment routine
*/ -- currentcount is now read through AllotmentCurrentCount SP!






