Transactions — calledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/akevalion/life_cost/llms.txt
Use this file to discover all available pages before exploring further.
MoneyTransfer internally — are the core records in Life Cost. Each transaction captures what money moved, how much, and when, and it lives inside the currently active wallet. Positive amounts represent money coming in (income) and negative amounts represent money going out (expenses). The transaction table on the main page is fully editable inline: no modal or separate form is required to add or update a record.
Transaction Fields
EveryMoneyTransfer row in the database stores the following:
| Field | Type | Notes |
|---|---|---|
id | Integer (PK) | Auto-incremented primary key |
wallet_id | Integer (FK) | The wallet this transaction belongs to |
amount | Float | Positive = income, negative = expense |
description | String (200) | Short human-readable label; required |
created_at | DateTime | UTC timestamp; can be provided on creation |
modifed_at | DateTime | Timestamp column; note the intentional typo in the column name (one d, not two) as defined in the source model |
user_id | Integer (FK) | ID of the user who created the transaction |
Tag model and link to a transaction via money_transfer_id. See Categories & Tags for details.
Adding a Transaction
The bottom row of the transaction table is always an editable row with threecontenteditable cells: Description, Value (amount), and Tags. Placeholder text is shown when a cell is empty and cleared automatically on focus.
Click the Description cell
The editable row at the bottom of the table receives focus on the first cell automatically. Type a short label for the transaction (e.g.
Groceries).Tab to the Value cell
Enter a numeric amount. Use a period (
.) as the decimal separator — commas are not accepted. Positive values record income; negative values record expenses (e.g. -42.50).Tab to the Tags cell
Enter one or more comma-separated tag names (e.g.
food, supermarket). At least one tag is required.Editing a Transaction
Each table row has an edit icon (pencil). Clicking it — or clicking the description text itself — opens the info panel (#info) which shows the full transaction details including creation date, last-modified date, and the creating user’s name.
Open the info panel
Click the description text or the icon in the row’s actions column. The panel fades in with the current values pre-filled.
Click Editar in the info panel
The info panel closes and the static row is replaced in-place with an editable row pre-populated with the existing description, amount, and comma-separated tag names.
edit_money endpoint deletes all existing tags for the transaction and re-creates them from the submitted tag list, so the tag set is fully replaced on every edit:
Deleting a Transaction
Click the trash icon in any row’s actions column, or use the Eliminar button in the info panel. ADELETE /remove_money/<id> request is sent immediately — no confirmation dialog is shown.
The server deletes all Tag rows linked to the transaction before delegating the final removal to the remove_data() helper, which calls db.session.delete() and db.session.commit():
Validation Rules
All validation runs client-side invalidation.js before any network request is made. Fields that fail validation flash red to draw attention.
| Field | Rule |
|---|---|
description | Must not be empty or equal to the placeholder text "Descripción" |
amount | Must not be empty; must not contain a comma; must parse as a float |
tags | Must not be empty or equal to the placeholder text "Tags" |
API Quick Links
Add Transaction
POST /add_money — Create a new transaction in the active wallet.Edit Transaction
POST /edit_money — Update description, amount, and tags for an existing transaction.Delete Transaction
DELETE /remove_money/<id> — Remove a transaction and all its tags.Last Transfers
GET /last_money_transfers/<limit> — Fetch the most recent transactions for the active wallet.