<?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="detalle_resolucion" language="groovy" pageWidth="572" pageHeight="555" orientation="Landscape" columnWidth="572" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.771561000000002"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/control_comisiones/resolucion_comis_id"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_comision" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="tipo_comisionado" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select tab0.*,
reg.abreviatura as abreviatura_regional,
tab2.sigla as abreviatura_area,
trans.abreviatura as abreviatura_transporte
from (
select
placom.nitocc as num_doc,
ter.razsoc,
ter.tipter as tipter_ter,
ter.descripcion as tipoter_text,

placom.nitocc,
placom.id_plan_comisiones,
placom.vigencia,
placom.id_transporte,
placom.sueldo,
placom.cargo,
placom.fecha_salida,
placom.dias,
placom.codreg,
placom.total_comision,
placom.estado,
placom.fecha_regreso,
placom.gastos_taxis,
placom.dias_manu,
placom.tipter,
placom.dias_tiempo,
placom.hora_salida,
placom.hora_regreso,
placom.hora_salida as hora_salida_sel,
placom.hora_regreso as hora_regreso_sel,
nvl(placom.liquidar_via,0) as liquidar_via,

obj.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(tarifa_tiquete,0) as tarifa_tiquete,
nvl(cant_dia_sal,0) as cant_dia_sal,
nvl(cant_dia_reg,0) as cant_dia_reg,
tarifa_con_tr,
tarifa_sin_tr,
case when obj.contratado > 0 then '1' else '0' end as contratado,

prog.ID_COMISIONES,
prog.VIGENCIA_COMISIONES,

case when prog.ID_COMISIONES is null then 0 else 1 end as programado

from COM_PLAN_COMISIONADOS_PLACOM placom

left join terceros_v ter
on ter.nitocc = placom.nitocc

left join(

    select
    nitocc,
    id_plan_comisiones,
    vigencia,

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

    sum(valor) as valor,
    sum(case when id_obj_gasto is not null and is_viatico = 1 then valor - viaticos when codobj = '06' then valor - viaticos else 0 end) as valor_gasto,
    sum(viaticos) as viaticos,
    sum(case when id_obj_gasto is not null and is_viatico = 1 then valor - viaticos when codobj != '06' then valor - viaticos else 0 end) as acumulado_gastos,
    sum(taxis) as taxis,
    max(tarifa) as tarifa,
    max(tarifa_tiquete) as tarifa_tiquete,
    max(cant_dia_sal) as cant_dia_sal,
    max(cant_dia_reg) as cant_dia_reg,
    case when contratado>0 then max(tarifa) else 0 end as tarifa_con_tr,
    case when contratado=0 then max(tarifa) else
    case when contratado>0 then max(tarifa_tiquete) else 0 end end as tarifa_sin_tr,
    contratado

    from (select tab1.* ,nvl(tab2.contratado,0) as contratado
from com_plan_comisionados_placom_v tab0
join com_plan_comisionados_objs_v tab1 on tab1.NUM_DOC=tab0.NUM_DOC and tab1.ID_PLAN_COMISIONES=tab0.ID_PLAN_COMISIONES and tab0.VIGENCIA = tab1.VIGENCIA
left join
(
select nitocc,id_plan_comisiones,vigencia,count(id_transporte) as contratado from com_plan_tarifas_destino_v  where tarifa_transporte = 2
group by nitocc,id_plan_comisiones,vigencia
)tab2 on tab1.NUM_DOC=tab2.nitocc and tab1.ID_PLAN_COMISIONES=tab2.ID_PLAN_COMISIONES and tab2.VIGENCIA = tab1.VIGENCIA)

    where
    estado = 1
    --and tarifa_tiquete>0 and tarifa_tiquete<>tarifa

    group by
    nitocc,
    id_plan_comisiones,
    vigencia,
    contratado

)obj
on obj.nitocc = placom.nitocc
and obj.id_plan_comisiones = placom.id_plan_comisiones
and obj.vigencia = placom.vigencia

left join (Select id_plan_comisiones,tab0.ID_COMISIONES,tab0.VIGENCIA_COMISIONES,tab0.VIGENCIA,NITOCC
from COM_PLAN_PROGRAM_COMIS_V tab0
left join
(select * from comisionados_planta
union
select * from comisionados_contrato
)tab1 on tab1.id_comision = tab0.id_comisiones and tab1.vigencia = tab0.vigencia_comisiones
where tab0.estado <> 0)prog
on prog.id_plan_comisiones = placom.id_plan_comisiones
and prog.vigencia = placom.vigencia and placom.nitocc = prog.nitocc
) tab0
left join transportes trans on trans.id=tab0.id_transporte
left join com_plan_comisiones_v tab2 on tab2.id_plan_comisiones = tab0.id_plan_comisiones and tab0.vigencia = tab2.vigencia
left join regionales reg on reg.codreg = tab0.codreg
join
(select * from
(select *
  from
(select
  d.id_comision,
  d.NITOCC,
  d.vigencia,
  1 as tipo
from COMISIONADOS_PLANTA d
where d.id_comision=$P{id_comision} and d.vigencia=$P{vigencia})tab0
group by id_comision,
  NITOCC,vigencia,tipo
  UNION
  select *
  from
(select
  d.id_comision,
  d.NITOCC,
  d.vigencia,
  2 as tipo
from COMISIONADOS_CONTRATO d
where d.id_comision=$P{id_comision} and d.vigencia=$P{vigencia})tab0
group by id_comision,
  NITOCC,vigencia,tipo)tab0
where tipo = $P{tipo_comisionado})tab1 on tab0.nitocc = tab1.nitocc and tab0.id_comisiones = tab1.id_comision and tab0.vigencia_comisiones = tab1.vigencia]]>
	</queryString>
	<field name="NUM_DOC" class="java.math.BigDecimal"/>
	<field name="RAZSOC" class="java.lang.String"/>
	<field name="TIPTER_TER" class="java.lang.String"/>
	<field name="TIPOTER_TEXT" class="java.lang.String"/>
	<field name="NITOCC" class="java.math.BigDecimal"/>
	<field name="ID_PLAN_COMISIONES" class="java.math.BigDecimal"/>
	<field name="VIGENCIA" class="java.math.BigDecimal"/>
	<field name="ID_TRANSPORTE" class="java.math.BigDecimal"/>
	<field name="SUELDO" class="java.math.BigDecimal"/>
	<field name="CARGO" class="java.math.BigDecimal"/>
	<field name="FECHA_SALIDA" class="java.sql.Timestamp"/>
	<field name="DIAS" class="java.math.BigDecimal"/>
	<field name="CODREG" class="java.lang.String"/>
	<field name="TOTAL_COMISION" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="FECHA_REGRESO" class="java.sql.Timestamp"/>
	<field name="GASTOS_TAXIS" class="java.math.BigDecimal"/>
	<field name="DIAS_MANU" class="java.math.BigDecimal"/>
	<field name="TIPTER" class="java.lang.String"/>
	<field name="DIAS_TIEMPO" class="java.math.BigDecimal"/>
	<field name="HORA_SALIDA" class="java.lang.String"/>
	<field name="HORA_REGRESO" class="java.lang.String"/>
	<field name="HORA_SALIDA_SEL" class="java.lang.String"/>
	<field name="HORA_REGRESO_SEL" class="java.lang.String"/>
	<field name="LIQUIDAR_VIA" class="java.math.BigDecimal"/>
	<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="TARIFA_TIQUETE" class="java.math.BigDecimal"/>
	<field name="CANT_DIA_SAL" class="java.math.BigDecimal"/>
	<field name="CANT_DIA_REG" class="java.math.BigDecimal"/>
	<field name="TARIFA_CON_TR" class="java.math.BigDecimal"/>
	<field name="TARIFA_SIN_TR" class="java.math.BigDecimal"/>
	<field name="CONTRATADO" class="java.lang.String"/>
	<field name="ID_COMISIONES" class="java.math.BigDecimal"/>
	<field name="VIGENCIA_COMISIONES" class="java.math.BigDecimal"/>
	<field name="PROGRAMADO" class="java.math.BigDecimal"/>
	<field name="ABREVIATURA_REGIONAL" class="java.lang.String"/>
	<field name="ABREVIATURA_AREA" class="java.lang.String"/>
	<field name="ABREVIATURA_TRANSPORTE" class="java.lang.String"/>
	<variable name="sumviaticos" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VIATICOS}]]></variableExpression>
	</variable>
	<variable name="sumotros" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{ACUMULADO_GASTOS}]]></variableExpression>
	</variable>
	<variable name="sumcomision" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<columnHeader>
		<band height="28" splitType="Stretch">
			<textField>
				<reportElement mode="Transparent" x="452" y="0" width="60" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Vlr. OTROS OBJ. GASTO"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="0" y="0" width="20" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TR"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="20" y="0" width="30" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["DEP"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="322" y="0" width="50" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TARIFA VIATICOS"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="277" y="0" width="45" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["FECHA DE SALIDA"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="232" y="0" width="45" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["SEDE"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="50" y="0" width="182" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["NOMBRES"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="392" y="0" width="60" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Vr. VIATICOS Y GASTOS DE VIAJE"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="512" y="0" width="60" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["VALOR COMISION"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Transparent" x="372" y="0" width="20" height="28" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TOTAL DIAS"]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="15" splitType="Stretch">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="20" y="0" width="30" height="15" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ABREVIATURA_AREA}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="277" y="0" width="45" height="15" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_SALIDA}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="0" y="0" width="20" height="15" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ABREVIATURA_TRANSPORTE}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="50" y="0" width="182" height="15" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NITOCC}.toString()+" - "+$F{RAZSOC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="232" y="0" width="45" height="15" forecolor="#000000"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ABREVIATURA_REGIONAL}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;(-#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="392" y="0" width="60" height="15" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VIATICOS}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;(-#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="452" y="0" width="60" height="15" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ACUMULADO_GASTOS}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;(-#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="512" y="0" width="60" height="15" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="372" y="0" width="20" height="15" forecolor="#000000"/>
				<box leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIAS}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;(-#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="322" y="0" width="50" height="15" forecolor="#000000"/>
				<box rightPadding="2">
					<pen lineWidth="0.75" lineStyle="Dotted"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{TARIFA}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="28" splitType="Stretch">
			<textField>
				<reportElement mode="Transparent" x="0" y="0" width="392" height="15" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TOTAL"]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(-#,##0.00)">
				<reportElement mode="Transparent" x="392" y="0" width="60" height="15" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumviaticos}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(-#,##0.00)">
				<reportElement mode="Transparent" x="452" y="0" width="60" height="15" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumotros}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(-#,##0.00)">
				<reportElement mode="Transparent" x="512" y="0" width="60" height="15" forecolor="#000000" backcolor="#FEFEFE"/>
				<box>
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="5" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumcomision}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
</jasperReport>
