This is my exam can u teach most convinent mportant only with normal life example and images to make me unstd the concept of topic paper -1
Every time you get paid, spend money, or save - that's accounting in real life. In business, we just write it all down in a formal system.
Assets = Liabilities + Capital (Owner's Equity)
You want to buy a bike worth โน80,000.
- You pay โน30,000 from your own pocket (= Capital)
- You borrow โน50,000 from a bank (= Liability)
- The bike belongs to you (= Asset worth โน80,000)
โ โน80,000 (Asset) = โน50,000 (Liability) + โน30,000 (Capital) โ Always balances!
| Type | What it means | Real Example |
|---|---|---|
| Personal Account | Persons/companies we deal with | Your friend Ravi who owes you money |
| Real Account | Physical things (property, cash, goods) | Your shop, stock, cash in hand |
| Nominal Account | Incomes and expenses | Salary paid, rent received |
| Account Type | Debit | Credit |
|---|---|---|
| Personal | Receiver | Giver |
| Real | What comes IN | What goes OUT |
| Nominal | Expenses/Losses | Incomes/Gains |
- Personal โ "Who received? Debit them. Who gave? Credit them."
- Real โ "Cash came in? Debit Cash."
- Nominal โ "Paid rent? Debit rent (expense)."
Purchases A/c Dr. 500
To Cash A/c 500
(Being goods purchased for cash)
Rice came INTO the business (Real a/c โ Debit what comes in) Cash went OUT (Real a/c โ Credit what goes out)
If Debit Total = Credit Total โ โ Your books are correct! If they don't match โ โ You made a mistake somewhere.
Sales - Cost of Goods Sold = Gross Profit
Example: You sell 100 pens at โน10 each = โน1,000 Sales You bought those pens for โน600 Gross Profit = โน400
Gross Profit - All Expenses = Net Profit
From โน400 gross profit, you paid โน100 rent + โน50 electricity Net Profit = โน250
| Liabilities | โน | Assets | โน |
|---|---|---|---|
| Capital | 30,000 | Building | 25,000 |
| Bank Loan | 50,000 | Stock | 30,000 |
| Creditors | 10,000 | Cash | 35,000 |
| Total | 90,000 | Total | 90,000 |
Both sides MUST be equal - like a weighing scale โ๏ธ
Phone โน20,000, life 4 years โ Depreciation = โน5,000/year
20% depreciation on โน20,000 = โน4,000 in Year 1 Then 20% on โน16,000 = โน3,200 in Year 2
| Ratio | Formula | What it tells you |
|---|---|---|
| Current Ratio | Current Assets / Current Liabilities | Can we pay short-term debts? (ideal = 2:1) |
| Gross Profit Ratio | Gross Profit / Sales ร 100 | Profit % on sales |
| Net Profit Ratio | Net Profit / Sales ร 100 | Final profit % |
| Debt-Equity Ratio | Long-term Debt / Equity | How much borrowed vs owned? |
| Cost Type | Example |
|---|---|
| Fixed Cost | Factory rent - same every month whether you produce or not |
| Variable Cost | Raw material - increases as production increases |
| Semi-variable Cost | Electricity - fixed base charge + usage charge |
| Opportunity Cost | You invest โน1 lakh in business instead of FD - the FD interest lost = opportunity cost |
| Sunk Cost | Money already spent and can't be recovered - don't let it affect future decisions |
| Concept | One-line Memory |
|---|---|
| Accounting Equation | Assets = Liabilities + Capital (always!) |
| Debit | What comes IN / Receiver / Expenses |
| Credit | What goes OUT / Giver / Income |
| Trial Balance | Debit total = Credit total โ correct |
| Balance Sheet | Assets = Liabilities side (both equal!) |
| Depreciation | Value reduces over time |
| BRS | Explains gap between your records & bank records |
| Current Ratio | 2:1 is ideal (healthy business sign) |
| # | Date | Subject |
|---|---|---|
| 1 | 16 Aug 2026 | Basic Accounting for Managers |
| 2 | 22 Aug 2026 | Business Communication |
| 3 | 23 Aug 2026 | Managerial Economics |
| 4 | 29 Aug 2026 | Business Legislations |
| 5 | 05 Sep 2026 | Business Statistics for Managers |
| 6 | 19 Sep 2026 | Computer Application for Business |
| 7 | 20 Sep 2026 | E-Commerce |
| 8 | 27 Sep 2026 | Principles of Management & Behavioral Science |
Make a comprehensive study guide PDF with diagrams
mkdir -p /tmp/workspace/accounting-study-guide && ls /tmp/workspace/
~/accounting-study-guide/create_guide.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import Flowable
from reportlab.graphics.shapes import (
Drawing, Rect, String, Line, Circle, Polygon,
Arrow, Group
)
from reportlab.graphics import renderPDF
from reportlab.graphics.charts.piecharts import Pie
from reportlab.graphics.charts.barcharts import VerticalBarChart
import math
# โโ Color palette โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DARK_BLUE = colors.HexColor("#1A237E")
MID_BLUE = colors.HexColor("#1565C0")
LIGHT_BLUE = colors.HexColor("#E3F2FD")
ACCENT = colors.HexColor("#FF6F00")
GREEN = colors.HexColor("#2E7D32")
LIGHT_GREEN = colors.HexColor("#E8F5E9")
RED = colors.HexColor("#C62828")
LIGHT_RED = colors.HexColor("#FFEBEE")
YELLOW = colors.HexColor("#F9A825")
LIGHT_YELLOW= colors.HexColor("#FFFDE7")
PURPLE = colors.HexColor("#6A1B9A")
LIGHT_PURPLE= colors.HexColor("#F3E5F5")
TEAL = colors.HexColor("#00695C")
LIGHT_TEAL = colors.HexColor("#E0F2F1")
GRAY = colors.HexColor("#546E7A")
LIGHT_GRAY = colors.HexColor("#ECEFF1")
WHITE = colors.white
BLACK = colors.black
PAGE_W, PAGE_H = A4
# โโ Styles โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
COVER_TITLE = S("CoverTitle", fontSize=32, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=8)
COVER_SUB = S("CoverSub", fontSize=16, textColor=LIGHT_BLUE, fontName="Helvetica", alignment=TA_CENTER, spaceAfter=6)
COVER_TINY = S("CoverTiny", fontSize=11, textColor=LIGHT_BLUE, fontName="Helvetica", alignment=TA_CENTER)
CH_TITLE = S("ChTitle", fontSize=22, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=4)
SECTION_HDR = S("SectionHdr", fontSize=14, textColor=DARK_BLUE, fontName="Helvetica-Bold", spaceBefore=14, spaceAfter=6)
SUBSECTION = S("SubSection", fontSize=12, textColor=MID_BLUE, fontName="Helvetica-Bold", spaceBefore=8, spaceAfter=4)
BODY = S("Body", fontSize=10, textColor=colors.HexColor("#212121"), fontName="Helvetica",
leading=15, spaceBefore=3, spaceAfter=3, alignment=TA_JUSTIFY)
BULLET = S("Bullet", fontSize=10, textColor=colors.HexColor("#212121"), fontName="Helvetica",
leading=14, leftIndent=16, bulletIndent=4, spaceBefore=2, spaceAfter=2)
EXAMPLE_STYLE= S("Example", fontSize=10, textColor=colors.HexColor("#1B5E20"), fontName="Helvetica",
leading=14, leftIndent=12, spaceBefore=4, spaceAfter=4)
TIP_STYLE = S("Tip", fontSize=10, textColor=colors.HexColor("#4A148C"), fontName="Helvetica-Bold",
leading=14, leftIndent=12, spaceBefore=4, spaceAfter=4)
TABLE_HDR = S("TableHdr", fontSize=9, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)
TABLE_CELL = S("TableCell", fontSize=9, textColor=BLACK, fontName="Helvetica", alignment=TA_CENTER)
TABLE_LEFT = S("TableLeft", fontSize=9, textColor=BLACK, fontName="Helvetica", alignment=TA_LEFT)
FORMULA = S("Formula", fontSize=11, textColor=RED, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceBefore=6, spaceAfter=6)
SMALL_BODY = S("SmallBody", fontSize=9, textColor=GRAY, fontName="Helvetica", leading=13, spaceBefore=2, spaceAfter=2)
# โโ Helper Flowables โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
class ColorBox(Flowable):
"""A colored background box containing a paragraph."""
def __init__(self, text, bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE,
font="Helvetica-Bold", font_size=10, padding=8, radius=4, width=None):
Flowable.__init__(self)
self.text = text
self.bg = bg
self.border = border
self.text_color= text_color
self.font = font
self.font_size = font_size
self.padding = padding
self.radius = radius
self._width = width
def wrap(self, availW, availH):
self.width = self._width or availW
# estimate height: roughly 14 pts per line
chars_per_line = max(1, int((self.width - 2*self.padding) / (self.font_size * 0.55)))
lines = max(1, math.ceil(len(self.text) / chars_per_line))
self.height = lines * (self.font_size + 4) + 2 * self.padding
return self.width, self.height
def draw(self):
c = self.canv
c.saveState()
c.setFillColor(self.bg)
c.setStrokeColor(self.border)
c.setLineWidth(1)
c.roundRect(0, 0, self.width, self.height, self.radius, fill=1, stroke=1)
c.setFillColor(self.text_color)
c.setFont(self.font, self.font_size)
# simple word-wrap inside box
max_w = self.width - 2 * self.padding
words = self.text.split()
lines, cur = [], ""
for w in words:
test = (cur + " " + w).strip()
if c.stringWidth(test, self.font, self.font_size) <= max_w:
cur = test
else:
if cur: lines.append(cur)
cur = w
if cur: lines.append(cur)
line_h = self.font_size + 4
y = self.height - self.padding - self.font_size
for line in lines:
c.drawCentredString(self.width / 2, y, line)
y -= line_h
c.restoreState()
class ChapterBanner(Flowable):
"""Full-width chapter header banner."""
def __init__(self, number, title, color=DARK_BLUE):
Flowable.__init__(self)
self.number = number
self.title = title
self.color = color
def wrap(self, availW, availH):
self.width = availW
self.height = 52
return self.width, self.height
def draw(self):
c = self.canv
c.saveState()
c.setFillColor(self.color)
c.roundRect(0, 0, self.width, self.height, 6, fill=1, stroke=0)
# chapter number badge
c.setFillColor(ACCENT)
c.circle(30, self.height/2, 18, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 14)
c.drawCentredString(30, self.height/2 - 5, str(self.number))
# title
c.setFont("Helvetica-Bold", 18)
c.drawString(58, self.height/2 - 7, self.title)
c.restoreState()
class SectionLabel(Flowable):
"""Left-bar section label."""
def __init__(self, text, color=MID_BLUE):
Flowable.__init__(self)
self.text = text
self.color = color
def wrap(self, availW, availH):
self.width = availW
self.height = 28
return self.width, self.height
def draw(self):
c = self.canv
c.saveState()
c.setFillColor(self.color)
c.rect(0, 4, 4, self.height - 8, fill=1, stroke=0)
c.setFillColor(self.color)
c.setFont("Helvetica-Bold", 13)
c.drawString(12, 8, self.text)
c.restoreState()
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# DIAGRAM BUILDERS
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
def accounting_equation_diagram():
"""Balance scale showing Assets = Liabilities + Capital"""
d = Drawing(460, 200)
# Title
d.add(String(230, 188, "THE ACCOUNTING EQUATION", fontSize=13,
fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
# Three boxes
box_data = [
(20, 80, 120, 70, GREEN, LIGHT_GREEN, "ASSETS", "โน80,000", "What you OWN\n(Bike, Cash, Stock)"),
(170, 80, 120, 70, RED, LIGHT_RED, "LIABILITIES", "โน50,000", "What you OWE\n(Bank Loan)"),
(320, 80, 120, 70, PURPLE, LIGHT_PURPLE,"CAPITAL", "โน30,000", "Owner's Money\n(Your Savings)"),
]
for x, y, w, h, bc, bg, lbl, amt, desc in box_data:
d.add(Rect(x, y, w, h, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
d.add(String(x+w/2, y+h-14, lbl, fontSize=11, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=bc))
d.add(String(x+w/2, y+h-30, amt, fontSize=13, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=colors.HexColor("#212121")))
for i, line in enumerate(desc.split("\n")):
d.add(String(x+w/2, y+h-46-(i*13), line, fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
# Equals and Plus signs
d.add(String(148, 112, "=", fontSize=24, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=ACCENT))
d.add(String(298, 112, "+", fontSize=24, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=ACCENT))
# Bottom arrow / balance line
d.add(Line(20, 72, 440, 72, strokeColor=DARK_BLUE, strokeWidth=1.5))
d.add(String(230, 58, "Both sides ALWAYS balance โ like a weighing scale!",
fontSize=9, fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
return d
def three_accounts_diagram():
"""Three boxes for Personal / Real / Nominal with rules."""
d = Drawing(460, 220)
d.add(String(230, 210, "THREE TYPES OF ACCOUNTS & GOLDEN RULES",
fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
boxes = [
(10, 60, 140, 130, MID_BLUE, LIGHT_BLUE, "PERSONAL A/C",
["Persons, Firms,", "Banks, Companies"],
"Dr: RECEIVER", "Cr: GIVER",
"Example: Ravi owes you money"),
(160, 60, 140, 130, GREEN, LIGHT_GREEN, "REAL A/C",
["Physical Assets:", "Cash, Stock, Building"],
"Dr: COMES IN", "Cr: GOES OUT",
"Example: Cash received"),
(310, 60, 140, 130, PURPLE, LIGHT_PURPLE, "NOMINAL A/C",
["Expenses, Income,", "Losses, Gains"],
"Dr: EXPENSES/LOSS", "Cr: INCOME/GAIN",
"Example: Rent paid"),
]
for x, y, w, h, bc, bg, title, desc_lines, dr_rule, cr_rule, eg in boxes:
d.add(Rect(x, y, w, h, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
# header strip
d.add(Rect(x, y+h-22, w, 22, rx=4, ry=4, fillColor=bc, strokeColor=bc, strokeWidth=0))
d.add(String(x+w/2, y+h-15, title, fontSize=10, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
# description
for i, line in enumerate(desc_lines):
d.add(String(x+w/2, y+h-38-(i*13), line, fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=colors.HexColor("#212121")))
# rules
d.add(Rect(x+6, y+44, w-12, 16, rx=3, ry=3, fillColor=bc, strokeColor=bc, strokeWidth=0))
d.add(String(x+w/2, y+47, dr_rule, fontSize=8, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
d.add(Rect(x+6, y+24, w-12, 16, rx=3, ry=3, fillColor=colors.HexColor("#78909C"),
strokeColor=colors.HexColor("#78909C"), strokeWidth=0))
d.add(String(x+w/2, y+27, cr_rule, fontSize=8, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
d.add(String(x+w/2, y+10, eg, fontSize=7.5, fontName="Helvetica-Oblique",
textAnchor="middle", fillColor=GRAY))
return d
def accounting_cycle_diagram():
"""Circular flow: Source Docs โ Journal โ Ledger โ Trial Balance โ Final Accounts."""
d = Drawing(460, 220)
d.add(String(230, 210, "THE ACCOUNTING CYCLE",
fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
steps = [
(230, 140, "1. Source\nDocuments", MID_BLUE),
(340, 100, "2. Journal\nEntry", GREEN),
(370, 40, "3. Ledger\nPosting", PURPLE),
(270, 15, "4. Trial\nBalance", TEAL),
(155, 15, "5. Final\nAccounts", RED),
(100, 70, "6. Analysis\n& Reports", ACCENT),
]
# Draw connecting arrows first (behind boxes)
coords = [(s[0], s[1]) for s in steps]
for i in range(len(coords)):
x1, y1 = coords[i][0]+30, coords[i][1]+15
x2, y2 = coords[(i+1)%len(coords)][0]-10, coords[(i+1)%len(coords)][1]+15
d.add(Line(x1, y1, x2, y2, strokeColor=LIGHT_GRAY, strokeWidth=2))
for cx, cy, label, col in steps:
d.add(Rect(cx-38, cy, 76, 38, rx=5, ry=5, fillColor=col, strokeColor=col, strokeWidth=0))
for i, line in enumerate(label.split("\n")):
d.add(String(cx, cy+28-(i*14), line, fontSize=8.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
d.add(String(230, 2, "Cycle repeats every accounting period (month / year)",
fontSize=8, fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
return d
def final_accounts_diagram():
"""Flow diagram: Trading A/c โ P&L A/c โ Balance Sheet."""
d = Drawing(460, 200)
d.add(String(230, 192, "FLOW OF FINAL ACCOUNTS",
fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
# Box 1 - Trading Account
d.add(Rect(10, 90, 130, 90, rx=6, ry=6, fillColor=LIGHT_GREEN, strokeColor=GREEN, strokeWidth=2))
d.add(Rect(10, 158, 130, 22, rx=4, ry=4, fillColor=GREEN, strokeColor=GREEN, strokeWidth=0))
d.add(String(75, 164, "TRADING ACCOUNT", fontSize=8.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
items1 = ["Sales", "(-) Cost of Goods Sold", "= GROSS PROFIT"]
for i, item in enumerate(items1):
bold = "Bold" if i == 2 else ""
d.add(String(75, 148 - i*18, item, fontSize=8.5, fontName=f"Helvetica-{bold}" if bold else "Helvetica",
textAnchor="middle",
fillColor=GREEN if i==2 else colors.HexColor("#212121")))
# Arrow 1
d.add(Line(140, 135, 165, 135, strokeColor=ACCENT, strokeWidth=2))
d.add(String(152, 142, "Gross\nProfit", fontSize=7.5, fontName="Helvetica",
textAnchor="middle", fillColor=ACCENT))
# Box 2 - P&L
d.add(Rect(165, 90, 130, 90, rx=6, ry=6, fillColor=LIGHT_YELLOW, strokeColor=YELLOW, strokeWidth=2))
d.add(Rect(165, 158, 130, 22, rx=4, ry=4, fillColor=YELLOW, strokeColor=YELLOW, strokeWidth=0))
d.add(String(230, 164, "PROFIT & LOSS A/C", fontSize=8.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=colors.HexColor("#212121")))
items2 = ["Gross Profit", "(-) Expenses", "= NET PROFIT"]
for i, item in enumerate(items2):
bold = "Bold" if i == 2 else ""
d.add(String(230, 148 - i*18, item, fontSize=8.5, fontName=f"Helvetica-{bold}" if bold else "Helvetica",
textAnchor="middle",
fillColor=RED if i==2 else colors.HexColor("#212121")))
# Arrow 2
d.add(Line(295, 135, 320, 135, strokeColor=ACCENT, strokeWidth=2))
d.add(String(307, 142, "Net\nProfit", fontSize=7.5, fontName="Helvetica",
textAnchor="middle", fillColor=ACCENT))
# Box 3 - Balance Sheet
d.add(Rect(320, 90, 130, 90, rx=6, ry=6, fillColor=LIGHT_BLUE, strokeColor=MID_BLUE, strokeWidth=2))
d.add(Rect(320, 158, 130, 22, rx=4, ry=4, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
d.add(String(385, 164, "BALANCE SHEET", fontSize=8.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
items3 = ["LIABILITIES | ASSETS", "Capital | Fixed Assets",
"Loans | Current Assets"]
for i, item in enumerate(items3):
d.add(String(385, 148 - i*18, item, fontSize=7.5, fontName="Helvetica",
textAnchor="middle", fillColor=colors.HexColor("#212121")))
# Bottom note
d.add(String(230, 78, "Assets = Liabilities + Capital (Balance Sheet always balances!)",
fontSize=8.5, fontName="Helvetica-Bold", textAnchor="middle", fillColor=MID_BLUE))
return d
def depreciation_diagram():
"""Bar chart showing SLM vs WDV over 5 years."""
d = Drawing(460, 200)
d.add(String(230, 192, "DEPRECIATION: SLM vs WDV (โน20,000 asset, 20% p.a.)",
fontSize=11, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
years = ["Yr 1", "Yr 2", "Yr 3", "Yr 4", "Yr 5"]
slm = [4000, 4000, 4000, 4000, 4000]
wdv = [4000, 3200, 2560, 2048, 1638]
bar_w = 28
gap = 10
group_w = 2*bar_w + gap
x_start = 60
max_val = 5000
chart_h = 130
y_base = 30
# Y-axis
d.add(Line(x_start-5, y_base, x_start-5, y_base+chart_h, strokeColor=GRAY, strokeWidth=1))
for v in [0, 1000, 2000, 3000, 4000, 5000]:
y = y_base + (v/max_val)*chart_h
d.add(Line(x_start-8, y, x_start-5, y, strokeColor=GRAY, strokeWidth=1))
d.add(String(x_start-10, y-4, f"โน{v//1000}K", fontSize=7, fontName="Helvetica",
textAnchor="end", fillColor=GRAY))
for i, yr in enumerate(years):
x_group = x_start + i*(group_w + 18)
# SLM bar
h_slm = (slm[i]/max_val)*chart_h
d.add(Rect(x_group, y_base, bar_w, h_slm, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
d.add(String(x_group+bar_w/2, y_base+h_slm+3, f"โน{slm[i]//1000}K",
fontSize=7, fontName="Helvetica-Bold", textAnchor="middle", fillColor=MID_BLUE))
# WDV bar
h_wdv = (wdv[i]/max_val)*chart_h
d.add(Rect(x_group+bar_w+4, y_base, bar_w, h_wdv, fillColor=ACCENT, strokeColor=ACCENT, strokeWidth=0))
d.add(String(x_group+bar_w+4+bar_w/2, y_base+h_wdv+3, f"โน{wdv[i]//1000:.1f}K",
fontSize=7, fontName="Helvetica-Bold", textAnchor="middle", fillColor=ACCENT))
# Year label
d.add(String(x_group+bar_w+2, y_base-12, yr, fontSize=8.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=GRAY))
# Legend
d.add(Rect(320, 168, 14, 12, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
d.add(String(338, 172, "SLM (Fixed โน4,000/yr)", fontSize=8, fontName="Helvetica",
textAnchor="start", fillColor=MID_BLUE))
d.add(Rect(320, 152, 14, 12, fillColor=ACCENT, strokeColor=ACCENT, strokeWidth=0))
d.add(String(338, 156, "WDV (Reducing balance)", fontSize=8, fontName="Helvetica",
textAnchor="start", fillColor=ACCENT))
return d
def ratio_analysis_diagram():
"""Visual dashboard of key ratios."""
d = Drawing(460, 200)
d.add(String(230, 192, "RATIO ANALYSIS DASHBOARD",
fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
ratios = [
(30, 80, "CURRENT\nRATIO", "2:1", "Ideal", MID_BLUE, LIGHT_BLUE,
"Can we pay\nshort-term debts?"),
(140, 80, "GROSS PROFIT\nRATIO", "25%", "Higher=Better", GREEN, LIGHT_GREEN,
"Profit from\nselling goods"),
(265, 80, "NET PROFIT\nRATIO", "10%", "Higher=Better", PURPLE, LIGHT_PURPLE,
"Final profit\nafter expenses"),
(375, 80, "DEBT-EQUITY\nRATIO", "1:1", "Ideal", TEAL, LIGHT_TEAL,
"Borrowed vs\nOwned money"),
]
for x, y, title, value, note, bc, bg, desc in ratios:
d.add(Rect(x, y, 90, 100, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
# title strip
d.add(Rect(x, y+78, 90, 22, rx=4, ry=4, fillColor=bc, strokeColor=bc, strokeWidth=0))
for j, line in enumerate(title.split("\n")):
d.add(String(x+45, y+93-(j*13), line, fontSize=8, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
# big value
d.add(String(x+45, y+55, value, fontSize=16, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=bc))
# note
d.add(Rect(x+8, y+38, 74, 14, rx=3, ry=3, fillColor=bc, strokeColor=bc, strokeWidth=0))
d.add(String(x+45, y+41, note, fontSize=7.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
# description
for j, line in enumerate(desc.split("\n")):
d.add(String(x+45, y+25-(j*12), line, fontSize=7.5, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
return d
def brs_diagram():
"""BRS reconciliation flow."""
d = Drawing(460, 190)
d.add(String(230, 182, "BANK RECONCILIATION STATEMENT (BRS)",
fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
# Left box: Cash Book
d.add(Rect(20, 60, 130, 100, rx=6, ry=6, fillColor=LIGHT_GREEN, strokeColor=GREEN, strokeWidth=2))
d.add(Rect(20, 138, 130, 22, rx=4, ry=4, fillColor=GREEN, strokeColor=GREEN, strokeWidth=0))
d.add(String(85, 144, "YOUR CASH BOOK", fontSize=9, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
d.add(String(85, 124, "Balance: โน10,500", fontSize=10, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=GREEN))
d.add(String(85, 108, "(Your personal record)", fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
d.add(String(85, 90, "Like your phone's", fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
d.add(String(85, 78, "transaction history", fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
# Middle: differences
d.add(Rect(175, 60, 110, 100, rx=6, ry=6, fillColor=LIGHT_YELLOW, strokeColor=YELLOW, strokeWidth=2))
d.add(Rect(175, 138, 110, 22, rx=4, ry=4, fillColor=YELLOW, strokeColor=YELLOW, strokeWidth=0))
d.add(String(230, 144, "DIFFERENCES", fontSize=9, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=colors.HexColor("#212121")))
reasons = ["โข Uncashed cheques", "โข Bank charges", "โข Deposits in transit", "โข Errors"]
for i, r in enumerate(reasons):
d.add(String(185, 124-(i*16), r, fontSize=8, fontName="Helvetica",
textAnchor="start", fillColor=colors.HexColor("#212121")))
# Right box: Bank Passbook
d.add(Rect(310, 60, 130, 100, rx=6, ry=6, fillColor=LIGHT_BLUE, strokeColor=MID_BLUE, strokeWidth=2))
d.add(Rect(310, 138, 130, 22, rx=4, ry=4, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
d.add(String(375, 144, "BANK PASSBOOK", fontSize=9, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
d.add(String(375, 124, "Balance: โน10,000", fontSize=10, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=MID_BLUE))
d.add(String(375, 108, "(Bank's record)", fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
d.add(String(375, 90, "Like the ATM", fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
d.add(String(375, 78, "mini-statement", fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
# Arrows
d.add(Line(150, 110, 175, 110, strokeColor=ACCENT, strokeWidth=2))
d.add(Line(285, 110, 310, 110, strokeColor=ACCENT, strokeWidth=2))
# Bottom
d.add(String(230, 45, "BRS explains the โน500 difference โ Both records are correct!",
fontSize=9, fontName="Helvetica-Bold", textAnchor="middle", fillColor=MID_BLUE))
return d
def cost_types_diagram():
"""Visual of Fixed / Variable / Semi-variable costs with examples."""
d = Drawing(460, 200)
d.add(String(230, 192, "TYPES OF COSTS",
fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))
data = [
(15, 70, 130, 100, GREEN, LIGHT_GREEN, "FIXED COST",
"Same every month", "Factory Rent", "โน10,000 / month\nregardless of output"),
(165, 70, 130, 100, PURPLE, LIGHT_PURPLE, "VARIABLE COST",
"Changes with output", "Raw Material", "More production =\nMore cost"),
(315, 70, 130, 100, TEAL, LIGHT_TEAL, "SEMI-VARIABLE",
"Partly fixed+variable", "Electricity Bill", "Base charge +\nUsage charge"),
]
for x, y, w, h, bc, bg, title, sub, eg_title, eg_desc in data:
d.add(Rect(x, y, w, h, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
d.add(Rect(x, y+h-22, w, 22, rx=4, ry=4, fillColor=bc, strokeColor=bc, strokeWidth=0))
d.add(String(x+w/2, y+h-13, title, fontSize=9, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
d.add(String(x+w/2, y+h-36, sub, fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=GRAY))
d.add(Rect(x+10, y+40, w-20, 16, rx=3, ry=3, fillColor=bc, strokeColor=bc, strokeWidth=0))
d.add(String(x+w/2, y+44, eg_title, fontSize=8.5, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=WHITE))
for i, line in enumerate(eg_desc.split("\n")):
d.add(String(x+w/2, y+28-(i*12), line, fontSize=8, fontName="Helvetica",
textAnchor="middle", fillColor=colors.HexColor("#212121")))
# Opportunity & Sunk cost boxes at bottom
d.add(Rect(15, 10, 200, 52, rx=4, ry=4, fillColor=LIGHT_RED, strokeColor=RED, strokeWidth=1.5))
d.add(String(115, 52, "OPPORTUNITY COST", fontSize=9, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=RED))
d.add(String(115, 38, "What you GIVE UP by choosing one option", fontSize=7.5,
fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
d.add(String(115, 24, "e.g. FD interest lost by investing in business", fontSize=7.5,
fontName="Helvetica-Oblique", textAnchor="middle", fillColor=colors.HexColor("#212121")))
d.add(Rect(245, 10, 200, 52, rx=4, ry=4, fillColor=LIGHT_GRAY, strokeColor=GRAY, strokeWidth=1.5))
d.add(String(345, 52, "SUNK COST", fontSize=9, fontName="Helvetica-Bold",
textAnchor="middle", fillColor=GRAY))
d.add(String(345, 38, "Money already spent โ can't be recovered", fontSize=7.5,
fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
d.add(String(345, 24, "IGNORE sunk costs in future decisions!", fontSize=7.5,
fontName="Helvetica-Bold", textAnchor="middle", fillColor=RED))
return d
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# TABLE BUILDERS
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
def styled_table(data, col_widths, header_color=DARK_BLUE, alt_color=LIGHT_BLUE):
"""Create a styled table with alternating rows."""
ts = TableStyle([
("BACKGROUND", (0, 0), (-1, 0), header_color),
("TEXTCOLOR", (0, 0), (-1, 0), WHITE),
("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"),
("FONTSIZE", (0, 0), (-1, 0), 9),
("ALIGN", (0, 0), (-1, 0), "CENTER"),
("BOTTOMPADDING",(0, 0), (-1, 0), 8),
("TOPPADDING", (0, 0), (-1, 0), 8),
("FONTNAME", (0, 1), (-1, -1), "Helvetica"),
("FONTSIZE", (0, 1), (-1, -1), 9),
("ALIGN", (0, 1), (-1, -1), "CENTER"),
("TOPPADDING", (0, 1), (-1, -1), 6),
("BOTTOMPADDING",(0, 1), (-1, -1), 6),
("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#B0BEC5")),
("ROWBACKGROUNDS",(0,1), (-1,-1), [WHITE, alt_color]),
("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
])
t = Table(data, colWidths=col_widths)
t.setStyle(ts)
return t
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# PAGE TEMPLATE
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
def on_page(canvas, doc):
"""Header + footer on every page."""
canvas.saveState()
# Top bar
canvas.setFillColor(DARK_BLUE)
canvas.rect(0, PAGE_H - 28, PAGE_W, 28, fill=1, stroke=0)
canvas.setFillColor(WHITE)
canvas.setFont("Helvetica-Bold", 9)
canvas.drawString(20, PAGE_H - 18, "BASIC ACCOUNTING FOR MANAGERS | MBA Sem I | Dr. MGR University")
canvas.setFont("Helvetica", 8)
canvas.drawRightString(PAGE_W - 20, PAGE_H - 18, f"Page {doc.page}")
# Bottom bar
canvas.setFillColor(ACCENT)
canvas.rect(0, 0, PAGE_W, 18, fill=1, stroke=0)
canvas.setFillColor(WHITE)
canvas.setFont("Helvetica", 7.5)
canvas.drawCentredString(PAGE_W/2, 5, "Study Smart โข Exam: 16 August 2026 โข Good Luck!")
canvas.restoreState()
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CONTENT BUILDER
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
def build_pdf():
path = "/tmp/workspace/accounting-study-guide/Basic_Accounting_Study_Guide.pdf"
doc = SimpleDocTemplate(
path, pagesize=A4,
leftMargin=1.5*cm, rightMargin=1.5*cm,
topMargin=1.8*cm, bottomMargin=1.5*cm,
title="Basic Accounting for Managers - Study Guide",
author="Dr. MGR University MBA",
)
story = []
W = PAGE_W - 3*cm # usable width
# โโ COVER PAGE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
class CoverPage(Flowable):
def wrap(self, aW, aH): self.width=aW; self.height=aH; return aW, aH
def draw(self):
c = self.canv
c.saveState()
# gradient-ish background
c.setFillColor(DARK_BLUE)
c.rect(0, 0, self.width, self.height, fill=1, stroke=0)
# decorative circles
c.setFillColor(colors.HexColor("#1565C0"))
c.circle(self.width*0.85, self.height*0.8, 120, fill=1, stroke=0)
c.setFillColor(colors.HexColor("#0D47A1"))
c.circle(self.width*0.1, self.height*0.2, 80, fill=1, stroke=0)
# accent strip
c.setFillColor(ACCENT)
c.rect(0, self.height*0.45-3, self.width, 6, fill=1, stroke=0)
# institution
c.setFillColor(LIGHT_BLUE)
c.setFont("Helvetica", 11)
c.drawCentredString(self.width/2, self.height*0.82, "Dr. M.G.R. Educational and Research Institute")
c.drawCentredString(self.width/2, self.height*0.78, "MBA (Online) โข I Semester โข Batch 2026 A")
# Course code badge
c.setFillColor(ACCENT)
c.roundRect(self.width/2-55, self.height*0.68, 110, 28, 6, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 12)
c.drawCentredString(self.width/2, self.height*0.683, "MMBA22003")
# Main title
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 30)
c.drawCentredString(self.width/2, self.height*0.56, "BASIC ACCOUNTING")
c.setFont("Helvetica-Bold", 26)
c.drawCentredString(self.width/2, self.height*0.50, "FOR MANAGERS")
# Subtitle
c.setFillColor(LIGHT_BLUE)
c.setFont("Helvetica", 13)
c.drawCentredString(self.width/2, self.height*0.42, "Comprehensive Study Guide with Diagrams & Real-Life Examples")
# Exam info box
c.setFillColor(colors.HexColor("#0D47A1"))
c.roundRect(self.width/2-130, self.height*0.27, 260, 70, 8, fill=1, stroke=0)
c.setFillColor(ACCENT)
c.setFont("Helvetica-Bold", 11)
c.drawCentredString(self.width/2, self.height*0.35, "EXAM DATE: 16 AUGUST 2026")
c.setFillColor(WHITE)
c.setFont("Helvetica", 10)
c.drawCentredString(self.width/2, self.height*0.32, "Session: Forenoon โข Time: 10:00 AM โ 1:00 PM")
c.drawCentredString(self.width/2, self.height*0.29, "Topics Covered: All 10 Key Chapters")
# Bottom
c.setFillColor(LIGHT_BLUE)
c.setFont("Helvetica", 9)
c.drawCentredString(self.width/2, self.height*0.06, "Study Smart โข Understand Concepts โข Ace Your Exam!")
c.restoreState()
story.append(CoverPage())
story.append(PageBreak())
# โโ TABLE OF CONTENTS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(SectionLabel("TABLE OF CONTENTS", DARK_BLUE))
story.append(Spacer(1, 6))
toc_data = [
["#", "Topic", "Exam Weight"],
["1", "What is Accounting? + The Accounting Equation", "โ
โ
โ
โ
โ"],
["2", "Types of Accounts & Golden Rules", "โ
โ
โ
โ
โ
"],
["3", "Journal Entries", "โ
โ
โ
โ
โ
"],
["4", "Ledger Posting", "โ
โ
โ
โโ"],
["5", "Trial Balance", "โ
โ
โ
โ
โ"],
["6", "Final Accounts (Trading, P&L, Balance Sheet)", "โ
โ
โ
โ
โ
"],
["7", "Depreciation (SLM & WDV)", "โ
โ
โ
โ
โ"],
["8", "Bank Reconciliation Statement (BRS)", "โ
โ
โ
โ
โ"],
["9", "Ratio Analysis", "โ
โ
โ
โ
โ
"],
["10","Cost Concepts", "โ
โ
โ
โโ"],
["11","Quick Revision Summary + Memory Tricks", "โ"],
]
toc = styled_table(toc_data,
[0.6*cm, 11*cm, 3.4*cm],
header_color=DARK_BLUE)
story.append(toc)
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 1 โ What is Accounting + Accounting Equation
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(1, "What is Accounting? & The Accounting Equation", DARK_BLUE))
story.append(Spacer(1, 8))
story.append(SectionLabel("What is Accounting?", MID_BLUE))
story.append(Paragraph(
"Accounting is the process of <b>recording, classifying, summarising</b> and <b>interpreting</b> "
"financial transactions of a business, so that managers can make good decisions.",
BODY))
story.append(ColorBox(
"๐ Real-Life Example: Think of your monthly household budget. "
"You write down salary received, rent paid, groceries bought. "
"At month-end you check what's left. That is personal accounting! "
"Business accounting does the same โ just more formally.",
bg=LIGHT_GREEN, border=GREEN, text_color=colors.HexColor("#1B5E20"),
font_size=9))
story.append(Spacer(1, 6))
story.append(SectionLabel("The Accounting Equation", MID_BLUE))
story.append(Paragraph(
"The most fundamental rule in accounting. <b>It always holds true</b> โ no matter what transaction occurs.",
BODY))
story.append(ColorBox("ASSETS = LIABILITIES + CAPITAL (Owner's Equity)",
bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE,
font="Helvetica-Bold", font_size=13))
story.append(Spacer(1, 8))
story.append(accounting_equation_diagram())
story.append(Spacer(1, 8))
story.append(SectionLabel("Key Definitions", MID_BLUE))
defs = [
["Term", "Simple Definition", "Real-Life Example"],
["Assets", "Things a business OWNS or is owed", "Cash, building, stock, debtors"],
["Liabilities", "Things a business OWES to others", "Bank loan, creditors"],
["Capital", "Owner's investment in the business", "Money you put in to start the shop"],
["Revenue", "Income earned from business activity", "Sales of goods/services"],
["Expenses", "Costs incurred to earn revenue", "Rent, salaries, electricity"],
]
story.append(styled_table(defs, [3*cm, 5.5*cm, 6.5*cm]))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 2 โ Types of Accounts & Golden Rules
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(2, "Types of Accounts & Golden Rules", GREEN))
story.append(Spacer(1, 8))
story.append(Paragraph(
"Every transaction affects at least <b>two accounts</b> (Double Entry System). "
"To know which account to debit and which to credit, we first classify the account.",
BODY))
story.append(Spacer(1, 6))
story.append(three_accounts_diagram())
story.append(Spacer(1, 10))
story.append(SectionLabel("Golden Rules - Summary Table", MID_BLUE))
rules = [
["Account Type", "DEBIT (Dr)", "CREDIT (Cr)", "Memory Trick"],
["Personal", "The Receiver", "The Giver", "Who got the money? Debit them!"],
["Real", "What comes IN", "What goes OUT", "Cash comes in โ Debit Cash"],
["Nominal", "Expenses & Losses", "Incomes & Gains", "You paid rent โ Debit Rent"],
]
story.append(styled_table(rules, [3.5*cm, 3.5*cm, 3.5*cm, 4.5*cm], header_color=GREEN))
story.append(Spacer(1, 10))
story.append(ColorBox(
"๐ฑ Life Example for Golden Rules: "
"You pay โน5,000 rent in cash. "
"Rent = Nominal (Expense) โ DEBIT Rent A/c. "
"Cash = Real (goes out) โ CREDIT Cash A/c.",
bg=LIGHT_GREEN, border=GREEN, text_color=colors.HexColor("#1B5E20"), font_size=9))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 3 โ Journal Entries
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(3, "Journal Entries", PURPLE))
story.append(Spacer(1, 8))
story.append(Paragraph(
"A <b>Journal</b> is the book of original (first) entry. "
"Every transaction is recorded here in chronological order, "
"showing which account is debited and which is credited.",
BODY))
story.append(SectionLabel("Format of a Journal Entry", MID_BLUE))
jfmt = [
["Date", "Particulars", "L.F.", "Dr. Amount (โน)", "Cr. Amount (โน)"],
["01/08/26", "Cash A/c Dr.\n To Sales A/c\n(Being goods sold for cash)", "-", "10,000", "10,000"],
]
story.append(styled_table(jfmt, [2.5*cm, 6.5*cm, 1.2*cm, 2.8*cm, 2*cm], header_color=PURPLE))
story.append(Spacer(1, 8))
story.append(SectionLabel("5 Common Journal Entries (Exam Favourites!)", MID_BLUE))
entries = [
["Transaction", "Dr. Account", "Cr. Account", "Real-Life Scenario"],
["Started business with cash โน1,00,000",
"Cash A/c", "Capital A/c", "You invest your savings"],
["Bought goods for cash โน20,000",
"Purchases A/c", "Cash A/c", "Shopkeeper buys stock"],
["Sold goods on credit to Ram โน15,000",
"Ram A/c (Debtor)", "Sales A/c", "Gave goods, payment later"],
["Paid rent โน5,000 by cheque",
"Rent A/c", "Bank A/c", "Monthly shop rent payment"],
["Received commission โน2,000",
"Cash A/c", "Commission A/c", "Earned referral bonus"],
]
story.append(styled_table(entries,
[4.5*cm, 3*cm, 3*cm, 4.5*cm], header_color=PURPLE))
story.append(Spacer(1, 8))
story.append(SectionLabel("The Accounting Cycle", MID_BLUE))
story.append(accounting_cycle_diagram())
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 4 โ Ledger
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(4, "Ledger Posting", MID_BLUE))
story.append(Spacer(1, 8))
story.append(Paragraph(
"A <b>Ledger</b> is the book of final entry. After journalising, every entry is "
"'posted' to its respective account in the ledger. "
"Think of it as individual folders for each account.",
BODY))
story.append(ColorBox(
"๐ Real-Life: A shopkeeper keeps a separate notebook page for each customer. "
"Ravi's page shows all amounts he owes. "
"The cash page shows all cash in/out. "
"This collection of pages = Ledger.",
bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE, font_size=9))
story.append(Spacer(1, 8))
story.append(SectionLabel("Format of a Ledger Account (T-Format)", MID_BLUE))
ledger = [
["Dr Side", "", "", "CASH ACCOUNT", "Cr Side", "", ""],
["Date", "Particulars", "โน", " ", "Date", "Particulars", "โน"],
["01 Aug", "Capital A/c\n(Started business)", "1,00,000", " ",
"05 Aug", "Purchases A/c\n(Bought goods)", "20,000"],
["", "", "", " ", "10 Aug", "Rent A/c", "5,000"],
["", "Balance c/d", "75,000", " ", "", "", ""],
["", "Total", "1,00,000", " ", "", "Total", "1,00,000"],
]
lt = Table(ledger, colWidths=[1.8*cm, 3.8*cm, 2*cm, 0.5*cm, 1.8*cm, 3.8*cm, 2*cm])
lt.setStyle(TableStyle([
("SPAN", (0,0),(2,0)),
("SPAN", (4,0),(6,0)),
("BACKGROUND", (0,0),(2,0), GREEN),
("BACKGROUND", (4,0),(6,0), RED),
("BACKGROUND", (0,1),(2,1), LIGHT_GREEN),
("BACKGROUND", (4,1),(6,1), LIGHT_RED),
("TEXTCOLOR", (0,0),(2,0), WHITE),
("TEXTCOLOR", (4,0),(6,0), WHITE),
("FONTNAME", (0,0),(-1,1), "Helvetica-Bold"),
("FONTSIZE", (0,0),(-1,-1), 8.5),
("ALIGN", (0,0),(-1,-1), "CENTER"),
("GRID", (0,0),(-1,-1), 0.5, colors.HexColor("#B0BEC5")),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("BACKGROUND", (0,4),(2,4), LIGHT_GRAY),
("BACKGROUND", (4,4),(6,4), LIGHT_GRAY),
("BACKGROUND", (0,5),(2,5), LIGHT_BLUE),
("BACKGROUND", (4,5),(6,5), LIGHT_BLUE),
("FONTNAME", (0,5),(-1,5), "Helvetica-Bold"),
]))
story.append(lt)
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 5 โ Trial Balance
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(5, "Trial Balance", TEAL))
story.append(Spacer(1, 8))
story.append(Paragraph(
"A <b>Trial Balance</b> is a statement prepared at the end of a period listing all "
"ledger account balances in two columns - Debit and Credit. "
"If Total Dr = Total Cr, the books are arithmetically correct.",
BODY))
story.append(ColorBox(
"โ๏ธ Real-Life: Like checking if both sides of a weighing scale balance. "
"Every debit has a matching credit. If the scale tips, something is wrong!",
bg=LIGHT_TEAL, border=TEAL, text_color=TEAL, font_size=9))
story.append(Spacer(1, 8))
story.append(SectionLabel("Sample Trial Balance", MID_BLUE))
tb_data = [
["Account Name", "Debit Balance (โน)", "Credit Balance (โน)"],
["Capital A/c", "โ", "1,00,000"],
["Cash A/c", "75,000", "โ"],
["Purchases A/c", "20,000", "โ"],
["Sales A/c", "โ", "15,000"],
["Rent A/c", "5,000", "โ"],
["Furniture A/c", "15,000", "โ"],
["TOTAL", "1,15,000", "1,15,000"],
]
tb = styled_table(tb_data, [7*cm, 4*cm, 4*cm], header_color=TEAL)
tb.setStyle(TableStyle([
("BACKGROUND", (0,7),(-1,7), TEAL),
("TEXTCOLOR", (0,7),(-1,7), WHITE),
("FONTNAME", (0,7),(-1,7), "Helvetica-Bold"),
]))
story.append(tb)
story.append(Spacer(1, 8))
story.append(SectionLabel("Errors Detected & NOT Detected by Trial Balance", MID_BLUE))
err_data = [
["TB Will Catch (Arithmetic Errors)", "TB Will NOT Catch"],
["Wrong totals", "Error of omission (forgot to record)"],
["Missing entry on one side", "Error of commission (wrong account, same type)"],
["Unequal debit/credit amounts", "Compensating errors"],
["Wrong carry-forward balance", "Error of principle (wrong account type)"],
]
story.append(styled_table(err_data, [7*cm, 8*cm],
header_color=TEAL, alt_color=LIGHT_TEAL))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 6 โ Final Accounts
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(6, "Final Accounts (Trading, P&L, Balance Sheet)", RED))
story.append(Spacer(1, 8))
story.append(Paragraph(
"Final accounts are prepared at the end of the accounting year to find out "
"<b>profit/loss</b> and the <b>financial position</b> of the business.",
BODY))
story.append(Spacer(1, 4))
story.append(final_accounts_diagram())
story.append(Spacer(1, 8))
story.append(SectionLabel("1. Trading Account - Finding Gross Profit", MID_BLUE))
trade = [
["Dr Side (Expenses/Costs)", "โน", "Cr Side (Income)", "โน"],
["Opening Stock", "10,000", "Sales", "80,000"],
["Purchases", "40,000", "Closing Stock", "15,000"],
["Direct Expenses", "5,000", "", ""],
["Gross Profit (balancing figure)", "40,000", "", ""],
["TOTAL", "95,000", "TOTAL", "95,000"],
]
story.append(styled_table(trade, [6cm, 2.5*cm, 5*cm, 1.5*cm], header_color=GREEN))
story.append(Spacer(1, 8))
story.append(SectionLabel("2. Profit & Loss Account - Finding Net Profit", MID_BLUE))
pl = [
["Dr Side (Expenses)", "โน", "Cr Side (Income)", "โน"],
["Salaries", "12,000", "Gross Profit b/d", "40,000"],
["Rent", "6,000", "Commission Received", "2,000"],
["Electricity", "2,000", "", ""],
["Depreciation", "2,000", "", ""],
["Net Profit (balancing figure)", "20,000", "", ""],
["TOTAL", "42,000", "TOTAL", "42,000"],
]
story.append(styled_table(pl, [6*cm, 2.5*cm, 5*cm, 1.5*cm], header_color=YELLOW,
alt_color=LIGHT_YELLOW))
story.append(Spacer(1, 8))
story.append(SectionLabel("3. Balance Sheet - Financial Position", MID_BLUE))
bs = [
["LIABILITIES", "โน", "ASSETS", "โน"],
["Capital", "1,00,000", "Fixed Assets", ""],
["(+) Net Profit", "20,000", " Building", "60,000"],
["(=) Capital Total", "1,20,000", " Furniture", "20,000"],
["Bank Loan", "30,000", "Current Assets", ""],
["Creditors", "10,000", " Stock (Closing)", "15,000"],
["", "", " Debtors", "40,000"],
["", "", " Cash & Bank", "25,000"],
["TOTAL", "1,60,000", "TOTAL", "1,60,000"],
]
story.append(styled_table(bs, [5*cm, 2.5*cm, 5*cm, 2.5*cm], header_color=MID_BLUE))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 7 โ Depreciation
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(7, "Depreciation", ACCENT))
story.append(Spacer(1, 8))
story.append(Paragraph(
"<b>Depreciation</b> is the gradual decrease in the value of a fixed asset due to "
"use, wear & tear, or passage of time. It is recorded as an expense in P&L.",
BODY))
story.append(ColorBox(
"๐ฑ Real-Life: You buy a laptop for โน60,000. After 3 years it's worth โน20,000. "
"The โน40,000 reduction in value is depreciation. "
"Businesses record this loss every year.",
bg=LIGHT_YELLOW, border=YELLOW, text_color=colors.HexColor("#4A148C"), font_size=9))
story.append(Spacer(1, 8))
story.append(SectionLabel("Two Main Methods Compared", MID_BLUE))
dep_compare = [
["Feature", "Straight Line Method (SLM)", "Written Down Value (WDV)"],
["Also called", "Fixed Instalment Method", "Reducing Balance Method"],
["Depreciation amount", "Same every year (Fixed)", "Decreasing every year"],
["Formula", "Cost - Scrap Value\nรท Useful Life", "Rate % ร Book Value each year"],
["Example\n(โน20,000 asset, 20%)", "โน4,000 every year", "โน4,000 โ โน3,200 โ โน2,560โฆ"],
["Best for", "Simple assets (furniture)", "Machines, vehicles"],
["Net Book Value", "Reduces uniformly to zero", "Never exactly zero"],
]
story.append(styled_table(dep_compare, [3.5*cm, 5*cm, 6.5*cm], header_color=ACCENT,
alt_color=LIGHT_YELLOW))
story.append(Spacer(1, 8))
story.append(depreciation_diagram())
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 8 โ BRS
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(8, "Bank Reconciliation Statement (BRS)", TEAL))
story.append(Spacer(1, 8))
story.append(Paragraph(
"A <b>BRS</b> is a statement prepared to explain the difference between the "
"<b>Cash Book balance</b> (your records) and the <b>Bank Passbook balance</b> (bank's records).",
BODY))
story.append(Spacer(1, 6))
story.append(brs_diagram())
story.append(Spacer(1, 8))
story.append(SectionLabel("Why Do Differences Arise?", MID_BLUE))
brs_reasons = [
["Reason", "Effect on Cash Book vs Passbook", "Example"],
["Cheque issued but not yet presented",
"Cash Book less; Passbook hasn't deducted yet",
"You gave a cheque to supplier on 28th; bank processes on 2nd"],
["Cheque deposited but not yet cleared",
"Cash Book shows receipt; Passbook not yet credited",
"You deposited customer cheque; takes 2 days to clear"],
["Bank charges / interest debited",
"Passbook shows deduction; Cash Book unaware",
"Bank deducts โน150 annual fee"],
["Direct credit by bank",
"Passbook shows; Cash Book may not",
"Interest credited directly to account"],
["Errors in Cash Book or Passbook",
"Either side may be wrong",
"Wrong amount entered"],
]
story.append(styled_table(brs_reasons,
[3.5*cm, 5*cm, 6.5*cm], header_color=TEAL, alt_color=LIGHT_TEAL))
story.append(Spacer(1, 8))
story.append(SectionLabel("BRS Format", MID_BLUE))
brs_fmt = [
["Particulars", "โน"],
["Balance as per Cash Book", "10,500"],
["Less: Cheque issued but not presented to bank", "(800)"],
["Add: Cheque deposited but not cleared", "300"],
["Balance as per Passbook", "10,000"],
]
story.append(styled_table(brs_fmt, [11*cm, 4*cm], header_color=TEAL))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 9 โ Ratio Analysis
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(9, "Ratio Analysis", PURPLE))
story.append(Spacer(1, 8))
story.append(Paragraph(
"<b>Ratio Analysis</b> helps managers evaluate business performance by comparing "
"key financial figures. Like a health check-up uses tests (BP, sugar), "
"business uses ratios.",
BODY))
story.append(Spacer(1, 6))
story.append(ratio_analysis_diagram())
story.append(Spacer(1, 8))
story.append(SectionLabel("Important Ratios - Quick Reference", MID_BLUE))
ratio_data = [
["Ratio", "Formula", "Ideal Value", "What it Measures"],
["Current Ratio", "Current Assets รท Current Liabilities", "2 : 1", "Short-term solvency"],
["Quick Ratio", "(Current Assets - Stock) รท Current Liabilities", "1 : 1", "Immediate liquidity"],
["Gross Profit Ratio", "Gross Profit รท Net Sales ร 100", "Higher = Better", "Profit on trading"],
["Net Profit Ratio", "Net Profit รท Net Sales ร 100", "Higher = Better", "Overall profitability"],
["Debt-Equity Ratio", "Long-term Debt รท Equity", "1 : 1", "Financial leverage"],
["Return on Capital", "Net Profit รท Capital Employed ร 100", "Higher = Better", "Return on investment"],
["Stock Turnover", "Cost of Goods Sold รท Avg Stock", "Higher = Better", "How fast stock sold"],
["Debtors Turnover", "Net Credit Sales รท Avg Debtors", "Higher = Better", "Collection efficiency"],
]
story.append(styled_table(ratio_data,
[3.5*cm, 5*cm, 3*cm, 3.5*cm], header_color=PURPLE,
alt_color=LIGHT_PURPLE))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 10 โ Cost Concepts
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(10, "Cost Concepts for Managers", GRAY))
story.append(Spacer(1, 8))
story.append(Paragraph(
"Understanding costs helps managers make decisions like: Should we produce more? "
"Which product is profitable? Should we buy or make?",
BODY))
story.append(Spacer(1, 6))
story.append(cost_types_diagram())
story.append(Spacer(1, 10))
story.append(SectionLabel("Cost Classification - Comprehensive Table", MID_BLUE))
cost_data = [
["Cost Type", "Definition", "Example", "Decision Use"],
["Fixed Cost", "Remains constant regardless of output", "Factory rent โน10,000/month", "Break-even analysis"],
["Variable Cost", "Changes proportionally with output", "Raw materials per unit", "Marginal costing"],
["Semi-variable", "Partly fixed + partly variable", "Electricity: base + usage", "Cost estimation"],
["Opportunity Cost", "Value of next best alternative foregone", "FD interest lost", "Investment decisions"],
["Sunk Cost", "Already incurred, cannot be recovered", "Market research spent", "Ignore in decisions"],
["Marginal Cost", "Extra cost of one more unit", "Cost of 1 extra pen", "Output decisions"],
["Direct Cost", "Directly traced to a product", "Leather in a shoe", "Product costing"],
["Indirect Cost", "Cannot be directly traced", "Factory electricity", "Overhead allocation"],
]
story.append(styled_table(cost_data,
[2.8*cm, 3.5*cm, 3.5*cm, 5.2*cm], header_color=GRAY,
alt_color=LIGHT_GRAY))
story.append(Spacer(1, 8))
story.append(SectionLabel("Break-Even Point", MID_BLUE))
story.append(Paragraph(
"Break-even point is where <b>Total Revenue = Total Cost</b> โ no profit, no loss.",
BODY))
story.append(ColorBox(
"FORMULA: BEP (Units) = Fixed Costs รท (Selling Price per unit โ Variable Cost per unit) "
"| EXAMPLE: Fixed Costs โน40,000 | Selling Price โน100 | Variable Cost โน60 "
"| BEP = 40,000 รท (100-60) = 1,000 units "
"| You need to sell 1,000 units to just break even!",
bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE, font_size=9))
story.append(PageBreak())
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# CHAPTER 11 โ Quick Revision
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(ChapterBanner(11, "Quick Revision Summary & Memory Tricks", ACCENT))
story.append(Spacer(1, 8))
story.append(SectionLabel("Master Formula Sheet", MID_BLUE))
formulas = [
["Formula", "Expression"],
["Accounting Equation", "Assets = Liabilities + Capital"],
["Gross Profit", "Sales - Cost of Goods Sold"],
["Cost of Goods Sold", "Opening Stock + Purchases - Closing Stock"],
["Net Profit", "Gross Profit - Indirect Expenses + Other Income"],
["Current Ratio", "Current Assets รท Current Liabilities"],
["Quick Ratio", "(Current Assets - Stock) รท Current Liabilities"],
["SLM Depreciation", "(Cost - Scrap Value) รท Useful Life"],
["WDV Depreciation", "Book Value ร Rate % รท 100"],
["Break-Even Point", "Fixed Cost รท (SP - VC) per unit"],
["Gross Profit Ratio", "Gross Profit รท Net Sales ร 100"],
["Net Profit Ratio", "Net Profit รท Net Sales ร 100"],
]
story.append(styled_table(formulas, [6*cm, 9*cm], header_color=ACCENT,
alt_color=LIGHT_YELLOW))
story.append(Spacer(1, 10))
story.append(SectionLabel("Memory Tricks (Mnemonics)", MID_BLUE))
tricks = [
"๐ก DEAL = Debit: Expenses, Assets, Losses | GIRLS = Credit: Gains, Income, Revenue, Liabilities, Stock reduction",
"๐ก 'REAL accounts: Things you can FEEL โ cash, stock, building'",
"๐ก 'PERSONAL accounts: PEOPLE and companies you deal with'",
"๐ก 'NOMINAL accounts: Names like Rent, Salary, Sales โ no physical form'",
"๐ก Trial Balance mnemonic: 'DR โ Debit Right side? No! Debit = LEFT side always!'",
"๐ก Balance Sheet: 'CALL on the right side โ Capital, All liabilities, Long-term debt'",
"๐ก BRS: 'If Cash Book is base โ ADD uncredited deposits, LESS unpresented cheques'",
"๐ก SLM vs WDV: 'Straight = Same amount. Written Down = Waning (decreasing)'",
]
for t in tricks:
story.append(ColorBox(t, bg=LIGHT_PURPLE, border=PURPLE,
text_color=colors.HexColor("#4A148C"), font_size=9))
story.append(Spacer(1, 3))
story.append(Spacer(1, 8))
story.append(SectionLabel("Top 10 Exam Tips", MID_BLUE))
tips_data = [
["#", "Exam Tip"],
["1", "Always write the 'narration' in journal entries โ it carries marks!"],
["2", "Balance Sheet must always balance. If not, find your error before moving on."],
["3", "In Trial Balance: Assets & Expenses = Debit; Liabilities, Capital & Income = Credit"],
["4", "Depreciation reduces asset value AND appears as expense in P&L."],
["5", "Current Ratio 2:1 = healthy business. Less than 1 = danger zone!"],
["6", "BRS is NOT an error โ it is a normal reconciliation statement."],
["7", "Gross Profit Ratio and Net Profit Ratio are the most common exam questions."],
["8", "Sunk costs should be IGNORED in decision-making โ don't let past losses affect future decisions."],
["9", "Always label columns in Trading A/c and P&L: Dr side and Cr side."],
["10", "Show ALL workings โ partial marks are given even if final answer is wrong!"],
]
story.append(styled_table(tips_data, [1*cm, 14*cm], header_color=DARK_BLUE))
story.append(Spacer(1, 10))
# Final good luck box
class GoodLuck(Flowable):
def wrap(self, aW, aH):
self.width = aW; self.height = 80; return aW, 80
def draw(self):
c = self.canv
c.saveState()
c.setFillColor(DARK_BLUE)
c.roundRect(0, 0, self.width, 80, 8, fill=1, stroke=0)
c.setFillColor(ACCENT)
c.setFont("Helvetica-Bold", 16)
c.drawCentredString(self.width/2, 52, "EXAM: 16 AUGUST 2026 | 10:00 AM โ 1:00 PM")
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 14)
c.drawCentredString(self.width/2, 32, "You've got this! Study with understanding, not by rote.")
c.setFillColor(LIGHT_BLUE)
c.setFont("Helvetica", 11)
c.drawCentredString(self.width/2, 14, "Best of Luck! โ Dr. MGR University MBA 2026")
c.restoreState()
story.append(GoodLuck())
doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print(f"PDF created: {path}")
return path
build_pdf()
cd /tmp/workspace/accounting-study-guide && python create_guide.py 2>&1
~/accounting-study-guide/create_guide.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/accounting-study-guide/create_guide.py'
cd /tmp/workspace/accounting-study-guide && python create_guide.py 2>&1
~/accounting-study-guide/create_guide.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/accounting-study-guide/create_guide.py'
cd /tmp/workspace/accounting-study-guide && python create_guide.py 2>&1
ls -lh /tmp/workspace/accounting-study-guide/Basic_Accounting_Study_Guide.pdf
Basic Accounting Study Guide
PDF Document ยท PDF
| Chapter | Topic | Visual Included |
|---|---|---|
| 1 | What is Accounting + Accounting Equation | Balance-scale diagram with โน amounts |
| 2 | Types of Accounts & Golden Rules | 3-box colour-coded diagram |
| 3 | Journal Entries | Accounting cycle flow diagram |
| 4 | Ledger Posting | T-format ledger table |
| 5 | Trial Balance | Sample TB + error detection table |
| 6 | Final Accounts (Trading, P&L, Balance Sheet) | Full flow diagram + 3 account formats |
| 7 | Depreciation (SLM vs WDV) | 5-year bar chart comparison |
| 8 | Bank Reconciliation Statement | Cash Book vs Passbook visual |
| 9 | Ratio Analysis | Ratio dashboard with 8 formulas |
| 10 | Cost Concepts | Fixed/Variable/Semi-variable + BEP |
| 11 | Quick Revision + Memory Tricks | Formula sheet + Top 10 exam tips |