Can someone please help me with an example of using the computed field for calculating the total of prices in invoice line items in an invoice node content type? The invoice line items are created with field collection.

Comments

gusantor’s picture

Hello

did you have any advance with this ?

I'm facing the same issue now

thanks in advance

gusantor’s picture

just to say I found this https://drupal.org/node/1208064 which solve my doubt

but, was necesary for me to change it, just as it's stated there

from this
$sum += $collection->YOUR_FC_FIELD->['value'];

to this
$sum += $collection->YOUR_FC_FIELD->value();

thkns