mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 21:48:05 +02:00
73 lines
2.3 KiB
PHP
73 lines
2.3 KiB
PHP
<?php
|
|
use CRM_Contactcats_ExtensionUtil as E;
|
|
|
|
return [
|
|
[
|
|
'name' => 'SavedSearch_ContactCategories_Locus_2_2',
|
|
'entity' => 'SavedSearch',
|
|
'cleanup' => 'unused',
|
|
'update' => 'unmodified',
|
|
'params' => [
|
|
'version' => 4,
|
|
'values' => [
|
|
'name' => 'ContactCategories_Locus_2_2',
|
|
'label' => E::ts('ContactCategories Locus 2.2'),
|
|
'api_entity' => 'Contact',
|
|
'api_params' => [
|
|
'version' => 4,
|
|
'select' => [
|
|
'id',
|
|
'sort_name',
|
|
'contact_type:label',
|
|
'contact_sub_type:label',
|
|
'Contact_ContributionRecur_contact_id_01_ContributionRecur_Contribution_contribution_recur_id_01.total_amount',
|
|
],
|
|
'orderBy' => [],
|
|
'where' => [],
|
|
'groupBy' => ['id'],
|
|
'join' => [
|
|
[
|
|
'ContributionRecur AS Contact_ContributionRecur_contact_id_01',
|
|
'INNER',
|
|
[
|
|
'id',
|
|
'=',
|
|
'Contact_ContributionRecur_contact_id_01.contact_id',
|
|
],
|
|
[
|
|
'Contact_ContributionRecur_contact_id_01.contribution_status_id:name',
|
|
'=',
|
|
'"In Progress"',
|
|
],
|
|
[
|
|
'Contact_ContributionRecur_contact_id_01.start_date',
|
|
'>',
|
|
'"now - 12 month"',
|
|
],
|
|
],
|
|
[
|
|
'Contribution AS Contact_ContributionRecur_contact_id_01_ContributionRecur_Contribution_contribution_recur_id_01',
|
|
'INNER',
|
|
[
|
|
'Contact_ContributionRecur_contact_id_01.id',
|
|
'=',
|
|
'Contact_ContributionRecur_contact_id_01_ContributionRecur_Contribution_contribution_recur_id_01.contribution_recur_id',
|
|
],
|
|
[
|
|
'Contact_ContributionRecur_contact_id_01_ContributionRecur_Contribution_contribution_recur_id_01.contribution_status_id:name',
|
|
'=',
|
|
'"Completed"',
|
|
],
|
|
],
|
|
],
|
|
'having' => [],
|
|
],
|
|
'description' => E::ts('new regular donor
|
|
|
|
- started giving regular donations max. 12 months ago
|
|
- at least one completed contribution.'),
|
|
],
|
|
'match' => ['name'],
|
|
],
|
|
],
|
|
];
|