Expand description
Bills of materials: single-level editing, multi-level expansion with revision rules, mass/cost roll-up, CSV and Excel export and cycle prevention.
Structs§
- BomLine
Update - BomNode
- BomTree
- Flat
BomRow - One row of the flattened (indented) BOM, used by the UI and CSV export.
- NewBom
Line - Resolved
Revision - The revision chosen for a BOM line under the active revision rule.
- View
Options - What the BOM page shows of the expanded structure (the totals always cover all of it).
- ViewRow
- One row of the BOM page.
Functions§
- add
- Adds a BOM line to an in-work revision.
- flatten
- Flattens the tree into display rows (depth first).
- line
- A BOM line of a parent the actor may read (hidden child = placeholder).
- lines
- Single-level BOM of a revision the actor may read, ordered by find number. Lines to children the actor may not see are placeholders.
- project_
codes - Codes of the project groups of the given ids (for display; the caller passes ids of lines the reader may see).
- remove
- Removes a BOM line from an in-work revision.
- to_csv
- Exports the expanded BOM as CSV (comma separated, UTF-8).
- to_xlsx
- Exports the expanded BOM as Excel workbook: the CSV columns, item numbers indented by level, header row frozen and filterable.
- tree
- Expands the full multi-level BOM below a revision the actor may read.
Hidden children are placeholder leaves; the roll-ups leave them out and
say so (
restricted_lines,rollup_incomplete). - tree_
projects - The distinct project groups of the lines of an expanded structure.
- tree_
revision_ ids - The root and every resolved revision of a tree (for the read log).
- update
- Changes quantity, find number and notes of a BOM line.
- view_
rows - Rows of the BOM page (depth first): first the group filter – a line stays if it or a line below it is in the group, so the path from the top is kept, but lines of other groups below a match are not – then the depth cut. A line at the last level shown counts the lines hidden below it. Pure: roll-ups were computed on the whole tree and are not touched.