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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Production Consumption Correction Bug

(0) ShareShare
ReportReport
Posted on by 5
Hello,
I don know where to publish this, it is a bug in original code, discovered by accident.
On one of our client database (Dynamics NAV 2016 CU 13) we have noticed that procedure Adjust cost – Item Entries posts new cost even if on new cost had been added to entry, it has posted milions already.
We recreated the condition on newest on-prem Bustiness Central W1 edition (CU 04 Dynamics 365 Business Central Spring 19 Update W1), and noticed that the bug is in this version also.
Bug is created when you correct more than a half production journal consumption, of one item, that has consumption that has been outputted in the same production order, and you have to have item tracking on consumed item.
Production output and consumption ticks Applied Entry to Adjust field in Item Ledger Entry that causes wrong entry to process when Adjusting Cost, and adding non-existing cost. Cost adjustment post new cost, when item Cost is Adjusted field is false, in Value Entry every time even if no new cost has been added to entry.
My opinion is that the bug appears in CU 99000830 Create Reserv. Entry  Function TransferReservEntry.
 Code:
//……
IF UseQtyToHandle THEN BEGIN // Used when handling Item Tracking
  QtyToHandleThisLine := OldReservEntry."Qty. to Handle (Base)";
  QtyToInvoiceThisLine := OldReservEntry."Qty. to Invoice (Base)";
  IF ABS(TransferQty) > ABS(QtyToHandleThisLine) THEN
    TransferQty := QtyToHandleThisLine;
  IF UseQtyToInvoice THEN BEGIN // Used when posting sales and purchase
    IF ABS(TransferQty) > ABS(QtyToInvoiceThisLine) THEN
      TransferQty := QtyToInvoiceThisLine;
  END;
END ELSE
  QtyToHandleThisLine := OldReservEntry."Quantity (Base)";
……//
 
In part in red we presume that both TransferQty and QtyToHandleThisLine have the same sign.
But when we post correction of the consumption TransferQty is positive and QtyToHandleThisLine is negative,
and with absolute comparison TransferQty becomes negative, and it creates wrong Item application Entry, that creates wrong postings.
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,964 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,086 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,039 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans