Purchase price not showing up on the Order

tompynationtompynation Member Posts: 398
Hi,

I had an Item A, that had a unit cost of 39,77.

Then in a codeunit i VALIDATED the "Unit Cost" to 199.

But when i now put this item back on a purchase order, then the "Direct Unit Cost Excl. VAT" isnt getting filled in anymore with the "Unit Cost" of the Item card.

Before i did the Validate this worked fine...

What could have gone wrong? Or why is the "Direct Unit Cost Excl. VAT" not getting filled up anymore??

Answers

  • MAJB1969MAJB1969 Member Posts: 44
    If you were calling the Unit Cost - OnValidate() trigger this would have updated the Standard Cost field on the Item if the Costing Method was Standard.

    You would have had to write code into Codeunit for it to update the Last Direct Cost on the Item Card.

    The program automatically copies the Latest Direct Unit Cost from the Direct Unit Cost field in the Purchase Line table when you post an order as invoiced. If you use journals, the program copies the direct unit cost from the Unit Amount field on item journal lines of the Purchase entry type.

    The program will use the Direct Unit Cost as a default the next time you enter the item on a purchase line or on an item journal line with the entry type Purchase or Positive Adjmt.

    To test this manually fill out the Last Direct Cost on the Item Card and the place this Item on a Purchase Order. Post the Invoice with a higher cost. You will see that the Last Direct Cost on the Item will have changed.

    If you have any special Purchase Prices setup then the system will suggest the price on the Purchase Line.
  • tompynationtompynation Member Posts: 398
    The problem was indeed that the Last Direct Unit Cost was set to 0 by validating the Unit Cost

    Thanks
Sign In or Register to comment.