We are developing our own template, based on the CCS and HTML from the "Minimal Template".
We are now wondering if it could be possible to get the code from the "Modern Template"...
It is the template that we have been using lately, and we would like to keep our own development similar, basing our edited style without changing it too much from the previous template.
We also got the "Bold Template", but we do not need it.
@JLaurrieta thank you but I just did not include the FOR loop in my question because it is irrelevant to what I'm asking. If I print out fee.amount it is 8 which is the percentage. On the Modern, Standard, and Basic templates even when the tax is setup as a PERCENTAGE not an amount, the AMOUNT prints on the form. So what I'm asking is... in ADDITIONAL_FEES, what is the tax dollar amount? fee.amount = the percentage. fee.WHAT? equals the dollar amount?? I've shown all of this in the screenshots of my post above.
In case anyone else comes along who knows about tax on a quote, I'll try to clarify what I'm looking for. I wonder if the Standard, Basic, and Modern calculate the tax for display as an amount? If you build a quote and select a percentage for the tax, say 8%,
the Standard Basic and Modern quote templates do not display the 8%. They show the $359.60 amount like this:
But if you use the "Minimal" template that is provided in cms-quotes-theme, it shows as a percentage (8%).
Since cms-quotes-theme is my only resource I don't know how the other templates are showing the amount instead of the percentage. If anyone knows that, please let me know.
Otherwise I guess I will pursue trying to calculate that amount it in my template.
@JLaurrieta thank you! That does work for discounts. Have you ever displayed a tax amount instead of the tax percentage? The code in the line-items table is like this below. And taxes have the is_percentage flag so the fee.amount is the percentage. On the Modern template the tax prints as the dollar amount instead of the percentage but I haven't been able to figure out where that value is. Do you know if there's somewhere to see what are all the fields associated with a fee? I haven't been able to find that. {% if fee.is_percentage %} {{ fee.amount }} % {% else %} {{ fee.amount|format_currency(LOCALE, CURRENCY, true)}} {% endif %}
To get all available properties you can put the following code in your template:
{{ QUOTE_PROPS|pprint }}
Nevertheless, I'm not sure of what you're after. When making a quote, you have the option, in the 4th step, to add taxes either in percentage or currency (see picture bellow).
What the code you shared is doing is just checking whether that information has been added as percentage or currency. I'm just guessing that if you copy the line from the Else in the If you'll get the value as currency in both cases
We didn't get it, unfortunatelly. Still, if what you're after is item discount, you can try {{item.discount}} instead of {{ item.hs_discount_percentage }}, where item is each item in template_data.quoteAssociatedObjects.lineItems.
Did anyone get the html for the Modern template? I'd like to see how they are getting the tax amount to display as a value instead of a percentage in the line items table. The other templates don't do it that way.
If the "minimal template" theme is a cloned version you should be able to take the css and html from the "modern template" and copy and paste it into your "minimal template" theme. However i'm not sure if the settings in theme settings will transfer over if themes got updated.
CSS and HTML would be fine if it were only the aesthetics you were after. The problem is you don´t get the template variables that way, which forces you to somewhat rudimentary solutions when trying to get variables such as senders avatar image (available in Modern, as far as I know), or quote creator first and last name. Templates are usful for the variables they hold, not just the aesthetics...