Text File Printer Not Converting Currency

I use the multi currency feature and it works perfect on my printer. I have managed to print receipts both in USD as my base currency and currency2 as my other currency. Let’s say an item goes for $1USD and R20 in local currency, it prints correctly on the Epson printer. The issue now is with my fiscal device, it’s reading all the tickets in USD and not the other currency. I save the fiscal receipts in a folder in .txt format. It’s failing to convert the receipt txt file to use the local currency.

What could be the issue?

However you have it on your receipt to print the local currency amount should be the same you use for the print to file template.

1 Like

I am using the same template for both the receipt printer and file printer. Receipt printer is pointing to the Epson, fiscal printer is a custom printer (save to file) pointing to C:\Receipts\receipt.txt

The same exact template? Or a clone? If the latter, is it possible something got changed? If the former, would you mind sharing the template?

1 Like

I have removed the company details only. I am using the exact same template.

  <L00>Date: {TICKET DATE:dd/MM/yyyy}          Time: {TICKET TIME}		
    <L00>Invoice No: {TICKET NO}      		 
    {ENTITIES}
    <F>-
    <J00>Qty  Product | Amount
    <F>-
    {ORDERS}
    <F>=
    {DISCOUNTS}
    [<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
    {SERVICES}
    {PAYMENTS}
    <J00>Total AMT        :| $[=F(TN('{TICKET TOTAL}')/TN('{EXCHANGE RATE:curr}'),'#,#0.00')]

    {SERVICES}



    <F>-
    <J00>Total Excl VAT   :|$[=F((TN('{TICKET TOTAL}')-TN('{TAX TOTAL}'))/TN('{EXCHANGE RATE:curr}'))]

    {TAXES}

    <J00>VAT @ 14.5%      :|$[=F(TN('{TAX TOTAL}')/TN('{EXCHANGE RATE:curr}'))]

    {SERVICES}

    <J00>Total Inc VAT    :|$[=F((TN('{TICKET TOTAL}')/TN('{EXCHANGE RATE:curr}')))]




    <F>=
    <L>
    <J00>CASHIER NAME: {SETTING:CURRENTUSER}

    <F>-
    <C10>T H A N K  Y O U!
    <F>-
    <DB>
    <DB>

    <XCT>27,112,0,25,250

    [DISCOUNTS]
    <J00>{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}

    [SERVICES]
    <J00>{CALCULATION NAME}|{CALCULATION TOTAL}

    [PAYMENTS]
    <J00>Paid by          : | {PAYMENT NAME} | $[=F(TN('{PAYMENT AMOUNT}')/TN('{EXCHANGE RATE:curr}'),'#,#0.00')]


    [ORDERS]
    -- Default format for orders

    <J00> {QUANTITY} * {NAME} | [=F(TN('{TOTAL PRICE}')/TN('{EXCHANGE RATE:curr}'),'#,#0.00')]
    {ORDER TAGS}

    [ORDERS:Gift]
    -- Format for gifted orders
    <J00>- {QUANTITY} {NAME}|**GIFT**
    {ORDER TAGS}

    [ORDERS:Void]
    -- Nothing will print for void lines

    [ORDER TAGS]
    -- Format for order tags
    <J00> * {ORDER TAG NAME} | {ORDER TAG PRICE}

    [ENTITIES:Table]
    -- Table entity format
    <L00>Table: {ENTITY NAME}

    [ENTITIES:Customer]
    -- Customer entity format
    <J00>Customer: {ENTITY NAME} | {ENTITY DATA:Phone}

This is what’s printing on Epson printer

Receipt 1

This is from the txt file that’s supposed to be used for fiscalisation. It has reverted back to base currency. The print job is the same, template is the same.

I thought I had a but more wind in my sails last night; evidently not.

Anyhoo, I can’t get the template to preview even with a currency “curr” defined. Sorry I couldn’t help.

1 Like

Thanks @Memo ! Let me scratch my head and see if I can come up with a solution.

Now that I’m thinking, I’m wondering if maybe the print to file doesn’t use the same expression engine as when being send to the printer.

Maybe try another [=] expression but using some ticket data like ticket total * tax or something and see if that prints as it should.

1 Like

So I installed on a clean DB and copied the template, it’s working perfectly. :exploding_head:

1 Like

Now this is strange. I wouldn’t even know where to begin. Is your currency configured the same? Maybe delete existing automation in the primary install then export and import from the fresh install. Perhaps there’s something marginally different that’s being overlooked (usually my case).

My two canons of programming:

  • It’s not working and I don’t know why
  • It’s working and I don’t know why
2 Likes