Point of Sale

Handel detaliczny i gastronomia

MarketplaceOperacjeWersja 0.3.0AGPL-3.0-or-latermanifest

Do czego służy ​

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.

Co pakiet robi, a czego nie robi ​

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.

Szczegóły modułu ​

  • Wersja: 0.3.0
  • Autor: SpaceCorps
  • Licencja: AGPL-3.0-or-later
  • Wymaga rdzenia: ^0.2 (aktualny rdzeń to 0.2.0)
  • Dojrzałość: Eksperymentalny
  • Kategorie: Sprzedaż

Modele ​

pos_config ​

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

Grupa odczytu: pos.user. Grupa zapisu: pos.manager.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
nametextnoneniepos.userjawnieName of the till or shop, for example Main street shop
currencytextnoneniepos.userjawnieISO 4217 currency code, for example EUR
receipt_headerlongtextnoneniepos.userjawnieText printed at the top of receipts
cash_controlboolnoneniepos.userjawnieWhether sessions must count the cash in the drawer when they open and close
default_opening_cashmoneynoneniepos.userjawnieCash normally left in the drawer overnight (minor currency units)
allow_refundsboolnoneniepos.userjawnieWhether cashiers may propose refunds at this point of sale
activeboolnoneniepos.userjawnieWhether 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

Grupa odczytu: pos.user. Grupa zapisu: pos.user.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
config_idref → pos_confignoneniepos.userjawnieThe point of sale the session belongs to
cashiertextinternaltakpos.userzamaskowaneName of the cashier who opened the session
opened_ondatenoneniepos.userjawnieDay the session was opened (YYYY-MM-DD)
closed_ondatenoneniepos.userjawnieDay the session was closed (YYYY-MM-DD)
opening_cashmoneyfinancialniepos.userwstrzymaneCash counted in the drawer at opening (minor currency units)
expected_cashmoneyfinancialniepos.userwstrzymaneCash the drawer should hold at closing: opening cash plus cash payments (entered, not computed)
closing_cashmoneyfinancialniepos.userwstrzymaneCash actually counted in the drawer at closing
cash_differencemoneyfinancialniepos.userwstrzymaneClosing cash minus expected cash; negative means money is missing
notelongtextnoneniepos.userjawnieExplanation for any cash difference
stateselect (open, closed)noneniepos.userjawnieSession status: open, closed

pos_order ​

A sale rung up at a point of sale

Grupa odczytu: pos.user. Grupa zapisu: pos.user.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
session_idref → pos_sessionnoneniepos.userjawnieThe session the sale was made in
receipt_numbersequencenoneniepos.userjawnieNumber 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_idref → inventory_locationnoneniepos.userjawnieWhere the goods leave stock; paying creates the stock moves from this location
ordered_ondatenoneniepos.userjawnieDay of the sale (YYYY-MM-DD)
customer_idref → partynoneniepos.userjawnieThe customer, when one was identified
tax_totalmoneynoneniepos.userjawnieTax included in the total (minor currency units)
totalmoneynoneniepos.userjawnieTotal paid by the customer including tax: the sum of the line subtotals (minor currency units)
notelongtextnoneniepos.userjawnieRemark about the sale
stateselect (draft, paid, refunded, cancelled)noneniepos.userjawnieSale status: draft, paid, refunded, cancelled

pos_order_line ​

One product line of a sale

Grupa odczytu: pos.user. Grupa zapisu: pos.user.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
order_idref → pos_ordernoneniepos.userjawnieThe sale the line belongs to
product_idref → productnoneniepos.userjawnieThe product sold
descriptiontextnoneniepos.userjawnieText shown on the receipt
quantitynumbernoneniepos.userjawnieUnits sold
unit_pricemoneynoneniepos.userjawniePrice per unit including tax (minor currency units)
discount_bpnumbernoneniepos.userjawnieDiscount in basis points: 1000 means 10.00 percent
subtotalmoneynoneniepos.userjawnieLine 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

Grupa odczytu: pos.user. Grupa zapisu: pos.user.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
order_idref → pos_ordernoneniepos.userjawnieThe sale the payment is for
methodselect (cash, card, bank_transfer, voucher, other)noneniepos.userjawnieHow the customer paid: cash, card, bank_transfer, voucher, other
amountmoneyfinancialniepos.userwstrzymaneAmount paid with this method (minor currency units)
paid_ondatenoneniepos.userjawnieDay of the payment (YYYY-MM-DD)
provider_referencetextfinancialtakpos.userwstrzymaneReference from the card terminal or payment provider; never a card number

Przepływy pracy ​

pos_session ​

AkcjaPrzenosiKto może uruchomićZatwierdzenie
pos_session.closestate: open → closedpos.managertak

pos_order ​

AkcjaPrzenosiKto może uruchomićZatwierdzenie
pos_order.paystate: draft → paidpos.usernie
pos_order.cancelstate: draft → cancelledpos.usernie
pos_order.refundstate: paid → refundedpos.managertak

Grupy uprawnień ​

Grupy używane przez tę aplikację:

  • pos.manager
  • pos.user

Kroki zatwierdzania ​

Kroki, które agent może tylko zaproponować:

  • pos_session.close
  • pos_order.refund

Co agenci mogą, a czego nie mogą ​

Agent może odczytywać, wyszukiwać, tworzyć i aktualizować rekordy tej aplikacji oraz uruchamiać akcje niewymagające zatwierdzenia, w ramach grup uprawnień swojego tokenu.

Te kroki może tylko zaproponować, a człowiek musi je zatwierdzić: pos_session.close, pos_order.refund, pos_config.delete, pos_session.delete, pos_order.delete, pos_order_line.delete, pos_payment.delete.

Dane osobowe są maskowane jako tokeny zastępcze: pos_session.cashier.

Te pola są całkowicie wstrzymane i niedostępne dla agentów: pos_session.opening_cash, pos_session.expected_cash, pos_session.closing_cash, pos_session.cash_difference, pos_payment.amount, pos_payment.provider_reference.

Zależności ​

Każda zależność podaje akceptowane wersje. Aplikacje wbudowane są wersjonowane razem z rdzeniem, więc wymaganie wobec nich sprawdza się względem wersji rdzenia.

Instalacja tej aplikacji z marketplace instaluje też brakujące zależności, w jednym planie potwierdzanym raz.

Instalacja ​

Zainstaluj ją w aplikacji Customize (Marketplace) lub z wiersza poleceń:

bash
obop modules install-from pos

Wymaga bazy danych i uprawnień administratora.

Zbuduj własną ​

Przewodnik po modułach pokazuje, jak pisze się takie aplikacje