Bug Supportformuler

This commit is contained in:
holger.trampe 2021-01-17 19:36:59 +01:00
parent 94ea27b615
commit 64affeb80a
13 changed files with 38 additions and 31 deletions

View File

@ -1818,13 +1818,12 @@ class BillPlanUpdate(UpdateView):
self.object.save() self.object.save()
mail_to_send = "" mail_to_send = ""
if(self.request.user.profile.agency.payment_address == ""): if(self.request.user.profile.agency.payment_address == None):
mail_to_send = self.request.user.profile.agency.agency_email mail_to_send = self.request.user.profile.agency.agency_email
else: else:
mail_to_send = self.request.user.profile.agency.payment_address mail_to_send = self.request.user.profile.agency.payment_address
msg_html = render_to_string('users/newbill_mail.html', {}) msg_html = render_to_string('users/newbill_mail.html', {})
# BCC Mail with Object - NICHT DEN IMPORT VERGESSEN!!! # BCC Mail with Object - NICHT DEN IMPORT VERGESSEN!!!
email = EmailMultiAlternatives( email = EmailMultiAlternatives(
'Digitale Agentur | Rechnung ' + str(response_text["voucherNumber"]), 'Digitale Agentur | Rechnung ' + str(response_text["voucherNumber"]),

View File

@ -41,7 +41,8 @@ CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
CRONAPIKEY_STATSTIC = "gCddsaz6NOnE9QbXZM5LasdEk122D" CRONAPIKEY_STATSTIC = "gCddsaz6NOnE9QbXZM5LasdEk122D"
MAILINFOKEY = "jka7sd8iukashdna78skduJAHDsu6dilaksdjba65a68iadbhjak" MAILINFOKEY = "jka7sd8iukashdna78skduJAHDsu6dilaksdjba65a68iadbhjak"
# API KEY LEXOFFICE # API KEY LEXOFFICE
#ALTER LEX_API = "8f9ba01f-9e84-42c7-9548-48c254f14c19" #ALTER ZUM TESTEN
#LEX_API = "8f9ba01f-9e84-42c7-9548-48c254f14c19"
# Gültig bis 17.10.2022 # Gültig bis 17.10.2022
LEX_API = "8dcbd7a5-9447-417f-a4a4-989818742a36" LEX_API = "8dcbd7a5-9447-417f-a4a4-989818742a36"

BIN
dump.rdb

Binary file not shown.

View File

@ -138,7 +138,7 @@ def getLocalWeather(user):
weatherinfo = r.json() weatherinfo = r.json()
weatherinfodata.append("| " + weatherinfo['weather'][0]['description']) weatherinfodata.append("| " + weatherinfo['weather'][0]['description'])
weatherinfodata.append(weatherinfo['weather'][0]['icon']) weatherinfodata.append(weatherinfo['weather'][0]['icon'])
weatherinfodata.append(str(weatherinfo['main']['temp']) + " °C") weatherinfodata.append(str(weatherinfo['main']['temp']).split(".")[0] + " °C")
except: except:
weatherinfodata = "" weatherinfodata = ""
else: else:

View File

@ -769,6 +769,7 @@ def CopyStandard(request, pk):
tempdatafile = DataFile(file=f.file, name=f.name, owner=request.user, parent=datadir_parentid, agency=request.user.profile.agency) tempdatafile = DataFile(file=f.file, name=f.name, owner=request.user, parent=datadir_parentid, agency=request.user.profile.agency)
tempdatafile.save() tempdatafile.save()
new_standard.addedfiles.add(tempdatafile) new_standard.addedfiles.add(tempdatafile)
# TASK: Hier das kopieren der Dateien auf dem Server noch einfügen
# Sende Info, dass ein Standard übernommen wurde, an die Erstelleragentur # Sende Info, dass ein Standard übernommen wurde, an die Erstelleragentur
usersofagency = User.objects.filter(profile__agency=sc.agency) usersofagency = User.objects.filter(profile__agency=sc.agency)

View File

@ -13,9 +13,9 @@
<th scope="col"></th> <th scope="col"></th>
<th scope="col">Start</th> <th scope="col">Start</th>
<th scope="col">Ende</th> <th scope="col">Ende</th>
<th scope="col">Arbeitszeit</th>
<th scope="col">Pausen</th>
<th scope="col">Gesamtzeit</th> <th scope="col">Gesamtzeit</th>
<th scope="col">Pausen</th>
<th scope="col">Arbeitszeit</th>
<th scope="col">Gleitzeit</th> <th scope="col">Gleitzeit</th>
<th scope="col">&nbsp;</th> <th scope="col">&nbsp;</th>
</tr> </tr>

View File

@ -19,9 +19,9 @@
<th scope="col"></th> <th scope="col"></th>
<th scope="col">Start</th> <th scope="col">Start</th>
<th scope="col">Ende</th> <th scope="col">Ende</th>
<th scope="col">Arbeitszeit</th>
<th scope="col">Pausen</th>
<th scope="col">Gesamtzeit</th> <th scope="col">Gesamtzeit</th>
<th scope="col">Pausen</th>
<th scope="col">Arbeitszeit</th>
<th scope="col">Gleitzeit</th> <th scope="col">Gleitzeit</th>
<th scope="col">Manuell geändert</th> <th scope="col">Manuell geändert</th>
<th scope="col">&nbsp;</th> <th scope="col">&nbsp;</th>

View File

@ -318,7 +318,7 @@ class UserTime(models.Model):
wd_fr = models.FloatField(default=0.0) wd_fr = models.FloatField(default=0.0)
wd_sa = models.FloatField(default=0.0) wd_sa = models.FloatField(default=0.0)
wd_so = models.FloatField(default=0.0) wd_so = models.FloatField(default=0.0)
loose_holidedate = models.CharField(default="30.04.", max_length=6) loose_holidedate = models.CharField(default="31.03.", max_length=6)
startdate = models.DateField(default=None, blank=True, null=True) startdate = models.DateField(default=None, blank=True, null=True)
startcount = models.FloatField(default=0.0) startcount = models.FloatField(default=0.0)
usetime = models.BooleanField(default=False) usetime = models.BooleanField(default=False)
@ -465,7 +465,7 @@ class UserYearAbsenceInfo(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE) user = models.ForeignKey(User, on_delete=models.CASCADE)
year = models.IntegerField() year = models.IntegerField()
days_inuse = models.FloatField(default=0.0) days_inuse = models.FloatField(default=0.0)
days = models.FloatField(default=24.0) days = models.FloatField(default=0.0)
restdays = models.FloatField(default=0.0) restdays = models.FloatField(default=0.0)

View File

@ -116,7 +116,7 @@
<tr> <tr>
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Roboto;font-size:20px;line-height:1;text-align:left;color:#000000;"> <div style="font-family:Roboto;font-size:20px;line-height:1;text-align:left;color:#000000;">
<h2>Digitale Agentur | Passwort vergessen</h2> <h2>Digitale Agentur | Neues Passwort</h2>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -65,6 +65,7 @@ import io as BytesIO
import base64 import base64
from django.http import HttpResponse from django.http import HttpResponse
def getICSFile(request, ag): def getICSFile(request, ag):
if 'HTTP_AUTHORIZATION' in request.META: if 'HTTP_AUTHORIZATION' in request.META:
auth = request.META['HTTP_AUTHORIZATION'].split() auth = request.META['HTTP_AUTHORIZATION'].split()
@ -1277,7 +1278,6 @@ def support(request):
messages.warning(request, f'Supportanfrage fehlgeschlagen!' + str(r)) messages.warning(request, f'Supportanfrage fehlgeschlagen!' + str(r))
else: else:
messages.success(request, f'Supportanfrage erfolgreich! Ihre Ticketnummer ist '+ str(r.json()) +'!') messages.success(request, f'Supportanfrage erfolgreich! Ihre Ticketnummer ist '+ str(r.json()) +'!')
# TASK: Hier Browserversion usw. mit einfügen beim TICKET!
send_mail( send_mail(
"Digitale Agentur: " + str(problemconc), "Digitale Agentur: " + str(problemconc),
"Hallo " + name, ", wir haben Ihre Anfrage unter der Ticketnummer " + str(r.json()) + " aufgenommen. Vielen Dank. Ihr Team der Digitalen Agentur", "Hallo " + name, ", wir haben Ihre Anfrage unter der Ticketnummer " + str(r.json()) + " aufgenommen. Vielen Dank. Ihr Team der Digitalen Agentur",
@ -1614,6 +1614,8 @@ def recalculateAbsence(request, code):
abinfo_lastyear = UserYearAbsenceInfo.objects.get(user=user, year=str(int(year)-1)) abinfo_lastyear = UserYearAbsenceInfo.objects.get(user=user, year=str(int(year)-1))
abinfo_thisyear = UserYearAbsenceInfo.objects.get(user=user, year=year) abinfo_thisyear = UserYearAbsenceInfo.objects.get(user=user, year=year)
if(abinfo_lastyear.days_inuse > 0.0):
abinfo_thisyear.restdays = abinfo_lastyear.days - abinfo_lastyear.days_inuse abinfo_thisyear.restdays = abinfo_lastyear.days - abinfo_lastyear.days_inuse
abinfo_thisyear.save() abinfo_thisyear.save()
@ -1631,6 +1633,8 @@ def recalculateAbsence(request, code):
abinfo_thisyear.days_inuse = daysinuse_thisyear abinfo_thisyear.days_inuse = daysinuse_thisyear
abinfo_thisyear.save() abinfo_thisyear.save()
else:
calcstat += " NO DAYS IN 2020 USED "
except: except:
calcstat += "ERROR LASTYEAR/THISYEAR USER " + str(user.pk) calcstat += "ERROR LASTYEAR/THISYEAR USER " + str(user.pk)
@ -1863,11 +1867,13 @@ def cronactionsbill(request, code):
newbill.save() newbill.save()
mail_to_send = "" mail_to_send = ""
if(agency.payment_address == ""): if(agency.payment_address == None):
mail_to_send = agency.agency_email mail_to_send = agency.agency_email
else: else:
mail_to_send = agency.payment_address mail_to_send = agency.payment_address
# BCC Mail with Object - NICHT DEN IMPORT VERGESSEN!!! # BCC Mail with Object - NICHT DEN IMPORT VERGESSEN!!!
email = EmailMultiAlternatives( email = EmailMultiAlternatives(
'Digitale Agentur | Rechnung ' + str(response_text["voucherNumber"]), 'Digitale Agentur | Rechnung ' + str(response_text["voucherNumber"]),