Skip to content

Commit

Permalink
Fix stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tareko committed Feb 9, 2013
1 parent 14e932a commit cebfd38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Model/Billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,11 @@ public function recombineBilling ($data) {

public function spentPerPatient($ohip = null, $conditions = array()) {
$conditions = $conditions + array('Billing.ohip' => $ohip);
return $this->BillingsItem->find('all', array(
$output = $this->BillingsItem->find('all', array(
'fields' => array('SUM(fee_submitted)'),
'conditions' => $conditions,
)
)[0][0]['SUM(fee_submitted)'];
);
return $output[0][0]['SUM(fee_submitted)'];
}
}

0 comments on commit cebfd38

Please sign in to comment.