cogs {FinCal}R Documentation

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

Description

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

Usage

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

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")

[Package FinCal version 0.6.3 Index]