本文整理汇总了PHP中CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds方法的具体用法?PHP CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds怎么用?PHP CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_FinancialTrxn
的用法示例。
在下文中一共展示了CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
//.........这里部分代码省略.........
} else {
$paymentsDue = $payments;
}
}
}
if ($multipleDue) {
// Show link to pledge tab since more than one pledge has a payment due
$pledgeTab = CRM_Utils_System::url('civicrm/contact/view', "reset=1&force=1&cid={$this->_contactID}&selectedChild=pledge");
CRM_Core_Session::setStatus(ts('This contact has pending or overdue pledge payments. <a href="%1">Click here to view their Pledges tab</a> and verify whether this contribution should be applied as a pledge payment.', array(1 => $pledgeTab)));
} elseif ($paymentsDue) {
// Show user link to oldest Pending or Overdue pledge payment
$ppAmountDue = CRM_Utils_Money::format($payments['amount'], $payments['currency']);
$ppSchedDate = CRM_Utils_Date::customFormat(CRM_Core_DAO::getFieldValue('CRM_Pledge_DAO_PledgePayment', $payments['id'], 'scheduled_date'));
if ($this->_mode) {
$ppUrl = CRM_Utils_System::url('civicrm/contact/view/contribution', "reset=1&action=add&cid={$this->_contactID}&ppid={$payments['id']}&context=pledge&mode=live");
} else {
$ppUrl = CRM_Utils_System::url('civicrm/contact/view/contribution', "reset=1&action=add&cid={$this->_contactID}&ppid={$payments['id']}&context=pledge");
}
CRM_Core_Session::setStatus(ts('This contact has a pending or overdue pledge payment of %2 which is scheduled for %3. <a href="%1">Click here to enter a pledge payment</a>.', array(1 => $ppUrl, 2 => $ppAmountDue, 3 => $ppSchedDate)));
}
}
}
}
}
$this->_values = array();
// current contribution id
if ($this->_id) {
//to get Premium id
$sql = "\nSELECT *\nFROM civicrm_contribution_product\nWHERE contribution_id = {$this->_id}\n";
$dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
if ($dao->fetch()) {
$this->_premiumID = $dao->id;
$this->_productDAO = $dao;
}
$dao->free();
$ids = array();
$params = array('id' => $this->_id);
CRM_Contribute_BAO_Contribution::getValues($params, $this->_values, $ids);
//do check for online / recurring contributions
$fids = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds($this->_id, 'civicrm_contribution');
$this->_online = CRM_Utils_Array::value('entityFinancialTrxnId', $fids);
//don't allow to update all fields for recuring contribution.
if (!$this->_online) {
$this->_online = CRM_Utils_Array::value('contribution_recur_id', $this->_values);
}
$this->assign('isOnline', $this->_online ? TRUE : FALSE);
//unset the honor type id:when delete the honor_contact_id
//and edit the contribution, honoree infomation pane open
//since honor_type_id is present
if (!CRM_Utils_Array::value('honor_contact_id', $this->_values)) {
unset($this->_values['honor_type_id']);
}
//to get note id
$daoNote = new CRM_Core_BAO_Note();
$daoNote->entity_table = 'civicrm_contribution';
$daoNote->entity_id = $this->_id;
if ($daoNote->find(TRUE)) {
$this->_noteID = $daoNote->id;
$this->_values['note'] = $daoNote->note;
}
$this->_contributionType = $this->_values['contribution_type_id'];
$csParams = array('contribution_id' => $this->_id);
$softCredit = CRM_Contribute_BAO_Contribution::getSoftContribution($csParams, TRUE);
if (CRM_Utils_Array::value('soft_credit_to', $softCredit)) {
$softCredit['sort_name'] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $softCredit['soft_credit_to'], 'sort_name');
}
$this->_values['soft_credit_to'] = CRM_Utils_Array::value('sort_name', $softCredit);
$this->_values['softID'] = CRM_Utils_Array::value('soft_credit_id', $softCredit);
$this->_values['soft_contact_id'] = CRM_Utils_Array::value('soft_credit_to', $softCredit);
if (CRM_Utils_Array::value('pcp_id', $softCredit)) {
$pcpId = CRM_Utils_Array::value('pcp_id', $softCredit);
$pcpTitle = CRM_Core_DAO::getFieldValue('CRM_PCP_DAO_PCP', $pcpId, 'title');
$contributionPageTitle = CRM_PCP_BAO_PCP::getPcpPageTitle($pcpId, 'contribute');
$this->_values['pcp_made_through'] = CRM_Utils_Array::value('sort_name', $softCredit) . " :: " . $pcpTitle . " :: " . $contributionPageTitle;
$this->_values['pcp_made_through_id'] = CRM_Utils_Array::value('pcp_id', $softCredit);
$this->_values['pcp_display_in_roll'] = CRM_Utils_Array::value('pcp_display_in_roll', $softCredit);
$this->_values['pcp_roll_nickname'] = CRM_Utils_Array::value('pcp_roll_nickname', $softCredit);
$this->_values['pcp_personal_note'] = CRM_Utils_Array::value('pcp_personal_note', $softCredit);
}
//display check number field only if its having value or its offline mode.
if (CRM_Utils_Array::value('payment_instrument_id', $this->_values) == CRM_Core_OptionGroup::getValue('payment_instrument', 'Check', 'name') || CRM_Utils_Array::value('check_number', $this->_values)) {
$this->assign('showCheckNumber', TRUE);
}
}
// when custom data is included in this page
if (CRM_Utils_Array::value('hidden_custom', $_POST)) {
$this->set('type', 'Contribution');
$this->set('subType', CRM_Utils_Array::value('contribution_type_id', $_POST));
$this->set('entityId', $this->_id);
CRM_Custom_Form_CustomData::preProcess($this);
CRM_Custom_Form_CustomData::buildQuickForm($this);
CRM_Custom_Form_CustomData::setDefaultValues($this);
}
$this->_lineItems = array();
if ($this->_id) {
$lineItem = CRM_Price_BAO_LineItem::getLineItems($this->_id, 'contribution', 1);
empty($lineItem) ? null : ($this->_lineItems[] = $lineItem);
}
$this->assign('lineItem', empty($this->_lineItems) ? FALSE : $this->_lineItems);
}