Commit a88675d1 authored by sabita.prasad's avatar sabita.prasad

Made changes in Jrxml changed the query.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92334 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3e8d6430
<?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="1083" pageHeight="555" orientation="Landscape" columnWidth="1083" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
<property name="ireport.zoom" value="2.0"/>
<property name="ireport.x" value="0"/>
<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="1064" pageHeight="555" orientation="Landscape" columnWidth="1064" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="24"/>
<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"/>
......@@ -17,8 +17,9 @@
<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,
<![CDATA[SELECT SORDER.CUST_CODE,(CASE WHEN (STOCK.QUANTITY - STOCK.ALLOC_QTY - (CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END ))=0 THEN 'Yes' ELSE 'No' END) STOCK_NOT_AVAIL,
Null NEAR_EXPIRY,
CUSTOMER.CUST_NAME,
SORDDET.LINE_NO,
SORDER.SALE_ORDER,
SORDER.DUE_DATE,
......@@ -37,9 +38,12 @@
WAVE_TYPE.MASTER_PACK_ALLOW ,
WAVE_TYPE.ACTIVE_PICK_ALLOW ,
WAVE_TYPE.STOCK_TO_DOCK_ALLOW,
SORDER.STATUS ,
SORDDET.HOLD_FLAG
(case when SORDER.STATUS ='H' then 'Hold' when sorder.status='X' then 'Canceled' end) status,
SORDDET.HOLD_FLAG
FROM SORDER,
STOCK,
INVSTAT,
LOCATION,
SORDDET,
SORDITEM,
CUSTOMER,
......@@ -48,10 +52,77 @@ FROM SORDER,
WHERE SORDER.SALE_ORDER = SORDDET.SALE_ORDER
AND SORDITEM.SALE_ORDER = SORDER.SALE_ORDER
AND SORDDET.LINE_NO = SORDITEM.LINE_NO
AND LOCATION.LOC_CODE = STOCK.LOC_CODE
AND LOCATION.INV_STAT = INVSTAT.INV_STAT
AND ITEM.ITEM_CODE = STOCK.ITEM_CODE
AND SORDDET.SITE_CODE = STOCK.SITE_CODE
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 INVSTAT.AVAILABLE = 'Y'
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 SORDER.STATUS IN('X','H')
AND (SORDITEM.QUANTITY -SORDITEM.QTY_DESP -SORDITEM.QTY_ALLOC) = 0
AND SORDITEM.LINE_TYPE = 'I'
AND (STOCK.QUANTITY - STOCK.ALLOC_QTY - (CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END)) = 0
UNION ALL
SELECT SORDER.CUST_CODE,(CASE WHEN (STOCK.QUANTITY - STOCK.ALLOC_QTY - (CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END ))=0 THEN 'Yes' ELSE 'No' END) STOCK_NOT_AVAIL,
null NEAR_EXPIRY,
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,
(case when SORDER.STATUS ='H' then 'Hold' when sorder.status='X' then 'Canceled' end) status,
SORDDET.HOLD_FLAG
FROM SORDER,
STOCK,
INVSTAT,
LOCATION,
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 LOCATION.LOC_CODE = STOCK.LOC_CODE
AND LOCATION.INV_STAT = INVSTAT.INV_STAT
AND ITEM.ITEM_CODE = STOCK.ITEM_CODE
AND SORDDET.SITE_CODE = STOCK.SITE_CODE
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 INVSTAT.AVAILABLE = 'Y'
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}
......@@ -65,12 +136,13 @@ 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 SORDER.STATUS <> 'P'
AND (SORDITEM.QUANTITY -SORDITEM.QTY_DESP -SORDITEM.QTY_ALLOC) = 0
AND SORDITEM.LINE_TYPE = 'I'
AND SORDDET.HOLD_FLAG = 'Y'
AND SORDITEM.LINE_TYPE = 'I'
AND (STOCK.QUANTITY - STOCK.ALLOC_QTY - (CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END)) = 0
UNION ALL
SELECT SORDER.CUST_CODE,
CUSTOMER.CUST_NAME,
SELECT SORDER.CUST_CODE,(CASE WHEN (STOCK.QUANTITY - STOCK.ALLOC_QTY - (CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END ))=0 THEN 'Yes' ELSE 'No' END) STOCK_NOT_AVAIL,
(CASE WHEN (MONTHS_BETWEEN(TO_DATE(STOCK.EXP_DATE),SYSDATE) <= SORDITEM.MIN_SHELF_LIFE ) THEN 'Yes' ELSE 'No' END) NEAR_EXPIRY,
CUSTOMER.CUST_NAME,
SORDDET.LINE_NO,
SORDER.SALE_ORDER,
SORDER.DUE_DATE,
......@@ -89,21 +161,29 @@ SELECT SORDER.CUST_CODE,
WAVE_TYPE.MASTER_PACK_ALLOW ,
WAVE_TYPE.ACTIVE_PICK_ALLOW ,
WAVE_TYPE.STOCK_TO_DOCK_ALLOW,
SORDER.STATUS ,
(case when SORDER.STATUS ='H' then 'Hold' when sorder.status='X' then 'Canceled' end) status,
SORDDET.HOLD_FLAG
FROM SORDER,
STOCK,
INVSTAT,
LOCATION,
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(+)
WHERE SORDER.SALE_ORDER = SORDDET.SALE_ORDER
AND SORDITEM.SALE_ORDER = SORDER.SALE_ORDER
AND SORDDET.LINE_NO = SORDITEM.LINE_NO
AND LOCATION.LOC_CODE = STOCK.LOC_CODE
AND LOCATION.INV_STAT = INVSTAT.INV_STAT
AND ITEM.ITEM_CODE = STOCK.ITEM_CODE
AND SORDDET.SITE_CODE = STOCK.SITE_CODE
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 INVSTAT.AVAILABLE = 'Y'
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}
......@@ -117,12 +197,15 @@ 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.HOLD_FLAG = 'Y'
AND (SORDITEM.QUANTITY -SORDITEM.QTY_DESP -SORDITEM.QTY_ALLOC) = 0
AND SORDITEM.LINE_TYPE = 'I'
AND SORDDET.HOLD_FLAG = 'Y'
AND SORDITEM.LINE_TYPE = 'I'
AND (STOCK.QUANTITY - STOCK.ALLOC_QTY - (CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END)) = 0
AND (MONTHS_BETWEEN(TO_DATE(STOCK.EXP_DATE),SYSDATE) <= SORDITEM.MIN_SHELF_LIFE )
ORDER BY 1,4]]>
</queryString>
<field name="CUST_CODE" class="java.lang.String"/>
<field name="STOCK_NOT_AVAIL" class="java.lang.String"/>
<field name="NEAR_EXPIRY" 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"/>
......@@ -137,24 +220,35 @@ ORDER BY 1,4]]>
<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.math.BigDecimal"/>
<field name="MIN_SHELF_LIFE" class="java.lang.String"/>
<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"/>
<variable name="as_heading" class="java.lang.String" calculation="System">
<variableExpression><![CDATA["List of Unwaved Items/Orders"]]></variableExpression>
<initialValueExpression><![CDATA["List of Unwaved Items/Orders"]]></initialValueExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="34" splitType="Stretch">
<band height="75" splitType="Stretch">
<textField isBlankWhenNull="true">
<reportElement x="8" y="5" width="1050" height="29"/>
<textElement textAlignment="Center">
<font fontName="Times New Roman" size="14" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$V{as_heading}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="483" y="4" width="247" height="29"/>
<reportElement x="8" y="34" width="1050" height="30"/>
<textElement textAlignment="Center">
<font fontName="Times New Roman" size="20"/>
<font fontName="Times New Roman" size="14" isBold="true"/>
</textElement>
<text><![CDATA[List of Unwaved Items/Orders]]></text>
<text><![CDATA[Stock Not Available / Stock Near Expiry / Order Canceled / Order on Hold ]]></text>
</staticText>
</band>
</title>
......@@ -164,7 +258,7 @@ ORDER BY 1,4]]>
<columnHeader>
<band height="47" splitType="Stretch">
<frame>
<reportElement x="6" y="0" width="1070" height="47"/>
<reportElement x="6" y="0" width="1052" height="47"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
......@@ -285,41 +379,14 @@ Lot]]></text>
Flag]]></text>
</staticText>
<staticText>
<reportElement x="868" y="1" width="40" height="45"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Master
Pack
Allow]]></text>
</staticText>
<staticText>
<reportElement x="912" y="1" width="36" height="45"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Active
Pick
Allow]]></text>
</staticText>
<staticText>
<reportElement x="950" y="1" width="46" height="44"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Stock To
Dock
Allow]]></text>
</staticText>
<staticText>
<reportElement x="1000" y="1" width="34" height="44"/>
<reportElement x="868" y="1" width="34" height="44"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Order Status]]></text>
</staticText>
<staticText>
<reportElement x="1037" y="1" width="33" height="45"/>
<reportElement x="905" y="1" width="33" height="45"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
......@@ -359,24 +426,35 @@ Allow]]></text>
<reportElement x="866" y="0" width="1" height="46"/>
</line>
<line>
<reportElement x="909" y="0" width="1" height="46"/>
<reportElement x="903" y="0" width="1" height="46"/>
</line>
<line>
<reportElement x="948" y="0" width="1" height="46"/>
<reportElement x="939" y="1" width="1" height="46"/>
</line>
<line>
<reportElement x="997" y="0" width="1" height="46"/>
</line>
<line>
<reportElement x="1035" y="0" width="1" height="46"/>
<reportElement x="995" y="1" width="1" height="46"/>
</line>
<staticText>
<reportElement x="942" y="1" width="52" height="45"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Stock Available]]></text>
</staticText>
<staticText>
<reportElement x="997" y="1" width="52" height="45"/>
<textElement>
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Stock Near Expairy]]></text>
</staticText>
</frame>
</band>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<frame>
<reportElement x="6" y="0" width="1070" height="20"/>
<reportElement x="6" y="0" width="1052" height="20"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
......@@ -492,35 +570,14 @@ Allow]]></text>
<textFieldExpression class="java.lang.String"><![CDATA[$F{ALLOC_FLAG}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="869" y="0" width="40" 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="911" y="0" width="36" 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="950" y="0" width="46" 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="999" y="0" width="34" height="20"/>
<reportElement x="867" 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="1036" y="0" width="34" height="20"/>
<reportElement x="904" y="0" width="34" height="20"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
......@@ -559,18 +616,29 @@ Allow]]></text>
<line>
<reportElement x="866" y="0" width="1" height="20"/>
</line>
<line>
<reportElement x="909" y="0" width="1" height="20"/>
</line>
<line>
<reportElement x="948" y="0" width="1" height="20"/>
</line>
<line>
<reportElement x="997" y="0" width="1" height="20"/>
</line>
<textField isBlankWhenNull="true">
<reportElement x="942" y="0" width="52" height="20"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{STOCK_NOT_AVAIL}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="997" y="0" width="52" height="20"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{NEAR_EXPIRY}]]></textFieldExpression>
</textField>
</frame>
<line>
<reportElement x="1041" y="0" width="1" height="20"/>
<reportElement x="909" y="0" width="1" height="20"/>
</line>
<line>
<reportElement x="945" y="0" width="1" height="20"/>
</line>
<line>
<reportElement x="1001" y="0" width="1" height="20"/>
</line>
</band>
</detail>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment