jb-data.de/template/tpl/a_lohn2023_loeschen.tpl
2025-08-11 22:23:30 +02:00

675 lines
No EOL
25 KiB
Smarty

<div class="container-fluid" style="background-color: #333333">
<div class="row">
<!-- Main Section -- mittlere Spalte -->
<div class="col-md-3">
<div class="panel panel-tbox">
<div class="panel-heading" style="background-color:#115270;height:45px;color: white">
<spawn style="width:5px;height:2px;font-size:14pt;">Abr. {$monat}/{$jahr}
<i style="color: red" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf&jahr={$jahr}&monat={$monat}&ma={$ma_id}" aria-label="Settings" class="fa fa-file-pdf-o fa-pull-right fa-fw">
</i>
<i style="color: yellow" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf&jahr={$jahr}&monat={$monat}&ma={$ma_id}" aria-label="Settings" class="fa fa-file-pdf-o fa-pull-right fa-fw">
</i>
</spawn>
</div>
</div>
<div class="panel panel-tbox">
<table class="table-hover" style="font-size:11pt">
<tbody>
{foreach from=$mitarbeiterlist item=mitarbeiterlist}
<tr>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf2023&jahr={$jahr}&monat={$monat}&ma={$mitarbeiterlist.id}" aria-label="Settings">
<i class="fal fa-file-pdf" style="color:red"></i>
</td>
{if $mitarbeiterlist.lohngeheim!=0}
<td nowrap style="width:30px;font-size:11pt;color: darkorange">
<i class="fa fa-check-square-o" aria-hidden="true"></i>
</td>
{elseif $mitarbeiterlist.fertig==1}
<td nowrap style="width:30px;font-size:11pt;color: darkgreen">
<i class="fa fa-check-square-o" aria-hidden="true"></i>
</td>
{elseif $mitarbeiterlist.fertig==9}
<td nowrap style="width:30px;font-size:11pt;color: deepskyblue">
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
</td>
{elseif $mitarbeiterlist.fertig==0}
<td nowrap style="width:30px;font-size:11pt;color: gray">
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
</td>
{/if}
<td nowrap style="width:200px;line-height:120%;font-size:11pt"
onclick="window.location='?s=a_lohn2023&id={$mitarbeiterlist.id}&jahr={$jahr}&monat={$monat}'"> {$mitarbeiterlist.name}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<!-- ****************************** -->
<div class="col-md-6">
{if $ma_id==0}
<!-- else - kein MA ausgewählt -->
<div class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:12pt;line-height:100%; color:#4F81BD'>Mitarbeiter</span></h2></header>
<div class="panel-body">
<table class="no-style full">
<thead>
<tr>
<td><h2><span style='font-size:12pt;line-height:100%; color:#4F81BD'>Mitarbeiter auswählen</span></h2></a></td>
</tr>
</thead>
</table>
</div>
</div>
{elseif $lgeheim>0}
<div class="panel panel-tbox">
<div class="panel-heading" style="background-color:darkorange;height:45px;color: white">
<spawn style="width:5px;height:2px;font-size:14pt;">{$ma_name} ({$ma_id}) -- Zeitraum {$monat}/{$jahr}</spawn>
</div>
<div class="panel-body">
<table class="no-style full">
<thead>
<tr>
<td><h2><span style='font-size:12pt;line-height:100%; color:#4F81BD'>Mitarbeiterlohn geheim</span></h2></a></td>
</tr>
</thead>
</table>
</div>
</div>
{else}
<div class="panel panel-primary">
<div class="panel-heading" style="background-color:#115270;height:45px;color: white">
<spawn style="width:5px;height:2px;font-size:14pt;">{$ma_name} ({$ma_id}) -- Zeitraum {$monat}/{$jahr}</spawn>
</div>
</div>
<form action="" method="post">
<!-- Lohnlauf / save / neunung -->
{if $ds>0}
<header class="current"><h2>Lohnlauf {$monat}/{$jahr}</h2></header>
<b><i><span style='font-size:12pt;
line-height:115%;
color:#4F81BD'>Lohnlauf abgeschlossen. {$ds} Datens&auml;tze angepasst.</span></i></b>
<!-- Auflistung / korrektur -->
{/if}
<!-- ********************************** -->
<!-- ********************************** -->
<!-- ********************************** -->
<!-- ********************************** -->
<!-- *************** TEST ************* -->
<!-- ********************************** -->
<div class="panel panel-tbox">
<div class="panel-body" style='font-size:14pt;background-color:gray;color:#fff'>
{foreach from=$data item=data1}
{if data1.ft==1} <p nowrap align="center" style='background-color:orange'>
{elseif data1.wt==0} <p nowrap align="center" style='background-color:gray'>
{else} <p nowrap align="center" style='background-color:darkgreen'>
{/if}
{$data1.taginfo} - {$data1.tag}.{$monat}.{$jahr}<p>
<table class="no-style full" style="font-size:11pt">
{foreach from=$data1.tdata item=data2}
{/foreach}
</tbody>
</table>
{/foreach}
</div>
</div>
<!-- Stundenabrechnung -->
{if $tarif_daten.stunden>0}
{foreach from=$ldata item=ldata}
{if $ldata.wert>0}
<div class="panel panel-tbox">
<div class="panel-body">
<table class="no-style full" style="font-size:11pt">
<tbody>
{foreach from=$ldata.sdata item=senddata}
<tr>
<td nowrap style="width:180px">{$senddata.time|date_format:"%d.%m.%Y"}
<td nowrap style="width:100px">{$senddata.name1}</td>
<td nowrap style="width:180px">{$senddata.time|date_format:"%H:%M Uhr"}</td></td>
<td nowrap style="width:80px">
<input type="int" id="info_{$senddata.tid}" value="{$senddata.astunden}" style="width:50px; "
onChange="save_lohnstunden({$senddata.tid})" name="lohnsavestunden" placeholder="0" > h</td>
<td nowrap style="width:60px"> {$senddata.lohn|number_format:2:",":"."}</td>
<td nowrap style="width:80px">
<input type="int" id="info_{$senddata.tid}" value="{$senddata.astunden}" style="width:50px; "
onChange="save_lohnstunden({$senddata.tid})" name="lohnsavestunden" placeholder="0" > h</td>
<td nowrap style="width:60px"> {$senddata.lohn|number_format:2:",":"."}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{/if}
{/foreach}
<!-- Tourabrechnung Festpreise -->
{else}
{foreach from=$ldata item=ldata}
{if $ldata.wert>0}
<div class="panel panel-tbox">
<div class="panel-body">
<table class="no-style full" style="font-size:11pt">
<tbody>
{foreach from=$ldata.sdata item=senddata}
<tr>
<td nowrap style="width:70px">{$senddata.time|date_format:"%d.%m.%y"}
<td nowrap style="width:80px">{$senddata.name1}</td>
<td nowrap style="width:160px">
<input type="int" id="xxx_{$senddata.tid}" value="{$senddata.stime|date_format:"%H:%M Uhr"}" style="width:50px; "
onChange="save_xxx({$senddata.tid})" name="lohnsavestunden" placeholder="0">&nbsp;{$senddata.time|date_format:"%H:%M Uhr"}
</td>
<td nowrap style="width:160px">
<input type="int" id="xxx_{$senddata.tid}" value="{$senddata.etime|date_format:"%H:%M Uhr"}" style="width:50px; "
onChange="save_xxx({$senddata.tid})" name="lohnsavestunden" placeholder="0">&nbsp;{$senddata.ezeit|date_format:"%H:%M Uhr"}
</td>
<!--
<td><input type="int" id="info_{$senddata.tid}" value="{$senddata.lohn}" style="width:50px; "
onChange="save_lohngeld({$senddata.tid})" name="lohnsavegeld" placeholder="0" > </td>
-->
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{/if}
{/foreach}
<input type="submit" name="testsave" value="kompl. Liste Speichern" >
{/if}
</form>
{/if}
<!-- ende 2. Spalte -->
</div>
<!-- 3. Spalte -->
<div class="col-md-3">
{if $lgeheim>0}
<div class="panel-heading" style="background-color:darkorange;height:45px;color: white">
<spawn style="width:5px;height:2px;font-size:14pt;">geheime Daten</spawn>
</div>
{elseif $fertig==1}
<div class="panel-heading" style="background-color:green;height:45px;color: white">
<spawn style="width:5px;height:2px;font-size:14pt;">fertig bearbeitet</spawn>
</div>
{else}
<div class="panel-heading" style="background-color:#115270;height:45px;color: white">
<spawn style="width:5px;height:2px;font-size:14pt;">in Arbeit</spawn>
</div>
{/if}
<!-- pdf symbole -->
<div class="panel panel-default">
<div class="panel-body">
<table class="no-style full">
<thead>
<tr>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-danger" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf&jahr={$jahr}&monat={$monat}&ma={$ma_id}" aria-label="Settings">
<i class="fa fa-file-pdf-o"></i>
</td>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-danger" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf2023&jahr={$jahr}&monat={$monat}&ma={$ma_id}" aria-label="Settings">
<i class="fa fa-file-pdf-o"></i>
</td>
{if $ma_daten.tarifgtyp==88}
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-danger" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf_mini&jahr={$jahr}&monat={$monat}&ma={$ma_id}" aria-label="Settings">
<i class="fa fa-file-code-o"></i>
</td>
{else}
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-default"
href="">
<i class="fa fa-times"></i></a>
</td>
{/if}
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-danger" target="_pdf" onClick="javascript:open('', '_pdf', 'height=800,width=600,resizable=yes')"
href="?s=a_lohnpdf2023x&jahr={$jahr}&monat={$monat}" aria-label="Settings">
<i class="fa fa-file-code-o"></i>
</td>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-warning"
href="?s=a_lohn2023&jahr={$jahr}&monat={$monat}&id={$ma_id}&vs=1" aria-label="Settings">
<i class="fa fa-calculator"></i></a>
</td>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-info"
href="?s=a_lohn2023&jahr={$jahr}&monat={$monat}&id={$ma_id}&vs=0" aria-label="Settings">
<i class="fa fa-refresh"></i></a>
</td>
</tr>
</thead>
</table>
</div>
</div>
<!-- Berechnungs symbole -->
<div class="panel panel-default">
<div class="panel-body">
<table class="no-style full">
<thead>
<tr>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-danger"
href="?s=a_lohn2023&jahr={$jahr}&monat={$monat}&id={$ma_id}&vs=9" aria-label="Settings">
<i class="fa fa-calculator"></i></a>
</td>
<td nowrap align="center" style="width:10px">
</td>
<td nowrap align="center" style="width:40px">
<a class="btn btn-lm btn-success"
href="?s=a_lohn2023&jahr={$jahr}&monat={$monat}&id={$ma_id}&vs=5" aria-label="Settings">
<i class="fa fa-calculator"></i></a>
</td>
<td nowrap align="right" style="width:120px">
<p>{$lohnanzeige} €</p>
</td>
</tr>
</thead>
</table>
</div>
</div>
<!-- Grundlohn -->
<div class="panel panel-primary">
<div class="panel-body">
<table class="no-style full">
<thead>
<tr>
<td nowrap style="width:105px">
<label for="usr">Lohntyp: </label>
</td>
<td>
<select name="lohntyp" id="info_{$ma_id}" style="width:135px;" onChange="save_lohntyp({$ma_id})" >
{foreach from=$tariftyp item=tariftyp}
{html_options values=$tariftyp.id output=$tariftyp.bezeichnung selected=$ma_daten.tarifgtyp}
{/foreach}
</select>
</td>
</tr>
<tr>
<td nowrap style="width:105px">
<label for="usr">Grundlohn: </label>
</td>
<td>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
<input name="glohnsave" id="info_{$ma_id}" type="int" value="{$ma_g_lohn}" class="form-control info_{$ma_id}" onChange="save_glohn({$ma_id})">
</div>
</td>
</tr>
<!--
<tr>
<td nowrap style="width:105px">
<form action="" method="post">
{if $ma_g_lohntyp>0}
<label><input type="checkbox" name="tgtyp" checked="checked"> Mindestlohn (Pauschalkraft)</label>
{else}
<label><input type="checkbox" name="tgtyp"> Mindestlohn (Pauschalkraft) </label>
{/if}
</form>
</td>
</tr>
-->
<tr>
<td nowrap style="width:105px">
<label for="usr">History: </label>
</td>
</tr>
{foreach from=$ma_glohn item=ma_glohn}
<tr>
<td nowrap style="width:105px;font-size:10pt;line-height:110%;" align="right">{$ma_glohn.monat} / {$ma_glohn.jahr}</td>
<td nowrap style="width:80px;font-size:10pt;line-height:110%;" align="right">{$ma_glohn.glohn} €</td>
</tr>
{/foreach}
</thead>
</table>
</div>
</div>
<!-- Lohnabzüge -->
<!-- ** Lohnabzug eingeben *** -->
<div class="panel panel-primary">
<div class="panel-body">
<table class="no-style full">
<tbody>
<form action="" method="post">
<tr>
<td nowrap style="width:110px">
<label for="usr">Zeitraum: </label>
</td>
<td><input type="text" name="abz_monat" value="{$monat}" style="width:50px"/>&nbsp;/&nbsp;
<input type="text" name="abz_jahr" value="{$jahr}" style="width:50px"/></td>
</tr>
<tr>
<td nowrap style="width:110px">
<label for="usr">Grund: </label>
</td>
<td><input type="text" name="abz_grund" required="required" style="width:120px"/></td>
</tr>
<tr>
<td nowrap style="width:105px">
<label for="usr">Betrag: </label>
</td>
<td>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
<input name="abz_summe" id="info_{$ma_id}" type="int" value="0,00" class="form-control abz_{$ma_id}">
</div>
</td>
</tr>
<tr>
<td nowrap style="width:105px">
<label for="usr">Nachzahlung: </label>
</td>
<td>
<div class="input-group">
<input type="checkbox" id="nachzahlung" name="nachzahlung">
</div>
</td>
</tr>
<tr>
<td>
<input type="hidden" name="mid" value="{$ma_id}">
</td>
<td>
<input type="submit" name="addtyp" value="hinzufügen" >
</td>
</tr>
</form>
</tbody>
</table>
</div>
</div>
<div class="panel panel-warning">
<div class="panel-body">
<table class="no-style full">
<tbody>
{foreach from=$ma_abz item=ma_abz}
{if $ma_abz.monat==$monat && $ma_abz.jahr==$jahr}
<tr>
<td nowrap style="width:80px;font-size:10pt;line-height:90%;color: orangered" align="left">{$ma_abz.monat} / {$ma_abz.jahr}</td>
{if $ma_abz.zuschlag>0}
<td nowrap style="width:80px;font-size:10pt;line-height:90%;color: blue" align="right">{$ma_abz.summe} € </td>
{else}
<td nowrap style="width:80px;font-size:10pt;line-height:90%;color: green" align="right">-{$ma_abz.summe} € </td>
{/if}
</tr>
<tr>
<td nowrap style="width:240px;font-size:10pt;line-height:90%;color: blue" align="left" colspan="2">{$ma_abz.grund}</td>
</tr>
{else}
<tr>
<td nowrap style="width:80px;font-size:10pt;line-height:90%;" align="left">{$ma_abz.monat} / {$ma_abz.jahr}</td>
{if $ma_abz.zuschlag>0}
<td nowrap style="width:80px;font-size:10pt;line-height:90%;" align="right">{$ma_abz.summe} € </td>
{else}
<td nowrap style="width:80px;font-size:10pt;line-height:90%;" align="right">-{$ma_abz.summe} € </td>
{/if}
</tr>
<tr>
<td nowrap style="width:240px;font-size:10pt;line-height:90%;" align="left" colspan="2">{$ma_abz.grund}</td>
</tr>
{/if}
<input type="hidden" name="mid" value="{$ma_id}">
<tr style="line-height:10%;">
<td colspan="2"><hr></td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<!-- kalendereinträge -->
<div class="panel panel-warning">
<div class="panel-body">
<table class="table table-condensed">
<tbody>
<form action="" method="post">
{foreach from=$tmp_lohn item=tmp_lohn}
<tr>
{if $tmp_lohn.typ>0}
<td style="width:180px" ><strong>Festlohn/ Typ : {$tmp_lohn.typ}</strong></td>
{else}
<td style="width:180px" ><strong>Festlohn/Tour: {$tmp_lohn.tour}</strong></td>
{/if}
<td style="width:350px" ><strong>{$tmp_lohn.bez}</strong></td>
{if $tmp_lohn.stunden>0}
<td style="width:140px" ><strong>{$tmp_lohn.stunden} Stunden</strong>
</td>
{else}
<td style="width:140px" ><strong>{$tmp_lohn.geld} {if $tmp_lohn.b>0}EUR/brutto{else}EUR/netto{/if}</strong>
</td>
{/if}
<td style="width:10px" >
<button type='submit' name="lohndatadelete" value="{$tmp_lohn.id}" onclick="return confirm('M&ouml;chten sie wirklich löschen ?')"><i class='fa fa-close'></i></button>
</td>
</tr>
{/foreach}
</form>
</tbody>
</table>
</div>
</div>
<!-- vorabrechnung -->
<div id="time" style="text-align:center;"></div>
</div>
<!-- ***************************************************************************************************************************** -->
{literal}
<script>
function save_glohn(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=lohnsave&a=glohn_save",
dataType: 'json',
data: 'maID=' + maID + "&info=" + $(".info_"+maID).val(),
success: function (data) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
console.log(data)
}
});
}
function save_lohnstunden(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=lohnsave&a=lohnstunden_save",
dataType: 'json',
data: 'maID=' + maID + "&info=" + $("#info_"+maID).val(),
success: function (data) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
console.log(data)
}
});
}
function save_lohngeld(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=lohnsave&a=lohngeld_save",
dataType: 'json',
data: 'maID=' + maID + "&info=" + $("#info_"+maID).val(),
success: function (data) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
console.log(data)
}
});
}
function save_lohntyp(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=lohnsave&a=lohntyp_save",
dataType: 'json',
data: 'maID=' + maID + "&info=" + $("#info_"+maID).val(),
success: function (data) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
console.log(data)
}
});
}
</script>
{/literal}