Basics | Plugins | Howtos

Storage management

The storage plugin is about storing the things you own in different places and about moving them around. You need it –obviously– for warehouse management applications, but also –less obviously– for managing time credit at a service provider or multiple entry passes at a theater or swimming pool.

multiple entry pass

A ticket by which a customer purchases a certain number of entries, usually at a reduced price per entry.

time credit

A number of working hours purchased by a customer who pays for service in advance.

warehouse

A building where raw materials or manufactured goods may be stored prior to their distribution for sale.

Provisions

provision

A given quantity of a given product (or service) for which a given partner has initiated a transaction.

provision state

The state of a provision within its life cycle.

Typical examples of provision states are “in stock”, “ordered by customer”, “ordered from provider”, “rented out”, “damaged”, “under repair” or “purchased”.

For example, when customer Albert orders 50 light bulbs, Lino might create a provision “partner: Albert; product: light bulb; quantity: 50; state: ordered”. When Albert got his light bulbs, the storage state changes to “delivered” and when the invoice has been sent the state changes to “sold”.

$ go noi1r; pm show storage.Provisions
==== ===================== ============= =============== ==============
 ID   Partner               Product       Storage state   qty
---- --------------------- ------------- --------------- --------------
 1    Rumma & Ko OÜ         Development   Purchased       -903:51
 2    Bäckerei Schmitz      Development   Purchased       -744:26
 3    Bäckerei Ausdemwald   Development   Purchased       -753:29
 4    Garage Mergelsberg    Development   Purchased       -914:12
 5    Bäckerei Mießen       Development   Purchased       -734:26
                                                          **-4050:24**
==== ===================== ============= =============== ==============

For some provision states the partner is irrelevant. For example when we see that 3 books are “ordered by customer”, we need to know the customer who ordered them, but when we have 30 books “in stock”, then these books aren’t assigned to a given partner.

In noi1r we use only one provision state named “purchased”, and two transfer rules:

$ go noi1r; pm show storage.TransferRules
===== ======================= =========== ===========
 No.   Journal                 From        To
----- ----------------------- ----------- -----------
 1     Sales invoices (SLS)                Purchased
 2     Service reports (SRV)   Purchased
===== ======================= =========== ===========
  • A service report (SRV) debits “purchased”

  • A sales invoice (SLS) credits “purchased”

transfer rule

A configuration database row that specifies when a given ledger voucher “transfers” a product from one provision to another.

And there would be only one product with storage management enabled, and that product would be named “Time credit”. Maybe there will be multiple products in order to differentiate between “temporary” (befristet) and “timeless” (unbefristet) time credit.

A subscription agreement must somehow specify the “required provision”, which means that the customer must always have a minimum provision of time credit. For example they buy 10 hours, which are being used up with each working session, and when the time credit gets used up they want to buy new credit. This is done using fillers. For each subscription that has such a “required provision”, Lino can check whether the partner still has enough provision. If not, it would generate an invoice to buy new time credit.

$ go noi1r; pm show storage.Fillers
==== ===================== ============== =============== =================== =============== ============
 ID   Partner               Must invoice   Storage state   Provision product   Minimum asset   Fill asset
---- --------------------- -------------- --------------- ------------------- --------------- ------------
 1    Rumma & Ko OÜ         No             Purchased       Development         2:00            10:00
 2    Bäckerei Ausdemwald   No             Purchased       Development         2:00            10:00
 3    Bäckerei Mießen       No             Purchased       Development         2:00            10:00
 4    Bäckerei Schmitz      No             Purchased       Development         2:00            10:00
 5    Garage Mergelsberg    No             Purchased       Development         2:00            10:00
                                                                               **10:00**       **50:00**
==== ===================== ============== =============== =================== =============== ============

To specify this, we could simply add three new fields:

  • “product” : a pointer to the “Time credit” product

  • a minimum quantity (e.g. 5 hours)

  • an order quantity (e.g. 10 hours)

We have two basic approaches for generating invoices:

  • “period-based invoicing” : The enrolment has a start_date and an end_date, and the “subscription periodicity” gives renew_unit, renew_every and renew_before. Period-based invoicing is for subscriptions, with a monthly or yearly fee.

  • “occurence-based invoicing” : Lino needs a number_of_events, a min_asset and max_asset. This is used e.g. in Voga when a customer buys a “multi-pass card” for 10 sessions of an activity.

Side note. How to handle quantity-related prices? For example the unit price of an hour would be 90 € while 5 hours would cost only 400 € and 10 hours only 750 €. –> This is not related to the storage plugin and should be addressed by “price rules” or “complex products”.

A storage filler