Home > Tutorials

PowerForce ™
Section 
XX
Top of Page
Section
Changes are as follows:

I have reordered the columns to be consistent with the paper timesheet we are now working from.
Two new columns have been added – ‘No. Staff’ and ‘Meal Break’.
Two new dictionary items have been created to store these values.
The total hours, both per line and at the bottom of the screen will correctly calculate taking into consideration the values in the new columns, ie removing mealbreaks (which are entered as minutes) and multiplying by the number of staff.
I have entered two of the timesheets including employees, subbys and equipment. I have marked the relevant ones with red pen so you can see what I’ve done.
A tip if you are going to enter any, some of the timesheets have their cost codes as a four digit number only instead of the two digit, hyphen, three digit format. Where they have done this, it actually converts like this:
4003 should be 04-003. Keep this in mind and you will find the cost code.
Another mod I have made is with the ‘Copy’ button. Now, instead of just merging in the data from the day before, it displays a calendar allowing you to select the day from which you want to copy, instead of just assuming.


There is also now a get_timesheet function which reads the record and extracts various details as requested including the total number of hours worked whether or not the record represents multiple people.
So you could change your export routine now to use get_timesheet instead of just reading from file yourself.
Example below:
/*****************************************************************************
* Read the timesheet record and then assign all the relevant local variables.
*****************************************************************************/
get_timesheet_rec:
readerr = Get_Timesheet(tsid, '', ts_rec)
If readerr then
// ts_rec will be null
Return
end
// If we didn't incur a read error on the above call
// then we are ok for the rest because we are passing in the record
// and not actually going to disk to retrieve it.
readerr = Get_Timesheet(tsid, 'DATE', shiftdate, ts_rec)
readerr = Get_Timesheet(tsid, 'START', starttime, ts_rec)
readerr = Get_Timesheet(tsid, 'END', endtime, ts_rec)
readerr = Get_Timesheet(tsid, 'EMPLOYEE', Employee, ts_rec)
readerr = Get_Timesheet(tsid, 'COSTNO', CostNo, ts_rec)
readerr = Get_Timesheet(tsid, 'TYPE', Type, ts_rec)
readerr = Get_Timesheet(tsid, 'PAYCODE', PayCode, ts_rec)
readerr = Get_Timesheet(tsid, 'MODIFIED', Modified, ts_rec)
readerr = Get_Timesheet(tsid, 'MODIFIEDBY', ModBy, ts_rec)
readerr = Get_Timesheet(tsid, 'EXPORTDATE', ExportDate, ts_rec)
readerr = Get_Timesheet(tsid, 'EXPORTTIME', ExportTime, ts_rec)
readerr = Get_Timesheet(tsid, 'EXPORTBY', ExportBy, ts_rec)
readerr = Get_Timesheet(tsid, 'CONFIRMSTATUS', confirmstatus, ts_rec)
readerr = Get_Timesheet(tsid, 'STAFFNO', StaffNo, ts_rec)
readerr = Get_Timesheet(tsid, 'BREAK', Break, ts_rec)
shiftdate = show_date(shiftdate)
starttime = show_time(starttime)
endtime = show_time(endtime)
ExportDate = show_date(ExportDate)
ExportTime = show_time(ExportTime)
Return
Something else I stumbled across too…
Go Here
And tick this box

To enable the common name caching stuff.
Turns out it was always there, we just didn’t know where to turn it on.
Regards,
Mark Boorman
Powerforce Software P/L
Level 7, 91 Phillip Street
Parramatta NSW 2150 Australia
T: +61(0) 2 9891 0029
F: +61(0) 2 9891 1771
E: [email protected]
W: http://www.powerforcesoftware.com
-----------------------------------------------------------------
This email (including any attachments) is confidential. If you are not the intended recipient you must not copy, use, disclose, distribute or rely on the information contained in it. If you have received this email in error, please notify the sender immediately by reply email and delete the email from your system. Confidentiality and legal privilege attached to this communication are not waived or lost by reason of mistaken delivery to you. PowerForce Software does not guarantee that this email or attachments are unaffected, by computer virus, corruption or other defects. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PowerForce Software.
Top of Page
Section 
Top of Page
Section
XX
Top of Page
See Also 
PowerForce Controls

Article updated by PowerForce Software on Monday, October 25, 2010.
Copyright ©2007-2013 Envizion Systems - All Rights Reserved - Terms of Use.
|