i have a little problem with latest version of CS-Cart. I need to insert in Document Invoice a new box with amount of Subtotal (without tax) and shipping cost.
To show this value i use this snippet:
{% set imptotale = o.display_subtotal + o.display_shipping_cost %}
{{ imptotale|number_format(2, ',', '.') }} €
Unfortunately the amount is wrong.
Example:
Subtotal: 65,10€
Shipping: 5,20€
Total: 70,30€
Value show with my snippet:
Subtotal: 65,10€
Shipping: 5,20€
Total: 70,00€
How can i show also decimal numbers?
The problems lays in the fact your are sending strings towards
Twig
and not floats :input (as json)
twig
demo