finance.proration
Split an amount into the part used and the part unused over a billing period, losing nothing.
prorate in TypeScript
1.0.0
py rs ts
16 tests
dates.month-boundaries
The first day, last day and length of the calendar month containing a date.
monthBoundaries in TypeScript
1.0.0
py rs ts
19 tests
finance.credit-note.calculate
Credit note against an original invoice, by units or by amount, with VAT at the original tax point's rates.
calculateCreditNote in TypeScript
1.0.0
py rs ts
21 tests
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculateInvoice in TypeScript
1.0.1
py rs ts
15 tests
1.0.0
py rs ts
9 tests
subscriptions.invoice
A subscription renewal invoice: plan, add-ons and usage, coupon discounts by billing period, and VAT.
renewalInvoice in TypeScript
1.0.0
py rs ts
19 tests
subscriptions.trial-end
When a free trial ends and the first payment is due, from the trial's start date and length in days.
trialEnd in TypeScript
1.0.0
py rs ts
12 tests
subscriptions.usage-tiered
Price metered usage against tiers, graduated or volume, with an optional flat fee per tier.
priceUsage in TypeScript
1.0.0
py rs ts
25 tests
time.round-to-increment
Round a duration in minutes to a billing increment such as 6 or 15 minutes, up, down or to nearest.
roundToIncrement in TypeScript
1.0.0
py rs ts
18 tests