This topic contains 2 replies, has 0 voices, and was last updated by Nelliott 8 years, 9 months ago.

  • Author
    Posts
  • #2889

    GAJ

    We have an issue where an errant single quote appears in the Discount total field, only when we Print in Customer’s Locale.

    I’ve tried these combinations:

    Code:
    ${record.discounttotal} yields -105,50’โ‚ฌ (the original problem)
    ${record.discounttotal?string?replace(“/'”, ” “)} yields -105,5 (a proposed workaround)
    ${record.discounttotal?string[“000.00”]} yields -105,50 (a proposed workaround)
    ${record.currencysymbol} yields EUR (hoping to get โ‚ฌ)
    ${record.currencyname} yields Euro (hoping to get โ‚ฌ)
    ${record.currency} yields Euro (hoping to get โ‚ฌ)
    Of course I could add if/then/else logic in the template, or in a custom transaction body field,

    but is there a sales order or transaction level search column internal ID I can use at this level to get the “โ‚ฌ” symbol dynamically?

    “Currency Symbol on Line Items” is a Post from back in 2009 where Evan explained that this ID was not available.

    Hoping this is no longer true.

    Thank you,

    Gary
    This is a cached copy. Click here to see the original post.

  • #2890

    GAJ

    P.S. This is registered as: Defect 378795: Display of Discount on Invoice and Credit Memo-errant single quote

  • #2891

    Nelliott

    Maybe try:

    Code:
    ${record.discounttotal}?keep_before_last(“‘”)${record.discounttotal}?keep_after_last(“‘”)

    I haven’t tried this but according to the freemarker Built-Ins for strings that should in theory give you : -105,50โ‚ฌ

    I don’t think you need “?string”

    You may find this useful:

    http://freemarker.incubator.apache.o…ns_string.html

    If you run in to trouble butting the left and right side of the string together you may need to assign each to a variable then concatenate them into one.

    Not ideal I know, but if it works…

You must be logged in to reply to this topic.