PhoenixKitCatalogue. Import. Pro100TemplateParser
(PhoenixKitCatalogue v0.19.1)
Copy Markdown
View Source
Parses a PRO100 configTables export — the estimate/price template PRO100 uses
to quote a project. XML, despite the extension the exporter gives it.
Shape: ArrayOfTable → Table → Items/TableItem. Three things about that
structure are easy to get wrong and each was measured against the real export
(Pro100doc_configTables_2026-07-15_192106, 10 tables / 708 rows):
Only
Table/Items/TableItemare rows. The same file serialises 584 of them twice more, underTableItem/SumTables/TableandCalculatedItem/SumTables/Table— snapshots of the summed tables, not products. A//TableItemsweep yields 1876 rows instead of 708.…but the nested
SumTables/Table/Namelist is still needed. It is where a computed row's rule targets come from, and it lives inside the branch whose rows are ignored.A row's table comes from the XML nesting, never from
TableId.TableIdis0on 707 of 708 rows; only the computed row carries a real one. (TableGuidis a valid alternative — it equals the parent table'sTemplateGuidon every row — but nesting is what we already have.)
Sections are implicit: a row whose Name ends with : is a header for the rows
after it in SortOrder order. 44 lines precede any header in their table and
belong to no section.
Prices in the file are gross; converting them is the caller's business — this module reports what the file says.
Summary
Functions
Parses the export into {:ok, [table()]}.