Hello everybody,
In a 3.70 version, the last direct cost on the item card was updated when posting a purchase invoice. In the version 4, a positive inventory adjustment also updates this field (the help doesn't sound so). I'm quite amazed to see that there's no subject about this change because several customers don't agree with this new behaviour since we converted to the version 4.
My question is not about how to change the code. I would like to share any experience or comment or workaround about this change.
Thanks
0
Comments
Rgds,
sea-navision-community-subscribe@yahoogroups.com
detail in:
http://sea-navision-community.blogspot.com
So I've changed the code so the last direct cost is only adjusted when you post an invoice. I've changed function UpdateUnitCost in codeunit 22 :
IF NOT Item.FIND THEN
EXIT;
// START I18
//IF ("Item Ledger Entry Type" IN
// ["Item Ledger Entry Type"::Purchase,
// "Item Ledger Entry Type"::"Positive Adjmt.",
// "Item Ledger Entry Type"::Output]) AND
IF ("Item Ledger Entry Type" ="Item Ledger Entry Type"::Purchase) AND
// STOP I18
("Cost Amount (Actual)" + "Discount Amount" > 0) AND
(ItemJnlLine."Value Entry Type" = ItemJnlLine."Value Entry Type"::"Direct Cost") AND
(ItemJnlLine."Item Charge No." = '') AND
("Invoiced Quantity" > 0)
THEN
LastDirectCost :=
ROUND(
(ItemJnlLine.Amount + ItemJnlLine."Discount Amount") / "Invoiced Quantity",
GLSetup."Unit-Amount Rounding Precision");
I have some more comments on the positive adjustments. The price of a positive adjustment is the unit cost on the item card. The unit cost is calculated only at the items in inventory. So if you have no items in stock the unit cost of the item is 0. So if you make a positive adjustment of an item which has no inventory the positive adjustment has a value of 0. So this positive adjustment doesn't create an increase of inventory value.
Take a look at UpdateUnitCost function in codeunit 22. This place is where you need to modify if you want it changed.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book