|
@@ -6,12 +6,17 @@
|
|
|
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">
|
|
|
+ <when>
|
|
|
+ u_mtrl_price.mtrltype = 2
|
|
|
+ </when>
|
|
|
+ <when notnull="@arg_pricelistid">
|
|
|
u_mtrl_price_pricelist.pricelistid = @arg_pricelistid
|
|
|
</when>
|
|
|
+ <when notnull="@arg_bednetid">
|
|
|
+ u_mtrl_price_pricelist.pricelistid = (select pricelistid from u_dept where deptid = (select deptid from u_bednet where bednetid = @arg_bednetid))
|
|
|
+ </when>
|
|
|
</where>
|
|
|
<displayfields>
|
|
|
</displayfields>
|