Author Topic: How to Remove cent or comma in total ticket and price??  (Read 4340 times)

kelik123

  • Newbie
  • *
  • Posts: 5
How to Remove cent or comma in total ticket and price??
« on: July 02, 2012, 01:57:16 pm »
Hi Moderator
I have printed ticket, but our currency does not contain two digits behind the comma, and do not contain commas.

for example:
writing is true of our currency is Rp 15.000 for "Fiveteen thousand rupiah"
but the printed in Samba Rp 15.000,00 for product price, total price, tax, etc. I have changed the regional settings in Windows Control Panel, but the result remains the same.

how to remove the two-digit comma in ticket print, Rp 15.000,00 to Rp 15.000?

**Our currency is the Rupiah (Rp) -- Indonesia

Thanks Before

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: How to Remove cent or comma in total ticket and price??
« Reply #1 on: July 02, 2012, 04:10:38 pm »
Hello kelik123

This feature is not supported for the application screens but with a small hack you can print values without decimals. But I have to say in advance this won't work for preformatted values such as {TAX DETAILS} or {SERVICE DETAILS}. You can only convert values that directly generates numbers.

For example for printing Ticket Total value, change {TICKET TOTAL} tag with:
[=F(TN('{TICKET TOTAL}'),'0')]

You can change {TICKET TOTAL} part with other number generating tags.

I hope it helps.
Thanks.

kelik123

  • Newbie
  • *
  • Posts: 5
Re: How to Remove cent or comma in total ticket and price??
« Reply #2 on: July 04, 2012, 07:51:27 am »
hi Emre

Thanks a lot for your Support... very smart and useful.....

warmest regards from Indonesia

ekoimron

  • Newbie
  • *
  • Posts: 5
Re: How to Remove cent or comma in total ticket and price??
« Reply #3 on: July 27, 2012, 09:05:39 pm »
I already follow this way. 0 cent correct. but 1000, 10000, 100000, 1000000.. I want 1.000, 10.000, 100.000, 1.000.000 to the point. How do.... please help...

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: How to Remove cent or comma in total ticket and price??
« Reply #4 on: July 28, 2012, 07:22:05 am »
You can try
[=F(TN('{TICKET TOTAL}'),'#,##')]
or
[=F(TN('{TICKET TOTAL}'),'#,##0')]

Please let me know it they produces the expected result.

ekoimron

  • Newbie
  • *
  • Posts: 5
Re: How to Remove cent or comma in total ticket and price??
« Reply #5 on: July 28, 2012, 03:58:22 pm »
hi EMRE
Thank you very much.
This right can be used. And this is very helpful at all.
there is one more question .. how to display TOTAL ROUND at TICKET as TOTAL DISCOUNT..?

Endonezya sıcak Saygılarımızla  :) :)