<?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_prenomina_novedades" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.366026910730141"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/nomina/inf_prenomina_novedades"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="comando" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_periodo_filtro" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTercero" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCenOp" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="nombre_periodo" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<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" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="ordenBy" class="java.lang.String">
		<defaultValueExpression><![CDATA["nombre_apellido"]]></defaultValueExpression>
	</parameter>
	<parameter name="whereComponenteEscala" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereArea" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="ordenBy_1" class="java.lang.String">
		<defaultValueExpression><![CDATA["nombre_apellido"]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
case when $P{ordenBy} = 'num_doc' then 'Por numero de documento' else 'Por Ordén Alfabetico' end as presentacion,

tab0.id_tipo_doc,
tab0.num_doc,
tab0.nombre_completo,
tab0.nombre_apellido,
tab0.componente || ' - No.' || tab0.codigo as cargo,
tab0.id_ea,
tab0.id_comp_es,
tab0.area as dependencia,
nvl( tab0.valor_sal , tab0.asignacion_basica ) as asignacion_basica,
tab0.asignacion_basica as ab,
tab0.valor_sal as valor_sal,
nvl(tab0.devengados,0) as devengados,
nvl(tab0.deducidos,0) as deducidos,
nvl(tab0.devengados,0)-nvl(tab0.deducidos,0) as neto,
tab0.id_periodo,
tab0.banco,
tab0.cuenta,
tab0.id_cen_op,
nvl(tab0.centro,'Sin Especificar') as centro,
(select distinct periodo.periodo from no_periodo_v periodo where periodo.id_periodo = $P{id_periodo_filtro}) as periodo,
nvl(
  (
  select distinct max(concep.porcentaje) as porcentaje
  from no_concepto_periodo concep
  join no_param_concep param on param.id_concep_rete = concep.id_concep_nomina
  where concep.num_doc = tab0.num_doc and concep.periodo in (select no_periodo_v.id_periodo from no_periodo_v
      where no_periodo_v.id_periodo = $P{id_periodo_filtro})
  ),
  (
  select distinct max(concep.porcentaje) as porcentaje
  from no_concepto_periodo concep
  join no_param_concep param on param.id_concep_rete = concep.id_concep_nomina
  where concep.num_doc = tab0.num_doc and concep.periodo in (select no_periodo_v.id_periodo from no_periodo_v
      where no_periodo_v.id_anhos = (select id_anhos from no_periodo where id_periodo = $P{id_periodo_filtro}) and  no_periodo_v.id_meses = (select id_meses from no_periodo where id_periodo = $P{id_periodo_filtro}))
  )
)as retefuente,

tab0.fecha_ingreso,
tab0.fecha_termina,
tab0.fecha_bonifica,
tab0.id_tipo_proced_rete,
tab0.tipo_proced_rete

from(

    select
    sal.valor as valor_sal,
    func.id_tipo_doc,
    func.num_doc,
    datos.nombre_completo,
    datos.nombre_apellido,
    cargo.componente,
    cargo.id_ea,
    cargo.id_comp_es,
    cargo.codigo,
    nvl( area.descripcion, cargo.area) as area,
    cargo.asignacion_basica,
    deven.valor as devengados,
    deduc.valor as deducidos,
    case when deven.id_periodo is not null then deven.id_periodo else deduc.id_periodo end as id_periodo,
    banco.descripcion as banco,
    pago.num_cuenta as cuenta,
    nvl( func.id_cen_op ,cargo.id_cen_op) as id_cen_op,
    nvl( cenop.nom_cen_op ,cargo.centro) as centro,
    nombra.fecha_ingreso,
    nombra.fecha_termina,
    boni.fecha_bonifica,
    novpro.id_tipo_proced_rete,
    tippro.descripcion as tipo_proced_rete

    from no_estado_func_v func

    left join centro_operacion cenop on cenop.id_cen_op = func.id_cen_op
    left join area area on area.id_area = func.id_ea

    left join no_dp_v cargo on cargo.id_dp = func.id_dp
    left join no_datos_funcionario_v datos on datos.num_doc = func.num_doc and datos.id_tipo_doc = func.id_tipo_doc
    left join(

        select liquida.id_tipo_doc,liquida.num_doc,liquida.id_periodo,sum(liquida.valor_liquidado) as valor
        from no_liquida_nomina liquida
        left join no_concep_nomina concep on concep.id_concep_nomina = liquida.id_concep_nomina

        where concep.id_tipo_concepto = 1 and liquida.id_periodo = $P{id_periodo_filtro}
        and concep.pago_func = 1

        group by liquida.id_tipo_doc,liquida.num_doc,liquida.id_periodo

    ) deven on deven.id_tipo_doc = func.id_tipo_doc and deven.num_doc = func.num_doc and deven.id_periodo = func.periodo
    left join(

        select liquida.id_tipo_doc,liquida.num_doc,liquida.id_periodo,sum(liquida.valor_liquidado) as valor
        from no_liquida_nomina liquida
        left join no_concep_nomina concep on concep.id_concep_nomina = liquida.id_concep_nomina
        where concep.id_tipo_concepto  !=1 and liquida.id_periodo = $P{id_periodo_filtro}
        group by liquida.id_tipo_doc,liquida.num_doc,liquida.id_periodo

    ) deduc on deduc.id_tipo_doc = func.id_tipo_doc and deduc.num_doc = func.num_doc and deduc.id_periodo = func.periodo
    left join no_pago_func pago on pago.id_tipo_doc = func.id_tipo_doc and pago.num_doc = func.num_doc AND pago.estado = 1
    left join ts_bn banco on banco.id_bn = pago.id_bn

    left join (
      SELECT
       aut.*,
       ROW_NUMBER() OVER (
        partition by aut.num_doc
        ORDER BY aut.estado desc
       ) AS rn
      from no_nombramiento aut
    )nombra
    on nombra.id_tipo_doc = func.id_tipo_doc
    and nombra.num_doc = func.num_doc
    and nombra.rn = 1

    left join (
      SELECT
       aut.*,
       ROW_NUMBER() OVER (
        partition by aut.num_doc
        ORDER BY aut.estado desc
       ) AS rn
      from no_bonifica_servicios aut
    )boni
    on boni.id_tipo_doc = func.id_tipo_doc
    and boni.num_doc = func.num_doc
    and boni.rn = 1

    left join (
      SELECT
       aut.*,
       ROW_NUMBER() OVER (
        partition by aut.num_doc
        ORDER BY aut.estado desc, aut.id_novedad_proced_rete desc
       ) AS rn
      from no_novedad_proced_rete aut
    )novpro
    on novpro.id_tipo_doc = func.id_tipo_doc
    and novpro.num_doc = func.num_doc
    and novpro.rn = 1

    left join no_tipo_proced_rete tippro
    on tippro.id_tipo_proced_rete = novpro.id_tipo_proced_rete

    /* Se cambia salario por registro de concepto_periodo, para tener el que se pago en el periodo - 20150609, Se toma el periodo mensaul-20170622*/
    left join (
      SELECT
       aut.*,
       ROW_NUMBER() OVER (
        partition by aut.num_doc
        ORDER BY aut.fecha_hasta desc, aut.id_concepto_periodo desc
       ) AS rn
      from no_concepto_periodo aut
      where
      aut.periodo in (
          select id_periodo from no_periodo_v where id_tipo_periodo = 1 and anho_mes = (select anho_mes from no_periodo_v where id_periodo = $P{id_periodo_filtro})
      )
      and aut.id_concep_nomina = (select no_param_concep.id_concep_basica from no_param_concep where no_param_concep.id_param_concep = 1)
    )sal
    on sal.id_tipo_doc = func.id_tipo_doc
    and sal.num_doc = func.num_doc
    and sal.rn = 1

    where func.periodo = $P{id_periodo_filtro}


)tab0

where
1 = 1
and tab0.id_periodo is not null
$P!{whereFuncionarioNumDoc}
$P!{whereFuncionarioTipoDoc}
$P!{whereCenOp}
$P!{whereComponenteEscala}
$P!{whereArea}

order by
tab0.id_cen_op,
case when $P{ordenBy} = 'num_doc' then tab0.num_doc else tab0.nombre_apellido end,
tab0.num_doc]]>
	</queryString>
	<field name="PRESENTACION" class="java.lang.String"/>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="NOMBRE_COMPLETO" class="java.lang.String"/>
	<field name="NOMBRE_APELLIDO" class="java.lang.String"/>
	<field name="CARGO" class="java.lang.String"/>
	<field name="ID_EA" class="java.math.BigDecimal"/>
	<field name="ID_COMP_ES" class="java.math.BigDecimal"/>
	<field name="DEPENDENCIA" class="java.lang.String"/>
	<field name="ASIGNACION_BASICA" class="java.math.BigDecimal"/>
	<field name="AB" class="java.math.BigDecimal"/>
	<field name="VALOR_SAL" class="java.math.BigDecimal"/>
	<field name="DEVENGADOS" class="java.math.BigDecimal"/>
	<field name="DEDUCIDOS" class="java.math.BigDecimal"/>
	<field name="NETO" class="java.math.BigDecimal"/>
	<field name="ID_PERIODO" class="java.math.BigDecimal"/>
	<field name="BANCO" class="java.lang.String"/>
	<field name="CUENTA" class="java.lang.String"/>
	<field name="ID_CEN_OP" class="java.math.BigDecimal"/>
	<field name="CENTRO" class="java.lang.String"/>
	<field name="PERIODO" class="java.lang.String"/>
	<field name="RETEFUENTE" class="java.math.BigDecimal"/>
	<field name="FECHA_INGRESO" class="java.sql.Timestamp"/>
	<field name="FECHA_TERMINA" class="java.sql.Timestamp"/>
	<field name="FECHA_BONIFICA" class="java.sql.Timestamp"/>
	<field name="ID_TIPO_PROCED_RETE" class="java.math.BigDecimal"/>
	<field name="TIPO_PROCED_RETE" class="java.lang.String"/>
	<group name="CENTRO">
		<groupExpression><![CDATA[$F{CENTRO}]]></groupExpression>
		<groupHeader>
			<band height="21">
				<textField>
					<reportElement x="100" y="11" width="652" 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="8" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{CENTRO}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="0" y="11" width="100" height="10" forecolor="#000000" backcolor="#88C2F9"/>
					<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="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Centro de Operación]]></text>
				</staticText>
				<textField isBlankWhenNull="true">
					<reportElement x="0" y="0" width="752" height="11"/>
					<textElement verticalAlignment="Middle">
						<font size="6"/>
					</textElement>
				</textField>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="26"/>
		</groupFooter>
	</group>
	<group name="FUNCIONARIO">
		<groupExpression><![CDATA[$F{NUM_DOC}]]></groupExpression>
		<groupHeader>
			<band height="88">
				<textField>
					<reportElement x="100" y="42" width="300" height="10"/>
					<textElement verticalAlignment="Middle">
						<font size="7"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DEPENDENCIA}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Transparent" x="0" y="12" width="100" height="10" 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>
				<textField>
					<reportElement x="100" y="22" width="200" height="10"/>
					<textElement>
						<font size="7"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement x="100" y="32" width="200" height="10"/>
					<textElement>
						<font size="7"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{CARGO}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Transparent" x="0" y="22" width="100" height="10" 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="32" width="100" height="10" 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[Cargo]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Transparent" x="0" y="42" width="100" height="10" 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[Dependencia]]></text>
				</staticText>
				<textField>
					<reportElement x="100" y="12" width="200" height="10"/>
					<textElement verticalAlignment="Middle">
						<font size="7"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_APELLIDO}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Transparent" x="300" y="32" width="100" height="10" 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[Asignación Básica]]></text>
				</staticText>
				<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
					<reportElement mode="Transparent" x="400" y="32" width="152" height="10" forecolor="#000000" backcolor="#D2D8E0"/>
					<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[$F{ASIGNACION_BASICA}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Transparent" x="300" y="22" width="100" height="10" 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[Retefuente]]></text>
				</staticText>
				<subreport>
					<reportElement stretchType="RelativeToTallestObject" x="0" y="52" width="652" height="12" isRemoveLineWhenBlank="true"/>
					<subreportParameter name="num_doc">
						<subreportParameterExpression><![CDATA[$F{NUM_DOC}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="periodo">
						<subreportParameterExpression><![CDATA[$P{id_periodo_filtro}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:vacaciones.jrxml"]]></subreportExpression>
				</subreport>
				<subreport>
					<reportElement stretchType="RelativeToTallestObject" x="0" y="64" width="652" height="12" isRemoveLineWhenBlank="true"/>
					<subreportParameter name="num_doc">
						<subreportParameterExpression><![CDATA[$F{NUM_DOC}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="periodo">
						<subreportParameterExpression><![CDATA[$P{id_periodo_filtro}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:kardex.jrxml"]]></subreportExpression>
				</subreport>
				<subreport>
					<reportElement stretchType="RelativeToTallestObject" x="0" y="76" width="652" height="12" isRemoveLineWhenBlank="true"/>
					<subreportParameter name="num_doc">
						<subreportParameterExpression><![CDATA[$F{NUM_DOC}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="periodo">
						<subreportParameterExpression><![CDATA[$P{id_periodo_filtro}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:personal.jrxml"]]></subreportExpression>
				</subreport>
				<staticText>
					<reportElement mode="Transparent" x="552" y="32" width="100" height="10" 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 Bonificación]]></text>
				</staticText>
				<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
					<reportElement mode="Transparent" x="652" y="32" width="100" height="10" forecolor="#000000" backcolor="#D2D8E0"/>
					<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
						<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_BONIFICA}]]></textFieldExpression>
				</textField>
				<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
					<reportElement x="652" y="22" width="100" height="10"/>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="7" isBold="false"/>
					</textElement>
					<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_INGRESO}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Transparent" x="552" y="22" width="100" height="10" 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="302" y="12" width="100" height="10" 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[Tipo Procedimiento]]></text>
				</staticText>
				<textField isBlankWhenNull="true">
					<reportElement x="402" y="12" width="150" height="10"/>
					<textElement verticalAlignment="Middle">
						<font size="7"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_PROCED_RETE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement x="402" y="22" width="150" height="10"/>
					<textElement verticalAlignment="Middle">
						<font size="7"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[( $F{ID_TIPO_PROCED_RETE}.toString() == "2"
    ? $F{RETEFUENTE} + " % "
    : ""
)]]></textFieldExpression>
				</textField>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="32">
				<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
					<reportElement mode="Opaque" x="300" y="12" width="100" height="10" 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="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{NETO}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="400" y="12" width="352" height="10" forecolor="#000000" backcolor="#D2D8E0"/>
					<box leftPadding="2" 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="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="0" y="12" width="300" height="10" 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="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[NETO A PAGAR]]></text>
				</staticText>
				<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
					<reportElement mode="Opaque" x="652" 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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{DEDUCIDOS}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="400" y="0" width="252" 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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[TOTAL DEDUCIDOS]]></text>
				</staticText>
				<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
					<reportElement mode="Opaque" x="300" 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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{DEVENGADOS}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="0" y="0" width="300" 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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[TOTAL DEVENGADOS]]></text>
				</staticText>
				<textField>
					<reportElement mode="Opaque" x="0" y="22" width="752" height="10" forecolor="#000000" backcolor="#D2D8E0"/>
					<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="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA["CONSIGNAR EN SU CUENTA No. "+$F{CUENTA}+" DEL BANCO: "+$F{BANCO}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="80" splitType="Stretch">
			<staticText>
				<reportElement x="130" y="0" width="522" 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 de Prenómina con Novedades]]></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="652" y="28" width="100" 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="652" y="40" width="100" 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="130" y="40" width="522" 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="130" y="60" width="522" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PRESENTACION}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="12" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="35" splitType="Stretch">
			<subreport>
				<reportElement stretchType="RelativeToTallestObject" x="400" y="11" width="352" height="24"/>
				<subreportParameter name="num_doc">
					<subreportParameterExpression><![CDATA[$F{NUM_DOC}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="periodo">
					<subreportParameterExpression><![CDATA[$P{id_periodo_filtro}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:deducidos.jrxml"]]></subreportExpression>
			</subreport>
			<subreport>
				<reportElement stretchType="RelativeToTallestObject" x="0" y="11" width="400" height="24"/>
				<subreportParameter name="num_doc">
					<subreportParameterExpression><![CDATA[$F{NUM_DOC}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="periodo">
					<subreportParameterExpression><![CDATA[$P{id_periodo_filtro}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:devengados.jrxml"]]></subreportExpression>
			</subreport>
		</band>
	</detail>
	<columnFooter>
		<band height="32" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="299" 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="389" 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="299" 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="62" splitType="Stretch">
			<subreport>
				<reportElement stretchType="RelativeToBandHeight" x="52" y="0" width="350" height="62" isRemoveLineWhenBlank="true"/>
				<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="402" y="0" width="350" height="62" isRemoveLineWhenBlank="true"/>
				<subreportParameter name="comando">
					<subreportParameterExpression><![CDATA[$P{comando}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:firma2"]]></subreportExpression>
			</subreport>
		</band>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="752" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
