<?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="no_planilla_nom_siif" language="groovy" pageWidth="850" pageHeight="612" columnWidth="810" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.2722928551174548"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="48"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/nomina/no_planilla_nom_siif"/>
	<property name="ireport.jasperserver.url" value="http://3.22.202.200:8080/jasperserver/services/repository"/>
	<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="whereClasePlanta" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="desc_clase" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="wherePago" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="tag_rete" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[BigDecimal.valueOf(0)]]></defaultValueExpression>
	</parameter>
	<parameter name="entidad_cliente" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[BigDecimal.valueOf(0)]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCenOp" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="id_cen_op" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[BigDecimal.valueOf(0)]]></defaultValueExpression>
	</parameter>
	<parameter name="format" class="java.lang.String">
		<defaultValueExpression><![CDATA["PDF"]]></defaultValueExpression>
	</parameter>
	<parameter name="wherePlanta" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="salto_linea" class="java.lang.String">
		<defaultValueExpression><![CDATA["  "]]></defaultValueExpression>
	</parameter>
	<parameter name="id_agrup_rec" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[BigDecimal.valueOf(0)]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select

(select max(pr_agrup_rec.descripcion) as des from pr_agrup_rec where pr_agrup_rec.id = nvl($P{id_agrup_rec},0)) as nom_tipo_finan,

( select max(firma_inf.descripcion) as des from no_inf_firma firma_inf
left join no_firma firma ON firma.id_firma = firma_inf.id_firma
where firma_inf.comando = 'no_res_deven_dedu' ) as mensaje_fir,

' - '||(select max(abreviatura) from datos_compania where id = 1) as abreviatura,

(
    select distinct periodo.periodo
    from no_periodo_v periodo
    where periodo.id_periodo = $P{id_periodo_filtro}
) as periodo,

nvl( (
    select max(cenop.nom_cen_op)
    from centro_operacion cenop
    where
    1 = 1
    and cenop.id_cen_op = $P{id_cen_op}
), 'CONSOLIDADO') as cen_op

from dual]]>
	</queryString>
	<field name="NOM_TIPO_FINAN" class="java.lang.String"/>
	<field name="MENSAJE_FIR" class="java.lang.String"/>
	<field name="ABREVIATURA" class="java.lang.String"/>
	<field name="PERIODO" class="java.lang.String"/>
	<field name="CEN_OP" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="100" splitType="Stretch">
			<printWhenExpression><![CDATA[$P{format} != "PDF"]]></printWhenExpression>
			<staticText>
				<reportElement mode="Opaque" x="673" y="48" width="137" 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[Centro de Operación:]]></text>
			</staticText>
			<textField>
				<reportElement x="200" y="40" width="430" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PERIODO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="200" y="60" width="430" height="20" isRemoveLineWhenBlank="true"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{desc_clase}]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yyyy   hh:mm aaa">
				<reportElement x="673" y="28" width="137" 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 pattern="" isBlankWhenNull="true">
				<reportElement x="673" y="60" width="137" height="20"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CEN_OP}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="673" y="16" width="137" 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 isBlankWhenNull="true">
				<reportElement x="200" y="80" width="430" height="20" isRemoveLineWhenBlank="true"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[( $P{tag_rete} == 1
    ? "Funcionarios con Retefuente"
    : null
)]]></textFieldExpression>
			</textField>
			<image>
				<reportElement x="0" y="10" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<textField>
				<reportElement x="200" y="0" width="430" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Sistema General de Nómina"+$F{ABREVIATURA}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="200" y="20" width="430" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Resúmen Devengados y Deducidos - SIIF"]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="130" splitType="Stretch">
			<printWhenExpression><![CDATA[$P{format} == "PDF"]]></printWhenExpression>
			<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="673" y="16" width="137" 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="200" y="40" width="430" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PERIODO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="200" y="60" width="430" height="20" isRemoveLineWhenBlank="true"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{desc_clase}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="200" y="80" width="430" height="20" isRemoveLineWhenBlank="true"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[( $P{tag_rete} == 1
    ? "Funcionarios con Retefuente"
    : null
)]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement x="673" y="60" width="137" height="20"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CEN_OP}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="673" y="48" width="137" 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[Centro de Operación:]]></text>
			</staticText>
			<textField>
				<reportElement x="200" y="0" width="430" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Sistema General de Nómina"+$F{ABREVIATURA}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="200" y="20" width="430" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Resúmen Devengados y Deducidos - SIIF"]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yyyy   hh:mm aaa">
				<reportElement x="673" y="28" width="137" 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 isStretchWithOverflow="true">
				<reportElement x="0" y="100" width="810" height="30"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="27" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="0" y="0" width="810" height="20" isRemoveLineWhenBlank="true"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOM_TIPO_FINAN}]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="50" splitType="Stretch">
			<subreport>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="810" height="50"/>
				<subreportParameter name="id_periodo_filtro">
					<subreportParameterExpression><![CDATA[$P{id_periodo_filtro}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="comando">
					<subreportParameterExpression><![CDATA[$P{comando}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="desc_clase">
					<subreportParameterExpression><![CDATA[$P{desc_clase}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="wherePago">
					<subreportParameterExpression><![CDATA[$P{wherePago}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="wherePlanta">
					<subreportParameterExpression><![CDATA[$P{wherePlanta}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="whereClasePlanta">
					<subreportParameterExpression><![CDATA[$P{whereClasePlanta}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="id_agrup_rec">
					<subreportParameterExpression><![CDATA[$P{id_agrup_rec}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="format">
					<subreportParameterExpression><![CDATA[$P{format}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="whereCenOp">
					<subreportParameterExpression><![CDATA[$P{whereCenOp}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="tag_rete">
					<subreportParameterExpression><![CDATA[$P{tag_rete}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="id_cen_op">
					<subreportParameterExpression><![CDATA[$P{id_cen_op}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="entidad_cliente">
					<subreportParameterExpression><![CDATA[$P{entidad_cliente}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="salto_linea">
					<subreportParameterExpression><![CDATA[$P{salto_linea}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:no_planilla_nodet_siif"]]></subreportExpression>
			</subreport>
		</band>
		<band height="227" splitType="Prevent">
			<subreport>
				<reportElement stretchType="RelativeToBandHeight" x="22" y="40" width="250" height="177"/>
				<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="RelativeToTallestObject" x="301" y="40" width="250" height="177"/>
				<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>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement x="0" y="0" width="810" height="30" isRemoveLineWhenBlank="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MENSAJE_FIR}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="301" 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="391" 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="301" 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>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="810" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
