From a6fb6bed60b03f3f3a3c6d94e7cb9661b66e9d78 Mon Sep 17 00:00:00 2001 From: "holger.trampe" Date: Fri, 25 Sep 2020 14:20:07 +0200 Subject: [PATCH] Bug und Abrechnung bis LexOffice 500 --- .DS_Store | Bin 0 -> 6148 bytes areas/__pycache__/__init__.cpython-38.pyc | Bin 153 -> 153 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 164 -> 164 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 158 -> 158 bytes dasettings/forms.py | 47 ++++++ .../__pycache__/__init__.cpython-38.pyc | Bin 169 -> 169 bytes .../templates/dasettings/calc_content.html | 80 +++++++++- .../dasettings/dasettings_billmail.html | 16 ++ .../dasettings/dasettings_billplan.html | 99 +++++++++++++ dasettings/urls.py | 4 +- dasettings/views.py | 137 +++++++++++++++++- .../__pycache__/__init__.cpython-38.pyc | Bin 163 -> 163 bytes .../__pycache__/settings.cpython-38.pyc | Bin 4084 -> 4084 bytes .../__pycache__/urls.cpython-38.pyc | Bin 2583 -> 2583 bytes .../__pycache__/views.cpython-38.pyc | Bin 355 -> 355 bytes message/__pycache__/__init__.cpython-38.pyc | Bin 155 -> 155 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 166 -> 166 bytes news/__pycache__/__init__.cpython-38.pyc | Bin 152 -> 152 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 169 -> 169 bytes orga/__pycache__/__init__.cpython-38.pyc | Bin 152 -> 152 bytes orga/__pycache__/admin.cpython-38.pyc | Bin 193 -> 193 bytes orga/__pycache__/apps.cpython-38.pyc | Bin 368 -> 368 bytes orga/__pycache__/models.cpython-38.pyc | Bin 190 -> 190 bytes orga/__pycache__/urls.cpython-38.pyc | Bin 404 -> 404 bytes orga/__pycache__/views.cpython-38.pyc | Bin 3511 -> 3511 bytes organizer/__pycache__/__init__.cpython-38.pyc | Bin 157 -> 157 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 168 -> 168 bytes organizer/urls.py | 1 + standards/__pycache__/__init__.cpython-38.pyc | Bin 157 -> 157 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 170 -> 170 bytes .../__pycache__/counter_tag.cpython-38.pyc | Bin 16253 -> 17240 bytes standards/templatetags/counter_tag.py | 51 +++++++ tasks/__pycache__/__init__.cpython-38.pyc | Bin 153 -> 153 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 162 -> 162 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 173 -> 173 bytes users/__pycache__/__init__.cpython-38.pyc | Bin 153 -> 153 bytes users/models.py | 32 +++- 37 files changed, 461 insertions(+), 6 deletions(-) create mode 100644 .DS_Store create mode 100644 dasettings/templates/dasettings/dasettings_billmail.html create mode 100644 dasettings/templates/dasettings/dasettings_billplan.html diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c9454512ce1535b8c67c6da4e4048da5a1df9a71 GIT binary patch literal 6148 zcmeHKJ5Iw;5S)b+ktmXq@?C)&SW$9-rGON;J_Y>y(CCg`;g}eo4u%*3 zhzq8}xQbk-)G3l@xKCGT>HKABMo%gpWhjodH zQa}n!6}Zjq+WY^G{>S`3C21!Gq`*}vV2ka3yWuNUZ=JoI_u58(qXOcgasK%}vcKDb{!Q4AD=? bOwTMy%t=j52MU!I=_eMYCKl^Ytd;`+H**+( delta 74 zcmbQqIFpe(l$V!_0SH`Kj3;v28arFXgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ bre~HU=AXOcgasK%}vcKDb{!Q4AD=? mOwTMy%t=j52MU!I=_lvpm!|0FW~LV~ mre~HU=AXOcgasK%}vcKDb{!Q4AD=? gOwTMy%t=j52MU!I>8B(Xr~ gre~HU=AXOcgasK%}vcKDb{!Q4AD=? rOwTMy%t=j52MU!I>8B(Xr~ rre~HU=AG55=%1k^NM38cFO?(;`SeF diff --git a/dasettings/templates/dasettings/calc_content.html b/dasettings/templates/dasettings/calc_content.html index a375eaa..37bb399 100644 --- a/dasettings/templates/dasettings/calc_content.html +++ b/dasettings/templates/dasettings/calc_content.html @@ -1,3 +1,81 @@ {% load mathfilters %} {% load humanize %} -

Vielen Dank für die Unterstützung während der Pilotphase! Für diesen Zeitraum ist die Nutzung kostenfrei.

\ No newline at end of file +{% load counter_tag %} +{% if request.user.profile.agency.paymentstatus == 1 %} +

Ihre Agentur darf die Plattform kostenlos nutzen. Vielen Dank für Ihre Unterstützung!

+{% else %} + +
+
+
+
+
Ihr Betrag
+

Ihr monatlicher Nutzungsbeitrag setzt sich wie folgt zusammen:

+ + + + + + {% loadUserCount request.user as usercount %} + + + + {% loadMWST user as mwst %} + + + + + + + {% loadFinalMoney user as fm %} + + +
Grundbetrag (inkl. 3 Nutzer)21,00 €
Zusätzliche Nutzer (3,00 € pro Nutzer){{usercount}}
Gesetzliche MwSt. (19%){{mwst|floatformat:2|intcomma}} €
 
Monatlicher Bruttobetrag{{fm|floatformat:2|intcomma}} €
+
+
Ihre Zahlungsweise
+ + {% getNextMonth request.user.profile.agency as nextMonth %} + + + Ihre Agentur wurde am {{ request.user.profile.agency.registerdate|date:"d.m.Y" }} registriert. + {% if paymentplan == None %} + Es wurde noch keine Zahlungsweise ausgewählt. Sie können die Digitale Agentur bis zum {{nextMonth|date:"d.m.Y"}} kostenlos nutzen. Möchten Sie die Digitale Agentur auch nach diesem Zeitraum nutzen, wählen Sie bitte einen Zahlplan aus. +
+ Zahlplan jetzt auswählen + {% else %} + Zahlungsweise: TODO + {% endif %} +
+
Fragen, Hilfe, Kündigung
+ Bei Fragen zu Ihrer Abrechnung melden Sie sich bitte per E-Mail an abrechnung@digitale-agentur.com. + + KÜNDIGUNGSMODALITÄTEN NOCH EINFÜGEN +
+
+
+
+ +
+
+
E-Mail-Adresse
+ Ihre Rechnungen werden automatisch an folgende E-Mailadresse gesendet.
+ {% if request.user.profile.agency.payment_address == None %} + Es wurde keine Adresse hinterlegt. Die Adresse wird an die Agenturadresse versendet: {{request.user.profile.agency.agency_email}} + {% else %} + {{request.user.profile.agency.payment_address}} + {% endif %} +
+ E-Mailadresse ändern +
+
+ +
+
+
Rechnungen
+ +
+
+
+ +
+{% endif %} \ No newline at end of file diff --git a/dasettings/templates/dasettings/dasettings_billmail.html b/dasettings/templates/dasettings/dasettings_billmail.html new file mode 100644 index 0000000..f9fd7f8 --- /dev/null +++ b/dasettings/templates/dasettings/dasettings_billmail.html @@ -0,0 +1,16 @@ +{% extends "users/base.html" %} +{% load crispy_forms_tags %} +{% block content %} +
+

Rechnungs-E-Mail aktualisieren

+
+
+ {% csrf_token %} +
+ {{form|crispy}} +
+   + Abbrechen + +
+{% endblock content %} diff --git a/dasettings/templates/dasettings/dasettings_billplan.html b/dasettings/templates/dasettings/dasettings_billplan.html new file mode 100644 index 0000000..9d22ced --- /dev/null +++ b/dasettings/templates/dasettings/dasettings_billplan.html @@ -0,0 +1,99 @@ +{% extends "users/base.html" %} +{% load crispy_forms_tags %} +{% load mathfilters %} +{% load humanize %} +{% load counter_tag %} +{% block content %} +
+

Zahlplan auswählen

+
+
+ {% csrf_token %} +
+
+
Agenturdaten überprüfen
+
+ {% for formfield in form %} + {% if formfield.name != 'agb' and formfield.name != 'contract' %} + {{formfield|as_crispy_field}} + {% endif %} + {% endfor %} + +
+
+
Zahlplan festlegen
+
+

Wählen Sie aus, für welchen Zeitraum die Abrechnung Ihrer Digitalen Agentur durchgeführt werden soll.

+
+ + +
+
+ + 6 Monate + +
+
+ + +
+
+ {{form.contract|as_crispy_field}} + {{form.agb|as_crispy_field}} +
+

Mit Klick auf dem Button Jetzt kostenpflichtig bestellen wird eine Rechnung für Ihre Agentur generiert und per E-Mail an die hinterlegte Rechnungs-E-Mailadresse oder an die Agentur-E-Mailadresse versendet. Der Rechnungsbetrag muss innerhalb von 14 Tagen beglichen werden. +


+ {% loadFinalMoney user as fm %} + Rechnungsbetrag: {{fm|floatformat:2|intcomma}} € +
+ +
+
+
+ Abbrechen +   +
+
+
+ + +{% endblock content %} + + + + + + + + + + + + + + + + diff --git a/dasettings/urls.py b/dasettings/urls.py index 5b6e0cb..5ea4fbb 100644 --- a/dasettings/urls.py +++ b/dasettings/urls.py @@ -3,7 +3,7 @@ from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required, permission_required from . import views from .views import FreeDayDeleteView, AbsenceReasonDeleteView, AbsenceReasonUpdateView, AbsenceReasonAddView -from .views import NewUserFirstStep, UserProfileUpdate, UserChangeMain +from .views import NewUserFirstStep, UserProfileUpdate, UserChangeMain, BillMailUpdate, BillPlanUpdate ''' Permissions definiert in models.py bei USERS und dann hier vor die View geschrieben! ''' @@ -33,4 +33,6 @@ urlpatterns = [ path('abcatdel/', AbsenceReasonDeleteView.as_view(), name="abcat-delete"), path('abcatupdate/', AbsenceReasonUpdateView.as_view(), name="abcat-update"), path('abcatadd/', AbsenceReasonAddView.as_view(), name="abcat-add"), + path('ag/billmail/update/', permission_required('users.agencyinfo')(BillMailUpdate.as_view()), name='ag-billmailupdate'), + path('ag/billplan/', permission_required('users.agencyinfo')(BillPlanUpdate.as_view()), name='ag-billplanupdate'), ] \ No newline at end of file diff --git a/dasettings/views.py b/dasettings/views.py index d0a0481..cbc9760 100644 --- a/dasettings/views.py +++ b/dasettings/views.py @@ -1,7 +1,7 @@ from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect,HttpResponse, JsonResponse -from .forms import UsersSelfChangeForm, UsersNotificationFormStandard, AgencyGroupPerms, AgencyModulsForm, UserNewUserForm, UserProfileForm, AgencyNetworkForm, AgencyOrganigrammForm, UserTimeForm, AbsenceReasonForm, UsersNotificationFormNews, UsersNotificationFormFiles, UsersNotificationFormMessages ,UsersNotificationFormOrganizer, UsersNotificationFormChat, UsersNotificationFormAbTime, UsersNotificationFormGroups, UsersNotificationFormAgn, UsersNotificationFormTasks +from .forms import UsersSelfChangeForm, UsersNotificationFormStandard, AgencyGroupPerms, AgencyModulsForm, UserNewUserForm, UserProfileForm, AgencyNetworkForm, AgencyOrganigrammForm, UserTimeForm, AbsenceReasonForm, UsersNotificationFormNews, UsersNotificationFormFiles, UsersNotificationFormMessages ,UsersNotificationFormOrganizer, UsersNotificationFormChat, UsersNotificationFormAbTime, UsersNotificationFormGroups, UsersNotificationFormAgn, UsersNotificationFormTasks, AgencyBillMail, AgencyBillPlan from django.contrib import messages from django.contrib.auth import update_session_auth_hash from django.contrib.auth.forms import PasswordChangeForm @@ -1440,3 +1440,138 @@ def ModSettingsTm(request): else: return JsonResponse({}) ''' + +########## ABRECHNUNG ########## +class BillMailUpdate(UpdateView): + model = Agency + success_url = reverse_lazy('dasettings') + form_class = AgencyBillMail + template_name = "dasettings/dasettings_billmail.html" + + def form_valid(self, form): + messages.success(self.request, f"E-Mailadresse erfolgreich aktualisiert!") + return super().form_valid(form) + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context.update({'active_link' : 'dasettings'}) + return context + + + +from dateutil.relativedelta import * +class BillPlanUpdate(UpdateView): + model = Agency + success_url = reverse_lazy('dasettings') + form_class = AgencyBillPlan + template_name = "dasettings/dasettings_billplan.html" + + # LexOffice Verbindung + def form_valid(self, form): + agency = self.request.user.profile.agency + + # HEADERS CURL + headers = { + 'Authorization': 'Bearer 33bfb1b9-2994-4fd4-b447-1f4754a5c7cb', + 'Content-Type': 'application/json', + 'Accept': 'application/json', + } + + month = agency.registerdate + next_month = month + relativedelta(months=1) + + voucher_date = next_month.strftime("%Y-%m-%d") + + # USERCOUNT BERECHNEN + usercount = len(User.objects.filter(profile__agency=agency)) + + if(usercount < 4): + usercount = 0 + else: + usercount = usercount - 3 + + # DataJSON + lexdata = { + "voucherDate": voucher_date + "T00:00:00.000+01:00", + "address" : { + "name" : agency.name, + "countryCode" : "DE" + }, + "totalPrice" : { + "currency" : "EUR", + }, + "lineItems" : [ + { + "type" : "custom", + "name" : "Monatsbeitrag", + "quantity" : form.cleaned_data['paymentplan'], + "unitName" : "Stück", + "unitPrice" : + { + "currency" : "EUR", + "netAmount" : 21.00, + "taxRatePercentage" : 19 + }, + }, + { + "type" : "custom", + "name" : "Weitere Mitarbeiter", + "quantity" : usercount, + "unitName" : "Stück", + "unitPrice" : + { + "currency" : "EUR", + "netAmount" : 3, + "taxRatePercentage" : 19 + }, + } + ], + "taxConditions": { + "taxType": "net" + }, + "shippingConditions": { + "shippingDate": voucher_date + "T00:00:00.000+01:00", + "shippingType": "service" + }, + } + json_data = json.dumps(lexdata) + + r = requests.post("https://api.lexoffice.io/v1/vouchers", data=json_data, headers=headers) + + if(r.status_code != 200): + messages.warning(self.request, f"Fehlercode "+str(r.status_code)+". Es wurde keine Rechnung erstellt. Bitte wenden Sie sich an den Support!") + + print(r.status_code) + + return super().form_valid(form) + + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context.update({'active_link' : 'dasettings'}) + return context + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/digitaleagentur/__pycache__/__init__.cpython-38.pyc b/digitaleagentur/__pycache__/__init__.cpython-38.pyc index 8f5ab13c0165f17b16ee0020d90500f3154295a2..b12ca312c0709e0391cb2f328f68b0cb47b55055 100644 GIT binary patch delta 111 zcmZ3?xR{YUl$V!_0SJ=jPAw|d&nPKM%q>XOcgasK%}vcKDb{!Q4AD=? uOwTMy%t=j52MU!IVesSQGxIV_;^XxSDsOSv~ ure~HU=A&q+^>ami0E%}vcKDUNaX c42em}OwTMy%t=j52MU!IVemJ<;p1Qg00aLYEC2ui diff --git a/digitaleagentur/__pycache__/urls.cpython-38.pyc b/digitaleagentur/__pycache__/urls.cpython-38.pyc index 6646c23ea12a04000bd1c407bccf47614b2774e9..40a26368ea4db9222970e7a7ad078e4d4566e41c 100644 GIT binary patch delta 125 zcmbO(GF^l>l$V!_0SJ=jnlAm0fo0?Zrtncm_qMwqPo>`KZlbVl$V!_0SH`KjN{*II3^=MCp|UBB|o_|H#M)MIL6&GBqk*@J+mY+Cp9r0C{$X6!JoXA GGYbGtdn!Z# diff --git a/digitaleagentur/__pycache__/views.cpython-38.pyc b/digitaleagentur/__pycache__/views.cpython-38.pyc index 40b283e4586320ae18418a64e82c1b57908dffa7..952c571ed2c740501108e4e2f7caa225cbe52f99 100644 GIT binary patch delta 86 zcmaFN^q7e^l$V!_0SJ=j~ YNy$vlEJ@5sO-u(0l@?*}Cw|QX0IwAvN&o-= diff --git a/message/__pycache__/__init__.cpython-38.pyc b/message/__pycache__/__init__.cpython-38.pyc index d3687b259e140fad227a303e194a2c582d3f4464..a604fc8241273edb3845e404f6638cbdbd008149 100644 GIT binary patch delta 76 zcmbQuIGd3>l$V!_0SJ=jXOcgasK%}vcKDb{!Q4AD=? bOwTMy%t=j52MU!I>F1^v7X#V)6KmxFY*-m# delta 76 zcmbQuIGd3>l$V!_0SH`Kj3;v2nmSv>gche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ bre~HU=AXOcgasK%}vcKDb{!Q4AD=? mOwTMy%t=j52MU!I>F1^v7X#V)xtZxji6xo&dByq@JLCYV*B$u) delta 87 zcmZ3+xQvlIl$V!_0SH`Kj3;v2IyhU!gche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ mre~HU=AXOcgasK%}vcKDb{!Q4AD=? aOwTMy%t=j52MU!I>F1@E7wb=~k^=x9ix@2c delta 73 zcmbQiID?Tpl$V!_0SMe!j3;v28aZ3Vgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ are~HU=AXOcgasK%}vcKDb{!Q4AD=? rOwTMy%t=j52MU!I>F4E_WTs^%7grYR=VqoCC6;97=N0Qu?3M!n4N4zt delta 90 zcmZ3~ rre~HU=AG55=%1k^NM38cFO?(XOcgasK%}vcKDb{!Q4AD=? aOwTMy%t=j52MU!I>E{=vC+bhEk^=x9G#D8G delta 73 zcmbQiID?Tpl$V!_0SMe!j3;v28aZ3Vgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ are~HU=As+B^YjWTZ*kb<=BJeAq}nk84g3r;6#x%nAPWEh diff --git a/orga/__pycache__/apps.cpython-38.pyc b/orga/__pycache__/apps.cpython-38.pyc index 0c3f74658cea1cd209791e5911d32ccf4a676133..49d45255c704a297951541ff8b88afa923a03413 100644 GIT binary patch delta 76 zcmeys^nr;tl$V!_0SJ=jCF@?J7>wu%WYPAw{q$;i)1PmOWOPcF?(%_}L6arX>~ dNy$vlEJ@5sO-u(0l@`V17o{i0OcrE}2LO|l8Q%Z^ diff --git a/orga/__pycache__/models.cpython-38.pyc b/orga/__pycache__/models.cpython-38.pyc index c8a3917eeab9ca88b48cd1f4c08ac164db1e07f5..82cca05bf96c05e0b95b917b9b04ac5a49b3a228 100644 GIT binary patch delta 100 zcmdnTxQ~%Hl$V!_0SJ=j1Wz^DQMnx7ek delta 78 zcmbQjJcXGrl$V!_0SMe!jN@4uH}V-U8aZ3Vgche36~|=c=cK2`xa237=BDPA6vw!G fhQy>~re~HU=AXOcgasK%}vcKDb{!Q g4AD=?OwTMy%t=j52MU!I>E{=vC+cs`X7=F%0KMrM+W-In delta 79 zcmdlky~re~HU=A0Dov1Z~y=R diff --git a/organizer/__pycache__/__init__.cpython-38.pyc b/organizer/__pycache__/__init__.cpython-38.pyc index b17aa84f8588417576b329e9d88a6af9388087d5..71a192aa85fd08420f1e3df21827bc6d8e91c872 100644 GIT binary patch delta 78 zcmbQsIG2$-l$V!_0SJ=jXOcgasK%}vcKDb{!Q4AD=? fOwTMy%t=j52MU!I>E{=vC+1~Vr55Q=td|1-qd*!} delta 78 zcmbQsIG2$-l$V!_0SMe!j3;v2nmb#?gche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ fre~HU=AXOcgasK%}vcKDb{!Q4AD=? qOwTMy%t=j52MU!I>E{=vC+1~Vr55SuW~LV~ qre~HU=AXOcgasK%}vcKDb{!Q4AD=? fOwTMy%t=j52MU!I=@*wI=A|SSr4;K=td|1-qWKy~ delta 78 zcmbQsIG2$-l$V!_0SMe!j3;v2nmb#?gche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ fre~HU=AXOcgasK%}vcKDb{!Q4AD=? sOwTMy%t=j52MU!I=@*wI=A|SSr4;Lzq~;dnB$lL>B&HYZPwbHc04y9Iwg3PC delta 91 zcmZ3*xQdZGl$V!_0SMe!j3;v2x;R_Kgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ sre~HU=A-u(-k!6uR4ggS6;6>tb!mIbsiGs% zvz4eUyN(jdDSCG6qj~?T0X~d2yGKr~_Y>naR%Q)Y0|f}kw;|0Me2vp@Ls>aYc?K9n75f@hF7JWE`5wk-_y_R0oM)8*6GVv8Lu?h*+OTqrr(a zN0V4{4C_;hr5Q#B7)DdaN;!Hgr~UdK9q8Y5^Xa6+k7zNCLOPL|UH<`2Gw?1XwgO%&kt6f(m_tIb6O>0S<;u^X&^fd2|pMz9uW!!`l QF*6DV#7wddvZMjO0ZgX&(EtDd delta 170 zcmcc7#`w36H%5f1EY(xRZM7cYEf}a zMt)9uYK%*Ma%paAUP*C`yJtvDN@jXyNn%cFVmeT$v?!*yBrz`~u_&cDrX)4DASbaT zwIngUIA-%Z))+I!_{l5mjTxgR-?7&Qk{k{SKvL5|l`(3wzr!NN$qsCy{2Vs9`6;D2 RsdkJ&M-?+|c64H81OT~2HzNQ5 diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py index 82fc14e..d889e4e 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -685,3 +685,54 @@ def counterWDreset(): def getCounterWD(): global workdaycounter return workdaycounter + + +from dateutil.relativedelta import * +@register.simple_tag +def getNextMonth(agency): + month = agency.registerdate + next_month = month + relativedelta(months=1) + return next_month + +@register.simple_tag +def loadUserCount(user): + usercount = len(User.objects.filter(profile__agency=user.profile.agency)) + + if(usercount < 4): + usercount = 0 + else: + usercount = usercount - 3 + return usercount + +@register.simple_tag +def loadMWST(user): + mwst = 0.0 + + usercount = len(User.objects.filter(profile__agency=user.profile.agency)) + + if(usercount < 4): + usercount = 0 + else: + usercount = usercount - 3 + + mwst = (21.0 + usercount*3)/100 * 19 + + return mwst + +@register.simple_tag +def loadFinalMoney(user): + usercount = len(User.objects.filter(profile__agency=user.profile.agency)) + + if(usercount < 4): + usercount = 0 + else: + usercount = usercount - 3 + + finalMoney = ((21.0 + usercount*3)/100 * 19) + 21.0 + usercount*3 + + return finalMoney + + + + + diff --git a/tasks/__pycache__/__init__.cpython-38.pyc b/tasks/__pycache__/__init__.cpython-38.pyc index 7b9ccb40a1aa987c27947244120dfda048806765..69126d448c52726bc53960fbe83da2bdecfc6ff4 100644 GIT binary patch delta 74 zcmbQqIFpe(l$V!_0SJ=jXOcgasK%}vcKDb{!Q4AD=? bOwTMy%t=j52MU!I>6auHXBX>Ftd;`+I5ZfV delta 74 zcmbQqIFpe(l$V!_0SMe!j3;v28arFXgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ bre~HU=AXOcgasK%}vcKDb{!Q4AD=? zOwTMy%t=j52MU!I>6c{YrsgK*0l6SG`tk9Zd6^~g@p=W7w>WHa^HWN5QtcRlW`71* F006-(By0cx delta 110 zcmZ3)xQLNEl$V!_0SMe!j3;v2Mmbx>gche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ zre~HU=AxR#MSl$V!_0SJ=jXOcgasK%}vcKDb{!Q4AD=? rOwTMy%t=j52MU!I>6c{YrsgK*0l6SG`nj3uMTsSu`FX|q6Z_==kt`tm delta 94 zcmZ3>xR#MSl$V!_0SMe!j3;v2x;tCNgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ rre~HU=AXOcgasK%}vcKDb{!Q4AD=? YOwTMy%t=j52MU!I>6e1lPOO##063KxrT_o{ delta 74 zcmbQqIFpe(l$V!_0SMe!j3;v28arFXgche36~|=c=cK2`xa237=BDPA6vw!GhQy>~ Yre~HU=A