<?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_res_consol_gen" language="groovy" pageWidth="1160" pageHeight="612" orientation="Landscape" columnWidth="1120" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.02452018304761"/>
	<property name="ireport.x" value="51"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/inventario/cons_nal_dev"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="whereCenOp" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereEstructura" 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="whereLinea" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereClase" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCatalogo" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="id_meses" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="vigencia" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="nom_periodo" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
to_char(wm_concat(DISTINCT tab0.tag_entidad)) as tag_entidad,
nvl(tab0.digitos,'000000') as digitos,
nvl(tab0.nom_cuenta,'SIN CUENTA') as nom_cuenta,

/*PGN*/
sum(case when tab0.tag_entidad = 0 then tab0.costo_inicial else 0 end) as costo_inicial_pgn,
sum(case when tab0.tag_entidad = 0 then tab0.valor_valoracion else 0 end) as valor_valoracion_pgn,
sum(case when tab0.tag_entidad = 0 then tab0.ajuste_ch_convergencia else 0 end) as ajuste_ch_convergencia_pgn,
sum(case when tab0.tag_entidad = 0 then tab0.depreciacion_acumulada else 0 end) as depreciacion_acumulada_pgn,
sum(case when tab0.tag_entidad = 0 then tab0.valor_libros else 0 end) as valor_libros_pgn,
sum(case when tab0.tag_entidad = 0 then tab0.valor_deterioro else 0 end) as valor_deterioro_pgn,

/*SGR*/
sum(case when tab0.tag_entidad = 1 then tab0.costo_inicial else 0 end) as costo_inicial_sgr,
sum(case when tab0.tag_entidad = 1 then tab0.valor_valoracion else 0 end) as valor_valoracion_sgr,
sum(case when tab0.tag_entidad = 1 then tab0.ajuste_ch_convergencia else 0 end) as ajuste_ch_convergencia_sgr,
sum(case when tab0.tag_entidad = 1 then tab0.depreciacion_acumulada else 0 end) as depreciacion_acumulada_sgr,
sum(case when tab0.tag_entidad = 1 then tab0.valor_libros else 0 end) as valor_libros_sgr,
sum(case when tab0.tag_entidad = 1 then tab0.valor_deterioro else 0 end) as valor_deterioro_sgr,

sum(tab0.costo_inicial) as costo_inicial,
sum(tab0.valor_valoracion) as valor_valoracion,
sum(tab0.ajuste_ch_convergencia) as ajuste_ch_convergencia,
sum(tab0.depreciacion_acumulada) as depreciacion_acumulada,
sum(tab0.valor_libros) as valor_libros,
sum(tab0.valor_deterioro) as valor_deterioro,

sum(case when tab0.tag_entidad = 0 then tab0.costo_inicial + tab0.valor_valoracion + tab0.ajuste_ch_convergencia else 0 end) as costo_historico_pgn,
sum(case when tab0.tag_entidad = 1 then tab0.costo_inicial + tab0.valor_valoracion + tab0.ajuste_ch_convergencia else 0 end)  as costo_historico_sgr,
sum(tab0.valor_libros) as total

from (

    select tab0.* from(

            select
            0 as tag_entidad,
            inv.id_inventario_dv,
            tab2.codigo_elemento,
            tab2.desc_catalogo,
            tab0.id_cen_op,
            tab8.nom_cen_op,
            tab8.prefijo,
            tab9.id_espacio,
            tab9.descripcion as desc_espacio,
            tab10.id_estructura,
            tab10.nombre as desc_estructura,
            tab7.id_tipo_almacenamiento,
            tab7.descripcion as desc_almac,
            grup.descripcion as desc_grup,
            cont.digitos,
            cont.nom_cuenta,
            tab6.id_mae_ter,
            tab11.area,
            tab6.num_doc,
            tab6.razon_soc,
            inv.fecha_ingreso,
            inv.costo_inicial,
            (inv.costo_inicial + inv.valor_valoracion + inv.ajuste_ch_convergencia) - nvl(tabdepre.depre_acum,0) as valor_libros,
            inv.vida_util,
            inv.valor_deterioro,
            inv.valor_valoracion,
            inv.ajuste_ch_convergencia,
            nvl(tabdepre.depre_acum,0) as depreciacion_acumulada,
            nvl(tabdepre.num_dias,0) as dias_depreciados,
            tab2.id_linea,
            tab2.id_clase,
            tab2.id_catalogo,
            part.serie,
            part.plaqueta

            from in_saldo_inventario_dv tab0
            join meses mes on mes.id_meses = tab0.id_meses
            join in_inventario_dv inv on tab0.id_inventario_dv = inv.id_inventario_dv
            join in_codigo_elemento_v tab2 on tab2.id_catalogo = inv.id_catalogo and tab2.id_clase = inv.id_clase and tab2.id_linea  = inv.id_linea
            join interceros_v tab6 on tab6.id_mae_ter = tab0.id_mae_ter
            join in_tipo_almacenamiento tab7 on tab7.id_tipo_almacenamiento  = tab0.id_tipo_almacenamiento

            left join in_grupo_almacenamiento grup on grup.id_grupo_almacenamiento  = tab7.id_grupo_almacenamiento
            left join (
              select
               aut.*,
               row_number() over (
                partition by aut.id_grupo, aut.id_linea, aut.id_clase
                order by aut.id_grupo, aut.id_linea, aut.id_clase
               ) as rn
              from in_param_contab aut
            )cont
            on tab7.id_grupo_almacenamiento = cont.id_grupo
            and inv.id_clase = cont.id_clase
            and inv.id_linea = cont.id_linea
            and cont.rn = 1

            join centro_operacion tab8 on tab0.id_cen_op=tab8.id_cen_op
            join in_espacio tab9 on tab0.id_espacio=tab9.id_espacio
            join in_estructura tab10 on tab9.id_estructura=tab10.id_estructura

            --Relacion con plaqueta - 20160427
            left join (
                select
                id_inventario_dv,
                to_char(wm_concat(serie)) as serie,
                to_char(wm_concat(plaqueta)) as plaqueta
                from in_partes_inventario
                where
                estado = 1
                group by
                id_inventario_dv
            )part
            on tab0.id_inventario_dv = part.id_inventario_dv

            left join (
                select
                tab0.id_inventario_dv,
                sum(tab0.valor_depreciado) as depre_acum,
                sum(tab0.num_dias) as num_dias

                from in_depreciacion tab0
                where 1= 1 and tab0.id_vigencia||lpad(tab0.id_meses,2,'0')  <=  $P{vigencia}||lpad($P{id_meses},2,'0')
                group by tab0.id_inventario_dv
            )tabdepre on tab0.id_inventario_dv =tabdepre.id_inventario_dv

            left join (
                select
                tab1.id_tipo_doc, tab1.num_doc,
                tab1.primer_nombre, tab3.area
                from no_datos_funcionario_v tab1
                left join (
                  select
                   aut.*,
                   row_number() over (
                    partition by aut.num_doc
                    order by aut.id_anhos desc, aut.id_meses desc
                   ) as rown
                  from no_estado_func_v aut where aut.id_anhos=2014 and aut.id_meses=1
                )tab2
                on tab1.id_tipo_doc = tab2.id_tipo_doc and tab1.num_doc = tab2.num_doc
                and tab2.rown = 1
                left join no_dp_v tab3 on tab2.id_dp =tab3.id_dp
            )tab11
            on tab6.num_doc=tab11.num_doc and tab11.id_tipo_doc=1

            where
            tab0.id_meses = $P{id_meses}
            and tab0.id_vigencia = $P{vigencia}
            and tab0.estado = 1

            union

            select
            1 as tag_entidad,
            inv.id_inventario_dv,
            tab2.codigo_elemento,
            tab2.desc_catalogo,
            tab0.id_cen_op,
            tab8.nom_cen_op,
            tab8.prefijo,
            tab9.id_espacio,
            tab9.descripcion as desc_espacio,
            tab10.id_estructura,
            tab10.nombre as desc_estructura,
            tab7.id_tipo_almacenamiento,
            tab7.descripcion as desc_almac,
            grup.descripcion as desc_grup,
            cont.digitos,
            cont.nom_cuenta,
            tab6.id_mae_ter,
            tab11.area,
            tab6.num_doc,
            tab6.razon_soc,
            inv.fecha_ingreso,
            inv.costo_inicial,
            (inv.costo_inicial + inv.valor_valoracion + inv.ajuste_ch_convergencia) - nvl(tabdepre.depre_acum,0) as valor_libros,
            inv.vida_util,
            inv.valor_deterioro,
            inv.valor_valoracion,
            inv.ajuste_ch_convergencia,
            nvl(tabdepre.depre_acum,0) as depreciacion_acumulada,
            nvl(tabdepre.num_dias,0) as dias_depreciados,
            tab2.id_linea,
            tab2.id_clase,
            tab2.id_catalogo,
            part.serie,
            part.plaqueta

            from in_saldo_inventario_dv@SGR.ANM.LOCAL tab0
            join meses@SGR.ANM.LOCAL mes on mes.id_meses = tab0.id_meses
            join in_inventario_dv@SGR.ANM.LOCAL inv on tab0.id_inventario_dv = inv.id_inventario_dv
            join in_codigo_elemento_v@SGR.ANM.LOCAL tab2 on tab2.id_catalogo = inv.id_catalogo and tab2.id_clase = inv.id_clase and tab2.id_linea  = inv.id_linea
            join interceros_v@SGR.ANM.LOCAL tab6 on tab6.id_mae_ter = tab0.id_mae_ter
            join in_tipo_almacenamiento@SGR.ANM.LOCAL tab7 on tab7.id_tipo_almacenamiento  = tab0.id_tipo_almacenamiento

            left join in_grupo_almacenamiento@SGR.ANM.LOCAL grup on grup.id_grupo_almacenamiento  = tab7.id_grupo_almacenamiento
            left join (
              select
               aut.*,
               row_number() over (
                partition by aut.id_grupo, aut.id_linea, aut.id_clase
                order by aut.id_grupo, aut.id_linea, aut.id_clase
               ) as rn
              from in_param_contab@SGR.ANM.LOCAL aut
            )cont
            on tab7.id_grupo_almacenamiento = cont.id_grupo
            and inv.id_clase = cont.id_clase
            and inv.id_linea = cont.id_linea
            and cont.rn = 1

            join centro_operacion@SGR.ANM.LOCAL tab8 on tab0.id_cen_op=tab8.id_cen_op
            join in_espacio@SGR.ANM.LOCAL tab9 on tab0.id_espacio=tab9.id_espacio
            join in_estructura@SGR.ANM.LOCAL tab10 on tab9.id_estructura=tab10.id_estructura

            --Relacion con plaqueta - 20160427
            left join (
                select
                id_inventario_dv,
                to_char(wm_concat(serie)) as serie,
                to_char(wm_concat(plaqueta)) as plaqueta
                from in_partes_inventario@SGR.ANM.LOCAL
                where
                estado = 1
                group by
                id_inventario_dv
            )part
            on tab0.id_inventario_dv = part.id_inventario_dv

            left join (
                select
                tab0.id_inventario_dv,
                sum(tab0.valor_depreciado) as depre_acum,
                sum(tab0.num_dias) as num_dias

                from in_depreciacion@SGR.ANM.LOCAL tab0
                where 1= 1 and tab0.id_vigencia||lpad(tab0.id_meses,2,'0')  <=  $P{vigencia}||lpad($P{id_meses},2,'0')
                group by tab0.id_inventario_dv
            )tabdepre on tab0.id_inventario_dv =tabdepre.id_inventario_dv

            left join (
                select
                tab1.id_tipo_doc, tab1.num_doc,
                tab1.primer_nombre, tab3.area
                from no_datos_funcionario_v tab1
                left join (
                  select
                   aut.*,
                   row_number() over (
                    partition by aut.num_doc
                    order by aut.id_anhos desc, aut.id_meses desc
                   ) as rown
                  from no_estado_func_v aut where aut.id_anhos=2014 and aut.id_meses=1
                )tab2
                on tab1.id_tipo_doc = tab2.id_tipo_doc and tab1.num_doc = tab2.num_doc
                and tab2.rown = 1
                left join no_dp_v tab3 on tab2.id_dp =tab3.id_dp
            )tab11
            on tab6.num_doc=tab11.num_doc and tab11.id_tipo_doc=1

            where
            tab0.id_meses = $P{id_meses}
            and tab0.id_vigencia = $P{vigencia}
            and tab0.estado = 1

    )tab0

    where
    1 = 1
    $P!{whereCenOp}
    $P!{whereTipoAlmacenamiento}
    $P!{whereTercero}
    $P!{whereEstructura}
    $P!{whereClase}
    $P!{whereLinea}
    $P!{whereCatalogo}

)tab0

where
1 = 1

group by
--tab0.tag_entidad,
tab0.digitos,
tab0.nom_cuenta

order by
tab0.digitos,
tab0.nom_cuenta]]>
	</queryString>
	<field name="TAG_ENTIDAD" class="java.lang.String"/>
	<field name="DIGITOS" class="java.lang.String"/>
	<field name="NOM_CUENTA" class="java.lang.String"/>
	<field name="COSTO_INICIAL_PGN" class="java.math.BigDecimal"/>
	<field name="VALOR_VALORACION_PGN" class="java.math.BigDecimal"/>
	<field name="AJUSTE_CH_CONVERGENCIA_PGN" class="java.math.BigDecimal"/>
	<field name="DEPRECIACION_ACUMULADA_PGN" class="java.math.BigDecimal"/>
	<field name="VALOR_LIBROS_PGN" class="java.math.BigDecimal"/>
	<field name="VALOR_DETERIORO_PGN" class="java.math.BigDecimal"/>
	<field name="COSTO_INICIAL_SGR" class="java.math.BigDecimal"/>
	<field name="VALOR_VALORACION_SGR" class="java.math.BigDecimal"/>
	<field name="AJUSTE_CH_CONVERGENCIA_SGR" class="java.math.BigDecimal"/>
	<field name="DEPRECIACION_ACUMULADA_SGR" class="java.math.BigDecimal"/>
	<field name="VALOR_LIBROS_SGR" class="java.math.BigDecimal"/>
	<field name="VALOR_DETERIORO_SGR" class="java.math.BigDecimal"/>
	<field name="COSTO_INICIAL" class="java.math.BigDecimal"/>
	<field name="VALOR_VALORACION" class="java.math.BigDecimal"/>
	<field name="AJUSTE_CH_CONVERGENCIA" class="java.math.BigDecimal"/>
	<field name="DEPRECIACION_ACUMULADA" class="java.math.BigDecimal"/>
	<field name="VALOR_LIBROS" class="java.math.BigDecimal"/>
	<field name="VALOR_DETERIORO" class="java.math.BigDecimal"/>
	<field name="COSTO_HISTORICO_PGN" class="java.math.BigDecimal"/>
	<field name="COSTO_HISTORICO_SGR" class="java.math.BigDecimal"/>
	<field name="TOTAL" class="java.math.BigDecimal"/>
	<variable name="tot_cost_ini_pgn" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_HISTORICO_PGN}]]></variableExpression>
	</variable>
	<variable name="tot_depreciacion_pgn" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{DEPRECIACION_ACUMULADA_PGN}]]></variableExpression>
	</variable>
	<variable name="tot_libros_pgn" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_LIBROS_PGN}]]></variableExpression>
	</variable>
	<variable name="tot_cost_ini_sgr" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{COSTO_HISTORICO_SGR}]]></variableExpression>
	</variable>
	<variable name="tot_depreciacion_sgr" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{DEPRECIACION_ACUMULADA_SGR}]]></variableExpression>
	</variable>
	<variable name="tot_libros_sgr" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_LIBROS_SGR}]]></variableExpression>
	</variable>
	<variable name="total" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{TOTAL}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<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="880" y="28" width="240" 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="880" y="40" width="240" 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>
			<staticText>
				<reportElement x="280" y="0" width="600" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema General de Inventarios
Informe Resumen Consolidado General]]></text>
			</staticText>
			<textField>
				<reportElement x="280" y="40" width="600" 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="19" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="400" y="0" width="120" height="20" 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[Depre. Acum. PGN]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="520" y="0" width="120" height="20" 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 en Libros PGN]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="80" height="20" 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[Dígitos]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="80" y="0" width="200" height="20" 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[Cuenta]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="280" y="0" width="120" height="20" 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[Costo Historico PGN]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="880" y="0" width="120" height="20" 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 en Libros SGR]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="760" y="0" width="120" height="20" 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[Depre. Acum. SGR]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="640" y="0" width="120" height="20" 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[Costo Historico SGR]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1000" y="0" width="120" height="20" 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[Total]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Prevent">
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="400" y="0" width="120" 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{DEPRECIACION_ACUMULADA_PGN}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="520" y="0" width="120" 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{VALOR_LIBROS_PGN}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="80" height="10"/>
				<box leftPadding="0">
					<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{DIGITOS}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="80" y="0" width="200" 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{NOM_CUENTA}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="280" y="0" width="120" 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{COSTO_HISTORICO_PGN}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="760" y="0" width="120" 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{DEPRECIACION_ACUMULADA_SGR}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="120" 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{COSTO_HISTORICO_SGR}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="880" y="0" width="120" 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{VALOR_LIBROS_SGR}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1000" y="0" width="120" 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{TOTAL}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="15" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="481" 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="571" 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>
			<staticText>
				<reportElement mode="Opaque" x="481" y="0" width="150" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Inventarios]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="23" splitType="Stretch">
			<staticText>
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="280" height="12" backcolor="#BCBABA"/>
				<box leftPadding="3" rightPadding="7">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL:]]></text>
			</staticText>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="400" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_depreciacion_pgn}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="520" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_libros_pgn}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="280" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_cost_ini_pgn}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="760" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_depreciacion_sgr}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="880" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_libros_sgr}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="640" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{tot_cost_ini_sgr}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="1000" y="0" width="120" height="12" 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" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="1120" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
