record_purchase: Write purchase entries in the ledger.

Description Usage Arguments Value

View source: R/record_purchase.R

Description

Write purchase entries in the ledger.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
record_purchase(
  date = Sys.Date(),
  object = "units",
  quantity = 100,
  price = 10,
  discount = 0.05,
  vat = 0.2,
  dpo = 45,
  risk = 0.1,
  duration = 1,
  origin = 21000,
  destination = 13300
)

Arguments

date

Date. date of the sale.

object

Character. Name of the product or service sold.

quantity

Integer. Volume sold.

price

Double. Base price of the product or service.

discount

Double. Percentage of price reduction earned if payment within terms.

vat

Double. Percentage of price to compute value added taxes.

dpo

Integer. Day-Payable-Outstading or customer credit.

risk

Double. Probability of not paying on time.

duration

Integer. For how many periods does the right hold.

origin

Character. From where the purchase is made.

destination

Character. Where the purchase goes.

Value

A tibble of journal entries.


NicolasJBM/simulR documentation built on Feb. 15, 2021, 9:38 a.m.