}
// email column links/icon
if ($row['email']) {
- $row['email'] = '<a class="crm-hover-button crm-popup" href="'.CRM_Utils_System::url('civicrm/activity/email/add', 'reset=1&action=add&atype=3&cid='.$row['cid']).'" title="'. ts('Send an Email') . '"><span class="icon email-icon"></span></a>';
+ $row['email'] = '<a class="crm-hover-button crm-popup" href="'.CRM_Utils_System::url('civicrm/activity/email/add', 'reset=1&action=add&atype=3&cid='.$row['cid']).'&caseid='.$caseID.'" title="'. ts('Send an Email') . '"><span class="icon email-icon"></span></a>';
}
// edit links
if ($hasAccessToAllCases) {
* @static
*
*/
- static function &singleton($mode, &$paymentProcessor) {
+ static function &singleton($mode, &$paymentProcessor, &$paymentForm = NULL, $force = false) {
$processorName = $paymentProcessor['name'];
if (self::$_singleton[$processorName] === NULL) {
self::$_singleton[$processorName] = new CRM_Core_Payment_PayJunction($mode, $paymentProcessor);
* @static
*
*/
- static function &singleton($mode, &$paymentProcessor) {
+ static function &singleton($mode, &$paymentProcessor, &$paymentForm = NULL, $force = false) {
$processorName = $paymentProcessor['name'];
if (self::$_singleton[$processorName] === NULL) {
self::$_singleton[$processorName] = new CRM_Core_Payment_eWAY($mode, $paymentProcessor);
* @access public
*/
function setDefaultValues() {
+ if ($this->_action == CRM_Core_Action::DELETE) {
+ return;
+ }
$defaults = array();
if (isset($this->_oid)) {
if ($this->_multiRecordTableName) {
$returnQuery = TRUE;
}
-
+ $this->_query->_useGroupBy = TRUE;
$result = $this->_query->searchQuery($offset, $rowCount, $sort, NULL, NULL,
NULL, NULL, $returnQuery, $additionalWhereClause
);
INSERT INTO
`civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`)
VALUES
- (@option_group_id_batch_status, {localize}'Data Entry'{/localize}, @weight = @weight + 1, 'Data Entry', NULL, 0, 0, @weight = @weight + 1),
- (@option_group_id_batch_status, {localize}'Reopened'{/localize}, @weight = @weight + 1, 'Reopened', NULL, 0, 0, @weight = @weight + 1),
- (@option_group_id_batch_status, {localize}'Exported'{/localize}, @weight = @weight + 1, 'Exported' , NULL, 0, 0, @weight = @weight + 1);
+ (@option_group_id_batch_status, {localize}'Data Entry'{/localize}, @weight + 1, 'Data Entry', NULL, 0, 0, @weight + 1),
+ (@option_group_id_batch_status, {localize}'Reopened'{/localize}, @weight + 2, 'Reopened', NULL, 0, 0, @weight + 2),
+ (@option_group_id_batch_status, {localize}'Exported'{/localize}, @weight + 3, 'Exported' , NULL, 0, 0, @weight + 3);
-- Insert Batch Modes.
+SELECT @option_group_id_batch_modes := max(id) from civicrm_option_group where name = 'batch_mode';
-SELECT @option_group_id_batch_modes := max(id) from civicrm_option_group where name = 'batch_mode';
-SELECT @weight := MAX(value) FROM civicrm_option_value WHERE option_group_id = @option_group_id_batch_status;
INSERT INTO
`civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`)
VALUES
- (@option_group_id_batch_modes, {localize}'Manual Batch'{/localize}, @weight = @weight + 1, 'Manual Batch', NULL, 0, 0, @weight = @weight + 1),
- (@option_group_id_batch_modes, {localize}'Automatic Batch'{/localize}, @weight = @weight + 1, 'Automatic Batch' , NULL, 0, 0, @weight = @weight + 1);
+ (@option_group_id_batch_modes, {localize}'Manual Batch'{/localize}, 1, 'Manual Batch', NULL, 0, 0, 1),
+ (@option_group_id_batch_modes, {localize}'Automatic Batch'{/localize}, 2, 'Automatic Batch' , NULL, 0, 0, 2);
-- End of civiaccounts upgrade
{* file to handle db changes in 4.4.5 during upgrade *}
+-- CRM-14191
+SELECT @option_group_id_batch_status := max(id) from civicrm_option_group where name = 'batch_status';
+SELECT @weight := MAX(value) FROM civicrm_option_value WHERE option_group_id = @option_group_id_batch_status;
+
+UPDATE civicrm_option_value
+SET value = (Select @weight := @weight +1),
+weight = @weight
+where option_group_id = @option_group_id_batch_status AND name IN ('Data Entry', 'Reopened', 'Exported') AND value = 0 ORDER BY id;
+
+SELECT @option_group_id_batch_modes := max(id) from civicrm_option_group where name = 'batch_mode';
+SELECT @weights := MAX(value) FROM civicrm_option_value WHERE option_group_id = @option_group_id_batch_modes;
+
+UPDATE civicrm_option_value
+SET value = (Select @weights := @weights +1),
+weight = @weights
+where option_group_id = @option_group_id_batch_modes AND name IN ('Manual Batch', 'Automatic Batch') AND value = 0;
\ No newline at end of file
return false;
}
- $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, ($tz/60)%60 );
+ $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, abs(($tz/60)%60));
if($timeZoneOffset > 0){
$timeZoneOffset = '+' . $timeZoneOffset;
return false;
}
$hour = $user->timezone / 3600;
- $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, ($timezone/60)%60 );
+ $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, abs(($timeZoneOffset/60)%60));
if($timeZoneOffset > 0){
$timeZoneOffset = '+' . $timeZoneOffset;
}
else {
$activities = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE);
}
+ $options = _civicrm_api3_get_options_from_params($params, FALSE,'activity','get');
+ if($options['is_count']) {
+ return civicrm_api3_create_success($activities, $params, 'activity', 'get');
+ }
$activities = _civicrm_api3_activity_get_formatResult($params, $activities);
//legacy custom data get - so previous formatted response is still returned too
$objects['contribution'] = &$contribution;
$input['component'] = $contribution->_component;
$input['is_test'] = $contribution->is_test;
- $input['trxn_id']= $contribution->trxn_id;
+ $input['trxn_id']= !empty($params['trxn_id']) ? $params['trxn_id'] : $contribution->trxn_id;
$input['amount'] = $contribution->total_amount;
if(isset($params['is_email_receipt'])){
$input['is_email_receipt'] = $params['is_email_receipt'];
}
function _civicrm_api3_contribution_completetransaction(&$params) {
-
+ $params['id'] = array(
+ 'title' => 'Contribution ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'api.required' => TRUE,
+ );
+ $params['trxn_id'] = array(
+ 'title' => 'Transaction ID',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['is_email_receipt'] = array(
+ 'title' => 'Send email Receipt?',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
}
function civicrm_api3_job_process_membership($params) {
$lock = new CRM_Core_Lock('civimail.job.updateMembership');
if (!$lock->isAcquired()) {
- return civicrm_api3_create_error('Could not acquire lock, another EmailProcessor process is running');
+ return civicrm_api3_create_error('Could not acquire lock, another Membership Processing process is running');
}
$result = CRM_Member_BAO_Membership::updateAllMembershipStatus();
{continue}
{/if}
<td class="compressed {$field.data_type} {$fieldName}">
- {if ( $field.data_type eq 'Date' and $field.is_view eq 0) or
- ( $fieldName eq 'thankyou_date' ) or ( $fieldName eq 'cancel_date' ) or ( $fieldName eq 'receipt_date' ) or ( $fieldName eq 'activity_date_time') }
+ {if ( ($field.data_type eq 'Date') or
+ ( $fieldName eq 'thankyou_date' ) or ( $fieldName eq 'cancel_date' ) or ( $fieldName eq 'receipt_date' ) or ( $fieldName eq 'activity_date_time') ) and $field.is_view neq 1 }
{include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$voterId batchUpdate=1}
{elseif $fieldName|substr:0:5 eq 'phone'}
{assign var="phone_ext_field" value=$fieldName|replace:'phone':'phone_ext'}