PHP中的加班系统 [英] Overtime System in PHP

查看:151
本文介绍了PHP中的加班系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在考虑使用PHP和MySQL为我的公司构建一个加班系统,希望你们对将加班费率公式转换为PHP语言有所帮助.

公式如下所示:

如果工人在
的范围内工作 上午6点至晚上10点-费率应为:
总索偿小时数=工作小时数* 1.125

其他
如果她/他从晚上10点到早上6点工作,-费率应为:
总索赔小时数=工作小时数* 1.25

示例:我使用两个选择时间列表,允许用户选择开始时间和
和结束时间.
假设用户选择开始时间为12am,结束时间为8am
工作时间应为= 8小时
但需要同时在两个比率中进行计算
6小时* 1.25(从12am到6am)= 7.50
2小时* 1.125(从6am到8am)= 2.25

因此总工时索赔应为= 7.50 + 2.25
= 9.75
有人可以帮我吗?
谢谢.

Hello guys,

I''m thinking of building an overtime system for my company using PHP and MySQL and would like some help from you guys regarding translating the Overtime rate formula into PHP language.

The Formula looks like this :

if the worker works on range time of
6 a.m to 10p.m - the rate should be:
total claim hours = hours of working * 1.125

else
if she/he works from 10pm to 6am, - the rate should be:
total claim hours = hours of working * 1.25

example : I am using two select list of time which allow the user to choose start and
and end time.
Let say the user choose start time as 12am and end time 8am
hours of working should be = 8 hours
but the calculation need to be done in both rate
6 hours * 1.25 (this is for 12am to 6am) = 7.50
2 hours * 1.125 (this is for 6am to 8am) = 2.25

so the total hours claim should be = 7.50 + 2.25
= 9.75
can any one help me with this?
thank you .

推荐答案

在这里 [ ^ ]是个好地方开始.
Here[^] would be a good place to start.


这篇关于PHP中的加班系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆