<?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="formato_programacion_comision_contrato" language="groovy" pageWidth="1560" pageHeight="300" orientation="Landscape" columnWidth="1560" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.771561000000011"/>
	<property name="ireport.x" value="1347"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/comisiones/formato_programacion_comision_conexo"/>
	<property name="ireport.jasperserver.url" value="http://3.22.202.200:8080/jasperserver/services/repository"/>
	<parameter name="id_comision" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT
comi.id_comision,
comi.nitocc,
to_char(comi.id_transporte) as id_transporte,
to_char(nvl(comi.cargo,'')) as cargo,
to_char(comi.fecha_salida,'yyyy-mm-dd') as fecha_salida,
comi.dias as dias,
to_char(comi.codreg) as codreg,
to_char(comi.total_comision) as total_comision,
to_char(comi.fecha_regreso,'yyyy-mm-dd') as fecha_regreso,
comi.sueldo as sueldo,
comi.vigencia,

to_char(ter.razsoc) as razsoc,
to_char(ter.tipter) as tipter,
to_char(nvl(ter.cargo,'')) as cargo_text,
case when ter.tipter = 2 then 'Funcionario' else 'Contratista' end as tipo_tercero,
to_char(ter.estado) as estado_ter,
to_char(ter.email) as email,
ter.sueldo as sueldo_ter,
to_char(ter.cargo) as cargo_ter,
to_char(ter.cargo_texto) as cargo_texto_ter,

to_char(reg.desreg) as desreg,
to_Char(reg.ciuced) as ciuced,

to_char(ach.banco) as banco,
to_char(ach.tipo_cuenta) as tipo_cuenta,
to_char(ach.tipo_cuenta_texto) as tipo_cuenta_texto,
to_char(ach.num_cuenta) as num_cuenta,


to_char(obj.codobj) as codobj,
nvl(obj.valor,0) as valor,
nvl(obj.valor_gasto,0) as valor_gasto,
nvl(obj.viaticos,0) as viaticos,
nvl(obj.acumulado_gastos,0) as acumulado_gastos,
nvl(obj.taxis,0) as taxis,
nvl(obj.tarifa,0) as tarifa,

nvl(td.total,0) as total_taxi,
nvl(td.num_viajes,0) as cantidad_taxis,

UPPER( nvl(car.cargo,'Contratista') ) as cargo_tipo,

case
when rub1.id_clase_presup = 9 then REPLACE( rub1.rubro ,' ','-') || ' - ' ||rub1.descripcion
when rub1.id_clase_presup = 8 and rub1.id_tipo_comisionado = 2 then REPLACE(rub1.tipo_gasto ||'-'|| rub1.codigo_rubro_linea,' ','-') || ' - ' ||rub1.descripcion
when rub2.id_clase_presup = 8 and rub2.id_tipo_comisionado = 2 then REPLACE(rub2.tipo_gasto ||'-'|| rub2.codigo_rubro_linea,' ','-') || ' - ' ||rub2.descripcion
else '' end as rubro_via,

case
when rub1.id_clase_presup = 9 then rub1.rubro || ' - ' ||rub1.descripcion
when rub1.id_clase_presup = 8 then rubvia.rubro || ' - ' ||rubvia.descripcion
end as rubro_gas

FROM comisionados_contrato comi

join comisiones cab
on cab.id = comi.id_comision
and cab.vigencia = comi.vigencia

left join pr_rubro_presup_v rub1
on rub1.id_rubro = cab.id_rubro

left join pr_rubro_presup_v rub2
on rub2.id_rubro = cab.id_rubro_extra

left join(
    SELECT
    obj.id_comision,
    obj.vigencia,
    max(rub.tipo_gasto ||'-'|| rub.codigo_rubro_linea) as rubro,
    max(rub.descripcion) as descripcion

    FROM comisionados_objs obj

    left join pr_rubro_presup_v rub
    on rub.id_rubro = obj.id_rubro

    where
    rub.viaje = 1

    group by
    obj.id_comision,
    obj.vigencia
)rubvia
on rubvia.id_comision = comi.id_comision
and rubvia.vigencia = comi.vigencia

left join terceros ter
on ter.nitocc = comi.nitocc

left join regionales reg
on reg.codreg = comi.codreg

left join (
    SELECT
    nitocc,
    id_comision,
    vigencia,
    sum(num_viajes) as num_viajes,
    sum(total) as total
    FROM tarifas_destino
    group by
    nitocc,
    id_comision,
    vigencia
)td
on td.vigencia = comi.vigencia
and td.id_comision = comi.id_comision
and td.nitocc = comi.nitocc


left join(

    select

    id_comision,
    vigencia,
    nitocc,

    listagg(codobj, ',') within group (order by codobj) as codobj,

    sum(valor) as valor,
    sum(case when codobj = '06' then valor - viaticos else 0 end) as valor_gasto,
    sum(viaticos) as viaticos,
    sum(case when codobj != '06' then valor - viaticos else 0 end) as acumulado_gastos,
    sum(taxis) as taxis,
    max(tarifa) as tarifa

    from comisionados_objs

    where
    estado = 1

    group by
    id_comision,
    vigencia,
    nitocc

)obj
on obj.vigencia = comi.vigencia
and obj.id_comision = comi.id_comision
and obj.nitocc = comi.nitocc

left join(

    SELECT
    ach.id_tercero as ter_ach,
    ter.num_doc,
    bn.descripcion as banco,
    case when reg.tipo_cuenta = 1 then 'Corriente' else 'Ahorros' end as tipo_cuenta_texto,
    reg.*,
    ROW_NUMBER() OVER (
        partition by ter.num_doc
        ORDER BY ter.num_doc, reg.id_reg_ach_distri desc
    ) AS rn

    FROM ts_reg_ach_distri reg

    join ts_reg_ach ach
    on ach.id_reg_ach = reg.id_reg_ach

    left join ts_bn bn
    on bn.id_bn = reg.id_bn

    left join interceros ter
    on ter.id_mae_ter = ach.id_tercero

    ORDER BY ter.num_doc


)ach
on ach.rn = 1
and ach.num_doc = comi.nitocc

left join(
    SELECT
    est.num_doc,
    est.id_anhos,
    est.id_meses,
    dp.denominacion_comp as cargo

    FROM no_estado_func_v est

    join no_periodo per
    on per.id_periodo = est.periodo

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

    where
    per.id_tipo_periodo = 0

)car
on car.num_doc = comi.nitocc
and car.id_anhos = comi.vigencia
and car.id_meses = EXTRACT(MONTH FROM cab.fecha)

where
comi.id_comision = $P{id_comision}
and comi.vigencia = $P{vigencia}

order by
obj.nitocc]]>
	</queryString>
	<field name="ID_COMISION" class="java.math.BigDecimal"/>
	<field name="NITOCC" class="java.math.BigDecimal"/>
	<field name="ID_TRANSPORTE" class="java.lang.String"/>
	<field name="CARGO" class="java.lang.String"/>
	<field name="FECHA_SALIDA" class="java.lang.String"/>
	<field name="DIAS" class="java.math.BigDecimal"/>
	<field name="CODREG" class="java.lang.String"/>
	<field name="TOTAL_COMISION" class="java.lang.String"/>
	<field name="FECHA_REGRESO" class="java.lang.String"/>
	<field name="SUELDO" class="java.math.BigDecimal"/>
	<field name="VIGENCIA" class="java.math.BigDecimal"/>
	<field name="RAZSOC" class="java.lang.String"/>
	<field name="TIPTER" class="java.lang.String"/>
	<field name="CARGO_TEXT" class="java.lang.String"/>
	<field name="TIPO_TERCERO" class="java.lang.String"/>
	<field name="ESTADO_TER" class="java.lang.String"/>
	<field name="EMAIL" class="java.lang.String"/>
	<field name="SUELDO_TER" class="java.math.BigDecimal"/>
	<field name="CARGO_TER" class="java.lang.String"/>
	<field name="CARGO_TEXTO_TER" class="java.lang.String"/>
	<field name="DESREG" class="java.lang.String"/>
	<field name="CIUCED" class="java.lang.String"/>
	<field name="BANCO" class="java.lang.String"/>
	<field name="TIPO_CUENTA" class="java.lang.String"/>
	<field name="TIPO_CUENTA_TEXTO" class="java.lang.String"/>
	<field name="NUM_CUENTA" class="java.lang.String"/>
	<field name="CODOBJ" class="java.lang.String"/>
	<field name="VALOR" class="java.math.BigDecimal"/>
	<field name="VALOR_GASTO" class="java.math.BigDecimal"/>
	<field name="VIATICOS" class="java.math.BigDecimal"/>
	<field name="ACUMULADO_GASTOS" class="java.math.BigDecimal"/>
	<field name="TAXIS" class="java.math.BigDecimal"/>
	<field name="TARIFA" class="java.math.BigDecimal"/>
	<field name="TOTAL_TAXI" class="java.math.BigDecimal"/>
	<field name="CANTIDAD_TAXIS" class="java.math.BigDecimal"/>
	<field name="CARGO_TIPO" class="java.lang.String"/>
	<field name="RUBRO_VIA" class="java.lang.String"/>
	<field name="RUBRO_GAS" class="java.lang.String"/>
	<variable name="variable1" class="java.math.BigDecimal">
		<variableExpression><![CDATA[$F{VALOR}-$F{VIATICOS}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="total" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<pageHeader>
		<band height="50">
			<staticText>
				<reportElement mode="Opaque" x="0" y="20" width="530" height="30" backcolor="#C6E0B4"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[INFORMACIÓN BÁSICA DEL COMISIONADO - CONTRATISTA]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="530" y="20" width="200" height="30" backcolor="#C6E0B4"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[RUBRO PRESUPUESTAL VIATICOS]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="730" y="20" width="353" height="30" backcolor="#E6E6E6"/>
				<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 textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RUBRO_VIA}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="1083" y="20" width="210" height="30" backcolor="#C6E0B4"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[RUBRO PRESUPUESTAL GASTOS DE VIAJE]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="1293" y="20" width="267" height="30" backcolor="#E6E6E6"/>
				<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 textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RUBRO_GAS}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="30" splitType="Prevent">
			<staticText>
				<reportElement mode="Transparent" x="60" y="10" width="100" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[NOMBRE COMISIONADO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="230" y="10" width="60" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[SUELDO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="290" y="10" width="100" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CARGO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="390" y="10" width="70" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[VALOR VIÁTICO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="530" y="10" width="100" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CUENTA BANCARIA]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="460" y="10" width="70" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[SEDE]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="630" y="10" width="50" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[FECHA INICIAL]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="680" y="10" width="50" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[FECHA FINAL]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="890" y="10" width="50" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[No. DÍAS]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="730" y="10" width="80" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CIUDAD O MUNICIPIO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="940" y="10" width="53" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL DÍAS]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="993" y="10" width="90" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL VIÁTICOS]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="10" width="60" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CEDULA No.]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="160" y="10" width="70" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TIPO DE COMISIONADO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="810" y="10" width="80" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[DEPARTAMENTO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="1083" y="10" width="70" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TAXIS]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="1153" y="10" width="70" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CANTIDAD]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="1223" y="10" width="70" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL TAXI]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="1293" y="10" width="87" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[GASTOS DE TRANSPORTE]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="1380" y="10" width="100" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL GASTOS DE VIAJE]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="1480" y="10" width="80" height="20" backcolor="#FEFEFE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL COMISION]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Prevent">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="60" y="0" width="100" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZSOC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="$ #,##0;(-#,##0)" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="230" y="0" width="60" height="20" backcolor="#FEFEFE"/>
				<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="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{SUELDO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="290" y="0" width="100" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CARGO_TIPO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="$ #,##0;(-#,##0)" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="390" y="0" width="70" height="20" backcolor="#FEFEFE"/>
				<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="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{TARIFA}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="460" y="0" width="70" height="20" backcolor="#E6E6E6"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CIUCED}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="530" y="0" width="100" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[( $F{NUM_CUENTA}.length() > 0
    ? $F{NUM_CUENTA} + "\n" + $F{BANCO}
    : null
)]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="940" y="0" width="53" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{DIAS}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="993" y="0" width="90" height="20" backcolor="#FEFEFE"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VIATICOS}]]></textFieldExpression>
			</textField>
			<subreport>
				<reportElement stretchType="RelativeToTallestObject" x="630" y="0" width="310" height="20"/>
				<subreportParameter name="id_comision">
					<subreportParameterExpression><![CDATA[$F{ID_COMISION}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="nitocc">
					<subreportParameterExpression><![CDATA[$F{NITOCC}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="vigencia">
					<subreportParameterExpression><![CDATA[$F{VIGENCIA}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:formato_programacion_comision_destinos"]]></subreportExpression>
			</subreport>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="60" height="20" backcolor="#E6E6E6"/>
				<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="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NITOCC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="160" y="0" width="70" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_TERCERO}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="1083" y="0" width="70" height="20" backcolor="#E6E6E6"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{TOTAL_TAXI}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="1293" y="0" width="87" height="20" backcolor="#E6E6E6"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{variable1} - $F{TOTAL_TAXI}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="1380" y="0" width="100" height="20" backcolor="#FEFEFE"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{variable1}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="1480" y="0" width="80" height="20" backcolor="#FEFEFE"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="1153" y="0" width="70" height="20" backcolor="#E6E6E6"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{CANTIDAD_TAXIS}]]></textFieldExpression>
			</textField>
			<textField pattern="$ #,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="1223" y="0" width="70" height="20" backcolor="#FEFEFE"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{TOTAL_TAXI}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="40">
			<staticText>
				<reportElement mode="Opaque" x="1270" y="15" width="210" height="25" backcolor="#BED8AC"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL SOLICITUD CONTRATISTA]]></text>
			</staticText>
			<textField pattern="$ #,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="1480" y="15" width="80" height="25" backcolor="#BED8AC"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="40">
			<textField pattern="$ #,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Opaque" x="1480" y="15" width="80" height="25" backcolor="#BED8AC"/>
				<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="Center" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="1270" y="15" width="210" height="25" backcolor="#BED8AC"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL SOLICITUD CONTRATISTA]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
