=== Cost & Reports for WooCommerce ===
Contributors: Tommy Hansen (Consortia AS)
Tags: WooCommerce, reports, cost, prices, sales, order management, profit, e-commerce
Requires at least: 6.9
Tested up to: 7.0.1
Requires PHP: 7.4
Stable tag: 3.7.7
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Cost & Reports for WooCommerce helps store owners manage product costs, pricing, profit, and reporting from one focused WooCommerce admin experience.

== Description ==

**Cost & Reports for WooCommerce** is a profit-first WooCommerce extension for managing product costs, purchase prices, cost of goods, pricing updates, and business reporting. It gives store owners a faster way to understand margins, review orders, compare products, and spot the customers and products that drive the most value.

**Key Features:**

* Track product costs, purchase prices, shipping, and cost of goods.
* Update prices in bulk from one editor-focused Home tab.
* Review profit-first reports for orders, products, and customers.
* Use the Insights tab for KPI cards, charts, and ranked customer and product lists.
* Filter reports by customer, status, category, brand, tag, stock status, and date range.
* Export report data to CSV or XLSX for deeper analysis.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/woo-calculate-your-price/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Navigate to the WooCommerce menu, then click on **Cost & Reports** to configure the plugin settings.
4. Set your product costs, configure report filters, and start managing your store's sales and profits more effectively.

== Changelog ==

= 2026-10-28 - version 3.7.7 =
* Fix - Home retail valuation now uses the displayed product price on load, even when the suggested New price is zero.
* New - Added a personal light/dark mode toggle to the Home toolbar.
* Tweak - Refreshed navigation tabs, range filters, row highlighting, and table totals for improved readability.

= 2026-07-29 - version 3.7.6 =
* New - Added a Home tab bulk action to calculate Cost of goods from purchase price, other cost, and shipping cost.
* Fix - Improved Cost of goods and Purchase price snapshots for WooCommerce admin-created order line items.
* Fix - Improved WooCommerce native Cost of Goods support when Cost & Reports is configured to use the WooCommerce COGS field.
* Fix - Improved activation, empty catalog, and admin compatibility checks for newer WordPress and WooCommerce versions.

= 2026-06-13 - version 3.7.5 =
* Fix - Restored reliable Purchase price and Cost of goods editing on WooCommerce product and variation screens.
* Fix - Improved Home tab filter behavior and Select2 layout for category and report filtering.
* Fix - Added a clearer New price state on the Home tab so suggested prices are easier to review before saving.

= 2026-06-10 - version 3.7.4 =
* Fix - Improved release package compatibility for marketplace validation checks.

= 2026-06-10 - version 3.7.3 =
* New - Added a full-store Inventory valuation summary on the Home tab with print and CSV export actions.
* New - Large catalogs now refresh Inventory valuation in the background with Action Scheduler and an admin completion notice.
* Fix - Matched Inventory valuation totals to the Home table product set and regular price ex. VAT retail calculation.
* Fix - Added the modern WooCommerce settings save flow used in Roles & Rules B2B to improve settings compatibility.
* Fix - Replaced internal transient-based caches with option-based caches to reduce deprecated transient-hook noise on WordPress 6.8+ activation checks.

= 2026-06-07 - version 3.7.2 =
* Fix - Restored Purchase price and Cost of goods fields on WooCommerce edit product and variation screens.
* Fix - Added clearer field help tips on edit product screens for values added by Cost & Reports.
* Fix - Improved WooCommerce settings compatibility for newer admin settings handling and activation checks.

= 2026-06-06 - version 3.7.1 =
* Fix - Improved activation compatibility by normalizing WooCommerce settings fields for newer admin settings handling.
* Fix - Replaced the activation transient notice flow to avoid deprecated transient hook noise on WordPress 6.8+.

= 2026-06-06 - version 3.7.0 =
* New - Added a profit-first Insights tab with KPI cards, trend charts, and ranked product and customer panels.
* New - Added sales-focused insights for top products by quantity and top customers by revenue.
* Fix - Improved report accuracy for refunds, COGS, decimal quantities, and product summary consistency.
* Fix - Improved PHP 8.3 compatibility across Home, Orders, Products, Customers, and export flows.
* Fix - Refined the report and Home admin UX, including filters, sticky footer actions, pagination, and footer branding.
* Dev - Added a shared product summary model and a `consortia-tablecalc.js` migration path for future releases.

= 2026-03-20 - version 3.6.3 =
* Fix - CSV export security improvements
* Fix - Settings handling improvements

= 2026-02-14 - version 3.6.2 =
* Fix - Orders COGS report now prioritizes stored order item COGS (historical snapshot) instead of current product COGS.

= 2026-01-19 - version 3.6.1 =
* Fix - Home tab, added category in export file ( download to .csv )
* Fix - Moved save button above the table in the home tab + some css improvements on the tab
* Dev - Minor fixes and improvements

= 2025-08-05 - version 3.5.4 =
* New - Added option in settings to use WooCommerce's new COGS field 
* New - Added integration for WooCommerce COGS in templates and exports (.csv)
* Fix - Added info icons and text for retail value and profit 
* Dev - Minor fixes and improvements, removed unused code++

= 2025-05-14 - version 3.5.3 =
* New - Added fields to order product report (order date, order status, customer, customer email, product id, product type, purchase price, cost and cost of goods) 
* New - Added fields to order report (payment method, cupons, shipping method and currency)
* Dev - Other minor fixes and improvements

= 2025-01-30 - version 3.5.2 =
* New - Dark Mode style added (option in settings)
* Fix - Fixes in product query when large datasets 
* New - Round to fixed decimals function is added
* Dev - Other minor fixes and improvements

= 2025-01-05 - version 3.5.1 =
* New - Integration / supports WooCommerce Product Bundles 
* Fix - Minor fix for saving meta fields in edit product 
* Dev - Other minor fixes and improvements

= 2024-12-20 - version 3.4.13 =
* New - Added status select in reports 
* New - Added reset filters / query params in reports 
* New - Added refunded statuses shown in reports (sets net and gross sales to 0 but shows in total stats on right side)
* New - Added refunded (statuses) in export to .csv 
* Fix - Minor fixes and improvements

= 2024-11-18 - version 3.4.12 =
* Fix - Added select2, removed multiselect JS and more to improve filters 
* Fix - Changed query for products and more to improve speed and fix paging
* Fix - Added tooltip for makup, price and new price column (home tab)
* Dev - Other fixes and improvements

= 2024-11-05 - version 3.4.11 =
* Fix - Make sure copy current price uses regular price 
* Fix - Changed the Price select (default) to adjust to inc or ex. vat - as WooCommerce settings  

= 2024-10-30 - version 3.4.10 =
* Fix - Minor fix in shipping calculations (orders reports)
* New - Added column for refunded items in Orders and Product reports 
* New - Added option to toggle totals in Orders and Product reports 
* New - Minor layout and CSS improvements, boxed in filters in the reports and more
* New - Added new and faster sorting function for the report tabs (orders, products and customers)
* New - Added refund information to export files for reports
* Dev - Minor fixes and improvements

= 3.4.9 - 2024-09-26 =
* Fix - Minor fix in calculations (markup) 

= 3.4.8 - 2024-09-24 =
* Fix - Minor update in JS for logic in changing prices (VAT++)
* Dev - Other minor code fixes
* Dev - Added readme file

= 3.4.7 - 2024-09-23 =
* Fix - Removed WooCommerce menu that is no longer supported in upcoming versions
* Fix - Improved JS for better performance
* Fix - Minor fix for price changes when shop prices are inclusive of tax
* Fix - Removed autofocus in Home tab product values

= 3.4.6 - 2024-04-26 =
* Fix - JS fixes for formatting numbers and sums
* Fix - Minor fix for fetching customers (dropdown)

... (see changelog for more)

== Frequently Asked Questions ==

= Can I export reports? =
Yes, you can export reports in CSV or XLSX format for further analysis.

= Does this plugin support multi-store environments? =
Yes, Cost & Reports for WooCommerce supports multisite environments for managing reports across multiple stores.

= Can I track product costs and profits in my reports? =
Absolutely. The plugin provides tools to track costs, calculate profit margins, and generate detailed reports on sales and profits.
