<?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="presup_asig" language="groovy" pageWidth="572" pageHeight="555" orientation="Landscape" columnWidth="572" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.771561000000001"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="id_rp" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="tipo" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select

'$' as pesos,
tab0.*

from(

    select

    3 as tag,
    obj.codigo,
    obj.descripcion,
    nvl((case when nvl(nov.cant,0) = 0 then tab0.valor
         when nvl(nov.cant,0) = 1 and nvl(nov7.cant7,0) = 1 then tab0.valor
         when nvl(nov.cant,0) = 1 and nvl(nov7.cant7,0) != 1 then nvl(hist.valor_hist,0)
         when nvl(nov.cant,0) != 1 then nvl(hist.valor_hist,0) - nvl(nov7.credito,0)
         else 0 end), 0) as v_aprobado,
    nvl((select
    --rpcom.*
    sum(nvl(leg.v_bruto,0)) + sum(nvl(leg.v_iva,0)) as v_legalizado
    from pr_rp_compromiso rpcom

    join objetos_gasto obj
    on obj.id = rpcom.id_obj_gasto

    join pr_elementos_gasto ele
    on ele.id_objeto_gasto = obj.id

    join pr_legalizacion_comis leg
    on leg.id_rp_comis = rpcom.id_rp
    and leg.id_vigencia = rpcom.id_vigencia
    and leg.vigencia = rpcom.vigencia
    and leg.id_elementos_gasto = ele.id_elementos_gasto

    where
    rpcom.id_rp = tab0.id_rp
    and rpcom.id_vigencia = tab0.id_vigencia
    and rpcom.vigencia = tab0.vigencia
    and rpcom.id_obj_gasto = tab0.id_obj_gasto
    ), 0) as v_legalizado,

    tab0.*,
    nvl(nov.cant,0) as cant,
    nvl(nov7.cant7,0) as cant7,
    nvl(hist.valor_hist,0) as valor_hist,
    nvl(nov7.debito,0) as debito,
    nvl(nov7.credito,0) as credito,
    case when nvl(nov.cant,0) = 0 then tab0.valor
         when nvl(nov.cant,0) = 1 and nvl(nov7.cant7,0) = 1 then tab0.valor
         when nvl(nov.cant,0) = 1 and nvl(nov7.cant7,0) != 1 then nvl(hist.valor_hist,0)
         when nvl(nov.cant,0) != 1 then nvl(hist.valor_hist,0) - nvl(nov7.credito,0)
         else 0 end as v_reintegro_comp

    from pr_rp_compromiso tab0

    left join objetos_gasto obj
    on tab0.id_obj_gasto = obj.id

    left join(
      select
      nov.id_rp,
      nov.id_vigencia,
      nov.vigencia,
      novval.id_obj_gasto,
      count(nov.id_novedad_rp) as cant
      /*
      nov.*,
      novval.debito,
      novval.credito*/
      from pr_novedad_rp nov
      join pr_novedad_rp_val novval
      on novval.id_novedad_rp = nov.id_novedad_rp
      group by
      nov.id_rp,
      nov.id_vigencia,
      nov.vigencia,
      novval.id_obj_gasto
    )nov
    on nov.id_rp = tab0.id_rp
    and nov.id_vigencia = tab0.id_vigencia
    and nov.vigencia = tab0.vigencia
    and nov.id_obj_gasto = tab0.id_obj_gasto

    left join(
      select
      nov.id_rp,
      nov.id_vigencia,
      nov.vigencia,
      novval.id_obj_gasto,
      count(nov.id_novedad_rp) as cant7,
      sum(novval.debito) as debito,
      sum(novval.credito) as credito
      /*
      nov.*,
      novval.debito,
      novval.credito*/
      from pr_novedad_rp nov
      join pr_novedad_rp_val novval
      on novval.id_novedad_rp = nov.id_novedad_rp
      where
      nov.id_tipo_novedad = 7
      group by
      nov.id_rp,
      nov.id_vigencia,
      nov.vigencia,
      novval.id_obj_gasto
    )nov7
    on nov7.id_rp = tab0.id_rp
    and nov7.id_vigencia = tab0.id_vigencia
    and nov7.vigencia = tab0.vigencia
    and nov7.id_obj_gasto = tab0.id_obj_gasto

    left join(
      select
      hist.id_rp,
      hist.id_vigencia,
      hist.vigencia,
      hist.id_obj_gasto,
      sum(nvl(hist.valor,0)) as valor_hist
      from pr_historial_rp hist
      group by
      hist.id_rp,
      hist.id_vigencia,
      hist.vigencia,
      hist.id_obj_gasto
    )hist
    on hist.id_rp = tab0.id_rp
    and hist.id_vigencia = tab0.id_vigencia
    and hist.vigencia = tab0.vigencia
    and hist.id_obj_gasto = tab0.id_obj_gasto

    where
    tab0.id_rp = $P{id_rp}
    and tab0.id_vigencia = $P{id_vigencia}
    and tab0.vigencia = $P{vigencia}

    and obj.codigo != '06'
    and obj.id not in (SELECT id FROM objetos_gasto where viatico = 1)

    union

    select

    1 as tag,
    comobj.codobj as codigo,
    case when $P{tipo} = 1 then 'VIATICOS' else 'GASTOS DE DESPLAZAMIENTO' end as descripcion,
    round( comobj.viaticos ) + nvl(resobj.valor,0) as v_aprobado,

    nvl((select
    --rpcom.*
    sum(nvl(leg.v_bruto,0)) + sum(nvl(leg.v_iva,0)) as v_legalizado
    from (
        SELECT
        aut.*,
        ROW_NUMBER() OVER (
            partition by aut.id_rp, aut.vigencia, aut.id_obj_gasto
            ORDER BY aut.id_rp, aut.vigencia, aut.id_obj_gasto, aut.id
        ) AS rn
        from pr_rp_compromiso aut
    )rpcom

    join objetos_gasto obj
    on obj.id = rpcom.id_obj_gasto

    join pr_elementos_gasto ele
    on ele.id_objeto_gasto = obj.id

    join pr_legalizacion_comis leg
    on leg.id_rp_comis = rpcom.id_rp
    and leg.id_vigencia = rpcom.id_vigencia
    and leg.vigencia = rpcom.vigencia
    and case when leg.id_elementos_gasto = 82 then 32 else leg.id_elementos_gasto end = ele.id_elementos_gasto

    where
    rpcom.id_rp = rp.id
    and rpcom.id_vigencia = rp.id_vigencia
    and rpcom.vigencia = rp.vigencia
    and rpcom.id_obj_gasto = obj.id
    and leg.id_elementos_gasto in (SELECT id_elementos_gasto FROM pr_elementos_gasto where viatico = 1)
    and rpcom.rn = 1
    ), 0) as v_legalizado,

    null as id,
    rp.id as id_rp,
    null as id_cpo,
    null as id_asign,
    obj.id as id_obj_gasto,
    nvl(null,0) as valor,
    rp.id_vigencia as id_vigencia,
    rp.vigencia as vigencia,

    nvl(null,0) as cant,
    nvl(null,0) as cant7,
    nvl(null,0) as valor_hist,
    nvl(null,0) as debito,
    nvl(null,0) as credito,

    nvl(null,0) as v_reintegro_comp

    from comisiones com

    left join comisionados_objs comobj
    on comobj.id_comision = com.id
    and comobj.vigencia = com.vigencia

    left join pr_rp_comis rp
    on rp.id_comision = comobj.id_comision
    and rp.vigencia = comobj.vigencia
    and rp.id_tercero = comobj.nitocc

    left join objetos_gasto obj
    on comobj.codobj = obj.codigo

    left join pr_resol_comis res
    on res.id = rp.no_acto_admin
    and res.id_vigencia = rp.id_vigencia
    and res.vigencia = rp.vigencia

    left join(

        SELECT
        rescom.nitocc,
        tab0.id_resol_orig,
        resobj.id_obj_gasto,
        sum(resobj.valor) as valor
        FROM com_resol_comis_objs resobj
        left join com_resol_comisionados rescom
        on rescom.id_resol_comisionados = resobj.id_resol_comisionados
        left join PR_RESOLUCIONES tab0
        on rescom.id_resoluciones = tab0.id_resoluciones
        where
        tab0.id_tipo_resol = 1 and tab0.firmado_digital = 1 and tab0.estado = 1
        group by
        rescom.nitocc,
        tab0.id_resol_orig,
        resobj.id_obj_gasto

    )resobj
    on resobj.id_resol_orig = res.id
    and resobj.id_obj_gasto = obj.id
    and resobj.nitocc = rp.id_tercero

    where
    com.vigencia = $P{vigencia}
    and rp.id = $P{id_rp}
    and rp.id_vigencia = $P{id_vigencia}
    and rp.vigencia = $P{vigencia}

    and (comobj.codobj = '06' or obj.id in (SELECT id FROM objetos_gasto where viatico = 1 and ano_fiscal = $P{vigencia}))
    and comobj.viaticos != 0

    union

    select

    2 as tag,
    comobj.codobj as codigo,
    'GASTOS DE VIAJE' as descripcion,
    round( comobj.valor - comobj.viaticos + nvl((
        /*Se suman gastos de viaje objeto 800 - 20191016*/
        select
        sum(comobj.valor) as valor
        from comisiones com

        left join comisionados_objs comobj
        on comobj.id_comision = com.id
        and comobj.vigencia = com.vigencia

        left join pr_rp_comis rp
        on rp.id_comision = comobj.id_comision
        and rp.vigencia = comobj.vigencia
        and rp.id_tercero = comobj.nitocc

        left join objetos_gasto obj
        on comobj.codobj = obj.codigo

        where
        com.vigencia = $P{vigencia}
        and rp.id = $P{id_rp}
        and rp.id_vigencia = $P{id_vigencia}
        and rp.vigencia =  $P{vigencia}
        and obj.id in (SELECT id FROM objetos_gasto where viaje = 1 and ano_fiscal >= 2019 and ano_fiscal = $P{vigencia})
        and ( comobj.taxis > 0 or comobj.valor != comobj.viaticos )

    ),0) ) as v_aprobado,

    nvl((select
    --rpcom.*
    sum(nvl(leg.v_bruto,0)) + sum(nvl(leg.v_iva,0)) as v_legalizado
    from (
        SELECT
        aut.*,
        ROW_NUMBER() OVER (
            partition by aut.id_rp, aut.vigencia, aut.id_obj_gasto
            ORDER BY aut.id_rp, aut.vigencia, aut.id_obj_gasto, aut.id
        ) AS rn
        from pr_rp_compromiso aut
    )rpcom

    join objetos_gasto obj
    on obj.id = rpcom.id_obj_gasto

    join pr_elementos_gasto ele
    on ele.id_objeto_gasto = obj.id

    join pr_legalizacion_comis leg
    on leg.id_rp_comis = rpcom.id_rp
    and leg.id_vigencia = rpcom.id_vigencia
    and leg.vigencia = rpcom.vigencia
    and leg.id_elementos_gasto = ele.id_elementos_gasto

    where
    rpcom.id_rp = rp.id
    and rpcom.id_vigencia = rp.id_vigencia
    and rpcom.vigencia = rp.vigencia
    and rpcom.id_obj_gasto = obj.id
    and leg.id_elementos_gasto not in (SELECT id_elementos_gasto FROM pr_elementos_gasto where viatico = 1)
    and rpcom.rn = 1
    and (obj.codigo = '06' or obj.id in (SELECT id FROM objetos_gasto where viatico = 1))
    ), 0) as v_legalizado,

    null as id,
    rp.id as id_rp,
    null as id_cpo,
    null as id_asign,
    obj.id as id_obj_gasto,
    nvl(null,0) as valor,
    rp.id_vigencia as id_vigencia,
    rp.vigencia as vigencia,

    nvl(null,0) as cant,
    nvl(null,0) as cant7,
    nvl(null,0) as valor_hist,
    nvl(null,0) as debito,
    nvl(null,0) as credito,

    nvl(null,0) as v_reintegro_comp

    from comisiones com

    left join comisionados_objs comobj
    on comobj.id_comision = com.id
    and comobj.vigencia = com.vigencia

    left join pr_rp_comis rp
    on rp.id_comision = comobj.id_comision
    and rp.vigencia = comobj.vigencia
    and rp.id_tercero = comobj.nitocc

    left join objetos_gasto obj
    on comobj.codobj = obj.codigo

    where
    com.vigencia = $P{vigencia}
    and rp.id = $P{id_rp}
    and rp.id_vigencia = $P{id_vigencia}
    and rp.vigencia = $P{vigencia}

    /*and comobj.codobj = '06'*/
    and (comobj.codobj = '06' or obj.id in (SELECT id FROM objetos_gasto where viatico = 1 and ano_fiscal = $P{vigencia}))
   /* and comobj.taxis = 0Ya no toma valor taxis, luego porgo por 2020 en adelante - 20200205*/
    and ( comobj.taxis > 0 or comobj.valor != comobj.viaticos or (
        /*Se suman gastos de viaje objeto 800 y 001 - 20191016*/
        select
        count(*) as cant
        from comisiones com

        left join comisionados_objs comobj
        on comobj.id_comision = com.id
        and comobj.vigencia = com.vigencia

        left join pr_rp_comis rp
        on rp.id_comision = comobj.id_comision
        and rp.vigencia = comobj.vigencia
        and rp.id_tercero = comobj.nitocc

        left join objetos_gasto obj
        on comobj.codobj = obj.codigo

        where
        com.vigencia = $P{vigencia}
        and rp.id = $P{id_rp}
        and rp.id_vigencia = $P{id_vigencia}
        and rp.vigencia =  $P{vigencia}
        and obj.id in (SELECT id FROM objetos_gasto where viaje = 1 and ano_fiscal >= 2019)
        and ( comobj.taxis > 0 or comobj.valor != comobj.viaticos )
    ) > 0 )

)tab0

where
tab0.v_aprobado > 0 or tab0.v_legalizado > 0 or tab0.v_reintegro_comp > 0

order by
tab0.tag,
tab0.codigo,
tab0.v_aprobado desc]]>
	</queryString>
	<field name="PESOS" class="java.lang.String"/>
	<field name="TAG" class="java.math.BigDecimal"/>
	<field name="CODIGO" class="java.lang.String"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="V_APROBADO" class="java.math.BigDecimal"/>
	<field name="V_LEGALIZADO" class="java.math.BigDecimal"/>
	<field name="ID" class="java.math.BigDecimal"/>
	<field name="ID_RP" class="java.math.BigDecimal"/>
	<field name="ID_CPO" class="java.math.BigDecimal"/>
	<field name="ID_ASIGN" class="java.math.BigDecimal"/>
	<field name="ID_OBJ_GASTO" class="java.math.BigDecimal"/>
	<field name="VALOR" class="java.math.BigDecimal"/>
	<field name="ID_VIGENCIA" class="java.math.BigDecimal"/>
	<field name="VIGENCIA" class="java.lang.String"/>
	<field name="CANT" class="java.math.BigDecimal"/>
	<field name="CANT7" class="java.math.BigDecimal"/>
	<field name="VALOR_HIST" class="java.math.BigDecimal"/>
	<field name="DEBITO" class="java.math.BigDecimal"/>
	<field name="CREDITO" class="java.math.BigDecimal"/>
	<field name="V_REINTEGRO_COMP" class="java.math.BigDecimal"/>
	<variable name="v_aprobado" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{V_APROBADO}]]></variableExpression>
	</variable>
	<variable name="v_legalizado" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{V_LEGALIZADO}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<columnHeader>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="0" y="0" width="572" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["PRESUPUESTO ASIGNADO"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="12" width="152" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Objeto de Gasto"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="432" y="12" width="140" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Diferencia(Valor a Reintegrar)"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="292" y="12" width="140" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Valor Legalizado"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="152" y="12" width="140" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Valor Pagado"]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="12" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="152" y="0" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="162" y="0" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{V_APROBADO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="0" width="152" height="12" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO} + " - " +  $F{DESCRIPCION}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="302" y="0" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{V_LEGALIZADO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="292" y="0" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="442" y="0" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{V_APROBADO} - $F{V_LEGALIZADO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="432" y="0" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="36" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="0" y="24" width="152" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TOTAL"]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="162" y="24" width="130" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{v_aprobado}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="152" y="24" width="10" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="292" y="24" width="10" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="302" y="24" width="130" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{v_legalizado}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="432" y="24" width="10" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement mode="Opaque" x="442" y="24" width="130" height="12" forecolor="#000000" backcolor="#D7D7D7"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{v_aprobado}-$V{v_legalizado}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="302" y="0" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["-"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="152" y="0" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="162" y="0" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["-"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="292" y="0" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="0" width="152" height="12" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="442" y="0" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["-"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="432" y="0" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="152" y="12" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="162" y="12" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["-"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="432" y="12" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="442" y="12" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["-"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="292" y="12" width="10" height="12" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PESOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="12" width="152" height="12" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="302" y="12" width="130" height="12" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dotted"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["-"]]></textFieldExpression>
			</textField>
		</band>
	</summary>
</jasperReport>
