Decimal places and add up

How can I define a 2nd decimal place in the total (sum)?
And how do I add the two totals together?

Maybe this helps you:

$total = 0;
sc_format_num($total, '.', ',',  2,  'S',  '1',  '');
sc_master_value('order_total',$total);

Have I put this in onApplicationInit ??
.
.
.
NO :slight_smile:

This is just an example of how to format a number.
I use it when storing data in a table in a database.
Try to rework it for your needs.

Understand.
The data are stored in a decimal 10,2. So it should be right.
You can also adjust the display for the currency in the list. Not in total.

I can format the normal test field.
sc_format_num({test},"’",".",2,“S”,“1”,“€”);

The total at the bottom doesn’t work.
sc_format_num({test_sum},"’",".",2,“S”,“1”,“€”);

Or you can try this:

change fields Data Type from Currency to Decimal