- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Display dollar amount of percentage based tax (or other fee) on custom quote template
a week ago - last edited a week ago
I wasn't entirely sure where to put custom quote template related posts since it's a new feature, but let me know if there is a better place than this.
The problem
The sales team adds taxes to quotes in percent format (ex: GST 5%) as standard practice, but the custom quote was only showing the tax line item as the percentage value, not the actual dollar amount of that tax. In standard quote/invoice practice the tax items needed to show the actual dollar amount. Even though it is possible to add taxes as dollar amounts when creating the quote, it would be counter intuitive to have them calculate the tax amount manually each time, when sales taxes are inherently percentage based.
Solution
I couldn't find a system variable that would display the percentage based tax as dollar amount, so please let me know if that does exist. If it doesn't it would be a very helpful addition. What I ended having to do was convert the system variable for the one_time subtotal into a custom variable that could then be used with filter or operator. The system variable itself (SUB_TOTALS.one_time.subTotal) wouldn't work with the operator for whatever reason, despite its value being a number. In case anyone else needs reference, I did something like this:
{%- for fee in ADDITIONAL_FEES -%}
<tr>
<td>{{ fee.name }}</td>
<td>
{{ fee.category == "DISCOUNT" ? "-" : null }}
{% if fee.isPercentage %}
{% set feeDollarCalc = fee.amount / 100 * SUB_TOTALS.one_time.subTotal %}
({{ fee.amount }}%) {{ feeDollarCalc|format_currency(LOCALE, CURRENCY, true) }} {{ QUOTE_PROPS.hs_currency }}
{% else %}
{{ fee.amount|format_currency(LOCALE, CURRENCY, true)}} {{ QUOTE_PROPS.hs_currency }}
{% endif %}
</td>
</tr>
{% endfor %}
Which results in this sort of output:
As mentioned, if there is a more elegant approach I'd love to hear about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content