diff --git a/docs/accounting_dimensions.md b/docs/accounting_dimensions.md index 09b5d7f..cd087da 100644 --- a/docs/accounting_dimensions.md +++ b/docs/accounting_dimensions.md @@ -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 + diff --git a/docs/contract.md b/docs/contract.md index 803a0ce..ea0f228 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -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. diff --git a/docs/invoice.md b/docs/invoice.md index 21ca721..a63cbbe 100644 --- a/docs/invoice.md +++ b/docs/invoice.md @@ -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") diff --git a/docs/invoice_line.md b/docs/invoice_line.md index fd4394c..c68715c 100644 --- a/docs/invoice_line.md +++ b/docs/invoice_line.md @@ -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 \ No newline at end of file