Manuelle Rechnung Fehler korrigiert
This commit is contained in:
parent
a6e549ced1
commit
e5f8f8c743
|
|
@ -129,8 +129,8 @@ Beginn der Zeiterfassung: {{usertimedata.startdate|date:"d.m.Y"}}
|
||||||
<th scope="col">Art</th>
|
<th scope="col">Art</th>
|
||||||
<th scope="col">Start</th>
|
<th scope="col">Start</th>
|
||||||
<th scope="col">Ende</th>
|
<th scope="col">Ende</th>
|
||||||
<th scope="col">Halbstart</th>
|
<th scope="col">Ganz/Vor/Na</th>
|
||||||
<th scope="col">Halbende</th>
|
<th scope="col">Ganz/Vor/Na</th>
|
||||||
<th scope="col">Erstellt am</th>
|
<th scope="col">Erstellt am</th>
|
||||||
<th scope="col">Status</th>
|
<th scope="col">Status</th>
|
||||||
<th scope="col">Urlaub N</th>
|
<th scope="col">Urlaub N</th>
|
||||||
|
|
@ -146,8 +146,8 @@ Beginn der Zeiterfassung: {{usertimedata.startdate|date:"d.m.Y"}}
|
||||||
<td>{{ab.reason.name}}</td>
|
<td>{{ab.reason.name}}</td>
|
||||||
<td>{{ab.start|date:"d.m.Y"}}</td>
|
<td>{{ab.start|date:"d.m.Y"}}</td>
|
||||||
<td>{{ab.end|date:"d.m.Y"}}</td>
|
<td>{{ab.end|date:"d.m.Y"}}</td>
|
||||||
<td>{{ab.start_ishalf}}</td>
|
<td>{% if ab.startday_info == "1" %} Vormittags {% elif ab.startday_info == "2" %} Nachmittags {% else %} Ganzer Tag {% endif %}</td>
|
||||||
<td>{{ab.end_ishalf}}</td>
|
<td>{% if ab.endday_info == "1" %} Vormittags {% elif ab.endday_info == "2" %} Nachmittags {% else %} Ganzer Tag {% endif %}</td>
|
||||||
<td>{{ab.created_date|date:"d.m.Y"}}</td>
|
<td>{{ab.created_date|date:"d.m.Y"}}</td>
|
||||||
<td>{% if ab.confirm_status == 0 %} OK {% elif ab.confirm_status == 1 %} Beantragt {% else %} Abgelehnt {% endif %} </td>
|
<td>{% if ab.confirm_status == 0 %} OK {% elif ab.confirm_status == 1 %} Beantragt {% else %} Abgelehnt {% endif %} </td>
|
||||||
<td>{{ab.holidays_normal}}</td>
|
<td>{{ab.holidays_normal}}</td>
|
||||||
|
|
|
||||||
16
adm/views.py
16
adm/views.py
|
|
@ -250,8 +250,18 @@ class AdmAddBill(CreateView):
|
||||||
r = requests.get("https://api.lexoffice.io/v1/invoices/" + response_text["id"], data=json_data, headers=headers)
|
r = requests.get("https://api.lexoffice.io/v1/invoices/" + response_text["id"], data=json_data, headers=headers)
|
||||||
response_text = json.loads(r.text)
|
response_text = json.loads(r.text)
|
||||||
|
|
||||||
newbill = AgencyBills(agency=agency, lexid=newbill_id, billtype="invoice", billnumber=response_text["voucherNumber"], billstatus=response_text["voucherStatus"], start=start_date, end=end_date, plan=plan, usercount=usercount)
|
form.instance.agency = agency
|
||||||
newbill.save()
|
form.instance.lexid = newbill_id
|
||||||
|
form.instance.agency = agency
|
||||||
|
form.instance.billtype="invoice"
|
||||||
|
form.instance.billnumber = response_text["voucherNumber"]
|
||||||
|
form.instance.billstatus = response_text["voucherStatus"]
|
||||||
|
form.instance.start = start_date
|
||||||
|
form.instance.end = end_date
|
||||||
|
form.instance.plan = plan
|
||||||
|
form.instance.usercount = usercount
|
||||||
|
#newbill = AgencyBills(agency=agency, lexid=newbill_id, billtype="invoice", billnumber=response_text["voucherNumber"], billstatus=response_text["voucherStatus"], start=start_date, end=end_date, plan=plan, usercount=usercount)
|
||||||
|
form.save()
|
||||||
|
|
||||||
mail_to_send = ""
|
mail_to_send = ""
|
||||||
if(agency.payment_address == None):
|
if(agency.payment_address == None):
|
||||||
|
|
@ -260,7 +270,7 @@ class AdmAddBill(CreateView):
|
||||||
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"]),
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -745,10 +745,23 @@ Gibt das verfügbare Urlaubskontingent eines Mitarbeiters zurück
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def kontingent(user):
|
def kontingent(user):
|
||||||
kon = 0.0
|
kon = 0.0
|
||||||
|
restdays = 0.0
|
||||||
try:
|
try:
|
||||||
yearinfo = list(UserYearAbsenceInfo.objects.filter(year=date.today().year, user=user))[0]
|
yearinfo = list(UserYearAbsenceInfo.objects.filter(year=date.today().year, user=user))[0]
|
||||||
inuse = yearinfo.days_inuse
|
inuse = yearinfo.days_inuse
|
||||||
kon = yearinfo.days - inuse
|
|
||||||
|
usertime = UserTime.objects.get(user=user)
|
||||||
|
loosedate = usertime.loose_holidedate.split(".")
|
||||||
|
today = date.today()
|
||||||
|
today_month = today.month
|
||||||
|
today_day = today.day
|
||||||
|
|
||||||
|
loosedata_date = datetime.date(today.year, int(loosedate[1]), int(loosedate[0]))
|
||||||
|
|
||||||
|
if today < loosedata_date:
|
||||||
|
restdays = yearinfo.restdays
|
||||||
|
|
||||||
|
kon = yearinfo.days - inuse + restdays
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,8 @@ function recalculateChoosenDays(userid=false){
|
||||||
|
|
||||||
$("#holidayyear").html(date_start.getFullYear());
|
$("#holidayyear").html(date_start.getFullYear());
|
||||||
$("#restholidays").html(data["restholiday_thisyear"]);
|
$("#restholidays").html(data["restholiday_thisyear"]);
|
||||||
$("#detail_rest").html(data["restholiday_thisyear"]);
|
$("#detail_rest").html(data["restholiday_lastyear"]);
|
||||||
|
$("#detail_rest_2").html(data["restholiday_lastyear"]);
|
||||||
$("#detail_resthol").html(data["restholiday_lastyear"]);
|
$("#detail_resthol").html(data["restholiday_lastyear"]);
|
||||||
$("#detail_next").html(data["restholiday_nextyear"]);
|
$("#detail_next").html(data["restholiday_nextyear"]);
|
||||||
$("#detail_next_rest").html(data["restholiday_nextyear_rest"]);
|
$("#detail_next_rest").html(data["restholiday_nextyear_rest"]);
|
||||||
|
|
@ -554,7 +555,8 @@ function recalculateChoosenDaysAfterInit(){
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#restholidays").html(data["restholiday_thisyear"]);
|
$("#restholidays").html(data["restholiday_thisyear"]);
|
||||||
$("#detail_rest").html(data["restholiday_thisyear"]);
|
$("#detail_rest").html(data["restholiday_lastyear"]);
|
||||||
|
$("#detail_rest_2").html(data["restholiday_lastyear"]);
|
||||||
$("#detail_resthol").html(data["restholiday_lastyear"]);
|
$("#detail_resthol").html(data["restholiday_lastyear"]);
|
||||||
$("#detail_next").html(data["restholiday_nextyear"]);
|
$("#detail_next").html(data["restholiday_nextyear"]);
|
||||||
$("#holidayyear").html(new_start[2]);
|
$("#holidayyear").html(new_start[2]);
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
<!-- ONE YEAR -->
|
<!-- ONE YEAR -->
|
||||||
<h5>
|
<h5>
|
||||||
<b style="color: red">
|
<b style="color: red">
|
||||||
<span id="detail_tocontract"></span> Tage / <span id="restholidays"></span> verbleibend im Jahr <span id="holidayyear"></span>
|
<span id="detail_tocontract"></span> Tage / <span id="restholidays"></span> verbleibend im Jahr <span id="holidayyear"></span> <small>(<span id="detail_rest_2">0</span> Rest)</small>
|
||||||
</b>
|
</b>
|
||||||
<button class="btn btn-secondary btn-sm" style="float: right;" onclick="javascript:$('#holiday_detail_div').toggle()"><i class="fas fa-eye" id="show_detailview"></i></button>
|
<button class="btn btn-secondary btn-sm" style="float: right;" onclick="javascript:$('#holiday_detail_div').toggle()"><i class="fas fa-eye" id="show_detailview"></i></button>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
|
||||||
|
|
@ -1041,6 +1041,7 @@ def TimeAjax(request):
|
||||||
"userown_absences" : userown_absences_string,
|
"userown_absences" : userown_absences_string,
|
||||||
"choosenuser_name" : user.first_name + " " + user.last_name
|
"choosenuser_name" : user.first_name + " " + user.last_name
|
||||||
}
|
}
|
||||||
|
print(data)
|
||||||
# REQUEST USER NO RIGHTS
|
# REQUEST USER NO RIGHTS
|
||||||
else:
|
else:
|
||||||
data = {
|
data = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue