FlexiTime can be set to accrue annual leave based on either the employee's actual hours worked or a standard number of hours per week. Piecemeal work isn't hours-based, so if the employee is set to accrue based on their hours worked then these piecemeal earnings won't accrue any annual leave, they'll only accrue holiday pay.
If an employee is paid on a piecemeal basis and is accruing leave (i.e. they're not a casual/fixed term employee on Holiday Pay As You Go) you have two options of how to handle their leave appropriately:
Option 1 - Normal Hours
The easiest way to handle leave accruals for piecemeal workers is just edit the employee's Leave tab and set them to accrue leave based on Normal Hours per Week. You then need to nominate a standard number of hours for them to accrue.
If you're going to consider this option, then see our How Normal Hours per Week Determine Annual Leave Accruals article for details on how this works.
Option 2 - Record Hours
If nominating a standard number of hours for them doesn't seem like it will work, your next option is to have the employee accrue leave on Hours Worked, in which case you need to record all the hours that they work as well as recording their piece rates.
To achieve that, you need to create a new pay code called something like "Accrual Hours" which includes these settings:
Tax Type - Gross Earnings
Units - Hours
Employee Rate based on - None
Default Rate - .00001
Add this Pay Code to the employee's Default Pay tab, then each time you pay the employee edit this line in the pay to record the number of hours that they have worked. Alternatively, if you use the Timesheets you can create a Work item that is linked to that Pay Code for recording the hours against.
Setting the pay code's Default Rate to .00001 means that it's low enough that they won't actually be paid for these hours, but it is sufficient to trigger FlexiTime to accrue leave on it.