Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to record labor hours spent on a project
10-31-2018, 03:07 PM
Post: #11
RE: how to record labor hours spent on a project
I have had a go at creating a timesheet script ... so far I only have timesheets entered and edit/delete. I want to have an approval/edit process too and once approved posted to the work orders and no longer editable.
All my code goes to webERP at github - the new script ... still a work in progress - but works I think...

https://github.com/webERP-team/webERP/bl...sheets.php

If a timesheet employee (from the new employees.php script) has a webERP login then it assumes the timesheet is for the logged in user - a new security token for timesheet admins allows timesheets for all employees to be entered/edited.
I want to check that the time entered for the week agrees to the employees standard weekly hours before it can be approved too which is yet to be coded.

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
10-31-2018, 07:40 PM
Post: #12
RE: how to record labor hours spent on a project
Thank you Phil!

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
11-03-2018, 10:15 AM
Post: #13
RE: how to record labor hours spent on a project
I pulled down latest on Github to my server, logged in with security role System Administrator and then manually browsed to .../Timesheets.php. The menu bar on the page rendered with a security notice "The security settings on your account do not permit you to access this function". Is there a database patch I need to run?

http://www.dalescott.net
Visit this user's website Find all posts by this user
Quote this message in a reply
11-03-2018, 02:47 PM
Post: #14
RE: how to record labor hours spent on a project
You need to apply the database updates to
a) get the new employees and timesheets table
b) get the new scripts added to the scripts table
c) get the new security token for timesheet admin

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
11-05-2018, 09:03 AM (This post was last modified: 11-05-2018 09:52 AM by dalescott.)
Post: #15
RE: how to record labor hours spent on a project
Thanks Phil. I had to edit sql/mysql/upgrade4.15-4.15.1.sql to replace a semi-colon with a comma (see bug report).

Timesheets.php now appears to work correctly. I will post again after setting up an employee and entering time.

http://www.dalescott.net
Visit this user's website Find all posts by this user
Quote this message in a reply
11-05-2018, 09:54 AM
Post: #16
RE: how to record labor hours spent on a project
Thanks for the report Dale ... I've fixed in git now.

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
11-27-2018, 09:30 PM (This post was last modified: 11-28-2018 12:12 AM by falkoner.)
Post: #17
RE: how to record labor hours spent on a project
Phil, there was a git conflict when you committed to sql/mysql/upgrade4.15-4.15.1.sql leaving the conflict messages in the file:

<<<<<<< HEAD
KEY `userid` (`userid`);
=======
KEY `userid` (`userid`),
>>>>>>> upstream/master

don't shoot the messenger Smile

Also I note that you hard coded access token 20 into the scripts. I think hard coding access tokens is a bit of a nasty hack as they can be changed and re-used - it is possible to change token 20, and use it as something else.

Better to set a flag in www_users for whether they can create time sheets. See how I did the create tenders flag for an example.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
11-28-2018, 05:45 AM
Post: #18
RE: how to record labor hours spent on a project
Thanks Tim - I'll take a look at the upgrade script.

With the security token - I thought I used similar logic to the selling prices token? I'll have another look.

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
11-28-2018, 08:43 AM
Post: #19
RE: how to record labor hours spent on a project
(11-28-2018 05:45 AM)phil Wrote:  With the security token - I thought I used similar logic to the selling prices token? I'll have another look.

To be honest I never liked that either. If we must hard code the security token it is better to go very high for the "reserved" ones, say 1000+ and then block SecurityTokens.php from accessing anything over 1000 so that they cannot be altered, though in this case a www_users flag is a more logical solution.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)