Description Usage Arguments Value Examples
View source: R/render-invoice.R
Generate an komaletter::komaletter
type
invoice by first compiling all cost posts in a bill with add_bill_entry()
,
and finishing the bill with make_bill()
, before rendering the invoice with
render_invoice()
. You can search for the customer number with the
search_customer()
in your own customer database.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | render_invoice(
customer_num,
bill = NULL,
lang = "en",
account = search_account_ref("Handelsdebiteuren")$`reference number`,
open_doc = rlang::is_interactive(),
quiet = FALSE
)
add_bill_entry(
description,
VAT,
currency,
price,
.group = "items",
.save = TRUE
)
make_bill(
currency_out = intToUtf8(8364),
lang = "en",
.save = TRUE,
.bill = NULL
)
kable_bill(.bill)
|
customer_num |
Customer number as a six digit character string. |
bill |
Default is set to |
lang |
Language, defaults to English ( |
account |
The ledger account number as a character string. The
respective account number for country specific standard codes can be
looked-up with |
open_doc |
Should the Rmd file be opened
(default = |
quiet |
Should message not be printed (default = |
description |
Add a description of the item. |
VAT |
Add VAT as a percentage to bill entry. |
currency |
Add currency as to bill entry. |
price |
Add price to bill entry. |
.group |
Add grouping key to bill entry (default = |
.save |
Logical indicating whether to save the bill in RDS format. |
currency_out |
Currency to be used on the bill (default = |
.bill |
Manual entry of bill as a
|
A komaletter::komaletter
or
tibble::tibble
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | ## Not run:
# make customer database
add_customer_entry(
"Fancy Work",
NA_character_,
"Vleutensebaan 435",
"7009 ZZ Haarlem",
"Netherlands",
"NL1093se44"
)
# initiate bill
add_bill_entry(
"Tekstproductie (80 uur à € 70)",
21,
"€",
5600
)
# entry
add_bill_entry(
"Ontwerp (vaste prijs)",
21,
"€",
1250
)
# entry
add_bill_entry(
"10 foto’s à € 150",
21,
"€",
1500
)
# entry
add_bill_entry(
"Vormgeving (30 uur à € 60)",
21,
"€",
1800
)
# entry
add_bill_entry(
"1 kg Suiker",
9,
"€",
3000
)
# compile bille
make_bill(lang = "nl")
# Look-up customers (if none exist, first create a customer database)
view_customer()
# render invoice
render_invoice("060101", lang = "nl")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.