payroll.net-to-gross Unreviewed
The gross pay that gives at least a target net pay in one UK pay period, found by a deterministic search.
net_to_gross in Python
1.0.2
py rs ts
13 tests
payroll.gross-to-net Unreviewed
A UK payslip for one pay period: gross pay, pension, PAYE tax, National Insurance, student loans and net pay.
gross_to_net in Python
1.0.1
py rs ts
8 tests
net.port-list
Parse a port list such as 22,80,8000-8010 into port numbers, in order and without duplicates.
parse_port_list in Python
1.0.0
py rs ts
27 tests
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validate_device in Python
1.0.0
py rs ts
17 tests
net.cidr
CIDR blocks: network, broadcast, first and last host, host count, netmask and prefix, and membership.
A group of 5: cidr_info, cidr_contains, is_cidr, prefix_to_netmask, netmask_to_prefix
1.0.0
py rs ts
70 tests
net.ip-classify
Classify an IPv4 or IPv6 address as loopback, private, link-local, multicast, documentation, CGNAT or global.
classify_ip in Python
1.0.0
py rs ts
34 tests
net.port
Check a TCP/UDP port number and name the IANA service registered on it, with its system/user/dynamic range.
A group of 2: is_port, port_service
1.0.0
py rs ts
30 tests
net.cidr-hosts
List every usable host address in an IPv4 CIDR block, refusing blocks larger than a limit.
cidr_hosts in Python
1.0.0
py rs ts
15 tests
net.device-status
Classify a device as up, degraded or down from its latency summary and loss, p95 and jitter thresholds.
device_status in Python
1.0.0
py rs ts
22 tests
net.ipv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
A group of 3: parse_ipv6, format_ipv6, is_ipv6
1.0.0
py rs ts
47 tests
net.latency-summary
Summarise probe results: sent, received, loss, min/avg/max, p95 and jitter, in whole microseconds.
summarise_latency in Python
1.0.0
py rs ts
16 tests
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validate_hostname in Python
1.0.0
py rs ts
26 tests
net.ipv4
Parse, format and check dotted-quad IPv4 addresses, refusing leading zeros, octal, hex and short forms.
A group of 3: parse_ipv4, format_ipv4, is_ipv4
1.0.0
py rs ts
39 tests
net.mac-address
Validate a MAC address in colon, hyphen, Cisco dot or bare form and normalise it, with multicast and local bits.
validate_mac_address in Python
1.0.0
py rs ts
22 tests
finance.payment-terms-due-date
Invoice due date from payment terms: net N days, end of month, N days after month end, day N of next month.
payment_due_date in Python
1.0.0
py rs ts
26 tests
subscriptions.churn
Logo churn, gross and net revenue churn, and gross and net revenue retention for one period, in basis points.
churn_metrics in Python
1.0.0
py rs ts
15 tests
finance.early-payment-discount
Early settlement discount available on a payment date under "2/10 net 30" style terms, and the amount to pay.
early_payment_discount in Python
1.0.0
py rs ts
16 tests
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
remove_vat in Python
1.0.2
py rs ts
20 tests
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
add_vat in Python
1.0.1
py rs ts
9 tests
payroll.pension-auto-enrolment Unreviewed
Workplace pension contributions for one pay period: qualifying earnings band, employee and employer shares, tax relief.
pension_contributions in Python
1.0.2
py rs ts
22 tests
money.amount
A currency-tagged monetary amount held in integer minor units.
money in Python
1.0.2
py rs ts
17 tests
energy.price-cap
Ofgem energy price cap unit rate and daily standing charge for a fuel and payment method on a date (GB average).
price_cap in Python
1.0.2
py rs ts
19 tests
retail.price-per-unit
Unit price for shelf-edge labels: price per kg, per 100 g, per litre, per 100 ml, per metre or per item.
unit_price in Python
1.0.1
py rs ts
27 tests
agri.milk-price
Milk price per litre and payment from a contract's base price, butterfat/protein adjustments and bonuses.
milk_price in Python
1.0.0
py rs ts
18 tests
finance.markup-price
Selling price from a cost and a target margin or markup in basis points, with explicit rounding.
markup_price in Python
1.0.0
py rs ts
21 tests
1.0.0
py rs ts
20 tests
manufacturing.variance
Standard costing variances: material price and usage, labour rate and efficiency, favourable or adverse.
cost_variances in Python
1.0.0
py rs ts
15 tests
subscriptions.usage-tiered
Price metered usage against tiers, graduated or volume, with an optional flat fee per tier.
price_usage in Python
1.0.0
py rs ts
25 tests
text.number-to-words
Write a money amount in words for a cheque: "one thousand two hundred and thirty-four pounds and fifty-six pence".
amount_in_words in Python
1.0.0
py rs ts
16 tests
hospitality.room-rate
Price a hotel stay night by night from the caller's seasonal, day-of-week rate table, less any length-of-stay discount.
room_rate in Python
1.0.0
py rs ts
18 tests
retail.price-rounding
Snap a price to a price point: charm pricing (.99, .95), nearest 5p or 10p, rounding up, down or to nearest.
round_price in Python
1.0.0
py rs ts
25 tests
invest.capital-gains-tax Unreviewed
UK Capital Gains Tax for an individual's tax year: losses, annual exempt amount, and the rates by asset and date.
capital_gains_tax in Python
1.0.1
py rs ts
24 tests
finance.margin
Profit on a sale with both the margin and the markup, so the two are never confused.
margin in Python
1.0.0
py rs ts
13 tests
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parse_money in Python
1.0.0
py rs ts
37 tests
banking.cheque-amount-words
The words and figures to write on a cheque: "One hundred and twenty pounds and fifty pence only", "£120.50".
cheque_amount_words in Python
1.0.0
py rs ts
18 tests
1.0.0
py rs ts
9 tests
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculate_invoice in Python
1.0.1
py rs ts
15 tests
property.rental-yield Unreviewed
Gross and net rental yield of a let property, in basis points, from annual rent, costs and value.
rental_yield in Python
1.0.1
py rs ts
14 tests
money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
A group of 4: compare_money, min_money, max_money, clamp_money
2.0.0
py rs ts
39 tests
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
mileage_allowance in Python
1.0.2
py rs ts
23 tests
money.split-even
Split an amount into n near-equal parts that add back up to exactly the whole.
split_even in Python
1.0.0
py rs ts
13 tests
energy.tariff-time-of-use
Cost half-hourly consumption against time-of-use rates: Economy 7 windows or Agile-style half-hourly prices.
time_of_use_cost in Python
1.0.1
py rs ts
24 tests
finance.proration
Split an amount into the part used and the part unused over a billing period, losing nothing.
prorate in Python
1.0.0
py rs ts
16 tests
agri.feed-ration
Ration costing and dry matter intake from each feed's fresh weight, DM % and price per tonne, in exact money.
feed_ration in Python
1.0.0
py rs ts
15 tests
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interim_valuation in Python
1.0.0
py rs ts
16 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.
calculate_credit_note in Python
1.0.0
py rs ts
21 tests
fleet.fuel-cost
Fuel cost of a trip from distance, fuel economy (UK or US mpg, or L/100km) and price per litre, exactly.
fuel_cost in Python
1.0.0
py rs ts
24 tests
hospitality.recipe-cost
Cost a recipe and each portion from ingredient quantities, pack sizes and pack prices, allowing for trim and waste.
recipe_cost in Python
1.0.1
py rs ts
25 tests
money.convert
Convert an amount to another currency at a supplied exact rate, with an explicit rounding mode.
convert_money in Python
1.0.0
py rs ts
19 tests
retail.basket-total
Total a basket: line prices, promotions, a basket discount, VAT per line and delivery, into one checked total.
basket_total in Python
1.0.0
py rs ts
10 tests
retail.promotion-apply
Apply BOGOF, 3-for-2, percent off, amount off and multibuy deals to a basket, best for the customer, allocated to lines.
apply_promotions in Python
1.0.0
py rs ts
23 tests
finance.bank-reconcile-match
Match bank statement lines to ledger entries by exact amount, a date window and reference similarity, deterministically.
match_bank_lines in Python
1.0.0
py rs ts
19 tests
invest.dividend-yield Unreviewed
Trailing and forward dividend yield of a share or fund, in basis points, from the price and the dividends per unit.
dividend_yield in Python
1.0.1
py rs ts
19 tests
property.completion-statement Unreviewed
A buyer's completion statement: price less deposit, ground rent and service charge apportioned to completion, plus fees.
completion_statement in Python
1.0.1
py rs ts
15 tests
invest.bond-yield Unreviewed
Current yield and yield to maturity of a fixed-coupon bond from its clean price, as Excel's YIELD defines it.
bond_yield in Python
1.0.2
py rs ts
27 tests
money.sum
Total a list of monetary amounts, with an explicit currency for the empty case.
sum_money in Python
1.0.1
py rs ts
11 tests
money.apply-rate
Apply a rate expressed in basis points to a monetary amount, with an explicit rounding mode.
apply_rate in Python
1.0.1
py rs ts
22 tests
money.allocate
Split an amount across ratios without losing or inventing a single minor unit.
allocate in Python
1.0.1
py rs ts
17 tests
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
format_money in Python
1.0.0
py rs ts
11 tests
legal.time-billing Unreviewed
Fees from time entries: each rounded to 6-minute (or other) units and priced at the fee earner's hourly rate.
time_billing in Python
1.0.1
py rs ts
15 tests
payroll.statutory-maternity-pay Unreviewed
UK Statutory Maternity Pay: LEL eligibility and 39 weekly amounts, 90% then the lower of 90% or the flat rate.
statutory_maternity_pay in Python
1.0.1
py rs ts
12 tests
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
add_money in Python
1.0.1
py rs ts
12 tests
construction.cis-deduction
Construction Industry Scheme deduction (0, 20 or 30%) on the labour part of a subcontractor payment.
cis_deduction in Python
1.0.2
py rs ts
24 tests
charity.gift-aid
Gift Aid a UK charity can claim on a donation: basic rate tax grossed up, 25p per £1 at 20%.
gift_aid in Python
1.0.2
py rs ts
15 tests
retail.oss-vat
EU distance-selling VAT: which member state's standard rate applies under OSS and the EUR 10,000 threshold, and the VAT.
oss_vat in Python
1.0.1
py rs ts
28 tests
charity.higher-rate-relief
A Gift Aid donor's extra tax relief at higher, intermediate, additional and top rates, by extending the tax bands.
higher_rate_relief in Python
1.0.0
py rs ts
16 tests
charity.payroll-giving
UK Payroll Giving for one pay period: the donation comes off pay before PAYE, and the tax it saves the employee.
payroll_giving in Python
1.0.0
py rs ts
12 tests
construction.brick-count
Bricks and mortar for a wall, openings subtracted, for UK standard 215 x 102.5 x 65 mm bricks with 10 mm joints.
brick_count in Python
1.0.0
py rs ts
17 tests
finance.accruals-prepayments
Split an invoice across accounting periods by days of service, for accruals, prepayments and deferred income.
allocate_to_periods in Python
1.0.0
py rs ts
17 tests
finance.fx-revaluation
Unrealised foreign exchange gain or loss on foreign-currency balances revalued at a period-end rate.
fx_revaluation in Python
1.0.0
py rs ts
14 tests
professional.wip-valuation
Value unbilled time (work in progress) at cost or charge-out rates, less a write-down percentage.
wip_valuation in Python
1.0.0
py rs ts
14 tests
retail.refund-calculate
Refund for returned items, sharing basket discounts back across the sale so every refund is exact to the penny.
calculate_refund in Python
1.0.0
py rs ts
16 tests
1.0.0
py rs ts
19 tests
energy.bill-calculate
Electricity or gas bill from two meter reads: energy, standing charge, Climate Change Levy and VAT.
calculate_energy_bill in Python
1.0.0
py rs ts
15 tests
subscriptions.proration
Mid-cycle plan change: credit for unused time on the old plan and charge for the rest of the period on the new one.
prorate_change in Python
1.0.0
py rs ts
17 tests
insurance.ipt Unreviewed
UK Insurance Premium Tax at the standard or higher rate in force on a date, added to or taken out of a premium.
insurance_premium_tax in Python
1.0.2
py rs ts
23 tests
finance.tax.vat-return Unreviewed
UK nine-box VAT return totals for a period from categorised sales and purchases (VAT Notice 700/12).
vat_return in Python
1.0.1
py rs ts
19 tests
fleet.emissions
Vehicle greenhouse gas emissions (grams CO2e) from fuel used or distance, using UK government DESNZ conversion factors.
fleet_emissions in Python
1.0.1
py rs ts
23 tests
payroll.income-tax Unreviewed
PAYE income tax for one pay period from a tax code, cumulative or week 1/month 1, by HMRC's tax table routines.
income_tax in Python
1.0.2
py rs ts
30 tests
logistics.freight-rate
Freight charge from a carrier's dated weight-break tariff for a zone, with the fuel surcharge in force on the ship date.
freight_rate in Python
1.0.1
py rs ts
26 tests
subscriptions.mrr-arr
Monthly and annual recurring revenue from a list of subscriptions, normalising intervals and leaving out trials.
mrr_arr in Python
1.1.0
py rs ts
19 tests
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
roaming_charge in Python
1.0.1
py rs ts
16 tests
banking.faster-payments-limit
Whether a Faster Payment fits the scheme maximum, the bank's per-payment limit and what is left of its daily limit.
faster_payments_check in Python
1.0.1
py rs ts
24 tests
energy.carbon-emissions
kgCO2e from kWh or litres of a fuel, using the UK government GHG conversion factors for the year.
carbon_emissions in Python
1.0.1
py rs ts
17 tests
hospitality.tourist-tax
Visitor levy (tourist tax) on an overnight stay: Edinburgh's 5%, Cardiff's per person per night, or a caller's own rule.
tourist_tax in Python
1.0.1
py rs ts
30 tests
retail.shipping-rate
Delivery charge from a dated rate table by service, zone, chargeable weight and size, with a free-over threshold.
shipping_rate in Python
1.0.1
py rs ts
20 tests
hospitality.bill-split
Split a restaurant bill evenly, by item or by share, exactly to the penny, with the service charge shared in proportion.
bill_split in Python
1.0.0
py rs ts
25 tests
banking.overdraft-interest
Overdraft interest for a statement period from daily balances, with an interest-free buffer.
overdraft_interest in Python
1.0.0
py rs ts
15 tests
charity.gasds
Gift Aid Small Donations Scheme top-up for a tax year: the £8,000 limit, the matching rule and community buildings.
gasds in Python
1.0.2
py rs ts
21 tests
charity.restricted-funds
Allocate charity spending to restricted funds first, then unrestricted funds, never overdrawing a restricted fund.
allocate_fund_spend in Python
1.0.0
py rs ts
17 tests
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validate_journal in Python
1.0.0
py rs ts
16 tests
fleet.ev-charging-cost
Cost of an electric vehicle charge from the energy added, charger efficiency and power, and time-of-use tariff windows.
ev_charging_cost in Python
1.0.0
py rs ts
24 tests
retail.loyalty-points
Loyalty points for a purchase: redeem in blocks, earn on what is paid, with tier multipliers.
loyalty_points in Python
1.0.0
py rs ts
19 tests
subscriptions.invoice
A subscription renewal invoice: plan, add-ons and usage, coupon discounts by billing period, and VAT.
renewal_invoice in Python
1.0.0
py rs ts
19 tests
telecoms.call-rating
Rate a call from a rate deck: longest-prefix destination match, billing increments, connection fee and minimum charge.
rate_call in Python
1.0.1
py rs ts
22 tests
telecoms.data-allowance
Mobile data allowance used and remaining, and the overage charge in whole blocks with an optional spend cap.
data_allowance in Python
1.0.0
py rs ts
18 tests
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trial_balance in Python
1.0.0
py rs ts
13 tests
retail.gift-card-balance
Apply a payment from a gift card, redeeming part of the balance or all of it, and say what is still due.
redeem_gift_card in Python
1.0.0
py rs ts
11 tests
hospitality.service-charge
A discretionary service charge on a bill's eligible lines, as a basis-point rate with explicit rounding.
service_charge in Python
1.0.0
py rs ts
17 tests
1.0.0
py rs ts
22 tests