Last direct cost updated with positive adjustments

fred69fred69 Member Posts: 16
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

Comments

  • johnson_alonsojohnson_alonso Member Posts: 690
    I have also experienced it but I can accept it because my costing is average and company can accept it too. It seems that you need to check code unit relate to it.


    Rgds,
  • RuleRule Member Posts: 34
    We've experienced the same problem. We use the last direct cost to have some control over the price evolution. If we place a new order we check if an item is cheaper or more expensive (so we can negotiate a better price)

    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.
    Realisations are only limited by the borders of imagination
  • Alex_ChowAlex_Chow Member Posts: 5,063
    In 3.7b, the Last Direct Cost was updated when you do a positive adjustment. I'm pretty sure that Navision has always done this.

    Take a look at UpdateUnitCost function in codeunit 22. This place is where you need to modify if you want it changed.
Sign In or Register to comment.