Manuelle Rechnung Fehler korrigiert

This commit is contained in:
holger.trampe 2021-01-20 10:29:08 +01:00
parent a6e549ced1
commit e5f8f8c743
9 changed files with 37 additions and 11 deletions

View File

@ -129,8 +129,8 @@ Beginn der Zeiterfassung: {{usertimedata.startdate|date:"d.m.Y"}}
<th scope="col">Art</th>
<th scope="col">Start</th>
<th scope="col">Ende</th>
<th scope="col">Halbstart</th>
<th scope="col">Halbende</th>
<th scope="col">Ganz/Vor/Na</th>
<th scope="col">Ganz/Vor/Na</th>
<th scope="col">Erstellt am</th>
<th scope="col">Status</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.start|date:"d.m.Y"}}</td>
<td>{{ab.end|date:"d.m.Y"}}</td>
<td>{{ab.start_ishalf}}</td>
<td>{{ab.end_ishalf}}</td>
<td>{% if ab.startday_info == "1" %} Vormittags {% elif ab.startday_info == "2" %} Nachmittags {% else %} Ganzer Tag {% endif %}</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>{% if ab.confirm_status == 0 %} OK {% elif ab.confirm_status == 1 %} Beantragt {% else %} Abgelehnt {% endif %} </td>
<td>{{ab.holidays_normal}}</td>

View File

@ -250,8 +250,18 @@ class AdmAddBill(CreateView):
r = requests.get("https://api.lexoffice.io/v1/invoices/" + response_text["id"], data=json_data, headers=headers)
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)
newbill.save()
form.instance.agency = agency
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 = ""
if(agency.payment_address == None):

BIN
dump.rdb

Binary file not shown.

View File

@ -745,10 +745,23 @@ Gibt das verfügbare Urlaubskontingent eines Mitarbeiters zurück
@register.simple_tag
def kontingent(user):
kon = 0.0
restdays = 0.0
try:
yearinfo = list(UserYearAbsenceInfo.objects.filter(year=date.today().year, user=user))[0]
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:
pass

View File

@ -472,7 +472,8 @@ function recalculateChoosenDays(userid=false){
$("#holidayyear").html(date_start.getFullYear());
$("#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_next").html(data["restholiday_nextyear"]);
$("#detail_next_rest").html(data["restholiday_nextyear_rest"]);
@ -554,7 +555,8 @@ function recalculateChoosenDaysAfterInit(){
}
$("#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_next").html(data["restholiday_nextyear"]);
$("#holidayyear").html(new_start[2]);

View File

@ -92,7 +92,7 @@
<!-- ONE YEAR -->
<h5>
<b style="color: red">
<span id="detail_tocontract"></span>&nbsp;Tage&nbsp;/&nbsp;<span id="restholidays"></span>&nbsp;verbleibend im Jahr&nbsp;<span id="holidayyear"></span>
<span id="detail_tocontract"></span>&nbsp;Tage&nbsp;/&nbsp;<span id="restholidays"></span>&nbsp;verbleibend im Jahr&nbsp;<span id="holidayyear"></span> <small>(<span id="detail_rest_2">0</span> Rest)</small>
</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>
</h5>

View File

@ -1041,6 +1041,7 @@ def TimeAjax(request):
"userown_absences" : userown_absences_string,
"choosenuser_name" : user.first_name + " " + user.last_name
}
print(data)
# REQUEST USER NO RIGHTS
else:
data = {