<?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="cumplido" language="groovy" pageWidth="612" pageHeight="792" whenNoDataType="NoDataSection" columnWidth="512" leftMargin="50" rightMargin="50" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.4641000000000028"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="292"/>
	<parameter name="id_pago_egreso" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT tab3.NOMBRE,tab3.NUM_DOC,tab4.NO_RESOLUCION,to_char(tab4.fecha_resolucion,'dd/mm/yyyy')FECHA_RESOLUCION,
tab6.MUNICIPIO_FIN,tab5.OBJETO,TO_CHAR(tab7.FECHA_SALIDA,'DD/MM/YYYY') FECHA_SALIDA,TO_CHAR(tab7.FECHA_REGRESO,'DD/MM/YYYY')FECHA_REGRESO
,'$ ' || TO_CHAR(tab2.VALOR, 'FM9,999,999,999') VALOR,
LPAD(TO_CHAR(sysdate,'dd'),2,'0') as DIA_actual,
lower(Numero_a_Texto ( to_char(sysdate,'dd'), 2, 'ESP' )) as dia_ACTUAL_letra,
trim(INITCAP(TO_CHAR(sysdate,'MONTH','nls_date_language=spanish'))) as MES_actual,
TO_CHAR(sysdate,'yyyy') as anho_actual,
NUMERO_A_TEXTO(tab2.valor) VALOR_LETRAS,
tab8.descripcion AS DEPENDENCIA


FROM com_cumplido tab0
join com_pago_egreso tab1 ON tab0.id_pago_egreso = tab1.id_pago_egreso and tab1.estado = 1
join COM_CUENTA_V tab2 ON tab2.id_cuenta = tab1.id_cuenta and tab2.estado = 1
join com_tercero tab3 ON tab3.id_tercero = tab2.id_tercero
join com_resolucion tab4 ON tab4.id_resolucion = tab2.id_resolucion
join com_comision tab5 ON tab4.id_comision = tab5.id_comision
join com_destino_v tab6 ON tab5.id_comision = tab6.id_comision and tab6.id_tercero = tab3.id_tercero
join com_comisionado tab7 ON tab7.id_comision = tab5.id_comision and tab7.id_tercero = tab3.id_tercero
join AREA tab8 ON tab8.id_area = tab5.id_area


where tab0.id_pago_egreso = $P{id_pago_egreso}]]>
	</queryString>
	<field name="NOMBRE" class="java.lang.String"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="NO_RESOLUCION" class="java.math.BigDecimal"/>
	<field name="FECHA_RESOLUCION" class="java.lang.String"/>
	<field name="MUNICIPIO_FIN" class="java.lang.String"/>
	<field name="OBJETO" class="java.lang.String"/>
	<field name="FECHA_SALIDA" class="java.lang.String"/>
	<field name="FECHA_REGRESO" class="java.lang.String"/>
	<field name="VALOR" class="java.lang.String"/>
	<field name="DIA_ACTUAL" class="java.lang.String"/>
	<field name="DIA_ACTUAL_LETRA" class="java.lang.String"/>
	<field name="MES_ACTUAL" class="java.lang.String"/>
	<field name="ANHO_ACTUAL" class="java.lang.String"/>
	<field name="VALOR_LETRAS" class="java.lang.String"/>
	<field name="DEPENDENCIA" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="52" splitType="Stretch">
			<rectangle>
				<reportElement x="0" y="0" width="142" height="52"/>
			</rectangle>
			<image>
				<reportElement x="1" y="6" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement x="142" y="0" width="219" height="52"/>
				<box>
					<pen lineWidth="1.5"/>
					<topPen lineWidth="1.5"/>
					<leftPen lineWidth="1.5"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="1.5"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CUMPLIDO DE COMISIÓN]]></text>
			</staticText>
			<staticText>
				<reportElement x="361" y="0" width="151" height="13"/>
				<box>
					<pen lineWidth="1.5"/>
					<topPen lineWidth="1.5"/>
					<leftPen lineWidth="1.5"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="1.5"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="4" isBold="true"/>
				</textElement>
				<text><![CDATA[CÓDIGO A102PR08F03]]></text>
			</staticText>
			<staticText>
				<reportElement x="361" y="13" width="151" height="11"/>
				<box>
					<pen lineWidth="1.5"/>
					<topPen lineWidth="1.5"/>
					<leftPen lineWidth="1.5"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="1.5"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="4" isBold="true"/>
				</textElement>
				<text><![CDATA[Versión 04]]></text>
			</staticText>
			<textField>
				<reportElement mode="Opaque" x="361" y="38" width="92" height="14" forecolor="#575757" backcolor="#FFFFFF"/>
				<box>
					<pen lineWidth="1.5"/>
					<topPen lineWidth="1.5"/>
					<leftPen lineWidth="1.5"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="4" isBold="true" 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="453" y="38" width="59" height="14" forecolor="#575757" backcolor="#FFFFFF"/>
				<box>
					<pen lineWidth="1.5"/>
					<topPen lineWidth="1.5"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="1.5"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="4" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="361" y="24" width="151" height="14"/>
				<box>
					<pen lineWidth="1.5"/>
					<topPen lineWidth="1.5"/>
					<leftPen lineWidth="1.5"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="1.5"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="4" isBold="true"/>
				</textElement>
				<text><![CDATA[Fecha: 2014-07-21]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="593" splitType="Stretch">
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="0" y="128" width="512" height="68" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="4" leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Justified" verticalAlignment="Top" rotation="None" markup="none">
					<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Yo, "+ $F{NOMBRE} +" con cédula de ciudadanía No. "+ $F{NUM_DOC}+", certifico haber dado cumplimiento a la comisión o actividad desarrollada autorizada mediante Resolución No "+$F{NO_RESOLUCION}+" ("+ $F{FECHA_RESOLUCION}+") para mi desplazamiento a la ciudad de "+$F{MUNICIPIO_FIN}+"."]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="0" y="288" width="512" height="51" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="4" leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Justified" verticalAlignment="Top" rotation="None" markup="none">
					<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Igualmente, doy fe que el presupuesto autorizado a mi nombre por valor de "+$F{VALOR_LETRAS}+"("+$F{VALOR}+") fue ejecutado en su totalidad."]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="0" y="354" width="512" height="46" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="4" leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Justified" verticalAlignment="Top" rotation="None" markup="none">
					<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Hago esta declaración a los "+$F{DIA_ACTUAL_LETRA}+"("+$F{DIA_ACTUAL}+") días del mes de "+$F{MES_ACTUAL}+" del año "+$F{ANHO_ACTUAL}+"."]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="0" y="473" width="512" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Top" rotation="None" markup="none">
					<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[En constancia firman,]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="527" width="211" height="20"/>
				<box>
					<topPen lineWidth="1.5"/>
				</box>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="547" width="211" height="46"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DEPENDENCIA}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="1" y="21" width="511" height="58"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[CUMPLIDO DE COMISIÓN]]></text>
			</staticText>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="0" y="227" width="512" height="46" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="4" leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Justified" verticalAlignment="Top" rotation="None" markup="none">
					<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Con el objeto de: "+$F{OBJETO}+" desde el "+$F{FECHA_SALIDA}+" hasta el "+$F{FECHA_REGRESO}+"."]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="12" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="25" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="182" 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="272" y="12" width="60" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<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="182" y="0" width="150" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Control de Comisiones]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="14" splitType="Stretch"/>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="512" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
