工作時數、休假、病假、法定假日

員工管理:工作與加班時數。假期、病假、與請假。法定假日管理與行事曆整合。月份審核與 PDF 輸出。

Kevin Papst
提供者
Kevin Papst

Introduction

Features

Certain features are not yet here, but already planned (see Roadmap below). Your feedback will be incorporated.

  • It enhances the Working times view with
    • Manual bookings (adjust the time account with plus or minus hours)
    • Overview of the entire year with results per day, the ability to close a month, download result PDF and more
    • See if a user has overtimes or minus hours (since first day in company, per year/month/day)
    • Monthly approvals (per user) with PDF handouts that contain the working-hour details for the entire month
    • See if your users have missing days (no times entered on days where they had to work)
  • It adds the Absence view, which allows to
    • Create holidays (half-days possible)
    • Take time-off (if account has overtime)
    • Create sickness days
    • Create other absences (e.g. unpaid leave)
    • Automatically adds the times absent to the user’s timesheet based on their daily working time
    • Export absences per user to Excel
  • And it adds the new Public holiday management view
    • Allows to create different groups (e.g. for different countries or states) and add public holidays to each of them
    • Import and manual creation of public (local) holidays
    • Public holidays will automatically be added to the user’s timesheet (a user can only be in one public-holiday group)
    • Public holidays can be imported automatically (check if your country is supported).
  • Per user contract settings
    • Expected working hours per day of the week: Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday
    • Vacation entitlement per user for the calendar year
    • The “starting day” limits the working hours calculation from that date until “now”
  • You can import data from the MR plugins (Controlling, Sickday, Vacation)
  • The user calendar will show all absences (sickness, vacation…) and public-holidays

Roadmap

These features will be added in the future, but there is no guarantee when or in which order.

- Settings
  - Last day of work for a user, to stop calculating afterwards
  - Allow to reach a configurable amount of negative hours for time-off ([#159](https://github.com/kimai/Paid-plugins/issues/159))
- Approval workflow for Absences 
    - Allow to "Sent for approval" to Supervisor
    - Allow to "Reject" or "Approve" by Supervisor
    - Only calculate approved or locked absences (new ones are for planning)
- Notification
  - Sent notifications to supervisor for new "absences to be approved"
  - Sent notifications to user for approved/rejected absences
- Absence calendar
    - Display all users / teams
    - Allow export as ical (or similar format) for use in external calendars (e.g. Outlook)
- Monthly contract PDF
    - Include: total working time sum
    - Include: total holiday sum
    - Include: holidays at start of month sum
    - Include: start of month working-time sum
    - Include: manual bookings
- Finalize year
  - Allow automatic adjustments of time and holiday account of next year, e.g. from a list-overview
- Working Times
  - Different colors for holiday / sickness / PTO
- API 
    - methods to read absences (date-range, user, absence type)

Ideas

This list is a collection of feature wishes from users, which might or might not be added. If you need one of these features, do not rely on them being added, but contact me upfront to discuss your needs. If I decide to add one of these feature, it will be moved to the “Roadmap” section.

- Prevent that certain days can be booked for vacation
- Add first start- and last end-time as begin and end times to the PDF
- Support for employees without expected working hours (e.g. hourly-based freelancers, who cannot used fixed working days) 
- Working times
  - Allow to configure a [dedicated project](https://github.com/kevinpapst/kimai-plugins/discussions/112) that will be exclusively used for calculating attendance time 
  - Allow to configure a dedicated project that will be ignored when calculating the attendance time
- Validations
  - Configure if timesheets should be prohibited during absence (type)
  - Configurable rule to deactivate time-records on public holidays
- API 
  - Methods to read absences
  - Methods to write absences (e.g. when using a HR tool for holiday planning)
- Approval workflow
  - Allow to export (or print) pending approvals
- Management view for all users
  - showing statistics for absences
  - pending holidays (approved), used holidays, available
- Monthly approvals
  - Allow to close months partially, in case there is a change in the contract within the month
- Absences
  - Add holiday for multiple users (e.g. for forced company vacations)
  - Types of absences (Workaround: use comment field)
    - Configurable for sickness and other
    - Show type in PDF
    - paid/not paid
  - Sum of sickness and other days on Absence screen
- Breaks (Pause)
  - Support calculation of breaks (e.g. display in calendar)
  - Use all breaks between first entry of the day and last entry of the day as pause
- Dashboard
  - Existing widgets do not show public holidays, sickness, vacation ... make it configurable or create new widgets that include these hours/days
  - Widgets for total numbers, to show "status" more prominent
- Working time requirements (Arbeitszeitvorgaben)
  - Maximum working time (per day, in one session) and breaks
  - Configure fixed rules per country
  - Allow one custom rule
  - Configure default rule (country or custom) per user
- Holidays
  - Lockdown method for vacations (define periods where no vacations can be booked)
  - Automatic calculation of holidays according to the working-time duration (e.g. 30 days per year for a 40h week) 
- Contracts 
  - Multiple working contracts per user (configured with start and end time)
- Define arbitrary date ranges with attached working-time profiles
  - Allow to attach each user multiple profiles

Changelog

## Version 1.10.0

Compatibility: requires minimum Kimai 2.12.0

- Changed: support attribute caching in Voter
- Fixed: permission check for PDF download
- Fixed: public holidays in calendar missing

## Version 1.9.0

Compatibility: requires minimum Kimai 2.12.0

- Added: system configuration to set absence comment-field optional
- Added: allow to assign half days for user contract "holidays per year"
- Added: allow to use half days in "manual bookings"
- Added: allow to set duration for "sickness"
- Added: auto-approve all open days of the year before the lock date
- Changed: single line comment field for "manual bookings" form
- Fixed: use correct base class for migration - removes Doctrine deprecation warning

## Version 1.8.0

Compatibility: requires minimum Kimai 2.11.0

- Added: absence types have a color
- Added: use type colors on absence screen and for calendar entries
- Fixed: translate calendar entries in current locale, instead of absence users locale
- Fixed: do not show error on calendar if `absences` permission is deactivated for a user
- Changed: use refactored language vs locale from user for email generation

## Version 1.7.0

Compatibility: requires minimum Kimai 2.10.0

- Added: send notification email to supervisor for new absences
- Added: cross-link absence and work-contract page
- Added: trigger event when absences are created
- Fixed: editing absences could show fields (like "half day" for sickness) that should not be there

## Version 1.6.0

Compatibility: requires minimum Kimai 2.9.0

- Fixed: export of absences caused 500
- Changed: replaced DateTime with DateTimeInterface / DateTimeImmutable

## Version 1.5.0

Compatibility: requires minimum Kimai 2.8.0

- Added: new category to book "unpaid holiday" absences
- Added: generic calculation logic to prevent required adjustments for new categories
- Added: different duration limitation for absence types (e.g. 75 days in one booking for parental leave)
- Added: command `bin/console kimai:bundles:workcontract:absence-types` to debug absence types
- Fixed: time calculation for new "child is sick" and "parental leave" categories
- Fixed: deprecation by using DateTimeImmutable

## Version 1.4.0

Compatibility: requires minimum Kimai 2.7.0

- Added: manual adjustments for holidays, e.g. top up available days with remaining days from last year
- Added: added category to book "child is sick" absences
- Added: added category to book "parental leave" absences
- Added: prevent booking absences across a time-range of two years
- Added: limit selectable time-range to selected year
- Fixed: day calculation of vacations with public holidays in between

## Version 1.3.0

Compatibility: requires minimum Kimai 2.5.0

- Fixed: adapted collapsible boxes for Kimai 2.5.0
- Fixed: allow booking holidays with public holidays within the selected date-range

## Version 1.2.0

Compatibility: requires minimum Kimai 2.1.0

- Fixed: some users could not see public holidays in the calendar
- Fixed: route mapping type changed to attribute
- Fixed: Homepage link in extension screen

## Version 1.1.0

Compatibility: requires minimum Kimai 2.0.34

- Added: data migration from MR plugins
- Added: show absences in calendar
- Added: show public-holidays in calendar
- Added: export absences to excel
- Fixed: possible pagination issue

## Version 1.0.3

Compatibility: requires minimum Kimai 2.0.31

- Fixed: make sure to redirect to correct screen after create and delete absences

## Version 1.0.2

Compatibility: requires minimum Kimai 2.0.31

- Added: permission docs
- Fixed: first day of absence ranges is created twice

## Version 1.0.1

Compatibility: requires minimum Kimai 2.0.31

- Fixed: cannot update existing absences
- Fixed: replaced deprecated code usage

## Version 1.0.0

Compatibility: requires minimum Kimai 2.0.31

- Added: booking date-ranges for holiday and sickness
- Added: 10 new validations to make sure only valid absences can be booked
- Added: permissions for deleting absences
- Added: batch delete (non-locked) absences
- Added: order absences from highest to lowest date
- Added: support for half-days in public holidays
- Added: permission for creating absences
- Added: support for half-days in holidays
- Fixed: editing absences only non-locked absences
- Fixed: several calculations were not correct
- Fixed: adjusting "expected working times" should not change "public holiday calculation" in already locked months
- Fixed: adjusting "expected working times" should not change "absence calculation" in already locked months
- Fixed: removed unused `time_off` permission

## Version 0.5.0

Compatibility: requires minimum Kimai 2.0.29

- Added: show year number in import screen
- Added: show new public-holiday group after creation
- Fixed: year switcher in absence screen
- Fixed: limit public-holidays per year

## Version 0.4.0

Compatibility: requires minimum Kimai 2.0.28

- Added: First day of work in user-contract setting
- Added: do not calculate working-times before first day of work
- Added: show absence status icon
- Fixed: use current user for absence calculation
- Fixed: do not add public holiday to working time
- Fixed: calculate absences in working time, so they can be used when month is locked
- Removed: summaries for absences/holidays/sickness/time-off
- Added: create absences for team-member

## Version 0.3.0

Compatibility: requires minimum Kimai 2.0.27

- Improved public holiday management
- First draft supporting absences
    - holiday
    - time-off
    - sickness
    - other absences

## Version 0.2.2

Compatibility: requires minimum Kimai 2.0.26

- Fix: missing "absence" route

## Version 0.2.1

Compatibility: requires minimum Kimai 2.0.26

- Fix: migration and composer version

## Version 0.2

Compatibility: requires minimum Kimai 2.0.26

- Added: Public holiday management and group assignment
- Added: Summary for public holidays
- Added: Include public holiday times in monthly times

## Version 0.1

Compatibility: requires minimum Kimai 2.0.14

Initial draft version:

- Added: Support for manual bookings
- Added: Summary for working times
- Added: Summary for manual bookings

安裝

複製檔案

Extract the ZIP file and upload the included directory and all files to your Kimai installation to the new directory:

var/plugins/WorkContractBundle/

The file structure needs to look like this afterwards:

var/plugins/
├── WorkContractBundle
│   ├── WorkContractBundle.php
|   └ ... more files and directories follow here ...

清除快取

After uploading the files, Kimai needs to know about the new plugin. It will be found once the cache was re-built. Call these commands from the Kimai directory:

How to reload Kimai cache

bin/console kimai:reload --env=prod

It is not advised, but in case the above command fails you could try:

rm -r var/cache/prod/*

You might have to set file permissions afterwards:

Adjust file permission

You have to allow PHP (your webserver process) to write to var/ and it subdirectories.

Here is an example for Debian/Ubuntu (to be executed inside the Kimai directory):

chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/

建立資料庫

Run the following command:

bin/console kimai:bundle:workcontract:install

This will create the required database tables and update them to the latest version.

更新

Updating the plugin works exactly like the installation:

  • Delete the directory var/plugins/WorkContractBundle/
  • Execute all installation steps again:
    • 複製檔案
    • 清除快取
    • Update database with bin/console kimai:bundle:workcontract:install

相容性

下表比較了外掛程式與所需的最低 Kimai 版本。

套件版本 最低 Kimai 版本
1.9.0 - 1.10.0 2.12.0
1.8.0 2.11.0
1.7.0 2.10.0
1.6.0 2.9.0
1.5.0 2.8.0
1.4.0 2.7.0
1.3.0 2.5.0
1.2.0 2.1.0
1.1.0 2.0.34
1.0.0 - 1.0.3 2.0.31
0.5.0 2.0.29
0.4.0 2.0.28
0.3.0 2.0.27
0.2.0 2.0.26
0.1.0 2.0.14

體驗版本

如要測試此外掛程式,可前往體驗版網頁 demo.kimai.org:

使用者名稱: susan_super
密碼: kitten

在此處找到更多測試帳號.

使用截圖

Screenshot
所有假日與假日群組的清單,還可以匯入與編輯假日
Screenshot
畫面中的下拉式清單中預先定義了許多國家與地區,可以各別匯入年度假日清單
Screenshot
可以各別設定使用者每週幾的工時目標。還可設定使用者的假日群組、年首工作日、與年度總假日數。
Screenshot
工時總結畫面,會顯示逐月與年度總和的目標與實際工時,並包含手動預定的工時的橫列
Screenshot
手動預定工時能調整工時帳戶,來進行諸如調用去年的工時、銷去已付工時、等操作
Screenshot
每日實際工時與不足工時的回顧檢視,顯示了所有缺勤(假日、病假、等)以及月底結算的選項
Screenshot
所選的使用者的個人資料中沒有聯絡人的設定,所以 Kimai 僅能顯示其工時

常見問題

這些常見問題由本外掛程式的開發者提供。

You can buy the plugin via the Marketplaces 'Lemon Squeezy' or 'Gumroad' and pay with Credit Card or PayPal. Both offer instant access to the purchases.

Support-questions, bug-reports and feature-requests will be answered in this Github repository

提供者

Kevin Papst

Building Kimai since 2009

如果您有任何問題,請透過以下聯絡資訊直接與此開發者聯繫。
Top