Eine Fehlerbehandlung bei fehlerhaften Rechnungen dazu
This commit is contained in:
parent
dbb60dbbd4
commit
987efe5f75
Binary file not shown.
|
|
@ -1734,6 +1734,7 @@ def cronactionsbill(request, code):
|
|||
unpaid_bills = AgencyBills.objects.all()
|
||||
|
||||
for bill in unpaid_bills:
|
||||
try:
|
||||
# Für jede Rechnung eine Anfrage an die LexOffice API und voucherStatus auslesen
|
||||
headers = {
|
||||
'Authorization': 'Bearer ' + settings.LEX_API,
|
||||
|
|
@ -1750,6 +1751,8 @@ def cronactionsbill(request, code):
|
|||
else:
|
||||
bill.billstatus="open"
|
||||
bill.save()
|
||||
except:
|
||||
mailstatus += "VOUCHERSTATUS ERROR ON BILL " + str(bill.pk)
|
||||
|
||||
|
||||
# Monatliche Berechnung
|
||||
|
|
@ -1916,6 +1919,7 @@ def cronactionsbill(request, code):
|
|||
mailstatus,
|
||||
'noreply@digitale-agentur.com',
|
||||
["htrampe@gmail.com", "info@digitale-agentur.com"],
|
||||
#["htrampe@gmail.com"],
|
||||
fail_silently=True,
|
||||
)
|
||||
return JsonResponse(data)
|
||||
|
|
|
|||
Loading…
Reference in New Issue