> ## 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.

# Process Documents

> Generate automatic journal entries for sales, purchases, payments, inventory, payroll, and provisions

Process Documents turns the operations recorded in FileXpress into journal entries, using the accounts from the [Accounting Settings](https://docs.filexpress.app/en/docs/contabilidad/configuracion.md).

> [!NOTE]
>
> A document that already has an entry is not posted again. If you delete the entry, the document can be processed again.

## Sales, purchases, and payments

**1. Go to Accounting → Process Documents**

**2. Select the document type**

| Type | Entry |
| - | - |
| **Sales** | Revenue, VAT (IVA) output tax, and cash / accounts receivable (and cost of sales). |
| **Purchases/Expenses** | Expenses or inventory, VAT input tax, special taxes, and suppliers / cash. |
| **Supplier payments** | Payment against accounts payable from bank, cash, or card. |
| **Customer payments** | Collection of accounts receivable into bank or cash. |
| **Inventory adjustments** | Shortages and overages at cost. See [below](#inventory-adjustments-and-transfers). |
| **Transfers between branches** | Inventory transfer at cost. See [below](#inventory-adjustments-and-transfers). |

**3. Select the branch and the date range**

The system verifies that the period is open.

**4. Click Process and review the result**

It shows the total of documents, processed, skipped, and with errors, with the entry generated for each one.

## Payment reversal and its entry

When a customer collection or a supplier payment is reversed (**Reverse** button in [Accounts receivable](https://docs.filexpress.app/en/docs/finanzas/cuentas-cobrar.md) / [Accounts payable](https://docs.filexpress.app/en/docs/finanzas/cuentas-pagar.md), or via API), the accounting is adjusted in the same operation:

| State of the payment's entry | What happens |
| - | - |
| **Not yet posted** | Nothing. When processing documents, reversed payments are ignored. |
| **Entry in Draft** | The entry is marked as *Deleted* (it never affected balances). |
| **Entry Processed or Closed** | A **mirror entry** is created (Debit ↔ Credit, same accounts and cost centers) dated today in the current open period, with the description *Reversal of entry {code}: …*. The original entry is not modified. |

* The status of the reversal entry follows the *Status when Processing Received Collections* or *Status when Processing Supplier Payments* setting in the [configuration](https://docs.filexpress.app/en/docs/contabilidad/configuracion.md#processing-mode).
* The bank movement is not synced again: the payment reversal already records the adjustment in the bank.
* If the reversal entry cannot be created (for example, there is no open period for today's date), **the payment reversal is rejected** with the message *The accounting entry for the collection/payment could not be reversed: …*.

## Inventory adjustments and transfers

With the **Inventory adjustments** and **Transfers between branches** types, select the branch and the date range and click **Process**. **One entry per document** is generated, valued at **cost** (quantity × unit cost recorded in the movement), with the accounts from [Inventory (adjustments and transfers)](https://docs.filexpress.app/en/docs/contabilidad/configuracion.md#inventory-adjustments-and-transfers).

| Document | Debit | Credit |
| - | - | - |
| **Shortage / shrinkage** (outbound adjustment) | Loss from shortages / shrinkage | Branch inventory |
| **Overage** (inbound adjustment) | Branch inventory | Gain from overages |
| **Transfer** | Destination branch inventory | Origin branch inventory |

* **Adjustments**: the branch's adjustments recorded in the date range are taken. The entry uses the adjustment's date.
* **Transfers**: only those **completed** in the range where the branch is origin or destination. Each transfer generates a single entry (even if processed from both branches), recorded in the origin branch with the date it was completed.
* Closed periods are respected and no duplicates are generated: an adjustment or transfer that already has an entry is skipped.
* Only adjustments and transfers recorded **from this version onward** are posted; earlier ones did not store the cost or the origin of the movement.
* If the product has no recorded cost, the document appears with an error in the results (*The product has no recorded cost; the adjustment does not generate an entry*).

> [!NOTE]
>
> In transfers, the **Unit cost** column now stores the product's **cost**. Previously it stored the sale price before taxes.

## Payroll

With the **Payroll (accrual and payment)** type, select branch and date range and click **Search payrolls**. Payrolls that are processed or paid and whose period ends in the range are listed, with the accounting status of each:

| Column | Action |
| - | - |
| **Accrual** | **Post**: generates the payroll's entry. Available when the payroll is processed or paid. |
| **Payment** | **Post payment**: available when the payroll is paid in full. |

**One entry per payroll** is generated with totals per account (no per-employee detail).

**Accrual entry**

| Debit | Credit |
| - | - |
| Wages and salaries expense | Withholdings payable (account of each policy: ISSS, AFP...) |
| Expense of each employer contribution | Income tax withheld payable |
| Expense of bonuses with their own account | Employer contributions payable |
| | Salaries payable (net) |

**Payment entry**

| Debit | Credit |
| - | - |
| Salaries payable | Payroll payment bank |

> [!NOTE]
>
> Absences and unpaid leave reduce the salary expense; they are not recorded as a withholding.

## Payroll provisions

With the **Payroll provisions** type, select branch and **month**, and click **Calculate provision**. The total per concept and the detail per active employee are shown. Then, **Generate provision entry** records:

| Debit | Credit |
| - | - |
| Year-end bonus (aguinaldo) provision expense | Year-end bonus (aguinaldo) payable |
| Vacation provision expense | Vacation payable |
| Severance provision expense | Severance payable |

Monthly calculation in El Salvador (1/12 of the annual amount):

| Concept | Annual base |
| - | - |
| Year-end bonus (aguinaldo) | Days of the seniority bracket × daily salary |
| Vacation | 15 days × daily salary + 30% surcharge |
| Severance | 30 days × capped daily salary (severance policy) |

Until the month's provision has been posted, it can be recalculated. For countries without configured provision rules, no amounts are generated.

## Common errors

| Error | Solution |
| - | - |
| Configure the entry type for inventory adjustments / transfers | Choose the entry type in [Accounting Settings → Inventory](https://docs.filexpress.app/en/docs/contabilidad/configuracion.md#inventory-adjustments-and-transfers). |
| The product has no recorded cost | Record the product's cost; the adjustment or transfer can be processed afterward. |
| Missing accounting configuration | Configure the indicated account in [Accounting Settings](https://docs.filexpress.app/en/docs/contabilidad/configuracion.md) or in the payroll policy. |
| The period is closed | Reopen the period in [Periods](https://docs.filexpress.app/en/docs/contabilidad/periodos.md) or process in an open period. |
| The payroll is not yet paid | Finish marking the payroll payments. |

> [!WARNING]
>
> If the accounting period is **closed**, processing is blocked to protect the close.


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