<?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="inf_bol_con_lin_clas_det" language="groovy" pageWidth="900" pageHeight="612" orientation="Landscape" columnWidth="860" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.815000000000002"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/inventario/inf_bol_con_lin_clas_det"/>
	<property name="ireport.jasperserver.url" value="http://localhost:18091/jasperserver/services/repository"/>
	<parameter name="whereCatalogo" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCenOp" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereClase" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereEspacio" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereEstructura" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereLinea" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTercero" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTipoAlmacenamiento" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="id_meses" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_mae_ter" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="whereOrderBy" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="nom_periodo" class="java.lang.String"/>
	<parameter name="order_by" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="username" class="java.lang.String"/>
	<queryString>
		<![CDATA[select
NVL(sum(costo_sal),0) as costo_sal,
NVL(sum(costo_entr),0) as costo_entr,
NVL(sum(costo_tras),0) as costo_tras,
tab0.tipo_almac,  tab0.digitos_linea, tab0.desc_linea,  tab0.caracteres, tab0.desc_clase, tab0.digitos_catalogo, tab0.desc_catalogo,
NVL(sum(tab0.saldo_anterior),0) as saldo_anterior,
NVL(sum(tab0.entradas),0) as entradas,
NVL(sum(tab0.salidas),0) as salidas,
NVL(sum(tab0.saldo_actual),0) as saldo_actual,
NVL(sum(tab0.costo_anterior),0) as costo_anterior,
NVL(sum(tab0.costo_actual),0) as costo_actual,
NVL(sum(tab0.costo_entradas),0) as costo_entradas,
NVL(sum(tab0.costo_salidas),0) as costo_salidas
from(

select
/*Valor de los movimientos, detalle de la cantidad y valor - 20161010*/
tabtras.costo as costo_tras,
tabentr.costo as costo_entr,

tab.costo_sal as costo_sal,
tab.cantidad,
tab.VALOR_PROMEDIO,

tab6.id_cen_op, tab6.NOM_CEN_OP, tab5.id_estructura, tab5.id_espacio, tab0.id_mae_ter, tab4.id_tipo_almacenamiento, tab4.descripcion as tipo_almac, tab2.id_linea, tab2.digitos_linea, tab2.desc_linea, tab2.id_clase,
tab2.caracteres, tab2.desc_clase,
tab2.id_catalogo, tab2.digitos_catalogo, tab2.desc_catalogo,
tab0.saldo_anterior, tab0.entradas, tab0.salidas, tab0.saldo_actual,
case
when tab0.valor_promedio_ant=0 then tab0.saldo_anterior * tab0.valor_promedio
else tab0.saldo_anterior * tab0.valor_promedio_ant
end
as costo_anterior,
tab0.saldo_actual * tab0.valor_promedio as costo_actual,
tab0.entradas * tab0.VALOR_UNITARIO as costo_entradas,
tab0.salidas * tab0.valor_promedio as costo_salidas

from in_saldo_inventario_con tab0
join in_inventario_con tab1 on tab0.id_inventario_con= tab1.id_inventario_con
join in_codigo_elemento_v tab2 on tab2.id_catalogo = tab1.id_catalogo and tab1.id_clase = tab2.id_clase and tab2.id_linea  = tab1.id_linea
join in_tipo_almacenamiento tab4 on tab0.id_tipo_almacenamiento= tab4.id_tipo_almacenamiento
join in_espacio tab5 on tab0.id_espacio= tab5.id_espacio
join centro_operacion tab6 on tab0.id_cen_op =tab6.id_cen_op

left join (

    SELECT
    tab.ID_INVENTARIO_CON,
    tab.ID_CLASE,
    tab.ID_LINEA,
    sum(nvl(tab.CANTIDAD,0) * nvl(tab.VALOR_PROMEDIO,0)) as costo,
    sum(nvl(tab.CANTIDAD,0)) as CANTIDAD,
    sum(nvl(tab.VALOR_PROMEDIO,0)) as VALOR_PROMEDIO
    FROM(
        SELECT
        det.ID_INVENTARIO_CON,
        det.ID_CLASE,
        det.ID_LINEA,
        det.CANTIDAD,
        det.valor_unitario as VALOR_PROMEDIO,
        mov.*
        FROM IN_MOVIMIENTOS_CON mov
        left join IN_DET_MOV_CON det
        on mov.ID_MOVIMIENTOS_CON = det.ID_MOVIMIENTOS_CON
        and mov.ID_VIGENCIA = det.ID_VIGENCIA
        and mov.ID_CEN_OP = det.ID_CEN_OP
        and mov.ID_TIPO_MOVIMIENTO = det.ID_TIPO_MOVIMIENTO
        where
        MOV.ESTADO = 0
        and MOV.ANULADO = 0
        and to_char(MOV.FECHA_MOV,'yyyy') = $P{vigencia}
        and to_char(MOV.FECHA_MOV,'mm') = $P{id_meses}
        and mov.ID_TIPO_MOVIMIENTO in (1)
    )tab
    group by
    tab.ID_INVENTARIO_CON,
    tab.ID_CLASE,
    tab.ID_LINEA

)tabentr
on tabentr.ID_INVENTARIO_CON = tab0.ID_INVENTARIO_CON

left join (

    SELECT
    tab.ID_INVENTARIO_CON_fin,
    tab.ID_CLASE,
    tab.ID_LINEA,
    sum(nvl(tab.CANTIDAD,0) * nvl(tab.VALOR_PROMEDIO,0)) as costo,
    sum(nvl(tab.CANTIDAD,0)) as CANTIDAD,
    sum(nvl(tab.VALOR_PROMEDIO,0)) as VALOR_PROMEDIO
    FROM(
        SELECT
        det.ID_INVENTARIO_CON_fin,
        det.ID_CLASE,
        det.ID_LINEA,
        det.CANTIDAD,
        det.valor_unitario as VALOR_PROMEDIO,
        mov.*
        FROM IN_MOVIMIENTOS_CON mov
        left join IN_DET_MOV_CON det
        on mov.ID_MOVIMIENTOS_CON = det.ID_MOVIMIENTOS_CON
        and mov.ID_VIGENCIA = det.ID_VIGENCIA
        and mov.ID_CEN_OP = det.ID_CEN_OP
        and mov.ID_TIPO_MOVIMIENTO = det.ID_TIPO_MOVIMIENTO
        where
        MOV.ESTADO = 0
        and MOV.ANULADO = 0
        and to_char(MOV.FECHA_MOV,'yyyy') = $P{vigencia}
        and to_char(MOV.FECHA_MOV,'mm') = $P{id_meses}
        and mov.ID_TIPO_MOVIMIENTO in (2)
    )tab
    group by
    tab.ID_INVENTARIO_CON_fin,
    tab.ID_CLASE,
    tab.ID_LINEA

)tabtras
on tabtras.ID_INVENTARIO_CON_fin = tab0.ID_INVENTARIO_CON

left join (

    SELECT
    tab.ID_INVENTARIO_CON,
    tab.ID_CLASE,
    tab.ID_LINEA,
    sum(nvl(tab.CANTIDAD,0) * nvl(tab.VALOR_PROMEDIO,0)) as costo_sal,
    sum(nvl(tab.CANTIDAD,0)) as CANTIDAD,
    sum(nvl(tab.VALOR_PROMEDIO,0)) as VALOR_PROMEDIO
    FROM(
        SELECT
        det.ID_INVENTARIO_CON,
        det.ID_CLASE,
        det.ID_LINEA,
        det.CANTIDAD,
        det.VALOR_PROMEDIO,
        mov.*
        FROM IN_MOVIMIENTOS_CON mov
        left join IN_DET_MOV_CON det
        on mov.ID_MOVIMIENTOS_CON = det.ID_MOVIMIENTOS_CON
        and mov.ID_VIGENCIA = det.ID_VIGENCIA
        and mov.ID_CEN_OP = det.ID_CEN_OP
        and mov.ID_TIPO_MOVIMIENTO = det.ID_TIPO_MOVIMIENTO
        where
        MOV.ESTADO = 0
        and MOV.ANULADO = 0
        and to_char(MOV.FECHA_MOV,'yyyy') = $P{vigencia}
        and to_char(MOV.FECHA_MOV,'mm') = $P{id_meses}
        and mov.ID_TIPO_MOVIMIENTO in (2,3)
    )tab
    group by
    tab.ID_INVENTARIO_CON,
    tab.ID_CLASE,
    tab.ID_LINEA

)tab
on tab.ID_INVENTARIO_CON = tab0.ID_INVENTARIO_CON

where 1 = 1
and tab0.id_vigencia=$P{vigencia}  and tab0.id_meses=$P{id_meses} and (tab0.saldo_actual!=0 or tab0.entradas!=0 or tab0.salidas!=0)
)tab0


where 1=1


$P!{whereCenOp}
$P!{whereClase}
$P!{whereEspacio}
$P!{whereEstructura}
$P!{whereLinea}
$P!{whereTercero}
$P!{whereTipoAlmacenamiento}

group by tipo_almac, digitos_linea, desc_linea, caracteres, desc_clase, digitos_catalogo, desc_catalogo

order by tipo_almac, digitos_linea, desc_linea, caracteres, desc_clase, digitos_catalogo]]>
	</queryString>
	<field name="COSTO_SAL" class="java.math.BigDecimal"/>
	<field name="COSTO_ENTR" class="java.math.BigDecimal"/>
	<field name="COSTO_TRAS" class="java.math.BigDecimal"/>
	<field name="TIPO_ALMAC" class="java.lang.String"/>
	<field name="DIGITOS_LINEA" class="java.lang.String"/>
	<field name="DESC_LINEA" class="java.lang.String"/>
	<field name="CARACTERES" class="java.lang.String"/>
	<field name="DESC_CLASE" class="java.lang.String"/>
	<field name="DIGITOS_CATALOGO" class="java.lang.String"/>
	<field name="DESC_CATALOGO" class="java.lang.String"/>
	<field name="SALDO_ANTERIOR" class="java.math.BigDecimal"/>
	<field name="ENTRADAS" class="java.math.BigDecimal"/>
	<field name="SALIDAS" class="java.math.BigDecimal"/>
	<field name="SALDO_ACTUAL" class="java.math.BigDecimal"/>
	<field name="COSTO_ANTERIOR" class="java.math.BigDecimal"/>
	<field name="COSTO_ACTUAL" class="java.math.BigDecimal"/>
	<field name="COSTO_ENTRADAS" class="java.math.BigDecimal"/>
	<field name="COSTO_SALIDAS" class="java.math.BigDecimal"/>
	<variable name="items_linea" class="java.math.BigDecimal" resetType="Group" resetGroup="Linea" calculation="Count">
		<variableExpression><![CDATA[$F{DESC_LINEA}]]></variableExpression>
	</variable>
	<variable name="items" class="java.math.BigDecimal" resetType="Group" resetGroup="Almacenamiento" calculation="Count">
		<variableExpression><![CDATA[$F{TIPO_ALMAC}]]></variableExpression>
	</variable>
	<variable name="total_linea_eini" class="java.math.BigDecimal" resetType="Group" resetGroup="Linea" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_ANTERIOR}]]></variableExpression>
	</variable>
	<variable name="total_linea_entr" class="java.math.BigDecimal" resetType="Group" resetGroup="Linea" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_ENTR}+$F{COSTO_TRAS}]]></variableExpression>
	</variable>
	<variable name="total_linea_sal" class="java.math.BigDecimal" resetType="Group" resetGroup="Linea" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_SAL}]]></variableExpression>
	</variable>
	<variable name="total_linea_efin" class="java.math.BigDecimal" resetType="Group" resetGroup="Linea" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_ACTUAL}]]></variableExpression>
	</variable>
	<variable name="total_eini" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_ANTERIOR}]]></variableExpression>
	</variable>
	<variable name="total_entr" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_ENTR}+$F{COSTO_TRAS}]]></variableExpression>
	</variable>
	<variable name="total_sal" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_SAL}]]></variableExpression>
	</variable>
	<variable name="total_efin" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_ACTUAL}]]></variableExpression>
	</variable>
	<group name="Almacenamiento">
		<groupExpression><![CDATA[$F{TIPO_ALMAC}]]></groupExpression>
		<groupHeader>
			<band height="24">
				<staticText>
					<reportElement mode="Opaque" x="0" y="0" width="200" height="18" backcolor="#FFFFFF"/>
					<box rightPadding="2">
						<pen lineWidth="0.0"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Tipo de Almacenamiento : ]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false">
					<reportElement x="200" y="0" width="660" height="18"/>
					<box rightPadding="2">
						<pen lineWidth="0.0"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="12"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_ALMAC}]]></textFieldExpression>
				</textField>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="25">
				<staticText>
					<reportElement mode="Opaque" x="241" y="0" width="299" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="3" rightPadding="7">
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[]]></text>
				</staticText>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="780" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_efin}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement mode="Opaque" x="0" y="0" width="241" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA["Total  Items Almacenamiento: "+$V{items}]]></textFieldExpression>
				</textField>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="700" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_sal}]]></textFieldExpression>
				</textField>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="620" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_entr}]]></textFieldExpression>
				</textField>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="540" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_eini}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<group name="Linea">
		<groupExpression><![CDATA[$F{DIGITOS_LINEA}]]></groupExpression>
		<groupHeader>
			<band height="49">
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
					<reportElement stretchType="RelativeToTallestObject" x="200" y="0" width="660" height="18"/>
					<box leftPadding="4" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="10"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DIGITOS_LINEA}+" - "+$F{DESC_LINEA}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="0" y="0" width="200" height="18" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Línea            :]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="700" y="25" width="80" height="24" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Salen]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="780" y="25" width="80" height="24" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Saldo Actual]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="0" y="25" width="300" height="24" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Línea/Clase]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="620" y="25" width="80" height="24" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Entran]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="540" y="25" width="80" height="24" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Saldo Ant.]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="300" y="25" width="240" height="24" backcolor="#88C2F9"/>
					<box leftPadding="2" rightPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Catalogo]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="19">
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="780" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_linea_efin}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="241" y="0" width="299" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="3" rightPadding="7">
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[]]></text>
				</staticText>
				<textField>
					<reportElement mode="Opaque" x="0" y="0" width="241" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA["Total  Items Linea: "+$V{items_linea}]]></textFieldExpression>
				</textField>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="540" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_linea_eini}]]></textFieldExpression>
				</textField>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="620" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_linea_entr}]]></textFieldExpression>
				</textField>
				<textField pattern="$ #,##0.00">
					<reportElement mode="Opaque" x="700" y="0" width="80" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="1" rightPadding="3">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_linea_sal}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<staticText>
				<reportElement x="200" y="0" width="500" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Control De Recursos Físicos
Boletín de consumo por Línea y Clase Detallado]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="10" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Opaque" x="700" y="28" width="160" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha de Impresión:]]></text>
			</staticText>
			<textField pattern="dd-MMM-yyyy   hh:mm aaa">
				<reportElement x="700" y="40" width="160" height="12"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="200" y="40" width="500" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Periodo de "+$P{nom_periodo}+" del "+ $P{vigencia}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="20" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="26" splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="17" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="300" height="17"/>
				<box leftPadding="2" rightPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIGITOS_LINEA}+""+$F{CARACTERES}+" - "+$F{DESC_CLASE}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="$ #,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="700" y="0" width="80" height="17"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_SAL}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="$ #,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="780" y="0" width="80" height="17"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_ACTUAL}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="$ #,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="620" y="0" width="80" height="17"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_ENTR}+$F{COSTO_TRAS}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="$ #,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="540" y="0" width="80" height="17"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_ANTERIOR}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="300" y="0" width="240" height="17"/>
				<box leftPadding="2" rightPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIGITOS_CATALOGO}+" - "+$F{DESC_CATALOGO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="8" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="354" y="12" width="89" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Página "+$V{PAGE_NUMBER}+" de "]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="342" y="0" width="173" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<text><![CDATA[Websafi - Control De Recursos Físicos
]]></text>
			</staticText>
			<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
				<reportElement mode="Opaque" x="443" y="12" width="60" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="12" width="241" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Impreso por: "+$P{username}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band height="25" splitType="Stretch"/>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="860" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
