Bug Rechnung und Abwesenheitscheck done

This commit is contained in:
holger.trampe 2020-12-13 14:32:15 +01:00
parent 28fe4eaf44
commit 9179e97be7
13 changed files with 34 additions and 11 deletions

View File

@ -25,7 +25,7 @@
<td><a href="{% url 'ag-getbillpdf' ele.pk %}" target="_blank">{{ele.billnumber}}</a></td> <td><a href="{% url 'ag-getbillpdf' ele.pk %}" target="_blank">{{ele.billnumber}}</a></td>
<td>{{ele.billdate}}</td> <td>{{ele.billdate}}</td>
<td> <td>
{% loadFinalMoney user as fm %} {% loadFinalMoneyByAgency ele.agency as fm %}
{{fm|floatformat:2|intcomma}} € {{fm|floatformat:2|intcomma}} €
</td> </td>
<td> <td>

View File

@ -58,6 +58,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
'django.contrib.contenttypes',
'notificsys.apps.NotificsysConfig', 'notificsys.apps.NotificsysConfig',
'users.apps.UsersConfig', 'users.apps.UsersConfig',
'dasettings.apps.DASettingsConfig', 'dasettings.apps.DASettingsConfig',
@ -80,7 +81,6 @@ INSTALLED_APPS = [
'mathfilters', 'mathfilters',
'django.contrib.humanize', 'django.contrib.humanize',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',

Binary file not shown.

Binary file not shown.

View File

@ -9,7 +9,7 @@ django-crispy-forms==1.8.1
django-js-asset==1.2.2 django-js-asset==1.2.2
django-jsonfield==1.3.1 django-jsonfield==1.3.1
idna==2.8 idna==2.8
mysqlclient==1.4.6 mysqlclient==2.0.1
Pillow==6.2.1 Pillow==6.2.1
pytz==2019.3 pytz==2019.3
requests==2.22.0 requests==2.22.0
@ -32,4 +32,4 @@ django-simple-history==2.11.0
django-encrypted-filefield==0.2.2 django-encrypted-filefield==0.2.2
more-itertools==8.5.0 more-itertools==8.5.0
django-passwords==0.3.12 django-passwords==0.3.12
django-simple-captcha=0.5.13 django-simple-captcha==0.5.13

View File

@ -185,10 +185,19 @@
<div id="stgroups_content" class="collapse" aria-labelledby="st_groups" data-parent="#additionalStandardInfos"> <div id="stgroups_content" class="collapse" aria-labelledby="st_groups" data-parent="#additionalStandardInfos">
<div class="card-body"> <div class="card-body">
{% for g in agencygroups %} {% for g in agencygroups %}
{% if g.agencygroupname == "Notfallhilfe" %}
{% if request.user.profile.agency.module_recoverdir %}
<div class="custom-control custom-checkbox mb-2"> <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 %}> <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> <label class="custom-control-label" for="group_{{g.pk}}" >{{g.agencygroupname}}</label>
</div> </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 %} {% endfor %}
</div> </div>
</div> </div>

View File

@ -747,6 +747,18 @@ def loadFinalMoney(user):
finalMoney = (21.0 + usercount*3) * 1.16 finalMoney = (21.0 + usercount*3) * 1.16
return finalMoney 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 @register.simple_tag
def loadUserCountMoney(user): def loadUserCountMoney(user):

BIN
users/.DS_Store vendored

Binary file not shown.

BIN
users/static/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@ -146,6 +146,8 @@ def toUpdate(request):
Auszubildender Auszubildender
''' '''
agencyjobsobject = AgencyJob.objects.filter(agency__pk=request.user.profile.agency.pk) agencyjobsobject = AgencyJob.objects.filter(agency__pk=request.user.profile.agency.pk)
if(len(agencyjobsobject) == 0): if(len(agencyjobsobject) == 0):
defaultAgencyJobs = ['Agenturleiter', 'Außendienst', 'Innendienst', 'Auszubildender'] defaultAgencyJobs = ['Agenturleiter', 'Außendienst', 'Innendienst', 'Auszubildender']
@ -155,7 +157,7 @@ def toUpdate(request):
agencygroups = AgencyGroup.objects.filter(agency__pk=request.user.profile.agency.pk) agencygroups = AgencyGroup.objects.filter(agency__pk=request.user.profile.agency.pk)
if(len(agencygroups) == 0): if(len(agencygroups) == 0):
#print("default groups not existing - creating") print("default groups not existing - creating")
# MITARBEITER # MITARBEITER
letters = string.ascii_lowercase letters = string.ascii_lowercase
temgroup_mitarbeiter = Group(name=str(request.user.profile.agency.pk) + "_" + randomString(8)) 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") #print("MAIN ROOT DIR FOUND - FILESMODULE READY")
# CHECK IF AGENCY DIRS EXIST # CHECK IF AGENCY DIRS EXIST
path = settings.MEDIA_ROOT + "/agencydata/agency_" + str(request.user.profile.agency.pk) path = settings.MEDIA_ROOT + "/agencydata/agency_" + str(request.user.profile.agency.pk)
if(os.path.isdir(path) == False): if(os.path.isdir(path) == False):
# CREATE AGENCY DEFAULT DIRS # CREATE AGENCY DEFAULT DIRS
@ -501,7 +504,6 @@ def dashboard(request):
# UPDATE FUNCTIONS BY NEW MODEL-CHANGES FOR COPIEN SOME DATA # UPDATE FUNCTIONS BY NEW MODEL-CHANGES FOR COPIEN SOME DATA
toUpdate(request) toUpdate(request)
#storageinfo = sys.getfilesystemencoding() #storageinfo = sys.getfilesystemencoding()
context = { context = {