Skip to content

Commit

Permalink
Merge pull request #9764 from monishdeb/CRM-19918
Browse files Browse the repository at this point in the history
CRM-19918: Price field 'Active on' date ignored in Edit Event Registration > 'Change Selections'
  • Loading branch information
monishdeb authored Feb 3, 2017
2 parents aafc57b + 9bb909e commit d478f0f
Showing 1 changed file with 7 additions and 6 deletions.
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

0 comments on commit d478f0f

Please sign in to comment.