How to enable grouping by customer and subscription in reseller invoices
Original Publishing Date:
2020-03-06
Two new notification subtemplates (also available with the hotfix for OA 8.3), are now added: Reseller Invoice Details and Customer Invoice Details.
Using the Reseller Invoice Details subtemplate, you can make invoices sent to resellers more comprehensive, as the details inside the invoices will be grouped by customer and subscription. The Customer Invoice Details subtemplate references the ARDoc Details template and therefore its content will remain the same, but you need to have both subtemplates included to the Invoice notification template so that a proper template is used depending on the account type.
To update the existing CloudBlue Commerce Invoice notification template with the Reseller Invoice Details subtemplate, complete the following steps:
- Update the ARDoc Details template as follows:
- Add thead tag to the first row.
- Remove the unwrap CSS style for the subsequent rows to not confuse the head row with the rest of the table.
- Update the Invoice template as follows:
- Set auto width for the table.
- Reduce the font size.
- Delete the @@ARDoc Details@ placeholder and paste the following text instead:
<span class="@@Cust_Account_Type@">@@Reseller Invoice Details@, @@Customer Invoice Details@</span>
- Update PDF Conversion Settings. Specify the following command there:
wkhtmltopdf --header-left [section] --header-font-size 8 --header-right "Page [page] of [toPage]" --page-size A4 --orientation portrait --encoding utf-8 -B 5 -L 5 -R 5 -T 5 @@SrcName@ @@DstName@
Important: Ensure that you use wkhtmltopdf version 0.12.5. To check it, run this command:
# wkhtmltopdf --version
# wkhtmltopdf 0.12.5 (with patched qt)
If the version is earlier, update it with this command:
# yum install wkhtmltox.x86_64
You can also check the updated default templates, which are attached: