If OvertimeRate or CostPerUse are empty on the first PayRate item in a CostRateTable collection, the code fails.
299 If CDate(vEffectiveDate) > #1/1/1984# Then
300 oCostRateTable.PayRates.Add vEffectiveDate, vStdRate, vOvtRate, vCostPerUse
301 Else
302 oCostRateTable.PayRates(1).StandardRate = vStdRate
303 If Not IsEmpty(vOvtRate) Then oCostRateTable.PayRates(1).OvertimeRate = vOvtRate
304 If Not IsEmpty(vCostPerUse) Then oCostRateTable.PayRates(1).CostPerUse = vCostPerUse
305 End If
Solution:
If CDate(vEffectiveDate) > #1/1/1984# Then
Set oPayRate = oCostRateTable.PayRates.Add(vEffectiveDate, vStdRate)
Else
Set oPayRate = oCostRateTable.PayRates(1)
oPayRate.StandardRate = vStdRate
End If
If Not IsEmpty(vOvtRate) Then oPayRate.OvertimeRate = vOvtRate
If Not IsEmpty(vCostPerUse) Then oPayRate.CostPerUse = vCostPerUse
Todo:
[x] assign this issue
[x] label the issue for enhancement or bug
[x] label the issue with codemodule (so fixes can be aggregated and hotfixed together)
[x] checkout appropriate branch and create topic branch
[x] design, code and test
[x] update codemodule x.y.z
[x] update CurrentVersions.xml manually
[x] commit changes prefix comment with Issue #XXX -
[x] merge topic into appropriate branch(es) and push
Problem:
If OvertimeRate or CostPerUse are empty on the first PayRate item in a CostRateTable collection, the code fails.
Solution:
Todo:
topic
branchIssue #XXX -
topic
into appropriate branch(es) and push