400: fnd_msg_pub.initialize;
401: l_version_id := get_final_version(p_proposal_id);
402:
403: --deleting previously precessed data
404: delete from igw_report_budget_base_rate
405: where p_proposal_form_number = p_proposal_form_number
406: and proposal_id = p_proposal_id
407: and version_id = l_version_id;
408:
444: if l_fiscal_end_date < rec_no_of_periods.end_date then
445: l_fiscal_year := null;
446: end if;
447:
448: insert into igw_report_budget_base_rate(proposal_id
449: ,version_id
450: ,budget_period_id
451: ,base_amount
452: ,rate_applied
479: , avg(base_amount)
480: into l_version_id
481: , l_rate_applied
482: , l_base_amount
483: from igw_report_budget_base_rate
484: where proposal_id = p_proposal_id
485: and proposal_form_number = p_proposal_form_number
486: group by proposal_id, version_id;
487:
484: where proposal_id = p_proposal_id
485: and proposal_form_number = p_proposal_form_number
486: group by proposal_id, version_id;
487:
488: insert into igw_report_budget_base_rate(proposal_id
489: ,version_id
490: ,budget_period_id
491: ,base_amount
492: ,rate_applied