The Presupuestos module lets you estimate the cost of a job before committing to it. You build a detailed, line-item budget broken down by materials, labour, and additional expenses, apply a utility margin to arrive at a recommended sale price, and deliver a professional PDF quotation to your client. If the client approves, a single click converts the presupuesto into a live project — no re-entry required — and from that point on you can track real spending against the original estimate.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JDzuu/AplicativoWEB_GestorFinanciero/llms.txt
Use this file to discover all available pages before exploring further.
Budget Header Fields
| Field | Type | Default | Description |
|---|---|---|---|
nombre | string (max 200 chars) | — | Name of the project being quoted |
cliente | string (max 200 chars) | — | Client name |
tipo | string (max 60 chars) | "Otro" | Project type — same options as a regular project (Construcción, Remodelación, Muebles, Mantenimiento, Otro) |
utilidad_pct | decimal (≥ 0) | 0 | Desired utility/markup percentage applied on top of total cost |
Budget States
A presupuesto has exactly two states:| State | Label | Meaning |
|---|---|---|
borrador | Borrador | Draft — can be edited, items added or removed, and deleted |
convertido | Convertido | Converted to a live project — locked for editing and cannot be deleted |
Budget Line Items
The cost of a job is built up from individual partidas (line items). Each item belongs to one of the three cost categories and represents a specific concept within that category.| Field | Type | Required | Description |
|---|---|---|---|
categoria | string | Yes | materiales, mano_obra, or gastos |
concepto | string (max 200 chars) | Yes | The specific item being costed (e.g. “Madera”, “Carpintería”) |
descripcion | string (max 500 chars) | No | Optional detail or specification |
monto | decimal (> 0) | Yes | Estimated cost of this item |
Budget Summary Calculations
Every time items change, the backend recalculates the budget summary vialogica.resumen_presupuesto():
| Field | Formula | Meaning |
|---|---|---|
costo_total | materiales + mano_obra + gastos | Sum of all estimated costs before markup |
precio_venta | costo_total × (1 + utilidad_pct / 100) | Recommended sale price including the utility margin |
utilidad_monto | precio_venta − costo_total | Absolute value of the projected profit |
margen_pct | utilidad_monto / precio_venta × 100 | Profit as a percentage of the sale price (gross margin) |
PDF Quotation
Once your budget has at least one item you can generate a client-ready quotation document:cotizacion_{nombre}.pdf. The ReportLab-generated PDF contains:
- A header with your company name/logo, the project name, client, type, and creation date.
- A table of line items grouped by category, each with concept, description, and amount, plus a subtotal per category.
- A pricing summary showing
costo_total, the utility amount, and the finalprecio_ventahighlighted in blue. - A footer noting that the quotation is referential and subject to confirmation.
costo_total is zero.
Converting a Budget to a Project
When the client approves the quotation, convert the presupuesto to an active project:costo_total > 0), then atomically:
- Creates a new project with the presupuesto’s
nombre,cliente, andtipo. - Sets the project’s contracted
totalto the roundedprecio_venta. - Marks the presupuesto’s
estadoasconvertidoand stores the new project’sidinproyecto_id.
iniciando state and appears immediately on the active dashboard.
Budget vs. Actual Comparison
For projects that originated from a presupuesto, the project detail page shows a live comparison of estimated versus real costs:{ "tiene_presupuesto": false }. When one is linked the response includes a full comparacion object with per-category breakdowns:
Full Budget Workflow
Create the budget
Click Nuevo presupuesto and enter the project name, client name, and your desired utility percentage. The budget starts in
borrador state.Add cost items
Open the budget and add partidas under Materiales, Mano de obra, and Gastos adicionales. The summary recalculates in real time with each addition.
Set type and review the summary
Choose the project type and fine-tune the utility percentage until the
precio_venta and margen_pct match your target.Download the PDF quotation
Click Exportar cotización PDF to download the client-ready document. Share it with the client for approval.
Convert to a project
Once the client agrees, click Convertir en proyecto. The system creates a new project with
precio_venta as its contracted total and locks the presupuesto.Track real expenses
Record salidas against the project. When the category matches a budget category, optionally load the matching partida to pre-fill the description and monto.