<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="pick_task_det" pageWidth="283" pageHeight="420" columnWidth="283" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="REPLORDER" class="java.lang.String"/>
	<queryString language="SQL">
		<![CDATA[select t.REPL_ORDER,
t.ORDER_DATE,
t.SITE_CODE,
t.SALE_ORDER,
t.WAVE_ID,
t.ORDER_TYPE,
t.CHG_USER,
t.CHG_DATE,
t.CHG_TERM,
t.LINE_NO,
t.LINE_NO__SORD,
t.ITEM_CODE,
t.LOC_CODE,
t.LOT_NO,
t.LOT_SL,
t.NO_ART,
t.QUANTITY,
t.EXP_LEV, t.unit,t.COUNT_CODE__MFG
 from  (

select r.REPL_ORDER REPL_ORDER,
r.ORDER_DATE,
r.SITE_CODE,
r.SALE_ORDER,
r.WAVE_ID,
r.ORDER_TYPE,
r.CHG_USER,
r.CHG_DATE,
r.CHG_TERM,
rd.LINE_NO,
rd.LINE_NO__SORD,
rd.ITEM_CODE,
rd.LOC_CODE,
rd.LOT_NO,
rd.LOT_SL,
rd.NO_ART,
rd.QUANTITY,
rd.EXP_LEV   , i.unit,i.COUNT_CODE__MFG
from repl_ord_hdr r, repl_ord_det rd,item i
where r.repl_order = rd.repl_order
and i.item_code = rd.item_code
and r.repl_order = '$P!{REPLORDER}'
union all
select p.PICK_ORDER PICK_ORDER,
p.ORDER_DATE ORDER_DATE,
p.SITE_CODE SITE_CODE,
p.SALE_ORDER,
p.WAVE_ID,
p.PICK_TYPE,
p.CHG_USER,
p.CHG_DATE,
p.CHG_TERM,
pd.LINE_NO,
pd.LINE_NO__SORD,
pd.ITEM_CODE,
pd.LOC_CODE,
pd.LOT_NO,
pd.LOT_SL,
pd.NO_ART,
pd.QUANTITY,
pd.EXP_LEV , i.unit,i.COUNT_CODE__MFG
from pick_ord_hdr p, pick_ord_det pd,item i
where p.pick_order = pd.pick_order
and i.item_code = pd.item_code
and p.pick_order = '$P!{REPLORDER}'
) t
order by t.loc_code]]>
	</queryString>
	<field name="REPL_ORDER" class="java.lang.String"/>
	<field name="ORDER_DATE" class="java.util.Date"/>
	<field name="SITE_CODE" class="java.lang.String"/>
	<field name="SALE_ORDER" class="java.lang.String"/>
	<field name="WAVE_ID" class="java.lang.String"/>
	<field name="ORDER_TYPE" class="java.lang.String"/>
	<field name="CHG_USER" class="java.lang.String"/>
	<field name="CHG_DATE" class="java.util.Date"/>
	<field name="CHG_TERM" class="java.lang.String"/>
	<field name="LINE_NO" class="java.lang.Integer"/>
	<field name="LINE_NO__SORD" class="java.lang.Integer"/>
	<field name="ITEM_CODE" class="java.lang.String"/>
	<field name="LOC_CODE" class="java.lang.String"/>
	<field name="LOT_NO" class="java.lang.String"/>
	<field name="LOT_SL" class="java.lang.String"/>
	<field name="NO_ART" class="java.lang.Integer"/>
	<field name="QUANTITY" class="java.lang.Double"/>
	<field name="EXP_LEV" class="java.lang.String"/>
	<field name="UNIT" class="java.lang.String"/>
	<field name="COUNT_CODE__MFG" class="java.lang.String"/>
	<group name="LOC_CODE">
		<groupExpression><![CDATA[$F{LOC_CODE}]]></groupExpression>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="15" splitType="Stretch">
			<staticText>
				<reportElement x="2" y="2" width="44" height="13"/>
				<textElement/>
				<text><![CDATA[Location]]></text>
			</staticText>
			<staticText>
				<reportElement x="59" y="2" width="26" height="13"/>
				<textElement/>
				<text><![CDATA[SKU]]></text>
			</staticText>
			<staticText>
				<reportElement x="139" y="2" width="28" height="13"/>
				<textElement/>
				<text><![CDATA[UM]]></text>
			</staticText>
			<staticText>
				<reportElement x="193" y="2" width="39" height="13"/>
				<textElement/>
				<text><![CDATA[UMQ]]></text>
			</staticText>
			<staticText>
				<reportElement x="234" y="2" width="24" height="13"/>
				<textElement/>
				<text><![CDATA[QTY]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="28" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="2" y="0" width="57" height="14"/>
				<textElement>
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LOC_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="59" y="0" width="67" height="14"/>
				<textElement>
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ITEM_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="139" y="1" width="48" height="14"/>
				<textElement textAlignment="Left">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{UNIT}]]></textFieldExpression>
			</textField>
			<textField pattern="0" isBlankWhenNull="true">
				<reportElement x="193" y="0" width="39" height="14"/>
				<textElement textAlignment="Left">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{QUANTITY}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="147" y="13" width="111" height="14"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LOT_NO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="121" y="13" width="26" height="14"/>
				<textElement>
					<font size="10"/>
				</textElement>
				<text><![CDATA[LOT: ]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="233" y="1" width="25" height="14"/>
				<textElement textAlignment="Left">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$F{NO_ART}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
