Breakout - SM- Checking/Rounding on Existing Labour Lines

Discussions relating to 3rd party solutions (customisations, reports, modules, applications) which are a value-add to the Jiwa product.

Breakout - SM- Checking/Rounding on Existing Labour Lines

Postby Hyperus » Mon Oct 27, 2008 2:30 pm

Breakout - SM- Checking/Rounding on Existing Labour Lines

This is a double breakout.
It first checks that the End Labour time/date is not before the START Labour time/date - something that just avoids simple human error.
It also performs a special custom rounding calculation (quite different to the optional Jiwa SM Rounding options in system options) that affects ONLY the "Billing Time" field WITHOUT adjusting the "Elapsed Time" field. This allows you to track exact labour times if required, but still adhering to company guidelines regarding charging/billing rounding requirements. Currently, the rounding is set for 5 minute rounding, but can easily be changed to be anything desired. I have left 2 example lines for 10 minute and 15 minute rounding that are commented out.

from Jiwa :-
JIWA - Service Manager - Maintenance
Record Menu - Utilities - Manage Breakouts

Left-Click "Task Labour Changed" Breakout
add this one line at the top :-

Code: Select all
'
' Task Labour Changed
'

If Trim(FieldName)="StartTime" Or Trim(FieldName)="EndTime" Then
      If IsDate(JobObject.Tasks(TaskKey).Labours(LabourKey).StartTime) And IsDate(JobObject.Tasks(TaskKey).Labours(LabourKey).EndTime) Then
              If JobObject.Tasks(TaskKey).Labours(LabourKey).EndTime < JobObject.Tasks(TaskKey).Labours(LabourKey).StartTime Then
                  JobObject.Tasks(TaskKey).Labours(LabourKey).EndTime = JobObject.Tasks(TaskKey).Labours(LabourKey).StartTime
              End If
              dtTimeIn = JobObject.Tasks(TaskKey).Labours(LabourKey).StartTime
              dtTimeOut =JobObject.Tasks(TaskKey).Labours(LabourKey).EndTime
'              minutes = (((DateDiff("n", dtTimeIn, dtTimeOut) + 14) \ 15) * 15)
'              minutes = (((DateDiff("n", dtTimeIn, dtTimeOut) + 9) \ 10) * 10)
              minutes = (((DateDiff("n", dtTimeIn, dtTimeOut) + 4) \ 5) * 5)
              Hours = minutes / 60
              Result = Hours
              If Result < 0 Then
                  Result = 0
              End If
          End If
      Static2=True
      JobObject.Tasks(TaskKey).Labours(LabourKey).BillingTime=Result
      Static2=False
End If
End Sub



dont forget to leave the "End Sub" line at the end.
Click OK, Click Close, Close Service Manager and ReOpen Service Manager.

/Roy Adams
Hyperus
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Feb 18, 2008 1:12 pm
Location: Shailer Park, Queensland

Return to Third Party modules and solutions

Who is online

Users browsing this forum: No registered users and 1 guest

cron