=== TEG-BUTCHER — Custom & Wild-Game Meat Processing ===
Contributors: theeldestgeek
Tags: butcher, deer processing, custom exempt, meat processor, cut sheet
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.6.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The back office for a custom meat processor: deer in season with the tag and game-check number, livestock for farmers and the people who bought a share, cut sheets the customer fills on their phone, hanging-weight bills, NOT FOR SALE labels, the cooler and the freezer, Hunters for the Hungry, and a portal.

== Description ==

An animal comes in; its owners' meat goes out. TEG-BUTCHER keeps the paper trail in between - who owns it, what they want, what it weighed, where it is - so the phone stops ringing all day in deer season.

It HELPS YOU KEEP RECORDS. It does not make anyone compliant: check what your inspector, VDACS and DWR (or your own state) ask of you.

* **Drop-off** - the hunter or the farmer, species, sex, the tag, the game-check confirmation number (or "checked by phone, number to follow", chased by the office), condition notes, the cooler rail, a deposit, the pickup-policy tick. The ticket gets its number and the cut-sheet link.
* **Cut sheets** - one template per species (text you can edit), filled by the customer from a link or QR code with no password, or by the counter. Moving the ticket to Cutting LOCKS the sheet; after that only a manager can change it, with a reason, and every change is logged.
* **The animal** - live, hanging and packaged weights (typed, or read off the scale's printed label with a barcode scanner - there is no scale link), days hanging, yield, photos kept in a private folder.
* **Shares (Pro)** - a farmer's live animal sold in whole, half, quarter or eighth shares: each buyer is its own ticket with the date they became the owner, their own cut sheet, bill and boxes. An owner cannot be added after the slaughter date, and shares never add up to more than the animal.
* **Billing on weight** - a kill fee plus a price per pound of hanging weight (or a flat price per deer), add-ons by packaged pound (summer sausage, snack sticks, jerky...), the deposit credited. The bill is made when the ticket reaches Ready and never remade once paid.
* **Labels** - NOT FOR SALE custom labels with the owner, ticket, cut, net weight and date, as a PDF for any printer or ZPL for Zebra-style 4x2 / 4x6 thermal printers (203 dpi).
* **Capacity and slaughter days** - a daily deer cap and the cooler's head count (warnings, or a hard stop if you want one), slaughter days with their head per day, holds that wait for a deposit and lapse on their own.
* **Freezer locator** - freezer, shelf and boxes for every ready ticket; the "ready and not collected" list.
* **Hunters for the Hungry** - a donated deer (or part of one) costs the hunter nothing; its bill goes to the program and is reported apart.
* **Niggles, not dunning** - "your cut sheet is still missing", "game-check number please", "your order is ready" - each sent only when you press the button. No overdue notices, no late fees, no automatic chasers.
* **Customer portal** - `[teg-butcher-account]`: the customer's tickets, their cut sheets while still open, their bills and pay online.
* **Getting paid** - Square, Stripe or PayPal (keys you add; test mode first), cash, check, Zelle; one ledger so a webhook sent twice is booked once.
* **TEG Companion (Pro)** - the phone in the cooler: today's drop-offs, the ticket with the cut sheet read-only, one stage on, the hanging weight, a package, a photo, and Take payment at the counter.
* **TEG Rover deliveries (Pro)** - off by default; for shops that deliver boxes.
* **Reports, permissions, backups, site move, Help Center** - the custom-exempt log as CSV, H4H totals, yield; roles for the cutter, the counter and the office; nightly backups with an off-site copy; a searchable manual with a "?" on every screen; a removable sample shop.

Standard: deer plus one livestock species, tickets, cut sheets, labels, deposits, the customer portal, payments, reports and the CSV importer (Import from CSV). Pro adds every species, shares and the slaughter calendar, TEG Companion and TEG Rover.

Data lives in the site's own tables (wp_tbu_*), not in posts. Ratings and reviews are off.

= License =

TEG-BUTCHER is licensed like The Eldest Geek's Doctor tools. A free 30-day Pro trial comes in the plugin and starts the first time it runs; there is nothing to sign up for. A purchased code from theeldestgeek.com (annual or lifetime) is entered under Settings > License. It is bound to the name and e-mail on the order and verified offline against a public key; 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, adding and changing records pauses. Nothing is lost: everything already recorded stays readable, backups can be downloaded, and customers can still see their tickets and pay their bills, and the labels for meat already in the cooler still print.

== Installation ==

1. Plugins > Add New > Upload Plugin, choose the zip, and activate. The tables are created and the cut-sheet templates are put in.
2. TEG-BUTCHER > Settings: Business (pickup hours, permit number), Prices, Intake and capacity, Labels, Payments.
3. Check the cut-sheet templates against your own paper cut sheet.
4. Make a page with `[teg-butcher-account]` and pick it under Settings > Business (the one-click setup makes it for you). It is the only shortcode (full list: Help Center > Shortcodes).
5. To look around first, load the sample shop at the foot of Settings > Business. Removing it deletes only its own rows.

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 ==

= Does it make me compliant? =

No. It helps you keep the records - tags, game-check numbers, owners and the date they became owners, weights, NOT FOR SALE labels. What your inspector asks for is for you and them.

= Does it talk to my scale? =

Not in 1.0. Type the weight, or scan the barcode the scale prints on its label. A typed weight is marked "manual".

= Can a share buyer be added after the kill? =

No. Custom-exempt meat goes back to whoever owned the animal before slaughter, so the date they became the owner must be on or before the slaughter date.

= Does it chase people who have not picked up or paid? =

No. Nothing is sent unless you press the button.

== Changelog ==

= 1.6.2 =
* The customer page shortcode is now `[teg-butcher-account]` (it was `[teg-butcher-portal]`); put the new name on your customer page. The old name no longer works.

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

= 1.6.0 =
* Send a ticket's boxes out with a driver in one press: open a ready ticket (or its job page) and press Send with Rover. The delivery is filled in from the ticket's customer, and it can only go to that customer. If a delivery is already open for the ticket, the button takes you to it instead.
* New pickup for collecting boxes from a customer. It never changes the ticket's stage.
* When a driver cannot finish, they pick a reason (nobody there to take the boxes, could not keep the boxes frozen, the boxes did not match the ticket, and more). The ticket stays as it was and the job page timeline shows why.
* When a driver finishes a delivery, a Ready ticket moves to Picked up, once (a donated ticket, or one that has already left Ready, is left alone and the timeline says so). Your customers are not texted or e-mailed, and a note is added to their record only if you turn that setting on.
* The phone side needs the TEG Rover app version 1.63 or newer, which is on its way to the app stores.
* Help has a new section on sending a delivery or pickup.

= 1.5.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.
* A quote or invoice opened on the phone always shows exactly what your customer gets, in the shop language.
* Help Center and menu refresh.

= 1.4.0 =
* New Language screen in Settings. Each staff member can choose their own language for the screens they use (Users > Profile).
* The shop has a language of its own for what customers receive - cut-sheet forms, tickets, invoices, pay pages, e-mails and texts - so what a customer gets no longer depends on who clicked the button.
* Language packs (Spanish first) arrive later and need the Pro edition. With no pack installed everything stays in English, exactly as before.
* The NOT FOR SALE labels always print in English, on purpose.
* Help has a new Language section in the manual and the FAQ.

= 1.3.2 =
* TEG Companion reports can show older months too (this month, last month and up to 10 more; set how many in Companion).

= 1.3.1 =
* Payments: the currency symbol always matches the currency (a US shop never shows £).
* TEG Companion's payments list shows the date your region's way.

= 1.3.0 =
* Dates now follow your region: US shops see 03/14/2026 and 2:30 pm, UK shops 14/03/2026 and 14:30, EU shops their country's own way - on every screen, print, e-mail and in TEG Companion and TEG Rover. WordPress's own date setting no longer leaks in. Leave the date format blank to follow the region, or type your own; documents already issued keep the dates they were issued with.
* TEG Companion now learns the shop's date format when it connects, so the phone writes and reads dates the same way the shop does.
* A held slot's "until" date on the intake screen is written your region's way.
* Off-site backups and "What's new": their dates and times follow your region too.

= 1.2.0 =
* TEG Companion and TEG Rover keep working out of signal (a walk-in cooler, a back road): a change made on the phone waits on the phone and reaches the shop once, with the time it really happened, and the ticket's timeline says "Recorded offline" when it waited. A resend never books anything twice.
* Device pairing works when only TEG Companion is switched on (it used to refuse with "This shop does not hand out that kind of phone key"), and the form no longer asks which kind of phone when there is only one.
* The job page tells a ticket whose bill has not gone out yet apart from one that is paid.
* Payments: a PayPal payment is only taken when it belongs to the bill it says it is for, and Square's payment notices are accepted whether your site address is written with or without www or https.
* Help: links inside a help page land on their heading.
* Shared modules brought up to date: TEG Companion 2.14.0, TEG Rover 1.9.1, payments 1.3.0, job page 1.1.0, help 1.2.0 (all of them, as the other TEG shops have).
* Everything in 1.1.1 below (estimated price before Ready, the sample shop's name, Companion Take payment 1.2.1).

= 1.1.1 =
* A ticket not billed yet (in the cooler, cutting or wrapping) now shows its estimated price - from its share of the hanging weight and the add-ons packed so far - on the ticket page, the job page and in the Companion app ("Estimated total"), instead of "Total $0.00" beside a deposit still owed. The bill itself is still made at Ready.
* The sample shop gives a shop still called by the site's own name a shop name ("Stony Creek Meat Processing"), so the Companion app and the bills do not show the website's title; Remove sample data puts the old name back. A shop with its own name keeps it.
* Shared module brought up to date: Companion "Take payment" 1.2.1 (a Square Terminal checkout the terminal never picked up is canceled at Square after 15 minutes, and a cancel is only shown as canceled once Square confirms it).

= 1.1.0 =
* TEG Back Office: lists the shop's people - your Cutters, Counter and Butcher office staff, anyone you let open the back office, and the administrators - instead of guessing from WordPress capabilities.
* Shared modules brought up to date: payments 1.2.0 (pay-by-QR codes under Ways to pay; a bank transfer can be recorded by hand), Companion 2.13.0 (report card dates follow your date format), Rover 1.8.0 (Device pairing masks IP addresses), site move and licence check.

= 1.0.7 =
* A share is shown and billed at its own part of the hanging weight: a quarter of a 762.50 lb steer shows 190.63 lb (quarter share of 762.50 lb) on the ticket and in the Companion app, and Billing says "By hanging weight (quarter share)".
* The invoice line no longer repeats the weight: "Processing by hanging weight", 120.50 lb @ $1.00/lb.
* Niggles: in "Deposit not paid" every row says what it is - "Deposit invoice ... - ticket ..." or "Deposit invoice ... - slaughter-day hold".
* A deer checked in without a state (an import, the app) is recorded as killed in the shop's state, as the drop-off form already defaulted, so the game register's State column is never blank.
* A farmer's customer page lists the animals they sold, with their owners.
* "Hunting license no." in US English.
* The sample shop: plain names, every deer weighed and with its state, the steer's quarters packed out, the program billed for a donated deer, a booked slaughter day with its deposit paid, early-season and last-season deer for the report cards, drop-offs at believable hours; a phone already on file is never reused.
* The readme now says what the licence does: the customer portal and the CSV importer come with Standard; Pro adds every species, shares, the slaughter calendar, TEG Companion and TEG Rover.

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

= 1.0.5 =
* Back Office shows as Back Office in Setup; the pairing page is called Device pairing everywhere.

= 1.0.4 =
* The free 30-day trial now really comes with the plugin. Up to 1.0.3 the trial file in the download was empty, so a new install had no trial and was paused until a licence was entered.

= 1.0.3 =
* The admin menu is grouped the same way as the other TEG shops: Help is now "Help & Tutorials", the phone pairing page is "Device pairing", and Settings is the last row of Setup.

= 1.0.2 =
* In the Companion app, Zelle, Venmo and PayPal payments wait for the office to confirm them; a manager can apply them at once.
* Invoices can show pay-by-QR codes (Venmo, Cash App, Zelle) under Ways to pay - Settings > Payments.
* The licence check remembers its last good answer, so a short connection problem does not lock the shop.

= 1.0.1 =
* 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).
* Take payment from TEG Companion charges in the invoice's own currency and refuses a card in a different currency before anything is charged.

= 1.0.0 =
* First release: drop-off with tag and game-check number, cut sheets (customer link, lock at cutting, manager override with a logged reason), the animal record with weights and photos, shares with owner-since dates (Pro), billing on hanging weight with add-ons and deposits, NOT FOR SALE labels (PDF and ZPL), capacity and slaughter-day holds, the freezer locator, Hunters for the Hungry, niggles sent by hand, the customer portal (Pro), payments, TEG Companion butcher module (Pro), Rover deliveries (off by default), CSV import of customers and last season's tickets, report cards, the sample shop, backups and the Help Center.
