=== TEG Creator ===
Contributors: theeldestgeek
Tags: artist, author, art gallery, limited edition, consignment
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.10.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An original is sold once - on your site, at your booth and at every gallery - and you always know where it is. The back office and shop for working artists, studios, galleries and co-ops, inside WordPress.

== Description ==

* **For every working creative** (1.9.0): painters, illustrators and makers; photographers and videographers; musicians and performers; authors and poets; art teachers; inventors and product makers. Settings > The studio asks "What kind of creative are you?" and the studio then speaks your language - an author's studio says Books, Signings & readings, Bookstores and Readers. One plugin, one license.
* **Works catalogue**: originals (one of a kind), limited editions (each number N of M its own sellable piece), open edition prints and merch, with pictures, medium, size, year, series, price and price history. QR labels for every piece.
* **Sold once**: every original and every edition number is one record with a UNIQUE key in the database. The website, the booth phone (TEG Companion), the studio till and a gallery reporting a sale all claim the same key - the second sale fails, atomically.
* **Where is it**: studio, a gallery on consignment (with the agreement and due-back date), a show, lent, at the framer, storage, sold - dated, with overdue flags; what each gallery holds and owes you.
* **Online shop**: one-of-a-kind works reserved while the buyer pays (Square, PayPal or Stripe through the shared payments module - card data never touches your server), shipping or pickup, sales tax by ship-to state where you are registered.
* **Booth sales on TEG Companion** (both editions): browse the catalogue or scan a label, sell now (cash, your own reader) or take payment with a pay link the buyer opens on their phone; each show's own sales tax rate.
* **Certificates of authenticity**: PDF with the picture, edition N/M and a QR code to a public verify page; reissued to the new owner on resale.
* **Viewing rooms and reservations**: a private page of chosen works for one collector behind a link that runs out; the collector reserves a piece and it is held for them until you sell or release it, with an optional deposit paid online.
* **Price lists, tearsheets and the insurance inventory**: PDF price lists and one-page tearsheets (with "Price on request" where you want it), and every piece you still have by where it is, with its insured value.
* **Collectors**: buyers kept with their consent and its proof; a TEG-MARKETER source with "bought from series X" and waitlist tags.
* **Pro "Gallery & Co-op"**: consignment IN for many member artists - the split written at the moment of sale, payouts, private-link statements, the trust balance per artist and the 30-day overdue flag. A template consignment agreement ships with a "have a lawyer review this" note; TEG Creator keeps records and never claims legal compliance.

Standard (the solo artist / small studio, up to 3 artists) and Pro (Gallery & Co-op) are the two editions of one plugin.

= Not in this beta =

* Print-on-demand (Prodigi / Printful).
* Offline card payments at shows. Booth payments are online only: Square's offline mode is a seller-onboarded beta, offline payments expire after 24 hours and every decline is the seller's loss.
* Square POS handoff and Square Terminal from TEG Companion: they come with the shared take-payment module (the shop side is ready as a seam, TAR_AppPay). Today: cash, your own reader, and the pay link.
* A hosted option (TEG installs and hosts).
* Member dues, a gallery-sitting rota, commissions with deposits, workshops.
* A site move carries each work's main picture only.

== License ==

TEG Creator is licensed like the rest of the TEG family: a 30-day trial is baked in (the build in the repository carries a placeholder trial file; a release carries the real one), then an annual or lifetime licence, Standard or Pro, single site or a five-site pack.

== Installation ==

1. Plugins > Add New > Upload, choose the TEG Creator zip, install and activate.
2. The TEG Creator menu appears, the tables are created, and two pages are added: the Shop (/teg-artist/, shortcode `[teg-artist-shop]`) and Verify an artwork (/verify-artwork/, shortcode `[teg-artist-verify]`). Full list: help/manual.md, Shortcodes.
3. TEG Creator > Settings: your studio's name and address, region, currency and tax; Settings > Payments for Square / PayPal / Stripe.
4. Artists: add yourself. Works: add your first work. Settings > Data > Load the sample studio to try everything on a test site.

== Companion app ==

Under Setup > Device pairing, pick a person, name the phone and press Add a phone; scan the QR code (or type the 9-digit code) in TEG Companion. The Booth sales module lists the shows, the catalogue with what is left of each edition, scans piece labels, sells (cash or your own card reader) and takes payment by pay link. The generic Shop module shows collectors and pieces; moving a piece is a stage change. Nothing is e-mailed or texted from the phone.

TEG Rover is part of the plugin, switched OFF by default: Setup > Device pairing has the setting **Rover (drivers / field staff)**. Off: no Rover phone can be paired, the Rover routes answer 404 and the Companion app shows no Rover module; the studio works exactly as before. A studio's pieces, sales and shows are not trips, so nothing makes a Rover job by itself (an empty stop source); once on, the office can type an art delivery, an installation visit or the pick-up of a commission (an address, a time, a checklist) and send it to a helper's phone - never a collector record. TEG Companion pairs on the same Device pairing page (QR or 9-digit code, namespace tar/v1 as before); phones paired before keep working - their keys move onto the one key store on update (DB 1.0.1). Phone keys are never restored from a backup. Shared Rover core 1.5.0 and Companion core 2.5.0 (generated).

== Frequently Asked Questions ==

= What stops the same painting being sold twice? =

The database. Each piece has one row in a claims table with a UNIQUE key on the piece; a sale - or a web checkout's reservation - is an INSERT against that key. Whichever channel writes first wins; the second gets a "just sold" answer and nothing of its sale is kept. The tests race two database connections at the same piece to prove it.

= Does it file my sales tax? =

No. It charges the rate you give each show (and the rates for the states you list for deliveries), writes the rate on every sale line, and adds it up per show. Registering and filing stay with you and your accountant.

= Is the consignment agreement legally sufficient? =

It is a template. Artist-consignment law differs by state; have a lawyer review it before you use it.

= Can the studio run in Spanish? =

Yes. Open Settings > Language and pick Español as the Shop language. Each person can still choose their own language for the screens under Users > Profile > My language in the shop; receipts, certificates, price lists and e-mails to collectors always use the studio language. More languages appear in the list as they become available, with no update to install. Language packs need the Pro edition. Languages already on the site keep working. Anything not translated yet shows in English.

= Can the phone apps run in Spanish? =

Yes, once the next TEG Companion and TEG Rover update is out and your studio has the Pro edition and a language pack. Their screens then follow the language of the phone. Everything that is saved or sent - and a sale you open on the phone - stays in the studio language, exactly as your collector gets it. Without the Pro edition the apps stay in English.

= My WordPress is in Spanish but the studio is still in English. =

That is on purpose while less than half of TEG Creator is translated: Same as WordPress only switches by itself from 50%. Pick Español under Settings > Language (or Users > Profile > My language in the shop) to use it now.

= Who does TEG Back Office payroll list? =

Your studio's helpers: Studio / Gallery Staff, managers and administrators. Collectors and galleries are never on payroll. There is no time clock, so hours are typed on the payroll run.

== Changelog ==

= 1.10.1 =
* Demo mode now takes no payment at all. With Demo mode on (Settings > Data), even with Square, Stripe or PayPal set up, a visitor sees "This is a demo shop - no payment is taken." where the pay buttons were, and no card is charged, nothing is refunded, nothing is sent to a Square Terminal and no payment provider is contacted. Orders and reservations can still be placed and shown, so the demo works as before. Studios with Demo mode off see no change.

= 1.10.0 =
* The shop is now called TEG Creator - for artists, authors, musicians, makers and inventors. Only the name you see changes: your records, settings, license and updates stay exactly as they were. TEG Companion and TEG Marketer messages from the studio use the new name too.
* New creative type "Inventor / product maker" (Settings > The studio). The studio then says Inventions & products, Units, Stockists, Customers and Makers; a limited edition is a numbered production run, an open edition a product in stock, merch kits, plans and spare parts, and Medium reads Materials. A new product starts as a product counted in stock. It is for making and selling - it does not track patents, licensing or royalties.
* Existing studios see no change unless they tick the new type.

= 1.9.0 =
* New setting "What kind of creative are you?" (Settings > The studio): Maker, Photographer / videographer, Musician / performer, Author / poet, Teacher. Tick every one that fits. A new studio is asked once on the dashboard; an updated studio keeps working exactly as before and is not asked.
* An author's studio now says Books, Copies, Signings & readings, Bookstores, Readers and Authors instead of Works, Pieces, Shows, Galleries, Collectors and Artists - on the menus, screens, shop and order pages, receipts, certificates, e-mails and in TEG Companion. Photographers, musicians and teachers get their own main words too.
* With only Maker ticked (the default) nothing changes.
* The sample data adds one author with one book when Author is ticked.
* Voiding a sale twice at the same moment (two clicks, or a refund and a staff void together) could put open-edition prints back in stock twice. Now only one void counts. Worth checking: any open edition or merch count that looks higher than what you have on the shelf.
* A paid web order could become two sales when the payment arrived twice at the same moment (the card page and the payment service's notice together). A piece could then show as sold twice, or an open edition lose its stock twice. Now an order becomes one sale only. Worth checking: two sales with the same web order number in the note - void the later one, then check where the piece shows.
* Two web orders or two sales made at the same moment could get the same number. Now every number is given out once. Worth checking: two orders or two sales with the same number.
* A sale that could not be fully written down (a database problem halfway) was kept without its lines, with the piece and the stock already taken. And a paid web order whose piece had gone elsewhere left behind an empty sale for the full amount, counted in the day's totals. Now nothing is kept unless the whole sale is written. Worth checking: sales with no lines (a sale whose total shows but nothing is listed on it), especially next to an order marked "conflict"; void them.

= 1.8.2 =
* The website shortcodes are renamed: [artist-shop] is now [teg-artist-shop] and [artist-verify] is [teg-artist-verify]. The old names no longer work.

= 1.8.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.8.0 =
* The TEG Companion and TEG Rover phone apps can show their screens in another language when your studio has the Pro edition and a language pack. This needs the next update of the apps; until then nothing changes.
* A sale opened on the phone always shows exactly what your collector gets, in the studio language.
* The note a booth sale saves when a buyer asks for news of new work is always written in the studio language, whoever rings the sale up.
* Help Center and menu refresh.

= 1.7.0 =
* New Language screen in Settings. Each staff member can choose their own language for the screens they use, under Users > Profile.
* The studio now has a language of its own for everything a collector or artist receives - receipts, certificates of authenticity, price lists, tearsheets, labels, viewing rooms, shop pages, statements, e-mails and texts - so it no longer depends on who happened to click the button.
* Language packs (Spanish first) arrive later and need the Pro edition. Until a pack is installed everything stays in English, exactly as before.
* Card payments get the latest shared payment update (no change to how you take payments), and the staff e-mail about a new web order can no longer hold up an order if the mail server has a problem.

= 1.6.2 =
* The demo and sample studio is much richer: a full year of sales, shows, consigning members and payouts, and a picture on every work, so every report has something to show.
* The "Out of the studio" figure on the dashboard now counts works at a show as well as works at a gallery.
* The show date boxes are wider, so a whole date fits.
* Removing the sample data now clears everything it added, and loading it again gives the same result.

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

= 1.6.0 =
* Dates now follow your region: a US studio reads 03/04/2026, a UK studio 04/03/2026, an EU studio its own country's way - on every screen, receipt and e-mail, and in the Companion app. Leave Settings > Money, tax and receipts > Date format blank to use your region's, or type your own. WordPress's own date setting no longer leaks in. Receipts already printed keep their dates as issued.
* TEG Companion is told your date format, so its dates and date pickers read the same way as your studio.
* TEG Rover keeps working without a signal: what you do offline is sent when the phone is back online. Pairing a phone while Rover is switched off now gives it a Companion key.

= 1.5.0 =
* Viewing rooms: a private page of chosen works for one collector, behind a link that runs out - all the pictures, the details and the prices you choose to show (each work can have its own asking price in the room). Copy the link or e-mail it with one click; make a new link to stop the old one. Room pages are never shown to search engines, and you see who looked at which work.
* Reservations: a collector can reserve a piece from a viewing room. It is held for them with no time limit - nobody else can buy it on the website, at the booth, at the till or at a gallery - until you sell it to them (at the room's price) or release it. A room can ask for a deposit, paid online. You are e-mailed when a piece is reserved (Settings > Viewing rooms, can be switched off); the collector is never e-mailed by itself.
* Price lists and tearsheets as PDF: a price list by series, artist or kind, with small pictures, sold works left out or marked; a tearsheet per work with the picture, the details, the price and your contact - from Works > Price lists & tearsheets, a work's own screen or a viewing room.
* Price on request: a work can show "Price on request" instead of its price on the shop, the lists and the tearsheets; it is not sold online.
* Insurance inventory (Reports): every piece you still have by where it is, with its insured value (a new field on each work; the list price where none is given, marked), totals per place and in all, as PDF or CSV.
* Sample data: two viewing rooms (one with a reservation), a price-on-request canvas and insured values.

= 1.4.1 =
* Online shop: a work out at a gallery now reads "Available at <gallery>" instead of "Sold" (the gallery can still sell it); a piece that is lent or at the framer reads "Not available online right now". Only pieces that really sold say Sold.
* Dashboard: Recent activity reads as a sentence ("Sample loaded: 3 vendors, 8 works, ...") instead of a raw data line.
* Sample data: the sample works now have pictures - simple placeholder landscapes drawn in-house, each marked SAMPLE (no real artwork), removed with the sample. The sample buyer is James Rockford.

= 1.4.0 =
* TEG Back Office payroll reads your studio's staff list (Studio / Gallery Staff, managers and administrators) straight from TEG-ARTIST.
* Payments: bank transfer is recorded under one name (wire still works); new pay-by-QR codes (Venmo, Cash App, Zelle) under Settings > Payments, off until you switch them on; Companion report card dates follow your date format; Rover's Device pairing hides IP addresses; Site move brought up to date; licence check knows TEG-MARKETER and the Back Office bank feed.

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

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

= 1.3.7 =
* 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.
* Help now has its own Tools heading, and "Backup & move" is called "Backups".

= 1.3.6 =
* Card payments can be sent to a Square Terminal at the counter; pair the terminal in Settings > Payments.
* A card taken on a Clover or Elavon terminal can be recorded by hand.
* An online payment for an order that no longer owes it is kept aside instead of being put on the order, and staff are told.
* A refund still waiting at the payment service is checked again after the plugin is turned off and back on.
* Payment screens brought up to date with the other TEG shops.

= 1.3.5 =
* 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.3.4 =
* Money in another currency is written with its own symbol on the TEG Rover cards.

= 1.3.3 =
* Customer links (invoices, quotes, bookings and the like) only open with their exact key; a link with a blank or altered key opens nothing.
* An artist's private statement link opens only with its exact key, letter case included.

= 1.3.2 =
* TEG Rover collects on an invoice in the currency it was issued in, and its cards count one currency at a time.
* A web or booth order paid after a region switch becomes a sale in the currency it was ordered in.

= 1.3.1 =
* 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.3.0 =
* New: every collector now has one Collector notes box, on the desktop and in the Companion app: the general notes first, then the notes from their sales, web orders and waiting lists, with who wrote each one and which came from Staff.
* New: the box is on the collector's own screen (Collectors > a collector), with "Add a note". A collector who said no to news of new work shows that in red at the top.
* Changed: a note added on a collector from the Companion app is now kept as its own note, with who wrote it and when. It is no longer added to the end of the collector's Notes field (notes already there stay where they are).
* New: a waiting-list entry can carry a short note (Collectors > a collector > Add to the waitlist). It shows in the collector's notes.
* Fixed: deleting the plugin with "keep the records" off now also removes the collector notes.

= 1.2.1 =
* Improved: report cards on the phone now open the matching page on the computer. Average sale, this month and this year compared, and discounts open Reports > Day by day; sales tax collected opens Reports > Sales tax collected; takings by payment method opens Reports > By channel; the gallery cards open Galleries; repeat collectors and regulars to call open Collectors; unsold older work opens Works.
* Improved: card wording that fits a studio. The cash flow card now says "Gallery payments falling due" and the follow-ups card says "Overdue gallery payments" instead of talking about invoices, and the follow-ups card no longer shows a "Quotes waiting" line, since a studio does not send quotes.
* Improved: clearer date ranges on the cards, such as "October 1" for a single day and "Jan 5-10" for a few days.

= 1.2.0 =
* New: report cards on the TEG Companion phone app. Each person picks the cards they want to see, and the cards are grouped into sections (money, customers, stock and so on). Only "This month vs last month" is on to start with; switch on the others you want.
* New: the studio's own cards, all worked out from your real sales the same way your Reports pages count them (completed sales only, voids left out, one currency at a time): average sale, this year vs last year, sales tax collected, busiest hours, repeat collectors, takings by payment method, today so far, money coming in from galleries over the next 30 days, overdue gallery payments, discounts given, voided sales, regulars to call, where new collectors came from, gross margin, unsold older work and your best-selling works with their busiest times. With TEG Rover switched on, errand spending and time out on jobs show too.
* New: TEG-ARTIST > Reports cards on the computer. See every card on one page and compare with last period, the same time last year, or dates you choose. Set goals, download any card as a CSV file, or print the page.
* New: "Lost customers after N days" (Settings > Sales > Reports, or on the Reports cards page). A regular collector who has not bought for that many days shows on the "Regulars to call" card. It starts at 90 days.
* New: an optional monthly summary e-mail. On the 1st of each month the cards you tick are e-mailed to you for the month that just ended. It stays off until you save its settings once, and E-mail test mode applies to it.
* Fixed: unsold older work always counts work with no sale for 90 days, even when you change the lost-customers period.
* Fixed: turning the plugin off now also stops all of its scheduled e-mails and background jobs. Deleting the plugin removes the report settings too, unless you chose to keep your data.

= 1.1.0 =
* New: TEG Rover is now included. It is switched OFF until you turn it on. When it is on, helpers with the TEG Rover phone app can be sent out on jobs from the office. Pair phones - TEG Companion and TEG Rover alike - on the Phones page; phones you already paired keep working.
* New: errands. Send a helper on a run - art supplies, a framer or print lab pick-up, packing materials, the post office or the bank - with a shopping list and a spending limit. What they spend comes back with a photo of the receipt for you to confirm and pay back.
* New: Import from CSV (TEG-ARTIST > Import from CSV). Bring your existing collectors and works in from a spreadsheet: match your columns to ours, do a test run that shows what would happen without changing anything, then import for real. Every import can be undone. Importing needs an active licence (or trial); exporting your records to CSV always stays open.
* New: removable sample data. Settings > Data > Sample data adds a full example studio next to your own records, and takes away exactly what it added when you are done. The one-click installer can load it for you.
* Improved: TEG Companion brought up to date (shared Companion core 2.6.0), and region settings brought in line with the other TEG shops.
* Improved: updates are only offered and installed when their download can be checked against its published fingerprint.

= 1.0.0 =
* First release (after 1.0.0-beta.1).
* 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.0.0-beta.1 =
* First beta: works and editions, sold once, where is it, galleries (consignment out), shows with their own tax, the online shop with reservations, booth sales on TEG Companion, certificates of authenticity with a verify page, collectors as a TEG-MARKETER source; Pro: consignment in, payouts, statements and the trust view.
