Settings that affect template printing
In order for templates to automatically print at the right time, the following settings must be adjusted to give the results you need.
Form selection option
When a template in in a print set, it must also have the right option set when right-clicking on the template in the print set's form selection. For example, if the two conditions above are set, and you include FInvoice in the Client Copy print set, it is important to right click on it and select the option to Show in print set when used and select for print when used.
Template relevant condition
In order to print automatically, a template must be available or relevant in the client's tax return. For example, The built-in T1 Family Invoice (FInvoice) has the following relevant condition:
(CurrentClient = File.Partner or CurrentClient = File.Principal) and (count(File.Dependants) > 0)
This means that the template is only available when the current client is either the principal taxpayer or spouse, and when there are dependants in the file. This condition is set in template properties:
Template used condition
To select a template for print at the right time when the print set is configured, a as used at the right time.
For example, the built-in T1 Family Invoice (FInvoice) has the following used condition
((aggregate(File.Dependants, "BillingWorksheet.Totals.Total") > 0) or (CurrentClient.BillingWorksheet.Totals.Total + CurrentSpouse.BillingWorksheet.Totals.Total > 0)) and CurrentClient = File.Principal
This means that the template will only be marked as used (lines in the form icon) if there is a total on the principal taxpayer's, spouse, or dependant worksheet, AND it will only for the principal taxpayer in the file. This condition is set in template properties: