Dong Shin 08.29.2012

  • Bug Fixes
    • enabled Start FY editing on existing projects
    • added SQL Error panel to capture SQL errors for better trouble-shooting
    • disabled Invoice Pop-up when PM Actual is 0
    • set cut-off day of the month is 14th in setupModel.xml
    • fixed SQL error for non-admins on Project Mgmt
  • reinstalled Eclipse Juno and plug-ins – Subclipse 1.8 is not compatible with OS X
  • minor tweaks to VisibilityScripting4
    • made all debug panel always on top
    • sorted published names in PublishedDataPanel
    • expanded publishedFullNameCombo
  • created scripts under src/main/resources/scripts/ in VS4 project
    • to get Current Year Procurement data – Procurement_Data_Current_Year.py
    • to get Current Year RDT&E data – RDT&E_Data_Current_Year.py
    • to get Current Year O&M data – O&M_Data_Current_Year.py
    • to get 2012 O&M data – O&M_Data_2012.py
  • query to get O&M(FY10) data with Obligation/Outlay goals
    • SELECT p.uid as project_uid, p.project_number, p.title, c.appropriation, c.center_number, c.center_name, a.year, a.amount,
      o.type as type,
      IF(o.year_count = 1, month_1, 0) as Oct_2011,
      IF(o.year_count = 1, month_2, 0) as Nov_2011,
      IF(o.year_count = 1, month_3, 0) as Dec_2011,
      IF(o.year_count = 1, month_4, 0) as Jan_2012,
      IF(o.year_count = 1, month_5, 0) as Feb_2012,
      IF(o.year_count = 1, month_6, 0) as Mar_2012,
      IF(o.year_count = 1, month_7, 0) as Apr_2012,
      IF(o.year_count = 1, month_8, 0) as May_2012,
      IF(o.year_count = 1, month_9, 0) as Jun_2012,
      IF(o.year_count = 1, month_10, 0) as Jul_2012,
      IF(o.year_count = 1, month_11, 0) as Aug_2012,
      IF(o.year_count = 1, month_12, 0) as Sep_2012,
      IF(o.year_count = 2, month_1, 0) as Oct_2012,
      IF(o.year_count = 2, month_2, 0) as Nov_2012,
      IF(o.year_count = 2, month_3, 0) as Dec_2012,
      IF(o.year_count = 2, month_4, 0) as Jan_2013,
      IF(o.year_count = 2, month_5, 0) as Feb_2013,
      IF(o.year_count = 2, month_6, 0) as Mar_2013,
      IF(o.year_count = 2, month_7, 0) as Apr_2013,
      IF(o.year_count = 2, month_8, 0) as May_2013,
      IF(o.year_count = 2, month_9, 0) as Jun_2013,
      IF(o.year_count = 2, month_10, 0) as Jul_2013,
      IF(o.year_count = 2, month_11, 0) as Aug_2013,
      IF(o.year_count = 2, month_12, 0) as Sep_2013
      FROM `projects` p, budget_centers c, budget_amounts a, obligations_outlays o
      WHERE
      p.uid = 176
      AND p.uid = c.project_id
      AND c.uid = a.budget_center_id
      AND p.begin_year + a.year = 2013
      AND c.uid = o.funding_id
      AND o.year = 2012
      AND c.appropriation IN (SELECT type FROM appropriations WHERE duration = 2)
      GROUP BY o.type, c.uid
      UNION
      SELECT p.uid as project_uid, p.project_number, p.title, c.appropriation, c.center_number, c.center_name, a.year, a.amount,
      ‘Obligation Goal’ as type,
      a.amount * SUM(IF(g.year = 1, obligation_month_1, 0)) / 100 as Oct_2011,
      a.amount * SUM(IF(g.year = 1, obligation_month_2, 0)) / 100 as Nov_2011,
      a.amount * SUM(IF(g.year = 1, obligation_month_3, 0)) / 100 as Dec_2011,
      a.amount * SUM(IF(g.year = 1, obligation_month_4, 0)) / 100 as Jan_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_5, 0)) / 100 as Feb_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_6, 0)) / 100 as Mar_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_7, 0)) / 100 as Apr_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_8, 0)) / 100 as May_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_9, 0)) / 100 as Jun_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_10, 0)) / 100 as Jul_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_11, 0)) / 100 as Aug_2012,
      a.amount * SUM(IF(g.year = 1, obligation_month_12, 0)) / 100 as Sep_2012,
      a.amount * SUM(IF(g.year = 2, obligation_month_1, 0)) / 100 as Oct_2012,
      a.amount * SUM(IF(g.year = 2, obligation_month_2, 0)) / 100 as Nov_2012,
      a.amount * SUM(IF(g.year = 2, obligation_month_3, 0)) / 100 as Dec_2012,
      a.amount * SUM(IF(g.year = 2, obligation_month_4, 0)) / 100 as Jan_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_5, 0)) / 100 as Feb_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_6, 0)) / 100 as Mar_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_7, 0)) / 100 as Apr_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_8, 0)) / 100 as May_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_9, 0)) / 100 as Jun_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_10, 0)) / 100 as Jul_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_11, 0)) / 100 as Aug_2013,
      a.amount * SUM(IF(g.year = 2, obligation_month_12, 0)) / 100 as Sep_2013
      FROM `projects` p, budget_centers c, budget_amounts a, obligations_outlays_goals g
      WHERE
      p.uid = 176
      AND p.uid = c.project_id
      AND c.uid = a.budget_center_id
      AND p.begin_year + a.year = 2013
      AND g.appropriation = c.appropriation
      AND c.appropriation = ‘O&M (FY10)’
      GROUP BY c.uid
      UNION
      SELECT p.uid as project_uid, p.project_number, p.title, c.appropriation, c.center_number, c.center_name, a.year, a.amount,
      ‘Outlay Goal’ as type,
      a.amount * SUM(IF(g.year = 1, outlay_month_1, 0)) / 100 as Oct_2011,
      a.amount * SUM(IF(g.year = 1, outlay_month_2, 0)) / 100 as Nov_2011,
      a.amount * SUM(IF(g.year = 1, outlay_month_3, 0)) / 100 as Dec_2011,
      a.amount * SUM(IF(g.year = 1, outlay_month_4, 0)) / 100 as Jan_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_5, 0)) / 100 as Feb_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_6, 0)) / 100 as Mar_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_7, 0)) / 100 as Apr_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_8, 0)) / 100 as May_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_9, 0)) / 100 as Jun_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_10, 0)) / 100 as Jul_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_11, 0)) / 100 as Aug_2012,
      a.amount * SUM(IF(g.year = 1, outlay_month_12, 0)) / 100 as Sep_2012,
      a.amount * SUM(IF(g.year = 2, outlay_month_1, 0)) / 100 as Oct_2012,
      a.amount * SUM(IF(g.year = 2, outlay_month_2, 0)) / 100 as Nov_2012,
      a.amount * SUM(IF(g.year = 2, outlay_month_3, 0)) / 100 as Dec_2012,
      a.amount * SUM(IF(g.year = 2, outlay_month_4, 0)) / 100 as Jan_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_5, 0)) / 100 as Feb_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_6, 0)) / 100 as Mar_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_7, 0)) / 100 as Apr_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_8, 0)) / 100 as May_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_9, 0)) / 100 as Jun_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_10, 0)) / 100 as Jul_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_11, 0)) / 100 as Aug_2013,
      a.amount * SUM(IF(g.year = 2, outlay_month_12, 0)) / 100 as Sep_2013
      FROM `projects` p, budget_centers c, budget_amounts a, obligations_outlays_goals g
      WHERE
      p.uid = 176
      AND p.uid = c.project_id
      AND c.uid = a.budget_center_id
      AND p.begin_year + a.year = 2013
      AND g.appropriation = c.appropriation
      AND c.appropriation = ‘O&M (FY10)’
      GROUP BY c.uid

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.