How Lino Tera generates invoices¶
In Lino Tera every meeting with a therapist is basically invoiceable. Unlike in e.g. in Lino Voga they are invoiced afterwards, not in advance.
General functionality for automatically generating invoices is defined
This is a tested document. The following instructions are used for initialization:
>>> from lino import startup >>> startup('lino_book.projects.lydia.settings.doctests') >>> from lino.api.doctest import *
For individual and family therapies the meetings themselves
Event) are invoiceable while for
group therapies every individual presence (
Guest) of a meeting is invoiceable.
The invoice generator is either the therapy (for individual and family therapies) or the enrolment (for group therapies).
>>> rt.models_by_base(rt.models.invoicing.InvoiceGenerator) [<class 'lino_tera.lib.courses.models.Course'>, <class 'lino_tera.lib.courses.models.Enrolment'>, <class 'lino_xl.lib.sales.models.InvoiceItem'>]
Lino Tera uses this functionality by extending the models
so that they inherit from
>>> dd.plugins.ledger.start_year 2015