I am attempting to validate my approach to calculating the Earned Hours based on labor data. For all jobs, I can sum the earned hours in the labor detail table. This is what I assume is the truth.
For comparison, I am trying to use Epicor’s formula to calculate my own Earned Hours. If it works properly, the number I calculate should match Epicor’s LaborDtl.EarnedHours. However, my value is coming up different in some cases and I can’t tell why. My values seem to be underreported based on the actual recorded Earned Hours.
I am using this formula to calculate the Earned Hours:
iif(JobOper.EstProdHours > 0, iif(JobOper.RunQty > 0, (JobOper.EstProdHours / JobOper.RunQty) * sum(LaborDtl.LaborQty), 0 ), 0)
Here is the BAQ I am using to calculate Earned Hours:
ESH2.baq (10.6 KB)
Can you tell what I am missing?
Thanks for your time!
Nate
EDIT: I just noticed this line in the help: The amount of hours that it should have taken (based on standard) to produce the reported LaborQty. For Setup labor the Earned hours is the lessor of (Est.Setup - ActSetUp) or LaborDtl.BurdenHrs. Rework labor always has zero Earned hrs. Earned hours for production labor is calculated as (JobOper.EstProdHours / JobOper.RunQty) * LaborDtl.LaborQty
I didn’t realize that any setup labor went into earned hours. That must be what it is…
EDIT 2: After adding in Setup Labor Earned Hours using this formula:
iif(JobOper.EstSetHours - JobOper.ActSetupHours > 0, iif(JobOper.EstSetHours - JobOper.ActSetupHours < LaborDtl.BurdenHrs, JobOper.EstSetHours - JobOper.ActSetupHours, LaborDtl.BurdenHrs),0)
I can see that my value is still low. Open to any ideas! ![]()