private function addCampaignDetails(Gpf_Data_RecordSet $inputResult) {
        $inputResult->addColumn('campaigndetails');

        $commissionsTable = Pap_Db_Table_Commissions::getInstance();
        $allCommissions = $commissionsTable->getAllCommissionsInCampaign();
        $campaignCommissions = array();

        foreach ($inputResult as $record) {
            $campaignId = $record->get('campaignid');
            if (!array_key_exists($campaignId, $campaignCommissions)) {
                $campaign = new Pap_Db_Campaign();
                $campaign->setId($campaignId);
                $commissionGroupId = $campaign->checkUserIsInCampaign(Gpf_Session::getAuthUser()->getPapUserId());
                if ($commissionGroupId == false) {
                    $commissionGroupId = null;
                }
                $campaignCommissions[$campaignId] =  $commissionsTable->getCommissionsDescription($campaignId,$allCommissions,$commissionGroupId);
            }
            $record->set('campaigndetails', $campaignCommissions[$campaignId]);
        }
        return $inputResult;
    }
 protected function getCommissionGroupId(Gpf_Data_Record $campaignRecord) {
     $campaign = new Pap_Db_Campaign();
     $campaign->fillFromRecord($campaignRecord);
     $commissionGroupId = $campaign->checkUserIsInCampaign(Gpf_Session::getAuthUser()->getPapUserId());
      
     if ($commissionGroupId != false) {
         return $commissionGroupId;
     }
     return null;
 }
	private function getAffiliateCommissionGroupId($campaignID) {
		$campaign = new Pap_Db_Campaign();
		$campaign->setId($campaignID);
		$commissionGroupId = $campaign->checkUserIsInCampaign(Gpf_Session::getAuthUser()->getPapUserId());

		if ($commissionGroupId != false) {
			return $commissionGroupId;
		}
		return Pap_Db_Table_Commissions::getInstance()->getDefaultCommissionGroup($campaignID);
	}