I am having a case of scenario which I am unable to resolve , When I am having a purchase receipt/invoice I need to print the barcode/serial code tags from there , I can make a custom doc type but i am unable to figure out how to access the latest selling price which is not available in that table ?
You need a query to fetch the Item price from the Item price using the pricelist Standard Selling if you use the default.
But this way the item should only have a single Price in Standard Selling or else you will need complex query to fetch the same with Item Code, UOM etc.