forked from CiviWare/org.agbu.annualgrantbudgets
Changes to code
This commit is contained in:
@ -37,17 +37,18 @@ class CRM_Grant_BAO_GrantBudget extends CRM_Grant_DAO_GrantBudget {
|
||||
LEFT JOIN civicrm_grant cg
|
||||
ON cg.financial_type_id = cft.id AND cg.status_id IN (%4)
|
||||
AND cg.decision_date >= %2 AND cg.decision_date <= %3
|
||||
$where
|
||||
{$where}
|
||||
GROUP BY cft.id
|
||||
ORDER BY cft.name";
|
||||
$result = CRM_Core_DAO::executeQuery($sql, $qParams);
|
||||
|
||||
while ($result->fetch()) {
|
||||
$grantBudget[$result->id] = [
|
||||
'id' => $result->id,
|
||||
'name' => $result->name,
|
||||
'budget' => $result->budget,
|
||||
'total_amount_granted' => $result->total_amount_granted,
|
||||
'balance_amount' => ($result->budget - $result->total_amount_granted),
|
||||
'budget' => CRM_Utils_Money::format($result->budget),
|
||||
'total_amount_granted' => CRM_Utils_Money::format($result->total_amount_granted),
|
||||
'balance_amount' => CRM_Utils_Money::format(($result->budget - $result->total_amount_granted)),
|
||||
];
|
||||
}
|
||||
return $grantBudget;
|
||||
|
Reference in New Issue
Block a user