<?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="extracto_liquid_definitiva" language="groovy" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.331000000000004"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="num_doc" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="nombre_periodo" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_agrup_concepto" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_tipo_doc" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="periodo" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="comando" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select

novka.codigo,
novka.descripcion,
to_char(novka.fecha_ini,'yyyy-mm-dd') as fecha_ini_novka,
to_char(novka.fecha_fin,'yyyy-mm-dd') as fecha_fin_novka,

nvl(DIAS_HABILES_CANT(

to_char(case when novka.fecha_ini < case when to_date( agrup.vig_ini  || '01-01','yyyy-mm-dd') > tab0.fecha_desde then to_date( agrup.vig_ini  || '01-01','yyyy-mm-dd') else tab0.fecha_desde end
then case when to_date( agrup.vig_ini  || '01-01','yyyy-mm-dd') > tab0.fecha_desde then to_date( agrup.vig_ini  || '01-01','yyyy-mm-dd') else tab0.fecha_desde end
else novka.fecha_ini end,'yyyy-mm-dd'),

to_char(case when novka.fecha_fin > case when trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) < tab0.fecha_hasta then trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) else tab0.fecha_hasta end
then case when trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) < tab0.fecha_hasta then trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) else tab0.fecha_hasta end
else novka.fecha_fin end,'yyyy-mm-dd')

),0) as dias_nov_hab,

dias_rango_anho_sintreintayuno( novka.fecha_ini,
case when novka.fecha_fin > case when trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) < tab0.fecha_hasta then trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) else tab0.fecha_hasta end
then case when trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) < tab0.fecha_hasta then trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) else tab0.fecha_hasta end
else novka.fecha_fin end,
tab1.id_anhos ) as dias_nov,

case when to_date( agrup.vig_ini  || '01-01','yyyy-mm-dd') > tab0.fecha_desde then to_date( agrup.vig_ini  || '01-01','yyyy-mm-dd') else tab0.fecha_desde end as fecha_desde,
case when trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) < tab0.fecha_hasta then trunc(last_day( TO_DATE('01/'|| (SELECT LPAD(ID_MESES,2,'0') ||'/'||ID_ANHOS FROM NO_PERIODO WHERE ID_PERIODO = $P{periodo}) ,'dd/mm/yyyy') )) else tab10.fecha_termina/*antes tab0.fecha_hasta*/ end as fecha_hasta,

tab0.id_liquida_nomina as id_liquida_nomina, tab0.id_tipo_doc as id_tipo_doc,
tab0.num_doc as num_doc, tab0.id_concep_nomina as id_concep_nomina,
tab0.id_periodo as id_periodo, tab0.valor_liquidado as valor_liquidado,
to_char(tab0.fecha_desde, 'YYYY-MM-DD') as fecha_desde_char,
to_char(tab0.fecha_hasta, 'YYYY-MM-DD') as fecha_hasta_char,
tab0.num_dias as num_dias, tab1.id_anhos as id_anhos,
tab1.id_meses as id_meses, to_char(tab1.fecha_ini, 'YYYY-MM-DD') as fecha_ini,
to_char(tab1.fecha_fin, 'YYYY-MM-DD') as fecha_fin,
tab1.id_tipo_periodo as id_tipo_periodo,
tab1.estado as estado_per, tab1.activo as activo,
to_char(tab1.fecha_cierre, 'YYYY-MM-DD') as fecha_cierre,
to_char(tab1.fecha_cierre_nov, 'YYYY-MM-DD') as fecha_cierre_nov,
tab1.periodo as periodo, tab2.descripcion as descripcion_mes,
tab3.tipo_documento as tipo_documento, tab3.primer_nombre as primer_nombre,
tab3.segundo_nombre as segundo_nombre,
tab3.primer_nombre||' '||tab3.segundo_nombre as nombre,
tab3.primer_apellido as primer_apellido,
tab3.segundo_apellido as segundo_apellido,
tab3.nombre_completo as nombre_completo, tab3.nombre_apellido as nombre_apellido,
to_char(tab3.fecha_nace, 'YYYY-MM-DD') as fecha_nace, tab3.email as email,
tab3.tel as telefono, tab3.direccion as direccion, tab3.pais_nace as pais_nace,
tab3.depto_nace as depto_nace, tab3.muni_nace as muni_nace, tab3.genero as genero,
tab3.estado_civil as estado_civil, tab3.tipo_sangre as tipo_sangre, tab4.codigo as ,
tab4.descripcion as descripcion, tab4.codigo||' - '||tab4.descripcion as completo,
tab4.id_tipo_concepto as id_tipo_concepto, tab4.abreviatura as abreviatura,
tab4.operador as operador, tab4.operadoropcional as operadoropcional,
tab4.cod2 as cod2, tab4.cod3 as cod3, tab4.id_concep_ajuste as id_concep_ajuste,
tab4.id_concep_rein as id_concep_rein, tab4.id_acreedor as id_acreedor,
tab4.id_rubro as id_rubro, tab4.id_cpo as id_cpo, tab4.estado as estado,
tab4.aplica_descuento as aplica_descuento, tab4.id_clase_fondo as id_clase_fondo,
tab4.usa_dias_calen as usa_dias_calen,

case when tab10.id_periodo in (select
        per.id_periodo
        from no_periodo per
        where
        per.id_anhos = (select id_anhos from no_periodo where id_periodo = tab0.id_periodo)
        and per.id_meses = (select id_meses from no_periodo where id_periodo = tab0.id_periodo) ) then tab0.fecha_desde else (case when tab10.solucion_continuidad = 1 then (select max(nomsc.fecha_ingreso) from no_nombramiento nomsc
    where nomsc.id_tipo_doc = TAB0.id_tipo_doc and nomsc.num_doc = TAB0.NUM_DOC and nomsc.id_nombramiento != tab10.id_nombramiento ) else tab10.fecha_ingreso end)  end as fecha_ingreso,
case when tab10.id_periodo in (select
        per.id_periodo
        from no_periodo per
        where
        per.id_anhos = (select id_anhos from no_periodo where id_periodo = tab0.id_periodo)
        and per.id_meses = (select id_meses from no_periodo where id_periodo = tab0.id_periodo) ) then tab0.fecha_hasta-1 else tab10.fecha_termina end as fecha_termina,
case when tab10.id_periodo in (select
        per.id_periodo
        from no_periodo per
        where
        per.id_anhos = (select id_anhos from no_periodo where id_periodo = tab0.id_periodo)
        and per.id_meses = (select id_meses from no_periodo where id_periodo = tab0.id_periodo) ) then tab0.fecha_hasta else tab10.fecha_retiro end as fecha_retiro,

agrup.id_concep_nomina as id_concep_nomina_agrup, agrup.codigo as codigo_agrup,
agrup.descripcion as descripcion_agrup, agrup.valor, agrup.tipo_valor,
case when agrup.tipo_valor = 'V' then '1/12' else '' end as parte,
case when agrup.tipo_valor = 'V' then round(agrup.valor /12 , 2) else agrup.valor end as valor_base_agrup,

licno.dias_lic as dias_licno

from no_liquida_nomina tab0
join no_periodo_v tab1 on tab0.id_periodo = tab1.id_periodo
join meses tab2 on tab1.id_meses = tab2.id_meses
join no_datos_funcionario_v tab3 on tab0.id_tipo_doc = tab3.id_tipo_doc
and tab0.num_doc = tab3.num_doc
join no_conceptos_v tab4 on tab0.id_concep_nomina = tab4.id_concep_nomina
left join no_nombramiento_v tab10 ON tab10.id_tipo_doc = tab0.id_tipo_doc and tab10.num_doc = tab0.num_doc

left join(
select
$P{id_tipo_doc} as id_tipo_doc,
$P{num_doc} as num_doc,
case when tab.tipo_valor in ( 'R' )
then nvl(no_consulta_sql_f(tab.vig_ini, tab.per_ini, tab.vig_fin, tab.per_fin, $P{id_tipo_doc}, $P{num_doc}, tab.id_concep_nomina, tab.tipo_valor,

(select id_periodo from (
        select
        per.*,
        ROW_NUMBER() OVER (
          partition by per.id_tipo_periodo
          ORDER BY per.fecha_fin desc
        ) AS rn
        from no_periodo per
        where
        per.id_tipo_periodo = 1
        and per.id_anhos <= (select id_anhos from no_periodo where id_periodo = $P{periodo})
        and per.id_meses <= (select id_meses from no_periodo where id_periodo = $P{periodo})
    )
    where
    rn = 1)

) ,0)
else nvl(no_consulta_sql_f(tab.vig_ini, tab.per_ini, tab.vig_fin, tab.per_fin, $P{id_tipo_doc}, $P{num_doc}, tab.id_concep_nomina, tab.tipo_valor, $P{periodo}) ,0)  end as valor,
tab.*
from(

select
extract(YEAR FROM (select fecha_ini from no_periodo where id_periodo = $P{periodo})) as vig_ini,
1 as per_ini,
extract(YEAR FROM (select fecha_fin from no_periodo where id_periodo = $P{periodo})) as vig_fin,
extract(MONTH FROM (select fecha_fin from no_periodo where id_periodo = $P{periodo})) as per_fin,
TAB0.ID_AGRUP_CONCEPTO,
TAB0.ORDEN,
TAB0.TIPO_VALOR,
tab1.*
from no_agrup_deta tab0
left join no_concep_nomina tab1 on tab1.id_concep_nomina = tab0.id_concep_nomina
where tab0.id_agrup_concepto = $P{id_agrup_concepto}

)tab

order by tab.codigo

)agrup
on agrup.ID_TIPO_DOC = tab0.ID_TIPO_DOC and agrup.NUM_DOC = tab0.NUM_DOC

left join(

    SELECT
    tip.codigo,
    tip.descripcion,
    nov.*,
    ROW_NUMBER() OVER (
        partition by nov.num_doc
        ORDER BY  nov.num_doc, nov.id_tip_nov_ka desc, nov.fecha_fin desc
    ) AS rn

    FROM no_novedad_kardex nov

    left join no_tip_nov_ka tip on tip.id_tip_nov_ka = nov.id_tip_nov_ka

    where
    nov.id_tipo_doc = $P{id_tipo_doc}
    and nov.num_doc = $P{num_doc}
    and nov.estado = 1
    and nov.id_tip_nov_ka = 12

)novka
on novka.id_tipo_doc = tab0.id_tipo_doc
and novka.num_doc = tab0.num_doc
and novka.rn = 1

left join(
    select
    tab.num_doc,
    nvl(sum(dias),0) as dias_lic
    from(
        select
        tab0.num_doc,
        /* Se cambia por fecha desde de nombramieto - 20200226
  tab0.fecha_fin - (case when tab0.fecha_ini > to_date('01/01/'||(select ID_ANHOS from no_periodo where id_periodo = 0),'dd/mm/yyyy')
            then tab0.fecha_ini else to_date('01/01/'||(select ID_ANHOS from no_periodo where id_periodo = 0),'dd/mm/yyyy') end) + 1 as dias
  */
        tab0.fecha_fin - (tab0.fecha_ini) + 1 as dias

        from no_novedad_kardex tab0

        left join no_tip_nov_ka tab1 ON tab1.id_tip_nov_ka = tab0.id_tip_nov_ka

        left join no_nombramiento nom on tab0.id_tipo_doc = nom.id_tipo_doc and tab0.num_doc = nom.num_doc

        where
        tab1.afecta_antigu = 1
        and tab0.estado = 1
    and (select fecha_ini from no_periodo where id_periodo = $P{periodo}) between nom.fecha_ingreso and nom.fecha_termina
        and (
            /*Se cambia por fecha desde de nombramieto - 20200226
            tab0.fecha_ini between (select to_date('01/01'||ID_ANHOS,'dd/mm/yyyy') from no_periodo where id_periodo = 0)
                and (select fecha_fin from no_periodo where id_periodo = 0)
            or
            tab0.fecha_fin between (select to_date('01/01'||ID_ANHOS,'dd/mm/yyyy') from no_periodo where id_periodo = 0)
                and (select fecha_fin from no_periodo where id_periodo = 0)*/

            tab0.fecha_ini between nom.fecha_ingreso
                and (select fecha_fin from no_periodo where id_periodo = $P{periodo})
            or
            tab0.fecha_fin between nom.fecha_ingreso
                and (select fecha_fin from no_periodo where id_periodo = $P{periodo})
        )
        and tab0.num_doc = $P{num_doc}

    )tab
    group by
    tab.num_doc
)licno
on licno.num_doc = tab0.num_doc


where  tab0.id_liquida_nomina != '-1'
and tab0.id_concep_nomina = '20'
AND tab0.id_periodo =  $P{periodo}
and tab0.num_doc = $P{num_doc} and tab0.id_tipo_doc = $P{id_tipo_doc}]]>
	</queryString>
	<field name="CODIGO" class="java.lang.String"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="FECHA_INI_NOVKA" class="java.lang.String"/>
	<field name="FECHA_FIN_NOVKA" class="java.lang.String"/>
	<field name="DIAS_NOV_HAB" class="java.math.BigDecimal"/>
	<field name="DIAS_NOV" class="java.math.BigDecimal"/>
	<field name="FECHA_DESDE" class="java.sql.Timestamp"/>
	<field name="FECHA_HASTA" class="java.sql.Timestamp"/>
	<field name="ID_LIQUIDA_NOMINA" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="ID_CONCEP_NOMINA" class="java.math.BigDecimal"/>
	<field name="ID_PERIODO" class="java.math.BigDecimal"/>
	<field name="VALOR_LIQUIDADO" class="java.math.BigDecimal"/>
	<field name="FECHA_DESDE_CHAR" class="java.lang.String"/>
	<field name="FECHA_HASTA_CHAR" class="java.lang.String"/>
	<field name="NUM_DIAS" class="java.math.BigDecimal"/>
	<field name="ID_ANHOS" class="java.math.BigDecimal"/>
	<field name="ID_MESES" class="java.math.BigDecimal"/>
	<field name="FECHA_INI" class="java.lang.String"/>
	<field name="FECHA_FIN" class="java.lang.String"/>
	<field name="ID_TIPO_PERIODO" class="java.math.BigDecimal"/>
	<field name="ESTADO_PER" class="java.math.BigDecimal"/>
	<field name="ACTIVO" class="java.math.BigDecimal"/>
	<field name="FECHA_CIERRE" class="java.lang.String"/>
	<field name="FECHA_CIERRE_NOV" class="java.lang.String"/>
	<field name="PERIODO" class="java.lang.String"/>
	<field name="DESCRIPCION_MES" class="java.lang.String"/>
	<field name="TIPO_DOCUMENTO" class="java.lang.String"/>
	<field name="PRIMER_NOMBRE" class="java.lang.String"/>
	<field name="SEGUNDO_NOMBRE" class="java.lang.String"/>
	<field name="NOMBRE" class="java.lang.String"/>
	<field name="PRIMER_APELLIDO" class="java.lang.String"/>
	<field name="SEGUNDO_APELLIDO" class="java.lang.String"/>
	<field name="NOMBRE_COMPLETO" class="java.lang.String"/>
	<field name="NOMBRE_APELLIDO" class="java.lang.String"/>
	<field name="FECHA_NACE" class="java.lang.String"/>
	<field name="EMAIL" class="java.lang.String"/>
	<field name="TELEFONO" class="java.lang.String"/>
	<field name="DIRECCION" class="java.lang.String"/>
	<field name="PAIS_NACE" class="java.lang.String"/>
	<field name="DEPTO_NACE" class="java.lang.String"/>
	<field name="MUNI_NACE" class="java.lang.String"/>
	<field name="GENERO" class="java.lang.String"/>
	<field name="ESTADO_CIVIL" class="java.lang.String"/>
	<field name="TIPO_SANGRE" class="java.lang.String"/>
	<field name="COMPLETO" class="java.lang.String"/>
	<field name="ID_TIPO_CONCEPTO" class="java.math.BigDecimal"/>
	<field name="ABREVIATURA" class="java.lang.String"/>
	<field name="OPERADOR" class="java.math.BigDecimal"/>
	<field name="OPERADOROPCIONAL" class="java.lang.String"/>
	<field name="COD2" class="java.lang.String"/>
	<field name="COD3" class="java.lang.String"/>
	<field name="ID_CONCEP_AJUSTE" class="java.math.BigDecimal"/>
	<field name="ID_CONCEP_REIN" class="java.math.BigDecimal"/>
	<field name="ID_ACREEDOR" class="java.math.BigDecimal"/>
	<field name="ID_RUBRO" class="java.math.BigDecimal"/>
	<field name="ID_CPO" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="APLICA_DESCUENTO" class="java.math.BigDecimal"/>
	<field name="ID_CLASE_FONDO" class="java.math.BigDecimal"/>
	<field name="USA_DIAS_CALEN" class="java.math.BigDecimal"/>
	<field name="FECHA_INGRESO" class="java.sql.Timestamp"/>
	<field name="FECHA_TERMINA" class="java.sql.Timestamp"/>
	<field name="FECHA_RETIRO" class="java.sql.Timestamp"/>
	<field name="ID_CONCEP_NOMINA_AGRUP" class="java.math.BigDecimal"/>
	<field name="CODIGO_AGRUP" class="java.lang.String"/>
	<field name="DESCRIPCION_AGRUP" class="java.lang.String"/>
	<field name="VALOR" class="java.math.BigDecimal"/>
	<field name="TIPO_VALOR" class="java.lang.String"/>
	<field name="PARTE" class="java.lang.String"/>
	<field name="VALOR_BASE_AGRUP" class="java.math.BigDecimal"/>
	<field name="DIAS_LICNO" class="java.math.BigDecimal"/>
	<variable name="total_valor_base" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_BASE_AGRUP}]]></variableExpression>
	</variable>
	<group name="num_doc">
		<groupExpression><![CDATA[$F{NUM_DOC}]]></groupExpression>
		<groupHeader>
			<band height="10">
				<staticText>
					<reportElement mode="Opaque" x="292" y="0" width="100" height="10" forecolor="#000000" backcolor="#AED6FB"/>
					<box rightPadding="0">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.75"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="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[Total Anual]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="90" y="0" width="202" height="10" forecolor="#000000" backcolor="#AED6FB"/>
					<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]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="0" y="0" width="90" height="10" forecolor="#000000" backcolor="#AED6FB"/>
					<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]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="472" y="0" width="100" height="10" forecolor="#000000" backcolor="#AED6FB"/>
					<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 Base]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="392" y="0" width="80" height="10" forecolor="#000000" backcolor="#AED6FB"/>
					<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[]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="128">
				<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
					<reportElement mode="Opaque" x="472" y="0" width="100" height="12" forecolor="#000000" backcolor="#D2D8E0"/>
					<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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_valor_base}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="0" y="0" width="472" height="12" forecolor="#000000" backcolor="#D2D8E0"/>
					<box leftPadding="2" rightPadding="7">
						<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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Total Base]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Transparent" x="90" y="22" width="302" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
					<box>
						<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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Total Cesantias Consolidado]]></text>
				</staticText>
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement x="392" y="22" width="80" height="12"/>
					<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">
						<font size="7" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_LIQUIDADO}]]></textFieldExpression>
				</textField>
				<subreport>
					<reportElement stretchType="RelativeToBandHeight" x="142" y="66" width="250" height="62"/>
					<subreportParameter name="comando">
						<subreportParameterExpression><![CDATA[$P{comando}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:firmas1"]]></subreportExpression>
				</subreport>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<textField pattern="dd-MMM-yyyy   hh:mm aaa">
				<reportElement mode="Opaque" x="421" y="40" width="151" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="90" y="0" width="382" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema General de Nómina
Extracto Liquidación Definitiva de Cesantías]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="421" y="28" width="151" 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>
				<reportElement x="90" y="40" width="382" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Periodo: " + $P{nombre_periodo}]]></textFieldExpression>
			</textField>
			<image>
				<reportElement x="1" y="12" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
		</band>
	</title>
	<pageHeader>
		<band height="20" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="145" splitType="Stretch">
			<textField>
				<reportElement x="90" y="0" width="482" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_APELLIDO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="0" y="62" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Periodo Hasta]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="0" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Funcionario]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="12" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Identificación]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="26" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha Ingreso]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="74" width="90" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#A4CFF6">
					<printWhenExpression><![CDATA[$F{DIAS_NOV} > 0]]></printWhenExpression>
				</reportElement>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Ausencias no remuneradas]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="50" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Periodo Desde]]></text>
			</staticText>
			<textField>
				<reportElement x="90" y="12" width="482" height="12"/>
				<box leftPadding="2" rightPadding="0"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField pattern="MMMMM dd, yyyy">
				<reportElement x="90" y="26" width="482" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_INGRESO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="90" y="74" width="482" height="20" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[$F{DIAS_NOV} > 0]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO} +"-"+ $F{DESCRIPCION} + ", " + $F{FECHA_INI_NOVKA} + " a " + $F{FECHA_FIN_NOVKA}]]></textFieldExpression>
			</textField>
			<textField pattern="MMMMM dd, yyyy">
				<reportElement x="90" y="50" width="482" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_DESDE}]]></textFieldExpression>
			</textField>
			<textField pattern="MMMMM dd, yyyy">
				<reportElement x="90" y="62" width="482" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_HASTA}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="0" y="38" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha Retiro]]></text>
			</staticText>
			<textField pattern="MMMMM dd, yyyy">
				<reportElement x="90" y="38" width="482" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_RETIRO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="0" y="94" width="90" height="12" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Días Netos Vigencia]]></text>
			</staticText>
			<textField>
				<reportElement x="90" y="94" width="482" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[( ($F{NUM_DIAS} - $F{DIAS_NOV}) < 0
    ? 0
    : $F{NUM_DIAS} - $F{DIAS_NOV}
)]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="0" y="106" width="90" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Licencias No Remuneradas]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="90" y="106" width="482" height="20"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{DIAS_LICNO}]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement x="292" y="0" width="100" height="10"/>
				<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">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="0" width="90" height="10"/>
				<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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO_AGRUP}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="90" y="0" width="202" 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{DESCRIPCION_AGRUP}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="392" y="0" width="80" height="10"/>
				<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="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PARTE}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement x="472" y="0" width="100" height="10"/>
				<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">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_BASE_AGRUP}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="23" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="211" 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="301" 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="211" 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="572" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
