Stock Valuation Report
Submitted by EastsideVetEmerg on Sat, 28/06/2014 - 17:10
Hi,
We have been doing stocktake and I was trying to use the following report http://www.openvpms.org/customisation/stock-valuation-report#comment-7680 to get a valuation of stock on hand.
I know this report is intended for an older version of OVPMS. It works on 1.7 but when I run it quite a number of our medications/merchandise items are not included.
Did anyone have a more recent version they might be able to share or a similar report?
Thanks,
Adrian
Re: Stock Valuation Report
Adrian - I had a look at the report. I think that the problem is that it ignores items for which the cost has not been set. I fixed this and ran on my test system - 1430 products found, whereas the standard one found 1419. [If you add a product into the system, but do not bother to set any prices for it then it won't have a cost.]
Note that this is a stock valuation report so that ignoring items with no cost (which is different to having a cost but set to 0) is not a problem.
You are using it as a stock list, and hence you want to to show everything in the system.
Regards, Tim G
Re: Stock Valuation Report
Hi Tim,
Thank you for that. I does indeed now list all the products we have on hand.
Thanks,
Adrian
Re: Stock Valuation Report
Hi,
So I am a little confused where the cost field is being drawn from. I have a number of products listed with 0 cost in the report.
These products do have information entered in the suppliers tab (list and nett prices) and a cost in the "Prices" tab but are still appearing as 0 cost in the report.
I tried to look at the report but couldn't really understand what was going on.
Sorry for the trouble.
Thanks,
Adrian
Re: Stock Valuation Report
Adrian - the report is lifting the cost from the Product Unit Price. ie the $85.00 in the following:
There is a list and nett price set against the supplier and these indicate what the item will cost you if you buy it from that supplier - see below.
However, the cost used is that set against the Unit Price.
Note also that you can set a cost against the Fixed Price of an item - but this is not what the report is using.
The relevant part of the SQL is:
left join product_prices pp on pp.product_id = p.product_id and pp.arch_short_name = "productPrice.unitPrice" left join product_price_details ppd on ppd.product_price_id = pp.product_price_id and ppd.name = "cost"
as you can see it is using the unit price.
Regards, Tim G
Re: Stock Valuation Report
Adrian and I have been having off-forum discussions by email. It turns out that I introduced a truncation bug into the report so something that cost $0.16 was shown as having a cost of $0.00
I have attached the corrected report.
Regards, Tim G