Highlighted

Setting up a vacation schedule

Engaged ,
Aug 16, 2016

Copy link to clipboard

Copied

Hi. I am trying to set up a vacation schedule in ColdFusion. I'm just wondering how to do this. Where do I start? I will need it to accrue so many hours each day and then subtract the hours the employee uses. When the employee logs in each day, they'll be able to see how many hours they have accrued. Can someone show me how to get this started? Thanks.

Andy

Views

181

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Setting up a vacation schedule

Engaged ,
Aug 16, 2016

Copy link to clipboard

Copied

Hi. I am trying to set up a vacation schedule in ColdFusion. I'm just wondering how to do this. Where do I start? I will need it to accrue so many hours each day and then subtract the hours the employee uses. When the employee logs in each day, they'll be able to see how many hours they have accrued. Can someone show me how to get this started? Thanks.

Andy

Views

182

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 16, 2016 0
LEGEND ,
Aug 16, 2016

Copy link to clipboard

Copied

No offense, jamie61880​, but we are not here to do your homework for you.  We are not paid Adobe staff (at least most of us aren't), but are coders just like you who come here to ask for help and to help troubleshoot code that's already been written.  We can help you, but only if you help us by getting started and providing examples of what isn't working.

Have you created the database, yet?  Populated it with test/dummy data?

V/r,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 16, 2016 0
Engaged ,
Aug 16, 2016

Copy link to clipboard

Copied

No, I haven't yet. I'm just wondering how to even get this started. How do you accrue hours on a daily basis? What's the best way to set this up? Do I create a table that adds every day to it with the accrual rate, such as 0.1, or do I just output the number depending on what the first date was when I set this up?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 16, 2016 0
LEGEND ,
Aug 16, 2016

Copy link to clipboard

Copied

Design your table, before creating it.  What information do you require?  User First Name, Last Name, Employee ID, hours worked, etc.

Then you could either have the database call a trigger on hours updates that will calculate the vacation hours (pretty complex, and you'll have to get values of hours and vacation hours before adding anything), or you could set CF to do all the heavy lifting (multiple queries to get information before calculating and adding to what's there.)  It all boils down to how simple or complex you want to make it.

V/r,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 16, 2016 0
Engaged ,
Aug 17, 2016

Copy link to clipboard

Copied

Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 17, 2016 0