Merge branch 'spidev' into 'master'
Zeiterfassungs Billing Update/Devices Parents See merge request fronk/thetool!332
This commit is contained in:
@@ -175,6 +175,9 @@ if ($devices->power != "0.0") {
|
||||
} else {
|
||||
$power = $devices->devicetype->power;
|
||||
}
|
||||
foreach ($devicesall as $deviceall) {
|
||||
$DevicesAll[$deviceall->id] = $deviceall->name;
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -205,6 +208,12 @@ if ($devices->power != "0.0") {
|
||||
<th>Geräte Hersteller</th>
|
||||
<td><?= $devices->devicetype->devicemanufactor->name ?> </td>
|
||||
</tr>
|
||||
<?php if ($devices->parent_id) : ?>
|
||||
<tr>
|
||||
<th>Parent Device</th>
|
||||
<td><a href="<?= self::getUrl("Device", "Detail", ["id" => $devices->parent_id]) ?>"><?= $DevicesAll[$devices->parent_id]?></a></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th>Mac Adresse</th>
|
||||
<td><?= $devices->mac ?> </td>
|
||||
@@ -221,6 +230,7 @@ if ($devices->power != "0.0") {
|
||||
<th>Leistung</th>
|
||||
<td><?= $power ?> Watt</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Bemerkung</th>
|
||||
<td><?= nl2br($devices->comment) ?> </td>
|
||||
|
||||
@@ -22,6 +22,10 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "device-detail") {
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("Device");
|
||||
}
|
||||
foreach ($devices as $Device) {
|
||||
$Devices[$Device->id] = $Device->name;
|
||||
}
|
||||
asort($Devices);
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
@@ -80,6 +84,17 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "device-detail") {
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="parent_id">Parent </label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="parent_id" id="parent_id">
|
||||
<option value=""> </option>
|
||||
<?php foreach ($Devices as $key => $value): ?>
|
||||
<option value="<?= $key ?>" <?= ($device->parent_id == $key) ? "selected='selected'" : "" ?>><?= ($value) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="pop_id">Pop</label>
|
||||
<div class="col-lg-10">
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
window.open('<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'generatebmdexportnlz']) ?>&month=' + $('#month').data('month'), '_blank');
|
||||
});
|
||||
$('body').on('click', '#month-complete', function () {
|
||||
if (confirm('Buchung wirklich löschen?')) {
|
||||
if (confirm('Monat ' + $('#month').data('month') + ' wirklich abschließen?')) {
|
||||
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'completemonth']) ?>", {
|
||||
month: $.trim($('#month').data('month')),
|
||||
ajax: 1
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
window.open('<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'generatebmdexportnlzclosed']) ?>&month=' + $('#month').data('month'), '_blank');
|
||||
});
|
||||
$('body').on('click', '#month-complete', function () {
|
||||
if (confirm('Buchung wirklich löschen?')) {
|
||||
if (confirm('Monat wirklich abschließen?')) {
|
||||
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'completemonth']) ?>", {
|
||||
month: $.trim($('#month').data('month')),
|
||||
ajax: 1
|
||||
|
||||
Reference in New Issue
Block a user