Skip to main content

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:

  1. In Detailed Administration -> Core Facilities, you can select each tool, area, consumable or staff charge
  2. 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:

  1. send an authenticated http request to <nemo_url>/invoices/send_invoice_payment_reminder
  2. run command django-admin send_invoice_payment_reminder or python manage.py send_invoice_payment_reminder

Similarly, to automatically deactivate expired projects, set a cron job daily with one of the 2 options:

  1. send an authenticated http request to <nemo_url>/projects/deactivate_expired_projects
  2. run command django-admin deactivate_expired_projects or python 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

NEMO_billing-1.11.0-py3-none-any.whl (83.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page