Occupation : Accounting & Finance
Level IV
Individual Assignment
Unit of Compitence : Preparing Financial Reports Based on IFRS
Prepared By : Ketemash Aklilu
Submitted To Birelew
Date 27/05/2017E.C Dire Dawa, Ethiopia
Summary of Preparing Financial Reports Based on IFRS
Inventory Adjustment (IAS 2)
- Perpetual System: No adjusting entry needed as it's continuously updated.
- Periodic System: Requires adjusting entries to match actual inventory:
- Inventory Decrease: Debit Cost of Goods Sold (COGS), Credit Inventory.
- Inventory Increase: Debit Inventory, Credit COGS.
- Valuation Methods:
- FIFO (First-In, First-Out) and Weighted Average are IFRS-compliant.
- LIFO (Last-In, First-Out) is not permitted under IFRS.
- Measurement: Inventories are measured at the lower of cost and net realizable value.
Final General Ledger Preparation
- Formats:
- T-Account Format: Simple visualization with debit (left) and credit (right).
- Columnar Format: Includes date, description, reference, debit, credit, and balance.
- Processes:
- Posting: Transferring journal entries to the ledger.
- Balancing: Ensuring total debits equal total credits, determining closing balances.
End-of-Period Financial Reports
- Components:
- Adjusted Trial Balance: Lists account balances after adjustments.
- Revenue (Income) Statement: Shows income, expenses, and net profit/loss.
- Revenue - COGS = Gross Profit
- Operating Profit = Gross Profit - Operating Expenses
- Balance Sheet (Statement of Financial Position): Displays assets, liabilities, and equity.
- Assets: Current, Fixed, and Intangible
- Liabilities: Current and Long-term
- Equity: Owner’s capital, retained earnings
- Closing Entries: Transfers balances from temporary to permanent accounts (e.g.,
revenues and expenses to retained earnings).
- Post-Closing Trial Balance: Confirms accounts are balanced after closing entries.
Accounting Errors
- Types of Errors:
- Original Entry Error: Wrong amount posted.
- Duplication Error: Entry recorded twice.
- Omission Error: Transaction not recorded.
- Reversal Error: Debit/Credit recorded incorrectly.
- Principle Error: Incorrect accounting principle applied.
- Commission Error: Correct account but wrong subsidiary ledger.
- Compensating Error: One error offsets another.
- Corrections: Done via adjusting journal entries and reconciliations (e.g., bank
reconciliation).
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
student_ID VARCHAR(20) UNIQUE,
student_Name VARCHAR(100),
sex ENUM('Male', 'Female'),
age INT,
grade VARCHAR(10),
section VARCHAR(10)
);
CREATE TABLE marks (
id INT AUTO_INCREMENT PRIMARY KEY,
student_ID VARCHAR(20),
subject VARCHAR(50),
mark INT,
FOREIGN KEY (student_ID) REFERENCES students(student_ID)
);
<?php
session_start();
require 'db.php'; // Ensure db.php is correctly set up
require 'vendor/autoload.php'; // Load PhpSpreadsheet
use PhpOffice\PhpSpreadsheet\IOFactory;
$message = '';
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['student_file'])) {
$file = $_FILES['student_file']['tmp_name'];
try {
$spreadsheet = IOFactory::load($file);
$sheet = $spreadsheet->getActiveSheet();
$data = $sheet->toArray();
$stmt = $conn->prepare("INSERT INTO students (student_ID, student_Name, sex, age,
grade, section) VALUES (?, ?, ?, ?, ?, ?)");
for ($i = 1; $i < count($data); $i++) { // Skip header
list($student_ID, $student_Name, $sex, $age, $grade, $section) = $data[$i];
$stmt->execute([$student_ID, $student_Name, $sex, $age, $grade, $section]);
$message = "Students imported successfully!";
} catch (Exception $e) {
$message = "Import failed: " . $e->getMessage();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Upload Students</title>
</head>
<body>
<h2>Import Students</h2>
<p style="color:green"><?php echo $message; ?></p>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="student_file" required>
<button type="submit">Upload</button>
</form>
<a href="dashboard.php">Back to Dashboard</a>
</body>
</html>
<?php
session_start();
require 'db.php';
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\IOFactory;
$message = '';
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['marks_file'])) {
$file = $_FILES['marks_file']['tmp_name'];
try {
$spreadsheet = IOFactory::load($file);
$sheet = $spreadsheet->getActiveSheet();
$data = $sheet->toArray();
$stmt = $conn->prepare("INSERT INTO marks (student_ID, subject, mark) VALUES (?, ?,
?)");
for ($i = 1; $i < count($data); $i++) { // Skip header
$student_ID = $data[$i][0];
for ($j = 1; $j < count($data[$i]); $j++) {
$subject = "Subject_" . $j; // Rename subjects dynamically
$mark = $data[$i][$j];
$stmt->execute([$student_ID, $subject, $mark]);
$message = "Marks imported successfully!";
} catch (Exception $e) {
$message = "Import failed: " . $e->getMessage();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Upload Marks</title>
</head>
<body>
<h2>Import Marks</h2>
<p style="color:green"><?php echo $message; ?></p>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="marks_file" required>
<button type="submit">Upload</button>
</form>
<a href="dashboard.php">Back to Dashboard</a>
</body>
</html>
<?php
session_start();
require 'db.php';
// Fetch Students
$students = $conn->query("SELECT * FROM students")->fetchAll(PDO::FETCH_ASSOC);
// Fetch Marks
$marks = $conn->query("SELECT student_ID, subject, mark FROM marks")-
>fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dashboard</title>
</head>
<body>
<h2>Dashboard</h2>
<h3>Student List</h3>
<table border="1">
<tr>
<th>ID</th><th>Name</th><th>Sex</th><th>Age</th><th>Grade</th><th>Section</
th>
</tr>
<?php foreach ($students as $s) : ?>
<tr>
<td><?php echo $s['student_ID']; ?></td>
<td><?php echo $s['student_Name']; ?></td>
<td><?php echo $s['sex']; ?></td>
<td><?php echo $s['age']; ?></td>
<td><?php echo $s['grade']; ?></td>
<td><?php echo $s['section']; ?></td>
</tr>
<?php endforeach; ?>
</table>
<h3>Student Marks</h3>
<table border="1">
<tr>
<th>Student ID</th><th>Subject</th><th>Mark</th>
</tr>
<?php foreach ($marks as $m) : ?>
<tr>
<td><?php echo $m['student_ID']; ?></td>
<td><?php echo $m['subject']; ?></td>
<td><?php echo $m['mark']; ?></td>
</tr>
<?php endforeach; ?>
</table>
<a href="upload_students.php">Import Students</a>
<a href="upload_marks.php">Import Marks</a>
</body>
</html>
<?php
$host = 'localhost';
$dbname = 'school_management';
$username = 'root'; // Change if needed
$password = ''; // Change if needed
try {
$conn = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username,
$password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die("Connection failed: " . $e->getMessage());
?>
<?php
require 'db.php';
try {
$stmt = $pdo->query("SELECT * FROM students");
$students = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
die("Database error: " . $e->getMessage());
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>View Students</title>
</head>
<body>
<h2>Students List</h2>
<table border="1">
<tr>
<th>Student ID</th>
<th>Name</th>
<th>Sex</th>
<th>Age</th>
<th>Grade</th>
<th>Section</th>
</tr>
<?php foreach ($students as $student): ?>
<tr>
<td><?= htmlspecialchars($student['student_id']) ?></td>
<td><?= htmlspecialchars($student['name']) ?></td>
<td><?= htmlspecialchars($student['sex']) ?></td>
<td><?= htmlspecialchars($student['age']) ?></td>
<td><?= htmlspecialchars($student['grade']) ?></td>
<td><?= htmlspecialchars($student['section']) ?></td>
</tr>
<?php endforeach; ?>
</table>
<a href="dashboard.php">Back to Dashboard</a>
</body>
</html>
<?php
require 'db.php';
try {
$stmt = $pdo->query("SELECT * FROM marks");
$marks = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
die("Database error: " . $e->getMessage());
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>View Marks</title>
</head>
<body>
<h2>Marks List</h2>
<table border="1">
<tr>
<th>Student ID</th>
<th>Subject 1</th>
<th>Subject 2</th>
<th>Subject 3</th>
<th>Subject 4</th>
<th>Subject 5</th>
<th>Subject 6</th>
<th>Subject 7</th>
<th>Total</th>
<th>Average</th>
<th>Semester</th>
</tr>
<?php foreach ($marks as $mark): ?>
<tr>
<td><?= htmlspecialchars($mark['student_id']) ?></td>
<td><?= htmlspecialchars($mark['subject_1']) ?></td>
<td><?= htmlspecialchars($mark['subject_2']) ?></td>
<td><?= htmlspecialchars($mark['subject_3']) ?></td>
<td><?= htmlspecialchars($mark['subject_4']) ?></td>
<td><?= htmlspecialchars($mark['subject_5']) ?></td>
<td><?= htmlspecialchars($mark['subject_6']) ?></td>
<td><?= htmlspecialchars($mark['subject_7']) ?></td>
<td><?= htmlspecialchars($mark['total']) ?></td>
<td><?= htmlspecialchars($mark['average']) ?></td>
<td><?= htmlspecialchars($mark['semester']) ?></td>
</tr>
<?php endforeach; ?>
</table>
<a href="dashboard.php">Back to Dashboard</a>
</body>
</html>
<?php
require 'db.php';
try {
$stmt = $pdo->query("SELECT * FROM promotion");
$promotion = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
die("Database error: " . $e->getMessage());
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Promotion Policy</title>
</head>
<body>
<h2>Promotion Result</h2>
<table border="1">
<tr>
<th>Student ID</th>
<th>Name</th>
<th>Total Sem 1</th>
<th>Total Sem 2</th>
<th>Average</th>
<th>Cumulative Rank</th>
<th>Promotion Status</th>
</tr>
<?php foreach ($promotion as $row): ?>
<tr>
<td><?= htmlspecialchars($row['student_id']) ?></td>
<td><?= htmlspecialchars($row['name']) ?></td>
<td><?= htmlspecialchars($row['total_sem1']) ?></td>
<td><?= htmlspecialchars($row['total_sem2']) ?></td>
<td><?= htmlspecialchars($row['average']) ?></td>
<td><?= htmlspecialchars($row['cumulative_rank']) ?></td>
<td><?= htmlspecialchars($row['promotion_status']) ?></td>
</tr>
<?php endforeach; ?>
</table>
<a href="dashboard.php">Back to Dashboard</a>
</body>
</html>
<?php
require 'db.php';
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
$stmt = $pdo->query("SELECT * FROM promotion");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
// Header
$sheet->setCellValue('A1', 'Sabian Secondary School');
$sheet->setCellValue('A2', 'Grade: 9');
$sheet->setCellValue('A3', 'Section: A');
// Table Header
$sheet->setCellValue('A5', 'Student ID');
$sheet->setCellValue('B5', 'Name');
$sheet->setCellValue('C5', 'Sex');
$sheet->setCellValue('D5', 'Age');
$sheet->setCellValue('E5', 'Total Sem1');
$sheet->setCellValue('F5', 'Total Sem2');
$sheet->setCellValue('G5', 'Average');
$sheet->setCellValue('H5', 'Cumulative Rank');
$sheet->setCellValue('I5', 'Promotion Status');
$rowNum = 6;
foreach ($rows as $row) {
$sheet->setCellValue('A' . $rowNum, $row['student_id']);
$sheet->setCellValue('B' . $rowNum, $row['name']);
$sheet->setCellValue('C' . $rowNum, $row['sex']);
$sheet->setCellValue('D' . $rowNum, $row['age']);
$sheet->setCellValue('E' . $rowNum, $row['total_sem1']);
$sheet->setCellValue('F' . $rowNum, $row['total_sem2']);
$sheet->setCellValue('G' . $rowNum, $row['average']);
$sheet->setCellValue('H' . $rowNum, $row['cumulative_rank']);
$sheet->setCellValue('I' . $rowNum, $row['promotion_status']);
$rowNum++;
$writer = new Xlsx($spreadsheet);
$filename = 'Class_Roster_Report.xlsx';
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . $filename . '"');
header('Cache-Control: max-age=0');
$writer->save('php://output');
exit;