Planned Capital and Planned Operating Cost not shown in the MUX Hierarchies
search cancel

Planned Capital and Planned Operating Cost not shown in the MUX Hierarchies

book

Article ID: 419744

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

  • The 'Hierarchies' module of the Modern UX is under use
  • 'Planned Capital Cost' and 'Planned Operating Cost' does not get shown under the 'Investment' tab of an Hierarchy instance
  • It does get displayed in the 'Financials' tab
  • These numbers are present in the individual investments itself.

Cause

  • Hierarchies 'Investment' tab gets data from fin_financials. A mismatch between fin_financials and fin_cost_plan_details.

Resolution

  • Make a small change in the Cost Plan Details, of the POR (Plan of Record)
  • This forces the application to sync fin_financials with fin_cost_plan_details
  • A query is provided below that can be used to check on mismatches between fin_financials and fin_cost_plan_details.

Additional Information

Postgres:

with q as(
    with num_at_cost_plans as
    (
        select
        ii.name inv_name,
        ii.code inv_code,
        fp.name plan_name,
        d.id detail_id,
        nk_sum_fct(d.odf_nk_cost, '2016-01-01'::date, '2027-01-01'::date) period_cost,
        nk_sum_total_fct(d.odf_nk_cost) total_cost
        from fin_cost_plan_details d
        join fin_plans fp on fp.id = d.plan_id
        join inv_investments ii on ii.id = fp.object_id
        where fp.is_plan_of_record = 1
        and fp.plan_type_code = 'FORECAST'
        order by d.last_updated_date desc
    ),
    num_at_inv as
    (
        select
        ii.name inv_name,
        ii.code inv_code,
        ff.odf_object_code inv_object_code,
        nk_sum_fct(ff.odf_nk_planned_cost, '2016-01-01'::date, '2027-01-01'::date) period_cost,
        nk_sum_total_fct(ff.odf_nk_planned_cost) total_cost
        from fin_financials ff
        join odf_object_instance_mapping ooim on ooim.secondary_object_instance_id = ff.id
        join inv_investments ii on ii.id = ooim.primary_object_instance_id
        order by ii.last_updated_date desc
    )
    select
    cp.inv_code,
    i.inv_object_code,
    sum(cp.period_cost) cost_plan_period_cost,
    sum(cp.total_cost) cost_plan_total_cost,
    i.period_cost inv_period_cost,
    i.total_cost inv_total_cost
    from num_at_cost_plans cp
    join num_at_inv i on cp.inv_code = i.inv_code
    --where cp.inv_code = 'PR2013'
    group by
    cp.inv_code,
    i.inv_object_code,
    i.period_cost,
    i.total_cost
)
select *
from q
where cost_plan_total_cost::integer != inv_total_cost::integer
;