=== Jeet Sanwal Supplier Reorder Sheet ===
Contributors: jeetsanwal
Tags: woocommerce, inventory, supplier, stock, reorder
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.5
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A private, compact WooCommerce supplier reorder report. Shared parent stock is counted once, with small batches, print and CSV.

== Description ==

Add a private supplier label, reorder point and target quantity to simple products, variable parents or independently stocked variations. Open WooCommerce > Supplier reorder to see a supplier-grouped planning sheet, in batches of up to 25 permitted product/variation records.

For a configured stock owner at or below its reorder point, suggested units = target minus current stock. Negative backorder stock increases the suggestion. Unknown or unmanaged quantities require review; they are never treated as zero. Blank thresholds mean unconfigured. No stock, orders or product status is changed by the report.

**Stock owners matter**

* A variable parent managing stock owns its shared quantity. Its supplier/point/target apply; shared-stock variations are reference rows with no duplicate suggested quantity.
* Variations managing their own stock have separate thresholds. A blank variation supplier label inherits the parent label, when the viewer may edit the parent.
* Saved variation fields are ignored while its stock is shared with its parent. They remain available if own stock is enabled later.
* A variable parent without managed stock is a container. Its independently stocked variations are checked separately.
* Grouped and external products are excluded. Custom product types and custom stock-owner extensions need separate review.

**Honest partial reports**

The query loads at most 26 candidate objects: 25 records and one lookahead. All title/content, product status, supplier and review filters run within the current batch after per-product edit permissions are checked. Title/content search is a literal case-insensitive substring of permitted names, descriptions and short descriptions. Supplier groups are local to each batch, not full-catalog totals. An empty filtered batch does not mean the catalog is clear. Continue with Next batch even when no rows match. Hidden content does not determine paging.

The default status scope includes published, private, draft, pending and scheduled records; disabled variations are not silently treated as unavailable. Trashed records are excluded. Stock status (including out of stock) does not remove a managed record from calculation. There is no all-catalog export or persistent scan snapshot. Stable ID paging can shift when records are added/deleted; restart for a fresh review.

Print and CSV cover the shown batch only. CSV is generated from current values at export time, so it may differ from the screen if someone changed stock. Cells beginning with spreadsheet formula characters receive an apostrophe. The resulting CSV and printed sheet contain private business data; store and share them carefully.

**Private native admin tools**

Requires manage_woocommerce and edit permission for each product. Configuration uses per-product nonces, bounded values and a stale-configuration check. Data lives in protected product metadata through WooCommerce CRUD; it is not registered for public WordPress REST output. Modern and legacy WooCommerce product and variation REST response filters remove this plugin's private metadata for viewers without both management and edit permission. Authorized staff retain normal product management. WooCommerce Store API does not expose this metadata by default. This is not encryption or a boundary against database access, backup/export plugins or other trusted code that directly reads metadata.

No frontend scripts, styles or credit. No ads, remote calls, signup, analytics, upgrade tier or purchase-order emails. HPOS compatible: no orders are read or written. Manual self-hosted ZIP updates; no automatic updater.

Planning limits: suggestions do not consider open purchase orders, pack sizes, minimum order quantities, lead times, supplier prices, forecasts, pending stock reductions, custom reservation logic or multiple suppliers per stock owner. Check those before ordering. The current WooCommerce stock value is not a guaranteed physical count. Quantity and threshold values support finite numbers up to absolute 1,000,000,000; thresholds must be non-negative and target >= point. Decimal quantities follow store use; no pack rounding is invented.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the jeet-supplier-reorder-sheet ZIP in Plugins > Add New > Upload Plugin; activate.
3. Edit a product. In Product data > Supplier reorder, enter the private label, reorder point and target; save.
4. For independently stocked variations, expand the variation and enter own thresholds. Leave its supplier blank to inherit the parent label.
5. Open WooCommerce > Supplier reorder. Review batches, filter deliberately, then print or export the shown rows.

== Frequently Asked Questions ==

= Does this order stock or change quantities? =
No. Configuration saves only this plugin's private planning metadata. The report, print and CSV are read-only. No email or purchase order is sent.

= Will parent-managed variations multiply my suggested order? =
No. The parent is the stock owner. Its own row carries the calculation, and its shared variations carry no suggested amount. When a search or status filter excludes the parent row, the shared variation still links to its stock owner; it does not invent another quantity.

= Can a variation inherit reorder thresholds? =
No. Independently stocked variations need their own thresholds and may inherit only the supplier label. Shared variations follow the stock owner's parent configuration entirely.

= Why is the supplier filter empty on one batch? =
All filters, including title/content and status, are intentionally batch-local. Continue to the next batch when available. They do not search or total the entire catalog.

= Are draft, disabled and out-of-stock products included? =
The default all-status scope includes normal non-trash statuses and reports stock status. Draft/disabled variations can therefore be reviewed. Selecting a narrower status intentionally excludes other records. Products without quantity management show review, not a fabricated zero.

= Can the public see supplier labels? =
The plugin creates no frontend output and uses protected metadata. Its WordPress REST registration remains private; WooCommerce product/variation REST response filters hide these values from non-management viewers. Staff exports, backups and other privileged code can still read them. Do not put passwords or financial secrets into supplier labels.

= Is it free, and what happens on deletion? =
Free, GPL-2.0-or-later, with no ads or locked features. Deactivation/deletion leaves planning metadata intact. Clear the three fields and save to reset an item. This version does not bulk-delete metadata or uninstall WooCommerce.

== Updating an existing installation ==

Download this plugin's individual ZIP from https://jeetsanwal.in/tools/jeet-supplier-reorder-sheet . Make a normal site backup and try the update on staging first. In WordPress, use Plugins > Add New > Upload Plugin and choose Replace current with uploaded when WordPress detects the existing installation. Keep the same plugin folder; do not uninstall/delete the plugin as an update step. Confirm the displayed version is 1.0.5, then reopen the plugin's normal screen and check one representative workflow described above. Clear relevant page caches if public output remains stale.

Updates are installed manually; a matching Update URI prevents unrelated directory plugins from replacing this package, but does not provide an update service. If replacement fails, check hosting upload limits and write permissions before retrying. To roll back, replace the plugin files with your saved previous ZIP; file replacement alone does not restore database records or deleted files. Use your site backup when data restoration is needed. Read this plugin's retention notes before deliberately uninstalling it.

Author and support: Jeet Sanwal — https://jeetsanwal.in/contact

Text preservation fix: newly saved supported records now retain literal backslashes and quotes. Previously altered text cannot be reconstructed automatically; reopen and correct it from your original source when needed. Existing metadata formats are unchanged.

== Optional installation reports ==

Installation reports are optional and OFF by default. Installing, activating, or using this product does not submit a report. Administrators can choose consent separately for each product under Settings > Jeet Sanwal Reports. All product features remain available with reporting off.

After explicit consent, the client sends the website URL, a random installation ID, product/WordPress/PHP versions, reported state, and an observed activation timestamp when available to https://jeetsanwal.in/api/v1/plugin-reports. While that product is active and consent remains enabled, a daily WordPress cron check-in can update its last-known status. WP-Cron depends on site traffic and hosting; it is not a continuous monitor.

Pause stops future reports without deleting records already shared. Forget requests deletion of the remote installation entry and history, retrying deletion if delivery fails. Records automatically expire after 90 days without a check-in. The plugin does not send page content, files, database exports, administrator email addresses, or raw IP addresses. Server rate limiting keeps a keyed IP hash for up to 24 hours; ordinary hosting access logs are governed separately by the privacy policy.

Review the fields and consent before enabling reporting. Read https://jeetsanwal.in/privacy for the reporting endpoint, retention, and deletion details. Reporting does not authorize remote control, automatic updates, or access to the website.

== Changelog ==

= 1.0.5 =
* Updated the product display name to Jeet Sanwal Supplier Reorder Sheet and retained the Jeet Sanwal author website.
* Added voluntary installation/status reports with per-product consent OFF by default, pause/forget controls, and documented fields and retention.
* Preserved existing identifiers, stored data, permissions, and earlier release history.


= 1.0.4 =
* Check parent editing access before loading a variation’s parent for supplier review.
* Preserved literal backslashes and quotes in newly saved supplier labels while retaining normal deferred product saves.
* Protected CSV cells against formula prefixes hidden behind Unicode spacing, invisible characters or invalid UTF-8.

= 1.0.3 =
* Standardized interface wording to US English without changing stored field keys or permissions.
* Added a complete US English installation and update guide; kept documented permissions, limits and manual rollback steps.


= 1.0.2 =
* Clarified the manual replacement, verification and rollback workflow, with direct author support details.
* Rechecked package metadata, source/archive consistency and existing isolated regressions.


= 1.0.1 =
* Apply title/content and status filters only after per-product permission checks within fixed candidate batches.
* Keep Unicode search text intact and clarify partial supplier reports, privacy and pagination.
* Rechecked shared stock owners, private REST metadata and stale configuration protection.

= 1.0.0 =
* Initial release: private supplier planning fields, stock-owner-aware 25-record reports, print and current-batch CSV.

== Privacy ==

No external service or telemetry. Supplier labels and thresholds are stored in the site's product metadata. Exports contain those labels and are created only by authorized staff.

