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()
|
unpaid_bills = AgencyBills.objects.all()
|
||||||
|
|
||||||
for bill in unpaid_bills:
|
for bill in unpaid_bills:
|
||||||
|
try:
|
||||||
# Für jede Rechnung eine Anfrage an die LexOffice API und voucherStatus auslesen
|
# Für jede Rechnung eine Anfrage an die LexOffice API und voucherStatus auslesen
|
||||||
headers = {
|
headers = {
|
||||||
'Authorization': 'Bearer ' + settings.LEX_API,
|
'Authorization': 'Bearer ' + settings.LEX_API,
|
||||||
|
|
@ -1750,6 +1751,8 @@ def cronactionsbill(request, code):
|
||||||
else:
|
else:
|
||||||
bill.billstatus="open"
|
bill.billstatus="open"
|
||||||
bill.save()
|
bill.save()
|
||||||
|
except:
|
||||||
|
mailstatus += "VOUCHERSTATUS ERROR ON BILL " + str(bill.pk)
|
||||||
|
|
||||||
|
|
||||||
# Monatliche Berechnung
|
# Monatliche Berechnung
|
||||||
|
|
@ -1916,6 +1919,7 @@ def cronactionsbill(request, code):
|
||||||
mailstatus,
|
mailstatus,
|
||||||
'noreply@digitale-agentur.com',
|
'noreply@digitale-agentur.com',
|
||||||
["htrampe@gmail.com", "info@digitale-agentur.com"],
|
["htrampe@gmail.com", "info@digitale-agentur.com"],
|
||||||
|
#["htrampe@gmail.com"],
|
||||||
fail_silently=True,
|
fail_silently=True,
|
||||||
)
|
)
|
||||||
return JsonResponse(data)
|
return JsonResponse(data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue