From: Pradeep Nayak Date: Fri, 24 Apr 2020 15:23:29 +0000 (+0100) Subject: activity api accepts name in activity type X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ac844df66f62fc05b6e2420eb0fcbd6bd3222670;p=civicrm-core.git activity api accepts name in activity type --- diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index cb847d18a0..85a0c01007 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -521,25 +521,17 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $config->doNotAttachPDFReceipt = 1; if (!empty($params['output']) && $params['output'] == 'pdf_invoice') { - $activityTypeID = CRM_Core_PseudoConstant::getKey( - 'CRM_Activity_DAO_Activity', - 'activity_type_id', - 'Downloaded Invoice' - ); + $activityType = 'Downloaded Invoice'; } else { - $activityTypeID = CRM_Core_PseudoConstant::getKey( - 'CRM_Activity_DAO_Activity', - 'activity_type_id', - 'Emailed Invoice' - ); + $activityType = 'Emailed Invoice'; } $activityParams = [ 'subject' => $subject, 'source_contact_id' => $userID, 'target_contact_id' => $contactIds, - 'activity_type_id' => $activityTypeID, + 'activity_type_id' => $activityType, 'activity_date_time' => date('YmdHis'), 'attachFile_1' => [ 'uri' => $fileName,