Point of Sale
Einzelhandel und Gastronomie
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. Line subtotals and the order total are computed from the lines, receipts get a gapless yearly number, and paying is refused until the payments cover the total; change and cash differences are still entered. Paying also creates a draft stock move per line from the order's stock location, for the warehouse to validate. Card numbers must never be stored; keep only the payment provider's reference. Needs the Products package.
Moduldetails
- Version:
0.3.0 - Autor: SpaceCorps
- Lizenz: AGPL-3.0-or-later
- Benötigt Kern:
^0.2(aktuell ist Kern 0.2.0) - Reifegrad: Experimentell
- Kategorien: Vertrieb
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 | sequence | none | nein | pos.user | im Klartext | Number printed on the receipt, such as R-2026-000042: a gapless series that starts again each year, assigned when the sale is created |
stock_location_id | ref → inventory_location | none | nein | pos.user | im Klartext | Where the goods leave stock; paying creates the stock moves from this location |
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: the sum of the line subtotals (minor currency units) |
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: quantity times unit price, less the discount (minor currency units) |
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.managerpos.user
Freigabeschritte
Schritte, die ein Agent nur vorschlagen kann:
pos_session.closepos_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
Jede Abhängigkeit nennt die Versionen, die sie akzeptiert. Integrierte Apps werden mit dem Kern versioniert; eine Anforderung an sie wird daher gegen die Kernversion geprüft.
Beim Installieren dieser App aus dem Marktplatz werden fehlende Abhängigkeiten mitinstalliert, in einem Plan, der einmal bestätigt wird.
Installation
Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:
obop modules install-from posErfordert eine Datenbank und Administratorrechte.
Selbst bauen
Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden