Skip to content

Commit

Permalink
CRM-16189, changed function defination
Browse files Browse the repository at this point in the history
----------------------------------------
* CRM-16189: Improve support for Accrual Method bookkeeping
  https://issues.civicrm.org/jira/browse/CRM-16189
  • Loading branch information
pradpnayak committed Sep 20, 2016
1 parent bfd2088 commit 328a667
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions CRM/Price/BAO/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,16 @@ public static function getAPILineItemParams(&$params) {
}

/**
* @param int $entityId
* @param $entityTable
* @param int $contributionId
*
* @return null|string
*/
public static function getLineTotal($entityId, $entityTable) {
public static function getLineTotal($contributionId) {
$sqlLineItemTotal = "SELECT SUM(li.line_total + COALESCE(li.tax_amount,0))
FROM civicrm_line_item li
WHERE li.entity_table = '{$entityTable}'
AND li.entity_id = {$entityId}
";
$lineItemTotal = CRM_Core_DAO::singleValueQuery($sqlLineItemTotal);
WHERE li.contribution_id = %1";
$params = array(1 => array($contributionId, 'Integer'));
$lineItemTotal = CRM_Core_DAO::singleValueQuery($sqlLineItemTotal, $params);
return $lineItemTotal;
}

Expand Down

0 comments on commit 328a667

Please sign in to comment.