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.
mileage_rates.json · 2.3 KB · 29 lines
| 1 | { |
| 2 | "name": "mileage_rates", |
| 3 | "title": "Mileage Rates", |
| 4 | "version": 1, |
| 5 | "description": "The per-mile rate business miles in a personal vehicle are reimbursed at, one row per calendar year, kept by the operator with where it came from. Nothing in code knows a rate: the IRS announces the standard mileage rate each year (and has changed it mid-year before), so a rate in code is wrong the year it changes and silent about it. The rate is in HUNDREDTHS OF A CENT per mile so a rate with a half cent in it is exact: 6550 is 65.5 cents, 7000 is 70 cents. Nothing is seeded -- a rate somebody did not look up is worse than the refusal a missing year gets (approving a log for a year with no row is refused, naming the year). Approving a log copies the rate onto it (docs/logic-decisions.md #1), so correcting a row restates nothing already approved. Not tax advice: an operator may reimburse below the IRS rate, or above it (the excess is taxable wages); check with your accountant.", |
| 6 | "fields": [ |
| 7 | {"name": "id"}, |
| 8 | {"name": "year", "type": "integer", "required": true, "label": "Year", |
| 9 | "validation": {"min": 2000, "max": 2200}}, |
| 10 | {"name": "rate_hundredths_cent", "type": "integer", "required": true, |
| 11 | "label": "Rate (hundredths of a cent per mile)", |
| 12 | "validation": {"min": 1}, |
| 13 | "help": "7000 is 70 cents a mile; 6550 is 65.5 cents."}, |
| 14 | {"name": "source_url", "type": "text", "required": true, "label": "Source", |
| 15 | "validation": {"max_length": 500}, |
| 16 | "help": "Where the number came from: the IRS notice or newsroom release, or the company policy that sets a different rate."}, |
| 17 | {"name": "source_date", "type": "date", "required": true, "label": "Source dated", |
| 18 | "help": "The date of that notice or policy, so a reader can tell which announcement it was."}, |
| 19 | {"name": "notes", "type": "textarea", "label": "Notes"}, |
| 20 | {"name": "owner_id", "type": "text", "label": "Owner"}, |
| 21 | {"name": "created_at", "type": "datetime", "read_only": true, "label": "Created"} |
| 22 | ], |
| 23 | "unique": [ |
| 24 | {"fields": ["year"], "message": "There is already a mileage rate for that year. Correct that row instead."} |
| 25 | ], |
| 26 | "forms": {"default": {"fields": ["year", "rate_hundredths_cent", "source_url", "source_date", "notes"]}}, |
| 27 | "views": {"list_mode": "table", |
| 28 | "list_fields": ["year", "rate_hundredths_cent", "source_url", "source_date"]} |
| 29 | } |