Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19918: Price field 'Active on' date ignored in Edit Event Registration > 'Change Selections' #9764

Merged
merged 1 commit into from
Feb 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions CRM/Price/BAO/PriceSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,17 +471,18 @@ public static function getSetDetail($setID, $required = TRUE, $validOnly = FALSE
$select = 'SELECT ' . implode(',', $priceFields);
$from = ' FROM civicrm_price_field';

$params = array();
$params[1] = array($setID, 'Integer');
$where = '
$params = array(
1 => array($setID, 'Integer'),
);
$currentTime = date('YmdHis');
$where = "
WHERE price_set_id = %1
AND is_active = 1
';
AND ( active_on IS NULL OR active_on <= {$currentTime} )
";
$dateSelect = '';
if ($validOnly) {
$currentTime = date('YmdHis');
$dateSelect = "
AND ( active_on IS NULL OR active_on <= {$currentTime} )
AND ( expire_on IS NULL OR expire_on >= {$currentTime} )
";
}
Expand Down