<?xml version="1.0" encoding="utf-8" ?>
<select>
	<selectstr>
		select u_mtrl_price.mtrlid,
		u_mtrl_price.name as mtrlname,
		ISNULL(u_mtrl_price_pricelist.price, 0) AS pricelistprice
		from u_mtrl_price
		LEFT JOIN u_mtrl_price_pricelist ON u_mtrl_price.mtrlid = u_mtrl_price_pricelist.mtrlid
		where u_mtrl_price.mtrltype = 2
	</selectstr>
	<where>
		<when notnull="@arg_bednetid">
			u_mtrl_price_pricelist.pricelistid = @arg_pricelistid
		</when>
	</where>
	<displayfields>
	</displayfields>
</select>
