Carlos, aqui esta el query, con el ultimo precio, seleccionando el mas alto cuando hay 2 o mas ordenes el mismo dia, saludos !
Select
x.itemcode,
x.itemname,
x.price,
x.docdate
from (
Select
a.itemcode,
a.itemname,
b.price,
b.docdate
from
oitm a inner join por1 b on a.itemcode = b.itemcode
where
b.docdate = (select max(q.docdate) from por1 q where q.itemcode = a.itemcode) and a.itemcode = '[%0]'
) x
where x.price = (select max(z.price) from oitm y inner join por1 z on y.itemcode = z.itemcode
where
z.docdate = (select max(r.docdate) from por1 r where r.itemcode = y.itemcode) and y.itemcode = '[%0]')