Skip to content
Snippets Groups Projects
Commit 7dd1c03c authored by jaapjansma's avatar jaapjansma
Browse files

fixed #17 extra parameters for total contributed amount

parent a7ab7ce3
No related branches found
No related tags found
No related merge requests found
......@@ -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());
}
/**
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment