web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Costing method Specific -> on sales order do not get correct unit price based on serial number

(4) ShareShare
ReportReport
Posted on by
Dear All,
 
I have an item with costing method specific. The cost are registered correctly when purchasing and selling this item based on the serial number registered.
But when I create an sales order, the average cost is filled in and the unit price is calculated based on the average cost in the inventory. When I fill in quantity 1 and select correct serial number, the unit cost and price is not updated in the sales order to the exact cost and price of this serial number.
 
For example: 
Purchase 1: 1000euro with serial number SN1000
Purchase 2: 2000euro with serial number SN2000
 
When creating sales order and selecting item with serial number SN2000 the unit cost is 1500euro and unit price is 1700euro (price = cost + profit).
I expect here unit cost 2000 and unit price based on this cost?
 
When posting the sales order, the unit cost of 2000 is correctly registered and inventory gives unit cost of 1000 (for the remaining unit: 1000 + 2000 for purchase - 2000 for sales order).
Why the sales order is not using the correct cost based on the serial number?

Best regards,
 
Wim
  • Suggested answer
    Mansi Soni Profile Picture
    on at
    Costing method Specific -> on sales order do not get correct unit price based on serial number
  • Community member Profile Picture
    on at
    Costing method Specific -> on sales order do not get correct unit price based on serial number
    Dear Mansi,
     
    Thank you for your respons.
    I had read these pages concerning the cost calculation and cost calculation is also correct in my application.
    If I post the sales order, the correct cost is decreased but I do not understand why the unit price calculation is based on the average cost and not on the exact cost of the item if you use specific costing with serial numbers. In my application it would mean that I sell the product with serial number SN2000 for 1700euro (but it's cost was 2000euro). After posting the sales order, the inventory decreases the cost with 2000 but item was sold without profit.
    So I see cost calculation is correct but my selling unit price was not correct. I expect that when i create sales order and select the item by serial number, the unit price is calculated with the exact cost of that serial number. 
    At this moment, I have to check for each serial number wich was the cost and make unit price calculation my self but I'm wondering if I can not do it automatically and what are the conditions/configurations to achieve this. 
     
    Best regards,
     
    Wim
  • Verified answer
    Sohail Ahmed Profile Picture
    on at
    Costing method Specific -> on sales order do not get correct unit price based on serial number

    Root Cause: Sales order calculates unit cost before serial number selection. BC uses average cost until posting when specific cost is applied.

     

    This is standard BC behavior with Specific costing method:

    • Sales line shows average cost initially
    • Actual specific cost applied during posting
    • Unit price calculation uses initial average cost

    Workarounds:

    1. Manual Price Update:

    • After selecting serial number, manually update unit cost/price
    • Use Get Item Unit Cost action

    2. Event Subscriber:

     
    [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterValidateEvent', 'Item Tracking Lines')]
     

    3. Custom Price Calculation:

    • Modify sales line to lookup specific cost by serial number
    • Update unit price based on specific cost
     

    Reference: Microsoft Docs - "Design Details: Item Tracking and Costing" https://learn.microsoft.com/en-us/dynamics365/business-central/design-details-costing-methods

     

    Standard behavior - requires customization to show specific cost before posting.

     

    ✅ Mark this answer as verified if it helps you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans