Data model for physical sales(POS)

Hi all! I was wondering if somebody else implemented a POS system in Moqui. More specifically I’m wondering if there is some data model available already for POS sales, something like a POSLine or similar.

Because when we talk about physical in store sales, the Invoice or OrderHeader don’t really apply so well since most of the time we don’t have any information about the customer, like the name or contact mechanisms.

Did somebody else implemented a POS system with Moqui, and if yes, did you do it with the standard data model in the udm, or did you customized and added new entities?

This isn’t a full explanation of the model, but there has been pos stuff done with Moqui before.

Off the top of my head there is a terminalId on OrderHeader

        <field name="terminalId" type="text-short"><description>ID for the terminal, such as a POS system, where the order was recorded</description></field>

Yea, I just realized a bit after posting that we don’t actually need a separate POSLine, because a POS sale is basically an Order, so we can customize the OrderHeader and OrderLine for the POS specific case. I didn’t yet tested this approach, but probably I will use the following settings:

  • Register a simple in-store Sale as an Order with no customer(or placeholder customer like _NA_)
  • If shipment or Invoice is needed, then register the customer and shipment/billing as usual
  • The payment is the specific part. So I guess I should create some new payment methods for in-store cash, in-store credit card or cash on delivery and either add a terminalId to the payment or link the terminal to the terminalId from the OrderHeader(as it already has this field, as you mentioned above). I just hope I can receive a payment for an Order, instead of just for invoices…
  • Then at the end of the day I need the total cash per terminal, which I can get from the payments, since they are linked to the terminalId
  • Or instead of using a terminalId I could use the FinancialAccount??, as a terminal is similar to a BankAccount(as in it stores money, but inside the store, not inside the bank)… not sure about this one…

Note
As I was writting this I thought a bit more about where the terminalId should be stored, and I think it should be on the Payment, not OrderHeader, as the terminal is just the place where you store cash, and you receive cash through payments, not orders.
I’m thinking about my case, where we have 2 stores in the same city(one terminal per store), and we could register an order in any of the 2 stores, and then receive the payment(or multiple partial payments) for the order in any of the 2 stores(aka terminals), so I know how much cash we have in each terminal at a given time.