mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 21:28:06 +02:00
58 lines
1.6 KiB
PHP
58 lines
1.6 KiB
PHP
<?php
|
|
use CRM_Contactcats_ExtensionUtil as E;
|
|
|
|
return [
|
|
[
|
|
'name' => 'SavedSearch_ContactCategories_Locus_1_1',
|
|
'entity' => 'SavedSearch',
|
|
'cleanup' => 'unused',
|
|
'update' => 'unmodified',
|
|
'params' => [
|
|
'version' => 4,
|
|
'values' => [
|
|
'name' => 'ContactCategories_Locus_1_1',
|
|
'label' => E::ts('ContactCategories Locus 1.1'),
|
|
'api_entity' => 'Contact',
|
|
'api_params' => [
|
|
'version' => 4,
|
|
'select' => [
|
|
'id',
|
|
'sort_name',
|
|
'contact_type:label',
|
|
'MAX(Contact_Contribution_contact_id_01.receive_date) AS MAX_Contact_Contribution_contact_id_01_receive_date',
|
|
],
|
|
'orderBy' => [],
|
|
'where' => [],
|
|
'groupBy' => ['id'],
|
|
'join' => [
|
|
[
|
|
'Contribution AS Contact_Contribution_contact_id_01',
|
|
'INNER',
|
|
[
|
|
'id',
|
|
'=',
|
|
'Contact_Contribution_contact_id_01.contact_id',
|
|
],
|
|
[
|
|
'Contact_Contribution_contact_id_01.contribution_status_id:name',
|
|
'=',
|
|
'"Completed"',
|
|
],
|
|
],
|
|
],
|
|
'having' => [
|
|
[
|
|
'MAX_Contact_Contribution_contact_id_01_receive_date',
|
|
'<',
|
|
'now - 36 month',
|
|
],
|
|
],
|
|
],
|
|
'description' => E::ts('1.1 Occasional donor: expired
|
|
|
|
last donation 36 + months before today'),
|
|
],
|
|
'match' => ['name'],
|
|
],
|
|
],
|
|
];
|