Add template variable

Hello,

Is it possible to add a template variable for a “Sales Rep”. I know you can add custom variables, however I would like the variable to use the name of the person logged in, instead of them typing their name into a custom variable field.

Any advice on getting this done would be greatly appreciated.

Thank You

That isn’t currently supported, you’d need to modify the code.

You can use the following in the template:

["$user.first_name", " ", "$user.last_name"]

However you’d need to modify the hidePrivateFields function in app/Models/Invoice.php for the data to be shown, you may also need to add protected $with = [‘user’]; to the Invoice class to ensure the data is loaded.