Budget & Capex: how the app works
Version 5.0 · a guide to what the app does, who can do what, how a budget moves from draft to approved, and how each field you change affects the numbers in the reports.
The screens are in Portuguese or English (PT/EN switch at the top). This guide uses the English names, with the Portuguese name in italics where it helps.
1. The app at a glance
Each department prepares one budget per year. A budget is a list of cost and revenue lines grouped by category. Each line has last year's actual amount, this year's base amount and an adjustment, and it is split over the months. From those lines the app produces two documents, on screen and in PDF and Excel: the Capex and Costs report (Capex e Custos) and the Monthly budget (Orçamento mensal).
2. What runs on the server
The app runs on one server on your network with Docker. People open it in a browser at http://<server>:8080. Nothing needs to be installed on the PCs.
3. What is stored
4. Roles and permissions
Every user has one role and belongs to one department. Everyone can see and export every budget. Only the budget's own department can change or approve it.
| What | Viewer | Editor | Approver | Admin |
|---|---|---|---|---|
| View budgets and reports, download PDF / Excel | all | all | all | all |
| Send reports by email (once email is set up) | yes | yes | yes | yes |
| Request reopening of an approved budget (with reason) | yes | yes | yes | yes |
| Create, import, edit a draft budget; upload a changed file | no | own dept | own dept | any |
| Submit a draft for review | no | own dept | own dept | any |
| Approve or return a workflow step | no | no | own dept* | own dept* |
| Reopen directly, accept or decline reopen requests | no | no | own dept | any |
| Manage categories | no | no | own dept | any |
| Delete a budget (any status, typed confirmation) | no | no | no | yes |
| Departments, workflows, users, sites, email settings, activity and mail logs | no | no | no | yes |
* A workflow step can instead name specific users who approve it; then only those users can approve that step, whatever their role. An administrator can always return a budget in review to draft.
5. A budget's life cycle
6. How the numbers are calculated
Every total in the app and in the reports is built from the lines, in this order. Change any input on the left, and everything to its right follows.
The adjustment and the factor
| Adjustment (Ajuste) | Factor used | Example, base 96 532,00 € |
|---|---|---|
| Year rate (Taxa do ano) | 1 + the budget's year rate | rate 5,5 % → × 1,055 = 101 841,26 € |
| Percent (%) | 1 + adjustment value ÷ 100 | value 15 → × 1,15 = 111 011,80 € |
| Factor (Fator ×) | the adjustment value | value 2,055 (hardware price rise) → 198 373,26 € |
| None (Sem ajuste) | 1 | 96 532,00 € |
Rounding rules
- Each line's adjusted amount is rounded to cents before it is added up, as the finance reports do. Totals are therefore exact sums of the lines you see.
- Monthly amounts are in cents. The rounding difference goes to the last month (December, or the last chosen month), so the twelve months always add up to the adjusted amount.
- Change % is blank when the prior-year actual is zero.
Typing amounts
Amount fields work like Excel: 12*839,67+3292,56 or =5512*12. Both 1 234,56 and 1,234.56 are understood. The calculation is kept, so you can see later how a figure was built.
7. Every field and what it changes
On a budget
| Field | What it does | What changes when you edit it |
|---|---|---|
| Year | The budget year; one current budget per department and year. | Column headings ("2026 actual", "2027 adjusted"), report titles, file names. |
| Title | Name shown in lists and reports. | Budget list, report headers, email subject suggestion. |
| Inflation + adjustments (%) (Taxa do ano) | The year rate. | Every line whose adjustment is "Year rate": their factor, adjusted amount, months, and so all category and budget totals and both reports. Lines with %, factor or none are not affected. |
| Copy from an earlier year (when creating) | Starts the new year from another year's lines. | Each copied line's prior actual and base both start at last year's adjusted amount; adjustment type, months and site are kept. Replace the actual with the real figure. |
On a line
| Field | What it does | What changes when you edit it |
|---|---|---|
| Line (name) and Description | Labels. | Text in the budget and the reports only. |
| Category | Which group the line belongs to (your department's categories). | Moves the amounts from one category total to another: category pages and charts in Capex and Costs, grouping in the Monthly budget. Budget totals stay the same, unless the category is a revenue category, in which case the amount counts as revenue instead of cost. |
| Site (Unidade) | Sagres, Quinta, Chiado, Oriente, or Group. | What appears when a page or report is filtered by site. "Group" lines appear only in the all-sites view. |
| Prior-year actual | What was spent last year. | The "prior" column, change € and change %, category and budget prior totals, and the comparison charts. Does not change the new year's amount. |
| Base (sem ajuste) | The new year's amount before the adjustment. | Adjusted amount → months → every total for the new year → both reports. |
| Adjustment and its value | How the base becomes the adjusted amount (see the table above). | Factor → adjusted amount → months → totals → reports. |
| Reason for adjustment | Why it went up or down. | Shown under the line and in the reports. |
| Months | How the year amount is spread: split over 12, split over chosen months, or typed monthly amounts. | Only the Monthly budget's month columns and the monthly totals. The year total does not change (except with typed amounts, where the year total is the sum of the months). |
| Remarks | Free notes. | Shown on the line; no effect on numbers. |
On a category
| Field | What changes |
|---|---|
| Name (PT / EN) | The heading in the language of the screen or the report. |
| Section: cost or revenue | Whether its lines count in the cost totals or the revenue totals. |
| Order | The order of categories on screen and in the reports. |
| Show when empty | Whether a category with no lines still appears (with zero) in the budget and reports. |
| Active | Inactive categories can't be chosen for new lines. Existing lines keep them. A category with lines can be deactivated, but not deleted. |
8. Splitting a year into months
9. Reports, downloads and email
Capex and Costs Capex e Custos
- Totals: prior-year actual vs adjusted, change € and %
- Chart of each category, last year vs this year
- Chart of the change by category
- One page per category with its lines and reasons
- Summary table
Monthly budget Orçamento mensal
- Every line with its twelve months and year total
- Category subtotals and monthly totals
- Option: include empty categories
- Excel version keeps live formulas
On the Reports page you pick the budget, the language (Portuguese or English) and the site; the same choice applies to viewing online, PDF, Excel and email. On a budget page, Download ▾ offers the editable budget file and both reports, and Send by email lets you attach any of them. That works in every status, including draft and approved.
Sending by email asks for recipients (To, Cc, "send me a copy"), a subject and a message, and which files to attach. The email goes out from the account the administrator set up, a copy is saved in that mailbox's Sent folder, and the mail log records it.
10. Excel: template, download, re-upload
Excel template (Budgets → Modelo Excel) gives a workbook for a department and year, blank or pre-filled from an existing budget, in PT or EN. It has an Instructions sheet and a Lines sheet with drop-down lists for category, site and adjustment, twelve month columns, and a last column Split over months where you can write 1-4 or Jan, Fev, Mar, Abr. Unknown categories are created on import; anything skipped is listed. The original "Budget para 2027" workbook layout can also be imported.
11. Reopening an approved budget
12. Admin: email, logs, backups, upgrades
Email → Sending account
- SMTP server, port, security (STARTTLS 587 / SSL 465 / none), username and password
- Sender address and name, reply-to, signature
- Copy in the Sent folder over IMAP (found automatically, or named)
- Test connection signs in only; Send test email sends one
- Turning email on adds "Send by email" for everyone
Gmail already keeps its own copy, so turn the Sent-folder option off there.
Logs
- Activity: sign-ins (and failed ones), every change to budgets and lines, imports, approvals, reopen requests, archiving, deletions, report views, downloads and emails, admin changes. Filter and export to CSV.
- Email → Mail log: who sent what to whom, attachments, delivered or failed, Sent-folder copy saved or not. Export to CSV.
Backups
- A database dump every night at
BACKUP_TIMEintobackups/, keptBACKUP_KEEP_DAYSdays - An extra one,
…_before_upgrade.sql.gz, before every upgrade that changes the database - Restore:
docker compose exec backup restore.sh /backups/<file> - Copy
backups/to another disk or NAS regularly
Upgrading to a new version
- Unzip the new version over the app folder, keeping
.envandbackups/ - Run
docker compose up -d --build
The api asks for a backup, waits for it, then updates the database. If the backup fails, it does not upgrade. Never run docker compose down -v: -v deletes the data.
Budget & Capex · version 5.0.0 · guide written 28 October 2026.