<?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="lists_unwaved" pageWidth="1316" pageHeight="555" orientation="Landscape" columnWidth="1316" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="as_site_code" class="java.lang.String"/>
	<parameter name="as_item_ser_from" class="java.lang.String"/>
	<parameter name="as_item_ser_to" class="java.lang.String"/>
	<parameter name="as_item_code_from" class="java.lang.String"/>
	<parameter name="as_item_code_to" class="java.lang.String"/>
	<parameter name="as_cust_code_from" class="java.lang.String"/>
	<parameter name="as_cust_code_to" class="java.lang.String"/>
	<parameter name="as_cust_code_dlv_from" class="java.lang.String"/>
	<parameter name="as_cust_code_dlv_to" class="java.lang.String"/>
	<parameter name="as_sale_order_from" class="java.lang.String"/>
	<parameter name="as_sale_order_to" class="java.lang.String"/>
	<parameter name="as_due_date_from" class="java.util.Date"/>
	<parameter name="as_due_date_to" class="java.util.Date"/>
	<queryString>
		<![CDATA[SELECT SORDER.CUST_CODE,
		 CUSTOMER.CUST_NAME,
       SORDDET.LINE_NO,
       SORDER.SALE_ORDER,
       SORDER.DUE_DATE,
       SORDITEM.ITEM_CODE,
       ITEM.DESCR,
       SORDITEM.QUANTITY,
       (SORDITEM.QUANTITY - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC) PENDING_QUANTITY,
       SORDITEM.QTY_ALLOC,
       SORDDET.PACK_INSTR,
       SORDER.SITE_CODE,
       SORDITEM.EXP_LEV,
       SORDER.PART_QTY AS PART_QTY,
       CUSTOMER.SINGLE_LOT AS SINGLE_LOT,
       SORDITEM.MIN_SHELF_LIFE AS MIN_SHELF_LIFE ,
       SORDER.ALLOC_FLAG AS ALLOC_FLAG ,
       WAVE_TYPE.MASTER_PACK_ALLOW ,
       WAVE_TYPE.ACTIVE_PICK_ALLOW ,
       WAVE_TYPE.STOCK_TO_DOCK_ALLOW,
       SORDDET.STATUS ,
       SORDER.STATUS  ,
       SORDDET.HOLD_FLAG
FROM   SORDER,
       SORDDET,
       SORDITEM,
       CUSTOMER,
       ITEM ,
       WAVE_TYPE
WHERE  SORDER.SALE_ORDER      = SORDDET.SALE_ORDER
AND    SORDITEM.SALE_ORDER    = SORDER.SALE_ORDER
AND    SORDDET.LINE_NO        = SORDITEM.LINE_NO
AND    SORDITEM.ITEM_CODE     = ITEM.ITEM_CODE
AND    SORDER.CUST_CODE       = CUSTOMER.CUST_CODE
AND    SORDDET.SITE_CODE      = SORDITEM.SITE_CODE
AND    CUSTOMER.WAVE_TYPE     = WAVE_TYPE.WAVE_TYPE(+)
AND     SORDER.SITE_CODE = $P{as_site_code}
AND     ITEM.ITEM_SER >  =$P{as_item_ser_from}
AND     ITEM.ITEM_SER <  =$P{as_item_ser_to}
AND     ITEM.ITEM_CODE > =$P{as_item_code_from}
AND     ITEM.ITEM_CODE < =$P{as_item_code_to}
AND     CUSTOMER.CUST_CODE >=$P{as_cust_code_from}
AND     CUSTOMER.CUST_CODE <=$P{as_cust_code_to}
AND     SORDER.CUST_CODE__DLV >=$P{as_cust_code_dlv_from}
AND     SORDER.CUST_CODE__DLV <=$P{as_cust_code_dlv_to}
AND     SORDER.SALE_ORDER >=$P{as_sale_order_from}
AND     SORDER.SALE_ORDER <=$P{as_sale_order_to}
AND     SORDER.DUE_DATE >=$P{as_due_date_from}
AND     SORDER.DUE_DATE <=$P{as_due_date_to}
AND    (SORDDET.STATUS = 'C' or SORDER.STATUS <> 'P' or SORDDET.HOLD_FLAG  = 'Y')
AND    (SORDITEM.QUANTITY -SORDITEM.QTY_DESP -SORDITEM.QTY_ALLOC)    = 0
AND     SORDITEM.LINE_TYPE    = 'I'
ORDER BY SORDER.CUST_CODE,
         SORDER.SALE_ORDER,
         SORDITEM.ITEM_CODE__ORD]]>
	</queryString>
	<field name="CUST_CODE" class="java.lang.String"/>
	<field name="CUST_NAME" class="java.lang.String"/>
	<field name="LINE_NO" class="java.lang.String"/>
	<field name="SALE_ORDER" class="java.lang.String"/>
	<field name="DUE_DATE" class="java.util.Date"/>
	<field name="ITEM_CODE" class="java.lang.String"/>
	<field name="DESCR" class="java.lang.String"/>
	<field name="QUANTITY" class="java.lang.Double"/>
	<field name="PENDING_QUANTITY" class="java.lang.Double"/>
	<field name="QTY_ALLOC" class="java.lang.Double"/>
	<field name="PACK_INSTR" class="java.lang.String"/>
	<field name="SITE_CODE" class="java.lang.String"/>
	<field name="EXP_LEV" class="java.lang.String"/>
	<field name="PART_QTY" class="java.lang.String"/>
	<field name="SINGLE_LOT" class="java.lang.String"/>
	<field name="MIN_SHELF_LIFE" class="java.lang.Double"/>
	<field name="ALLOC_FLAG" class="java.lang.String"/>
	<field name="MASTER_PACK_ALLOW" class="java.lang.String"/>
	<field name="ACTIVE_PICK_ALLOW" class="java.lang.String"/>
	<field name="STOCK_TO_DOCK_ALLOW" class="java.lang.String"/>
	<field name="STATUS" class="java.lang.String"/>
	<field name="HOLD_FLAG" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="34" splitType="Stretch">
			<staticText>
				<reportElement x="514" y="0" width="415" height="29"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="20"/>
				</textElement>
				<text><![CDATA[List of Unwaved Items/Orders]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="47" splitType="Stretch">
			<frame>
				<reportElement x="0" y="0" width="1315" height="46"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<staticText>
					<reportElement x="2" y="1" width="55" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Cust Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="60" y="1" width="182" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Customer Name]]></text>
				</staticText>
				<staticText>
					<reportElement x="245" y="1" width="35" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Line No.]]></text>
				</staticText>
				<staticText>
					<reportElement x="283" y="1" width="55" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Sale Order]]></text>
				</staticText>
				<line>
					<reportElement x="58" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="243" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="281" y="0" width="1" height="46"/>
				</line>
				<staticText>
					<reportElement x="341" y="1" width="45" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Due Date]]></text>
				</staticText>
				<staticText>
					<reportElement x="447" y="1" width="100" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Description]]></text>
				</staticText>
				<staticText>
					<reportElement x="550" y="1" width="55" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Quantity]]></text>
				</staticText>
				<staticText>
					<reportElement x="608" y="1" width="55" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Pending
Quantity]]></text>
				</staticText>
				<staticText>
					<reportElement x="666" y="1" width="55" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Qty
Alloc]]></text>
				</staticText>
				<staticText>
					<reportElement x="782" y="1" width="55" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Pack
Instr]]></text>
				</staticText>
				<staticText>
					<reportElement x="840" y="1" width="35" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Site Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="878" y="1" width="55" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Exp
Lev]]></text>
				</staticText>
				<staticText>
					<reportElement x="389" y="1" width="55" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Item Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="724" y="1" width="55" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Part Qty]]></text>
				</staticText>
				<staticText>
					<reportElement x="936" y="1" width="45" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Single
Lot]]></text>
				</staticText>
				<staticText>
					<reportElement x="984" y="1" width="45" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Min
Shelf
Life]]></text>
				</staticText>
				<staticText>
					<reportElement x="1032" y="1" width="45" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Alloc
Flag]]></text>
				</staticText>
				<staticText>
					<reportElement x="1080" y="1" width="45" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Master
Pack
Allow]]></text>
				</staticText>
				<staticText>
					<reportElement x="1128" y="1" width="55" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Active
Pick
Allow]]></text>
				</staticText>
				<staticText>
					<reportElement x="1186" y="1" width="56" height="44"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Stock To
Dock
Allow]]></text>
				</staticText>
				<staticText>
					<reportElement x="1244" y="1" width="34" height="44"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Status]]></text>
				</staticText>
				<staticText>
					<reportElement x="1281" y="1" width="34" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Hold
Flag
Status]]></text>
				</staticText>
				<line>
					<reportElement x="339" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="387" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="445" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="548" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="606" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="664" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="722" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="780" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="838" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="876" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="934" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="982" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="1030" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="1078" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="1126" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="1184" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="1242" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="1279" y="0" width="1" height="46"/>
				</line>
			</frame>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<frame>
				<reportElement x="0" y="0" width="1315" height="20"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textField isBlankWhenNull="true">
					<reportElement x="2" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{CUST_CODE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="60" y="0" width="182" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{CUST_NAME}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="245" y="0" width="35" height="20"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{LINE_NO}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="283" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SALE_ORDER}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement x="58" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="243" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="281" y="0" width="1" height="20"/>
				</line>
				<textField isBlankWhenNull="true">
					<reportElement x="341" y="0" width="45" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.util.Date"><![CDATA[$F{DUE_DATE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="389" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{ITEM_CODE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="447" y="0" width="100" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCR}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="550" y="0" width="55" height="20"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.Double"><![CDATA[$F{QUANTITY}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="608" y="0" width="55" height="20"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.Double"><![CDATA[$F{PENDING_QUANTITY}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="782" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{PACK_INSTR}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="840" y="0" width="35" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SITE_CODE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="724" y="0" width="55" height="20"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{PART_QTY}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="666" y="0" width="55" height="20"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.Double"><![CDATA[$F{QTY_ALLOC}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="878" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{EXP_LEV}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="936" y="0" width="45" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SINGLE_LOT}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="984" y="0" width="45" height="20"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.Double"><![CDATA[$F{MIN_SHELF_LIFE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="1032" y="0" width="45" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{ALLOC_FLAG}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="1080" y="0" width="45" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{MASTER_PACK_ALLOW}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="1128" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{ACTIVE_PICK_ALLOW}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="1186" y="0" width="56" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{STOCK_TO_DOCK_ALLOW}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="1244" y="0" width="34" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="1281" y="0" width="34" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{HOLD_FLAG}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement x="339" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="387" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="445" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="548" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="606" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="664" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="722" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="780" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="838" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="876" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="934" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="982" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="1030" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="1078" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="1126" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="1184" y="0" width="1" height="20"/>
				</line>
				<line>
					<reportElement x="1242" y="0" width="1" height="20"/>
				</line>
			</frame>
			<line>
				<reportElement x="1279" y="0" width="1" height="20"/>
			</line>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
