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

519 lines
15 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_lohnpdf2023&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_lohnpdf2023&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>
<!-- ********************************** -->
<!-- ********************************** -->
<!-- ********************************** -->
<!-- ********************************** -->
<!-- *************** TEST ************* -->
<!-- ********************************** -->
<div class="panel panel-tbox">
<div class="panel-body" style='font-size:12pt;background-color:#333333;color:#fff'>
<table class="no-style full">
{foreach from=$ldata item=data1}
<tr>
{if $data1.ft!=0} <td nowrap style='color:orange;width:90px'>
{elseif $data1.wt!=0} <td nowrap style='color:deepskyblue;width:90px'>
{else} <td nowrap style='color:gray ;width:90px'>
{/if}
{$data1.tagbez} {$data1.tag}.{$monat}.
</td>
{foreach from=$data1.tdata item=data2}
{if $data2.ws ==0} <td nowrap style='width:100px;olor:red'> </td> {/if}
{if $data2.stamm!=1} <td nowrap style='color:deepskyblue;width: 100px'>{$data2.name}</td>
{else} <td nowrap style='color:#ffffff ;width: 100px'>{$data2.name}</td>
{/if}
<td nowrap style='width:80px'>{$data2.tourh} h</td>
</tr>
{/foreach}
{/foreach}
</table>
</div>
</div>
{/if}
</div>
<div class="col-md-3">
<div class="panel panel-tbox">
<div class="btn-group">
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=1&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-default btn-sm">{$monat}</button>
</a>
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=2&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
</div>
<div class="btn-group" align="right">
<!-- <a class='btn btn-default btn-sm href="#"'>-</a> -->
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=3&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-default btn-sm">{$jahr}</button>
</a>
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=4&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
<!-- *************** Grunddaten ************* -->
<div class="col-md-3">
<div class="panel panel-tbox">
<span>Angestrebter Nettolohn: {$ma_g_lohn} €</span>
</div>
</div>
<!-- *************** lohnsummen ************* -->
<div style="color: #fff" id="lgesamt"></div>
<p style="color:#fff">
</p>
<div class="col-md-3">
<span style="color: #808080">SOLL</span>
</div>
<div class="col-md-3">
<div class="panel panel-tbox">
<span style="color: #fff"><i class="fas fa-clock fa-x3"></i></span>
2
</div>
</div>
<div class="col-md-3">
<div class="panel panel-tbox">
3
</div>
</div>
<div class="col-md-3">
<div class="panel panel-tbox">
4
</div>
</div>
</div>
<!-- ************************** -->
<div class="col-md-3">
<div class="panel panel-tbox">
<table class="no-style full">
<tbody align="center">
<tr align="center" style="font-size: 8pt;color: #fff;text-align: center">
<th width="20%">Soll</th>
<th width="20%">IST</th>
<th width="20%">Rechnung</th>
<th width="20%">Zusatz</th>
<th width="20%">gesamt</th>
</tr>
<tr align="center" style="font-size: 12pt;color: #fff;text-align: center">
<td width="20%">{$ma.grund_h}</td>
<td width="20%">IST</td>
<td width="20%">{$gdata.grund_h}</td>
<td width="20%">Zusatz</td>
<td width="20%">gesamt</td>
</tr>
</tbody>
</table>
</div>
<!-- ---------------------------------------------------------------->
<div class="panel panel-tbox">
<table class="no-style full">
<tbody align="center">
<!-- *** Grundstunden -->
<tr>
<td width="50%">
<div class="input-group">
<span class="input-group-addon"><i class="fas fa-clock"></i></span>
<input name="glohnsave" id="info_{$ma_id}" type="int" value="{$gdata.grund_h}" class="form-control info_{$ma_id}" onChange="save_h_sum({$ma_id})">
</div>
</td>
<td>
errechnet
</td>
</tr>
<!-- *** Nachtzuschläge 25% -->
<tr>
<td width="50%">
<div class="input-group">
<span class="input-group-addon"><i class="fas fa-moon"></i>25</span>
<input name="glohnsave" id="info_{$ma_id}" type="int" value="{$gdata.grund_n1}" class="form-control info_{$ma_id}" onChange="save_h_sum({$ma_id})">
</div>
</td>
<td>
errechnet
</td>
</tr>
<!-- *** Nachtzuschläge 40% -->
<tr>
<td width="50%">
<div class="input-group">
<span class="input-group-addon"><i class="fas fa-moon"></i>40</span>
<input name="glohnsave" id="info_{$ma_id}" type="int" value="{$gdata.grund_n2}" class="form-control info_{$ma_id}" onChange="save_h_sum({$ma_id})">
</div>
</td>
<td>
errechnet
</td>
</tr>
</tbody>
</table>
<span id="glrechner">Grundlohnberechnung </span>
</div>
</div>
</div>
</div>
<script> var monat = '{$monat}';</script>
<script> var jahr = '{$jahr}';</script>
<script> var maID = '{$ma_id}'; </script>
{literal}
<script>
function lgesamt(maID,monat2,jahr2) {
$.ajax({
type: 'POST',
url: "ajax.php?s=l_summe&tpl",
dataType: 'html',
data: 'maID=' + maID + "&monat=" + monat2 + "&jahr=" + jahr2,
success: function (data) {
$("#lgesamt").html(data);
}
});
}
function glrechner(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=glrechner&tpl",
dataType: 'html',
data: 'maID=' + maID + "&monat=" + monat + "&jahr=" + jahr,
success: function (data) {
$("#glrechner").html(data);
}
});
}
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_nz1(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=lohnsave&a=nz1_save",
dataType: 'json',
data: 'maID=' + maID + "&monat=" + monat + "&jahr=" + jahr + "&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_nz2(maID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=lohnsave&a=nz2_save",
dataType: 'json',
data: 'maID=' + maID + "&monat=" + monat + "&jahr=" + jahr + "&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)
}
});
}
glrechner(maID);
lgesamt(maID,monat,jahr);
</script>
{/literal}