Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,166,058 members, 7,863,754 topics. Date: Tuesday, 18 June 2024 at 04:12 AM

How Can I Make This Work - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / How Can I Make This Work (630 Views)

How Did Google Make This Cool Google Doodle And Can U Make Urs? / Review This Work And Give Commends : Thanks / Do You Think This Work At Home Stuff Is For Real? (2) (3) (4)

(1) (Reply) (Go Down)

How Can I Make This Work by deco2come: 11:49pm On Feb 22, 2011
Please I need help to with this script. I have tried but failed to make it work

I'm designing a website that takes care of employees time. Every month, each worker has a bonus of 1500dollars, but at the end of the month, the bonus will be giving to the worker based on their time they arrive at work each day.

For example, if a worker arrive at work by 8a.m, he/she earns 50 dollar, if the worker arrives by 9a.m, he/she earns 30dollars, if the worker at 9:30a.m, he/she looses 20dollars. Finally if the worker's bonus is below 500dollars, she will get the message "You Need To See The Boss".

Furthermore, I want the worker to see the following when he/she visited his/her history

Number of times arrived at 8a.m =
Number of times arrived at 9a.m =
Number of times late(9:30a.m) =
Remaining/Total bonus =
Re: How Can I Make This Work by OmniPotens(m): 4:35am On Feb 23, 2011
If you really know what you want to code then I think you already have the solution otherwise I am thinking you only need the source codes. Am I right or wrong?
Re: How Can I Make This Work by deco2come: 4:51am On Feb 23, 2011
OmniPotens:

If you really know what you want to code then I think you already have the solution otherwise I am thinking you only need the source codes. Am I right or wrong?

Wow!!!!!!!! My guy you are wasting your career in web designing. You should make a fortune if you are a fortune teller. My guy you are 101% right. I have completely map out what I want to to code and also the solution to the project I'm working on. But this question I posted just hook me like a fish. I tried but my code isn't working. So I'm seeking for help. Thank you for your concern.
Re: How Can I Make This Work by ogzille(m): 5:59am On Feb 23, 2011
which part have u done, so we will have something to work on?
Re: How Can I Make This Work by OmniPotens(m): 6:08am On Feb 23, 2011
deco2come:

Please I need help to with this script. I have tried but failed to make it work

I'm designing a website that takes care of employees time. Every month, each worker has a bonus of 1500dollars, but at the end of the month, the bonus will be giving to the worker based on their time they arrive at work each day.

For example, if a worker arrive at work by 8a.m, he/she earns 50 dollar, if the worker arrives by 9a.m, he/she earns 30dollars, if the worker at 9:30a.m, he/she looses 20dollars. Finally if the worker's bonus is below 500dollars, she will get the message "You Need To See The Boss".

Furthermore, I want the worker to see the following when he/she visited his/her history

Number of times arrived at 8a.m =
Number of times arrived at 9a.m =
Number of times late(9:30a.m) =
Remaining/Total bonus =

SIDE A
You can look this process up like filling a contact form and checking for met conditions.  Ex.

Every month, each worker has a bonus of 1500dollars (Total allocated bonus (constant T))

if a worker arrive at work by 8a.m, he/she earns 50 dollar (early bird (variable E))

if the worker arrives by 9a.m, he/she earns 30dollars (on time (variable O))

if the worker at 9:30a.m, he/she looses 20dollars (late comer (variable L))

if the worker's bonus is below 500dollars, she will get the message "You Need To See The Boss".


Monthly Attendance Details:
Number of times arrived at 8a.m = total # of variable E
Number of times arrived at 9a.m = total # of variable O
Number of times late(9:30a.m) = total # of variable L
Remaining/Total bonus =  1) (total # of E + total # of O) = gains, if L is absent then do variable T - total bonus then you get month's earning. if L is present with no E, if L is present with no O, if L is present with E, if L is present with O, if L is present with E and O (use if .  .  . else statements to do the maths for all these). I'd prefer you don't subtract L from E or O to avoid negative index. Something like E= 0, O=0, L=20 then if you do 0 + 0 - 20 = -20. If you then do constant T - -20, the - - will give you a + so watch that error.

I don tire o.

Man study the above well and see that your solution is just around you. Hope I have helped you to get 50% of your puzzled cleared for your programming logics.
Re: How Can I Make This Work by DDay: 7:41am On Feb 23, 2011
function Reward
if employee_logged_on_time =< 0800
then
employee_bonus = employee_bonus + 50
end

if employee_logged_on_time > 0800 and employee_logged_on_time =< 0900
then
employee_bonus = employee_bonus + 30
end

if employee_logged_on_time >= 0930
then
employee_bonus = employee_bonus - 20
end
end

function_trouble
if employee_bonus < 300
then
print("Please see the boss"wink;
end

Hey mate, give this a go, change the coding language as appropriate. You may need to add extra information to the code, such as selecting the appropriate record.

So for example, when a user logs into the website, i'm assuming you have a database running in the background and each user will have a unique id. So the code below could be modified to include each users unique id, so that you do not write over another user information.

function Reward
if employee_logged_on_time =< 0800
then
employee_bonus = employee_bonus + 50
where employee_id = user_logged_on_id
end
end

H

(1) (Reply)

Free Advertising For Your Website / Our Company Needs To Ungrade To A Content Mgt Website / Get Your Webmail Customized, [email@yourdomain.com, .us, .net. Co.uk, .tv) N8k.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 27
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.