Author Topic: I need to add calculated field to ticket [resolved]  (Read 8355 times)

khamlichi

  • Newbie
  • *
  • Posts: 11
I need to add calculated field to ticket [resolved]
« on: April 06, 2012, 04:48:12 pm »
Hi,

I need to display an amount of money on the ticket,
this amount of money is the result of {TOTAL TICKET} multiplied by 11,5
I tried :

Dirhams: {TOTAL TICKET} * 11,5

But it just prints as it is, and what I need it to do is calculation .... any help would be appreciated.
« Last Edit: April 11, 2012, 04:42:51 am by khamlichi »

mozhi

  • Jr. Member
  • **
  • Posts: 71
Re: I need to add calculted field to ticket
« Reply #1 on: April 06, 2012, 10:35:43 pm »
Hi,
Can you  explain your Problem in detail as what is your requirement? The way you are calculating is not right. We have service templates which can be used for populating any % based calculation

khamlichi

  • Newbie
  • *
  • Posts: 11
Re: I need to add calculted field to ticket
« Reply #2 on: April 07, 2012, 01:36:31 am »
Hi and thanks for your quick reply,
My SambaPOS system is configured with Euro currency which suits my needs.
but because we are located at a location where sometimes poeple pay in Dirhams, we need to display the price in dirhams as well, and basically we need to display something like this :
TOTAL : 20,00 Euro 
(230,00 Dirhams)
 
We have the line with Euro Total and now we need to add the line with Dirhams Total (which is equal to : Euro Total * 11,5)

thanks again.


khamlichi

  • Newbie
  • *
  • Posts: 11
Re: I need to add calculated field to ticket
« Reply #3 on: April 09, 2012, 03:32:17 am »
I tried the template system, but the problem is that it always sums the result to the {TICKET TOTAL} and that is not logic in our case.
Can any one point me to some place where sambaPOS can make calculations and display them on ticket ?

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: I need to add calculated field to ticket
« Reply #4 on: April 09, 2012, 04:15:41 am »
Hello khamlichi.
When a feature first requested I wait until it gets requested by some other people too.

http://forum2.sambapos.org/index.php/topic,97.0.html
On this topic it requested for printing netto, brutto details of taxes .

http://forum2.sambapos.org/index.php/topic,325.0.html
And on this topic again it requested for displaying a tax calculation.

Now you need same feature for printing ticket total on different currency.
We do not support multiple currencies on V2 but printing it may help.

So I'll try to implement something for that.
Thanks.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: I need to add calculated field to ticket
« Reply #5 on: April 09, 2012, 04:25:49 am »
Emre,

Could you add something to UPDATE PROGRAM SETTING action to have a multiplier update type.
« Last Edit: April 09, 2012, 04:33:30 am by JohnS »
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: I need to add calculated field to ticket
« Reply #6 on: April 09, 2012, 04:52:21 am »
Emre,

Could you add something to UPDATE PROGRAM SETTING action to have a multiplier update type.

So when it called it will multiply stored setting with the "Setting Value"? Hmm that solution is so simple and it will solve two of these requests. Great idea!

khamlichi

  • Newbie
  • *
  • Posts: 11
Re: I need to add calculated field to ticket
« Reply #7 on: April 09, 2012, 06:39:55 am »
Or maybe just add the capability of calculating values to ticket template ?
example using double  percent sign :

%% {TICKET TOTAL} * 11,5 %%

you could use any signe in the template,

This way you just expand the fonctionality you already have in your program (it can already parse and format content)

processing the starts_with %% and make it calculate the content instead of just formating it .


khamlichi

  • Newbie
  • *
  • Posts: 11
Re: I need to add calculated field to ticket [resolved]
« Reply #8 on: April 11, 2012, 04:41:16 am »