Bởi: T.V.T Marine Automation (aka TVTMA) NextERP
Số dòng Code | 278 |
Tên kỹ thuật | to_hr_scheduled_working_days |
Giấy phép | OPL-1 |
Website | https://erp.nzvps.com/duty-working-hours-days-in-month |
Phù hợp cho các phiên bản | v 10.0 v 11.0 |
Yêu cầu các App |
Leaves (hr_holidays) Employees (hr) Discuss (mail) Calendar (calendar) |
Problems
Is it convenient for you to calculate basic wage for an employee working from 2018/02/20 ~ 2018/02/28?
As an end user with very basic technical knowledge, it seems to be impossible for you to - find out number of worked days nor number of full month working days of that full month - find out the hour rate which is calculated by: contract basic wage / full month working hours (Odoo, in the payslip, does not know full month working hours of that Feb 2018)
Assume that
Basic Wage: 1000
Payslip Period: 2018/02/20 ~ 2018/02/28
Working Schedule: 44 Hours a week
What you may expect to have
the total month working hours of the Feb 2018 is 176
the total month working days of the Feb 2018 is 22
the duty working hours of the employee of the payslip is 60
the duty working days of the employee of the payslip is 8
The Solution
This module solves the problem above mentioned by providing the following data into employee payslips:
Month: a single month of the payslip's
Duty Working Hours: the total hours of the month the employee of the payslip has to work according to the payslip period
Duty Working Days: the total days of the month the employee of the payslip has to work according to the payslip period.
Month Working Hours: the total working hours of the FULL month according to the working schedule, no matter what the payslip period is
Month Working Days: the total working days of the FULL month according to the working schedule, no matter what the payslip period is
In case a pay slip crosses months, the data should be a table where each row is a set of the data above mentioned.
How to apply for Salary Rules
Basic Wage Calculation (no leave consideration)
result = sum(line.duty_working_hours * (contract.wage / line.month_working_hours) for line in payslip.working_month_calendar_ids)
Fixed Monthly allowance Calculation (no leave consideration)
result = sum(line.duty_working_hours * (contract.allowance / line.month_working_hours) for line in payslip.working_month_calendar_ids)
Known Issues
1. Duty Working Days and Month Working Days are calculated based on the conversion of the unit of measure Hour(s) -> Day(s) whose default value is 8.0 hours per day. In case your working hours of a day may vary across your resource calendar, do NOT use this for salary computation. Switch to hours base calculation should be PERFECT!
Editions Supported
Community Edition
Enterprise Edition
Phần mềm này và các tệp liên kết ("Phần mềm") được sử dụng (chạy, tuỳ biến, chạy sau khi được tuỳ biến) chỉ khi bạn mua được giấy phép có hiệu lực từ tác giả, điển hình như qua các Ứng dụng Odoo, hoặc trong trường hợp bạn nhận được thoả thuận bằng văn bản từ tác giả của Phần mềm (chi tiết tại tệp COPYRIGHT).
Bạn có thể phát triển các phân hệ Odoo có sử dụng Phần mềm như một Thư viện (thường là phụ thuộc vào, nhập vào và sử dụng nguồn của nó) nhưng không sao chéo bất kỳ mã nguồn hay tài liệu nào thuộc Phần mềm. Bạn có thể phân phối những phân hệ này theo giấy phép mà bạn lựa chọn, miễn sao nội dung giấy phép đó tương tích với điều khoản của Giấy phép Phần mềm Độc quyền Odoo (ví dụ: LGPL, MIT hay bất kỳ loại giấy phép phần mềm độc quyền nào tương tự vậy).
Nghiêm cấm phát hành, phân phối, cấp phép lại hoặc bán bản sao của Phần mềm hoặc bản sao Phần mềm đã được sửa đổi.
Thông báo bản quyền và chấp thuận nêu trên buộc phải được bao gồm trong tất cả các bản sao hoặc các phần quan trọng của Phần mềm.
PHẦN MỀM ĐƯỢC CUNG CẤP "NGUYÊN TRẠNG", KHÔNG BẢO ĐẢM DƯỚI BẤT KỲ HÌNH THỨC NÀO, ĐƯỢC THỂ HIỆN RÕ RÀNG HOẶC NGỤ Ý, KHÔNG GIỚI HẠN ĐẢM BẢO VỀ CÁC BẢO ĐẢM NGỤ Ý VỀ KHẢ NĂNG THƯƠNG MẠI, PHÙ HỢP VỚI MỤC ĐÍCH CỤ THỂ VÀ KHÔNG VI PHẠM. TRONG MỌI TRƯỜNG HỢP SẼ KHÔNG CÓ TÁC GIẢ HOẶC CHỦ SỞ HỮU BẢN QUYỀN NÀO CHỊU TRÁCH NHIỆM VỀ BẤT KỲ KHIẾU NẠI, THIỆT HẠI HOẶC TRÁCH NHIỆM PHÁP LÝ KHÁC NÀO TRONG PHẠM VI HỢP ĐỒNG, CÁC THIỆT HẠI HOẶC CÁCH KHÁC, PHÁT SINH TỪ, NGOÀI HOẶC CÓ LIÊN KẾT VỚI PHẦN MỀM HOẶC VIỆC SỬ DỤNG HOẶC KINH DOANH KHÁC TẠI PHẦN MỀM.