Skip to content
Snippets Groups Projects
Commit 5af5956c authored by xurizaemon's avatar xurizaemon
Browse files

CRM-12997. Set id on all line items, not just the first.

parent 2515049c
Branches
Tags
No related merge requests found
......@@ -1062,13 +1062,15 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
}
$lineItems = CRM_Price_BAO_LineItem::getLineItems($entityID, $entityTable);
foreach (array_keys($lineItems) as $id) {
$lineItems[$id]['id'] = $id;
}
$itemId = key($lineItems);
$fieldType = NULL;
if ($itemId && CRM_Utils_Array::value('price_field_id', $lineItems[$itemId])) {
$fieldType = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Field', $lineItems[$itemId]['price_field_id'], 'html_type');
}
$lineItems[$itemId]['unit_price'] = $lineItems[$itemId]['line_total'] = CRM_Utils_Rule::cleanMoney(CRM_Utils_Array::value('total_amount', $submittedValues));
$lineItems[$itemId]['id'] = $itemId;
// 10117 update th line items for participants
$this->_priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Field', $lineItems[$itemId]['price_field_id'], 'price_set_id');
$lineItem[$this->_priceSetId] = $lineItems;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment