Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

products in Lino Tera

The lino_xl.lib.products plugin is called “Fees” in Lino Tera because here we don’t produce anything, we just sell services.

Side note: Code snippets (lines starting with >>>) in this document get tested as part of our development workflow. The following initialization snippet tells you which demo project is being used in this document.

>>> from lino import startup
>>> startup('lino_book.projects.tera1.settings.doctests')
>>> from lino.api.doctest import *

Fees

>>> rt.show(products.Products)  
==================== ================== ==================== ============= ===========================
 Designation          Designation (de)   Designation (fr)     Sales price   Sales account
-------------------- ------------------ -------------------- ------------- ---------------------------
 Group therapy        Gruppentherapie    Group therapy        30,00         (7010) Sales on therapies
 Individual therapy   Einzeltherapie     Individual therapy   20,00         (7010) Sales on therapies
 Individual therapy   Einzeltherapie     Individual therapy   20,00         (7010) Sales on therapies
 Other                Sonstige           Autre                35,00
 Session              Sitzung            Session              15,00
 **Total (5 rows)**                                           **120,00**
==================== ================== ==================== ============= ===========================

Daybooks

>>> rt.show(products.Daybooks)
===================== =================== ===================== ===============
 Designation           Designation (de)    Designation (fr)      Sales account
--------------------- ------------------- --------------------- ---------------
 Cash daybook Daniel   Kassenbuch Daniel   Cash daybook Daniel
===================== =================== ===================== ===============

Price rules

Price rules are used in Lino Tera to define the “tarification table”

class lino_tera.lib.products.PriceFactors

A choicelist of “price factors”.

This list is empty by default. Applications can define their specific price factors. Every price factor causes a field to be injected to the lino_xl.lib.contats.Partner model.

>>> rt.show(products.PriceFactors)
======= ============= =======================
 value   name          text
------- ------------- -----------------------
 10      residence     Residence
 20      income        Income category
 30      composition   Household composition
======= ============= =======================
class lino_tera.lib.products.PriceRules

The list of price rules.

>>> rt.show(products.PriceRules)
===== =========== ================= ==================================== ======================== ====================
 No.   Residence   Income category   Household composition                Service type             Fee
----- ----------- ----------------- ------------------------------------ ------------------------ --------------------
 1                                   More than one participant below 18   Individual appointment   Individual therapy
 2                                                                        Group meeting            Group therapy
 3                                                                        Individual appointment   Individual therapy
===== =========== ================= ==================================== ======================== ====================