SQL code behind Canned Project Budget Report
Client wants the sql code behind the Project Budget Report for a custom report
All versions of Enterprise ERP
SaaS, Tyler-hosted clients
OnPrem, Self-hosted clients
Project Budget
The code to report is derived
The following will is the query behind the report:
SELECT
a_project
, mt_seg2
, mt_seg3
, mt_seg4
, SUM(mt_original_bud) as Original
, SUM(mt_transfer_in) + SUM(mt_transfer_out) as NetBudget
, SUM(mt_original_bud) + SUM(mt_transfer_in) + SUM(mt_transfer_out) as Revised
, SUM(mt_actual_amount) + SUM(mt_unpaid_amount) as Actuals
, SUM(mt_unpaid_amount)
, SUM(mt_encumb) as Encumbrances
, SUM(mt_req_amount) as Requisitions
, (SUM(mt_original_bud) + SUM(mt_transfer_in) + SUM(mt_transfer_out)) - (SUM(mt_actual_amount) + SUM(mt_unpaid_amount)) - SUM(mt_encumb)-SUM(mt_req_amount) as Available
FROM pa_monthly_amounts
WHERE
mt_start_date >= @DTStart
AND mt_end_date <=@DTEnd
GROUP BY a_project , mt_seg2 , mt_seg3 , mt_seg4