Modified by www.SourceFiles.app

This commit is contained in:
2026-08-07 04:48:28 +00:00
parent c4a800f793
commit 14406536f5
@@ -423,10 +423,10 @@ BEGIN
-- Step 5: scholarship funding, as a negative line. -- Step 5: scholarship funding, as a negative line.
FOR sch IN FOR sch IN
SELECT * FROM public.scholarships SELECT s2.* FROM public.scholarships s2
WHERE student_id = _student AND status = 'active' WHERE s2.student_id = _student AND s2.status = 'active'
AND funding_period_start <= _to AND s2.funding_period_start <= _to
AND (funding_period_end IS NULL OR funding_period_end >= _from) AND (s2.funding_period_end IS NULL OR s2.funding_period_end >= _from)
LOOP LOOP
qty := CASE sch.frequency qty := CASE sch.frequency
WHEN 'per_week' THEN period_weeks WHEN 'per_week' THEN period_weeks