Zeiterfassung Update

* Feature Update Urklaubsaufbuchung/Minderung im BMD Import
This commit is contained in:
Daniel Spitzer
2024-06-09 18:08:20 +02:00
parent a4fbcad6fc
commit 2d70624bd8
4 changed files with 48 additions and 0 deletions

View File

@@ -336,6 +336,16 @@ class TimerecordingBillingController extends mfBaseController
fputcsv($file, $bodyarray, ";");
}
}
if ($timerecordingBillingEmployee->holidays>0) {
//last day of month
$month= strtotime("01." . $month);
$monthend = date("d.m.Y", strtotime("last day of this month", $month));
$bodyarray = [$companybmd, $employee_number, 1, "1", "", "4", $monthend, $monthend, $timerecordingBillingEmployee->holidays, '0'];
fputcsv($file, $bodyarray, ";");
}
}
if ($timerecordingBillingEmployee->diet > 0 && $nlz == 0) {
$dietsum = round($timerecordingBillingEmployee->diet, 2);

View File

@@ -19,6 +19,7 @@ class TimerecordingBillingEmployeeModel
private $diet;
private $nlz;
private $nlz_detail;
private $holidays;
private $transfer_plushours;
private $transfer_overtime;
private $transfer_bpahours;

View File

@@ -765,6 +765,12 @@ private $holidays ;
$end = "-";
$day = $daysgerm[date("w", $timerecording->start)];
$sum = $timerecording->days . " Tage";
if (!$daysum[$timerecording->timerecordingCategory->name]) {
$daysum[$timerecording->timerecordingCategory->name] = $timerecording->days;
} else {
$daysum[$timerecording->timerecordingCategory->name] = $daysum[$timerecording->timerecordingCategory->name] + $timerecording->days;
}
} else if ($timerecording->timerecordingCategory->hourday == 6) {
$date = date("d.m.Y", $timerecording->start);
$datadate = date("Y-m-d", $timerecording->start);

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingBillingEmployeeAddFieldHolidays extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingBillingEmployee", ["signed" => true]);
$table->addColumn("holidays", "integer", ["null" => false, "default" => 0, "after" => "nlz_detail"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("TimerecordingBillingEmployee")->removeColumn("holidays")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}