subscriptions
: Subscriptions¶
The lino_xl.lib.subscriptions
plugin adds functionality for managing
invoice-generating subscriptions.
For an end-user introduction read subscriptions : Subscriptions and similar agreements.
Table of contents:
This is a tested document. The following instructions are used for initialization:
>>> from lino import startup
>>> startup('lino_book.projects.noi1r.settings')
>>> from lino.api.doctest import *
Dependencies¶
>>> dd.plugins.subscriptions
lino_noi.lib.subscriptions (needs_plugins=['lino_xl.lib.invoicing'])
>>> dd.plugins.invoicing
lino_xl.lib.invoicing (needed_by=lino_noi.lib.subscriptions, needs_plugins=['lino_xl.lib.sales'])
Examples¶
>>> rt.show(subscriptions.RefSubscriptions)
=========== ===================== ============== ================
Reference Partner Subject line Workflow
----------- --------------------- -------------- ----------------
aab Bäckerei Mießen **Registered**
bcc Bäckerei Schmitz **Registered**
dde Garage Mergelsberg **Registered**
welket Rumma & Ko OÜ **Registered**
welsch Bäckerei Ausdemwald **Registered**
=========== ===================== ============== ================
>>> rt.show(subscriptions.AllSubscriptions)
==== ================================ ======== ============ =====================
ID Journal No. Entry date Partner
---- -------------------------------- -------- ------------ ---------------------
1 Service Level Agreements (SLA) 1 07/01/2014 Rumma & Ko OÜ
2 Service Level Agreements (SLA) 2 27/01/2014 Bäckerei Ausdemwald
3 Service Level Agreements (SLA) 3 16/02/2014 Bäckerei Mießen
4 Service Level Agreements (SLA) 4 08/03/2014 Bäckerei Schmitz
5 Service Level Agreements (SLA) 5 28/03/2014 Garage Mergelsberg
**15**
==== ================================ ======== ============ =====================
>>> obj = subscriptions.Subscription.objects.get(pk=2)
>>> rt.show(invoicing.InvoicingsByGenerator, obj)
==================== ========== ================================================================= ============= ============ ==============
Sales invoice Quantity Heading Description Unit price Total to pay
-------------------- ---------- ----------------------------------------------------------------- ------------- ------------ --------------
SLS 2/2014 1 welsch Bäckerei Ausdemwald (SLA 2/2014) 27/01/2014...26/01/2015
SLS 2/2015 1 welsch Bäckerei Ausdemwald (SLA 2/2014) 27/01/2015...26/01/2016
**Total (2 rows)** **2**
==================== ========== ================================================================= ============= ============ ==============
>>> show_choices('robin', '/choices/tickets/Ticket/order')
...
welket Rumma & Ko OÜ (SLA 1/2014)
welsch Bäckerei Ausdemwald (SLA 2/2014)
aab Bäckerei Mießen (SLA 3/2014)
bcc Bäckerei Schmitz (SLA 4/2014)
dde Garage Mergelsberg (SLA 5/2014)