task-h.5.3

This commit is contained in:
phaichayon
2026-06-19 17:15:28 +07:00
parent fd01ebf7c7
commit 51d67ef7c2
35 changed files with 4301 additions and 633 deletions

View File

@@ -11,11 +11,18 @@ This registry freezes the placeholder naming contract for quotation PDF template
| `customer_att` | mapped | DB mapping | quotation attention |
| `project_name` | mapped | DB mapping | project name |
| `site_location` | mapped | DB mapping | project location |
| `quotation_date` | mapped | DB mapping | formatted date |
| `quotation_code` | mapped | DB mapping | quotation document code |
| `quotation_price` | mapped | DB mapping | formatted total amount |
| `currency` | mapped | DB mapping | currency code/label |
| `exclusion_data` | mapped | DB mapping | exclusion rows as `string[][]` |
| `tel_label` | mapped | DB mapping | static label from `pdfme.labels.tel` |
| `email_label` | mapped | DB mapping | static label from `pdfme.labels.email` |
| `att_label` | mapped | DB mapping | static label from `pdfme.labels.att` |
| `project_label` | mapped | DB mapping | static label from `pdfme.labels.project` |
| `site_label` | mapped | DB mapping | static label from `pdfme.labels.location` |
| `quotation_date` | mapped | token alias | canonical formatted date token |
| `quotation_date_data` | mapped | DB mapping | active field-name mapping for date |
| `quotation_code` | mapped | token alias | canonical quotation code token |
| `quotation_code_data` | mapped | DB mapping | active field-name mapping for code |
| `quotation_price_data` | mapped | DB mapping | canonical price table `string[][]` |
| `quotation_price` | mapped | DB mapping | compatibility scalar token inside price table |
| `currency` | mapped | DB mapping | compatibility scalar token inside price table |
| `app1` | mapped | DB mapping | prepared by name |
| `app1_position` | mapped | DB mapping | prepared by position |
| `app2` | mapped | DB mapping | approved by name |
@@ -24,13 +31,17 @@ This registry freezes the placeholder naming contract for quotation PDF template
| `app3_position` | mapped | DB mapping | authorized by position |
| `topic` | reserved | dynamic topic engine | base runtime topic label template |
| `data_topic` | reserved | dynamic topic engine | base runtime topic rows template |
| `item_topic` | legacy reserved token | dynamic topic engine | allowed in schema token inventory, not in DB mapping rows |
| `item_topic` | legacy reserved token | dynamic topic engine | allowed in schema token inventory, never stored as DB mapping row |
| `topic_*` | generated | dynamic topic engine | runtime-only generated keys |
| `item_topic_*` | generated | dynamic topic engine | runtime-only generated keys |
| `quotation_date_labe` | static visual | designer-owned | tolerated typo-like visual label |
| `quotation_code_lable` | static visual | designer-owned | tolerated typo-like visual label |
| `line` | static visual | designer-owned | readonly line artifact, no mapping |
## Naming Rules
- do not store `topic_*` or `item_topic_*` keys in `crm_document_template_mappings`
- keep `topic` and `data_topic` reserved for runtime schema cloning
- treat typo-like names such as `quotation_date_labe` and `quotation_code_lable` as static labels, not placeholders
- keep canonical business placeholders as `quotation_date` and `quotation_code`; container aliases like `quotation_date_data` and `quotation_code_data` are tolerated only as schema field names during the current freeze window
- treat typo-like names such as `quotation_date_labe` and `quotation_code_lable` as static visual fields, not business placeholders
- when the designer removes a field from the next template version, the remap script must not carry that mapping forward
- approved snapshots remain immutable to the template version they were generated from, even after that version becomes inactive