/** * Initialize Goals per level */ static function init() { /** Personal Retail Sales */ self::$PRSGoal = array('white' => 125, 'yellow' => 1000, 'pink' => 250, 'blue' => 250, 'green' => 500, 'orange' => 500, 'purple' => 500, 'black' => 500); /** Company Wholesale Sales Goal */ self::$CoWSGoal = array('pink' => 2000, 'blue' => 4000, 'green' => 10000, 'orange' => 20000, 'purple' => 40000, 'black' => 80000); /** Qualified First-Level Presenters Goal */ self::$QFLGoal = array('pink' => 1, 'blue' => 2, 'green' => 3, 'orange' => 3, 'purple' => 4, 'black' => 4); /** Circle Wholesale Sales Goal */ self::$CiWSGoal = array('green' => 2000, 'orange' => 4000, 'purple' => 6000, 'black' => 10000); /** Commission engine Key for prs progress by level */ self::$PRSKey = array('white' => 'active_prs', 'yellow' => 'lifetime_prs', 'pink' => 'prs', 'blue' => 'prs', 'green' => 'prs', 'orange' => 'prs', 'purple' => 'prs', 'black' => 'prs'); }
/** * Get Email replacement variables for from data and to data * @param $from * @param $to * @return array */ private function getEmailVars($from, $to) { if ($to['elites'] >= 1) { $firstgen_elt = 0; } else { $firstgen_elt = 1; } return array('rcpt' => $from['from_email'], 'vars' => array(array('name' => 'PRS', 'content' => number_format($to['prs'] / 100, 2)), array('name' => 'ACTIVEPRS', 'content' => number_format($to['active_prs'] / 100, 2)), array('name' => 'PRS_Needed', 'content' => number_format(PRSCalc::getPRSNeeded($to['active_prs']), 2)), array('name' => 'NEW_REC_STATUS', 'content' => ucwords($to['recognized_status'])), array('name' => 'LIFETIME_REMAINING', 'content' => number_format(PRSCalc::getRemainingPRS($from['near_status'], $to), 2)), array('name' => 'REMAINING_PRS', 'content' => number_format(PRSCalc::getRemainingPRS($from['near_status'], $to), 2)), array('name' => 'REMAINING_CoWS', 'content' => number_format(PRSCalc::getRemainingCoWS($from['near_status'], $to['company']), 2)), array('name' => 'REMAINING_QFL', 'content' => PRSCalc::getRemainingQFL($from['near_status'], $to['active'])), array('name' => 'REMAINING_CiWS', 'content' => number_format(PRSCalc::getRemainingCiWS($from['near_status'], $to['gen0']), 2)), array('name' => 'FAST_START_END', 'content' => $to['fast_start_end']), array('name' => 'LIFETIME_PRS', 'content' => number_format($to['lifetime_prs'] / 100, 2)), array('name' => 'REMAINING_ELT', 'content' => $firstgen_elt))); }