<?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="gen_archivos_siif_nacion_deduc" language="groovy" pageWidth="1000" pageHeight="612" orientation="Landscape" columnWidth="960" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.2100000000000055"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="id_periodo_filtro" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="whereFuncionarioTipoDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereFuncionarioNumDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereBanco" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTipoCuenta" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="tipo_banco_nom" class="java.lang.String"/>
	<parameter name="whereClasePlanta" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[Select
--rownum as rn,
tab.sec,
tab.tipo_bene,
tab.nit_bene,
tab.nombre_bene,
tab.codigo_desc,
WM_CONCAT(distinct tab.codigo_concep) as codigo_concep,
WM_CONCAT(distinct tab.descripcion_concep) as descripcion_concep,
tab.id_periodo,
tab.id_bn,
tab.tipo_cuenta,
tab.id_tipo_doc,
tab.codigo_siif,
tab.num_doc,
tab.nombre_apellido,
tab.medio_pago,
tab.tipo_iden,
tab.nit_bn,
tab.banco,
tab.codigo_ach,
tab.descripcion,
tab.nombre_corto,
tab.num_cuenta,
sum(tab.valor_dev) as valor_dev,
sum(tab.valor_ded) as valor_ded,
sum(tab.valor) as valor,
tab.periodo,
case when sum(tab.valor_base) <= 0 then round(sum(tab.valor_ded)*100/max(tab.porcentaje),-3) else round(sum(tab.valor_base),-3) end as valor_base,
(max(tab.porcentaje)/100) as porcentaje

from(


select
tabrn.rn as sec,
tab0.* ,
(select distinct periodo.periodo from no_periodo_v periodo where periodo.id_periodo = $P{id_periodo_filtro} ) as periodo


from(

    select
    id_clase_planta,
    case when estado = 0 then null else replace(tipo_bene,'0','0') end as tipo_bene,
    case when estado = 0 then null else nit_bene end as nit_bene,
    case when estado = 0 then null else nombre_bene end as nombre_bene,
    codigo_desc,
    codigo_concep,
    descripcion_concep,
    id_periodo,
    case when estado = 0 then null else id_bn end as id_bn,
    case when estado = 0 then null else id end as tipo_cuenta,
    id_tipo_doc,
    codigo_siif,
    num_doc,
    nombre_apellido,
    case when estado = 0 then 'CH' else 'AC' end as medio_pago,
    case when estado = 0 then null else replace(tipo_iden,'0','') end as tipo_iden,
    case when estado = 0 then null else nit_bn end as nit_bn,
    case when estado = 0 then null else banco end as banco,
    codigo_ach,
    descripcion,
    case when estado = 0 then null else nombre_corto end as nombre_corto,
    case when estado = 0 then null else num_cuenta end as num_cuenta,
    valor_dev,
    valor_ded,
    valor,
    valor_base,
    porcentaje
    /*
    sum(nvl(valor_dev,0)) as valor_dev,
    sum(nvl(valor_ded,0)) as valor_ded,
    sum(nvl(valor,0)) as valor
    */

    from(

        select
        tab7.id_clase_planta,

        case when dednoley.id_concep_nomina is not null then nvl(tercon_dednoley.num_doc, tercon.num_doc) else tercon.num_doc end as nit_bene,
        case when dednoley.id_concep_nomina is not null then nvl(tercon_dednoley.razon_soc, tercon.razon_soc) else tercon.razon_soc end as nombre_bene,
        case when dednoley.id_concep_nomina is not null then nvl(tipiden_dednoley.codigo_siif, tipiden_con.codigo_siif) else tipiden_con.codigo_siif end as tipo_bene,

        dednoley.id_concep_nomina as concep_dednoley,
        dednoley.id_mae_ter as ter_dednoley,
        tercon_dednoley.num_doc as nit_dednoley,
        tercon_dednoley.razon_soc as razsoc_dednoley,
        tercon.Num_Doc as nit_con,
        Tercon.Razon_Soc as razsoc_con,
        tab8.codigo_siif as codigo_desc,
        tab5.codigo as codigo_concep, tab5.descripcion as descripcion_concep,
        tab1.num_doc,tab6.nombre_apellido,tab3.codigo||' - '||tab3.descripcion as banco, tab3.codigo_ach,
        tab2.num_cuenta,
        case when nvl(tab2.estado,0) = 0 and tab7.estado = 0 and tab2.fecha_terminacion <= tab7.fecha_termina then 1 else nvl(tab2.estado,0) end as estado,
        case when tab5.operador = 1 then tab1.valor_liquidado else (tab1.valor_liquidado * -1) end as valor,
        case when tab5.operador = 1 then tab1.valor_liquidado else 0 end as valor_dev,
        case when tab5.operador = 0 then tab1.valor_liquidado else 0 end as valor_ded,
        tab1.id_periodo,
        tab1.id_tipo_doc, tab3.id_bn, terbn.NUM_DOC as nit_bn, tipiden.codigo_siif as tipo_iden,
        tab4.id,
        tab4.descripcion,
        tab4.nombre_corto,
        tab18.codigo_siif,

        case when tab1.id_concep_nomina = (SELECT id_concep_rete FROM no_param_concep where id_param_concep = 1) then nvl(tab1.valor_base,0) else null end as valor_base,
        case when tab1.id_concep_nomina = (SELECT id_concep_rete FROM no_param_concep where id_param_concep = 1) then tab1.porcentaje else null end as porcentaje

        from no_liquida_nomina tab1

        left join no_concep_nomina tab5 on tab5.id_concep_nomina = tab1.id_concep_nomina
        left join no_lista_conceptos_siif tab8 on tab8.id_lista_conceptos_siif = tab5.id_lista_conceptos_siif

        left join Interceros_v tercon  on tercon.id_mae_ter = Tab5.Id_Acreedor
        left join no_ded_noley dednoley on dednoley.id_concep_nomina = tab5.id_concep_nomina and dednoley.id_tipo_doc = tab1.id_tipo_doc and dednoley.num_doc = tab1.num_doc and dednoley.estado = 1
        left join interceros_v tercon_dednoley  on tercon_dednoley.id_mae_ter = dednoley.id_mae_ter

        left join tipo_identificacion tipiden_con on tipiden_con.id_tipo_identificacion = tercon.id_tipo_doc
        left join tipo_identificacion tipiden_dednoley on tipiden_dednoley.id_tipo_identificacion = tercon_dednoley.id_tipo_doc

        left join no_datos_funcionario_v tab6  on tab6.id_tipo_doc = tab1.id_tipo_doc and tab6.num_doc = tab1.num_doc

        --join no_pago_func tab2 on tab2.id_tipo_doc = tab1.id_tipo_doc and tab2.num_doc = tab1.num_doc
        left join (
          SELECT
           aut.*,
           ROW_NUMBER() OVER (
            partition by aut.num_doc
            ORDER BY aut.num_doc asc, aut.fecha_activacion desc, aut.id_pago_func desc
           ) AS rn
          from no_pago_func aut
        )tab2
        on tab1.id_tipo_doc = tab2.id_tipo_doc and tab1.num_doc = tab2.num_doc
        and tab2.rn = 1
        left join no_nombramiento_v tab7  ON tab7.id_tipo_doc = tab1.id_tipo_doc and tab7.num_doc = tab1.num_doc

        left join ts_bn tab3 on tab3.id_bn = tab2.id_bn
        left join interceros terbn
        on terbn.id_mae_ter = tab3.id_mae_ter
        left join tipo_identificacion tipiden
        on tipiden.id_tipo_identificacion = terbn.id_tipo_doc

        left join ts_tc tab4 on tab4.id = tab2.tipo_cuenta

        join tipo_documento tab18 on tab18.id_tipo_doc = tab1.id_tipo_doc

        where
        tab1.id_periodo = $P{id_periodo_filtro}
        and tab5.pago_func = 1
        and tab5.id_tipo_concepto != 1

    )
    /*
    group by
    codigo_siif,
    num_doc,nombre_apellido,
    tipo_iden,
    nit_bn,
    banco,codigo_ach,
    num_cuenta,descripcion,id_periodo,
    id_tipo_doc, id_bn, id, nombre_corto, estado
    */

)tab0

left join (
    select
    rownum as rn,
    id_tipo_doc,
    num_doc from (

              select distinct
              tab1.id_tipo_doc,
              tab1.num_doc
              from no_liquida_nomina tab1
              left join no_nombramiento_v tab0  ON tab0.id_tipo_doc = tab1.id_tipo_doc and tab0.num_doc = tab1.num_doc
              where
              tab1.id_periodo = $P{id_periodo_filtro}
              $P!{whereClasePlanta}
              order by
              tab1.num_doc

    )
)tabrn
on tabrn.id_tipo_doc = tab0.id_tipo_doc
and tabrn.num_doc = tab0.num_doc

where
1 = 1
$P!{whereFuncionarioNumDoc} $P!{whereFuncionarioTipoDoc}
              $P!{whereClasePlanta}


order by
tab0.num_doc, to_number(tab0.codigo_desc)

)tab

having
sum(tab.valor_ded) != 0

group by
tab.sec,
tab.tipo_bene,
tab.nit_bene,
tab.nombre_bene,
tab.codigo_desc,
tab.id_periodo,
tab.id_bn,
tab.tipo_cuenta,
tab.id_tipo_doc,
tab.codigo_siif,
tab.num_doc,
tab.nombre_apellido,
tab.medio_pago,
tab.tipo_iden,
tab.nit_bn,
tab.banco,
tab.codigo_ach,
tab.descripcion,
tab.nombre_corto,
tab.num_cuenta,
tab.periodo


order by
tab.num_doc,
tab.codigo_desc]]>
	</queryString>
	<field name="SEC" class="java.math.BigDecimal"/>
	<field name="TIPO_BENE" class="java.lang.String"/>
	<field name="NIT_BENE" class="java.lang.String"/>
	<field name="NOMBRE_BENE" class="java.lang.String"/>
	<field name="CODIGO_DESC" class="java.lang.String"/>
	<field name="CODIGO_CONCEP" class="java.lang.String"/>
	<field name="DESCRIPCION_CONCEP" class="java.lang.String"/>
	<field name="ID_PERIODO" class="java.math.BigDecimal"/>
	<field name="ID_BN" class="java.math.BigDecimal"/>
	<field name="TIPO_CUENTA" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="CODIGO_SIIF" class="java.lang.String"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="NOMBRE_APELLIDO" class="java.lang.String"/>
	<field name="MEDIO_PAGO" class="java.lang.String"/>
	<field name="TIPO_IDEN" class="java.lang.String"/>
	<field name="NIT_BN" class="java.lang.String"/>
	<field name="BANCO" class="java.lang.String"/>
	<field name="CODIGO_ACH" class="java.lang.String"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="NOMBRE_CORTO" class="java.lang.String"/>
	<field name="NUM_CUENTA" class="java.lang.String"/>
	<field name="VALOR_DEV" class="java.math.BigDecimal"/>
	<field name="VALOR_DED" class="java.math.BigDecimal"/>
	<field name="VALOR" class="java.math.BigDecimal"/>
	<field name="PERIODO" class="java.lang.String"/>
	<field name="VALOR_BASE" class="java.math.BigDecimal"/>
	<field name="PORCENTAJE" class="java.math.BigDecimal"/>
	<variable name="total" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR}]]></variableExpression>
	</variable>
	<variable name="cantidad" class="java.math.BigDecimal" calculation="Count">
		<variableExpression><![CDATA[$F{NUM_DOC}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<staticText>
				<reportElement x="160" y="0" width="690" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema General de Nómina]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="10" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Opaque" x="850" y="28" width="110" 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="850" y="40" width="110" 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="160" y="40" width="690" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PERIODO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="160" y="20" width="690" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Generación de Archivos SIIF Nación Deducciones"]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="20" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="60" y="0" width="100" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Código del Concepto Descuento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="610" y="0" width="130" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Funcionario]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="530" y="0" width="80" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[No. Documento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="310" y="0" width="90" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor a Deducir]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="60" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Identificador Tercero]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="740" y="0" width="110" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Concepto Nómina]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="450" y="0" width="80" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Nit Beneficiario]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="400" y="0" width="50" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Tip. Doc. BN]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="850" y="0" width="110" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Beneficiario]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="160" y="0" width="90" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Base Gravable]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="250" y="0" width="60" height="20" forecolor="#000000" 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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Tarifa]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="13" splitType="Stretch">
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="530" y="0" width="80" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="3">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="610" y="0" width="130" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<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="Left" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_APELLIDO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="310" y="0" width="90" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<box 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" 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.math.BigDecimal"><![CDATA[$F{VALOR_DED}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="60" y="0" width="100" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<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" 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[$F{CODIGO_DESC}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="0" y="0" width="60" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<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" 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[$F{SEC}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="740" y="0" width="110" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<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" 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[$F{CODIGO_CONCEP} + " - " + $F{DESCRIPCION_CONCEP}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="450" y="0" width="80" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="3">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NIT_BENE}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="400" y="0" width="50" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<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" 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[$F{TIPO_BENE}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="850" y="0" width="110" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<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" 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[$F{NOMBRE_BENE}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00000 %" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="250" y="0" width="60" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<box 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" 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.math.BigDecimal"><![CDATA[$F{PORCENTAJE}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="160" y="0" width="90" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
				<box 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" 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.math.BigDecimal"><![CDATA[$F{VALOR_BASE}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="25" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="400" 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="490" y="12" width="60" 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="400" y="0" width="150" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Nómina]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="25" splitType="Stretch"/>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="960" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
