# How price matrix performs calculations

• Updated

There are some unique complexities introduced when we introduce multiple units of measure and alternate currencies. Additionally, when we try to return a list of prices in a quantity range, we need to meld the sale price at each quantity break to the standard price and return the appropriate table information.

Once the system has selected a Price Matrix record to use, it will pull out the proper quantity break row and calculate the price. If no price matrix record is found, the Product List Price will be used.

The following steps describe the calculation logic for the Generic Price Calculator. It will be followed by ERP-specific adjustments to that.

The basic flow will be:

• Gather all appropriate records from the db
• Filter out the ones that do not matter
• Organize the records from most specific to most general
• Find the right record to use
• Calculate the prices
• Compare to sales price
• Return results

When we indicate most specific to most general, this also applies to warehouse and unit of measure.

Price Basis Adjustment Type Basis Amount Entered Amount Calculation Calculated Price
List Amount 125 -10 List Price + Amount 115.00
List Percent 125 -10 List Price * (1 + Percent) 112.50
Override Amount N/A 110 Amount entered 110.00
Override Percent N/A N/A INVALID
Cost Amount 75 30 Cost + Amount 105.00
Cost Percent 75 30 Cost * (1 + Percent) 97.50
Margin Amount 75 30 Cost + Amount 105.00
Margin Percent N/A N/A INVALID
Markup Amount 75 30 Cost + Amount 105.00
Markup Percent 75 30 Cost * (1 + Percent) 97.50

Each individual quantity break line stands on its own relative to the calculations.

<% if (previousArticle || nextArticle) { %>
<% if (previousArticle) { %>
<% if (previousTitle) { %>

#### <%= previousTitle %>

<% } %> <%= previousArticle.title %>
<% } %> <% if (nextArticle) { %>
<% if (nextTitle) { %>

#### <%= nextTitle %>

<% } %> <%= nextArticle.title %>
<% } %>
<% } %>
<% if (allItems.length > 1) { %>