<?xml version="1.0" encoding="utf-8" ?>
<select>
	<selectstr>
		select
			bednetid_mattressid,
			cmpdate,
			cmpemp,
			nottax_dept_cost,
			dept_cost,
			foreign_cost
		from u_his_price
	</selectstr>
	<where>
		<when notnull="@arg_id">
			bednetid_mattressid = @arg_id
		</when>
		<when notnull="@arg_typeid">
			typeid = @arg_typeid
		</when>
	</where>
	<orderstr>
		cmpdate DESC
	</orderstr>
	<displayfields>
		<field field="pid" compute="getrow()">序</field>
		<field field="cmpdate" datatype="datetime">重算日期</field>
		<field field="cmpemp">重算人</field>
		<field field="nottax_dept_cost" datatype="number">不含税部门价</field>
		<field field="dept_cost" datatype="number">含税部门价</field>
		<field field="foreign_cost" datatype="number">外币价</field>
	</displayfields>
</select>
