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

420 lines
No EOL
16 KiB
Smarty

<!-- ****************************************************************************************** -->
{if $ma_id>0}
<!-- Hauptdaten -->
<div class="row sortable">
<div class="col-md-6">
<div class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:12pt;line-height:100%; color:#4F81BD'>{$ma_name} ({$ma_id}) -- Zeitraum {$monat}/{$jahr}</span></h2></header>
<div class="panel-body">
<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>
{else}
<!-- Auflistung / korrektur -->
{if $tarif_daten.stunden>0}
<table class="style full">
<thead>
<tr>
<th style="width:200px" align="left">Datum/Zeit</th>
<th style="width:200px" align="left">Tourname</th>
<th style="width:160px" align="left">Stunden</th>
<th style="width:160px" align="left">Entlohnung</th>
</tr>
</thead>
<tbody> {foreach from=$ldata item=ldata}
{if $ldata.wert>0}
<tr><td><hr style="color: red; height: 2px;" /></td>
<td><hr style="color: red; height: 2px;" /></td>
<td><hr style="color: red; height: 2px;" /></td>
</tr>
<tr>
<td style="width:100px"><strong>{$ldata.tid}</strong></td>
<td style="width:45px"><strong>{$ldata.name1}</strong></td>
</tr>
{/if}
{foreach from=$ldata.sdata item=senddata}
<tr>
<td>{$senddata.time|date_format:"%d.%m.%Y - %H:%M Uhr"}</td>
<td>{$senddata.name1}</td>
<td><input type="int" id="info_{$senddata.tid}" value="{$senddata.astunden}" style="width:50px; "
onChange="save_lohnstunden({$senddata.tid})" name="lohnsavestunden" placeholder="0" > €</td>
<td>{$senddata.lohn|number_format:2:",":"."} €</td>
</tr>
{/foreach}
{/foreach}
</tbody>
</table>
{else}
<section>
<table class="style full">
<thead>
<tr>
<th style="width:200px" align="left">Datum/Zeit</th>
<th style="width:200px" align="left">Tourname</th>
<th style="width:160px" align="left">Entlohnung</th>
</tr>
</thead>
<tbody> {foreach from=$ldata item=ldata}
{if $ldata.wert>0}
<tr><td><hr style="color: red; height: 2px;" /></td>
<td><hr style="color: red; height: 2px;" /></td>
<td><hr style="color: red; height: 2px;" /></td>
</tr>
<tr>
<td style="width:100px"><strong>{$ldata.tid}</strong></td>
<td style="width:45px"><strong>{$ldata.name1}</strong></td>
</tr>
{/if}
{foreach from=$ldata.sdata item=senddata}
<tr>
<td>{$senddata.time|date_format:"%d.%m.%Y - %H:%M Uhr"}</td>
<td>{$senddata.name1}</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}
{/foreach}
</tbody>
</table>
</section>
{/if}
{/if}
<input type="submit" name="testsave" value="kompl. Liste Speichern" >
</form>
</div>
</div>
</div>
<!-- 2. Spalte -->
<!-- pdf symbole -->
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body">
<table class="no-style full">
<thead>
<tr>
<td nowrap align="center" style="width:60px">
<a class="btn btn-lg 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>
{if $ma_daten.tarifgtyp==88}
<td nowrap align="center" style="width:60px">
<a class="btn btn-lg 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:60px">
<a class="btn btn-lg btn-default"
href="">
<i class="fa fa-times"></i></a>
</td>
{/if}
<td nowrap align="center" style="width:60px">
<a class="btn btn-lg btn-warning"
href="?s=a_lohn&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:60px">
<a class="btn btn-lg btn-info"
href="?s=a_lohn&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>
<!-- Grundlohn -->
<div class="panel panel-default">
<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>
<!-- kalendereinträge -->
<div class="panel panel-warning">
<div class="panel-body">
<table class="no-style full">
<thead>
{foreach from=$tmp item=tmp}
<tr>
<td nowrap style="width:60px;font-size:12pt;line-height:100%;" align="right">{$tmp.a}&nbsp;</td>
<td nowrap style="width:160px;font-size:12pt;line-height:100%;" >{$tmp.b}</td>
</tr>
{/foreach}
</thead>
</table>
</div>
</div>
<!-- vorabrechnung -->
<div id="time" style="text-align:center;"></div>
</div>
<!-- ***************************************************************************************************************************** -->
<!-- else - kein MA ausgewählt -->
{else}
<div class="row sortable">
<div class="col-md-9">
<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>
</div>
{/if}
<!-- ///////////////// rechte seite Mitarbeiterauswahl -->
<!-- Sidebar -->
<aside class="col-md-3">
<div id="rightmenu" 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>
{foreach from=$mitarbeiterlist item=mitarbeiterlist}
<tr>
<td><a href="?s=a_lohn&id={$mitarbeiterlist.id}&jahr={$jahr}&monat={$monat}" title="Kicke zum ausw&auml;len" >{$mitarbeiterlist.name}</a></td>
</tr>
{/foreach}
</thead>
</table>
</div>
</div>
</aside>
</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}