=== Profit & Cost Reports for WooCommerce ===
Contributors: catcodestudio
Tags: profit, cost of goods, cogs, margin, reports
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Cost price for products and variations, cost saved on every order line, and a profit report: net sales, cost of goods, gross profit and margin.

== Description ==

WooCommerce shows how much you sold, not how much you earned. Profit & Cost Reports adds the missing half: what each product costs you, and what is left after that cost.

* **Cost price field** on simple products and on every variation (a variation without its own cost uses the parent's). A "Cost" column in the product list.
* **Cost saved on the order line.** When an order is placed — classic checkout, Checkout block, admin or REST — the current cost is copied into the line. Changing a cost later never rewrites the profit of past orders.
* **Profit report** under WooCommerce → Profit Reports: today, last 7 / 30 days, this or last month, this year or any range. Net sales, cost of goods, gross profit, margin and orders, plus profit by product.
* **Refunds handled:** refunds are subtracted from sales; returned items give their cost back, amount-only refunds do not.
* **Order screen box** with net sales, cost, profit and margin of the order.
* **Same numbers as WooCommerce Analytics:** the report reads the Analytics tables and follows the excluded order statuses and the date type set in Analytics → Settings. With Analytics switched off it reads orders directly.
* **Multi-currency aware:** orders are reported one currency at a time, never mixed.
* Compatible with High-Performance Order Storage (HPOS) and the Cart & Checkout blocks.

Orders placed before you install the plugin have no saved cost; the report uses the current product cost for them and marks it as an estimate (or ignores them — your choice in Settings).


== Installation ==

1. Upload the plugin and activate it (WooCommerce must be active).
2. Open a product → Product data → General and fill in "Cost price" (for variable products — on each variation).
3. See WooCommerce → Profit Reports.

== Frequently Asked Questions ==

= Does it change what customers see? =

No. Cost prices are stored as hidden product and order-line data and appear only in the admin.

= Why does my profit equal my sales? =

The products sold have no cost price yet. The report shows how many order lines lack one.

= Are tax and shipping part of net sales? =

No. Net sales follow WooCommerce Analytics: order totals without tax and shipping, after discounts and refunds.

== Changelog ==

= 1.0.1 =
* Variable products: the default cost field is now shown on the General tab (it was hidden together with the simple-product price fields).
* When Analytics → Settings → Date type was never saved, the report now uses "date paid" like WooCommerce Analytics itself, so both show the same totals.
* Cost and Profit columns in Analytics → Orders use the store currency format.

= 1.0.0 =
* First release.
