With HubL, HubSpot’s templating language, this can be handled directly within the quote template. No external scripts, no workarounds—just smart logic embedded in your layout.
Show the total price including tax (GST) for each line item only when a custom property like apply_gst
equals "Yes".
Inside the property_name_amount_span_1
span of your quote template, use the following logic:
{ % set price = property_value|float % }
{ % set tax = line_item.hs_tax_amount|default(0)|float % }
{ % set apply_gst = line_item.properties.apply_gst % }
{ % set total = apply_gst == "Yes" ? price + tax : price % }
{ { total|format_currency_value(locale=locale, currency=currency, maxDecimalDigits=max_decimal_digits)|sanitize_html } }
This snippet does the following:
Reads the base price from the line item
Adds the tax amount only if the apply_gst
property is set to "Yes"
Outputs the final value formatted with currency rules
Suppose your quote includes:
Custom Website Build (apply_gst: Yes)