Rate List on Purchase Receipt and Serial Number

Hello Everyone ,

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 ?

This table shows only buying , how can we access the selling rate here to print on barcode/serial code?

thanks alot or if there is some better way please help

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.

I use something like this

frappe.db.get_value("Item Price", {"item_code": row.item, "price_list": "Standard Selling"}, "price_list_rate" )

I think this should be enough for you.

Oh thanks , do i add this query in jinja thing? like custom print format?

Yes

{{ frappe.db.get_value(“Item Price”, {“item_code”: row.item, “price_list”: “Standard Selling”}, “price_list_rate” ) }}

This should be the line.

thank you so very much @fkardame ! You are a life savior

Can I ask one more thing ? a random question?

When i am trying to print and the barcode/serial numbers and they are 100+ the loop becomes irresponsive any workarounds?

Never mind I managed to solve it :slight_smile: