Skip to content
Snippets Groups Projects
Commit 32e9b53a authored by Lorenz Zahn's avatar Lorenz Zahn
Browse files

documentation

parent aa19e8b6
Branches
No related tags found
No related merge requests found
Showing
with 66 additions and 0 deletions
"""
This module contains the utilities associated with the management of announcements on the website.
"""
\ No newline at end of file
"""
This submodule contains the routing configuration.
"""
from django.urls import path
from django.utils.translation import gettext_lazy as _
from ..views import *
......
"""
This module contains the utilities associated with the management of several costs on the website.
"""
\ No newline at end of file
"""
This module contains the utilities associated with the management of department costs on the website.
"""
\ No newline at end of file
"""
This submodule contains the routing configuration.
"""
from django.urls import path, include
from django.utils.translation import gettext_lazy as _
from vkk.models import DepartmentDate
......
"""
A collection of forms used throughout the `costs` module.
"""
from django import forms
from vkk.workhours.models import (
GeneralCosts, DepartmentDate, DepartmentCosts,
......@@ -7,6 +11,9 @@ from vkk.workhours.models import (
from vkk.workhours.forms import CustomDateInput
class DepartmentCostForm(forms.ModelForm):
"""
A `ModelForm` subclass for entering `DepartmentCost`s associated to a `DepartmentDate` (model).
"""
class Meta:
model = DepartmentDate
fields = ['date']
......@@ -15,6 +22,9 @@ class DepartmentCostForm(forms.ModelForm):
}
def __init__(self, *args, **kwargs):
"""
Initializes and returns an instance of this class.
"""
super().__init__(*args, **kwargs)
# Collect all associated departments to create fields
......@@ -40,6 +50,10 @@ class DepartmentCostForm(forms.ModelForm):
].initial = department_cost_instance.equivalents_per_hour
def save(self, commit=True):
"""
Attempts to save the associated data of this object to the database.
Returns the assocaiated `DepartmentDate` instance of this class.
"""
# save instance
super().save(commit)
# save all associated instances
......@@ -65,6 +79,9 @@ class DepartmentCostForm(forms.ModelForm):
return self.instance
class SalaryLevelCostForm(forms.ModelForm):
"""
A `ModelForm` subclass for entering `SalaryLevelCosts`s associated to a `SalaryLevelDate` (model).
"""
class Meta:
model = SalaryLevelDate
fields = ['date']
......@@ -73,6 +90,9 @@ class SalaryLevelCostForm(forms.ModelForm):
}
def __init__(self, *args, **kwargs):
"""
Initializes and returns an instance of this class.
"""
super().__init__(*args, **kwargs)
# Collect all associated departments to create fields
......@@ -98,6 +118,10 @@ class SalaryLevelCostForm(forms.ModelForm):
].initial = salary_level_cost_instance.brutto_per_hour
def save(self, commit=True):
"""
Attempts to save the associated data of this object to the database.
Returns the assocaiated `SalaryLevelDate` instance of this class.
"""
# save instance
super().save(commit)
# save all associated instances
......
"""
This module contains the utilities associated with the management of general costs on the website.
"""
\ No newline at end of file
"""
This submodule contains the routing configuration.
"""
from django.urls import path, include
from django.utils.translation import gettext_lazy as _
from django.forms import modelform_factory
......
"""
This module contains the utilities associated with the management of receipt templates on the website.
"""
\ No newline at end of file
"""
This submodule contains the routing configuration.
"""
from django.urls import path, include
from django.utils.translation import gettext_lazy as _
from django.forms import modelform_factory
......
"""
This module contains the utilities associated with the management of salary level costs on the website.
"""
\ No newline at end of file
"""
This submodule contains the routing configuration.
"""
from django.urls import path, include
from django.utils.translation import gettext_lazy as _
from vkk.models import SalaryLevelDate
......
"""
This submodule contains the routing configuration.
"""
from django.urls import path, include
from django.utils.translation import gettext_lazy as _
from ..views import AccountingOverView
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment