SHARE
TWEET

calculation

a guest Mar 7th, 2013 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $assigned_uid = $node->field_assigned_user[LANGUAGE_NONE][0]['target_id'];
  2. $assigned_user = user_load($assigned_uid);
  3. $percentage_split = $user->field_percentage_split[LANGUAGE_NONE][0]['value'];
  4. $entity_field[0]['value'] = ((
  5. (isset(field_get_items($entity_type, $entity, 'field_other_ins_')[0]) ? field_get_items($entity_type, $entity, 'field_other_ins_')[0]['value'] : 0) +
  6. (isset(field_get_items($entity_type, $entity, 'field_vb')[0]) ? field_get_items($entity_type, $entity, 'field_vb')[0]['value'] : 0) +
  7. (isset(field_get_items($entity_type, $entity, 'field_finder_s_fee')[0]) ? field_get_items($entity_type, $entity, 'field_finder_s_fee')[0]['value'] : 0) +
  8. (isset(field_get_items($entity_type, $entity, 'field_broker_fee')[0]) ? field_get_items($entity_type, $entity, 'field_broker_fee')[0]['value'] : 0)) - (isset(field_get_items($entity_type, $entity, 'field_dlc_franchise_fee_hst')[0]) ? field_get_items($entity_type, $entity, 'field_dlc_franchise_fee_hst')[0]['value'] : 0)) * (isset(field_get_items($entity_type, $entity, 'field_percentage_split')[0]) ? field_get_items($entity_type, $entity, 'field_percentage_split')[0]['value'] : 0);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top