450:
451: -- Check that expenditure items exist for the group
452: DECLARE
453: cursor count_ei is
454: select count(*) from pa_expenditure_items
455: where expenditure_id in
456: (select expenditure_id from pa_expenditures
457: where expenditure_group = x_expenditure_group);
458: x_count NUMBER;
476: where expenditure_group = x_expenditure_group;
477:
478: cursor totals is
479: select sum(quantity)
480: from pa_expenditure_items
481: where expenditure_id in
482: (select expenditure_id from pa_expenditures
483: where expenditure_group = x_expenditure_group);
484:
515:
516: -- Make sure no quantities of null have been entered.
517: DECLARE
518: cursor null_qty is
519: select count(*) from pa_expenditure_items
520: where expenditure_id in (
521: select expenditure_id from pa_expenditures
522: where expenditure_group = x_expenditure_group )
523: and quantity is null ;