Margins and Markups: how to handle multiple discounts/rebates

Following on from an old blog post about Margins and markups What everyone in business needs to know a reader posted this question in the comments

If you’re not sure how to calculate margins, read that first.

Hi, how do you do multiple rebates % to give a true value of what the total discount would be.
I.e. 3% + 6% + 8%, is this 17%

TL;DR … probably not 17% but it depends on how your supplier intended you to do it, more likely
100*0.97*0.94*0.92 = 83.8856 remaining, so
100 – ( 100*0.97*0.94*0.92 ) = 16.1144%

The answer is a blog post in it’s own right, but the short version is: It depends.

The most common use I’ve seen in my industry (UK businesses supplying other businesses with kitchen furniture and appliances) is to Apply each discount in turn, using the last result with the next discount value. The only way to be certain is to ask. Even then, you need to make sure you ask the right person. It seems to get confusing to sales reps and accounts departments alike. In once case, I only figured out by checking past supply invoices.

Simple example:
Supplier gives terms of:

  • 30% off retail price to all customers
  • 10% for displaying 1 product
  • 5% for displaying 3 products

This is typical of the ambiguous wording we see.

Note: I’m using the decimal form to calculate the margin – see how and why on the original blog post
In my own industry;
£100 * 0.3 = £30 discount, £70 cost.
The next 10% is 10% off the remaining COST, not 10% off the original retail price
£70 * 0.1 = £7 = £63 cost
The next 5% is in addition to the prior two discounts and also taken off the remaining Cost, not the original retail price
£63 * 0.05 = £3.15 = £59.85

Therefore, the margin for this supplier is: 40.15%
If you only have one location to put the margin, then use 40.15.

However…. it’s not always this simple, which is why you NEED TO CHECK YOUR SOURCE.

Here’s another example of what I’ve seen.
Supplier gives terms of:

  • 30% off retail price to all customers
  • 10% for displaying 1 product
  • 5% for displaying 3 products

This is typical of the ambiguous wording we see.
Wait, that’s the same example….. That’s right. But this time the supplier thinks it’s obvious everyone knows that the first 30% is given to everyone and that the extra for displaying 10% is 10% off the cost and that the extra extra 5% makes it 15% for displaying 3 products.

£100 * 0.3 = £30 discount, £70 cost.
The next 10% is 10% off the remaining COST, not 10% off the original retail price
£70 * 0.1 = £7
The next 5% is off the remaining cost before we got our earlier discount.
£70 * 0.05 = £3.50
Or, we could just say, 15% off the remaining cost in this case, £70 * 0.15 = £10.50
Total cost: £59.50
Margin: 40.50%

These small differences add up and can get confusing quickly.

Why isn’t there one system? It depends on why the extra margins are being applied and used. I’ve seen it deliberately used to make the discount appear bigger. A sales rep will incorrectly say: “We’ll give you 40% off for displaying this product, and if you display another product too we’ll give you an extra 20% off, that’s 60% discount!”…. no, it’s 100-(100*0.6*0.8)= 52% discount.

Blog traffic

sep2016_cloudflare_traffic According to cloudflare, my blog traffic this month.

sep2016_analytics_trafficAccording to google analytics, my blog traffic this month.

The difference?
a) Cloudflare is counting requests to my server (each image, each file, each style sheet) whereas Google Analytics is joining requests from the same visitor into a session.
b) Hackers don’t always ask for a page, and don’t load the javascript that google analytics need to track the visitor.

What can we infer from this?
Computers in Ukraine that are visiting the blog aren’t reading this text, but they visit a lot.
We cannot state with certainty the users instigating this are in Ukraine though, just that the requests can be traced as far as there. Likewise, computers in the USA requesting items from my server are less likely to be people than computers in the UK.
My guess of the reason for this: Hacking attempts, search engines.
You cannot tell from the source (eg: Ukraine) that the people controlling the computer requesting files [be that hacking or search engine or other uses good and bad] are in Ukraine. For example, for a long time my web server lived in Paris, but I’m not in France to control it.

Upgrading my server to PHP7 broke wordpress admin interface (cloudflare)

wp-cli, a command line interface for WordPress, just saved me a big headache.

It all began when I updated my server to the latest ubuntu LTS. That removed PHP5 support and replaced it with PHP7. That meant several of my sites stopped working as the nginx configuration had to change. With that done I thought the blog as the pages were still displaying OK but for some reason I could no longer access the admin interface to make new posts or moderate comments. Instead, when I logged in I would see a message: Sorry, you are not allowed to access this page

I decided the most likely cause of this would be a plugin. However, I couldn’t use the admin interface to disable all the plugins so I needed to find another way. I read that I could start editing the database directly but then I stumbled upon wp-cli. Installing that allowed me to use an SSH shell to check, disable, enable and update the plugins. I quickly discovered that there was an update to cloudflare that hadn’t been applied. I applied it and it failed. I’m not entirely sure if it failed due to the background change of PHP5 to PHP7, or if my earlier fault finding had changed a file owner (I tried removing the plugins by moving the directory to a new name), but once I used wp-cli to update cloudflare everything started working perfectly, including the ability to preview theme changes which had stopped working a long time ago.

If I didn’t find wp-cli I would have been checking my backups, creating a test server in my office to install and test backups and assuming they worked removing and reinstalling wordpress.