[Home] [Help]
61: and g.expenditure_item_id = c.expenditure_item_id
62: and c.line_type = 'R'
63: and ei.system_linkage_function <> 'BTC' -- Put the correct code for system linkage function
64: and ei.project_id in ( select gbv.project_id
65: from gms_budget_versions gbv
66: where gbv.budget_type_code = 'AC'
67: and gbv.budget_status_code in ('S','W' )
68: and gbv.award_id = p_award_id );
69:
72: p_report_start_date IN DATE,
73: p_report_end_date IN DATE) IS
74: Select sum(nvl(bv.burden_cost,0))
75: FROM gms_cdl_burden_detail_v bv,
76: gms_budget_versions gbv
77: WHERE --added by rkuttiya for bug 9117372
78: -- bv.gl_date between p_report_start_date and p_report_end_date
79: trunc(bv.gl_date) < trunc(p_report_end_date)
80: and bv.award_id = p_award_id
107: and g.adl_status = 'A'
108: and c.line_type = 'R'
109: and nvl(ei.system_linkage_function,'XXX') <> 'BTC'
110: and ei.project_id in ( select gbv.project_id
111: from gms_budget_versions gbv
112: where gbv.budget_type_code = 'AC'
113: and gbv.budget_status_code in ('S','W' )
114: and gbv.award_id = p_award_id );
115:
145: p_report_start_date IN DATE,
146: p_report_end_date IN DATE) IS
147: SELECT sum(burdened_cost)
148: FROM (SELECT sum(nvl(GB.encumb_period_to_date,0) * decode(balance_type, 'PO', 1, 'AP' , 1, 'ENC' , 1, 0)) burdened_cost
149: FROM GMS_BALANCES GB, GMS_BUDGET_VERSIONS GBV
150: WHERE gb.award_id = p_award_id
151: AND GBV.award_id = GB.award_id
152: AND GBV.budget_version_id = gb.budget_version_id
153: AND GBV.current_flag in ('Y','R')
155: AND trunc(gb.start_date) <= trunc(p_report_end_date) -- added to get the cumulative commitments
156: GROUP BY GB.award_id
157: UNION ALL
158: SELECT sum((nvl(gbc.entered_dr,0)- nvl(gbc.entered_cr,0)) * decode(gbc.document_type,'PO',1,'AP',1,'ENC',1,0)) burdened_cost
159: FROM gms_bc_packets gbc, GMS_BUDGET_VERSIONS GBV
160: WHERE gbv.budget_version_id = gbc.budget_version_id
161: AND gbc.status_code = 'A'
162: AND GBV.budget_status_code = 'B'
163: AND GBV.current_flag in ('Y', 'R')