askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
remakes.json · 2.1 KB · 26 lines
| 1 | { |
| 2 | "name": "remakes", |
| 3 | "title": "Remakes", |
| 4 | "version": 1, |
| 5 | "description": "An item made again for a customer: the original order line, the waste stock move for the unit that went in the bin, and the new zero-priced kitchen ticket line on the same order. Written only by action_counter_remake, which writes the three together. Corner Cup (a Haiku simulation of a counter cafe) remade dishes by editing the paid line, so the kitchen's work, the waste and the sale were one row that said three things. Here the sale stays as charged, the replacement is a line of its own priced at zero (so it changes nobody's money and the paid bill's lines stay frozen), and the waste is a stock move whose reference names the order line whose unit it accounts for -- the original if it had not yet left the shelf, otherwise the remake's own -- so the shelf goes down by exactly the two items the kitchen used. Never edited or deleted (owner fallback off).", |
| 6 | "views": { |
| 7 | "list_mode": "table", |
| 8 | "list_fields": ["created_at", "order_id", "quantity", "reason_code", "owner_id"], |
| 9 | "filter_fields": ["reason_code"] |
| 10 | }, |
| 11 | "fields": [ |
| 12 | {"name": "id"}, |
| 13 | {"name": "order_id", "type": "text", "required": true, "label": "Order", "validation": {"max_length": 64}}, |
| 14 | {"name": "original_line_id", "type": "text", "required": true, "label": "Original item", |
| 15 | "validation": {"max_length": 64}}, |
| 16 | {"name": "remake_line_id", "type": "text", "label": "Kitchen ticket line", "validation": {"max_length": 64}}, |
| 17 | {"name": "waste_move_id", "type": "text", "label": "Waste move", "validation": {"max_length": 64}}, |
| 18 | {"name": "quantity", "type": "number", "required": true, "default": "1", "label": "Quantity"}, |
| 19 | {"name": "reason_code", "type": "text", "required": true, "label": "Reason code", |
| 20 | "validation": {"max_length": 64}}, |
| 21 | {"name": "approval_id", "type": "text", "label": "Approval", "validation": {"max_length": 64}}, |
| 22 | {"name": "note", "type": "text", "label": "Note", "validation": {"max_length": 300}}, |
| 23 | {"name": "owner_id", "type": "text", "label": "Made by"}, |
| 24 | {"name": "created_at", "type": "datetime", "read_only": true} |
| 25 | ] |
| 26 | } |