From 3da29bdef0d99ad5297f4adbe02c97e52deeec16 Mon Sep 17 00:00:00 2001 From: "holger.trampe" Date: Mon, 4 Jan 2021 17:05:30 +0100 Subject: [PATCH] Rechnungeserstellung usw. --- .../templates/dasettings/calc_content.html | 2 +- dasettings/views.py | 5 ++++- .../__pycache__/settings.cpython-38.pyc | Bin 4729 -> 4729 bytes dump.rdb | Bin 0 -> 3397 bytes .../__pycache__/counter_tag.cpython-38.pyc | Bin 20408 -> 20408 bytes standards/templatetags/counter_tag.py | 6 +++--- users/views.py | 6 ++++++ 7 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 dump.rdb diff --git a/dasettings/templates/dasettings/calc_content.html b/dasettings/templates/dasettings/calc_content.html index 6a097be..8f1e836 100644 --- a/dasettings/templates/dasettings/calc_content.html +++ b/dasettings/templates/dasettings/calc_content.html @@ -22,7 +22,7 @@ {% loadMWST user as mwst %} - Gesetzliche MwSt. (16%){{mwst|floatformat:2|intcomma}} € + Gesetzliche MwSt. (19%){{mwst|floatformat:2|intcomma}} €
diff --git a/dasettings/views.py b/dasettings/views.py index 00dd38d..548a426 100644 --- a/dasettings/views.py +++ b/dasettings/views.py @@ -314,7 +314,7 @@ def GetBillPDF(request, pk): r = requests.get("https://api.lexoffice.io/v1/invoices/"+bill.lexid+"/document", data=json_data, headers=headers) json.loads(r.text) - + base64String = requests.get("https://api.lexoffice.io/v1/files/"+json.loads(r.text)["documentFileId"]+"/", data=json_data, headers=headers) buffer = BytesIO.BytesIO() @@ -1754,7 +1754,10 @@ class BillPlanUpdate(UpdateView): self.object = form.save(commit=False) + r = requests.post("https://api.lexoffice.io/v1/invoices/?finalize=true", data=json_data, headers=headers) + # Als ENTWURF Rechnung anlegen + #r = requests.post("https://api.lexoffice.io/v1/invoices/", data=json_data, headers=headers) if(r.status_code == 201): messages.success(self.request, f"Rechnung erstellt!") diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index f6489ba8209c9e77287a18c78b8677c34e4cdbbf..9936dda426a8bd3c7e2bda9a14d6a7ffe8127af5 100644 GIT binary patch delta 20 acmeyV@>7L7l$V!_0SLBPecs5OCj7L7l$V!_0SE&1?{4JI69ND|5d~NP diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000000000000000000000000000000000000..63fc6ac5c23cc2861cde2b6c55a143a6b20a9f35 GIT binary patch literal 3397 zcmeH}O=#Rj7{)hgR?=3nMHCyA-NhVgG-1AH{tME?HWm{-w537tu*_$=m`%cNl2WlE zi2*gGXb*a5C70NXh{1ZOUl_dYwDw>`EC01#x?rmab4>icXu%o;$0$ga!(ppreAvBqpz_asyHM1A~nB3s>? zv8Fy{Qzu^8x*?RkRd%`h?zELD)nUg%e}sMyhiC3Q(sZ`3A`}YWAv5jCcze35w>vJ| zZKvLsfK`nxnQp6-E~y)&V;oBaIbfJ5fCEku5DE$EgbFy15l*<1N?{;05s)j!mDLC; ztR!$w?>)C|XkzA@rh=MIQ)?u1$^uOgW`YqQj0hYB8Zk*@fFebW(}Yt=j8PIvf(a8q zGZzr!4&Qg_g+(RDPBy#l=dXMbvv>l1Wp>Ok@jO1Fm+-;G(N8I}6IgT_72nm>kkm3M4 zt8JA+Mw|1st?LVYjJn$w`*>UC(R{xL_k8qF%a>1Wn(RATF<4A>DbcUai7uykMQuI) zWb>??ypb1wKGXL3)S1(Dx@m1ON&h7yKRh-!R*#HKcJ<2 zEeoNl@ur6#sfa|Tc1%WI|KQ`jqYqpu_L!2R{aPU-mb>kqS>`DMpb03TS_2X|s~{)X zi0I}p1`Z2w{{GfmxRq297;OvTXzNBRC1nm$j}+&(0t3>Yxf@W4xDFKO4iV0n@(TrG z2yC=+jYl{3XVxGET=Ys6hR~{Ld;EQnt|wxttjT|rQ~?(kK2 zF~9u^YF;-#)k`-%e8o;K317>lm2zQaHmfuZ982BkK=b8(6suzkvqx&C)xjt{UcC6(C0Q-~-?*IS* delta 41 wcmdlnpK-^0M($8vUM>b8*lT%rBX^twqrl`Whg0nRhrVjW^ncoH?O4kP021O3h5!Hn diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py index d31f8dd..64befb7 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -730,7 +730,7 @@ def loadMWST(user): else: usercount = usercount - 3 - mwst = (21.0 + usercount*3)/100 * 16 + mwst = (21.0 + usercount*3)/100 * 19 return mwst @@ -743,7 +743,7 @@ def loadFinalMoney(user): else: usercount = usercount - 3 - finalMoney = (21.0 + usercount*3) * 1.16 + finalMoney = (21.0 + usercount*3) * 1.19 return finalMoney @register.simple_tag @@ -755,7 +755,7 @@ def loadFinalMoneyByAgency(agency): else: usercount = usercount - 3 - finalMoney = (21.0 + usercount*3) * 1.16 + finalMoney = (21.0 + usercount*3) * 1.19 return finalMoney diff --git a/users/views.py b/users/views.py index fdce121..8fc8905 100644 --- a/users/views.py +++ b/users/views.py @@ -1447,6 +1447,8 @@ def cronactionsbill(request, code): # Monatliche Berechnung # Alle Rechnungen laden, deren Letzter Tag HEUTE ist und bei ausgewähltem Paymentplan 1 eine neue Rechnung erstellen, Mailverschicke, Nutzeraccouns zählen und neue Rechnung in der Agentur hinterlegen new_bills = AgencyBills.objects.filter(end=today) + + for bill in new_bills: if bill.agency.paymentstatus == 0 and bill.agency.paymentplan == 1: @@ -1534,7 +1536,11 @@ def cronactionsbill(request, code): } } json_data = json.dumps(lexdata) + # WIEDER RAUSNEHMEN + # NEUE RECHNUNG ALs ENTWURF + #r = requests.post("https://api.lexoffice.io/v1/invoices/", data=json_data, headers=headers) + # RICHTIGE RECHNUNG r = requests.post("https://api.lexoffice.io/v1/invoices/?finalize=true", data=json_data, headers=headers) if(r.status_code == 201):