Point of Sale

Butik och restaurang

MarknadsplatsVerksamhetVersion 0.1.0manifest

Vad den är till för ​

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.

Vad paketet gör och inte gör ​

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.

Modeller ​

pos_config ​

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

Läsgrupp: pos.user. Skrivgrupp: pos.manager.

FältTypDataklassPersonuppgiftGruppAgenter serBeskrivning
nametextnonenejpos.useri klartextName of the till or shop, for example Main street shop
currencytextnonenejpos.useri klartextISO 4217 currency code, for example EUR
receipt_headerlongtextnonenejpos.useri klartextText printed at the top of receipts
cash_controlboolnonenejpos.useri klartextWhether sessions must count the cash in the drawer when they open and close
default_opening_cashmoneynonenejpos.useri klartextCash normally left in the drawer overnight (minor currency units)
allow_refundsboolnonenejpos.useri klartextWhether cashiers may propose refunds at this point of sale
activeboolnonenejpos.useri klartextWhether 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

Läsgrupp: pos.user. Skrivgrupp: pos.user.

FältTypDataklassPersonuppgiftGruppAgenter serBeskrivning
config_idref → pos_confignonenejpos.useri klartextThe point of sale the session belongs to
cashiertextinternaljapos.usermaskeradName of the cashier who opened the session
opened_ondatenonenejpos.useri klartextDay the session was opened (YYYY-MM-DD)
closed_ondatenonenejpos.useri klartextDay the session was closed (YYYY-MM-DD)
opening_cashmoneyfinancialnejpos.userundanhållenCash counted in the drawer at opening (minor currency units)
expected_cashmoneyfinancialnejpos.userundanhållenCash the drawer should hold at closing: opening cash plus cash payments (entered, not computed)
closing_cashmoneyfinancialnejpos.userundanhållenCash actually counted in the drawer at closing
cash_differencemoneyfinancialnejpos.userundanhållenClosing cash minus expected cash; negative means money is missing
notelongtextnonenejpos.useri klartextExplanation for any cash difference
stateselect (open, closed)nonenejpos.useri klartextSession status: open, closed

pos_order ​

A sale rung up at a point of sale

Läsgrupp: pos.user. Skrivgrupp: pos.user.

FältTypDataklassPersonuppgiftGruppAgenter serBeskrivning
session_idref → pos_sessionnonenejpos.useri klartextThe session the sale was made in
receipt_numbertextnonenejpos.useri klartextNumber printed on the receipt. Free text: packages cannot generate sequences
ordered_ondatenonenejpos.useri klartextDay of the sale (YYYY-MM-DD)
customer_idref → partynonenejpos.useri klartextThe customer, when one was identified
tax_totalmoneynonenejpos.useri klartextTax included in the total (minor currency units)
totalmoneynonenejpos.useri klartextTotal paid by the customer including tax (minor currency units, entered not computed)
notelongtextnonenejpos.useri klartextRemark about the sale
stateselect (draft, paid, refunded, cancelled)nonenejpos.useri klartextSale status: draft, paid, refunded, cancelled

pos_order_line ​

One product line of a sale

Läsgrupp: pos.user. Skrivgrupp: pos.user.

FältTypDataklassPersonuppgiftGruppAgenter serBeskrivning
order_idref → pos_ordernonenejpos.useri klartextThe sale the line belongs to
product_idref → productnonenejpos.useri klartextThe product sold
descriptiontextnonenejpos.useri klartextText shown on the receipt
quantitynumbernonenejpos.useri klartextUnits sold
unit_pricemoneynonenejpos.useri klartextPrice per unit including tax (minor currency units)
discount_bpnumbernonenejpos.useri klartextDiscount in basis points: 1000 means 10.00 percent
subtotalmoneynonenejpos.useri klartextLine 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

Läsgrupp: pos.user. Skrivgrupp: pos.user.

FältTypDataklassPersonuppgiftGruppAgenter serBeskrivning
order_idref → pos_ordernonenejpos.useri klartextThe sale the payment is for
methodselect (cash, card, bank_transfer, voucher, other)nonenejpos.useri klartextHow the customer paid: cash, card, bank_transfer, voucher, other
amountmoneyfinancialnejpos.userundanhållenAmount paid with this method (minor currency units)
paid_ondatenonenejpos.useri klartextDay of the payment (YYYY-MM-DD)
provider_referencetextfinancialjapos.userundanhållenReference from the card terminal or payment provider; never a card number

Arbetsflöden ​

pos_session ​

ÅtgärdFlyttarVem får köra denGodkännande
pos_session.closestate: open → closedpos.managerja

pos_order ​

ÅtgärdFlyttarVem får köra denGodkännande
pos_order.paystate: draft → paidpos.usernej
pos_order.cancelstate: draft → cancelledpos.usernej
pos_order.refundstate: paid → refundedpos.managerja

Behörighetsgrupper ​

Grupper som den här appen använder:

  • pos.manager
  • pos.user

Steg som kräver godkännande ​

Steg som en agent bara kan föreslå:

  • pos_session.close
  • pos_order.refund

Vad agenter kan och inte kan göra ​

En agent kan läsa, söka, skapa och uppdatera poster i den här appen, och köra de åtgärder som inte kräver godkännande, inom behörighetsgrupperna för sin token.

Den kan bara föreslå de här stegen, och en person måste godkänna dem: pos_session.close, pos_order.refund, pos_config.delete, pos_session.delete, pos_order.delete, pos_order_line.delete, pos_payment.delete.

Personuppgifter maskeras som platshållare: pos_session.cashier.

De här fälten undanhålls helt från agenter: pos_session.opening_cash, pos_session.expected_cash, pos_session.closing_cash, pos_session.cash_difference, pos_payment.amount, pos_payment.provider_reference.

Beroenden ​

  • base
  • product

Installera ​

Installera den från appen Customize (Marknadsplats), eller från kommandoraden:

bash
obop modules install-from pos

Kräver en databas och administratörsbehörighet.

Bygg din egen ​

Modulguiden visar hur appar som den här skrivs