How do I customize the Chargebee invoice template for better readability?
Related Scenarios
- How to add a discount percentage column to invoices?
- How to display amounts excluding GST on invoices?
- How to show specific totals like Sub Total excluding GST, GST Amount, and Amount Due including GST?
Solution
You can customize the Chargebee invoice template to add a discount percentage column, display amounts excluding GST, and show totals such as Sub Total excluding GST, GST Amount, credits/payments deducted, and Amount Due including GST.
Configuration steps
Step 1: Access invoice template settings
- Go to Settings > Configure Chargebee > Invoices.
- Click Edit Template to open the HTML editor for your invoice template.
Step 2: Add a discount percentage column
- Locate the section in the HTML where line items are displayed.
- Insert a new column header for the discount percentage.
- Use the following code snippet:
<th>Discount %</th> <td>{{ line_item.discount_percentage }}</td> - Ensure the new column aligns with existing columns in the table.
Step 3: Display amounts excluding GST
- Find the section where amounts are shown.
- Modify the code to display amounts excluding GST:
<td>{{ line_item.amount_excluding_gst }}</td> - Verify the calculations and format are correct.
Step 4: Show specific totals
- Add sections for Sub Total excluding GST, GST Amount, and Amount Due including GST.
- Use the following code snippets:
<tr> <td>Sub Total (Excl. GST)</td> <td>{{ invoice.sub_total_excluding_gst }}</td> </tr> <tr> <td>GST Amount</td> <td>{{ invoice.gst_amount }}</td> </tr> <tr> <td>Amount Due (Incl. GST)</td> <td>{{ invoice.amount_due_including_gst }}</td> </tr> - Ensure these totals are correctly calculated and displayed at the bottom of the invoice.
Step 5: Preview and save changes
- Use Preview to see how the changes appear on the invoice.
- Click Save to apply the changes.
Important Notes
- Ensure you have the necessary permissions to edit invoice templates.
- Test the changes with a sample invoice before sending to customers.
- Consider consulting a developer if you encounter complex HTML or templating issues.
- Update your templates when tax regulations or business requirements change.
Was this article helpful?