NEMO billing
This billing plugin for NEMO includes core facilities and custom charges/adjustments. It also includes sub-modules for adding rates and invoices.
Installation
pip install NEMO-billing
Add core billing plugin
in settings.py add to INSTALLED_APPS:
INSTALLED_APPS = [
'...',
'NEMO_billing', # Add before NEMO to have new navbar menu items show up
'NEMO_billing.rates',
'NEMO_billing.invoices',
# 'NEMO_billing.cap_discount', # Optional
# 'NEMO_billing.prepayments', # Optional
# 'NEMO_billing.quotes', # Optional
# 'NEMO_billing.institution_agreements', # Optional
'...',
# 'NEMO_user_details', # If using user details plugin
'...',
'NEMO',
'...'
]
NEMO Compatibility
| NEMO-Billing | NEMO | NEMO-CE |
|---|---|---|
| >= 6.0.0 | >= 8.1.0 | >= 8.1.0 |
| >= 5.0.0 | >= 8.0.0 | >= 8.0.0 |
| >= 4.10.0 | >= 7.4.2 | >= 7.4.6 |
| >= 4.7.0 | >= 7.3.3 | >= 7.3.5 |
| >= 4.4.0 | >= 7.2.0 | >= 7.2.0 |
| >= 4.0.0 | >= 7.0.0 | >= 7.0.0 |
| >= 3.0.0 | >= 6.0.0 | >= 6.0.0 |
| >= 2.9.4 | >= 5.5.3 | >= 2.4.4 |
| >= 2.9.1 | >= 5.5.2 | |
| >= 2.9.0 | >= 5.5.0 | |
| >= 2.8.0 | >= 5.3.0 | |
| >= 2.7.0 | >= 4.7.0 | |
| >= 2.6.13 | >= 4.6.4 | |
| >= 2.5.8 | >= 4.6.0 | |
| >= 2.0.0 | >= 4.5.0 | |
| >= 1.23.0 | >= 4.3.0 | |
| >= 1.22.2 | >= 4.2.1 | |
| >= 1.22.1 | >= 4.2.0 | |
| >= 1.19.0 | >= 4.1.0 | |
| >= 1.18.0 | >= 4.0.0 | |
| >= 1.16.0 | >= 3.14.0 | |
| >= 1.13.0 | >= 3.13.0 | |
| >= 1.5.0 | >= 3.10.0 |
Usage
This plugin will add core facilities and custom charges which can be added through django admin.
Core Facility can be set on Custom Charges, Tools, Areas, Consumables and Staff Charges
There are 2 ways to set them up:
- In Detailed Administration -> Core Facilities, you can select each tool, area, consumable or staff charge
- In Detailed Administration -> NEMO on each individual custom charge, tool, area, consumable or staff charge
Core Facility can be accessed on a tool, area, consumable or staff charge using:
tool.core_facility, area.core_facility, consumable.core_facility or staff_charge.core_facility
Options
In the billing (user, project billing, billing API, invoices) tool usage and area access on behalf of a user (only during a remote project) are categorized as Staff Charges.
That can be changed by updating the following default settings in settings.py
STAFF_TOOL_USAGE_AS_STAFF_CHARGE = True
STAFF_AREA_ACCESS_AS_STAFF_CHARGE = True
Email templates
To change email templates, either go to Invoices customization settings in NEMO and upload new files, or directly create a file in NEMO's media folder with the same name.
The following templates can be set:
email_send_invoice_subject.txtemail_send_invoice_message.htmlemail_send_invoice_reminder_subject.txtemail_send_invoice_reminder_message.htmlbilling_project_expiration_reminder_email_subject.txtbilling_project_expiration_reminder_email_message.html
Timed services/cron jobs
To send reminder emails, set a cron job daily with one of the 2 options:
- send an authenticated http request to
<nemo_url>/invoices/send_invoice_payment_reminder - run command
django-admin send_invoice_payment_reminderorpython manage.py send_invoice_payment_reminder
Similarly, to automatically deactivate expired projects and send expiration reminders, set a cron job daily with one of the 2 options:
- send an authenticated http request to
<nemo_url>/projects/deactivate_expired_projects - run command
django-admin deactivate_expired_projectsorpython manage.py deactivate_expired_projects
Add Rates plugin
in settings.py add to INSTALLED_APPS:
'NEMO_billing.rates',
Rates module options
The following default properties can be changed in settings.py
# The display rate currency is set to $ by default
RATE_CURRENCY = "CAD "
# Missed reservations rates will have the "flat" checkbox checked by default
DEFAULT_MISSED_RESERVATION_FLAT = True
# The rate list URL can be customized
RATE_LIST_URL = "fee_schedule"
Add Invoices plugin
in settings.py add to INSTALLED_APPS:
'NEMO_billing.invoices',
Invoices module options
The following default properties can be changed in settings.py:
# Date formats
INVOICE_DATETIME_FORMAT = "%m/%d/%Y %H:%M:%S"
INVOICE_DATE_FORMAT = "%B %d, %Y"
# Invoice email prefix
INVOICE_EMAIL_SUBJECT_PREFIX = "[NEMO Billing] "
# Whether to validate that all billable items belong to a core facility before generating invoice
INVOICE_ALL_ITEMS_MUST_BE_IN_FACILITY = False
Add CAP discount plugin
in settings.py add to INSTALLED_APPS:
'NEMO_billing.cap_discount',
CAP Discount settings are available in Customization -> Billing CAP
Add Project prepayments/funds plugin
in settings.py add to INSTALLED_APPS:
'NEMO_billing.prepayments',
Add Quotes plugin
in settings.py add to INSTALLED_APPS:
'NEMO_billing.quotes',
Email templates
To add email templates, either go to Quotes customization settings in NEMO and upload new files, or directly create a file in NEMO's media folder with the same name.
The following templates are available in the resources folder:
quote_email.htmlquote_approval_request_email.htmlquote_status_update_email.html
Dashboard icon
You can add a dashboard icon in Detailed administration -> Landing page choices:
- Icon: quotes.png
- URL:
/quotes
URL
- make sure
<nemo_url>/public_quote/*URL is public in your webserver (nginx, apache, etc.)
Add Institution agreements plugin
in settings.py add to INSTALLED_APPS:
'NEMO_billing.institution_agreements',
URL
- the URL for service agreements is
<nemo_url>/service_agreements/
Timed services/cron jobs
To send service agreement reminder emails, set a cron job daily with one of the 2 options:
- send an authenticated http request to
<nemo_url>/service_agreements/email_institution_agreements_reminders - run command
django-admin send_institution_agreement_reminderorpython manage.py send_institution_agreement_reminder
Post Installation
run:
python manage.py migrate
Metadata
Release files for NEMO-billing 6.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nemo_billing-6.0.2.tar.gz | 233.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nemo_billing-6.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 551.0 kB
Release files / nemo_billing-6.0.2.tar.gz
| Download URL | nemo_billing-6.0.2.tar.gz |
|---|---|
| Size | 233.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e15aa558745b296d26bff650350fda6069324febd564d26ec424072b03598a8
|
|
BLAKE2b-256 checksum How to use checksums |
a1ef8b969dff494e4975a8a8413b76f23a2938bcc3e250741ae5c2dcbb0d34b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / nemo_billing-6.0.2-py3-none-any.whl
| Download URL | nemo_billing-6.0.2-py3-none-any.whl |
|---|---|
| Size | 317.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efab7a122a29f61da472ddf01b2a1e61a7ead80bec89aa344a64c8cb50e39ba8
|
|
BLAKE2b-256 checksum How to use checksums |
ee611cc9e83f9167c7157aaf41d6aab85846c014af64269f19ca312957a2b177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|