=== QA Cost of Goods & Margins ===
Contributors: quickassortments, redmap, codemascot, cleijsen, clauselbo
Tags: ecommerce, woocommerce, cost of goods, cost price, margin, markup, net profit, gross profit, forecasting, merchant, merchandising, sales, goods, cost of sales, direct costs 
Requires at least: 4.9
Tested up to: 5.5.0
Stable tag: 2.4.0
Requires PHP: 5.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage cost prices for your products and variations and instantly see the impact on margin, markup and stock value in your store.

== Description ==

Quick Assortments Cost of Goods & Margins is a free plugin that allows you to track the profit of your store, products and categories. 
This plugin seamlessly integrates with WooCommerce and lets you manage cost prices for your items and instantly see the impact of changes on your margins and markups.

= Benefits =

* Track profitability of your store, products and categories
 
* Manage Cost Prices, Markup and Margins for products and variations
 
* Understand the impact of markdowns and campaign
 
* Use the powerful margin and profit reports and dashboards to support your decision making
 
* Use variations and bundles with different cost prices

= Why use this plugin? =
 
Whether you produce your own products, drop-ship, or buy through wholesale, you want to track the profitability of your products and your store. 
To do this, you’ll need to manage the cost price of your products.

These Cost Prices (sometimes referred to as ‘direct costs’) are called the Cost of Goods Sold (COGS) and we have integrated dedicated fields to manage these in your WooCommerce product pages. 

= What is COGS and how does it help me? = 
 
COGS is sometimes also referred to as ‘cost of sales’ or ‘cost of merchandise’ but in short it refers to the production or purchase costs for products sold in your store. 

Technically, these costs are an expense of your business, and in the end they reduce the revenue your store makes from selling. 

So far not a big deal, but once your business grows, it might get tricky to keep track of profitability all of your products.

This plugin allows you to plan, simulate and summarise both your costs, stock value and margins in one place in the WooCommerce product pages so you get an instant overview of how your business is doing.

= Why would I manage my Gross Margin? =

As a store owner, you calculate a variety of figures to determine the health and performance of your business. 

One of these figures is Gross Margin, which is an important factor for you when assessing your business risk and profitability or when you are setting prices for your goods or services.
It’s not always easy to understand the impact of changes in cost and sales prices, especially when your stores grows.

In the WooCommerce product pages, we have created a neat overview to track all of these changes and show the final gross margin for all your products.

= 3 reasons why it’s important to calculate Gross Margin =
 
**Profitability**
Knowing the gross margin for your products is essential in assessing your store’s profitability. 
That sounds like a no brainer, but in reality it is easier said than done. 
Calculating Gross Margin lets you know how much of profit you’ve got in order to meet obligations other than those related to your products and services.
With this plugin, you can create simulations and different scenarios to see the impact of changes in pricing on margin. Instantly.
 
**Save Money & Resource**
We have taken the calculation of gross margin a step further by evaluating it on a per product basis. This can help you determine if higher cost materials have been incorporated into production. Perhaps too much is spent on a particular product. 

Your gross margin may indicate a need to use materials at a lower cost, or buy your products at a lower cost. Maybe you need to increase your retail price slightly to make more money. 
This plugin will help you to determine just that.
 
**Break-even Point**
Calculating gross margin is also a key element to knowing your company’s break-even point. Your break-even point tells you the amount of revenue you must make in order for to make your business a success.

= For Merchants, By Merchants =

All of our plugins are developed *for merchants, by merchants*. With over *25 years* of combined experience in merchandising and retail, we understand what it takes to run a business.

> Check out our other add-ons on [our website](https://quickassortments.com/) if you are interested in additional reporting and sales forecasting extensions.

If you want to know more about merchandise planning or assortment planning, don’t hesitate to check out our [Merchant Support](https://quickassortments.com/) pages
Here you find lots of information on anything related to merchandising and retail.

> You will notice Net Profit and Margin are NOT calculated the moment the plugin is installed. It is because the Orders in the past are not present in the charts (yet).
The reason for this is that we are launching a forecasting and Order Management tool in April 2020, for which we had to create the algorithms in a different way than are standard in WooCommerce charts. 
Of course, if you can't wait till April next year, please reach out to us directly at support@quickassortments.com then we can help you to manually import all historic data.

*Acknowledgment: For version 2.0.0 we have borrowed code from the [WooCommerce Admin](https://wordpress.org/plugins/woocommerce-admin/) plugin by WooCommerce. So, a lot of thanks to the folks behind this plugin.*

== Screenshots ==

1. Simply manage cost price per product in the WooCommerce Easy Edit pages.
2. Our plugin seamlessly integrates with the WooCommerce Product Pages.
3. Track stock value, margins and markup for all your products in the WooCommerce product pages.
4. Easily manage *Product Bundles* and *Product Variation*.
5. Change the settings for KPI’s and measures to display in the product pages in our *Quick Assortment* menu.
6. Change settings for the charts and leaderboards in the 'Retail Insight Settings' in our *Quick Assortment* menu. 
7. Review the performance of your store in our Retail Insights reports.
8. Easily navigate between categories, products or different time ranges.
9. Review profitability of your individual products.
10. Track your top performers in terms of Net Revenue and Profitability in the product leaderboards.

== Installation ==

Installing this plugin is very easy and no prior set up is needed. You just need *WooCommerce* installed. And you can install and configure this plugin by following these below steps-

1. Upload the plugin files to the `/wp-content/plugins/qa-cost-of-goods-margins` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Use the *Quick Assortments >> Cost of Goods >> Cost of Goods Settings* screen to configure the plugin
4. Use the product backend fields for setting the cost and seeing the profit margins data
5. You can update the cost data from *Quick Edit* for single product too


== Frequently Asked Questions ==

= I would like to see more history in my charts, is this possible? =

Yes! We are working on an automatic import of all historic data and this will be part of a future release.
The way we calculate margin and profitability is slightly different from how some of the standard calculations are done in WooCommerce. The reason for that is because we are currently developing an advanced forecasting and Order Management tool that will be ready beginning next year. 
If you cannot wait this long, please reach out to us directly at support@quickassortments.com We can always help you to import historical data manually.

= Is this plugin compatible with other third party plugins and themes? =

Yes! Good news is, this plugin has it's own API and it has no interaction with frontend or theme. Moreover, every part of this plugin is modular and hookable. Thus data coming from this plugin is mutable through its API at any stage. And as no frontend interaction this plugin is 100% compatible with any theme.

= Can a user request any new feature? =
Yes! Obviously you can. Either here at this support forum or at our dedicated Jira Support repository you can leave a request. 
You'll find the support pages under 'Support' on our website. From there you'll be directed to our Atlassian support portal and can create change request, report bugs or create a support ticket.

= Can we contribute with code or translation? =
Sure! We'll be more than happy to accept your contribution here.

= What is your future plan with this? Can we rely on you that you'll support this plugin in the future? =
We have a long list of other very cool plugins related to e-commerce business, merchandising and forecasting which are now cooking in the kitchen. These will be released within the next few months. This plugin will work as a base platform for all these plugins. We guarantee to maintain this plugin and update it on a regular basis with new features and cool functionality.

We also have a dedicated team for support and we'll try our best to answer any questions or solve any problem you encounter. We're friendly people, so don't hesitate to reach out to us and ask for support, or if you have any idea on how we can make our products better.

== Changelog ==
= VERSION 2.4.0 | 03-SEP-2020 =
[FIX]

* Sanitization fix for some POST input

= VERSION 2.3.1 | 26-AUG-2020 =
[FIX]

* Early sanitized a POST input WordPress.org folks suggested

= VERSION 2.3.0 | 25-AUG-2020 =
[FIX]

* Sanitized some POST and GET input

[UPDATE]

* Switched to PSR2 coding standard

= VERSION 2.2.2 | 10-MAY-2020 =
[FIX]

* Fix for https://wordpress.org/support/topic/cost-price-field-is-not-saved/
* Code formation fixed

[UPDATE]

* Menu rearranged
* CSS/JS and other assets reorganized

= VERSION 2.2.1 | 26-APR-2020 =
[FIX]

* Mark up column decimal issue fixed

[UPDATE]

* CSS, JS and SCSS assets relocated

= VERSION 2.2.0 | 19-APR-2020 =
[FIX]

* Compatibility fix for WooCommerce 4.0+
* Compatibility fix for WordPress 5.4+

= VERSION 2.1.0 | 14-FEB-2020 =
[FIX]

* Coding style fix
* Code documentation fix

[UPDATE]

* New class for helper methods introduced
* New helper method introduced to product or variation cost

[FEATURE]

* For variable product, a new generic cost field introduced to add generic cost to variations

= VERSION 2.0.1 | 04-JAN-2020 =
[FIX]

* Cost price input issue fixed. ISSUE: COGM-52.
* Variation backend design CSS fixed.

[UPDATE]

* `readme.txt` updated.

= VERSION 2.0.0 | 24-DEC-2019 =
[FEATURE]

* Introduced React JS based dashboard.
* Historical data collection support added.
* Introduced D3.js charts for historical data.
* Data storing functionality added


[UPDATE]

* File organization changed.
* Separate DB class added.

[FIX]

* Way of module class calling and instantiating fixed.
* Product dashboard fields CSS alignment fixed.
* PHP class file top unicode header fixed.


= VERSION 1.1.0 | 08-OCT-2019 =
[FEATURE]

* **Margin with including and excluding tax** feature added.


[UPDATE]

* WP version updated to 5.2.3.
* Turned the checkboxes(tick-boxes) into toggle switch at settings page. 

[FIX]

* Made *Changelog* month name uppercase.

= VERSION 1.0.1 | 24-MAY-2019 =
[UPDATE]

* WP version updated to 5.2.1.
* Added 'final' for each class to make the class un-extensible.

[FIX]

* PHPDoc updated for each class and method

= VERSION 1.0.0 | 22-APR-2019 =
* Initial release.
