---
title: "ACCT 101, Session 10: Cash Flows"
author: 
  - name: Dr. Richard M. Crowley
    email: rcrowley@smu.edu.sg
    affiliation: https://rmc.link/
title-slide-attributes:
  data-background-video: "../Backgrounds/title.mp4"
  data-background-video-loop: "true"
  data-background-size: stretch
format:
  revealjs:
    theme: default
    css: quarto_white.css
    navigation-mode: vertical
    controls: true
    transition: slide
    background-transition: fade
    transition-speed: default
    width: 1536
    height: 864
    logo: ../Logos/logo2.png
    code-link: true
    code-line-numbers: false
    chalkboard:
      theme: whiteboard
    auto-stretch: false
revealjs-plugins:
  - attribution
execute:
  echo: true
  warning: false
  message: false
editor: source
---

# Front matter {data-background-video="../Backgrounds/section.mp4" data-background-video-loop="true"}


<!--# Note that the downlit and xml2 pacakges are required to compile -->
<!--# Installed extensions include `attribution`, `qrcode`, and `material-icons` -->

```{r helpers, echo=FALSE, warning=FALSE, message=F}
library(knitr)
library(kableExtra)

#' Pretty formatted HTML tables
#' 
#' @param df The dataframe to format as a table
#' @param names Names to use for columns if not using the df column names. Vector
#' @param highlight_cols Columns to highlight. Default is c(1) for highlighting the first row. Use c() to remove.
#' @param highlight_rows Rows to highlight. Default is c() to not highlight any rows.
#' @param color_rows Rows to highlight in color. Default is c() to not highlight any rows.
#' @param highlight_end_rows Rows to highlight. Uses a reverse indexing where 1 is the last row, 2 is second to last, etc.
#' @param full Use to span the full width of a slide. FALSE by default.
#' @param fixed_header Whether the first row should be treated as a header row. TRUE by default.
html_df <- function(df, names=NULL, highlight_cols=c(1), highlight_rows=c(), color_rows=c(), highlight_end_rows=c(), full=F, fixed_header=T) {
  if(!length(names)) {
    names=colnames(df)
  }
  kbl(df,"html", col.names = names, align = c("l",rep('c',length(cols)-1))) %>%
    kable_paper(c("striped","hover"), full_width=full, fixed_thead=F, html_font = "\"Source Sans Pro\", Helvetica, sans-serif") %>%
    {if(length(highlight_cols)) column_spec(., highlight_cols,bold=T, background = "#ffffff99") else .} %>%
    {if(length(highlight_rows)) row_spec(., highlight_rows,bold=T, background = "#ffffff99") else .} %>%
    {if(length(color_rows)) row_spec(., color_rows,bold=T, background = "#aaaaff99") else .} %>%
    {if(length(highlight_end_rows)) row_spec(., nrow(df) + 1 - highlight_end_rows,bold=T, background = "#ffffff99") else .}
}

library(tidyverse)
```

<!--# List packages here that are not being correctly highlighted -->
<!--# The usual cause is calling the library from a echo=FALSE cell -->

```{r}
#| include: false
options(downlit.attached = c("knitr", "kableExtra", "tidyverse"))
```

<!-- "reveal_plugins:..." and "chalkboard:" are handled by prep.py -->
```{r setup, include=FALSE}
library(reticulate)  # To use python in R Markdown
# Python to use is specified in the .Renviron file
```

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

:::: {.columns}

::: {.column width="50%"}
![](../Course_Diagrams/ACCT_101_course_map_10.png){width="450px" fig-align="center"}
:::

::: {.column width="50%"}

1. Understand why we have a Statement of Cash Flows
2. Identify cash flows from:
    - Operations
    - Investing
    - Financing
3. Identify significant non-cash activities
4. Apply the *indirect method*


:::

::::



# Statement of Cash Flows {data-background-video="../Backgrounds/section.mp4" data-background-video-loop="true"}

## What is the SCF? {data-background="../Backgrounds/default.jpg"}

- Categorizes and presents all *cash* receipts and *cash* payments
    - Cash *inflows*: where cash came in from
    - Cash *outflows*: where cash went out to
- Describes cash changes over a period

![](../Diagrams/Statement_timing.png){width="1000px" fig-align="center"}

## Why use an SCF? {data-background="../Backgrounds/default.jpg"}

- Helpful in assessing companies'...
    - Ability to generate future cash flows
    - Ability to pay dividends
    - Difference between net income and change in cash
    - Investing and financing activities during the period
    - Value using DCF models (finance)
- Provides information on three types of cash flows, accounting for all cash flows of the company
    - Operating activities
    - Investing activities
    - Financing activities

## SCF and the balance sheet {data-background="../Backgrounds/default.jpg"}

![](../Diagrams/SCF_BS.png){width="700px" fig-align="center"}

## Special cases: Interest and dividends {data-background="../Backgrounds/default.jpg"}

- IFRS, under IAS 7.31
    - *Pick any categorization*
        - Dividends paid/received can be any cash flow type
        - Interest paid/received can be any cash flow type
        - Keep it the same year-after-year
- US GAAP specifies where to put these -- follow this if you don't have a strong opinion on where to put interest and dividends
    - Inflows from dividends or interest: operating activities
    - Interest payments: operating activity
    - Dividend payments: financing activity

## Operating activities {data-background-image="../Backgrounds/Bukit_Merah.jpg"}

- Cash from standard business transactions
- Useful in:
    - Identifying *sustainable* cash flows
    - Management of current assets and current liabilities
        - I.e., working capital
    - Identifying liquidity issues
        - Important for loans!

## Operating activities {data-background-image="../Backgrounds/Bukit_Merah.jpg"}

:::: {.columns}

::: {.column width="50%"}

**Inflows**

- Sales
- Short term investments (selling)
- Other revenues

:::

::: {.column width="50%"}

**Outflows**

- Short term investments (buying)
- Business expenses
    - Paying suppliers and employees
    - Taxes
    - Maintenance expense

:::

::::

> Focus on changes in current assets, changes in current liabilities, and the income statement
    

## Investing activities {data-background-image="../Backgrounds/profits.jpg"}

- Cash transactions that increase or decrease long-term assets
- Useful in:
    - Identifying one-time or non-recurring cash inflows and outflows

## Investing activities {data-background-image="../Backgrounds/profits.jpg"}

:::: {.columns}

::: {.column width="50%"}

**Inflows**

- PP&E disposal
- Selling investments in other firms
- Collection of principal on loans made

:::

::: {.column width="50%"}

**Outflows**

- Purchasing PP&E
- Purchasing investments in other firms
- Making loans

:::

::::

> Focus on PP&E

## Financing activities {data-background-image="../Backgrounds/coins.jpg"}

- Cash-based increases and decreases in long-term liabilities and shareholders' equity
- Useful in:
    - Predicting future claims on cash
    - Identifying how a company is financed
        - Internally vs. externally

## Financing activities {data-background-image="../Backgrounds/coins.jpg"}

:::: {.columns}

::: {.column width="50%"}

**Inflows**

- Receiving loans
- Issuing stock
- Selling treasury shares

:::

::: {.column width="50%"}

**Outflows**

- Paying back loans
- Buying treasury shares

:::

::::

> Focus on long term liabilities and shareholders' equity

## Significant non-cash activities {data-background-image="../Backgrounds/default.jpg"}

- Includes:
    - Issuing common stock in exchange for PP&E
    - Bond conversion (Bond $\rightarrow$ equity)
    - Debt issuance for PP&E
    - PP&E exchange
- Useful in:
    - Determining other future claims on cash
    - Getting a more complete picture of financing and investments
- Reported at the bottom of SCF or in supplementary schedule

## Practice: Identifying cash flows {data-background-image="../Backgrounds/question1.jpg"}

> What type of cash flows are each of the following?<br> [Operating / Investing / Financing / Non-cash / None]<br><br>If it is a cash flow, is it an inflow or outflow?

:::: {.columns}

::: {.column width="50%"}

1. Reissue treasury shares for a warehouse
2. Pay off a note payable
3. Pay interest on a bond
4. Issue new shares for $10 each
5. Pay accounts payable
6. Record $10,000 depreciation on PP&E

:::

::: {.column width="50%"}

7. Sell machinery at a loss
8. Sell land
9. Pay a dividend
10. Buy a warehouse
11. Sell goods for cash

:::

::::


## Answer {data-background-image="../Backgrounds/answer.jpg" class="default present-only" .small}

```{r , echo=FALSE, warning=FALSE}
options(knitr.table.format = "html") 
text <- data.frame(
  Activity = c("1. Reissue treasury shares for a warehouse", "2. Pay off a note payable", "3. Pay interest on a bond", "4. Issue new shares for $10 each", "5. Pay accounts payable", "6. Record $10,000 depreciation on PP&E", "7. Sell machinery at a loss", "8. Sell land", "9. Pay a dividend", "10. Buy a warehouse", "11. Sell goods for cash"),
  Operating = c(" "," "," "," "," "," "," "," "," "," "," "),
  Investing = c(" "," "," "," "," "," "," "," "," "," "," "),
  Financing = c(" "," "," "," "," "," "," "," "," "," "," "),
  NonCash   = c(" "," "," "," "," "," "," "," "," "," "," ")
)
html_df(text, highlight_cols = c(1))
```

## Answer {data-background-image="../Backgrounds/answer.jpg" class="default exclude" .small}

```{r , echo=FALSE, warning=FALSE}
options(knitr.table.format = "html") 
text <- data.frame(
  Activity = c("1. Reissue treasury shares for a warehouse", "2. Pay off a note payable (depends on length of the loan)", "3. Pay interest on a bond (Pick one)", "4. Issue new shares for $10 each", "5. Pay accounts payable", "6. Record $10,000 depreciation on PP&E", "7. Sell machinery at a loss", "8. Sell land", "9. Pay a dividend (pick one)", "10. Buy a warehouse", "11. Sell goods for cash"),
  Operating = c(" ","↓","↓"," ","↓","N/A"," "," ","↓"," ","↑"),
  Investing = c(" "," ","↓"," "," ","N/A","↑","↑","↓","↓"," "),
  Financing = c(" ","↓","↓","↑"," ","N/A"," "," ","↓"," "," "),
  NonCash   = c("✔"," "," "," "," ","N/A"," "," "," "," "," ")
)
html_df(text, highlight_cols = c(1))
```

# Operating cash flows {data-background-video="../Backgrounds/section.mp4" data-background-video-loop="true"}

## Operating cash flows {data-background-image="../Backgrounds/default.jpg"}

Two equivalent methods:

:::: {.columns}

::: {.column width="50%"}

**Indirect method**

- Backs out operating cash flow by starting with net income and adjusting out accruals
- Most commonly used
- Easiest to do

:::

::: {.column width="50%"}

**Direct method**

- Tracks and reports exactly where operating cash flows came from
- Preferred by IFRS
- Most useful for investors

:::

::::

<br>

- Both methods will get you to the same operating cash flow amount

> We will cover the direct method next week when we construct an SCF

## Indirect method {data-background-image="../Backgrounds/reference.jpg"}

1. Start with net income
2. Add back non-cash expenses (i.e., pure accruals)
    - Depreciation, depletion, amortization
    - Bond discount amortization
    - Bad debt expense, warranty expense
3. Subtract out any gains from asset sales included in net income
4. Add back any losses from asset sales included in net income
5. Subtract changes in current assets, **except cash**
6. Add changes in current liabilities

![](../Diagrams/OCF.png){width="700px" fig-align="center"}

## Indirect method: Calculation {data-background-image="../Backgrounds/default.jpg"}

- Steps 1 through 4 are available in the income statement
- Steps 5 and 6 can be calculated by comparing balance sheets
    - Current year versus prior year balance sheets
    - Compare change in accounts such as...
        - A/R
        - Inventory
        - Prepaid expenses
        - Accounts Payable
        - Unearned revenue

## Example: Indirect method  {data-background-image="../Backgrounds/default.jpg"}

![](../Diagrams/SCF_Indirect_Example.png){width="750px" fig-align="center" .lightbox}

## Practice: Indirect method  {data-background-image="../Backgrounds/question1.jpg"}

> You find the following information in Kopi Corp's 20X9 and 20X8 financial statements.  Based on this information, what is their operating cash flow for 20X9?

![](../Diagrams/SCF_Indirect_Practice.png){width="900px" fig-align="center" .lightbox}

## {data-background="../Backgrounds/graph_paper.png" class="print-only"}

## Solution: Indirect method  {data-background-image="../Backgrounds/answer.jpg" class="default exclude"}

![](../Diagrams/SCF_Indirect_Practice_Answer.png){width="800px" fig-align="center" .lightbox}


# End matter {data-background-video="../Backgrounds/section.mp4" data-background-video-loop="true"}

## Wrap up {data-background="../Backgrounds/ending.jpg"}

- For next week
    1) Recap the reading for this week
    2) Read the pages for next week
        - Cash flows (Chapter 11)
    3) Practice on eLearn
        - Practice on Cash flows
        - Automatic feedback provided
- Survey on the class session at [rmc.link/101survey2](https://docs.google.com/forms/d/e/1FAIpQLSdzyohx5MTN40nrDxCWRfuyapH7b1N6NG6MQqV6-lMMNT9z2Q/viewform?usp=sf_link)

## Packages used for these slides {data-background="../Backgrounds/code.jpg"}

- `{kableExtra}`
- `{knitr}`
- `{revealjs}`




## References {data-background="../Backgrounds/books-old.jpg" .stack .never .small visibility="hidden"}

## Custom code {data-background="../Backgrounds/code.jpg" .stack .never .small visibility="hidden"}


## NOTES {class="never" visibility="hidden"}


