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 Rust
1.0.0
py rs ts
16 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 Rust
1.0.0
py rs ts
23 tests
retail.loyalty-points
Loyalty points for a purchase: redeem in blocks, earn on what is paid, with tier multipliers.
loyalty_points in Rust
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 Rust
1.0.0
py rs ts
10 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 Rust
1.0.0
py rs ts
25 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 Rust
1.0.1
py rs ts
20 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 Rust
1.0.0
py rs ts
11 tests
retail.coupon-validate
Check a coupon against a basket: dates, usage limits, eligible products and minimum spend, with reason codes.
validate_coupon in Rust
1.0.1
py rs ts
24 tests
retail.sales-tax-us Unreviewed
US sales tax on a sale: the state's base rate from dated data plus a local rate the caller supplies.
sales_tax_us in Rust
1.1.1
py rs ts
22 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 Rust
1.0.1
py rs ts
27 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 Rust
1.0.1
py rs ts
28 tests
retail.sku-generate
Build a deterministic stock-keeping unit code from a prefix and product attributes.
generate_sku in Rust
1.0.0
py rs ts
15 tests
retail.volumetric-weight
Chargeable parcel weight: the greater of actual and volumetric (dimensional) weight, rounded up to a billing step.
chargeable_weight in Rust
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 Rust
1.0.2
py rs ts
20 tests
finance.margin
Profit on a sale with both the margin and the markup, so the two are never confused.
margin in Rust
1.0.0
py rs ts
13 tests
finance.markup-price
Selling price from a cost and a target margin or markup in basis points, with explicit rounding.
markup_price in Rust
1.0.0
py rs ts
21 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 Rust
1.0.1
py rs ts
26 tests
validation.gtin
Check an EAN-8, UPC-A, EAN-13 or GTIN-14 barcode number against the GS1 mod-10 check digit.
validate_gtin in Rust
1.1.0
py rs ts
19 tests
finance.tax.vat-flat-rate Unreviewed
UK VAT Flat Rate Scheme: VAT due on gross turnover at the sector's dated rate, limited cost rate and first-year 1% off.
flat_rate_vat in Rust
1.0.1
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 Rust
1.0.1
py rs ts
19 tests
banking.fees-cap
Apply a monthly fee cap to a list of account charges: charge up to the cap, waive the rest.
apply_fee_cap in Rust
1.0.0
py rs ts
18 tests
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in Rust
1.0.0
py rs ts
17 tests
invest.rebalance Unreviewed
Whole-unit buy and sell trades that bring a portfolio back to target weights, skipping trades below a minimum size.
rebalance in Rust
1.0.1
py rs ts
22 tests
inventory.reorder-point
Reorder point: demand over the supplier lead time, rounded up to whole units, plus safety stock.
reorder_point in Rust
1.0.0
py rs ts
13 tests
1.0.0
py rs ts
14 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 Rust
1.0.1
py rs ts
14 tests
legal.retainer-drawdown Unreviewed
Apply money held on account in client account to bills in order: what each bill takes, what stays due, what is left.
retainer_drawdown in Rust
1.0.1
py rs ts
11 tests
finance.proration
Split an amount into the part used and the part unused over a billing period, losing nothing.
prorate in Rust
1.0.0
py rs ts
16 tests
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltv_cac in Rust
1.0.0
py rs ts
14 tests
inventory.stock-turnover
Stock turnover ratio, days inventory outstanding and days of cover for a period, computed exactly.
stock_turnover in Rust
1.0.0
py rs ts
13 tests
insurance.premium-proration Unreviewed
Return premium on mid-term cancellation, pro rata or on a short-period scale, with an optional minimum retained premium.
cancellation_return_premium in Rust
1.0.1
py rs ts
26 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 Rust
1.0.0
py rs ts
17 tests
property.rent-review Unreviewed
New rent after an index-linked (CPI/RPI) rent review, with an optional collar and cap and upward-only option.
rent_review in Rust
1.0.1
py rs ts
19 tests
insurance.claim-reserve Unreviewed
Claim reserve history: paid, recovered, outstanding and incurred after each transaction, and the movement.
claim_reserve_history in Rust
1.0.1
py rs ts
14 tests
insurance.mid-term-adjustment Unreviewed
Additional or return premium for a mid-term policy change, pro rata on the days left, plus an admin fee.
mid_term_adjustment in Rust
1.0.1
py rs ts
17 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 Rust
1.0.0
py rs ts
15 tests
todo.recurrence-label
English text for a repeating todo's chip: "Every weekday", "Every 2 weeks on Monday", "Every month on the 31st".
recurrence_label in Rust
1.0.0
py rs ts
30 tests
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interim_valuation in Rust
1.0.0
py rs ts
16 tests
property.rent-proration Unreviewed
Rent for part of a month from the monthly rent, by the annual-daily or the calendar-month method.
prorate_rent in Rust
1.0.1
py rs ts
21 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 Rust
1.0.0
py rs ts
18 tests
fleet.vehicle-depreciation
A vehicle's current value from its cost, age and mileage, on retention curves the caller supplies, exactly.
vehicle_depreciation in Rust
1.0.0
py rs ts
20 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 Rust
1.0.1
py rs ts
25 tests
manufacturing.takt-time
Takt time: available production time divided by customer demand, exact and in whole seconds.
takt_time in Rust
1.0.0
py rs ts
14 tests