cogs: Cost of goods sold and ending inventory under three methods...

Description Usage Arguments Examples

Description

Cost of goods sold and ending inventory under three methods (FIFO,LIFO,Weighted average)

Usage

1
cogs(uinv, pinv, units, price, sinv, method = "FIFO")

Arguments

uinv

units of beginning inventory

pinv

prince of beginning inventory

units

nx1 vector of inventory units. inventory purchased ordered by time (from first to last)

price

nx1 vector of inventory price. same order as units

sinv

units of sold inventory

method

inventory methods: FIFO (first in first out, permitted under both US and IFRS), LIFO (late in first out, US only), WAC (weighted average cost,US and IFRS)

Examples

1
2
3
4
5
cogs(uinv=2,pinv=2,units=c(3,5),price=c(3,5),sinv=7,method="FIFO")

cogs(uinv=2,pinv=2,units=c(3,5),price=c(3,5),sinv=7,method="LIFO")

cogs(uinv=2,pinv=2,units=c(3,5),price=c(3,5),sinv=7,method="WAC")

Example output

$costOfGoods
[1] 23

$endingInventory
[1] 15

$costOfGoods
[1] 31

$endingInventory
[1] 7

$costOfGoods
[1] 26.6

$endingInventory
[1] 11.4

FinCal documentation built on May 2, 2019, 1:29 p.m.