Skip to main content

juntagrico-billing

juntagrico-ci Maintainability Code Coverage image image

This is an extension for juntagrico. You can find more information about juntagrico here (https://github.com/juntagrico/juntagrico).

It provides the following features for juntagrico:

  • creating managing bills (invoices) for juntagrico subscriptions
  • display of bills as HTML or PDF
  • support for swiss qr bill with reference number
  • manage payments for bills
  • reading camt.054 payment files (in connection with qr bills and refnumer)
  • bookkeeping export covering bills and payments

Installation

Install juntagrico-billing via pip pip install juntagrico-billing

or add it to your main django projects requirements.txt: juntagrico-billing

You may also install from github source (or add it to requirements.txt): pip install git+https://github.com/juntagrico/juntagrico-billing.git

In your juntagrico.settings.py add juntagrico_billing somewhere above juntagrico:

INSTALLED_APPS = (
    'juntagrico_billing',
    'juntagrico',
    ...

In your urls.py you also need to add the new pattern:

urlpatterns = [
    ...
    path('',include('juntagrico_billing.urls')),
]

As the billing app introduces its own database tables, you need to apply migrations after installing. Execute python manage.py migrate in your main django project.

Configuration

Set these in your settings.py to modify juntagrico-billing

BILLS_USERMENU

Set to True to add "bills" to the user menu.

default value: False

DUEDATE_NOTICE_URL

Set the url of a page that explains the due date policy of your bills, if you have any.

default value: ''

Create settings object

juntagrico-billing uses a singleton Settings object to store some setting. You need to create this settings object once in django admin.

  • Log in to juntagrico and go to the admin UI at https://<my juntagrico site>/admin.

  • You should see in admin a new section for juntagrico_billing grafik

  • Add a new Settings object

    image
  • You need to specify a debtors account, just specify any digit code (e.g. 1100)

  • If needed, specify a surcharge account. Surcharges may be added by optional apps like juntagrico-contribution to a subscription. When created by juntagrico-contribution this would be an income account used for subscription.

  • A default paymenttype is mandatory too. You may create one directly from the settings dialog: grafik

  • The paymenttype for balancing bills must be specified too. It is used for bookings representing the difference to the normal amount when overpaying a bill.

  • VAT number (optional), used to show the vat number on PDF bills.

  • VAT percent (mandatory), may be 0 if no vat is applicable.

  • Save your settings object. There must be only one settings object.

Create a business year

Billing is done on the base of a business-year. A business-year denotes the time period for creating bills. Usually this will correspond to a calendar year (1.1 - 31.1 of a year). It is possible to use different timespans though. Business-years should be consecutive.

Business years are managed in django admin UI.

  • Log in to /admin and create a new businessyear object grafik

Billing

Billing is based on the activation and deactivation dates of subscriptions (and extrasubscriptions) in juntagrico. At any time you may create all needed invoices (bills) for a certain business-year.

In juntagrico you should see the Bills and Bookkeeping Menu, if you are assigned bookkeeping rights.

Go to Bills and choose the desired business-year. Switch to the Generate bills tab. The amount of pending bills for the businessyear should then be displayed. This may take some time depending on the number of subscriptions and members in your system. grafik

Pressing the Generate button will create these bills. They may be viewed afterwards on the all tab of the bills list. grafik

Modifying or adding bills

There are two modes to view an existing bill object:

  • admin view of the bill. click on the first column of a bill row to open the bill in django admin.
  • user view of the bill. click on the last columdn of a bill row to open the bill as the user will see it.

If a bill created via Generate is incorrect, proceed as follows:

  • delete the bill in the django admin UI
  • correct the subscription settings
    • in most cases this will involve adjusting the activation or deactivation date of the subscription / extrasubscription
  • re-create the bill by going to the Generate bills tab on the Bills list.
    • if you only modified one subscription, it should say 1 pending bill
    • click on Generate to re-create the bill based on the modified settings

The same procedure applies if a new subscription or subscription part (extrasubscription) is added after bills for a business-year have been generated. If there already is a bill for the same member and you want the additional parts to appear on the same bill, you may delete the existing bill and regenerate it like described above. Deleting a bill is only possible if there are no payments on it. If you add parts without deleting an existing bill, then a new bill will be added for the member.

Adding custom items to a bill

In addition to subscription and extrasubscription parts, a bill may also contain custom items. Custom items may be used for stuff like

  • correcting overpaid bills
  • adding special credit for a certain member (work instead of paying)
  • adding additional contributions (solidarity contributions)

For each kind of custom item you need to define a custom Bill item type in django admin: grafik

You need to specify a description and a booking account for the custom item type.

You may then add custom item types on a bill in the django admin view of the bill: grafik

Bookings Export

The bookings that are derived from bills and payments can be exported into an accounting package. The accounting export page features a date range that filters the bookings to be exported. There are 2 ways to export bookings:

Download Excel

Downloads an excel sheet containing all bookings. This may serve as base for importing into an accounting software.

Export to Bexio

Writes the bookings via API into the Bexio (https://bexio.com) accounting package. Identification of the Bexio account and authorisation is provided by an authentication token (a long text string) that needs to be pasted in the corresponding field. Such a token may be generated via the Bexio developer page at https://developer.bexio.com. The export performs a synchronisation between juntagrico bookings and manual bookings in Bexio. Export may be started multiple times for the same period, only the differences are written to the API. Depending on the number of existing manual bookings in Bexio, the export action may take quite a long time.

Metadata

Release files for juntagrico-billing 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juntagrico-billing 2.1.1
File Size Uploaded Provenance Actions
juntagrico_billing-2.1.1.tar.gz 71.9 kB With provenance Details for juntagrico_billing-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for juntagrico-billing 2.1.1
File Interpreter ABI Platform Actions
juntagrico_billing-2.1.1-py3-none-any.whl Python 3 none any Details for juntagrico_billing-2.1.1-py3-none-any.whl

Total release size: 166.7 kB

Release files / juntagrico_billing-2.1.1.tar.gz

Download URL juntagrico_billing-2.1.1.tar.gz
Size 71.9 kB
Tags Source
SHA-256 checksum
How to use checksums
01001619783fb43d5efabb2021faa31d7d399e11002f1e5627daab812162dd48
BLAKE2b-256 checksum
How to use checksums
22a06007885869ef2a24543452880d91c82b2f8b5b2e2e26cc0a44582c584685
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / juntagrico_billing-2.1.1-py3-none-any.whl

Download URL juntagrico_billing-2.1.1-py3-none-any.whl
Size 94.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
235f4e8f6ef27eb3716bfa86a0860fc57e39024f936a41387ec1d5a1b189eedb
BLAKE2b-256 checksum
How to use checksums
74d25f79de677607f4d60228e5d3e733a8ccfe716e815d90d88ed1f1ab66738a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for juntagrico-billing 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for juntagrico_billing-2.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page