PPMP Listings

PPMP listing behavior is split across management, department-selection, account-selection, item-search, and consolidation fragments. The available options depend on the supplied year, department or office, session-derived defaults, role branch, and approval predicates.

The retrieved sources contain no enclosing caller, registration, handler, or lifecycle boundary. The behavior below is therefore source-declared; runtime reachability, response delivery, and successful execution are not established.

PPMP option sources

Context Inputs and source Eligibility predicates Output behavior
PPMP management, non-admin branch dept, ppmp_year; imspr/novusoft/include/ppmp-management/custom/ppmp-list.php tbl_ppmp rows for the department and year where deleted = 0 and approved_1 = 0 Builds - Select - plus options keyed by ppmp_id and labeled with name. Sets No PPMP Record found when the result set is empty.
PPMP management, alternate role branch dept, ppmp_year; imspr/novusoft/include/ppmp-management/custom/ppmp-list.php tbl_ppmp rows for the department and year where deleted = 0; the approved_1 = 0 predicate is omitted Uses the same ppmp_id/name option format and empty-result message as the non-admin branch.
GSO PPMP selector year; optional office, otherwise session->dept; imspr/novusoft/include/gso/custom/get-ppmp-list.php Distinct dept-code values from PUB."annual-procurement" for the year, then matching tbl_dept_map rows where dept_id is the selected office and dept_no is in those codes Builds - Select PPMP -. Mapped rows become options keyed by dept_no and labeled with dept_desc. If annual-procurement rows exist but the map returns no rows, no explicit no-record marker replaces the default option.
New-PPMP selector year; optional office, otherwise session->dept; imspr/novusoft/include/new-ppmp/custom/get-ppmp-list.php Distinct annual-procurement dept-code values for the year where approved = 1, followed by the same office/session department mapping Builds mapped dept_no/dept_desc options. If either query produces no rows, assigns - No Record Available -; success is set true only when mapped rows exist.

The management fragment assigns its option HTML to res['option'] and contains an active jsonexit call. The GSO and new-PPMP department fragments also assign their option HTML and contain jsonexit calls, but this remains source-level evidence rather than proof that a screen invokes them.

Consolidated and standalone list views

[
    {
        "title": "Consolidated PPMP lookup and aggregation",
        "body": "imspr/novusoft/include/ppmp-consolidate/custom/ppmp-list-view.php takes the supplied id as ppmp_id and retrieves matching rows from tbl_ppmp_consolidate joined to tbl_ppmp. The first parent row supplies the displayed consolidated record. Its consolidate_id values constrain a second query over tbl_ppmp_catalog_item joined to tbl_ppmp_catalog; rows are grouped by item_code and ordered by category and subcategory. The fragment sums total and monthly quantities, then generates a table containing account, category, subcategory, item, quantity, unit, unit cost, total cost, procurement mode, and monthly quantity columns, followed by grand quantity and cost totals."
    },
    {
        "title": "Consolidated PPMP presentation",
        "body": "The generated table is stored as data['table'] and consumed by <?= $table ?> in imspr/novusoft/include/ppmp-consolidate/view/ppmp-list.php. The view also presents the PPMP entry number, date, creator, remarks, year, PPMP name, expense account, and mode of procurement. The custom fragment assigns rendered content to res['content'] and contains a source-level success response."
    },
    {
        "title": "Standalone PPMP presentation",
        "body": "imspr/novusoft/include/view-ppmp/view/ppmp-list.php consumes the supplied table variable and presents PPMP ID, date, creator, year, PPMP name, and remarks. This template does not establish how its supplied record or table was retrieved."
    }
]

Item and account selectors

[
    {
        "title": "PPMP management item search",
        "body": "imspr/novusoft/include/ppmp-management/custom/search-item.php calls cataloglocal with account_code, keyword, and the category, subcategory, and year values. Returned results are transformed into an item table; when no list is built, data['table'] is set to No Item Found. The fragment also stores itemlist and contains a source-level JSON response call."
    },
    {
        "title": "PR item-source dispatch",
        "body": "imspr/novusoft/include/pr/custom/search-item.php selects the ppmp data source when year equals 2023, passing department, account_code, keyword, year, and [1, dbm]. For other years it selects newppmp with department, account_code, keyword, year, and dbm. The returned results follow the same table-or-No Item Found pattern and the fragment contains a source-level JSON response call."
    },
    {
        "title": "GSO and proforma account options",
        "body": "imspr/novusoft/include/gso/custom/get-account-list.php and imspr/novusoft/include/proforma/custom/get-account-list.php each query distinct account descriptions and account codes from PUB.annual-procurement for the supplied year and department, ordered by account description. Each builds - Select Account - followed by options whose values are account codes and labels are account descriptions. Both fragments assign the option HTML to d['option']."
    }
]

[!WARNING] The selector fragments do not provide one uniform contract. The management query uses parameter placeholders for its department and year, while the GSO and new-PPMP department selectors interpolate the supplied year into SQL text, and the GSO and proforma account selectors interpolate year and department values. Validation or parameterization upstream or inside the database helpers is not established here. Treat those inputs as unresolved at this boundary.

In imspr/novusoft/include/ppmp-management/custom/ppmp-list.php, an empty ppmp_year assigns success = false and Please set PPMP year, but the source continues into the role-dependent query instead of returning immediately. Later processing may therefore replace or bypass that initial state.

Account options constructed by the GSO and proforma fragments are not emitted through the inspected response statement: both $_includeHelper::jsonexit($d) calls are commented out. Do not assume those fragments deliver account options to a caller.

Updated