---
title: "Point of Sale"
description: "Einzelhandel und Gastronomie. Jede App ist ein Modul auf einem gemeinsamen Datenmodell."
canonical: "https://obop-platform.sliplane.app/de/apps/pos/"
lang: "de"
---

# Point of Sale

## Wofür sie gedacht ist

Model a shop till: configuration, cash-controlled sessions, orders with lines and payment lines per method. It records what happened at the till; it is not a payment terminal integration, and card numbers must never be stored.

## Was das Paket leistet und was nicht

Shop tills: a point-of-sale configuration, cash-controlled sessions that are opened and closed, orders with lines, and payment lines per method. A refund and the closing of a session need a human approval from a manager; agents may only propose them. Totals, change and cash differences are entered, not computed. Card numbers must never be stored; keep only the payment provider's reference. Needs the Products package.

## Modelle

### `pos_config`

A point of sale (a till or a shop) and its rules

Lesegruppe: `pos.user`. Schreibgruppe: `pos.manager`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nein | `pos.user` | im Klartext | Name of the till or shop, for example Main street shop |
| `currency` | text | `none` | nein | `pos.user` | im Klartext | ISO 4217 currency code, for example EUR |
| `receipt_header` | longtext | `none` | nein | `pos.user` | im Klartext | Text printed at the top of receipts |
| `cash_control` | bool | `none` | nein | `pos.user` | im Klartext | Whether sessions must count the cash in the drawer when they open and close |
| `default_opening_cash` | money | `none` | nein | `pos.user` | im Klartext | Cash normally left in the drawer overnight (minor currency units) |
| `allow_refunds` | bool | `none` | nein | `pos.user` | im Klartext | Whether cashiers may propose refunds at this point of sale |
| `active` | bool | `none` | nein | `pos.user` | im Klartext | Whether the point of sale is in use |

### `pos_session`

One shift of selling at a point of sale, from opening to closing the cash drawer

Lesegruppe: `pos.user`. Schreibgruppe: `pos.user`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `config_id` | ref → pos_config | `none` | nein | `pos.user` | im Klartext | The point of sale the session belongs to |
| `cashier` | text | `internal` | ja | `pos.user` | maskiert | Name of the cashier who opened the session |
| `opened_on` | date | `none` | nein | `pos.user` | im Klartext | Day the session was opened (YYYY-MM-DD) |
| `closed_on` | date | `none` | nein | `pos.user` | im Klartext | Day the session was closed (YYYY-MM-DD) |
| `opening_cash` | money | `financial` | nein | `pos.user` | zurückgehalten | Cash counted in the drawer at opening (minor currency units) |
| `expected_cash` | money | `financial` | nein | `pos.user` | zurückgehalten | Cash the drawer should hold at closing: opening cash plus cash payments (entered, not computed) |
| `closing_cash` | money | `financial` | nein | `pos.user` | zurückgehalten | Cash actually counted in the drawer at closing |
| `cash_difference` | money | `financial` | nein | `pos.user` | zurückgehalten | Closing cash minus expected cash; negative means money is missing |
| `note` | longtext | `none` | nein | `pos.user` | im Klartext | Explanation for any cash difference |
| `state` | select (open, closed) | `none` | nein | `pos.user` | im Klartext | Session status: open, closed |

### `pos_order`

A sale rung up at a point of sale

Lesegruppe: `pos.user`. Schreibgruppe: `pos.user`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `session_id` | ref → pos_session | `none` | nein | `pos.user` | im Klartext | The session the sale was made in |
| `receipt_number` | text | `none` | nein | `pos.user` | im Klartext | Number printed on the receipt. Free text: packages cannot generate sequences |
| `ordered_on` | date | `none` | nein | `pos.user` | im Klartext | Day of the sale (YYYY-MM-DD) |
| `customer_id` | ref → party | `none` | nein | `pos.user` | im Klartext | The customer, when one was identified |
| `tax_total` | money | `none` | nein | `pos.user` | im Klartext | Tax included in the total (minor currency units) |
| `total` | money | `none` | nein | `pos.user` | im Klartext | Total paid by the customer including tax (minor currency units, entered not computed) |
| `note` | longtext | `none` | nein | `pos.user` | im Klartext | Remark about the sale |
| `state` | select (draft, paid, refunded, cancelled) | `none` | nein | `pos.user` | im Klartext | Sale status: draft, paid, refunded, cancelled |

### `pos_order_line`

One product line of a sale

Lesegruppe: `pos.user`. Schreibgruppe: `pos.user`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `order_id` | ref → pos_order | `none` | nein | `pos.user` | im Klartext | The sale the line belongs to |
| `product_id` | ref → product | `none` | nein | `pos.user` | im Klartext | The product sold |
| `description` | text | `none` | nein | `pos.user` | im Klartext | Text shown on the receipt |
| `quantity` | number | `none` | nein | `pos.user` | im Klartext | Units sold |
| `unit_price` | money | `none` | nein | `pos.user` | im Klartext | Price per unit including tax (minor currency units) |
| `discount_bp` | number | `none` | nein | `pos.user` | im Klartext | Discount in basis points: 1000 means 10.00 percent |
| `subtotal` | money | `none` | nein | `pos.user` | im Klartext | Line total after discount (minor currency units, entered not computed) |

### `pos_payment`

A payment received against a sale; a sale may be paid with several methods

Lesegruppe: `pos.user`. Schreibgruppe: `pos.user`.

| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
| `order_id` | ref → pos_order | `none` | nein | `pos.user` | im Klartext | The sale the payment is for |
| `method` | select (cash, card, bank_transfer, voucher, other) | `none` | nein | `pos.user` | im Klartext | How the customer paid: cash, card, bank_transfer, voucher, other |
| `amount` | money | `financial` | nein | `pos.user` | zurückgehalten | Amount paid with this method (minor currency units) |
| `paid_on` | date | `none` | nein | `pos.user` | im Klartext | Day of the payment (YYYY-MM-DD) |
| `provider_reference` | text | `financial` | ja | `pos.user` | zurückgehalten | Reference from the card terminal or payment provider; never a card number |

## Workflows

### `pos_session`

| Aktion | Bewegt | Wer sie ausführen darf | Freigabe |
|---|---|---|---|
| `pos_session.close` | state: open → closed | `pos.manager` | ja |

### `pos_order`

| Aktion | Bewegt | Wer sie ausführen darf | Freigabe |
|---|---|---|---|
| `pos_order.pay` | state: draft → paid | `pos.user` | nein |
| `pos_order.cancel` | state: draft → cancelled | `pos.user` | nein |
| `pos_order.refund` | state: paid → refunded | `pos.manager` | ja |

## Berechtigungsgruppen

Von dieser App verwendete Gruppen:

- `pos.manager`
- `pos.user`

## Freigabeschritte

Schritte, die ein Agent nur vorschlagen kann:

- `pos_session.close`
- `pos_order.refund`

## Was Agenten tun können und was nicht

Ein Agent kann Datensätze dieser App lesen, durchsuchen, anlegen und aktualisieren sowie Aktionen ausführen, die keine Freigabe brauchen, und zwar innerhalb der Berechtigungsgruppen seines Tokens.

Diese Schritte kann er nur vorschlagen, und eine Person muss sie freigeben: `pos_session.close`, `pos_order.refund`, `pos_config.delete`, `pos_session.delete`, `pos_order.delete`, `pos_order_line.delete`, `pos_payment.delete`.

Personenbezogene Daten werden als Platzhalter maskiert: `pos_session.cashier`.

Diese Felder werden Agenten vollständig vorenthalten: `pos_session.opening_cash`, `pos_session.expected_cash`, `pos_session.closing_cash`, `pos_session.cash_difference`, `pos_payment.amount`, `pos_payment.provider_reference`.

## Abhängigkeiten

- `base`
- `product`

## Installation

Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:

```bash
obop modules install-from pos
```

Erfordert eine Datenbank und Administratorrechte.

## Selbst bauen

[Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden](/de/docs/reference/module-manifest/)
