dapmsipd / pips

Public Investment Program System
1 stars 0 forks source link

Make the TOTAL PROJECT COST data field in General Info mirror the COMPUTED total cost in the matrix on Investment Cost per Funding Source (rather than as freehand) #206

Open mtayco opened 10 months ago

mtayco commented 10 months ago

PIPS_Total Cost to mirror computed Total Cost in Funding Source table

Encoders are required to provide an annual breakdown of their investment targets in the Investment Cost per Funding Source; we suggest that whatever will be automatically computed as the total cost ("TOTAL" column, which could be sum of all Funding Sources), should be automatically mirrored in the Data Field, "Total Project Cost (in absolute PHP)" found in the General Information section. This is to do away with the need for encoders to have to edit this data field every time they have to revise/ edit the annual breakdown in the Funding Source table.

mlab817 commented 10 months ago

The purpose of the total project cost field is to serve as reference in checking the breakdown by funding source and by region. If you allow it to be autocomputed instead you won't know which of the breakdown is correct or if any of them are correct.

mtayco commented 10 months ago

I'd rather it just mirrors the grand total in the Investment Cost by Funding Source. At the encoder level, they should not be able to submit the PAP if the Investment targets per funding source and the Investment targets by Region do not match.. Thus, after they harmonize the 2 tables, the Data Field on the Total Project Cost in General Information need only rely on the Grand Total of the Investment Target per funding source.

Or better yet, maybe do away with the total project cost field. As long as the figures in the Investment Targets per funding source and per region match, then that should suffice. Sa PIPOL wala naman nang Total Cost field, it just prompts encoders to ensure that the tables match.

Sa reviewer side kasi sa PIPS, may adjustments often na ginagawa sa mga targets during review/ checking, but wala kasing validation process sa account ng reviewer. So kahit nagedit na si reviewer (IPD) ng targets sa per funding source and per region, walang prompt na lumalabas that the Total Project cost field ay hindi naupdate.

Regards, MARICAR H. TAYCO Planning Officer Investment Programming Division Planning and Monitoring Service

Department of Agriculture Elliptical Road, Diliman, Quezon City 1100 www.da.gov.ph

CONFIDENTIALITY NOTICE: The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.

On Wed, Jan 24, 2024 at 10:21 AM Mark Lester Bolotaolo < @.***> wrote:

The purpose of the total project cost field is to serve as reference in checking the breakdown by funding source and by region. If you allow it to be autocomputed instead you won't know which of the breakdown is correct or if any of them are correct.

— Reply to this email directly, view it on GitHub https://github.com/dapmsipd/pips/issues/206#issuecomment-1907240408, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCFCQSATS5SMKGEDY3LNS6TYQBV2NAVCNFSM6AAAAABB2QEDKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBXGI2DANBQHA . You are receiving this because you authored the thread.Message ID: @.***>

mlab817 commented 9 months ago

Consistency =/= correctness

To illustrate:

sample total project cost: 9

sample regional breakdown:

region 2018 2019 2020 total
region 1 1 1 1 3
region 2 1 1 1 3
total 2 2 2 6

sample funding source breakdown:

region 2018 2019 2020 total
oda-loan 2 2 2 6
total 2 2 2 6

Since they match, the system will accept the inputs as correct. However, the true total project cost is 9 which means something is missing. A potentially correct breakdown would be:

correct sample regional breakdown:

region 2018 2019 2020 total
ncr 1 1 1 3
region 1 1 1 1 3
region 2 1 1 1 3
total 3 3 3 9

correct sample funding source breakdown:

region 2018 2019 2020 total
ng 1 1 1 3
oda-loan 2 2 2 6
total 3 3 3 9

The reason why it's there is to have a reference in case some records go missing in the database or other users (like Carole did) accidentally delete records. You wouldn't know about this if the total project cost is auto-computed and only the one who updated/deleted it would know (esp. if it's the reviewer that changed the records since they don't comply with validation rules).

Now, I think the problem is not with the encoders but the reviewers since the system prevents encoders from endorsing PAPs whose investment cost per funding source and per region do not match the total cost reported. The code responsible for this is:

// validate consistency of breakdowns with inputted total cost
if (totalCost != null) {
    // check if inputted total cost is not equal to investment per funding source grand total
    if (totalCost!.round() != fsInvestmentTotalRow.grandTotal.round()) {
      // add an issue if the two do not match
      issues
          .add('Total cost is not the same as breakdown per funding source.');
    }

    // check if inputted total cost is not equal to investment per region grand total
    if (totalCost!.round() != regionalInvestmentTotalRow.grandTotal.round()) {
      // add an issue if the two do not match
      issues.add('Total cost is not the same as breakdown per region.');
    }
}

Given this, my recommendations would be:

For your consideration.