Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
civirules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ayduns
civirules
Commits
7dd1c03c
Commit
7dd1c03c
authored
9 years ago
by
jaapjansma
Browse files
Options
Downloads
Patches
Plain Diff
fixed #17 extra parameters for total contributed amount
parent
a7ab7ce3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/CivirulesConditions/Form/Contribution/TotalContributedAmount.php
+1
-1
1 addition, 1 deletion
...esConditions/Form/Contribution/TotalContributedAmount.php
CRM/CivirulesConditions/Utils/Period.php
+16
-0
16 additions, 0 deletions
CRM/CivirulesConditions/Utils/Period.php
with
17 additions
and
1 deletion
CRM/CivirulesConditions/Form/Contribution/TotalContributedAmount.php
+
1
−
1
View file @
7dd1c03c
...
...
@@ -10,7 +10,7 @@ class CRM_CivirulesConditions_Form_Contribution_TotalContributedAmount extends C
public
function
buildQuickForm
()
{
parent
::
buildQuickForm
();
$this
->
add
(
'select'
,
'period'
,
ts
(
'Period'
),
array
(
''
=>
ts
(
'
No period
'
))
+
CRM_CivirulesConditions_Utils_Period
::
Options
());
$this
->
add
(
'select'
,
'period'
,
ts
(
'Period'
),
array
(
''
=>
ts
(
'
All time
'
))
+
CRM_CivirulesConditions_Utils_Period
::
Options
());
}
/**
...
...
This diff is collapsed.
Click to expand it.
CRM/CivirulesConditions/Utils/Period.php
+
16
−
0
View file @
7dd1c03c
...
...
@@ -13,6 +13,8 @@ class CRM_CivirulesConditions_Utils_Period {
'this month'
=>
ts
(
'This month'
),
'previous month'
=>
ts
(
'Previous month'
),
'last 30 days'
=>
ts
(
'Last 30 days'
),
'last 12 months'
=>
ts
(
'Last 12 months'
),
'last 13 months'
=>
ts
(
'Last 13 months'
),
'this year'
=>
ts
(
'This year'
),
'previous year'
=>
ts
(
'Previous year'
),
);
...
...
@@ -33,6 +35,14 @@ class CRM_CivirulesConditions_Utils_Period {
$date
->
modify
(
'-30 days'
);
return
$date
;
break
;
case
'last 12 months'
:
$date
->
modify
(
'12 months'
);
return
$date
;
break
;
case
'last 13 months'
:
$date
->
modify
(
'13 months'
);
return
$date
;
break
;
case
'this year'
:
$date
->
modify
(
'first day of January this year'
);
return
$date
;
...
...
@@ -60,6 +70,12 @@ class CRM_CivirulesConditions_Utils_Period {
case
'last 30 days'
:
return
$date
;
break
;
case
'last 12 months'
:
return
$date
;
break
;
case
'last 13 months'
:
return
$date
;
break
;
case
'this year'
:
$date
->
modify
(
'last day of December this year'
);
return
$date
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment