Comparison operators in custom Quote template not working
SOLVE
I'm customing the Modern Quote template to display the available quantity of the product, but we want to only show if that number is postive. So I wrote
{% if unit.available_qty %}Avail. Qty: {{ unit.available_qty }}{% endif %}
So it checks if the available quantity (converted to an integer) is greater than zero, and if so it prints the available quantity (converted to currency with the label and decimal places hidden, which was the most direct way to have commas display).
So it checks if the available quantity (converted to an integer) is greater than zero, and if so it prints the available quantity (converted to currency with the label and decimal places hidden, which was the most direct way to have commas display).