> ## Documentation Index
> Fetch the complete documentation index at: https://docs.filexpress.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Cost Centers

> Analyze income and expenses by area, branch, project or department across all documents

A **cost center** is an internal division of the company (an area, a department, a line of business, a construction site) to which income and expenses are attributed. With them you can answer questions such as "how much did the sales area spend this month?" or "what profit does each line of business generate?" without having to create separate ledger accounts for each area.

In FileXpress the cost center is specified on documents (sales, purchases, collections, payments, transfers, payrolls) and on manual journal entries, and it reaches the accounting entry automatically when the document is posted.

## Center hierarchy

Centers are organized as a tree: a center can have sub-centers.

```
01 Comercial                 ← centro padre (agrupa)
  01.01 Ventas San Salvador  ← centro hoja (se asigna)
  01.02 Ventas Santa Ana     ← centro hoja
02 Administración
  02.01 Contabilidad
  02.02 Recursos Humanos
```

* Only **leaf** centers (without active sub-centers) that are **active** can be assigned to documents and journal entries. The cost center selector only offers those.
* Parent centers are used to **group** in reports: filtering by "01 Comercial" includes its two sub-centers.

### Create and maintain centers

**1. Go to Accounting → Settings → Cost Centers tab**

**2. Click New Cost Center**

Enter code, name, description and, if it is a sub-center, the **Parent Cost Center**.

**3. Save**

> [!NOTE]
>
> A center that already has movements cannot be deleted; deactivate it so it is not used in new documents. What is already recorded is preserved in reports.

## Policy per account

Not every account needs a cost center. Each account in the [Chart of Accounts](https://docs.filexpress.app/en/docs/contabilidad/plan-cuentas.md) has a policy:

| Policy | Meaning | Typical use |
| - | - | - |
| **None** | The account never receives a cost center. | Balance sheet accounts: banks, cash, inventory, VAT (IVA), customers, suppliers, liabilities. |
| **Optional** | The line may or may not carry a center. | Income statement accounts: income, costs and expenses (this is the initial value for these accounts). |
| **Required** | Every line with this account must carry a center. | Expenses that must always be attributed to an area (for example, salaries or advertising). |

Income, cost and expense accounts start as **Optional** and the rest as **None**. To change it:

**1. Go to Accounting → Chart of accounts**

**2. Edit the account**

**3. In the Cost center field, choose None, Optional or Required**

Check **Also apply to its sub-accounts** to change a whole branch at once (for example, all selling expenses).

**4. Save**

## How it is assigned on each document

On all documents the center is **optional**. When a document has lines, you can set one center on the document (default value) and a different one on some lines: **a line's center is its own or, if it has none, the document's**.

| Document | Where it is specified |
| - | - |
| **Manual journal entry** | **Cost center** column on each line. See [Journal entries](https://docs.filexpress.app/en/docs/contabilidad/partidas.md). |
| **Sale** | **Advanced billing options** → **Cost center** section: the sale's center and, per product, the **Cost center** column. See [New sale](https://docs.filexpress.app/en/docs/ventas/nueva-venta.md#advanced-billing-options). |
| **Purchase** | **Advanced purchase options** → **Cost center** section: the purchase's center and, per line, **Cost center**. See [Expenses / Purchases](https://docs.filexpress.app/en/docs/ventas/gastos.md#advanced-purchase-options). |
| **Customer collection** | **Cost center** field when recording the payment of a sale or a **Payment across several invoices**. If left empty, it takes the sale's. See [Accounts receivable](https://docs.filexpress.app/en/docs/finanzas/cuentas-cobrar.md). |
| **Supplier payment** | **Cost center** field when recording the payment. If left empty, it takes the purchase's. See [Accounts payable](https://docs.filexpress.app/en/docs/finanzas/cuentas-pagar.md). |
| **Inventory transfer** | **Cost center (optional)** field when completing the transfer. See [Transfers](https://docs.filexpress.app/en/docs/inventario/transferencias.md). |
| **Payroll** | The payroll's center when generating it or in its detail, and a center per employee. See [Payrolls](https://docs.filexpress.app/en/docs/rrhh/nominas.md#cost-centers). |

On journal entries, sales, purchases and payrolls you can also choose a [distribution](#distributions) instead of a center.

## How it reaches the journal entry

Document journal entries are generated when you [process documents](https://docs.filexpress.app/en/docs/contabilidad/procesar-documentos.md). At that moment FileXpress copies each document line's center **only to the journal entry lines whose account accepts a center** (Optional or Required policy):

| Document | Lines that receive a center | Lines without a center |
| - | - | - |
| Sale | Sales income | Customers, cash/bank, VAT |
| Purchase | Expense or inventory of each line, grouped by account **and** center | Suppliers, cash/bank, VAT |
| Payroll | Salary and employer contribution expenses, grouped by account and center | Withholdings and liabilities |
| Collection / payment | Income statement accounts only (for example, exchange rate difference) | Bank, cash, petty cash, customers, suppliers |
| Transfer | Usually none (inventory is a balance sheet account) | Inventory |

Examples:

* A purchase with the **Administración** center and a line with the **Ventas** center generates **two** expense lines: one for each center.
* In a sale with products from different centers, the income is split among the centers in proportion to the amount of each product.
* In the day's consolidated sales, one income line is generated for each distinct center.
* With no center on the documents, the journal entries are exactly the same as before.

> [!WARNING]
>
> If an account with a **Required** policy is left without a center when the journal entry is generated (for example, the document had no center), the entry is still created but stays in **Draft** with a missing-center warning. Fix it with [reassignment](#reassign-cost-centers-in-a-journal-entry) and then process it. Sales already transmitted to the Ministry of Finance (Hacienda) are never blocked because of this.

> [!NOTE]
>
> Changing the center of a document that **has already been posted** does not modify its journal entry. In that case, fix the entry with reassignment.

## Reassign cost centers in a journal entry

It lets you correct the cost center of the lines of a **Draft** or **Processed** journal entry, without touching amounts or accounts.

**1. Go to Accounting → Journal entries and open the entry**

**2. Click Reassign cost centers**

**3. Choose the center for each line**

Lines with accounts of **None** policy show "Not applicable". Those with a **Required** policy cannot be left empty.

**4. Save**

* You can only reassign if the **entry's accounting period is open**. In a closed or locked period, reopen it first in [Periods](https://docs.filexpress.app/en/docs/contabilidad/periodos.md).
* Deleted entries cannot be reassigned.
* The change is recorded with the user who made it.

## Distributions

A **distribution** splits a single amount among several cost centers by percentage. It is useful for shared expenses (rent, electricity, salaries of support areas) without splitting the document by hand.

### Create a distribution

**1. Go to Accounting → Settings, Distributions tab**

**2. Click new distribution and enter Code and Name**

The code is unique within the company.

**3. Add the centers with Add center**

Each line has a **Cost center (leaf)** and its **Percentage**.

**4. Check that the percentages add up to exactly 100% and save**

Rules of a distribution:

* At least **two** centers, with none repeated.
* Only **leaf** and active centers of the company.
* Percentages greater than 0 (up to 4 decimals) that add up to exactly **100%**.

| Example | Center | Percentage |
| - | - | - |
| **ALQ - Alquiler oficina central** | 0101 Ventas San Salvador | 60% |
| | 0201 Administración | 40% |

A deactivated distribution (**Active** turned off) no longer appears in new documents. When you delete a distribution that has already been used in documents or journal entries, it is not erased: it is **deactivated** to preserve the history.

### Use a distribution

In all cost center selectors for manual entries, sales, purchases and payrolls, the **Distributions** group appears below the centers. At each level (document or line) you choose **one center or one distribution, not both**.

| Document | Where |
| - | - |
| **Manual journal entry** | **Cost center** column of each line (only on accounts with Optional or Required policy). |
| **Sale** and **Purchase** | Document center and center per line in the advanced options, just like a center. |
| **Payroll** | Payroll center and center per employee. |

Collections, supplier payments and inventory transfers do not accept distributions: their lines belong to balance sheet accounts.

### How it is split in the journal entry

* When the journal entry of a sale, purchase or payroll is generated, each line of an account that accepts a center is split into one line per center of the distribution, according to its percentage.
* In a **manual journal entry**, the line is saved with the distribution while it is in **Draft** (it can be edited) and it is split when you **process** it.
* Rounding is adjusted on the center with the highest percentage so that the entry balances. Example: a purchase of **100.01** with the 60/40 distribution generates **60.01** for the first center and **40.00** for the second.
* On accounts with a **None** policy the distribution does not apply: a single line without a center is used.
* Split lines keep the reference to the originating distribution.
* Changing a distribution's percentages does **not** modify journal entries that were already generated; it only affects new ones.
* If, when splitting, one of the centers is no longer valid (for example, it was deactivated), that part is left without a center and, if the account requires one, with a missing-center warning.

## Reports by cost center

In [Accounting → Reports](https://docs.filexpress.app/en/docs/contabilidad/reportes.md#cost-center-reports):

* **Cost center filter** in General Journal, General Ledger, Ledger Subsidiary, Trial Balance and Income Statement. You can choose a parent center and check **Include child centers**. The Balance Sheet does not have this filter (balance sheet accounts do not carry a center).
* **Income statement by cost center**: one column per center, plus **No center**, **Other centers** (if applicable) and **Total**. The total matches the regular Income Statement.
* **Movements without a cost center**: lines on Optional or Required accounts that have no center, so you can fix them before closing.
* **Budget vs actual**: compares what was executed by center and account with the [budget](https://docs.filexpress.app/en/docs/contabilidad/presupuestos.md).

All three are shown on screen and can be exported to PDF and Excel.

## Closing best practices

**1. Define the account policy before you start**

Mark as **Required** only the expenses that must always be attributed to an area. Leave **None** on all balance sheet accounts.

**2. Assign the center on the document, not afterwards**

It is easier to specify the center on the sale, purchase or payroll than to fix the journal entry. Use the document's center and reserve line-level centers for exceptions.

**3. Before closing the month, review Movements without a cost center**

Generate the report with **Draft and processed** for the period and fix each line with reassignment.

**4. Process the drafts with a missing-center warning**

**5. Compare the Income statement by center with the Income Statement**

The columns must add up to the total. If **No center** has significant amounts, review which documents did not have one.

**6. Close the period**

After closing, centers can no longer be reassigned in that period.

> [!TIP]
>
> Cost centers, distributions and budgets can also be managed and queried from external systems with the [cost centers API](https://docs.filexpress.app/en/docs/api/contabilidad/centros-de-costo.md) and the [budgets API](https://docs.filexpress.app/en/docs/api/contabilidad/presupuestos.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.