Skip to content

Commit

Permalink
More documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mlebreuil committed Sep 8, 2024
1 parent 5d7705f commit e1ce2ce
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
30 changes: 30 additions & 0 deletions docs/accounting_dimensions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Accounting dimensions

> [!NOTE]
> account is considered a accounting dimensions as any other.
It is possible through the plugin config attribure 'mandatory_dimensions' to set some mandatory dimensions. the attribute will take a list of dimension names. For instance:

```python
# configuration.py
PLUGINS_CONFIG = {
'netbox_contract': {
'top_level_menu': True,
'mandatory_contract_fields': [],
'hidden_contract_fields': [],
'mandatory_invoice_fields': [],
'hidden_invoice_fields': [],
'mandatory_dimensions': ['account','project'],
}
}

```

Refer to the readme file for more information.

> [!WARNING]
> Accounting dimensions used to be set with a simple json field. Although the field is still available, it is recommended to add dimensions through invoice lines. You will find in the script folder a file which can be imported as netbox custom scripts module which contains a script to perform the migration. You wil need to adjust the script to your needs.
![Accounting dimensions](img/accrounting_dimensions.png "accounting dimensions")

- name: The name of the accounting dimensions (Account, Project, Entity ...)
- value: The value for this dimension.
- status: If the accounting dimension can still be used for new invoice lines.
- Comments: Self explanatory


2 changes: 1 addition & 1 deletion docs/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
![Contract](img/contract.png "contract")

- External partie type: either an Circuit provider or Contract Service provider.
- Accounting dimensions: Will be copied to each invoice. Also this is still working the use invoice templates with accounting dimensions should be prefered.
- Accounting dimensions: Will be copied to each invoice. Although this this field is still available the use invoice templates with accounting dimensions should be prefered.
- Monthly / Yearly recuring costs: Only one of these two options can be used for each contract. The value will be used, along with the invoice frequency, to calculate each invoice amount.
- Invoice frequency : The number of month that each invoice covers.
- Parent: Contrats can be arranged in a parent / child hierarchie.
Expand Down
15 changes: 15 additions & 0 deletions docs/invoice.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# Invoice

New invoices shold be created from the corresponding contract. Most of their fields will be derived from the contract invoice template. An invoice template is an invoice object which "Template" field is set to true. There can be only one invoice per contract.
Each invoice will be linked to one or more invoice line.

![Invoice](img/invoice.png "invoice")

- Number: The invoice number. Should correspond to your accounting sysstem invoice number.
- Template: Whether this isvoice is an invoice template for the corresponding contract(s). There can be only one invoice template per contract. The template will be used to define automatically the fields of a nre invoice, including the correpsonding accounting lines with their dimensions.
- Date: the date of the invoice
- Contracts: The contracts linked to the invoice.
- Period_start: The start of the contract periode covered by this invoice.
- Period_end: The end of the contract period covered by this invoice.
- currency: The currency of the invoice
- accounting_dimensions: The use of this field is deprecated. Invoice lines and the corresponding accounting dimensions should be used instead.
- Amount: The amount of the invoice
- Documents: A link to the corresponding document. This field is deprecated and the document plugin should be used instead.
- Comments: self explanatory.

Linked objects:

![Invoice linked objects](img/invoice_linked_objects.png "invoice linked objects")
10 changes: 8 additions & 2 deletions docs/invoice_line.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Invoice line

![Invoice line](img/invoice_line.png "invoice line")

An invoice line correspond to the accouning lines for the invoice.
You can define several accounting lines for an invoice but the sum of each line amount should match the invoice amount. this is enforced if you create the invoice line through the web ui.

![Invoice line](img/invoice_line.png "invoice line")

- Invoice: The corresponding invoice.
- Currency: The currency of the invoice
- Amount: the amount of the invoice. Whether you take into account VAT in this amount depends on the way your budget is contructed.
- Accounting dimensions: The accounting dimensions for the invoice.
- Comments: Self explanatory

0 comments on commit e1ce2ce

Please sign in to comment.