Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
reports:purchasing [2024/07/26 04:21] – [mSupply's better algorithm] Louisa Wong | reports:purchasing [2025/06/06 05:06] (current) – [mSupply's better algorithm] Nick Pendergrast | ||
---|---|---|---|
Line 55: | Line 55: | ||
== Report on purchase orders... == | == Report on purchase orders... == | ||
- | In the same way, you can also filter your reports on properties of the purchase orders involved: category, status and both purchase order custom fields. | + | In the same way, you can also filter your reports on properties of the purchase orders involved: category, status and both purchase order custom fields. |
+ | |||
+ | <WRAP info center round 90%> | ||
+ | Please note there is also a //Purchases by suppliers// report that relates stock received to purchase orders made. This is one of the item ledger type reports and details can be foiund on the [[reports: | ||
+ | </ | ||
===== Purchases ===== | ===== Purchases ===== | ||
Line 74: | Line 78: | ||
Use this report for mSupply to analyse your current stock and, based upon a required number of months of stock cover which you enter, suggest how much of each stock item you should consider ordering. | Use this report for mSupply to analyse your current stock and, based upon a required number of months of stock cover which you enter, suggest how much of each stock item you should consider ordering. | ||
- | There are currently | + | There are currently |
Line 81: | Line 85: | ||
Some logic behind the calculations involved in this report is described in detail on the [[purchasing: | Some logic behind the calculations involved in this report is described in detail on the [[purchasing: | ||
- | As of version 7.15, mSupply supports a wide array of options for calculating | + | As of version 7.15, mSupply supports a wide array of options for calculating |
The options are: | The options are: | ||
=== Don't Adjust AMC === | === Don't Adjust AMC === | ||
This has been the default in mSupply up until this point. | This has been the default in mSupply up until this point. | ||
- | The consumption | + | The historic |
- | This works well if the item was fully stocked for the whole time. It gives too low a number | + | This works well if the item was fully stocked for the whole time. This method results in the forecast AMC being __too low__ if stock was low or zero in the past. |
+ | <WRAP center round important 60%> | ||
+ | **Consumption** vs **Distribution** vs **Issuance**: | ||
+ | </ | ||
=== Adjust by % of days out of stock === | === Adjust by % of days out of stock === | ||
- | This method takes each month' | + | This method takes each historic |
- | We multiply the consumption for the month by (Days in month divided by Days in stock) to get adjusted | + | We multiply the consumption for the month by (Days in month divided by Days in stock) to get an // |
- | Take this example: | + | Take this example |
* Item B was in stock for 10 days in the month | * Item B was in stock for 10 days in the month | ||
- | * Its consumption was 500 | + | * Its historic |
* The adjusted AMC is 500 x 31 / 10 = 1,550 | * The adjusted AMC is 500 x 31 / 10 = 1,550 | ||
Line 100: | Line 108: | ||
=== Only consider fully stocked months === | === Only consider fully stocked months === | ||
Here, we are attempting to address months with low stock by excluding them from our calculations, | Here, we are attempting to address months with low stock by excluding them from our calculations, | ||
- | There is a field shown **% of days in stock to be considered fully stocked** that defaults to "90%" | + | There is a field shown **% of days in stock to be considered fully stocked** that defaults to '' |
- | Note that you need to set the lookback period long enough that mSupply will be able to find enough fully stocked months to run the calculation. You can also include more months by setting the **% of days in stock to be considered fully stocked** field to (say) 50%. | + | <WRAP center round tip 60%> |
- | === mSupply' | + | For this method to work, you need to set the lookback period long enough that mSupply will be able to find enough fully stocked months to run the calculation. You can also include more low stock months by setting the **% of days in stock to be considered fully stocked** field to say) '' |
+ | </ | ||
+ | === mSupply' | ||
We've tried to come up with a better algorithm here by: | We've tried to come up with a better algorithm here by: | ||
* ignoring months that are in stock for < 33% of days. That is, if the item was in stock for less than 10 days in the month, the consumption on those days is too erratic to draw conclusions about what the consumption for the whole month would have been. | * ignoring months that are in stock for < 33% of days. That is, if the item was in stock for less than 10 days in the month, the consumption on those days is too erratic to draw conclusions about what the consumption for the whole month would have been. | ||
- | * For months with stock >= 33% of days, Multiply the consumption for the month by Square Root(Days in month/Days in stock) to get adjusted AMC. This adjusts the consumption up due to being out of stock, but by a factor up to 1.7 - so not as big an adjustment as the " | + | * For months with stock >= 33% of days, Multiply the consumption for the month by √(Days in month/Days in stock) to get adjusted AMC. This adjusts the consumption up due to being out of stock, but by a factor up to 1.7 - so not as big an adjustment as the " |
* We also ignore months where the mean stock on hand is less than "% of typical AMC that stock level is considered compromised:" | * We also ignore months where the mean stock on hand is less than "% of typical AMC that stock level is considered compromised:" | ||
* Consider Item A - we have set the "when we calculate consumption there are 3 months that were "fully stocked" | * Consider Item A - we have set the "when we calculate consumption there are 3 months that were "fully stocked" | ||
- | * Now, there' | + | * Now, there' |
- | * But it turns out that the average stock on hand was only 50 - clearly they could never have had " | + | * But it turns out that the average stock on hand was only 50 - clearly they could never have had " |
- | We then sum the adjusted consumption for all the eligible months & divide by the number eligible months to get the best AMC eva ;-) | + | We then sum the adjusted consumption for all the eligible months & divide by the number eligible months to get the best forecast |
+ | |||
+ | |||
+ | |||
+ | |||
+ | Here's a diagram: | ||
+ | |||
+ | < | ||
+ | graph TD | ||
+ | A(Was the Month fully stocked? | ||
+ | A--> | ||
+ | B--> | ||
+ | D--> | ||
+ | classDef OR fill: | ||
+ | class A,B,C,D,E,F OR | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
=============== | =============== | ||
Line 120: | Line 149: | ||
Lets say we are using: | Lets say we are using: | ||
- | {{: | + | {{ : |
- | Step 1: | + | **Step 1:** First we are adjusting by % days in stock to be considered fully stocked. This calculation will be used in Step 2 to calculate the typical AMC. |
- | First we are adjusting by % days in stock to be considered fully stocked. This calculation will be used in Step 2 to calculate the typical AMC. | + | |
So if this is set as 90%, only months with ≥90% stock will be considered. | So if this is set as 90%, only months with ≥90% stock will be considered. | ||
In this case, Nov 2023 (202311) and Oct 2023 (202310) are excluded as it is less than 90%. | In this case, Nov 2023 (202311) and Oct 2023 (202310) are excluded as it is less than 90%. | ||
- | {{: | + | {{ : |
- | Step 2: | + | **Step 2:** We then calculate the typical AMC which excludes the months Nov 2023 (202311) and Oct 2023 (202310) from step 1. To do this, we use: |
- | We then calculate the typical AMC which excludes the months Nov 2023 (202311) and Oct 2023 (202310) from step 1. To do this, we use: | + | |
(Total consumption of only months included in Step 1)/(Number months usage basis) | (Total consumption of only months included in Step 1)/(Number months usage basis) | ||
= 100 / 7.8 = 12.82. Red coloured boxes indicate exclusion. | = 100 / 7.8 = 12.82. Red coloured boxes indicate exclusion. | ||
(Note: We have 7 full months, and 0.8 of a month due to July 2024 (202407) as 26 days is 0.8. | (Note: We have 7 full months, and 0.8 of a month due to July 2024 (202407) as 26 days is 0.8. | ||
- | {{: | + | {{ : |
- | Step 3: | + | **Step 3:** Next there is an automatic exclusion for days of low stock ≥33% in the month. Note: This is automatic and is not set by the user. In the example, this is Nov 2023 (202311) as it is the only month with less than 33% days in stock in the month. |
- | Next there is an automatic exclusion for days of low stock ≥33% in the month. Note: This is automatic and is not set by the user. In the example, this is Nov 2023 (202311) as it is the only month with less than 33% days in stock in the month. | + | |
- | Step 4: | + | **Step 4:** Now we consider the criteria of "100% of typical AMC that stock level is considered compromised" |
- | Now we consider the criteria of "100% of typical AMC that stock level is considered compromised" | + | |
Since this is set as 100% by us, we now take the typical AMC (12.82) and check the Mean SOH of each month to make sure that this is equal or higher than 12.82. If stock level is not higher than 12.82, that month will be excluded from the Adjusted AMC calculation (Step 5). Note: If we had selected 90% of typical AMC to be considered compromised, | Since this is set as 100% by us, we now take the typical AMC (12.82) and check the Mean SOH of each month to make sure that this is equal or higher than 12.82. If stock level is not higher than 12.82, that month will be excluded from the Adjusted AMC calculation (Step 5). Note: If we had selected 90% of typical AMC to be considered compromised, | ||
Line 151: | Line 176: | ||
From the example, we will now have 8.8 months that we will be considering for the Adjusted AMC. | From the example, we will now have 8.8 months that we will be considering for the Adjusted AMC. | ||
- | {{: | + | {{ : |
- | Step 5: | + | **Step 5:** We can now calculate the Adjusted AMC with the formula: |
- | We can now calculate the Adjusted AMC with the formula: | + | Square root[(Days in month)/(Days in the stock)] * Consumption |
- | Square root[(Days in stock)/(Days in the month)] * Consumption | + | |
We check this individually for each month that has not been excluded. | We check this individually for each month that has not been excluded. | ||
So, if the "Days in month" = "Days in Stock", | So, if the "Days in month" = "Days in Stock", | ||
Line 164: | Line 188: | ||
100 + 167.87 = 267.87 total for all included months that we will use to calculate adjusted AMC. | 100 + 167.87 = 267.87 total for all included months that we will use to calculate adjusted AMC. | ||
- | Step 6: | + | **Step 6:** For the Adjusted AMC = 267.87/8.8 months = 30.34 units per month. |
- | For the Adjusted AMC = 267.87/8.8 months = 30.34 units per month. | + | |
- | Note: If all months have been excluded due to the first or second exclusion criteria, then the typical AMC calculation will automatically be used instead. | + | **Steps Summarised:** |
+ | **Step 1:** Adjusting by % Days in Stock | ||
+ | * Set threshold for fully stocked (e.g., 90%) | ||
+ | * Exclude months with < 90% stock | ||
+ | **Step 2:** Calculate Typical AMC | ||
+ | * Use months not excluded in Step 1 | ||
+ | * Calculate Typical AMC = (Total consumption of only months included in Step 1)/(Number months usage basis) | ||
+ | |||
+ | **Step 3:** Automatic Exclusion for Low Stock | ||
+ | * Exclude months with < 33% days in stock | ||
+ | |||
+ | **Step 4:** Compromised Stock Level Check | ||
+ | * Set threshold (e.g., 100% of typical AMC) | ||
+ | * Exclude months below threshold | ||
+ | |||
+ | **Step 5:** Calculate Adjusted AMC | ||
+ | * Apply formula to each included month = Square root[(Days in month)/ | ||
+ | * Sum the results | ||
+ | |||
+ | **Step 6:** Final Adjusted AMC Calculation | ||
+ | * Divide total consumption by number of months | ||
+ | * Calculate Adjusted AMC | ||
+ | |||
+ | Note: If all months have been excluded due to the first or second exclusion criteria, then the typical AMC calculation will automatically be used instead. | ||
==== Report options ==== | ==== Report options ==== | ||
Line 192: | Line 238: | ||
Enter " | Enter " | ||
- | **Expected delivery:** Enter an appropriate date based on previous delivery times. | + | **Expected delivery:** Enter an appropriate date that you expect the stock to arrive with you based on previous delivery times. |
**Include usage for build ingredients: | **Include usage for build ingredients: | ||
Line 206: | Line 252: | ||
**AMC Adjustment for Out of Stock:** See the " | **AMC Adjustment for Out of Stock:** See the " | ||
- | **Exclude stock that will expire within 3 months of projected consumption date** | + | **Exclude stock that will expire within 3 months of projected consumption date** a checkbox |
This topic is huge so it may be worth reading this topic [[faq: | This topic is huge so it may be worth reading this topic [[faq: | ||
Line 213: | Line 259: | ||
==== Report output ==== | ==== Report output ==== | ||
- | |||
A typical `Suggested Order` report will look something like below. | A typical `Suggested Order` report will look something like below. | ||
- | {{: | + | {{ : |
Definitions of each column after item properties: | Definitions of each column after item properties: | ||
Line 223: | Line 268: | ||
* Expiring stock : Calculated by (Total stock that is set to expire) - (Daily stock usage [which is derived from the AMC e.g., AMC / 30 days if 30 days in the month]). The amount of expiring stock to be accounted for is selected in the reports option: | * Expiring stock : Calculated by (Total stock that is set to expire) - (Daily stock usage [which is derived from the AMC e.g., AMC / 30 days if 30 days in the month]). The amount of expiring stock to be accounted for is selected in the reports option: | ||
- | {{: | + | {{: |
* Effective SOH : Calculated by (' | * Effective SOH : Calculated by (' | ||
Line 237: | Line 282: | ||
* Monthly usage for the last (x) months : Calculated by (' | * Monthly usage for the last (x) months : Calculated by (' | ||
- | {{: | + | {{: |
* Number of months considered for adjusted AMC : After the AMC adjustment is made (and months with low stock has been excluded), this value indicates the number of months that have been included for calculating the adjusted AMC. This value is derived from whichever formula has been chosen in the "AMC Adjustment for out of stock": | * Number of months considered for adjusted AMC : After the AMC adjustment is made (and months with low stock has been excluded), this value indicates the number of months that have been included for calculating the adjusted AMC. This value is derived from whichever formula has been chosen in the "AMC Adjustment for out of stock": | ||
- | {{: | + | |
+ | {{: | ||
* Adjusted AMC : This adjusted value is based on the formula selected in the Report options: | * Adjusted AMC : This adjusted value is based on the formula selected in the Report options: | ||
- | {{: | + | |
+ | {{: | ||
* Number of months in stock : Calculated by (' | * Number of months in stock : Calculated by (' | ||
- | * Ordered Quantity used : Calculated | + | * Ordered Quantity used : This is how much of the stock you have ordered that you will actually need to use, based on how much you use each day and how much stock you already have (Note: forecast calculation will affect this). This is determined |
+ | * Calculate the "usage per day of stock" = AMC / 30.4375 | ||
+ | * Multiply "usage per day of stock" with the "total number of days in your months stock required" | ||
+ | * Calculate your " | ||
+ | * Subtract "Total usage required" | ||
+ | * This value ("Net stock difference to be used") now determines the " | ||
+ | * If the value is a negative value and there is "Stock on order", add the "Net stock difference to be used" with "Stock on order" = "Net stock difference to be used" + "Stock on order" | ||
+ | * If the value is a positive value and there is "Stock on order", | ||
+ | |||
+ | * Suggested Order calculated by: | ||
+ | * If expected delivery date has not been adjusted: (' | ||
+ | * If expected delivery date has been adjusted, this will be accounted for as it will only look at the stock required from date of expected delivery to the end of months stock required: | ||
+ | |||
+ | * Usage per day = Adjusted AMC/30.4375 (which | ||
+ | * Suggested order quantity = Usage per day x Days needed (which is ' | ||
+ | |||
+ | * This determines | ||
+ | * Note: if you are using the " | ||
+ | * Note: if you are using forecasting this can affect suggested order quantity. Please check forecasting settings on mSupply if it is indicated as being used in the spreadsheet. | ||
+ | * Note: The " | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
- | * Suggested Order : Calculated by (' | ||
- | {{: | ||
- | {{: | ||
* Forecast used : Based on forecasting options under " | * Forecast used : Based on forecasting options under " | ||
- | {{: | ||
+ | {{: | ||
For a more detail guide click on this topic : [[faq: | For a more detail guide click on this topic : [[faq: | ||
===== Suggest order quantities with prices and price extension ===== | ===== Suggest order quantities with prices and price extension ===== | ||
- | This report is an extension of the previous one, allowing you to see what the suggested order will cost. The filter choices you have are the same as for the suggested order quantities report. You get an option to price your suggested order. | + | This report is an extension of the previous one, allowing you to see what the suggested order will cost. The filter choices you have are the same as for the suggested order quantities report |
{{ : | {{ : | ||
- | Key Column headers | + | Key Columns in the report output: |
- | * Unit Price : Calculated via the latest price or by supplier quotes or using average prices received during the look back period. The `look back period` is the same setting that is used to calculate average monthly stock usages. | + | * //Unit Price//: Calculated via the latest price or by supplier quotes or using average prices received during the look back period. The `look back period` is the same setting that is used to calculate average monthly stock usages. |
- | * Price extension (Suggested) : This is the predicted cost of a future order based on Unit Price. | + | * //Price extension (Suggested)//: This is the predicted cost of a future order based on Unit Price. |
- | * Annual consumption (quantity) : This is the predicted stock usage over a year based on the latest average monthly consumption. | + | * //Annual consumption (quantity)//: This is the predicted stock usage over a year based on the latest average monthly consumption. |
- | * Annual consumption (cost) : Potential annual cost based on unit price. | + | * //Annual consumption (cost)//: Potential annual cost based on unit price. |
\\ | \\ | ||
\\ | \\ | ||
- | | // Previous: | + | | // Previous: |
---- struct data ---- | ---- struct data ---- | ||
pagestatus.status | pagestatus.status | ||
---- | ---- | ||