Costs, margins, and prices
How Mosce ERP calculates the cost of your products (weighted average), how it suggests the sale price from the margin, and why the price only goes up automatically, never down.
This guide explains, in business language, Mosce ERP's complete cost and price model: how the cost is frozen on a purchase order, how the weighted average cost is recalculated when you receive the same product at different prices, in what order the margin is looked up to suggest the sale price, and why the automatic price update only goes up, never down. If you understand this article, you understand how money moves between purchases, inventory, and sales.
Reading time: ~9 min
When to read this
- You saw a product's sale price change on its own after receiving a purchase and want to understand why.
- The "real margin" shown on the product record or the receipt form does not add up for you.
- You want to define your margins consistently (per product, per purchase line, or at the company level).
- A margin figure looks extremely high to you (for example "525%") and you need to know whether it is correct.
The three numbers and how they relate
Each product works with three numbers that are worth not confusing:
| Number | What it is | Who moves it |
|---|---|---|
| Cost | What it costs you to acquire the product. | Purchases update it automatically (weighted average). On the product record it is also editable by hand. |
| Sale price | What you charge the customer. | You define it, or the system suggests it from the margin. |
| Margin | The percentage of profit you want to earn on the cost. | You define it; the system uses it to suggest the price. |
The basic relationship is:
Sale price = Cost × (1 + Margin / 100)And conversely, if you set the price by hand, the margin is derived:
Margin = (Sale price − Cost) ÷ Cost × 100Important: the cost does NOT take part in the margin ↔ price link on the product record. Changing the cost by hand does not automatically recalculate either the price or the margin, because the "real" cost is handled by purchases (see below). Only the margin and the price are linked to each other in the form.
The cost on a purchase order is a frozen "snapshot"
When you create a purchase order, each line brings a unit cost. That cost is preloaded from the product's current cost, but from that moment on it is independent and editable: it is a snapshot of the price agreed with the supplier at that time.
This has a key consequence:
- If you later change the product's cost in its record, the purchase orders already created are NOT rewritten. Each order keeps the cost it had when it was created.
- So an old order always reflects what you actually agreed on, not the current catalog cost.
You can adjust each line's cost freely before receiving the goods (for example, if the supplier changed the price compared to the last purchase).
Weighted average cost (how the cost is recalculated)
Mosce ERP values inventory with the weighted average cost method (Weighted Average Cost, WAC). The idea: when you receive the same product at different costs over time, the unit cost the system uses is the average, weighted by the quantities of each purchase.
Only purchase receipts move the average cost. Sales and inventory adjustments do not alter it.
The formula applied every time you receive goods is:
New cost = (Previous stock × Previous cost + Received quantity × Purchase cost)
÷ (Previous stock + Received quantity)Numeric example
Suppose you start from zero:
- First purchase: you receive 10 units at RD$100 each.
- Stock: 10 units. Average cost: RD$100.
- Second purchase: you receive 10 units at RD$120 each.
- Calculation:
(10 × 100 + 10 × 120) ÷ (10 + 10) = (1,000 + 1,200) ÷ 20 = 2,200 ÷ 20 - Stock: 20 units. Average cost: RD$110.
- Calculation:
From that moment on, each unit in inventory is valued at RD$110, regardless of whether it came from the first or the second purchase.
- Third purchase: you receive 5 units at RD$140.
- Calculation:
(20 × 110 + 5 × 140) ÷ (20 + 5) = (2,200 + 700) ÷ 25 = 2,900 ÷ 25 = 116 - Stock: 25 units. Average cost: RD$116.
- Calculation:
The average cost always moves toward the most recent purchase's cost, but "held back" by the stock you already had. The more previous stock you have, the less a new purchase moves the average.
The margin cascade to suggest the sale price
When you receive goods and the cost goes up, Mosce ERP can suggest a new sale price to preserve your profit. For that it needs to know which margin to apply. The lookup follows this priority order, stopping at the first one it finds configured:
- Purchase order line margin - the "for this purchase" margin you captured on the line. It is the most specific and overrides everything else.
- Product margin - the default margin configured on the product record.
- Business global margin - a fallback margin at the company level, configured in Settings → Profit margins.
- None configured - if there is no margin at any of the three levels above, the system does NOT invent a margin. The suggested price stays equal to the cost (0% markup). Mosce ERP never assumes a margin you did not define.
In short: purchase line → product → company → (nothing ⇒ price = cost). The first that exists wins.
The automatic price update ONLY GOES UP, never down
There are two conditions for the sale price to change on its own:
- You have to have enabled the feature. If your business did not turn on the automatic price update when receiving purchases, the sale price is never touched automatically - it stays exactly as you left it.
- Even if enabled, the system only raises the price, never lowers it on its own.
So what happens when the cost goes up and the calculated price would be below the current price? The system keeps the current price and, instead, recalculates the real margin so the product record keeps showing a truthful margin against the new cost. That way it never lowers your price without you deciding it, but the record does not lie to you about how much you are actually earning.
- When the price does go up, you will see an on-screen notification with the previous and the new amount.
- When only the margin is recalculated (because the price did not go up), your notifications tray is not filled: it is a silent information adjustment.
If the cost goes down, the system never lowers the sale price automatically. That decision always stays in your hands.
On the product record: margin ↔ price go linked
The product form links the margin and the sale price bidirectionally, so they are never left inconsistent:
- If you change the margin, the sale price is recalculated:
Price = Cost × (1 + Margin / 100). - If you change the sale price, the margin is recalculated in reverse to show the real margin:
Margin = (Price − Cost) ÷ Cost × 100.
The cost does NOT enter this link: editing it by hand does not trigger any recalculation, because the cost is governed by purchases (weighted average). The cost is a normal editable field.
Edge cases:
- If the cost is 0 (or not defined), the margin calculated from the price is shown as 100% when the price is greater than 0, or 0% when the price is also 0.
- If you set a margin with a cost of 0, the resulting price is 0 (there is no base on which to apply the margin).
"Markup on cost" vs "margin on sale"
This is the #1 cause of confusion with percentages. They are two different ways of expressing the same profit:
- Markup on cost = how much you add to the cost, measured against the cost.
Markup = (Price − Cost) ÷ Cost × 100 - Margin on sale = what portion of the sale price is profit, measured against the price.
Margin on sale = (Price − Cost) ÷ Price × 100
Example: a cost of RD$1,200 sold at RD$7,500
- Markup on cost:
(7,500 − 1,200) ÷ 1,200 × 100 = 6,300 ÷ 1,200 × 100 = 525% - Margin on sale:
(7,500 − 1,200) ÷ 7,500 × 100 = 6,300 ÷ 7,500 × 100 = 84%
It is the same operation seen in two ways: a 525% markup on cost equals an 84% margin on sale. A high number like "525%" does not mean something is wrong: it simply means the price is several times the cost, expressed on the basis of the cost.
Mosce ERP uses markup on cost for the margin cascade and for the margin ↔ price link on the product record (because it starts from the cost to suggest the price). When you see a very high percentage next to the suggested price after receiving a purchase, remember that it is markup on cost, not margin on sale.
Expected result
- Each product's cost reflects real purchases (weighted average), not theoretical estimates.
- Each purchase order keeps the cost frozen at the moment it was created, even if the catalog changes afterward.
- The sale price is suggested with a clear margin and in a predictable priority order (line → product → company → cost).
- The price never goes down on its own: your margin is protected, and the record always shows a real margin against the current cost.
- You know how to read a high percentage without alarm: you distinguish markup on cost from margin on sale.
Related
- Purchases - where the cost and the per-line margin are captured, and where the goods are received.
- Products - the record where margin and price are linked.
- Inventory and stock - inventory valuation and the kardex.
Batch inventory adjustments
Adjust several products and sections in a single document, with a reason, a draft and a confirmation step, and its accounting effect of loss or overage.
Purchases
Create purchase orders, batch-edit products, send the order to the supplier by email (optional), receive the goods (partial or full), void a receipt, and link the supplier invoice.