Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
CiviDiscount
Commits
8f6a4cac
Commit
8f6a4cac
authored
Jul 21, 2014
by
monishdeb
Browse files
CRM-13311 additional fix
parent
65e2b809
Changes
1
Hide whitespace changes
Inline
Side-by-side
CRM/CiviDiscount/Utils.php
View file @
8f6a4cac
...
...
@@ -71,9 +71,13 @@ class CRM_CiviDiscount_Utils {
static
function
getPriceSetsInfo
(
$priceSetId
=
null
)
{
$params
=
array
();
$psTableName
=
'civicrm_price_set_entity'
;
if
(
$priceSetId
)
{
$additionalWhere
=
'ps.id = %1'
;
$params
=
array
(
1
=>
array
(
$priceSetId
,
'Positive'
));
if
(
CRM_Core_DAO
::
getFieldValue
(
'CRM_Core_DAO_Discount'
,
$priceSetId
,
'id'
,
'price_set_id'
))
{
$psTableName
=
'civicrm_discount'
;
}
}
else
{
$additionalWhere
=
'ps.is_quick_config = 0'
;
...
...
@@ -88,7 +92,7 @@ SELECT pfv.id as item_id,
FROM civicrm_price_field_value as pfv
LEFT JOIN civicrm_price_field as pf on (pf.id = pfv.price_field_id)
LEFT JOIN civicrm_price_set as ps on (ps.id = pf.price_set_id AND ps.is_active = 1)
INNER JOIN
civicrm_price_set_entity
as pse on (ps.id = pse.price_set_id)
INNER JOIN
{
$psTableName
}
as pse on (ps.id = pse.price_set_id)
WHERE
{
$additionalWhere
}
ORDER BY pf_label, pfv.price_field_id, pfv.weight
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment