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

# Points of sale

> Establishment codes, cash registers per branch, and electronic document numbering

A **point of sale** is each cash register of a branch that issues electronic documents. Each one has its own numbering and its own cash register shifts, so two cash registers in the same store can invoice at the same time without sharing sequence numbers.

## Establishment and point of sale

| Concept | Where it is configured | Format | Examples |
| - | - | - | - |
| **Establishment code** | Branch | One uppercase letter and 3 digits | `M001` headquarters, `S001`, `S002`… branches |
| **Point of sale code** | Each cash register of the branch | `P` and 3 digits | `P001` (default), `P002`… |

The establishment code is unique within the company and the point of sale code is unique within its branch. The formats in the table are those of El Salvador; in other countries the codes are defined by the tax authority or the e-invoicing provider (see below).

### How the codes are used in the electronic document

In every country, each point of sale has its own numbering per document type: if `P001` is at invoice 120 and `P002` at 15, each follows its own sequence. What changes by country is **how the document number is built**, because it is defined by each country's tax authority.

> [tab] El Salvador
>
> The DTE (electronic tax document) carries a **control number** that FileXpress builds from the establishment code and the point of sale code registered with the Ministry of Finance (Hacienda):
>
> ```text theme={null}
> DTE-01-M001P002-000000000000015
>     │  └──┘└──┘  └─────────────┘
>     │   │   │         correlativo del punto de venta
>     │   │   └ punto de venta
>     │   └ establecimiento
>     └ tipo de documento (01 = Factura)
> ```
>
> Invalidating a DTE reports to Hacienda the same establishment and point of sale with which it was issued.

> [tab] Guatemala
>
> Under the FEL regime, the SAT identifies the document by the **series, number, and authorization number (UUID)** assigned by the SAT when certifying it; there is no control number with establishment and point of sale as in El Salvador.
>
> * The **establishment code** is the number the SAT has registered for each establishment of your NIT (for example `1`, `2`, `3`) and travels in the issuer data.
> * The **point of sale** is not part of the document before the SAT. It is used inside FileXpress to separate cash registers and shifts.
>
> ```text theme={null}
> Serie: 7A3F1C2B   Número: 2638104353
> Autorización: 7A3F1C2B-9D4E-4F21-8B6A-0C5D2E9F1A73
> ```

> [tab] Colombia
>
> The DIAN identifies the invoice by the **prefix and consecutive number** of a numbering resolution, plus the **CUFE** calculated when it is issued.
>
> * Each point of sale can have its own **prefix and authorized range** (one resolution per cash register or location), which acts as its independent numbering.
> * The establishment code is used to identify the location within FileXpress.
>
> ```text theme={null}
> FE 1001   (prefijo de la caja + consecutivo dentro del rango autorizado)
> ```

> [tab] Costa Rica
>
> Hacienda uses a **20-digit consecutive number** that includes the branch and the terminal (equivalent to the point of sale):
>
> ```text theme={null}
> 001 00002 01 0000000015
> │   │     │  └ consecutivo
> │   │     └ tipo de comprobante (01 = Factura)
> │   └ terminal / punto de venta
> └ sucursal
> ```

> [tab] Other countries
>
> Where there is no state e-invoicing (for example the United States), FileXpress numbers its own invoices (`INV-1001`, `INV-1002`…). The establishment and point of sale are used to organize cash registers, shifts, and reports.

> [!NOTE]
>
> The examples for Guatemala, Colombia, and Costa Rica are illustrative: the final format is defined by each country's tax authority. FileXpress transmits electronic documents to Hacienda (El Salvador) and to the SAT (Guatemala); in the United States there is no transmission. For other countries, check with support for availability.

> [!WARNING]
>
> **El Salvador: verify your codes with Hacienda.** With this update, each branch automatically received an establishment code (`M001` for headquarters and `S001`, `S002`… for the others, in the order they were created) and a default `P001` point of sale, which continues the numbering it already had. Check in **Branch → General → Establishment code** that each branch's code matches the one registered with Hacienda and correct it if it does not. Documents from branches that are not headquarters are now issued with their own code (for example `DTE-01-S001P001-…` instead of `DTE-01-M001P001-…`).

## Branch establishment code

It is defined in **Branch → General → Establishment code** and is required, also when creating a new branch. Below it the **current code** is shown (establishment + default point of sale, for example `M001P001`).

Changing it only affects new documents. Documents already issued keep the control number with which they were transmitted.

## Manage points of sale

Go to **Branch → Points of sale**. The table shows the code, the name, which one is the default, whether it is active, and the status of its cash register shift.

### Create a point of sale

**1. Enter the code (for example P002) and the name (for example Register 2)**

**2. Click Add point of sale**

FileXpress creates its own numbering for each document type, starting at 1.

### Default

Every branch always has **one** default point of sale. It is used for sales that do not indicate a point of sale and do not belong to a cash register shift. To change it, click **Make default** on another active point of sale; the previous one stops being the default and the branch's current code is updated.

### Edit, deactivate, or delete

* **Edit**: change the name or check or uncheck **Active**. The code cannot be changed. Renaming does not alter documents already issued.
* **Deactivate**: an inactive point of sale does not issue or open a cash register. You cannot deactivate the default one or one with an open cash register shift.
* **Delete**: only if it never issued documents or had cash register shifts. If it has, deactivate it. The default one cannot be deleted.

## Cash register per point of sale

In [Cash Register](https://docs.filexpress.app/en/docs/caja/caja-registradora.md) each shift is opened at a point of sale:

* If the branch has only one active point of sale, that one is used without asking.
* If it has several, when opening the cash register you choose the **Point of sale**.
* Each point of sale admits only one open shift at a time; different points of sale can have shifts open at the same time.
* The shift's sales, including those from the [POS](https://docs.filexpress.app/en/docs/caja/punto-de-venta.md), are issued with the numbering of their point of sale.

### Who opened and who closed

Each shift records the user who **opened** it and the one who **closed** it, who can be different (for example, a cashier opens and a supervisor closes). They are visible in:

* The open cash register screen (**Opened by**).
* The **Cash register history** (columns **Opened by** and **Closed by**, and in the shift detail).
* The **Cash register shift** column of **Branch → Points of sale**: if open, who opened it and since when; if not, who opened and closed the last shift.

## If you do not use the POS or the cash register

You do not need to change anything. Sales from [New Sale](https://docs.filexpress.app/en/docs/ventas/nueva-venta.md) that do not belong to a cash register shift are issued with the **default** point of sale (`P001`). If the branch has more than one active point of sale, the **Point of sale** field appears in **Advanced billing options** so you can choose another; empty = default.

The point of sale is decided in this order:

1. The one from the sale's cash register shift, if it has one.
2. The one chosen in the sale (or sent through the [API](https://docs.filexpress.app/en/docs/api/puntos-de-venta.md)).
3. The branch's default.

## Issued documents and invalidation

Each document stores the establishment and point of sale with which it was issued; the sales list shows it as **Point of sale** (for example `M001P002`). [Invalidation](https://docs.filexpress.app/en/docs/ventas/nueva-venta.md#invalidate-a-dte) always uses those codes, even if the branch code changes later or the point of sale is renamed.


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