=== Tillbon - Barcode Till for WooCommerce ===
Contributors: pietervroman
Tags: barcode scanner, point of sale, pos, barcode, inventory
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.16.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A barcode scanner till for shops with a counter and a WooCommerce webshop. Scan, sell, close the day, and the webshop stock stays right.

== Description ==

You have a shop with a counter and a WooCommerce webshop, and every sale at the counter makes the webshop stock a little more wrong until the next count. Tillbon fixes that. It adds a till inside wp-admin: scan an article, it lands in the basket, check out, and WooCommerce records an ordinary order that books the stock off. One stock, for the shop and the webshop.

It was built behind the counter of a real tackle shop, and it is shaped by the problems that came up there.

= Scanning that just works =

* **Scanners that send no Enter key.** About half of all scanners only type the digits and stop. Scan twice and the codes glue together. Tillbon closes each scan on a short keyboard silence instead, so it works with every USB scanner out of the box.
* **The AZERTY problem.** A scanner sends key positions, and almost every scanner leaves the factory set to a US keyboard. On a Belgian or French computer the digits arrive as `&é"'(§è!çà`. Tillbon translates them back automatically, and only ever touches a code made up entirely of those characters, so it cannot damage a correct scan.
* **A scanner test screen.** Scan anything and it shows exactly what your scanner sent, how fast, and with which ending, and tells you which setting to change. Support question answered before it is asked.
* **Finds the article.** Searches the WooCommerce GTIN field, the SKU and an optional custom field, and knows that a 12 digit UPC and a 13 digit EAN with a leading zero are the same article.
* **Unknown barcode?** Attach it to the right product from the till. A painless way to work through products that still carry an in-house code.

= Selling =

* Basket with quantities, a discount as a percentage or an amount, and a note.
* Your own payment method buttons: cash, card, voucher, whatever you use.
* Customers: search registered customers and earlier buyers, or scan a loyalty card. Hand out a new card by scanning it onto a customer.
* Put a sale on hold when a customer walks back into the shop, serve the next one, and pick it up again later, on this till or another device.
* Take goods back in one scan: every receipt carries a barcode that opens the sale. Lost the receipt? Scan the article and pick the sale from a list. A real WooCommerce refund, with the stock put back if you want.
* Reopen an earlier sale to change it or print its receipt again.
* A receipt sized for 80 mm thermal printers (Epson, Star and the usual clones), printed through the browser, no driver per model.
* Keeps selling when the internet drops: sales wait in the browser and are sent as soon as the line is back.

= Closing the day =

Open the till in the morning with the cash you start with. In the evening Tillbon tells you what should be in the drawer, you count what is there, and it shows the difference plainly. Takings per payment method, refunds, and a history of earlier day closes that a shop manager can correct or remove afterwards. Fill in an address and the day report arrives by e-mail when you close: turnover, payment methods, returns, VAT per rate, the cash check and the best sellers, for you or your accountant.

= Stock reports =

A sold out list sorted by what sold best in the last 90 days, so the first lines are the ones costing you money today, and a running low list based on your WooCommerce low stock threshold. Both download as CSV.

= Multilingual shops =

With Polylang or WPML one barcode sits on every language copy of a product. Tillbon books the sale on the shop's main language, so stock is never taken off the French copy of the article.

= Tillbon Pro =

A separate add-on for running the shop, not the till: stocktakes with a scanner (count one brand at a time and watch the list of what is still to find shrink with every scan), booking in deliveries from the supplier's packing slip (CSV or Excel), barcode labels, purchase prices and stock value, and staff codes so the day close shows the takings per person. The till itself is complete without it. See [counterpos.app](https://counterpos.app).

= Privacy =

Tillbon stores nothing outside your own WordPress database and sends nothing anywhere. It needs no API keys: it runs on your logged-in session, with capability and nonce checks on every call.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to Till, Settings and check the order status. Leave it on Pending payment while you try things out, so nothing touches your stock; switch it to Completed when you go live. On hold is not a safe test status: WooCommerce reduces stock for that one too.
3. Open Till, Scanner and scan something, to check your scanner is understood.
4. Open Till and sell.

== Frequently Asked Questions ==

= Which scanners work? =

Any USB or Bluetooth scanner that acts as a keyboard, which is nearly all of them: Honeywell, Zebra, Datalogic, and the inexpensive Netum, Inateck, Tera and Eyoyo models. Open Till, Scanner to see what yours sends.

= My scanner types letters and symbols instead of digits =

It is set to a US keyboard while your computer is not. Tillbon repairs that by itself with the keyboard layout setting on Automatic. Most scanners also have an ALT or numeric keypad mode, set with a barcode in their manual, which avoids the problem entirely.

= Does it book stock off? =

Only if the order status you chose is one that WooCommerce reduces stock for: Processing, On hold or Completed. On Pending payment the order is recorded but your stock is untouched, which is what you want while testing.

= My long barcodes get cut in half =

Raise the scan pause in the settings. Your scanner is sending the digits more slowly than the current setting allows. The scanner test screen suggests a value.

= Two scans end up as one line with a strange code =

Lower the scan pause, or set the fixed barcode length if all your codes are the same length.

= What happens when the internet drops? =

Keep the till open. Articles are looked up in a copy kept in the browser, sales are parked, and they are sent to the shop when the connection is back. Do not reload the page while offline.

= Does it work with a page cache? =

Yes. Every answer the till gets is marked as not to be cached, which matters for LiteSpeed Cache in particular: it caches logged-in REST answers by default.

= Can I use it on a tablet? =

Yes. It is an ordinary admin screen, so log in on the tablet and open Till.

== Screenshots ==

1. The till: scan, and the article is in the basket. Discount, payment method, customer and checkout on the right.
2. Closing the day: what should be in the drawer, what you counted, and the difference.
3. The scanner test screen shows what your scanner really sends and which setting to change.

== Changelog ==

= 0.16.0 =
* Counter POS is now called Tillbon. Only the name changes: settings, sales, day closes and stocktakes carry over as they are. If the old Counter POS is still active, Tillbon waits and says so instead of running twice.

= 0.15.0 =
* Put a sale on hold and pick it up again later, on this till or another device.
* Take goods back in one scan: every receipt now carries a barcode that opens the sale for a return. Without the receipt, scan the article and pick the sale from a list.
* While taking goods back, scanning an article ticks it off.
* Scanning on the start screen starts a new sale straight away.
* Add a new customer from the till: first name, last name and e-mail, without leaving the sale. No account e-mail goes out unless you tick it.
* Day report by e-mail when the till is closed: turnover, payment methods, returns, VAT per rate, the cash check and the best sellers. Can also be sent again from the day close history.
* A UPC whose leading zero was lost in a spreadsheet is still found.
* French and German, for the interface and the built-in manual.

= 0.14.4 =
* The built-in manual covers correcting and deleting day closes, VAT on the receipt, and the Pro features: counting by brand, labels and staff codes.

= 0.14.3 =
* The receipt's styling and print script are separate files loaded the WordPress way, instead of written into the page.
* The updater for shops that installed from counterpos.app lives in a file of its own, which the wordpress.org build leaves out entirely.

= 0.14.2 =
* The receipt lists VAT per rate: the rate, the amount it was charged on, and the VAT.
* Till sales now show as "Point of Sale" in the Origin column of the WooCommerce order list, and count as such in WooCommerce's attribution reports, instead of "Unknown". Needs WooCommerce 10 or newer.

= 0.14.1 =
* Ready for wordpress.org: passes the official Plugin Check without errors (translator comments, one query now fully prepared).
* A large total, in crowns or forints, stays on one line instead of breaking in two.

= 0.14.0 =
* Works behind LiteSpeed Cache. That plugin stores logged-in REST answers by default, which made the day close insist the till was still closed right after it was opened. Every answer the till gets is now marked as not to be cached, by header and by the browser.
* Notices from other plugins appear above the till's header instead of inside it.
* The settings screen now says when it has saved, and why it refused something.
* The sold out report says so when no article keeps a stock figure, instead of calling an empty list good news.
* "Taken today" on the start screen subtracts what was paid back, the same way the day close does.
* Earlier day closes can be corrected and removed. A float typed wrong in the morning or a miscounted drawer no longer stays in the books: change it and what should have been in the drawer is worked out again. Removing a day close leaves its sales untouched. Only shop managers can do either.
* Room for add-ons on the till: a spot in the top bar, data that travels with a sale, and extra tables on the day close.

= 0.13.1 =
* Customers, loyalty cards and taking goods back are free. A till that cannot hand money back is not a till, so these belong in the part everyone gets.
* So does keeping your payment methods apart. The day close counts only the method you marked as cash, and with a single method allowed every card sale would have been counted into the drawer. A figure that is confidently wrong is worse than no figure.

= Earlier versions =
* See changelog.txt in the plugin folder.
