Skip to content

Overdue Contractor Summary

Jadestone only. Report code overdue_contractor_summary, added by INA27-290 (Done). Opens the documents_master print mode with type=overdue_contractor_summary; the dispatcher includes documents_master_handler_print_overdue_contractor_summary.php, 327 lines, on $pdo. A pivot: one row per discipline, one column per issued status, each cell the number of documents whose contractor deadline has passed and whose next expected submission is that status. Meant as the recap of Overdue Contractor, but it counts a narrower set, see below.

How this page was verified

Traced in ina-jadestone on 2026-09-08 against the ticket. Screenshot from inact-jadestone.eris.place on the production snapshot of 2026-09-07, project AAL-VS.

The filter form

Overdue Contractor Summary, the filter form: Project only
Overdue Contractor Summary, the filter form: Project only · click to enlarge

Project, then Preview or Excel (overdue_contractor_summary_download_as). No other filter.

The queries

  1. Disciplines of the project (ts_docdiscipline, by docdisc_id): the rows.
  2. Issued statuses of the project (ts_issued_status, by issued_id): the columns.
  3. The MDR rows of the project, in discipline, type, number order.
  4. The latest library row per document, as in Overdue Contractor: ts_documents without _R rows, highest doc_no wins.

No routing query and no ts_mdr_progress query: unlike the detail report, this one cannot see condition A (never submitted) or condition B (routing running).

What is counted

Project AAL-VS: disciplines down, issued statuses across, Grand Total on both edges. Empty cells print 0
Project AAL-VS: disciplines down, issued statuses across, Grand Total on both edges. Empty cells print 0 · click to enlarge

A document is counted once, in the cell (discipline of its MDR row, next_expected_id of its latest library row), when all of these hold:

TestColumn
it has a latest library row
that row has a return datedoc_appdate
that row has a next expected submissionnext_expected_id
today is past the return date plus 5 working dayshari_kerja(doc_appdate, 5, holidays), the same helper as the detail report
the next expected submission is one of the project's issued codesotherwise the document is dropped silently

So the summary counts condition C rows with a positive Days Overdue and a Next Submission only. The detail report also lists never-submitted documents, documents whose routing is still running, and returned documents still inside their five days, so its row count per discipline is larger than the Grand Total here. The ticket expected the two to match; they do not.

The Grand Total column sums a discipline's cells, the Grand Total row sums a column, and the corner is the total number of counted documents. A discipline code found on a counted document but missing from the discipline list is appended as an extra row under its raw code.

Known issues

  • The columns are the issued codes, not the free values the ticket described. overdueNormalizeNextSubmission() (merging IFC Cleansheet into IFC Clean sheet and so on) exists in the file but nothing calls it; the columns come from ts_issued_status and a next_expected_id outside that list is not counted anywhere.
  • Cells print 0, not blank, both in HTML and Excel, against the ticket's "empty cell" rule.
  • It is not the pivot of the detail report (see above), so the acceptance check "Grand Total equals the number of detail rows" fails by design.