Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Incomplete
-
Affects Version/s: 4.4.5
-
Fix Version/s: None
-
Component/s: CiviEvent
-
Labels:None
Description
Is an early registration priceset required to have a civicrm_price_set_entity record? I need to know what the constraint is between an early registration priceset and the price table.
I am tracking down a problem with the cividiscount extension. An 'early registration' priceset is failing to be retrieved because the code is expecting a record in civicrm_price_set_entity, and there is none.
The specific query is:
SELECT pfv.id as item_id,
pfv.label as item_label,
pf.label as pf_label,
pfv.membership_type_id as membership_type_id,
ps.title as ps_label
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)
WHERE ps.id = 12345;
Changing the last join from an inner to a left join (or eliminating it entirely) seems to return the priceset correctly. However, I can't tell if this is a cividiscount bug (left join should be used) or a CiviEvent bug (the priceset should in fact have a record in civicrm_price_set_entity).