This topic is locked

operation with totals

6/24/2008 3:40:51 PM
PHPRunner General questions
A
a.daniello author

i've a list with two totals selected in tab "Fields orders and totals": "entrata" and "uscita".
i want display also "entrata"-"uscita".

T
thesofa 6/24/2008

i've a list with two totals selected in tab "Fields orders and totals": "entrata" and "uscita".

i want display also "entrata"-"uscita".



If you want it to show Total entrata:116097 for example, go to the Visual Editor Page and alter the text in the bar below the field list, just click on the word until a cursor appears and then you can alter it to suit.

HTH

J
Jane 6/25/2008

Hi,
you can add another variable in HTML mode on the Visual Editor tab. For example:

{$diff_entrata_uscita}
And then calculate this variable in the List page: Before display event:

$var1 = $smarty->get_template_vars("showtotal_entrata");

$var2 = $smarty->get_template_vars("showtotal_uscita");
$var = $var1-$var2+0;

$smarty->assign("diff_entrata_uscita",$var);

A
a.daniello author 7/1/2008

Hi,

you can add another variable in HTML mode on the Visual Editor tab. For example:

{$diff_entrata_uscita}
And then calculate this variable in the List page: Before display event:


Jane, you was a precious help for me.

A
a.daniello author 7/1/2008

Jane,

your sample is very good but losts the currency!
I.e.:
$showtotal_entrata = 25.000,80

$showtotal_entrata = 13.000,50

=>

$diff_entrata_uscita = 12.000
Can you help me??
For your support, i send you a "original pizza margherita" form Naples!!