}
$lineItems = array();
+ $displayLineItems = FALSE;
if ($id) {
- $lineItem = CRM_Price_BAO_LineItem::getLineItems($id, 'contribution', 1, TRUE, TRUE);
- if (!empty($lineItem)) {
- $lineItems[] = $lineItem;
- }
-
+ $lineItems = array(CRM_Price_BAO_LineItem::getLineItemsByContributionID(($id)));
+ $firstLineItem = reset($lineItems[0]);
+ $priceSet = civicrm_api3('PriceSet', 'getsingle', array('id' => $firstLineItem['price_set_id'], 'return' => 'is_quick_config, id'));
+ $displayLineItems = !$priceSet['is_quick_config'];
}
- $this->assign('lineItem', empty($lineItems) ? FALSE : $lineItems);
+ $this->assign('lineItem', $lineItems);
+ $this->assign('displayLineItems', $displayLineItems);
$values['totalAmount'] = $values['total_amount'];
//do check for campaigns
li.entity_id,
pf.label as field_title,
pf.html_type,
+ pf.price_set_id,
pfv.membership_type_id,
pfv.membership_num_terms,
li.price_field_id,
'membership_type_id' => $dao->membership_type_id,
'membership_num_terms' => $dao->membership_num_terms,
'tax_amount' => $dao->tax_amount,
+ 'price_set_id' => $dao->price_set_id,
);
$lineItems[$dao->id]['tax_rate'] = CRM_Price_BAO_LineItem::calculateTaxRate($lineItems[$dao->id]);
$lineItems[$dao->id]['subTotal'] = $lineItems[$dao->id]['qty'] * $lineItems[$dao->id]['unit_price'];
<td class="label">{ts}Financial Type{/ts}</td>
<td>{$financial_type}{if $is_test} {ts}(test){/ts} {/if}</td>
</tr>
- {if $lineItem}
+ {if $displayLineItems}
<tr>
<td class="label">{ts}Contribution Amount{/ts}</td>
<td>{include file="CRM/Price/Page/LineItem.tpl" context="Contribution"}