Perdiem differs per job and no Perdiem is paid when there is no job on the time entry.
Use this setup and workflow if you have a Perdiem Pay (or Reimbursement Pay Type pay), which needs to calculate based on the job on the line of time.
Considerations:
Setup the Pay ID:
Setup the Pay Rate Table for this pay:
Create the formulas to be used on the PERDIEM Pay.
This formula has a "nested" formula. Create that formula first. Go to Tools/Formulas and select New.
PERDIEM Rate:
LOOKUP(Rate[PR Pay Rate Table],"PERDIEM",JOIN(Job[PR Time]))
NOTE: Rate is retrieved from the PR Pay Rate Table record. "PERDIEM" is the ID of the Pay Rate Table you setup. Job is retrieved from the PR Time record.
*(If you selected more than one Table column on the Pay Rate Table setup, you'll need to include that column on this formula. For example if you also selected Shift as a column, you'll include Shift off the PR Time Record. It should appear behind the Job. If the lookup to the Pay Rate Table Rate doesn't include the columns on the pay rate table the calculation could be incorrect.)
Create the formula which will be placed on the Pay ID "PERDIEM".
PERDIEM:
IF(Pay ID[PR Time] = "PERDIEM" AND Job[PR Time] <>"",Units[PR Time]*PERDIEM Rate[Public Formula])
NOTE: Pay ID is retrieved from the PR Time record. "PERDIEM" is the ID of the Pay ID. Job and Units are retrieved from the PR Time record. PERDIEM Rate is the formula you setup first.
The last formula PERDIEM is added to the PERDIEM Pay id in the formula field.
A rate will be used when here are Units for the Specific Job and the PERDIEM pay is used on the line of time.
The jobs must be setup on the PERDIEM Pay rate table.
If there are no jobs entered on the line of time, or the job entered to the PERDIEM pay is not setup on the PERDIEM Pay Rate table, no rate will be retrieved.
If you are importing time, there is no need to include the rate on the import.
It is not necessary to add the PERDIEM pay to the employee record.
DocLink: How do I set up a pay rate to prefill when entering or importing time?