Skip to main content

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_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 >= 7.4.2 & NEMO-CE >= 7.4.6 ----> NEMO-Billing >= 4.10.0

NEMO >= 7.3.3 & NEMO-CE >= 7.3.5 ----> NEMO-Billing >= 4.7.0

NEMO & NEMO-CE >= 7.2.0 ----> NEMO-Billing >= 4.4.0

NEMO & NEMO-CE >= 7.0.0 ----> NEMO-Billing >= 4.0.0

NEMO & NEMO-CE >= 6.0.0 ----> NEMO-Billing >= 3.0.0

NEMO >= 5.5.3 NEMO-CE >= 2.4.4 ----> NEMO-Billing >= 2.9.4

NEMO >= 5.5.2 ----> NEMO-Billing >= 2.9.1

NEMO >= 5.5.0 ----> NEMO-Billing >= 2.9.0

NEMO >= 5.3.0 ----> NEMO-Billing >= 2.8.0

NEMO >= 4.7.0 ----> NEMO-Billing >= 2.7.0

NEMO >= 4.6.4 ----> NEMO-Billing >= 2.6.13

NEMO >= 4.6.0 ----> NEMO-Billing >= 2.5.8

NEMO >= 4.5.0 ----> NEMO-Billing >= 2.0.0

NEMO >= 4.3.0 ----> NEMO-Billing >= 1.23.0

NEMO >= 4.2.1 ----> NEMO-Billing >= 1.22.2

NEMO >= 4.2.0 ----> NEMO-Billing >= 1.22.1

NEMO >= 4.1.0 ----> NEMO-Billing >= 1.19.0

NEMO >= 4.0.0 ----> NEMO-Billing >= 1.18.0

NEMO >= 3.14.0 ----> NEMO-Billing >= 1.16.0

NEMO >= 3.13.0 ----> NEMO-Billing >= 1.13.0

NEMO 3.10.0 to 3.12.2 ----> NEMO-Billing 1.5.0 to 1.12.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:

  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

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.txt
  • email_send_invoice_message.html
  • email_send_invoice_reminder_subject.txt
  • email_send_invoice_reminder_message.html
  • billing_project_expiration_reminder_email_subject.txt
  • billing_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:

  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 and send expiration reminders, 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

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.html
  • quote_approval_request_email.html
  • quote_status_update_email.html

Dashboard icon

You can add a dashboard icon in Detailed administration -> Landing page choices:

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:

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

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 Distribution

nemo_billing-4.10.3.tar.gz (227.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nemo_billing-4.10.3-py3-none-any.whl (304.9 kB view details)

Uploaded Python 3

File details

Details for the file nemo_billing-4.10.3.tar.gz.

File metadata

  • Download URL: nemo_billing-4.10.3.tar.gz
  • Upload date:
  • Size: 227.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for nemo_billing-4.10.3.tar.gz
Algorithm Hash digest
SHA256 f07551185aeba93cda9d33507c0ba5674a60ee205cf549656e2ff55fa5673094
MD5 b7bea37ba716894f04e2f88f2c081c82
BLAKE2b-256 ca65c2aaf330cd0f5647a287842fca141ef464de606c14bee7a1808b94a253fb

See more details on using hashes here.

File details

Details for the file nemo_billing-4.10.3-py3-none-any.whl.

File metadata

  • Download URL: nemo_billing-4.10.3-py3-none-any.whl
  • Upload date:
  • Size: 304.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for nemo_billing-4.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b075f7990ae4107458bf118325c51e0df703a2e8e68fd328ed0f869bafec1ff9
MD5 d043bcb169c95e0aedf514fae2961bd6
BLAKE2b-256 f77a5570b82a5f4cc44e447616f639d46544d74e54e331c23615fcd34a7b305a

See more details on using hashes here.

Supported by

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