{{ invoice.sales_tax | number_with_delimiter: ',' }} not working

Willem D'Haeseleer's Avatar

Willem D'Haeseleer

24 Feb, 2014 08:54 PM

I'm trying to use the number_with_delimiter from the example here :
http://help.cashboardapp.com/kb/document-templates/template-syntax-...

I can't seem to get this to work for my tax number.
I have this line in my invoice_table_footer

<b>BTW</b> - {{ invoice.sales_tax | number_with_delimiter: ',' }}%

But it's just printing it with a ., what am I doing wrong ?

Also, great work with the templating system, haven't found this anywhere else yet.

  1. Support Staff 1 Posted by Seth B on 24 Feb, 2014 09:30 PM

    Seth B's Avatar

    Hi Willem,

    That code looks good to me. Is anything actually filled in for that invoice's sales tax?

    PS: Shopify uses the same templating system.

  2. 2 Posted by Willem D&#x27;H... on 24 Feb, 2014 09:34 PM

    Willem D&#x27;Haeseleer's Avatar

    Yes there is, it's at 21% you can see it in the screenshot

  3. Support Staff 3 Posted by Seth B on 24 Feb, 2014 09:40 PM

    Seth B's Avatar

    Oh I see what you're talking about now.

    Use the filter 'format_number' instead — it'll respect the preferences you've set for number display under Settings. It takes no arguments.

    --
    seth @ subimage llc
    http://subimage.com

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac