protected function addFillBonus(Pap_Common_User $user, $fillCount, $commission) {
		$transaction = new Pap_Common_Transaction();
		$transaction->setCommission($commission);
		$transaction->setType(Pap_Db_Transaction::TYPE_EXTRA_BONUS);
		$transaction->setDateInserted(Gpf_Common_DateUtils::now());
		$transaction->setStatus(Pap_Common_Constants::STATUS_APPROVED);
		$transaction->setPayoutStatus(Pap_Common_Constants::PSTATUS_UNPAID);
		$transaction->setUserId($user->getId());
		$transaction->setSystemNote($this->_('Matrix %sx fill bonus', $fillCount));
		$transaction->insert();
	}
 protected function insertBonusTransaction($commissionValue) {
     $transaction = new Pap_Common_Transaction();
     $transaction->setCommission($commissionValue);
     $transaction->setType(Pap_Db_Transaction::TYPE_EXTRA_BONUS);
     $transaction->setDateInserted(Gpf_Common_DateUtils::now());
     $transaction->setStatus('A');
     $transaction->setPayoutStatus('U');
     $transaction->setUserId($this->getCurrentUserId());
     $transaction->setCampaignId($this->transaction->getCampaignId());
     $transaction->setSystemNote('Commission of rule: ' . $this->rule->getString());
     $transaction->setData1($this->rule->getId());
     $transaction->setData2($this->getToDateRange());
     $transaction->insert();
 }
    protected function insertSummarizedTransaction($record) {
    	$obj = new Pap_Common_Transaction();
    	
    	$obj->setUserId($record->get('affiliateid'));
    	$obj->setCampaignId($record->get('campaignid'));
		$obj->setDateInserted($record->get('dateinserted'));
		$obj->setType(Pap3Compatibility_Migration_Pap3Constants::translateTransType($record->get('transtype')));
		$obj->setAllowFirstClickData(GPF::YES);
        $obj->setAllowLastClickData(GPF::YES);
		$obj->setStatus(Pap3Compatibility_Migration_Pap3Constants::translateStatus($record->get('rstatus')));
		
		if($record->get('rstatus') == Pap3Compatibility_Migration_Pap3Constants::STATUS_APPROVED) {
			$obj->setDateApproved($record->get('dateinserted'));
		}
		
		$obj->setCommission($record->get('commission'));
		$obj->setSystemNote("Migrated from PAP3");
		if($record->get('payoutstatus') == 2) {
			$obj->setPayoutStatus('P');
		} else {
			$obj->setPayoutStatus('U');
		}
		$obj->setClickCount($record->get('count'));

		$transKind = $record->get('transkind');
		if($transKind > Pap3Compatibility_Migration_Pap3Constants::TRANSKIND_SECONDTIER) {
			$tier = $transKind - Pap3Compatibility_Migration_Pap3Constants::TRANSKIND_SECONDTIER;
		} else {
			$tier = 1;
		}
		$obj->setTier($tier);
		$obj->set('commtypeid', $record->get('campcategoryid'));
		
    	$obj->save();
    }