From 2f81e1d77e6e2b34df42fd07316b2128e15b6c1d Mon Sep 17 00:00:00 2001 From: Spi Date: Tue, 7 May 2024 10:24:30 +0200 Subject: [PATCH] =?UTF-8?q?Zeiterfassung=20Update=20=20*=20Berechnungen=20?= =?UTF-8?q?BP=20=20*=20M=C3=B6glichkeit=20Mehrstunden=20in=20Gutstunden=20?= =?UTF-8?q?umzuwandeln?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/TimerecordingBilling/Detail.php | 6 ++-- .../TimerecordingBilling/DetailClosed.php | 15 +++++++-- .../default/TimerecordingCategories/Index.php | 2 +- Layout/default/TimerecordingReport/Index.php | 1 + .../TimerecordingBillingController.php | 6 ++-- .../TimerecordingBillingEmployeeModel.php | 1 + ...mployee_add_fields_overtime_plus_hours.php | 31 +++++++++++++++++++ public/assets/js/datatables-std.js | 7 +++++ public/js/pages/timerecordingReport/index.js | 1 + 9 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 db/migrations/20240507075443_timerecording_billing_employee_add_fields_overtime_plus_hours.php diff --git a/Layout/default/TimerecordingBilling/Detail.php b/Layout/default/TimerecordingBilling/Detail.php index 8c493fa41..11afd6b99 100644 --- a/Layout/default/TimerecordingBilling/Detail.php +++ b/Layout/default/TimerecordingBilling/Detail.php @@ -108,8 +108,9 @@ - @@ -124,6 +125,7 @@ superexpertEnabled()): ?> hidesearch = [2, 3, 4, 5, 6, 7, 9, 10]; + var pageLength = 100; $(document).ready(function () { $('.buttons-excel').closest('div').append('
'); $('.buttons-excel').closest('div').append('
'); diff --git a/Layout/default/TimerecordingBilling/DetailClosed.php b/Layout/default/TimerecordingBilling/DetailClosed.php index 4f4cc945b..65684fe40 100644 --- a/Layout/default/TimerecordingBilling/DetailClosed.php +++ b/Layout/default/TimerecordingBilling/DetailClosed.php @@ -122,7 +122,7 @@ ishourssum / 3600, 2), "2", ",", ".") ?> musthours / 3600, 2), "2", ",", ".") ?> - ishourssum-$timerecording->musthours) / 3600, 2), "2", ",", ".") ?> + ">ishourssum-$timerecording->musthours) / 3600, 2), "2", ",", ".") ?> overtime_plushours) ? "(".number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".").")" : '' ?> plushours_all == 0) ? '
' : '' ?>plushours_all) / 3600, 2), "2", ",", ".") ?> plushours_all > 0) ? '' : '
' ?> @@ -219,6 +219,7 @@ superexpertEnabled()): ?> hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12,13]; + var pageLength = 100; $(document).ready(function () { superexpertEnabled()): ?> $('.buttons-excel').closest('div').prepend('
'); @@ -245,12 +246,20 @@ }); $('#overtimeModal').on('show.bs.modal', function (event) { var button = $(event.relatedTarget); - + console.log(button.closest('tr').html()); if (button.hasClass('change-difference')) { $('#overtimeModal-title').text('Mehrstunden Transfer'); $('#overtimeModal').data('id', button.data('id')); + var overtimeplushours=button.closest('tr').find('.overtimeplushours-td').data('overtimeplushours'); - $('#overtimes').html('Mehrstunden: ' + button.data('hours') + ''); + if (overtimeplushours != "0,00") { + var overtimeplushourstext='('+ button.closest('tr').find('.overtimeplushours-td').data('overtimeplushours')+ ')'; + } else { + var overtimeplushourstext=""; + } + + + $('#overtimes').html('Mehrstunden: ' + button.data('hours') + overtimeplushourstext + ''); $('#submit-button').data('type', 'difference'); $('.overtime-modal-div').show(); } diff --git a/Layout/default/TimerecordingCategories/Index.php b/Layout/default/TimerecordingCategories/Index.php index efe0a8ad0..581e0327b 100644 --- a/Layout/default/TimerecordingCategories/Index.php +++ b/Layout/default/TimerecordingCategories/Index.php @@ -87,7 +87,7 @@