Skip to content
Snippets Groups Projects
Commit cdf7ac4a authored by Eileen McNaughton's avatar Eileen McNaughton
Browse files

#3134 Fix regression on unselected lineitem

parent 6c70a7c1
No related branches found
No related tags found
No related merge requests found
......@@ -793,12 +793,14 @@ class CRM_Financial_BAO_Order {
}
else {
foreach ($this->getPriceOptions() as $fieldID => $valueID) {
$this->setPriceSetIDFromSelectedField($fieldID);
$throwAwayArray = [];
// @todo - still using getLine for now but better to bring it to this class & do a better job.
$newLines = CRM_Price_BAO_PriceSet::getLine($params, $throwAwayArray, $this->getPriceSetID(), $this->getPriceFieldSpec($fieldID), $fieldID)[1];
foreach ($newLines as $newLine) {
$lineItems[$newLine['price_field_value_id']] = $newLine;
if ($valueID !== '') {
$this->setPriceSetIDFromSelectedField($fieldID);
$throwAwayArray = [];
// @todo - still using getLine for now but better to bring it to this class & do a better job.
$newLines = CRM_Price_BAO_PriceSet::getLine($params, $throwAwayArray, $this->getPriceSetID(), $this->getPriceFieldSpec($fieldID), $fieldID)[1];
foreach ($newLines as $newLine) {
$lineItems[$newLine['price_field_value_id']] = $newLine;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment