Recurring Expense — rules (schedule)
Menu: Expense Management → Recurring Expense
This screen manages recurring expense rules (scheduled costs): amount, frequency, start/end dates, payment method, supplier, and lifecycle (Active / Paused / Stopped). The header bar may show the path segment Expense/recurring-expense.
Everything is per restaurant — choose Restaurant first.
Top filters
| Control | Behaviour |
|---|---|
| Restaurant | Required. First restaurant may be auto-selected when the page loads. |
| Status | All, Active, Paused, or Stopped (derived from rule state — see below). |
| Frequency | All, Daily, Weekly, Biweekly, Monthly, Quarterly, Yearly. |
| Refresh | Reloads rules; tooltip references recurring expenses. Disabled while loading or when no restaurant is selected. |
| Add Expense Rule | Opens create dialog — only if you may create recurring expenses; disabled without a restaurant. |
Status badges (how the app derives them)
For each rule:
| Badge | Meaning |
|---|---|
| Active | Rule is active and has no end date set yet (runs until ended manually or by stop flow). |
| Paused | Rule is inactive and no end date — paused without being fully stopped. |
| Stopped | Rule has an end date (scheduled end or stopped with a stop date). |
Table
| Column | Meaning |
|---|---|
| Name | Rule name. |
| Category | Linked expense category name. |
| Amount | Numeric amount (two decimal places in the grid). |
| Frequency | One of: daily, weekly, biweekly, monthly, quarterly, yearly (shown capitalised from stored value). |
| Next Due | Next due date when provided by the API (next_due_date). |
| Status | Active / Paused / Stopped badge (see above). |
| Actions | View (eye). For rules not yet Stopped, a ⋯ menu appears if you may update: choices map to Resume, Pause, and Stop depending on current state (invalid transitions are disabled). While pause/resume/stop is running, actions may be disabled. |
Stopped rows: status menu is hidden — you can still View.
Empty state: No recurring expenses found.
How to create a recurring expense rule
- Add Expense Rule → dialog title Create Expense Rule.
- Before save on create only, a confirmation opens (Before You Create a Rule): it warns that for existing rules certain workflows rely on Resume / Pause / Stop — confirm Yes to proceed or No to stay on the form.
Basic Details
- Expense Name — required, max 150 characters.
- Expense Category — required (pick from categories for this restaurant).
- Supplier — optional (None or a supplier).
- Amount — required number > 0.
Recurrence Details
- Frequency — Daily, Weekly, Biweekly, Monthly, Quarterly, Yearly (default Monthly on new rule).
- Interval — repeat every N periods; must be ≥ 1 (default 1).
- Start Date — required; cannot be before today (calendar minimum is today).
- End Date (Optional) — if set, must be after start date; if omitted, the rule runs until you stop it manually. Helper lines on screen explain auto-stop vs manual stop.
Payment & Settings
- Payment Method — required for create (dropdown lists your payment methods); new rule defaults to first method when available.
- Active Status — toggle (
Active Statusswitch).
Additional Notes
- Description — optional textarea.
Primary actions: Create Rule / Creating..., Cancel.
How to edit a recurring expense rule
- Title: Edit Expense Rule.
- Same sections as create; validation applies (including start date not before today when changing dates).
- Only fields that changed are sent on update; if nothing changed, the dialog closes without an API update.
How to view a recurring expense rule
- Title: View Expense Rule — all inputs read-only; Close only.
Pause, Resume, Stop (from the table)
Requires Update on RECURRING EXPENSES.
| Action | When available |
|---|---|
| Pause | Current lifecycle is Active. |
| Resume | Current lifecycle is Paused. |
| Stop | Rule is not already Stopped — opens Stop Expense Rule. |
Stop Expense Rule dialog:
- Requires a Stop Date (date picker).
- Warning: once stopped, you cannot resume, pause, or stop again from this list for that rule.
- Stop Expense / Stopping... — destructive styling.
Permissions (summary)
- Add Expense Rule: Create on RECURRING EXPENSES.
- Edit form / Pause–Resume–Stop: Update on RECURRING EXPENSES.
- View eye icon: typically anyone who can open the screen.
