---
title:
output:
  revealjs::revealjs_presentation:
    theme: white
    css: white-edits.css
    highlight: tango
    transition: slide
    self_contained: false
    reveal_plugins: ["chalkboard","search"]
    transitionSpead: fast
    mathjax: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_SVG"
    reveal_options:
      width: 1024
      height: 768
      minScale: 1.0
      maxScale: 1.0
      slideNumber: true
      controlsTutorial: true
      chalkboard:
        theme: whiteboard
        readOnly: false
---

## ACCT 101: Bookkeeping, accruals, and adjusting  {data-background="../Backgrounds/title.jpg" class="header no-toc-progress" data-state="no-toc-progress"}

<h3 class="date"><br>Session 2</h3>
<h2 class="author"><br>Richard M. Crowley</h2>

<!-- Must be compiled under Linux to display properly!!! -->

```{r helpers, echo=FALSE, warning=FALSE}
library(knitr)
library(kableExtra)
html_df <- function(text, cols=NULL, col1=FALSE, full=F) {
  if(!length(cols)) {
    cols=colnames(text)
  }
  if(!col1) {
    kable(text,"html", col.names = cols, align = c("l",rep('c',length(cols)-1))) %>%
      kable_styling(bootstrap_options = c("striped","hover"), full_width=full)
  } else {
    kable(text,"html", col.names = cols, align = c("l",rep('c',length(cols)-1))) %>%
      kable_styling(bootstrap_options = c("striped","hover"), full_width=full) %>%
      column_spec(1,bold=T)
  }
}
```

# Frontmatter {data-background="../Backgrounds/section.jpg" class="header"}

## Frontmatter {data-background="../Backgrounds/default.jpg" class="default"}

- Homework 1 due next week
    - Available on eLearn
    - Submit on eLearn
- Covers topics from today's session

## Learning objectives {data-background="../Backgrounds/default.jpg" class="default"}

<div class="left">
<img src="../Course_Diagrams/ACCT_101_course_map_2.png">
</div>
<div class="right">

- Bookkeeping (Chapter 2)
    1. Understand how accounting works
    2. Record transactions in the journal
    3. Construct a trial balance
- Accruals and Adjustments (Chapter 3)
    1. Relate accrual accounting and cash flows
    2. Apply the revenue and matching principals
    3. Adjust accounts
</div>

# Debits and credits {data-background="../Backgrounds/section.jpg" class="header"}

## History: Before double entry {data-background="../Backgrounds/books-old.jpg" class="default"}

<div class="clearfix">
<div class="left" style="font-size:0.8em">
- 8500 BCE: Shaped clay tokens represent commodities
- 200 BCE: Arabic numerals (except **0**)
- 600 CE: **0** developed
- 800 CE: 10-digit numerals spread throughout Europe

<img src="../Figures/bulla1.png" style="max-width:220px">
</div>
<div class="right">
<img src="../Figures/bulla2.png" style="max-width:340px">
<p style="font-size:0.5em"><a href="http://www.schoyencollection.com/mathematics-collection/pre-literate-counting/bulla-envelope-ms-4631">http://www.schoyencollection.com/mathematics-collection/pre-literate-counting/bulla-envelope-ms-4631</a></p>
</div>
</div>

<p style="font-size:0.5em">*Note: This slide is based on a history lecture by Dr. Pierre Liang at Carnegie Mellon from October 2017</p>

## History: Double entry {data-background="../Backgrounds/books-old.jpg" class="default"}

<div class="clearfix">
<div class="left" style="font-size:0.8em">
- 1400s CE: First evidence of *double entry* accounting in Italy
- 1494 CE Italian monk and scholar Luca Pacioli publishes first text on *double entry* bookkeeping
    - <a href="https://books.google.com.sg/books/about/Summa_de_Arithmetica_geometria_proportio.html?id=iqgPe49fhrsC&redir_esc=y">Summa de Arithmetica, Geometria, Proportioni et Propotionalita</a>

<img src="../Figures/pacioli.jpg" style="max-width:280px">
</div>
<div class="right">
<img src="../Figures/summa.jpg" style="max-width:280px">
</div>
</div>

<p style="font-size:0.5em">*Note: This slide is based on a history lecture by Dr. Pierre Liang at Carnegie Mellon from October 2017</p>

## History: Journal entries {data-background="../Backgrounds/books-old.jpg" class="default"}

<div class="clearfix">
<div class="left">
<img src="../Figures/Littleton_1928-JE_type_1.png" width="400px" style="margin:0px">
<img src="../Figures/Littleton_1928-JE_type_2.png" width="200px" style="margin:0px">
</div>
<div class="right">
<img src="../Figures/Littleton_1928-JE_type_3.png" width="400px" style="margin:0px">
<img src="../Figures/Littleton_1928-JE_religious_2.png" width="400px" style="margin:0px">
</div>
</div>

> Images from Littleton 1928 TAR.

## History: Journal entry evolution {data-background="../Backgrounds/books-old.jpg" class="default"}


<img src="../Figures/Littleton_1928-English_JE_Evolution.png" width="300px">

> Shakespeare likely did this sort of work for the British Navy!  (Source: <a href="https://jstor.org/stable/2490385">Reynolds 1974 JAR</a>)



## History: Impact {data-background="../Backgrounds/books-old.jpg" class="default"}

<blockquote><p style="text-indent:0px; font-size:75%">The Principles of Book-keeping by Double Entry constitute a theory which is mathematically by no means uninteresting: it is in fact like Euclid's theory of ratios an absolutely perfect one, and it is only its extreme simplicity which prevents it from being as interesting as it would otherwise be.<br>-- Arthur Cayley, FRS, The Principles of Book-keeping by Double Entry, 1894.</p></blockquote>

<blockquote><p style="text-indent:0px; font-size:75%">Bookkeeping has become a real technology instead of a simple clerical routine, and in addition there has grown up a profession of accounting which reaches quite beyond bookkeeping.<br>-- A. C. Littleton, The Evolution of the Journal Entry, 1928.</p></blockquote>

## ← Debit | Credit → 

<div class="clearfix">
<div class="left">
<p style="font-size:2em">
*Debits*  
on  
the  
*left*</p>
</div>
<div class="right">
<p style="font-size:2em">
*Credits*  
on  
the  
*right*</p>
</div>
</div>

> Memorize this!

> This is double entry accounting

## Debits and credits {data-background="../Backgrounds/default.jpg" class="default"}

<div class="clearfix">
<div class="left">
*Debits (DR)*

- Increase assets
- Decrease liabilities
- Decrease equity
    - Decrease revenue
    - Increase expenses
</div>
<div class="right">
*Credits (CR)*

- Decrease assets
- Increase liabilities
- Increase equity
    - Increase revenue
    - Decrease expenses
</div>
</div>

> The side of an account that increases its balance is called the account's *normal balance*

> Debits **always** equal credits for a transaction

## Representing accounts: T-accounts {data-background="../Backgrounds/reference.jpg" class="default"}

<img src="../Diagrams/Taccount.png" width="80%">

## Normal balances {data-background="../Backgrounds/reference.jpg" class="default"}

<img src="../Diagrams/DRCR.png" width="50%">

## Review: Debits & credits {data-background="../Backgrounds/review.jpg" class="default"}

1. Where do debits go?
2. Where do credits go?
3. What do debits equal?
4. What do credits equal?

## Review: Debits & credits {data-background="../Backgrounds/answer.jpg" class="default exclude"}

1. Where do debits go?
    - <span class="fragment">Left!</span>
2. Where do credits go?
    - <span class="fragment">Right!</span>
3. What do debits equal?
    - <span class="fragment">Credits!</span>
4. What do credits equal?
    - <span class="fragment">Debits!</span>

## Why does this all matter? {data-background="../Backgrounds/default.jpg" class="default"}

$$
\begin{align*}
  A = L + E\qquad &A,L,E \in (-\infty,\infty)\\
  DR = CR\qquad &DR,CR > 0
\end{align*}
$$

- Both of these equations inherently require that *at least* two changes are made with each transaction
    - For the top equation, the changes must either:
        - Affect both sides in the same direction, or
        - Cancel out within one side
    - For the bottom equation, the change must have a debit and a credit
- As these hold at the smallest element of the system, they aggregate up to hold for any amount of transactions
    - I.e., for a whole company or any subset thereof

> Now we have a robust way to check for mistakes anywhere in our accounting system -- just check each equation!

# Bookkeeping {data-background="../Backgrounds/section.jpg" class="header"}

## Accounts {data-background="../Backgrounds/ledger.jpg" class="default"}

<div class="left">
- Assets: Cash, A/R, inventory, equipment, ...
- Liabilities: A/P, debt, expenses payable, ...
- Equities: Expenses, revenue, capital, ret. earnings, ...
- Documented granularly in the *Chart of Accounts*
</div>
<div class="right">
<img width="400%" src="../Figures/SAP_Accounts.png"/>
</div>


## Source documents {data-background="../Backgrounds/ledger.jpg" class="default"}

<div class="left">
- The paper trail
- Establishes amounts
- Confirms a traction occurred or was contracted
- Allows for analyzing and verifying at the transaction level
    - Needed for auditing!
</div>
<div class="right">
<img style="max-height:400px" src="../Figures/bill_of_laiding.jpg"/>
<br>Bill of laiding, 1852<br>[Heinz Museum]
</div>

## General journal {data-background="../Backgrounds/ledger.jpg" class="default"}

<div class="clearfix">
<div class="left">
- Where everything is recorded first
    - Everything
    - Every little transaction
- Specifies the accounts, values, and document for each transaction
    - We will skip references
    - We will be doing journal entries through session 9
- Always *list debits first*
</div>
<div class="right">
<img height=100% src="../Figures/Journal.jpg"/>
</div>
</div>

> DR = CR for *each entry*

## Constructing journal entries {data-background="../Backgrounds/reference.jpg" class="default"}

<img src="../Diagrams/Journal_entry.png"  style="max-height: 480px">

## Constructing journal entries {data-background="../Backgrounds/group.jpg" class="default"}

1. Get the in class activity spreadsheet
    - Session_2_Activity.xlsx
2. We'll go through the first three transactions together
    - Journal entries
3. Journal (i.e., right out journal entries for) the next 11 transactions with your group in the <span style="color:blue">blue tab</span> of the spreadsheet
    - We'll do the rest of the activity throughout the class today

## General ledger {data-background="../Backgrounds/ledger.jpg" class="default"}

- An aggregation of all the accounts
- Shows all account balances
- Includes details of each account
- T-accounts sufficient for this course

<img src="../Diagrams/General_ledger.png" style="max-height:380px; margin:0px">

## Trial Balance {data-background="../Backgrounds/ledger.jpg" class="default"}

<div class="clearfix">
<div class="left">
- Shows all account balances just like the general ledger
    - Make sure they add up!
- Use it to verify **DR = CR**
- Use it to verify the **accounting equation**
- Usually prepared at the end of a period
- Can prepare income statement and balance sheet from it
</div>
<div class="right">
<img style="max-height:360px" src="../Figures/trial.png"/>
</div>
</div>

> DR = CR for totals

## Constructing the trial balance {data-background="../Backgrounds/reference.jpg" class="default"}

<img src="../Diagrams/Ledger_post.png"  style="max-height: 480px">

## Limits of the trial balance {data-background="../Backgrounds/default.jpg" class="default"}

- Can't catch:
    - Unrecorded transactions
        - Because there's no trace of them
    - Wrong amounts in transactions that balance in the journal
        - Everything still balances
    - Wrong accounts of the same type used in the journal
        - Everything still balances
        - $A = L + E$ holds

## What you can catch {data-background="../Backgrounds/reference.jpg" class="default"}
- Let the *Out of balance* (OOB) amount be: 
    - $OOB = Assets - Liabilities - Equity$
- If OOB / 2 is an integer
    - DR and CR in a transaction may be flipped
        - Ex.: Recorded a cash sale as a CR to cash and a CR to revenue
            - Should be a DR to cash and a CR to revenue
- If OOB / 9 is an integer, there may be a:
    - Slide error (multiplied by 10 or divided by 10):
        - Ex.: Recorded 5,400 instead of 54,000
    - Transposition error (flipped the first 2 digits)
        - Ex.: Recorded 45,000 instead of 54,000

## T-accounts and the trial balance {data-background="../Backgrounds/group.jpg" class="default"}

1. Return to the in class activity
2. We'll do the first one as a class
3. Finish the rest of the activity with your group
    - Do the two <span style="color:green">green tabs</span>

# Accruals vs. Cash {data-background="../Backgrounds/section.jpg" class="header"}

## Cash basis accounting {data-background="../Backgrounds/coins.jpg" class="default"}

- Records cash only transactions
- Used by small companies
- $Profit = Cash~in - Cash~out$

**PROBLEM**

- This ignores underlying economic activity
    - If we make a sale on credit, that doesn't add to profit
    - If we put an expense on credit, it doesn't lower profit

## Accrual accounting {data-background="../Backgrounds/default.jpg" class="default"}

- Records impact of transactions *as they occur*
- Required per IAS1, "Presentation of Financial Statements"
- Revenue recorded when it is *"more likely than not"*
- Expenses recorded as *incurred*
- Profit = Revenue - Expenses

**PROBLEM**

- Profit may not be indicative of cashflows
    - This is a concern for lenders
        - If there's no cash, profit doesn't matter, as the company will go bankrupt

## Accrual transaction examples {data-background="../Backgrounds/default.jpg" class="default"}

```{r , echo=FALSE, warning=FALSE}
options(knitr.table.format = "html") 
text <- data.frame(
  Cash = c("Cash sale","Borrowing money","Paying expenses such as wages and rent","Receiving cash from interest earned","Paying off loans","Receiving cash from shares issued"),
  noncash = c("Sales on account (A/R)","Inventory purchases on account (A/P)","Expenses incurred but not yet paid","Depreciation expense","Usage of prepaid expenses (rent, utilities, etc.)","Revenue from long-term projects with up-front cash collection")
)
html_df(text, col1=FALSE, cols=c("Cash Transactions","Noncash Transactions"))
```

## Periodicity {data-background="../Backgrounds/hourglass.jpg" class="default"}

<div class="clearfix">
<div class="left">
- Divides time into *artificial* segments to understand a firm's changes over time
    + Fiscal year, fiscal quarter
    + Breadtalk: Jan 1 - Dec 31
    + Citigroup: Jan 1 - Dec 31
    + Microsoft: Jul 1 - Jun 30
    + Walt Disney 
        * 2016: Oct 2 - Oct 1
        * 2015: Oct 4 - Oct 1
        * 2014: Sept 28 - Oct 3
</div>
<div class="right">
<img height="65px" src="../Figures/BreadTalk.png" style="margin:0px"><br>
<img height="65px" src="../Figures/Citi.png" style="margin:0px"><br>
<img height="65px" src="../Figures/Microsoft.png" style="margin:0px"><br>
<img height="65px" src="../Figures/Walt_Disney.png" style="margin:0px">
</div>
</div>

> Don't focus on this too much for this class

## Revenue recognition principal {data-background="../Backgrounds/hourglass.jpg" class="default"}

- Recognize revenue in the **period** it was earned
    - This may not be when cash is received
- Goods revenue recorded when it is *more likely than not*
- Service revenue recorded at the percentage complete
    - If 50% of the work is finished, record 50% of the revenue
    - If 20% of the work is finished, record 20% of the revenue

> This will lead to a lot of tricky accounting, but mostly around period ends

## Recognizing revenue {data-background="../Backgrounds/hourglass.jpg" class="default"}

- Record revenue when:
    - Revenue can be measured *reliably*
    - Economic benefits are *more likely than not*
- For goods, you also need to:
    - Transfer any *significant risks* to buyer
        - If we are shipping [FOB destination], wait until received
        - If they handle shipping [FOB shipping point], wait until picked up for delivery
    - Have no continuing managerial involvement (*to an extent*)
    - Be able to *reliably* measure all costs incurred from the transaction
- For services, you also need to be able to *reliably* measure:
    - The stage of completion
    - The costs incurred to date and costs to finish

## Matching principal {data-background="../Backgrounds/playing-cards.jpg" class="default"}

- Match expenses to the revenue within a **period**
1. Identify what expenses were incurred
2. Measure them
3. Match to the revenues

## Expense recognition {data-background="../Backgrounds/playing-cards.jpg" class="default"}

- Recognize expenses **only** when an asset is used up
    - Asset purchase $\ne$ expense
    - Can record partial usage
- Formally, expenses are recognized when:
    1) Obligations are incurred, such as when services have been received
    2) Obligations are offset against recognized revenues (matching principle)

## Expense matching {data-background="../Backgrounds/playing-cards.jpg" class="default"}

<div class="left">
- 3 ways to match
- Directly
    - The expense is easy to track to an account
        - Ex.: Inventory
- Indirectly (over a period)
    - The asset has a long life or is difficult to track
        - Ex.: Buildings
- With acquisition
    - Simultaneous usage and acquisition
        - Ex.: Utilities, rent, labor
    - Often *prepaid expenses*
</div>
<div class="right">
<img src="../Figures/box.png" style="max-height:160px; margin:0px"><br>
<img src="../Figures/factory.png" style="max-height:160px; margin:0px"><br>
<img src="../Figures/lamp.png" style="max-height:160px; margin:0px"><br>
</div>

## When should we record... {data-background="../Backgrounds/review.jpg" class="default"}

1. A sale we are shipping at our expense
2. A sale we are shipping at the buyer's expense
3. Revenue for a week long consulting project paid for up front
4. Electricity usage
5. Building usage (our building)
6. Sale of inventory for revenue

## When should we record... {data-background="../Backgrounds/answer.jpg" class="default exclude"}

1. A sale we are shipping at our expense
    - <span class="fragment">Once the product reaches the buyer</span>
2. A sale we are shipping at the buyer's expense
    - <span class="fragment">Once we ship the product</span>
3. Revenue for a week long consulting project paid for up front
    - <span class="fragment">Once the project is finished</span>
4. Electricity usage
    - <span class="fragment">When billed or at period end (matching principle)</span>
5. Building usage (our building)
    - <span class="fragment">At period end (matching principle)</span>
6. Sale of inventory for revenue
    - <span class="fragment">At the time the revenue is recognized</span>

# Adjustments {data-background="../Backgrounds/section.jpg" class="header"}

## Why do we need to adjust? {data-background="../Backgrounds/default.jpg" class="default"}

- The matching principle
    - Everything needs to be matched at period end
- Do before balance sheet and income statement
    - Adjustments will go to the trial balance once we record them
    - We call this an *Adjusted trial balance*
- Why not do this continuously?
    - Too costly -- some accounts continuously change
    - Investors only see period-end statements anyway

> We'll only do this at period end

## What do we need to adjust?{data-background="../Backgrounds/default.jpg" class="default"}

<div class="left">
- Adjustments needed to:
    - Asset values
        - Prepaid expenses
        - Inventory, supplies, etc.
        - Noncurrent assets
    - Liabilities
        - Payables we have yet to recognize
        - Unearned revenues
- Balanced by:
    - Revenues
    - Expenses
</div>
<div class="right">
- **All** adjustments affect:
    - 1 B/S account
        - Assets
        - Liabilities
        - Equity excluding revenues/expenses
    - 1 I/S account
        - Revenue or expense
- **NEVER** affects cash
</div>

## Adjusting entry types {data-background="../Backgrounds/default.jpg" class="default"}

- *Deferral*
    + Adjust for prepaid expense (some used)
    + Adjust for unearned revenue (some may be earned)
- *Depreciation*
    + Some long term assets have been used up
- *Accrual*
    + Record an expense in advance

## Deferral {data-background="../Backgrounds/default.jpg" class="default"}

- Adjustment for cash paid or received in advance
    - Expense or revenue has yet to occur
    - We *defer* some of it to the next period

<img src="../Diagrams/JE_2-1.png" width="80%">

<img src="../Diagrams/JE_2-2.png" width="80%">


## Depreciation {data-background="../Backgrounds/default.jpg" class="default"}

- Adjustment for allocating the cost of *Property, Plant and Equipment* (PP&E) over its useful life
- Record to *accumulated depreciation*
- Asset's book value is asset account minus accumulated depreciation
- Depreciate to *salvage value*
    - What you expect to get when it is used up

<img src="../Diagrams/JE_2-3.png" width="80%">

## Depreciation methods {data-background="../Backgrounds/default.jpg" class="default"}

<div class="left">
- Straight line
    - Same amount each period
    - If $N$ periods, $S$ salvage value, $H$ historical cost:
        - $(H-S)/N$ per period
- Units of activity
    - Expense based on units produced
    - Good if capacity is known and tracked
- Declining balance
    - More depreciation early on, less later
</div>
<div class="right">
<img style="max-height:120px" src="../Figures/desktop.png"/><br>
<img style="max-height:120px" src="../Figures/machine.png"/><br>
<img style="max-height:120px" src="../Figures/rolls_royce.png"/>
</div>

## Accrual {data-background="../Backgrounds/default.jpg" class="default"}

- Accrued expense: debit expense, credit liability

<img src="../Diagrams/JE_2-4.png" width="80%" style="margin:0px">

- Accrued revenue: debit asset, credit revenue

<img src="../Diagrams/JE_2-5.png" width="80%" style="margin:0px">

## Overall effects {data-background="../Backgrounds/reference.jpg" class="default"}

<!-- Windows issue -->

```{r , echo=FALSE, warning=FALSE}
options(knitr.table.format = "html") 
text <- data.frame(
  def = c("Deferal: prepaid expense","Deferal: unearned revenue","Depreciation","Accrual: accrued expense","Accrual: accrued revenue"),
  asset = c("↓","","↓","","↑"),
  liability = c("","↓","","↑",""),
  expense = c("↑","","↑","↑",""),
  revenue = c("","↑","","","↑")
)
html_df(text, col1=TRUE, cols=c("Type","Asset (↑=DR)","Liability (↑=CR)","Expense (↑=DR)","Revenue (↑=CR)"))
```


<!--
       &nbsp;   Asset (↑=Dr)    Liability (↑=Cr)    Expense (↑=Dr)    Revenue (↑=Cr)              
-------------  --------------  ------------------  ----------------  ----------------
  Def: PP Exp        ↓                                ↑
  Def: UE Rev                       ↓                                 ↑
 Depreciation        ↓                                ↑
 Acc: Acc Exp                       ↑                 ↑
 Acc: Acc Rev        ↑                                                ↑
-->

## Adjusting entries {data-background="../Backgrounds/group.jpg" class="default"}

1. Return to the in class activity
2. 4 adjusting entries to add in
3. Do the three <span style="background-color:yellow">yellow tabs</span>

# Closing the books {data-background="../Backgrounds/section.jpg" class="header"}

## Closing the books {data-background="../Backgrounds/default.jpg" class="default"}

- Reset all temporary accounts to **0**
    - All revenues
    - All expenses
    - Dividends
- Record a credit to temporary accounts with debit balances
    - Expenses, losses, dividends
- Record a debit to temporary accounts with credit balance
    - Revenues, gains
- Helps to track income through each period
    - Since all income-related accounts start each period with 0 balance

## Reset temporary accounts at period end {data-background="../Backgrounds/reference.jpg" class="default"}

- We close the accounts into *retained earnings* directly
    - Or close into *income summary*, and then close that into retained earnings
- Debit Revenue, Credit Retained earnings
- Debit Retained earnings, Credit Expense
- Debit Retained earnings, Credit Dividends

<img src="../Diagrams/JE_2-6.png" width="80%" style="margin:0px">

## Closing entry {data-background="../Backgrounds/group.jpg" class="default"}

1. Return to the in class activity
2. 1 closing entry to add in
3. Do the two <span style="color:red">red tabs</span>

# End Matter {data-background="../Backgrounds/section.jpg" class="default"}

## For next week {data-background="../Backgrounds/ending.jpg" class="default"}

1) Recap the reading for this week
2) Read the pages for next week
    - Capital Structure (Chapter 10)
    - Accounting Statements (Chapter 3, Part B)
3) Homework to *turn in next week*
    - Available on eLearn
    - Submit on eLearn
4) Practice on eLearn
    - Practice on journal entries
    - Automatic feedback provided

- Survey on the class session at <a href="https://docs.google.com/forms/d/e/1FAIpQLSdEuEC-shdfvS4iTnJehqq80RBpiGqpplhr0GvFdeyDiKymaQ/viewform?usp=sf_link">rmc.link/101survey2</a>

## NOTES {class="never"}

- Fix the table that requires unix/linux to compile (on "Overall effects")
- Expense matching seems a bit boring/confusing as is.