export_report
Generate a computed takeoff report with per-condition quantities (gross/net), materials buy list, sheet subtotals, and scale provenance for pricing handoff.
Instructions
The computed Report document — "opentakeoff.report.v1", the same schema the canvas Report's JSON export writes. Everything a pricing consumer needs without re-implementing the app's math: per-condition quantities with waste and multiplier applied (gross and *_net), the computed materials BUY LIST per condition (order quantity = basis ÷ coverage rate, rounded up to whole purchase units) plus the project-wide roll-up summed by (name, unit), per-sheet BASE subtotals, scale provenance per sheet, and annotations. Contrast: export_takeoff is the raw canvas payload (materials as CONFIG rows, no computed quantities) and takeoff_summary strips materials for a compact reply — when the numbers are leaving for pricing, consume this. A report alone is HALF the deliverable: pair it with export_marked_pdf, because a takeoff is reviewed on marked drawings, not on numbers. Returned inline; pass path to also write it to disk as JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path to write the document to | |
| project_name | No | Label for the document's project_name field (a headless session has no project of its own; omitted → null) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rfis | Yes | ||
| units | Yes | ||
| schema | Yes | ||
| sheets | Yes | Scale provenance per sheet — how each scale was set | |
| totals | Yes | ||
| markups | Yes | ||
| by_label | Yes | ||
| by_sheet | Yes | BASE per-sheet subtotals — multiplier NOT applied, no waste, no materials | |
| materials | Yes | Project-wide buy list — condition rows summed by (name, unit) | |
| conditions | Yes | conditionTotals rows: gross + *_net quantities AND the computed materials buy list | |
| roll_goods | Yes | Roll-goods order rows (#136) — order_lf / rolls / order_qty per roll-goods condition, ×N applied; empty when no condition carries a roll_setup (always the case for a headless session today) | |
| project_name | Yes | ||
| shape_labels | Yes | ||
| display_units | Yes | ||
| generated_with | Yes | ||
| condition_columns | Yes |