<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="inf_liquid_anticipo_ces" language="groovy" pageWidth="1500" pageHeight="612" orientation="Landscape" columnWidth="1460" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.0514816984441777"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="whereFuncionarioNumDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereFuncionarioTipoDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="id_periodo_filtro" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="comando" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="anho_mes_fin" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="anho_mes_ini" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="id_periodo_ini" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_periodo_fin" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select distinct

dep.coddepto || ' ' || mun.codmun_text as depmun,
dep.coddepto as coddep,
mun.codmun_text as codmun,
tab0.ID_CESANTIA,
tab0.ID_PERIODO,
tab0.ID_TIPO_DOC,
tab0.NUM_DOC,
tab0.ID_CONCEP_NOMINA,
tab0.VALOR_LIQUIDADO,
tab0.NUM_DIAS,
tab0.FECHA_INGRESO,
tab0.FECHA_TERMINA,
tab0.VALOR_BASE,
tab0.VALOR_CONSOLIDADO,
tab0.VALOR_APLICADO,
tab0.VALOR_AJUSTE,
tab0.CONSOLIDADO,
tipdoc.descripcion,
tipdoc.abreviacion,
ter.primer_nombre || ' ' || ter.segundo_nombre as nombre,
ter.primer_apellido,
ter.segundo_apellido,
(select distinct periodo.periodo from no_liquida_v periodo where periodo.id_periodo = tab0.id_periodo) AS PERIODO,
(select distinct periodo.tipper from no_liquida_v periodo where periodo.id_periodo = tab0.id_periodo) AS TIPPER,
per.id_anhos || lpad(per.id_meses,2,'0') as periodo_mes,
per.periodo,
nvl( nvl(concep.valor,liq.asignacion_basica) ,0) as asignacion_basica,

nov.doc_soporte,
nov.fecha_soporte,
nov.observaciones,
nov.valor_anticipo,

(select periodo.periodo from no_periodo_v periodo where periodo.id_periodo = $P{id_periodo_ini}) as periodo_ini,
(select periodo.periodo from no_periodo_v periodo where periodo.id_periodo = $P{id_periodo_fin}) as periodo_fin

from no_cesantia tab0

join tipo_documento  tipdoc
on tipdoc.id_tipo_doc = tab0.id_tipo_doc

join no_datos_funcionario_v ter
on ter.id_tipo_doc = tab0.id_tipo_doc
and ter.num_doc = tab0.num_doc

join no_periodo_v per
on tab0.id_periodo = per.id_periodo

left join no_liquida_v liq
on liq.id_tipo_doc = tab0.id_tipo_doc
and liq.num_doc = tab0.num_doc
and liq.id_periodo = tab0.id_periodo

left join (
  SELECT
   aut.*,
   ROW_NUMBER() OVER (
    partition by aut.num_doc
    ORDER BY aut.actual desc
   ) AS rn
  from no_estado_func aut
  where aut.periodo = $P{id_periodo_filtro}
)estfun
on estfun.id_tipo_doc = tab0.id_tipo_doc
and estfun.num_doc = tab0.num_doc
and estfun.periodo = tab0.id_periodo
and estfun.rn = 1

left join no_dp_v dp
on estfun.id_dp = dp.id_dp

left join centro_operacion cenop
on estfun.id_cen_op = cenop.id_cen_op
and 1 = cenop.id_cia

left join departamento dep
on dep.id_depto = cenop.id_depto

left join municipios mun
on mun.codmun = cenop.codmun

left join(

    select
    num_doc,
    periodo as id_periodo,
    valor
    from(
        SELECT tab.*, ROW_NUMBER() OVER ( PARTITION BY tab.num_doc ORDER BY TAB.FECHA_HASTA desc, TAB.id_periodo_ajuste desc ) as rn
        from no_concepto_periodo tab where periodo = $P{id_periodo_filtro} and id_concep_nomina = 1
    ) where rn = 1

)concep
on tab0.id_periodo = concep.id_periodo
and tab0.num_doc = concep.num_doc

left join NO_NOVEDAD_ANTICIPO_CES nov
on nov.id_periodo = tab0.id_periodo
and nov.id_tipo_doc = tab0.id_tipo_doc
and nov.num_doc = tab0.num_doc
and nov.consolidado = tab0.consolidado

where
per.anho_mes between $P{anho_mes_ini} and $P{anho_mes_fin}
$P!{whereFuncionarioNumDoc} $P!{whereFuncionarioTipoDoc}
and tab0.consolidado = 2

order by
per.anho_mes,
tab0.id_periodo,
tab0.id_tipo_doc,
tab0.num_doc]]>
	</queryString>
	<field name="DEPMUN" class="java.lang.String"/>
	<field name="CODDEP" class="java.lang.String"/>
	<field name="CODMUN" class="java.lang.String"/>
	<field name="ID_CESANTIA" class="java.math.BigDecimal"/>
	<field name="ID_PERIODO" 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="VALOR_LIQUIDADO" class="java.math.BigDecimal"/>
	<field name="NUM_DIAS" class="java.math.BigDecimal"/>
	<field name="FECHA_INGRESO" class="java.sql.Timestamp"/>
	<field name="FECHA_TERMINA" class="java.sql.Timestamp"/>
	<field name="VALOR_BASE" class="java.math.BigDecimal"/>
	<field name="VALOR_CONSOLIDADO" class="java.math.BigDecimal"/>
	<field name="VALOR_APLICADO" class="java.math.BigDecimal"/>
	<field name="VALOR_AJUSTE" class="java.math.BigDecimal"/>
	<field name="CONSOLIDADO" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="ABREVIACION" 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="PERIODO" class="java.lang.String"/>
	<field name="TIPPER" class="java.lang.String"/>
	<field name="PERIODO_MES" class="java.lang.String"/>
	<field name="ASIGNACION_BASICA" class="java.math.BigDecimal"/>
	<field name="DOC_SOPORTE" class="java.lang.String"/>
	<field name="FECHA_SOPORTE" class="java.sql.Timestamp"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="VALOR_ANTICIPO" class="java.math.BigDecimal"/>
	<field name="PERIODO_INI" class="java.lang.String"/>
	<field name="PERIODO_FIN" class="java.lang.String"/>
	<variable name="total_valor_liq" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_LIQUIDADO}]]></variableExpression>
	</variable>
	<variable name="total_func" class="java.math.BigDecimal" calculation="Count">
		<variableExpression><![CDATA[$F{NUM_DOC}]]></variableExpression>
	</variable>
	<variable name="total_valor_apli" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_APLICADO}]]></variableExpression>
	</variable>
	<variable name="total_valor_ajus" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_AJUSTE}]]></variableExpression>
	</variable>
	<variable name="total_valor_consol" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_CONSOLIDADO}]]></variableExpression>
	</variable>
	<variable name="total_valor_anticipo" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_ANTICIPO}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<staticText>
				<reportElement x="225" y="0" width="483" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema General de Nómina
Informe Anticipo Cesantias]]></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="708" y="28" width="180" 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="708" y="40" width="180" 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="225" y="40" width="483" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Desde " + $F{PERIODO_INI} + " hasta " + $F{PERIODO_FIN}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="20" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="16" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="140" y="0" width="60" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Documento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="200" y="0" width="25" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[TD]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="225" y="0" width="73" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Primer Apellido]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="298" y="0" width="80" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Segundo Apellido]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="378" y="0" width="160" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Nombre]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="818" y="0" width="70" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Vlr Consolidado]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="763" y="0" width="55" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha Corte]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="708" y="0" width="55" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha Inicio]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="588" y="0" width="70" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Salario]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="538" y="0" width="50" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Dep Mun]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="888" y="0" width="74" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Vlr Aplicado]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="658" y="0" width="50" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Días]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="962" y="0" width="80" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Doc. Soporte]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1042" y="0" width="70" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha Soporte]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1112" y="0" width="278" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Observaciones]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1390" y="0" width="70" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Vlr Anticipo]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="140" height="16" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Periodo]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="140" y="0" width="60" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="200" y="0" width="25" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ABREVIACION}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="225" y="0" width="73" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PRIMER_APELLIDO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="298" y="0" width="80" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SEGUNDO_APELLIDO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="378" y="0" width="160" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="818" y="0" width="70" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_CONSOLIDADO}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="708" y="0" width="55" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_INGRESO}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="763" y="0" width="55" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_TERMINA}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="588" y="0" width="70" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ASIGNACION_BASICA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="538" y="0" width="50" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DEPMUN}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="888" y="0" width="74" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_APLICADO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="658" y="0" width="50" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DIAS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="962" y="0" width="80" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DOC_SOPORTE}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1042" y="0" width="70" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{FECHA_SOPORTE}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1112" y="0" width="278" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{OBSERVACIONES}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="1390" y="0" width="70" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_ANTICIPO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="140" height="20"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PERIODO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="12" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="449" 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="539" 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="449" 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="93" splitType="Stretch">
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement mode="Opaque" x="818" y="0" width="70" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" 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_consol}]]></textFieldExpression>
			</textField>
			<textField pattern="###0">
				<reportElement mode="Opaque" x="225" y="0" width="483" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box leftPadding="3" rightPadding="0">
					<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>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_func}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="225" height="12" backcolor="#BCBABA"/>
				<box leftPadding="3">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Total Funcionarios]]></text>
			</staticText>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement mode="Opaque" x="888" y="0" width="74" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" 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_apli}]]></textFieldExpression>
			</textField>
			<subreport>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="31" width="350" 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>
			<subreport>
				<reportElement stretchType="RelativeToBandHeight" x="468" y="31" width="350" height="62"/>
				<subreportParameter name="comando">
					<subreportParameterExpression><![CDATA[$P{comando}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:firmas2"]]></subreportExpression>
			</subreport>
			<textField pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="708" y="0" width="110" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" 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[]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="962" y="0" width="428" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" 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[]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement mode="Opaque" x="1390" y="0" width="70" height="12" forecolor="#000000" backcolor="#BCBABA"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" 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_anticipo}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="818" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
