Hi,

is there any advice on how to do calculations with values defined in a money field?
I'd like to calculate a total price, according to a selection made with cck_inputs.
Like 3 checked items, makes a total price of 3 * $node->field_res_price[0]['amount'];

Is $node->field_res_price[0]['amount'] the way to go for calculations or is there any special function in currency api or elsewhere available?

Comments

markus_petrux’s picture

Status: Active » Fixed

Re: "Is $node->field_res_price[0]['amount'] the way to go for calculations"

Yes, this module does not include any other API to do this kind of things. You should access the field values and perform computations yourself.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.