/** * Enter description here... * * @param unknown_type $username */ function delete($id = '') { $e = new Budget_expenses_m(); $e->get_by_id($id)->delete(); Session::flash('msg', 'User has been deleted!'); return Redirect::to('budget/expenses/', 'refresh'); }
budget/save">Add</a> </td> </tr> </table> <table width="100%" border="0" class="type-one"> <tr class="type-one-header"> <th width="2%" scope="col"><input name="checkall" type="checkbox" id="checkall" onClick="select_all('user', '1');" value="1"/></th> <th width="22%" scope="col"><strong>Expenditures</strong></th> <th width="5%" scope="col"><strong>Account Code</strong></th> <th width="9%" scope="col"><strong>Year</strong></th> <th width="15%" scope="col"><strong>Budget</strong></th> <th width="13%" scope="col">Expenses</th> <th width="13%" scope="col">Balance</th> <th width="21%" scope="col"><strong>Action</strong></th> </tr> <?php $b = new Budget_expenses_m(); $total_budget = 0; $total_expenses = 0; $total_balance = 0; ?> <?php foreach ($expenditures as $row) { ?> <?php $b->select_sum('amount'); $b->get_by_budget_expenditure_id($row->id); $total_budget += $row->budget_amount; $total_expenses += $b->amount; $balance = $row->budget_amount - $b->amount; $total_balance += $balance; ?>