Bug Rechnung und Abwesenheitscheck done
This commit is contained in:
parent
28fe4eaf44
commit
9179e97be7
|
|
@ -25,7 +25,7 @@
|
|||
<td><a href="{% url 'ag-getbillpdf' ele.pk %}" target="_blank">{{ele.billnumber}}</a></td>
|
||||
<td>{{ele.billdate}}</td>
|
||||
<td>
|
||||
{% loadFinalMoney user as fm %}
|
||||
{% loadFinalMoneyByAgency ele.agency as fm %}
|
||||
{{fm|floatformat:2|intcomma}} €
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -58,6 +58,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
|||
|
||||
# Application definition
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.contenttypes',
|
||||
'notificsys.apps.NotificsysConfig',
|
||||
'users.apps.UsersConfig',
|
||||
'dasettings.apps.DASettingsConfig',
|
||||
|
|
@ -80,7 +81,6 @@ INSTALLED_APPS = [
|
|||
'mathfilters',
|
||||
'django.contrib.humanize',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -9,7 +9,7 @@ django-crispy-forms==1.8.1
|
|||
django-js-asset==1.2.2
|
||||
django-jsonfield==1.3.1
|
||||
idna==2.8
|
||||
mysqlclient==1.4.6
|
||||
mysqlclient==2.0.1
|
||||
Pillow==6.2.1
|
||||
pytz==2019.3
|
||||
requests==2.22.0
|
||||
|
|
@ -32,4 +32,4 @@ django-simple-history==2.11.0
|
|||
django-encrypted-filefield==0.2.2
|
||||
more-itertools==8.5.0
|
||||
django-passwords==0.3.12
|
||||
django-simple-captcha=0.5.13
|
||||
django-simple-captcha==0.5.13
|
||||
|
|
|
|||
|
|
@ -185,10 +185,19 @@
|
|||
<div id="stgroups_content" class="collapse" aria-labelledby="st_groups" data-parent="#additionalStandardInfos">
|
||||
<div class="card-body">
|
||||
{% for g in agencygroups %}
|
||||
{% if g.agencygroupname == "Notfallhilfe" %}
|
||||
{% if request.user.profile.agency.module_recoverdir %}
|
||||
<div class="custom-control custom-checkbox mb-2">
|
||||
<input type="checkbox" class="custom-control-input groupclass" onclick="javascript:groupsChange({{g.pk}}, this.checked)" name="group_{{g.pk}}" id="group_{{g.pk}}" {% if g in standard.visibleby.all %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="group_{{g.pk}}" >{{g.agencygroupname}}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="custom-control custom-checkbox mb-2">
|
||||
<input type="checkbox" class="custom-control-input groupclass" onclick="javascript:groupsChange({{g.pk}}, this.checked)" name="group_{{g.pk}}" id="group_{{g.pk}}" {% if g in standard.visibleby.all %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="group_{{g.pk}}" >{{g.agencygroupname}}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -747,6 +747,18 @@ def loadFinalMoney(user):
|
|||
finalMoney = (21.0 + usercount*3) * 1.16
|
||||
return finalMoney
|
||||
|
||||
@register.simple_tag
|
||||
def loadFinalMoneyByAgency(agency):
|
||||
usercount = len(User.objects.filter(profile__agency=agency))
|
||||
|
||||
if(usercount < 4):
|
||||
usercount = 0
|
||||
else:
|
||||
usercount = usercount - 3
|
||||
|
||||
finalMoney = (21.0 + usercount*3) * 1.16
|
||||
return finalMoney
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def loadUserCountMoney(user):
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -146,6 +146,8 @@ def toUpdate(request):
|
|||
Auszubildender
|
||||
|
||||
'''
|
||||
|
||||
|
||||
agencyjobsobject = AgencyJob.objects.filter(agency__pk=request.user.profile.agency.pk)
|
||||
if(len(agencyjobsobject) == 0):
|
||||
defaultAgencyJobs = ['Agenturleiter', 'Außendienst', 'Innendienst', 'Auszubildender']
|
||||
|
|
@ -155,7 +157,7 @@ def toUpdate(request):
|
|||
|
||||
agencygroups = AgencyGroup.objects.filter(agency__pk=request.user.profile.agency.pk)
|
||||
if(len(agencygroups) == 0):
|
||||
#print("default groups not existing - creating")
|
||||
print("default groups not existing - creating")
|
||||
# MITARBEITER
|
||||
letters = string.ascii_lowercase
|
||||
temgroup_mitarbeiter = Group(name=str(request.user.profile.agency.pk) + "_" + randomString(8))
|
||||
|
|
@ -226,6 +228,7 @@ def toUpdate(request):
|
|||
#print("MAIN ROOT DIR FOUND - FILESMODULE READY")
|
||||
|
||||
# CHECK IF AGENCY DIRS EXIST
|
||||
|
||||
path = settings.MEDIA_ROOT + "/agencydata/agency_" + str(request.user.profile.agency.pk)
|
||||
if(os.path.isdir(path) == False):
|
||||
# CREATE AGENCY DEFAULT DIRS
|
||||
|
|
@ -501,7 +504,6 @@ def dashboard(request):
|
|||
# UPDATE FUNCTIONS BY NEW MODEL-CHANGES FOR COPIEN SOME DATA
|
||||
toUpdate(request)
|
||||
|
||||
|
||||
#storageinfo = sys.getfilesystemencoding()
|
||||
|
||||
context = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue