Office Reporting
Use these source surfaces to locate office-oriented procurement reporting and drill-down behavior:
- Office and PPMP selection:
imspr/novusoft/include/cgb/view/by-office.php - Office proforma list retrieval:
imspr/novusoft/include/proforma/custom/by-office.php - Account-scoped PR drill-down:
imspr/novusoft/include/account-report/custom/get-pr.phpandimspr/novusoft/include/account-report/view/pr-table.php - GSO aggregation and presentation:
imspr/novusoft/include/gso/custom/by-office.phpandimspr/novusoft/include/gso/view/by-office.php - Consolidation list preparation:
imspr/novusoft/include/consolidation/list-data.php
These files define reporting fragments and data bindings, but the retrieved evidence does not prove a route, caller, registration, client handler, authorization check, or observed execution for them.
Locate a reporting surface
[
{
"title": "Office and PPMP selection",
"body": "`imspr/novusoft/include/cgb/view/by-office.php` renders the supplied `$office_name` as an office heading followed by `- Account List`. Its `ppmp` select includes a `- Select PPMP -` placeholder and builds options from `$list`, using `dept-code` as the value and `dept-desc` as the label. The initially empty `account_list` element is the declared report-content target."
},
{
"title": "Office proforma list",
"body": "`imspr/novusoft/include/proforma/custom/by-office.php` reads `year` and `dept_id` from arranged request data and copies `office_name` into `$data['office_name']`. It assigns the branch result to `$data['list']`; the year-specific retrieval differences are compared below."
},
{
"title": "Account-scoped PR drill-down",
"body": "`imspr/novusoft/include/account-report/custom/get-pr.php` reads `account_code`, `year`, and `ppmp`. Its parameterized query selects from `tbl_bmct_pr_catalog`, retaining rows with `pr_status = 'APPROVED'`, `checked = 1`, the supplied account code, year, and department value. The query data is assigned to `$d['list']`, then passed to `account-report/view/pr-table.php`; the script sets `$data['success']` to `true`, stores the rendered view in `$data['table']`, and passes `$data` to `$_includeHelper::jsonexit`."
},
{
"title": "PR table presentation",
"body": "`imspr/novusoft/include/account-report/view/pr-table.php` renders a bordered, striped table with `PR No` and `Total` columns. Each record formats `pr_catalog_id` as `PR-` followed by a six-digit number, formats `total` to two decimal places, accumulates the total, and emits a final formatted total row."
},
{
"title": "GSO aggregation and view",
"body": "`imspr/novusoft/include/gso/custom/by-office.php` declares **getearmar**, which parameterizes account, year, and department values while summing `apv_total_price` for consolidated items (`b.consolidated = 1`) joined to their PR catalog records. `imspr/novusoft/include/gso/view/by-office.php` places `$table` in the `table_content` container, labels the panel `PPMP List`, and declares an `Export Excel` button with the `excel-export` class."
},
{
"title": "Consolidation list preparation",
"body": "`imspr/novusoft/include/consolidation/list-data.php` constructs `consolidate_table_temp` from consolidation records, department mappings and lookups, PPMP names, and an aggregate of non-deleted PR catalog items grouped by `consolidate_id`. The temporary rows include consolidation and transaction identifiers, PR-entry and control-number fields, year, department and PPMP labels, account fields, user and upload fields, position, mode, remarks, deletion state, and the aggregated `total`. The script calls `runQuery($temp_table)`, rewrites occurrences of ` consolidate ` in `$sql` to ` consolidate_table_temp `, and assigns `getResults($sql)` to `$results`; successful execution and result consumption are not established."
}
]
Compare proforma retrieval branches
| Branch | Source and retrieval | Department and status predicates | Result handling |
|---|---|---|---|
2023: if($year==2023) |
Queries PUB.\"annual-procurement\" joined to PUB.\"gso-dept\" and selects department description/code pairs. |
Interpolates $year and $dept_no into the SQL; requires approved = 1, groups by department code and description, and orders by department description. |
Uses new \\Libs\\Bmcdb and assigns get_results($sql,'prdb') to $data['list']. |
Other years: else |
Queries tbl_ppmp_consolidate joined to tbl_ppmp, selecting b.name as dept-desc and b.ppmp_id as dept-code. |
Uses query arguments for $year and explode(',',$dept_no), requires deleted = 0, groups by b.ppmp_id, and filters the supplied department collection. |
Converts the result with $_includeHelper::objectArrayToArray($list) before assigning $data['list']. |
Both branches restrict the account list to these nine explicit values:
5-02-03-090, 5-02-03-010, 5-02-03-070, 5-02-03-990, 5-02-03-080, 5-02-99-050, 5-02-12-020, 5-02-12-030, and 5-02-13-060.
Follow the source-proven handoffs
The diagram distinguishes exact bindings from relationships that have no proven caller or client bridge:
flowchart TD
p[`proforma/custom/by-office.php` `$data['list']`] -.->|different and unbridged| c[`cgb/view/by-office.php` `$list`]
c2[`cgb/view/by-office.php` `ppmp` selector`] -.->|different and unbridged| a[`account-report/custom/get-pr.php` `$postData['ppmp']`]
a -->|`$d['list']` to view| v[`account-report/view/pr-table.php` `$list`]
a -.->|`$data['table']` to `account_list`; bridge unproven| t[`cgb/view/by-office.php` `account_list`]
temp[`consolidation/list-data.php` `consolidate_table_temp`] -->|`runQuery`| r["temporary-table preparation call (execution unobserved)"]
r -->|`str_replace`| q[`rewritten `$sql``]
q -.->|`getResults($sql)`; consumer unresolved| z[`$results`]
[!WARNING] Do not treat these fragments as a verified, reachable reporting workflow. No owned source establishes a route, registered caller, client handler, or observed execution record. The files also show no office ownership, tenant, role, or authorization predicate for supplied office or department values, so reporting scope is unverified.
The 2023 proforma branch interpolates
$yearand$dept_nointo SQL, and the source shows no validation or allowlist for the supplied department expression. The non-2023 branch uses query arguments but likewise does not establish an ownership check. The GSOExport Excelbutton has no export handler in the owned view evidence, and the consolidation script does not establish where$sqloriginates or where$resultsis consumed.
Updated