Install Billing plugin for NEMO
Project description
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',
'...'
]
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
By default, a Core Facility is not required for each custom charge, tool, area, consumable or staff charge.
That can be changed by updating the following default settings in settings.py:
TOOL_CORE_FACILITY_REQUIRED = False
AREA_CORE_FACILITY_REQUIRED = False
CONSUMABLE_CORE_FACILITY_REQUIRED = False
STAFF_CHARGE_CORE_FACILITY_REQUIRED = False
CUSTOM_CHARGE_CORE_FACILITY_REQUIRED = False
Add Rates plugin
in settings.py
add to INSTALLED_APPS
:
'NEMO_billing.rates',
Rates module options
The display rate currency is set to $ by default and can be changed in settings.py
:
RATE_CURRENCY = "CAD "
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 or not to validate that all billable items belong to a core facility before generating invoice
INVOICE_ALL_ITEMS_MUST_BE_IN_FACILITY = False
# Display all months since this date in generate invoice page
from datetime import datetime
INVOICE_MONTH_LIST_SINCE = datetime(year=2021, month=1, day=1)
Email templates
To change email templates, create a file in NEMO's media folder with the same name.
The following templates can be set:
email_send_invoice_subject.txt
email_send_invoice_message.html
email_send_invoice_reminder_subject.txt
email_send_invoice_reminder_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_reminder
orpython manage.py send_invoice_payment_reminder
Similarly, to automatically deactivate expired projects, 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_projects
orpython manage.py deactivate_expired_projects
Post Installation
run:
python manage.py migrate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for NEMO_billing-1.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f59bd0c21429d38bc8706121dab62891f9bfc075fdf6bdf1501be40320d2595 |
|
MD5 | 0836eeb2dd53ec4735ec9eddc6d96a0f |
|
BLAKE2b-256 | b95d1ed208ac8f2643eb2fde1d7a44bbfce053e93945f562175d768ba77d8cc1 |