<?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_ing_compra_con" language="groovy" pageWidth="980" pageHeight="612" orientation="Landscape" columnWidth="940" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/inventario/inf_ing_compra_cons"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="fecha_ini" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="fecha_fin" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTercero" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTipoElemento" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTipoContrato" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
tab0.nom_cen_op, tab0.id_contrato,
tab0.sec, tab0.tipo_contrato,
tab0.id_vigencia, tab0.id_cen_op,
sum(tab0.cantidad) as cantidad,
avg(tab0.valor_unitario) as valor_unitario,
sum(tab0.cantidad)*avg(tab0.valor_unitario) as subtotal,
tab0.codigo_elemento, tab0.desc_catalogo, tab0.proveedor,
tab0.tipo_elemento, tab0.id_movimiento,
to_char(tab0.fecha_mov,'dd/mm/yyyy') as fecha_mov,
tab0.no_unidad_medida,
tab0.desc_unidad_medida,
tab0.cdp

from(

    select

    tab7.nom_cen_op,
    tab0.id_contrato,

    tab0.tipo_contrato,


    tab0.id_vigencia,
    tab0.id_cen_op,

    case
    when tab1.cantidad is not null then tab1.cantidad
    when tab2.cantidad is not null then tab2.cantidad
    end
    as cantidad,

    case
    when tab1.valor_unitario is not null then tab1.valor_unitario
    when tab2.valor_unitario is not null then tab2.valor_unitario
    end
    as valor_unitario,

    case
    when tab5.codigo_elemento is not null then tab5.codigo_elemento
    when tab6.codigo_elemento is not null then tab6.codigo_elemento
    end
    as codigo_elemento,

    case
    when tab5.desc_catalogo is not null then tab5.desc_catalogo
    when tab6.desc_catalogo is not null then tab6.desc_catalogo
    end
    as desc_catalogo,

    tab10.num_doc||' - '||tab10.razon_soc as proveedor,
    tab10.id_mae_ter,

    case
    when tab1.id_det_mov_dv is not null then 0
    when tab2.id_det_mov_con is not null then 1
    end
    as tipo_elemento,

    case
    when tab0.id_movimientos_dv is not null then tab0.id_movimientos_dv
    when tab0.id_movimientos_con is not null then tab0.id_movimientos_con
    end
    as id_movimiento,

    tab8.sec,
    tab0.fecha_mov,
    to_char(cdps.CDPS) as cdp,

    case
    when tab3.id_catalogo is not null then tab13.unidad
    when tab4.id_catalogo is not null then tab14.unidad
    end
    as no_unidad_medida,

    case
    when tab3.id_catalogo is not null then tab13.descripcion
    when tab4.id_catalogo is not null then tab14.descripcion
    end
    as desc_unidad_medida

    from in_contrato_dv_con_v tab0
    left join in_det_mov_dv tab1 on tab0.id_movimientos_dv=tab1.id_movimientos_dv and tab0.id_vigencia_mov_dv=tab1.id_vigencia and tab0.id_cen_op_mov_dv=tab1.id_cen_op and tab1.id_tipo_movimiento=1
    left join in_det_mov_con tab2 on tab0.id_movimientos_con=tab2.id_movimientos_con and tab0.id_vigencia_mov_con=tab2.id_vigencia and tab0.id_cen_op_mov_con=tab2.id_cen_op and tab2.id_tipo_movimiento=1
    left join in_inventario_dv tab3 on tab1.id_inventario_dv =tab3.id_inventario_dv
    left join in_inventario_con tab4 on tab2.id_inventario_con =tab4.id_inventario_con
    left join in_codigo_elemento_v tab5 on tab3.id_linea=tab5.id_linea and tab3.id_clase =tab5.id_clase and tab3.id_catalogo=tab5.id_catalogo
    left join in_codigo_elemento_v tab6 on tab4.id_linea=tab6.id_linea and tab4.id_clase =tab6.id_clase and tab4.id_catalogo=tab6.id_catalogo
    join centro_operacion tab7 on tab0.id_cen_op =tab7.id_cen_op
    join in_contrato tab8 on tab0.id_contrato=tab8.id_contrato and tab0.id_vigencia=tab8.id_vigencia and tab0.id_cen_op=tab8.id_cen_op
    join in_cotizacion tab9 on tab8.id_cotizacion=tab9.id_cotizacion and tab8.id_vigencia=tab9.id_vigencia
    join interceros_v tab10 on tab9.id_mae_ter=tab10.id_mae_ter
    join (select id_contrato, id_vigencia, id_cen_op, wm_concat(cdp)as cdps, wm_concat(fecha_cdp)as fecha_cdps from in_cdp_cont group by id_contrato, id_vigencia, id_cen_op
    )cdps on tab0.id_contrato=cdps.id_contrato and tab0.id_vigencia=cdps.id_vigencia and tab0.id_cen_op=cdps.id_cen_op
    left join in_catalogo tab11
    on
    tab3.id_catalogo = tab11.id_catalogo
    AND tab3.id_linea = tab11.id_linea
    AND tab3.id_clase = tab11.id_clase
    left join in_catalogo tab12 on tab4.id_catalogo = tab12.id_catalogo
    AND tab4.id_linea = tab12.id_linea
    AND tab4.id_clase = tab12.id_clase
    left join in_unidad_medida tab13 on tab11.id_unidad_medida = tab13.id_unidad_medida
    left join in_unidad_medida tab14 on tab12.id_unidad_medida = tab14.id_unidad_medida

    where (tab1.anulado is not null
    and tab1.anulado=0 and tab1.estado is not null and tab1.estado=0) or (tab2.anulado is not null and tab2.anulado=0 and tab2.estado is not null and tab2.estado=0)

)tab0

where
1=1
and tab0.fecha_mov between to_date($P{fecha_ini}, 'dd/mm/yyyy') and to_date($P{fecha_fin}, 'dd/mm/yyyy')
$P!{whereTercero}
$P!{whereTipoContrato}
$P!{whereTipoElemento}

group by
tab0.nom_cen_op, tab0.id_contrato, tab0.sec, tab0.tipo_contrato,
tab0.id_vigencia, tab0.id_cen_op,
tab0.fecha_mov,
tab0.codigo_elemento, tab0.desc_catalogo, tab0.proveedor,
tab0.tipo_elemento, tab0.id_movimiento,
tab0.fecha_mov,
tab0.no_unidad_medida,
tab0.desc_unidad_medida,
tab0.cdp

order by
tab0.nom_cen_op, tab0.sec,
tab0.id_movimiento, tab0.codigo_elemento
]]>
	</queryString>
	<field name="NOM_CEN_OP" class="java.lang.String"/>
	<field name="ID_CONTRATO" class="java.math.BigDecimal"/>
	<field name="SEC" class="java.math.BigDecimal"/>
	<field name="TIPO_CONTRATO" class="java.math.BigDecimal"/>
	<field name="ID_VIGENCIA" class="java.math.BigDecimal"/>
	<field name="ID_CEN_OP" class="java.math.BigDecimal"/>
	<field name="CANTIDAD" class="java.math.BigDecimal"/>
	<field name="VALOR_UNITARIO" class="java.math.BigDecimal"/>
	<field name="SUBTOTAL" class="java.math.BigDecimal"/>
	<field name="CODIGO_ELEMENTO" class="java.lang.String"/>
	<field name="DESC_CATALOGO" class="java.lang.String"/>
	<field name="PROVEEDOR" class="java.lang.String"/>
	<field name="TIPO_ELEMENTO" class="java.math.BigDecimal"/>
	<field name="ID_MOVIMIENTO" class="java.math.BigDecimal"/>
	<field name="FECHA_MOV" class="java.lang.String"/>
	<field name="NO_UNIDAD_MEDIDA" class="java.lang.String"/>
	<field name="DESC_UNIDAD_MEDIDA" class="java.lang.String"/>
	<field name="CDP" class="java.lang.String"/>
	<variable name="tot_val_Uni" class="java.math.BigDecimal" resetType="Group" resetGroup="centro de operacion" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_UNITARIO}]]></variableExpression>
	</variable>
	<variable name="tot_subtotal" class="java.math.BigDecimal" resetType="Group" resetGroup="centro de operacion" calculation="Sum">
		<variableExpression><![CDATA[$F{SUBTOTAL}]]></variableExpression>
	</variable>
	<variable name="count_elementos" class="java.math.BigDecimal" resetType="Group" resetGroup="centro de operacion" calculation="Count">
		<variableExpression><![CDATA[$F{ID_MOVIMIENTO}]]></variableExpression>
	</variable>
	<variable name="total_items" class="java.math.BigDecimal" calculation="Count">
		<variableExpression><![CDATA[$F{ID_MOVIMIENTO}]]></variableExpression>
	</variable>
	<variable name="total" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_UNITARIO}]]></variableExpression>
	</variable>
	<variable name="t_subtotal" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{SUBTOTAL}]]></variableExpression>
	</variable>
	<group name="centro de operacion">
		<groupExpression><![CDATA[$F{ID_CEN_OP}]]></groupExpression>
		<groupHeader>
			<band height="39">
				<staticText>
					<reportElement mode="Opaque" x="0" y="0" width="124" height="12" backcolor="#88C2F9"/>
					<box>
						<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[CENTRO DE OPERACIÓN:]]></text>
				</staticText>
				<textField>
					<reportElement x="124" y="0" width="816" height="12"/>
					<box leftPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{NOM_CEN_OP}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="414" y="27" width="61" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Código]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="475" y="27" width="122" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Descripción]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="597" y="27" width="53" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Cantidad]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="170" y="27" width="65" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Tipo Cont.]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="27" width="48" height="12" backcolor="#88C2F9"/>
					<box>
						<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[No. Mov]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="788" y="27" width="77" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Valor unitario]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="865" y="27" width="75" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Subtotal]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="284" y="27" width="65" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Proveedor]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="48" y="27" width="76" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Tipo Elemento]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="124" y="27" width="46" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Contrato]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="349" y="27" width="65" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Fecha Mov.]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="235" y="27" width="49" height="12" backcolor="#88C2F9"/>
					<box>
						<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[No. CDP]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="713" y="27" width="75" height="12" backcolor="#88C2F9"/>
					<box>
						<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[Unidad Medida]]></text>
				</staticText>
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="650" y="27" width="63" height="12" backcolor="#88C2F9"/>
					<box>
						<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[No. Unidad]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="20">
				<textField>
					<reportElement mode="Opaque" x="0" y="0" width="124" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA["Total Items : "+ $V{count_elementos}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="124" y="0" width="664" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box leftPadding="3" rightPadding="7">
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Total  Centro De Operación]]></text>
				</staticText>
				<textField pattern="#,##0.00">
					<reportElement mode="Opaque" x="788" y="0" width="77" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box rightPadding="2">
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_val_Uni}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00">
					<reportElement mode="Opaque" x="865" y="0" width="75" height="12" forecolor="#000000" backcolor="#BCBABA"/>
					<box rightPadding="2">
						<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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_subtotal}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<staticText>
				<reportElement x="140" y="0" width="648" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema General de Inventarios
Informe de Ingresos de Compra Detallado]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="16" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Opaque" x="788" y="16" width="152" 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="788" y="28" width="152" height="12"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="140" y="40" width="648" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[" Fecha " +  $P{fecha_ini} + " a " + $P{fecha_fin}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="20" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="26" splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="414" y="0" width="61" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO_ELEMENTO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement stretchType="RelativeToTallestObject" x="475" y="0" width="122" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_CATALOGO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="597" y="0" width="53" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CANTIDAD}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="48" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ID_MOVIMIENTO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="124" y="0" width="46" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SEC}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="170" y="0" width="65" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_CONTRATO}==1?"Mínima Cuantía":"General"]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="788" y="0" width="77" height="10"/>
				<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="Right" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_UNITARIO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="865" y="0" width="75" height="10"/>
				<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="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{SUBTOTAL}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement stretchType="RelativeToTallestObject" x="284" y="0" width="65" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PROVEEDOR}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="48" y="0" width="76" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_ELEMENTO}==0?"Devolutivos":"Consumo"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="349" y="0" width="65" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_MOV}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="235" y="0" width="49" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CDP}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="650" y="0" width="63" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NO_UNIDAD_MEDIDA}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="713" y="0" width="75" height="10"/>
				<box leftPadding="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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_UNIDAD_MEDIDA}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="339" 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>
			<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
				<reportElement mode="Opaque" x="429" y="12" width="36" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<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>
			<staticText>
				<reportElement mode="Opaque" x="349" y="0" width="126" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Inventarios]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="124" y="0" width="664" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box rightPadding="2">
					<topPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[TOTAL: ]]></text>
			</staticText>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="788" y="0" width="77" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box rightPadding="2">
					<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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="865" y="0" width="75" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box rightPadding="2">
					<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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{t_subtotal}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="0" width="124" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Total  Elementos : "+ $V{total_items}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="22">
			<staticText>
				<reportElement x="48" y="0" width="752" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
