| @@ -21,18 +21,8 @@ | ||
| 21 | 21 | **Plugin State**: |
| 22 | 22 | Machine bookkeeping stored in options but not user intent: site UUID, JWT secret keys, install timestamp, DB version. Owned by the module that uses it (e.g. Auth owns its secret keys), never by the Settings module. |
| 23 | 23 | _Avoid_: settings (for these), internal options |
| 24 | 24 | |
| 25 | -### Receipts | |
| 26 | - | |
| 27 | -**Receipt Data**: | |
| 28 | -The JSON payload a receipt template renders from: `order`, `store`, `cashier`, `customer`, `lines`, `fees`, `shipping`, `discounts`, `totals`, `tax`, `tax_summary`, `payments`, `refunds`, `fiscal`, `presentation_hints`. Built by a source (a live WooCommerce order, or the sample the template editor and gallery use), filtered through `woocommerce_pos_receipt_data`, then rendered identically on the server and offline in the app. Logic-less by ADR 0039: templates branch on data the payload carries. | |
| 29 | -_Avoid_: receipt JSON, receipt context, template data | |
| 30 | - | |
| 31 | -**Receipt Section**: | |
| 32 | -One named block of Receipt Data and the shape of its rows. Money keys come in triples (`total`, `total_incl`, `total_excl`) with the bare key filled from the store's tax display basis. Row shapes and the aggregate rules of `totals` (subtotals, item counts, net total after refunds, savings completeness) are declared once in the Receipt Sections module; a source supplies priced values, it never declares keys. | |
| 33 | -_Avoid_: receipt block, payload part, builder output | |
| 34 | - | |
| 35 | 25 | ### Sync |
| 36 | 26 | |
| 37 | 27 | **Collection Rule**: |
| 38 | 28 | One POS query behaviour for one collection — the params it claims, the clauses it contributes, the storage it targets — declared once in the Collection Rules module and applied identically on every read lane, so it cannot be wired into only one. |