The purposes of entering a time sheet with a class will automatically copy on the invoice transaction if it's billable to the customer. Currently, there's isn't a way to transfer it over to the payroll.
However, you have an option to assign default classes to payroll transactions by setting up your payroll preferences.
Click the Gear Icon.
Go to the Payroll Settings.
On the Setup options, select choose Preferences.
Then, click Accounting Preferences.
On the Accounting Preferences, scroll-down to Classes option to set a default.
Click OK to apply the changes.
You can visit these articles below to know more about time activity and processing payroll: