=== TEG-WHOLESALE — Wholesale Distribution, Delivery & Trade Ordering ===
Contributors: theeldestgeek
Tags: wholesale, inventory, barcode, b2b ordering, proof of delivery
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.20.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The back office, trade storefront and delivery side of a wholesale distributor: a barcode for every pack, stock kept as a ledger, purchasing and receiving by scanning, a B2B ordering site, picking, trucks and delivery slots, proof of delivery, invoices and receivables. Takes card payments online through your own Square, Stripe or PayPal account, and Square Terminal at the counter.

== Description ==

On-hand is not a number anybody types in; it is the sum of everything that happened. Every change to stock is a movement in a ledger - received, adjusted, transferred, picked, returned or counted - with who, when and why, and nothing in the ledger is ever edited or deleted. The on-hand figure in each bin is written in the same transaction as its movement, and Reports > Ledger check proves at any moment that the two agree.

* **Taking payments** - trade customers pay an invoice, or their whole statement balance, online by card through your own Square, Stripe or PayPal account (the link is on the invoice, the statement, the e-mails and their account pages), and you take a card on Square Terminal at the will-call counter from the invoice screen. Payments recorded by hand - check, cash, ACH, Zelle, bank transfer, SEPA, whatever your region offers - work as before. An online payment goes on the invoice it was for (a statement payment on the oldest invoices first), credit the account already holds is used before the customer is asked for money, and the account balance, aging, statement and credit limit follow at once. Refunds go back through the gateway, never more than was paid; webhooks are signed and booked once; card money nobody owed waits for the office instead of being guessed onto an invoice. Keys stay in Settings only and never go into a backup. In the TEG Companion app the office takes payment on an invoice or a statement balance, and a driver on the invoice of the stop they just delivered: a card by Square payment link, on the Square Terminal or in the Square app (recorded only once Square confirms it), cash or a check at once, Zelle, Venmo and PayPal waiting for the office to confirm them. Money taken at the door and money taken on the phone are one record, never counted twice; a payment frees credit for new orders but never lifts a credit hold.
* **Catalog** - SKU, name, category, brand, supplier(s), base unit, inner/case/pallet sizes (all in base units), weight and cube per case, cost, list price, tier A/B/C prices as a percentage off list or a fixed price, quantity breaks, minimum order and "sell by the case only", and an image from the media library. CSV import and export in the same columns, with a check-only run that reports every row it would refuse.
* **Barcodes for every pack** - a product carries as many barcodes as it has packs, each tied to its level. Scan the case and a whole case of units is counted. UPC-A and EAN-13 are checked against their check digit as they are entered; Code 128 carries anything else, such as carton GTIN-14s.
* **Scanning everywhere it matters** - one scan box for USB and Bluetooth "keyboard" scanners (it keeps the cursor, and a scan typed while nothing is focused is still caught) and for phone and tablet cameras through the browser's built-in barcode reader where there is one. Nothing is loaded from anywhere else.
* **Inventory** - warehouses and bins (with a receiving dock and a quarantine bin in each), stock per product per bin, on hand / allocated / available / on order, adjustments with a required reason, transfers between bins and between warehouses, customer returns, holds for customers who rang, reorder points and quantities.
* **Cycle counts** - scan a bin label, then everything in it; blind by default; posting writes each variance to the ledger against what the bin holds at that moment, with a reason.
* **Purchasing** - suppliers with terms, lead times and their own product codes and costs; purchase orders from draft to sent, partially received, received and closed; printable and e-mailable.
* **Receiving against the order** - scan cartons at the dock and see expected against counted as you go, with short, over, damaged and not-ordered called out before anybody signs; put away to a bin by scanning its label; posting puts the stock in through the ledger and moves the order on.
* **Reorder suggestions** - products whose available stock plus what is on order and on draft orders has fallen to the reorder point, rounded up to the supplier's pack and minimum, turned into draft orders one supplier at a time.
* **Labels** - product labels for any pack and shelf/bin labels, as vector barcodes drawn by the plugin itself, on letter sheets, thermal rolls or shelf labels.
* **Reports** - low stock, inventory valuation at cost, the stock ledger, and the ledger check. CSV downloads throughout.
* **Backup and restore** - under Settings > Backup, in a protected folder on your own server.
* **Trade accounts** - company, tax ID, price tier, contract prices per product, payment terms (COD, Net 15, Net 30 or any number of days), credit limit and CREDIT HOLD, sales rep, a resale / tax-exempt certificate with its expiry (an expired certificate means tax is charged and the office is warned), several delivery addresses each with its delivery zone, receiving days and hours and dock notes, and several buyers, each with their own login, an optional order limit and an optional "needs approval above".
* **Account applications** - a public form ([teg-wholesale-apply]) with the tax ID, resale certificate upload, trade references and the terms wanted; the office approves (which makes the account, its first delivery address and its first buyer, and e-mails a link to choose a password) or declines with a reason. Spam is stopped by a honeypot and a time trap - no captcha service.
* **The trade store** ([teg-wholesale-catalog]) - log in to see YOUR prices (tier, contract, quantity breaks) per the pack the product is sold in, the minimum order, and availability as In stock / Low / Backorder; search and filter by category and brand. A quick order pad: type SKUs and quantities, SCAN barcodes with a scanner or the phone camera, upload a CSV, add a saved list or reorder a past order. The cart rounds case-only products up to whole cases, enforces minimums, checks credit, offers only the days the delivery address receives, and takes a PO number (required when the account says so), notes, or will-call pickup.
* **My account** ([teg-wholesale-account]) - orders and their detail, reorder, saved lists, delivery addresses and (for the account admin) buyers and approvals.
* **Orders** - placing an order sets its stock aside at once; whatever is short becomes a backorder line at the same price; the price on every line is frozen when the order is placed. Awaiting approval, on hold, allocated, canceled. The sales desk enters phone and fax orders with the same rules, and can change quantities, add lines, substitute a product and split backorders into an order of their own until picking starts. Confirmation e-mails to the buyer and the account admin, with "Ways to pay"; the office is told of every order.
* **Payment methods you accept** - Settings > Payments: Zelle, PayPal, Venmo, credit card, check and cash, each with the details printed under "Ways to pay" on confirmations, invoices and statements; each invoice can offer fewer.
* **Picking** - pick lists from allocated orders, each line planned from a bin (pick faces first, then bulk) in walking order, printable or picked on screen: scan the bin label, then the product - a case barcode picks a case. A SHORT pick picks what was found, counts the bin to what it really holds (so the stock figure stops lying), re-plans the rest from another bin, and backorders only what no bin has - split into its own order when the list is completed, so the rest can go.
* **Trucks, routes and delivery slots** - trucks with payload, cube, pallet positions, what they can keep cold and whether they may carry hazardous goods; routes on weekdays from a warehouse with their usual truck and driver; zones; time slots with a number of stops. At checkout buyers choose a date AND a slot: only on days their address receives, in windows that overlap its receiving hours, with room left. Accounts can be booked into standing slots.
* **Loads and scan-to-load** - load a truck from picked orders; frozen and chilled goods are refused onto a truck that cannot keep them cold, hazardous goods onto a truck not cleared for them, and weight, cube and pallets are totaled against the truck. Cartons are scanned on, and the truck cannot leave until every line is on it. Printed manifests for the cab.
* **Proof of delivery** - the driver's screen on a phone or tablet: what the customer took, their printed name and signature drawn on the screen, a photo, the time; refused goods go back into stock at the receiving dock through the ledger; money taken at the door on COD accounts; "not delivered" with the reason sends the order back for another load. Will-call collections are signed for at the counter the same way. Drivers keep recording deliveries while the office is paused by the license.
* **Phones: TEG Companion for the warehouse floor, TEG Rover for the driver** - two phone apps, paired with this site under TEG-WHOLESALE > Setup > Device pairing by scanning a QR code: one revocable key per phone, no passwords, and one phone can hold both apps. Everything a phone does runs as the person it belongs to, with that person's own permissions, through the same functions as the website - the stock ledger is still the only record of stock. TEG Companion looks things up by scanning a bin label, a case barcode or a SKU; counts (posted at once by someone who may post counts, otherwise put on a count sheet for a manager - counting is not posting); adjusts with a reason; moves stock between bins; receives at the dock against the purchase order (damaged recorded for the supplier, never stocked); picks by bin and barcode with short picks written back to the ledger; scans cartons onto the truck, shows what is still missing, and dispatches. When a load leaves, it goes to its driver's TEG Rover app as a ROUTE: every stop, in the load's order, however many there are. The driver records each stop on the phone - what the customer took line by line, refused or damaged units (back to the receiving dock), the printed name, the signature, a photo, money taken on a COD account, or why a stop could not be made - and the invoice is made from what was delivered, exactly as from the driver's browser screen. The office can change the order of the stops still to do while the truck is out (Rover routes); stops already done keep their place and proof, and the phone picks up the new order. GPS check-ins only while on shift; a delivery recorded without signal is sent when the signal returns; a route already on a phone keeps recording deliveries while the office is paused by the license. The apps themselves are distributed separately (Android first); the site side is included here and costs nothing per phone.
* **Invoices from what was delivered** - made the moment a delivery is signed for, from the quantities DELIVERED at the prices frozen on the order, due by the account's terms; e-mailed, printable, shown on the customer's account page with Ways to pay and Payments received; voided with a reason, never deleted.
* **Accounts receivable** - payments by any method (plus bank transfer, credit allowance and write-off for the office), applied to the invoices named or the oldest first, the rest held as credit; voids with a reason; a receipt e-mail when asked for. What each account owes is always worked out from invoices and payments, and the credit check uses it. Aging by days past due (CSV download), statements with a running balance (printed, e-mailed, and on the account page).
* **Sample data** - Settings > Sample data loads a made-up food-service and janitorial distributor to look around with: eight trade accounts, their buyers and about eleven weeks of steady orders - the older ones picked, delivered with a signature and invoiced, most paid, a few part paid, two running late - the same stretch a year ago for the year-on-year figures, two trucks (a box truck for the chemicals, a reefer for the chilled and frozen), four routes with delivery slots, a load on the road, a credit hold and an office hold, and a pick list open.

This is the third and last of the planned releases: the whole of a distributor's day, from the purchase order to the payment.

Data lives in the site's own tables, not in posts.

= License =

TEG-WHOLESALE is licensed like The Eldest Geek's Doctor tools. A 30-day Pro trial is baked in from the first run: it starts the first time the plugin runs on the site, and there is nothing to sign up for. A purchased code from theeldestgeek.com (annual or lifetime, single site or an agency pack) is entered under Settings > License. It is bound to the name and e-mail on the order and verified offline; a paid code is re-checked with the license server once a day and keeps working when the server cannot be reached.

Without a valid license - once the trial has ended, or if a license has been revoked - adding and changing records pauses. Nothing is lost: everything already recorded stays readable and can be printed and exported, and entering a license carries on exactly where you left off. The license also decides which updates can be installed: a lifetime or current license installs any version, and an expired one keeps installing every version released before it expired.

== Installation ==

1. Plugins > Add New > Upload Plugin, choose the zip, and activate. The tables, the warehouse roles and a Main warehouse with its receiving and quarantine bins are created, and the trial is already running.
2. Wholesale > Settings: The business, then Catalog (name your price tiers), then Access - keep ordering and receiving in different hands.
3. Wholesale > Warehouses & bins: make your bins and print their labels.
4. Add suppliers, then products with their pack sizes and barcodes (or import a CSV).
5. For the trade store: activation made the Wholesale page (/teg-wholesale/) - the catalog, the account and the application form in one place, with a Return button and the Wholesale menu at the top (Settings > Trade & orders chooses the page, its title and the Return button). Then set tax, order numbers, delivery lead time and pickup under Settings > Trade & orders and the ways you accept payment under Settings > Payments.
6. For delivery: Wholesale > Trucks & routes - add trucks, routes, give each zone its route, and add delivery slots. Settings > Delivery & invoices decides what a driver must capture and how invoices are numbered and sent. Give your drivers the Driver role.

Later versions arrive through Dashboard > Updates. The download is checked against its published SHA-256 before it is installed, and an update replaces the files in place without touching your data.

== Frequently Asked Questions ==

= Which scanners work? =

Any USB or Bluetooth scanner that acts as a keyboard, which is nearly all of them, with nothing to install. Phone and tablet cameras work in browsers with a built-in barcode reader (Chrome and Edge on Android) over https.

= Does it send barcodes or images anywhere? =

No. Barcodes are drawn by the plugin, camera images are read by the browser on the device, and no script is loaded from any other site.

= Can one customer see another's orders? =

No. Every page and action of the store works out the account from the buyer who is logged in, never from a number in the address, and looks every order, list, address and buyer up with that account in the query.

= Do customers see how much stock we have? =

No - In stock, Low or Backorder, never the number.

= What does a driver need? =

A login with the Driver role and a phone or tablet with a browser. Wholesale > Deliveries shows their load's stops; the receiver signs on the screen with a finger. Nothing is installed and nothing is sent anywhere else.

= Is the customer billed for what was ordered or what was delivered? =

What was delivered. The invoice is made from the quantities signed for at the door, at the prices frozen when the order was placed. Anything short at picking follows on its own order; anything refused at the door goes back into stock.

= Can customers pay by card? =

Yes, through your own Square, Stripe or PayPal account: tick the gateway under Settings > Payments, paste its keys and add its webhook. Customers then see "Pay this invoice online" on every invoice and "Pay your balance online" on their statement. Card details go straight to the gateway and never reach your site. A card at the will-call counter can go through Square Terminal.

= What happens to the credit on an account when a customer pays online? =

It is used first. If the account holds credit (money received and not yet applied), an invoice asks only for what is left and the credit goes on it with the payment. A statement payment is applied to the oldest invoices first, like a check "on account".

= Can my drivers take payment on the phone? =

Yes, with TEG Companion (Settings > Payments, Take payment in TEG Companion). After recording the delivery, the driver opens Take payment and sees the invoice of that stop: a card by Square payment link (QR code, text or e-mail), on a Square Terminal or in the Square app on an Android phone, recorded only once Square confirms it; cash or a check at once; Zelle, Venmo or PayPal wait until someone in the office presses Confirm received (Receivables > Payments). A driver sees only the invoices of the stops they delivered in the last day, never an account balance. The office (Record and void payments received) takes payment on any invoice, or on an account's statement balance - applied to the oldest invoices first, like a check on account.

= Can a driver count the same money twice - once on the delivery and again on the phone? =

No. Money taken at the door on the delivery screen (or in TEG Rover) goes on the stop's invoice in the same delivery, and the phone can then only take what that invoice still owes. A Zelle, Venmo or PayPal written on the delivery goes into the same "to confirm" list as one from the phone. Every payment the driver takes on the phone is added once to the delivery's "Collected at the door".

= Does a payment lift a credit hold? =

No. A payment lowers what the account owes at once, so new orders have that much more credit, but a credit hold stays until someone lifts it on the account's Credit tab.

= How do I refund a card payment? =

On the invoice screen, under Refunds: the amount (never more than is left of that payment) and a reason. It goes back through the gateway and the invoice re-opens. Payments you recorded by hand are still voided on Receivables > Payments.

= How do I run the shop, or write to my customers, in Spanish or another language? =

Open Settings > Language, pick the language under Shop language and save. Invoices, statements, credit notes, order and payment e-mails, the trade ordering site and purchase orders to suppliers are then written in it. If a language has no words yet, press Check for language updates: new translations download in the background, and the picker shows how much of the plugin each one covers.

Language packs need the Pro edition. Languages already on the site keep working. Until a language pack is installed everything stays in English, exactly as before.

= Can the phone apps run in Spanish? =

Yes, with the Pro edition and the Spanish pack, once you have the app update that adds languages: TEG Companion and TEG Rover then follow the language the phone is set to (or the one picked in the app). Lists and screens follow the phone; anything the phone saves or sends stays in the shop language. See Settings > Language.

= Can I use a different language on my own screen than my customers see? =

Yes. On your profile screen, under My language in the shop, choose your own. Only what you see changes: whatever goes to a customer stays in the shop language set under Settings > Language.

= Can I edit a stock figure directly? =

No, deliberately. Adjust it with a reason, or count it. Either way the change is a movement in the ledger, and the history says why the figure is what it is.

== Changelog ==

= 1.20.1 =
* Help: the Help Center now has one Shortcodes section listing every shortcode this plugin adds, with what each does and an example, and a question about it in the FAQ. No other change.

= 1.20.0 =
* Shortcodes: the trade store is now [teg-wholesale-catalog] (was [teg-wholesale-store]); the old name is not kept. Pages made by the one-click setup and the Wholesale page use the new name; [teg-wholesale-account] and [teg-wholesale-apply] are unchanged.
* Help Center: Help & Tutorials is now the shared TEG Help Center - the full manual (every screen, every settings tab) and a searchable FAQ, with a "?" on every screen that opens the help for that screen. Everything the old Help page said is in the manual. The page keeps its address (admin.php?page=twh-help), so bookmarks still work.
* Get support: a "Get support" button at the top of every screen (and in the WordPress bar) opens two choices, Report a problem or Request a feature. The short form sends the screen you came from, the business name and the WordPress and PHP versions with your message, files a ticket with The Eldest Geek support and e-mails a copy; the answer comes to the e-mail address you give. Ask a question or whether it already does something from the same screen. At most 5 messages per person and 20 per site an hour. The page is under Tools > Support & feature requests.
* One-click setup: on first activation (and from Settings > Sample data, Run setup again) a setup page saves your business details, makes the Wholesale page with its shortcodes and a menu, makes any missing staff roles, and can load the safe sample data that Finish removes again (unless you keep it). A shop that already has records never gets the sample. Help has a new First-time setup section. After this update an administrator sees a one-line notice offering the setup until they start it or press No thanks.
* Scheduled off-site backups (Settings > Backup): a backup every night at the time you set (default 02:30), kept in the private backup folder like any other and restorable the same way, and copied off-site if you choose - SFTP, FTP / FTPS, Amazon S3 / Wasabi / S3-compatible, or Dropbox. Keeps the last 14 plus one a week for 8 weeks, here and off-site; backups taken by hand and the safety copy before a restore are never pruned. Passwords and keys are stored encrypted and never shown again. Test connection, Run backup now, a status table, and a notice to administrators when the last scheduled backup failed or the last good one is more than 48 hours old. Off by default.
* What's new: when you have skipped updates, the What's new button on the Dashboard lists every release since the one you last opened, each under its version.
* In a live demo a red "Questions? Get help" strip sits at the top of every screen; it opens our contact form on the demo site (a demo shop cannot send e-mail itself).

= 1.19.1 =
* "What's new" no longer opens by itself after an update. The dashboard has a button "What's new in <version>"; press it to read the notes.

= 1.19.0 =
* The TEG Companion and TEG Rover phone apps can show their screens in another language when your shop has the Pro edition and a language pack. This needs the next update of the apps; until then nothing changes.
* Help Center and menu refresh.

= 1.18.0 =
* New Language screen in Settings. Pick the language your shop writes to its customers in.
* Each staff member can choose their own language for their own screens (on their profile, under My language in the shop). It never changes what a customer receives.
* The shop now has a language of its own for customer documents, e-mails and texts, so what a customer gets no longer depends on who clicked the button.
* Invoices, statements, credit notes, receipts, order and payment e-mails, delivery proof copies, the trade ordering site and the trade application forms all follow the shop language.
* Purchase orders to suppliers print in the shop language.
* Invoice terms and account notes are now saved in the shop language instead of the language of whoever created them.
* Language packs (Spanish first) arrive later and need the Pro edition. With no pack installed everything stays in English exactly as before.
* Shared pieces brought up to date: payments, phone payments and language support.

= 1.17.3 =
* The sample data is much richer: about three months of steady day-to-day trade (orders, deliveries, signed-for stops, invoices and payments on terms), plus the same stretch last year, so reports, charts and month comparisons look like a real working distributor.
* The sample accounts now behave sensibly: only a couple of accounts sit on credit hold and a couple of invoices are late, instead of nearly every order being held.
* Sample trucks are realistic (one can carry hazmat, one is a reefer) and delivery stops show a person's name as the signer.
* The sample online application shows a sensible address and a time from yesterday.

= 1.17.2 =
* TEG Companion reports can show older months too (this month, last month and up to 10 more; set how many in Companion).
* Shared pieces brought up to date: TEG Companion core 2.16.0.

= 1.17.1 =
* Payments: the currency symbol always matches the currency (a US shop never shows £).
* The app payments list in TEG Companion shows the date your region's way.
* Shared pieces brought up to date: payments core 1.4.0 and app payments core 1.2.2.

= 1.17.0 =
* Dates and times follow your region: month first in the United States (11/09/2026, 2:30 pm), day first in the United Kingdom (09/11/2026, 14:30), each EU country its own way - on every screen, print, e-mail, the buyer portal and in TEG Companion. Settings > Region sets them; WordPress's own date setting never leaks in. Saved dates and CSV files are unchanged.
* Delivery day choices at checkout and on orders read your region's way ("Mon, Nov 9" in the US, "Mon 9 Nov" in the UK and EU), and so does the "does not take deliveries on" warning. Delivery windows, receiving hours and route departure times show your region's way too ("8:00 am-10:00 am" in the US, "08:00-10:00" in the UK and EU).
* Scan and stock-adjustment lists show their times in your region's format; a truck-pool pick list note writes its date your region's way.
* TEG Rover dispatch, routes, the map and the visit record show dates and times your region's way.
* Online payments: a PayPal payment is checked against the right invoice before it is taken, and Square's payment notices are accepted whether your site address is written with or without www.

= 1.16.5 =
* A payment's reference reads right: a check number only on a check ("Check 30100"); any other way of paying shows its reference as "ref" ("Credit card, ref 30234"), never "Credit card Check 30234".
* On the demo site, an invoice and a statement carry no pay-online link while Square, Stripe and PayPal are all off.
* Sample data: the business has its own e-mail address on invoices (not the WordPress administrator's); the box truck carries the dry and chemical loads and the reefer the chilled and frozen ones, so both trucks are used; an order the route's truck cannot carry goes out on a second load instead of moving the whole route to the reefer; a delivered and paid order a month in the year before (from a year ago back), so "This year vs last year" has something to compare; the part-received purchase order is two days late, not two weeks.
* "More figures: Report cards" on the Reports screen (was "Reports cards").

= 1.16.4 =
* Square Terminal: a payment cancelled from TEG Companion is only shown as cancelled once Square confirms it; unconfirmed cancels are retried automatically and a forgotten checkout is cancelled after 15 minutes.

= 1.16.3 =
* Fix: removing the sample data takes its stock movements out through the stock ledger, so a bin that stays is set back to what its own movements say and Reports > Ledger check keeps agreeing. New for the TEG SHOPS demo: a real nightly reset (TWH_Sample::demo_reset, demo site only) that empties the shop and loads the sample fresh around today - no more stock growing every night, and no load left "Out on the road" from weeks ago.
* Fix: the sample's past loads all leave with their orders - an order the route's truck cannot carry (frozen lines) goes on a truck that can, so no empty load sits "Loading" on a day long gone.
* Fix: a payment reads "Check 30100", not "Check Check 30100", when the reference already starts with the method; the sample's references fit their method (a check number on a check, an ACH trace on a transfer, none on Zelle or cash).
* Fix: counts read right in the singular - "1 pick list open", "1 load on the road", "1 order on hold", "1 account on credit hold" and the like.
* Checked: with no card gateway on (Square, Stripe and PayPal all off) an invoice and its print carry no pay-online link.

= 1.16.2 =
* TEG Back Office: payroll lists your staff - the warehouse roles (manager, purchasing, receiving, stock, sales desk, picker / loader, driver, accounts) first, then anyone else allowed into the back office, then the administrators; nobody twice, trade buyers never.
* Shared modules brought up to date: TEG Companion core 2.13.0 (report card dates follow your date format), TEG Rover core 1.8.0 (Device pairing masks IP addresses).

= 1.16.1 =
* Take payment in TEG Companion: the office takes payment on an invoice or on an account's statement balance (applied to the oldest invoices first), a driver on the invoice of the stop they just delivered. A card by Square payment link, Square Terminal or the Square app on the phone, recorded only once Square confirms it; cash and checks at once; Zelle, Venmo and PayPal wait for the office to confirm them (Receivables > Payments, or a manager in the app).
* Money taken at the door and money taken on the phone are one record: the phone takes only what the stop's invoice still owes, a Zelle / Venmo / PayPal written on the delivery waits in the same confirm list, and each phone payment is added once to the delivery's "Collected at the door".
* A payment frees credit for new orders; it never lifts a credit hold (that stays a decision on the account's Credit tab).
* Licence check knows TEG Marketer (it was WP-MARKET) and the Back Office bank feed add-on.
* Fix: a payment recorded by hand (Receivables, money at the door) stores its currency again, not only in its region stamp.
* Payments module 1.2.0: a bank wire is recorded as "Bank transfer" under Other (key transfer, recorded by hand, never offered to customers in the US); wires recorded before keep their name.

= 1.16.0 =
* Take card payments online: trade customers pay an invoice, or their statement balance, through your own Square, Stripe or PayPal account (Settings > Payments). The "Pay online" link is on the invoice, the statement, the e-mails and the customer's account pages.
* Square Terminal at the counter: send what an invoice owes to the terminal from the invoice screen.
* An online payment is applied like a check: to the invoice it was for, or (a statement payment) to the oldest invoices first. Credit already on the account is used first, so a customer is never asked for money you already hold. Balances, aging, statements and credit limits follow at once.
* Refunds of card payments from the invoice screen, through the gateway, never more than was paid; the invoice re-opens. A card payment is refunded, never voided.
* Card money that arrives for an invoice already paid another way is kept aside ("not on the account yet") with a warning, until the office puts it on the account or refunds it.
* Payments CSV under Receivables > Payments. Payment secrets are never shown again in Settings and never go into a backup.
* Fix: a credit note that could not be issued no longer logs a PHP warning.

= 1.15.8 =
* Licence check knows the new TEG Total Auction Management (TAM) product.

= 1.15.7 =
* Back Office shows as Back Office in Setup; the pairing page is called Device pairing everywhere.
* The Help page is called Help & Tutorials in the menu, and the phone guide points to Setup > Device pairing.

= 1.15.6 =
* The TEG Companion app's Warehouse home shows its Receive, Count, Pick and Load buttons again (the shop was naming them differently from the app, so the app hid them all).

= 1.15.5 =
* The admin menu is grouped the same way as the other TEG shops: Help is now "Help & Tutorials" (under a new Tools heading), the phone pairing page is "Device pairing" (it was "Rover phones"), and Settings is the last row of Setup.

= 1.15.4 =
* The licence check and the updater now share one tested core: a slow licence server can no longer slow the shop down.

= 1.15.3 =
* Money in another currency is always written with its own symbol.
* Product names in the licence screen use the new spelling (TEG-DELI, TEG-FOODTRUCK, TEG-BUTCHER, TEG-BAKERY).

= 1.15.2 =
* Money in another currency is written with its own symbol on the TEG Rover cards.

= 1.15.1 =
* TEG Rover collects on an invoice in the currency it was issued in, and its cards count one currency at a time.

= 1.15.0 =
* Region setting: one tick switches the shop between the United States, the United Kingdom and the European Union - currency, dates, tax, address wording, spelling and the ways customers can pay. Invoices already issued never change. The sample data now reads as a US business.
* Where it is: Settings > Region. A setting you typed yourself (your own currency symbol, your own tax rate) is kept when you switch; only the ones still at the old region's default move. "Apply the region's defaults" sets them all, and asks first.
* Every order, invoice, credit note, payment receipt and purchase order keeps the money, dates and tax wording it was made with. Goods ordered in dollars are invoiced in dollars, whatever the region is by the time they are delivered. A statement prints in the money the account is billed in.
* European Union: a business customer in another EU country who has a VAT ID on their account is charged no VAT (the reverse charge), and the order and the invoice say so.
* Payments: Zelle and Venmo are offered in the US only, PayPal everywhere; the US also has ACH bank transfer and Cash App / Apple Pay / Google Pay, the UK bank transfer and cheque, the EU SEPA transfer. A method you accepted in another region is kept for a switch back, and a payment already recorded always shows as what it was.
* Address fields say ZIP code / State in the US, Postcode / County in the UK and Postal code / Region in the EU; the Region tab lists what each region asks of a distributor (resale certificates in the US, AWRS and zero-rated food in the UK, customer VAT IDs in the EU).
* Updating: a shop that had typed a pound or euro sign becomes UK or EU; everything else becomes the United States, with the tax it charged before.
* Totals and reports now count one currency at a time: after a region switch, money in the old currency is listed apart instead of being added in. The TEG Companion app shows every invoice in the currency it was issued in.

= 1.14.0 =
* Every customer now has one Customer notes box, on the desktop and in the Companion app: the general notes first, then the notes from their orders, deliveries, invoices and payments, with who wrote each one and which came from a Staff member on the floor (a driver, picker or warehouse hand). In this shop the box is on each account's Details tab (Customers > the account); the warehouse handheld has no customers screen, so there is nothing new on the phone.
* The general notes are the account's Notes, the dock notes of each delivery address and, in red, a credit hold with its reason. Below them come the customer's own note on each order, the office note, the driver's note at delivery, the note printed on an invoice, and the notes on credit notes and payments, each saying which order, invoice, credit note or payment it came from (a link).
* "Add a note" on the box keeps a note on the account, with who wrote it and when; "Remove" takes it out of the list (it is kept, with who removed it). The Notes field itself is unchanged.
* Deleting the plugin with "drop tables" switched on now also removes the Customer notes table.

= 1.13.1 =
* TEG Companion: a report card on the phone now opens the matching screen on the website. The sales cards open Reports > Sales, invoices to chase opens the overdue invoices, money taken opens the payments, money to come in opens Receivables > Aging, credit notes and voids opens the credit notes (or the void invoices if you have none), delivery slots opens the delivery slots, and the stock cards open the stock reports.
* Card names that fit a wholesale business: "Average invoice" instead of "Average sale", "Credit notes and voids" instead of "Refunds and voids", "Delivery slots booked" instead of "Booked ahead", and "Best order times by item". The busiest times card now says it counts when orders come in.
* The invoices to chase card no longer shows an empty "Quotes waiting" line, as this shop has no quotes.
* Clearer dates on the cards: "October 1" instead of "October 1-1", and "Jan 5-10" instead of "Jan 5 to Jan 10".

= 1.13.0 =
* New: Reports > Sales. Until now the shop showed no sales figures anywhere, only stock. This new tab shows, for any dates you pick, what you invoiced (before and after tax), how many invoices, credit notes for spoiled returns taken off on the day they were issued, the money you actually received, and what is overdue.
* TEG Companion: the Reports tab on the phone now has many more report cards, and each person picks which ones they see. They are grouped in sections - everyday, customers, money, deliveries, stock and, when TEG Rover is on, staff out on the road. Only "this month against last month" is on to start with; switch the others on as you like.
* New: a Reports cards page on the website (under the shop's Reports). It shows the same cards on one page. Compare with the last period, the same time last year or dates of your choice, set goals and see how close you are, download any card as a spreadsheet (CSV) or print the page.
* The cards built for a wholesale business: today so far, average sale, this year against last year, tax collected, busiest hours (when orders come in), repeat customers, lost customers, invoices to chase, money taken by payment method, money still to come in over the next 30 days, credit notes and voided invoices, delivery slots booked ahead, stock that has not sold, how fast stock turns over (with losses and write-offs), and when each product is usually ordered.
* New setting: Settings > Trade & orders > Reports > "Lost customers after N days" (30 to 730 days, 90 to start with). A regular account that has not ordered for that long shows on the lost customers card.
* New, optional: a monthly summary e-mail of your report cards. It stays off until you set it up and save it.
* Turning the plugin off now also stops its scheduled e-mails, including the monthly summary. Deleting the plugin with "Delete all data if this plugin is deleted" ticked also removes the report goals and settings.

= 1.12.0 =
* New: Import from CSV (Setup > Import from CSV). Bring in your trade accounts, products and suppliers from a spreadsheet saved as CSV. Match each column to a field (the matching is remembered for next time), then do a test run first: it shows exactly what would be added or changed and saves nothing. When it looks right, import for real. Changed your mind? Undo takes that import back out again.
* New: errands for your drivers and staff on the TEG Companion phone app. Send someone to pick something up - from a supplier, the bank, the post office - with a list of what to get, a spending limit if you want one, and how it is paid. On a purchase order you can choose "Pick this up" and the supplier and the outstanding items are filled in for you. The phone ticks off each item, takes a photo of the receipt, and the office confirms what was spent. TEG Rover stays off until you switch it on (Phones page).
* Sample data is much richer: 24 trade accounts and about 74 orders spread over the last three months in every stage, upcoming deliveries, paid, part-paid and overdue invoices, 13 purchase orders and some products running low - so every screen and report has something to show. It is added alongside your settings, which are left alone, and "Remove sample data" deletes exactly the sample records and nothing of yours.
* TEG Companion: the Reports tab on the phone has new report cards - this month against last month, average sale, this year against last year, busiest hours, takings by payment method and more.

= 1.11.0 =
* New: E-mail test mode (Settings > E-mail test mode). Turn it on before going live and every e-mail the site sends - invoices, receipts, reminders, status notes, staff alerts - goes to one address you choose and to nobody else. The subject starts with [TEST to ...] so you can see who it was meant for; the message is exactly what the customer would get. Administrators can switch it from the TEG Companion app too (Settings > E-mail test mode), and a red notice shows on every admin page while it is on. Text messages are not e-mail and still go out.
* TEG Companion: shared Companion core 2.4.0.

= 1.10.0 =
* Updates: an update whose manifest publishes no SHA-256 checksum is never offered or installed. DB 1.9.1.
* Privacy: resale certificates, proof-of-delivery photos and spoiled-return photos are kept in a PRIVATE folder under random names (the shared PRIVATE FILES module), opened only by staff who work with that account, delivery or credit note, or through a signed link that expires. They used to be Media Library files with public addresses.
* The older files still in the Media Library are hidden from the REST API at once. Settings > Private files shows a dry-run report of what the move will do (move, keep on the website, or clear a dead reference, plus look-alike files no record uses); nothing is moved or deleted until an administrator presses "Move these files now". A notice on the shop's screens says how many are waiting.
* Restoring a backup is all-or-nothing: the first row the database refuses rolls every table back, and the screen says which table stopped it.

= 1.9.0 =
* TEG Companion: the store chooses what the Warehouse home on the phone shows (owner 2026-10-28: too cluttered). The TEG Rover pairing page has a new section, **Companion home screen defaults**: Quick order, Truck pool, Receiving, Inventory, Picking, Loading and the truck scan - only what the shop has switched on - and "Reset to starter set". Ticked = shown by default; each person can still change it on their own phone. app/hello's `wholesale` module row carries `home` {v: 1, items: [{id, label, group, on}]}, only what that person may do. Starter set: Receiving, Inventory, Picking and Loading on (Quick order and Truck pool off), the truck scan on. Also brings the shared Companion core from 1.0.0 to 2.1.0 (the 2.0.0 migration of feat/companion-core; replies unchanged apart from `core`). tools/test-companion-home.php, tools/test-companion-home-wholesale.php.

= 1.8.2 =
* Licences for the new shops: TEG-EVENTCENTER, TEG-LASTDJ and TEG-FARM are known to the licence code, in lockstep with the rest of the family. A bundle licence that includes them is read correctly and names them on the License screen; nothing else changes.

= 1.8.1 =
* Get my license: Settings > License - enter the order number and e-mail to install your license; Check license; Release this website.

= 1.8.0 =
* The distributor workflow, every part behind its own switch under Settings > Distributor workflow (all off: nothing changes for a shop that does not work this way). See docs/DISTRIBUTOR-WORKFLOW.md.
* Quick order entry (website and TEG Companion): pick the customer, tick what they usually order, type boxes or units - no prices shown - saved for their next delivery day. Call them "work orders" if that is your word.
* Dispatch board: assign the morning's orders to trucks (the customer's usual truck is only the suggestion), estimated totals per truck, allowed delivery days per customer (warn or refuse), and "finalise" a truck's day to make its pick list by totals - the load follows when it is picked.
* Sold by weight: fixed weight (invoiced at the stated box weight) or catch weight (invoiced on the actual net weight read from the box's GS1 label at delivery, or typed). Orders and dispatch show estimates.
* Truck pool loading: a truck carries the day's totals per product; boxes are given to customers at the door.
* Box-by-box delivery (TEG Rover and the driver screen): each box scanned is assigned to that stop's order, over and short shown as you go, refused boxes stay on the truck; the invoice is made from the boxes delivered.
* Truck check-in at the end of the route: loaded - delivered - upsold - refused = what must come back, counted back into stock, with a variance report.
* Truck stock: extra boxes on the truck (optionally at a special price until a date), sold at the door onto that customer's invoice as an upsold line; a permitted driver may discount down to a floor, and every discount is recorded.
* Spoiled returns: a box brought back is credited on a CREDIT NOTE against the invoice it was billed on - the invoice never changes; the goods go to quarantine or are written off.
* Price at delivery (optional): invoice at the account's price on the day of delivery.
* Works with the 1.7 features: a box's weight is read from its GS1 label the way your GS1 mapping says (the customer's own mapping, if it has one), and every box scanned at the door is kept whole in the scan history with its lot and expiry.
* Invoices made at the door carry the fuel surcharge and take their number from your numbering add-on, like every other invoice.
* A credit note gives back its share of the fuel charge: a percentage charge in proportion to the goods credited, a flat charge only when the whole invoice has been credited. Credit note numbers can come from the numbering add-on too.
* For app builders: docs/DISTRIBUTOR-API.md lists every new phone route with examples.

= 1.7.2 =
* Your storefront now has a home: the plugin makes one page, /teg-wholesale/, when it is activated. You no longer make separate store, account and application pages yourself.
* The page has its own look, like the RepairShop page: a bar across the top with a single "Return to (your site)" button and a menu - Catalog, Quick order, Cart, Your account (Sign in for visitors) and Apply for a trade account. Staff also see links into the back office.
* Your customers' account and the application form live on the same page, and every link the shop sends - orders, invoices, invitations - points there.
* Already made your own store, account or application pages? Visitors to them are sent to the same place on the new page, so links in old e-mails keep working. You can switch that off.
* Settings > Trade & orders lets you choose the page, its title, and the Return button's words and address, or hand the page back to your theme. If something stops the page being made (for example a draft page already using that address), Settings says what and how to fix it.
* The page is made only once, even on a busy site, and deleting the plugin leaves it in place.

= 1.7.1 =
* GS1 barcodes: the long barcode on cartons and pallets (GS1-128) and GS1 DataMatrix are read field by field - the product (GTIN), lot, expiry, production date, serial, weight in kg or lb, count and the pallet's SSCC. The product is found by its GTIN, whether the website knows it by its unit EAN/UPC or its case code.
* The WHOLE barcode is stored exactly as scanned with every scan - receiving, counting, picking, loading, look-ups, purchase orders, order entry and the storefront - together with what it decoded to, on the receipt, count, pick or load line it landed on. Settings > Barcodes (GS1) has the scan history (search by barcode, lot, serial, SSCC or GTIN).
* Lots: a received carton whose label carries a lot, expiry, serial, weight or SSCC becomes a lot record (shown on the receipt and under Settings > Barcodes (GS1)), so a recall or a short-dated check is one search. An undone carton is a negative lot record, never a deletion.
* The mapping - which Application Identifier means what, how long it is, its type and where its value goes - is a table under Settings > Barcodes (GS1), with a "Test a barcode" box that shows the raw barcode, each field and where it goes. The standard table is filled in; a supplier or a customer can be given its own mapping.
* Scanners that cannot send the invisible GS1 separator: <GS>, {GS}, ~ and ]C1 are understood, and any other substitute can be added. The bracketed form (01)...(10)... can be typed.
* TEG Companion 0.4.2 decodes the same way on the phone (shown on the receive, count, pick and load screens, offline too) and sends the whole barcode; the website decodes again and its answer is the one kept.

= 1.7.0 =
* Fuel surcharge: a fuel charge on its own invoice line, set under Settings > Fuel surcharge - a percent of the goods delivered (with an optional minimum and maximum), a flat amount per invoice, or a flat amount per delivery stop. Taxable or not, and the words on the line are yours (default "Fuel charge").
* Rate history: add the new rate with the date it takes effect whenever diesel moves; each invoice uses the rate in effect on its own date.
* Per account: an account can be exempt, or have its own mode and amount - which works even with the shop-wide surcharge off, so you can charge just the accounts you name. Set many at once by pasting account numbers and amounts.
* Issued invoices never change: the rule, rate and amount used are stamped on the invoice when it is made. Refused goods carry no fuel in percent mode, and a will-call collection carries none at all.
* The fuel charge shows on the printed and e-mailed invoice, in the customer's account pages, and in the invoice summary TEG Rover gets back after proof of delivery.
* For add-ons: document numbers can come from an add-on. The twh_document_number filter may supply an invoice's, order's (or any document's) number - it is told the kind, the row and the date (an invoice's delivery date) - a second filter, twh_document_number_taken, lets an add-on allow a number again in a narrower scope (e.g. once a year) for documents never looked up by number alone, and TWH_Settings::reserve_sequence() gives an add-on its own counter that two people at once can never both draw the same number from. An empty, duplicate or too-long answer falls back to the usual numbering, and nothing changes for a site without such an add-on.

= 1.6.0 =
* TEG Companion, the warehouse handheld: a Warehouse home listed first on the phone, with what is waiting on the floor for what the person may do (receiving, picking, loading, counting) and "scan the truck" to start loading from the truck itself.
* Loading stop by stop: a truck is loaded last stop first (the first delivery ends up by the doors), each carton goes on the stop being loaded, in the stop order the office set (a resequenced load is followed). A carton for another stop, one that is not on this load (the phone says which truck needs it), one already all on, or more than is still to go on is refused and nothing is written.
* The truck check is enforced: when a load has a truck, a carton is only loaded with that truck's label scanned - no truck, or the wrong one, is refused before anything is written, even for a scan that waited offline on the phone. There is no override.
* Two handhelds loading the same truck at once can no longer lose or double-count a carton: each scan holds the load while it is written.
* Blind counts everywhere: anyone who may not post counts never sees a stock figure on the phone - not on a product, a bin, a count, an adjustment, a move or a refusal. Only people who may post counts see what the books say.
* Counts that arrive late (a phone that was offline, a count sheet posted later) are booked against what the bin held at the moment it was counted, so nothing is counted twice; a count older than the bin's last count is kept on record but changes nothing.

= 1.5.0 =
* The admin menu is grouped: Dashboard first, then ORDERS (applications, customers, trade orders), WAREHOUSE (cycle counts, labels, picking, receiving, stock, warehouses & bins), DELIVERY (deliveries, loads, trucks & routes, TEG Rover, Rover routes), BUYING (products, purchase orders, reorder, suppliers), SALES & MONEY (invoices, receivables, reports) and SETUP (help, import/export, settings, Rover phones), alphabetical within each group. The group headings are bold capitals in the open menu, the hover fly-out, the collapsed menu and on a phone; a heading only shows when you can open something under it. Every page keeps its address.

= 1.4.0 =
* Phones. TEG Companion (the warehouse floor: look-ups, counts, adjustments, moves, receiving against the purchase order, picking, scan-to-load, missing items, dispatch) and TEG Rover (the driver: the load as a route of stops, proof of delivery at every stop) pair with the site under TEG-WHOLESALE > Rover phones - one key per phone, for either app or both. Each phone does only what its person may do on the website, through the website's own functions.
* A dispatched load goes to its driver's phone as a route by itself (Settings > Delivery & invoices: "Send loads to the driver's phone"), or with "Send it to the driver's phone" on the load. Rover routes shows each route's progress, lets the office change the order of the stops still to do, and keeps every version; the load's manifest follows. The live map shows the stops.
* Proof of delivery from the phone is the same record as from the browser: line by line, refused and damaged units back to the receiving dock, name, signature, photo, COD money, and the invoice made from what was delivered.
* A count from a phone by someone who may count but not post counts goes onto a count sheet for a manager (Cycle counts), never straight into the ledger.
* Backups never include the phones' keys, and a restore never brings a revoked phone back.

= 1.3.2 =
* The license server moved to wildwebwizards.com (licenses, trials and site checks now go to https://wildwebwizards.com/cgi-bin/postlicense.py). Nothing changes for your license.

= 1.3.1 =
* The admin menu now reads TEG-WHOLESALE, like the other TEG shops.

= 1.3.0 =
* "What's new": the shop screens show what changed once per staff member per version, then a small "What's new" button on the Dashboard reopens the same notes in a dialog. (Buyer sign-in already runs through ordinary WordPress accounts, not a shared demo login, so there is nothing per-browser to track here.)

= 1.2.2 =
* License check-in is more patient with a slow or blocked connection: a failed check is remembered for a few minutes instead of trying again on every page, and the License panel now shows the actual connection error instead of guessing it is your internet. A license still awaiting its first check-in is now labeled AWAITING VALIDATION rather than a plain revoked-looking state. Entering a license code checks in right away and says how it went.

= 1.2.1 =
* American English throughout: every screen, e-mail, printout and help text now uses American spelling (labor, color, license, canceled, catalog, authorize and the rest). Nothing you have saved changes - settings, records and translations carry over as they are.

= 1.2.0 =
* Licenses are now tied to your site. When you enter a paid code it checks in with the license server once and binds to this site's web address; after that it keeps working normally even if the server is unreachable. Your data is never locked away - everything stays readable and can be exported at all times.
* A brand-new install (or a copy placed on a different web address) that has a paid code but has never checked in stays in read-only mode for the paid features until it can reach the license server once. Settings > License says so and "Re-check with license server" completes it. Sites that were already licensed and running are carried over automatically on update - nothing to do.
* The trial is unchanged: it still works fully offline from the first run.
* The value features now pause together when a license is not active: the business exports (products catalog CSV, reports, the receivables aging report), taking a new backup, and placing a new trade order through the storefront. Your drivers and customers are never blocked: proof of delivery, every print (picking lists, manifests, invoices, statements, labels), the full backup download for portability, and viewing an order all stay available, and an order already placed still moves through approval, picking and dispatch.
* Settings > License shows this site's address, whether it is validated, and when a license is in use on more sites than it was sold for.

= 1.1.1 =
* Restoring a backup works again. Every backup was being refused as "never finished" because its header could not be read; the header is now read correctly, so a backup taken on this site restores.

= 1.1.0 =
* Phase 3: picking, delivery, invoices and receivables. Everything added in new tables (trucks, routes, zones, slots, account_slots, pick_lists, pick_lines, loads, load_lines, deliveries, delivery_lines, invoices, invoice_lines, payments, payment_lines); nothing earlier reshaped, and an update keeps every row.
* Picking: pick lists from allocated orders, planned bin by bin in walking order, printable; pick by scanning the bin label and the product; a short pick counts the bin to what it holds (a count movement, reason short_pick), re-plans the rest from other bins and backorders only what no bin has, split into its own order when the list is completed.
* Trucks, routes, zones and delivery slots; buyers choose a date and a slot that fits the address's receiving days and hours and has room; standing slots per delivery address. An address whose zone has no route is offered its receiving days, as before.
* Loads: planned from picked orders; frozen/chilled and hazardous goods only on a truck that can take them; weight, cube and pallets against the truck; scan-to-load, and no dispatch until every line is on; printed manifests.
* Proof of delivery on the driver's phone: quantities taken, printed name, signature, photo and time; refused goods returned to stock through the ledger; money collected at the door; failed stops go back for another load; will-call handovers at the counter. The driver's action stays open while the office is paused by the license.
* Order statuses Picking, Picked, Out for delivery, Delivered and Refused; an order can no longer be canceled or edited once picking starts.
* Invoices made from what was delivered, at the frozen prices and the order's tax rate, due by the account's terms; e-mailed, printed, voided with a reason; on the customer's account page with Ways to pay and Payments received.
* Receivables: payments applied to named invoices or the oldest first, the rest held as credit; voids; receipt e-mails when ticked; what an account owes worked out from invoices and payments (and used by the credit check); aging by days past due with CSV; statements printed, e-mailed and on the account page.
* Payment methods follow the family spec throughout (TWH_Payment_Methods): accepted, offered per invoice, recorded with who, when and a note; bank transfer, credit allowance and write-off recordable but never offered.
* New roles Picker / loader, Driver and Accounts receivable, and permissions for picking, dispatch, delivery, invoicing and payments; sites with saved permissions get the new ones on the roles that should have them (migration 1.2.0).
* Sample data: trucks, routes and slots, two drivers, and the older sample orders picked, delivered, invoiced and partly paid.

= 1.0.0 =
* First release: the catalog with pack sizes, price tiers, quantity breaks and a barcode for every pack, with UPC-A and EAN-13 check digits verified on entry; CSV import and export with a check-only run.
* Inventory as an append-only ledger: receive, adjust, transfer, pick, return and count movements, on hand kept in the same transaction and a ledger check that proves they agree; warehouses and bins with receiving and quarantine bins; on hand, allocated, available and on order; holds; negative bins refused.
* Cycle counts by scanning, blind by default, with variances posted as count movements against the bin as it stands.
* Suppliers, purchase orders (draft, sent, partially received, received, closed, canceled), printable and e-mailed, and receiving by scanning against the order with over, short, damaged and unordered lines.
* Reorder suggestions net of what is already on order and on drafts, turned into draft orders per supplier.
* The scanner component for keyboard-wedge scanners and phone cameras, and Code 128 and EAN-13/UPC-A labels drawn as SVG.
* Dashboard, low stock, valuation and ledger reports; backup and restore; the license gate, self-hosted updates and the sample distributor.
* Trade accounts: tier, contract prices, terms, credit limit and credit hold, sales rep, resale certificate with expiry (expired = taxed and flagged), several delivery addresses with zone, receiving days and hours and dock notes, and several buyers with order limits and approval limits.
* Account applications from a public form with certificate upload, honeypot and time trap; approve (account, address and first buyer made, set-password e-mail sent) or decline with a reason.
* The trade store and account pages ([teg-wholesale-catalog], [teg-wholesale-account], [teg-wholesale-apply]): account prices, pack and minimum, In stock / Low / Backorder, search and filters, a quick order pad with scanning, CSV upload, saved lists and reorder; a cart with case rounding, minimums, the credit check, receiving-day delivery dates, will-call, PO numbers and notes.
* Orders: allocated on placing, shortfalls as backorder lines, prices frozen on the line, approval by the account admin, credit holds, cancel releases the stock; staff order entry and line edits, substitution and backorder splitting; confirmation and office e-mails.
* Settings > Payments: the payment methods you accept, printed as Ways to pay.
* Customers keep ordering while the office is paused by the license (twh_portal_* and twh_public_* actions).
