<?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="ca_sal_excedentes" language="groovy" pageWidth="1360" pageHeight="612" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1320" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="2.196150000000017"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/cartera/ca_sal_excedentes"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="NomPuntoVenta" class="java.lang.String"/>
	<parameter name="fecha_ini" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="fecha_fin" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTercero" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereEnUso" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereExacto" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCredito" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTitulo" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereMigraExce" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
tab0.id_excedente,
tab0.id_credito,
tab0.fecha_proceso_cre,
tab0.valor,
tab0.en_uso,
case when tab0.en_uso = 0 then 'Activa' else 'Cancelada' end as text_uso,
tab0.id_credito_aplicado,
tab0.id_nov_devol_exced,
tab0.id_anhos,
tab0.id_punto_venta,
tab0.nombre_pv,
tab0.id_tipo_credito,
tab0.descripcion_tipcre,
tab0.sec_credito,
tab0.id_con_credito,
tab0.descripcion_concre,
tab0.desc_corta_concre,
tab0.id_bn,
tab0.codigo_bn,
tab0.descripcion_bn,
tab0.id_cb,
tab0.numero_cuenta,
tab0.observaciones,
tab0.estado,
tab0.fecha_anu,
tab0.motivo_anu,
tab0.fecha,
tab0.id_ts_td,
tab0.num_doc,
tab0.descripcion_td,
tab0.id_mae_ter,
tab0.valor_total_nc,

tab0.nitocc,
tab0.razon_soc,
tab0.tercero,

to_char(wm_concat(distinct tab0.id_referencia2)) as id_referencia2,
to_char(wm_concat(tab0.sec_debito)) as sec_debito,
to_char(wm_concat(tab0.fecha_proceso)) as fecha_proceso

from(

    select
    exced.*,
    cred.id_anhos as id_anhos,
    to_char(cred.fecha_proceso, 'YYYY-MM-DD')  AS fecha_proceso_cre,
    cred.id_punto_venta,
    punto.nombre AS nombre_pv,
    cred.id_tipo_credito as id_tipo_credito,
    tipcre.descripcion AS descripcion_tipcre,
    cred.sec_credito as sec_credito,
    cred.id_con_credito as id_con_credito,
    concre.descripcion AS descripcion_concre,
    concre.desc_corta  AS desc_corta_concre,
    cred.id_bn as id_bn,
    bn.codigo      AS codigo_bn,
    bn.descripcion AS descripcion_bn,
    cred.id_cb as id_cb,
    cb.numero_cuenta,
    cred.observaciones as observaciones,
    cred.estado as estado, to_char(cred.fecha_anu, 'YYYY-MM-DD') as fecha_anu,
    cred.motivo_anu as motivo_anu, to_char(cred.fecha, 'YYYY-MM-DD') as fecha,
    cred.num_doc,
    cred.id_ts_td as id_ts_td,
    td.descripcion as descripcion_td,
    --cred.id_mae_ter as id_mae_ter,
    cred.valor as valor_total_nc,

    tab1.num_doc as nitocc,
    tab1.razon_soc as razon_soc,
    tab1.num_doc||' - '||tab1.razon_soc as tercero,

    debref.id_referencia2,
    debcre.sec_debito,
    to_char(debcre.fecha_proceso, 'YYYY-MM-DD') as fecha_proceso

    from ca_excedentes exced

    join ca_credito cred
    on exced.id_credito = cred.id_credito

    JOIN ca_con_credito concre
    ON concre.id_con_credito = cred.id_con_credito
    JOIN ca_tipo_credito tipcre
    ON tipcre.id_tipo_credito = cred.id_tipo_credito
    JOIN ca_punto_venta punto
    ON punto.id_punto_venta = cred.id_punto_venta
    JOIN ts_td td
    ON td.id = cred.id_ts_td
    LEFT JOIN ts_bn bn
    ON bn.id_bn = cred.id_bn
    LEFT JOIN ts_cb cb
    ON Cb.Id_Cb = cred.Id_Cb

    JOIN INTERCEROS_v tab1 ON exced.id_mae_ter = tab1.id_mae_ter

    left join ca_debito_credito debcre
    on  debcre.id_credito = exced.id_credito

    left join ca_debito_ref debref
    on debref.id_debito = debcre.id_debito


 UNION

    select
    0 as ID_EXCEDENTE,
    cmc.ID_CREDITO,
    cmc.vradicion as VALOR,
    0 as EN_USO,
    null as ID_CREDITO_APLICADO,
    null as ID_NOV_DEVOL_EXCED,
    null as ID_MAE_TER,
    cred.id_anhos as id_anhos,
    to_char(cred.fecha_proceso, 'YYYY-MM-DD')  AS fecha_proceso_cre,
    cred.id_punto_venta,
    punto.nombre AS nombre_pv,
    cred.id_tipo_credito as id_tipo_credito,
    tipcre.descripcion AS descripcion_tipcre,
    cred.sec_credito as sec_credito,
    cred.id_con_credito as id_con_credito,
    concre.descripcion AS descripcion_concre,
    concre.desc_corta  AS desc_corta_concre,
    cred.id_bn as id_bn,
    bn.codigo      AS codigo_bn,
    bn.descripcion AS descripcion_bn,
    cred.id_cb as id_cb,
    cb.numero_cuenta,
    cred.observaciones as observaciones,
    cred.estado as estado, to_char(cred.fecha_anu, 'YYYY-MM-DD') as fecha_anu,
    cred.motivo_anu as motivo_anu, to_char(cred.fecha, 'YYYY-MM-DD') as fecha,
    cred.num_doc,
    cred.id_ts_td as id_ts_td,
    td.descripcion as descripcion_td,
    --cred.id_mae_ter as id_mae_ter,
    cred.valor as valor_total_nc,

    tab1.num_doc as nitocc,
    tab1.razon_soc as razon_soc,
    tab1.num_doc||' - '||tab1.razon_soc as tercero,

    debref.id_referencia2,
    debcre.sec_debito,
    to_char(debcre.fecha_proceso, 'YYYY-MM-DD') as fecha_proceso

    from CA_MIGRA_CRE cmc

    join ca_credito cred
    on cmc.id_credito = cred.id_credito

    JOIN ca_con_credito concre
    ON concre.id_con_credito = cred.id_con_credito
    JOIN ca_tipo_credito tipcre
    ON tipcre.id_tipo_credito = cred.id_tipo_credito
    JOIN ca_punto_venta punto
    ON punto.id_punto_venta = cred.id_punto_venta
    JOIN ts_td td
    ON td.id = cred.id_ts_td
    LEFT JOIN ts_bn bn
    ON bn.id_bn = cred.id_bn
    LEFT JOIN ts_cb cb
    ON Cb.Id_Cb = cred.Id_Cb

    JOIN INTERCEROS_v tab1 ON cred.id_mae_ter = tab1.id_mae_ter

    left join ca_debito_credito debcre
    on  debcre.id_credito = cmc.id_credito

    left join ca_debito_ref debref
    on debref.id_debito = debcre.id_debito


)tab0
WHERE
1 = 1
$P!{whereTercero}
$P!{whereTitulo}
$P!{whereEnUso}
$P!{whereMigraExce}

group by
tab0.id_excedente,
tab0.id_credito,
tab0.fecha_proceso_cre,
tab0.valor,
tab0.en_uso,
tab0.id_credito_aplicado,
tab0.id_nov_devol_exced,
tab0.id_anhos,
tab0.id_punto_venta,
tab0.nombre_pv,
tab0.id_tipo_credito,
tab0.descripcion_tipcre,
tab0.sec_credito,
tab0.id_con_credito,
tab0.descripcion_concre,
tab0.desc_corta_concre,
tab0.id_bn,
tab0.codigo_bn,
tab0.descripcion_bn,
tab0.id_cb,
tab0.numero_cuenta,
tab0.observaciones,
tab0.estado,
tab0.fecha_anu,
tab0.motivo_anu,
tab0.fecha,
tab0.id_ts_td,
tab0.num_doc,
tab0.descripcion_td,
tab0.id_mae_ter,
tab0.valor_total_nc,

tab0.nitocc,
tab0.razon_soc,
tab0.tercero

order by
tab0.id_excedente]]>
	</queryString>
	<field name="ID_EXCEDENTE" class="java.math.BigDecimal"/>
	<field name="ID_CREDITO" class="java.math.BigDecimal"/>
	<field name="FECHA_PROCESO_CRE" class="java.lang.String"/>
	<field name="VALOR" class="java.math.BigDecimal"/>
	<field name="EN_USO" class="java.math.BigDecimal"/>
	<field name="TEXT_USO" class="java.lang.String"/>
	<field name="ID_CREDITO_APLICADO" class="java.math.BigDecimal"/>
	<field name="ID_NOV_DEVOL_EXCED" class="java.math.BigDecimal"/>
	<field name="ID_ANHOS" class="java.math.BigDecimal"/>
	<field name="ID_PUNTO_VENTA" class="java.math.BigDecimal"/>
	<field name="NOMBRE_PV" class="java.lang.String"/>
	<field name="ID_TIPO_CREDITO" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION_TIPCRE" class="java.lang.String"/>
	<field name="SEC_CREDITO" class="java.math.BigDecimal"/>
	<field name="ID_CON_CREDITO" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION_CONCRE" class="java.lang.String"/>
	<field name="DESC_CORTA_CONCRE" class="java.lang.String"/>
	<field name="ID_BN" class="java.math.BigDecimal"/>
	<field name="CODIGO_BN" class="java.lang.String"/>
	<field name="DESCRIPCION_BN" class="java.lang.String"/>
	<field name="ID_CB" class="java.math.BigDecimal"/>
	<field name="NUMERO_CUENTA" class="java.lang.String"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="FECHA_ANU" class="java.lang.String"/>
	<field name="MOTIVO_ANU" class="java.lang.String"/>
	<field name="FECHA" class="java.lang.String"/>
	<field name="ID_TS_TD" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION_TD" class="java.lang.String"/>
	<field name="ID_MAE_TER" class="java.math.BigDecimal"/>
	<field name="VALOR_TOTAL_NC" class="java.math.BigDecimal"/>
	<field name="NITOCC" class="java.lang.String"/>
	<field name="RAZON_SOC" class="java.lang.String"/>
	<field name="TERCERO" class="java.lang.String"/>
	<field name="ID_REFERENCIA2" class="java.lang.String"/>
	<field name="SEC_DEBITO" class="java.lang.String"/>
	<field name="FECHA_PROCESO" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<staticText>
				<reportElement x="190" y="0" width="757" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema de Cartera y Facturación
Informe Saldos de Excedentes]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="10" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Opaque" x="1130" y="28" width="190" 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="190" y="40" width="757" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
			</textField>
			<textField pattern="dd/MM/yyyy  hh:mm aaa">
				<reportElement x="1130" y="40" width="190" 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>
		</band>
	</title>
	<pageHeader>
		<band height="9" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="60" y="0" width="60" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Nota Credito]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="947" y="0" width="183" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Titular]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="483" y="0" width="70" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" 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 Doc. Soporte]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="423" y="0" width="60" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[No. Doc. Soporte]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="323" y="0" width="100" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Tipo Documento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="190" y="0" width="133" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Concepto crédito]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="807" y="0" width="60" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Título Minero]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="867" y="0" width="80" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Nit/C.C.]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="120" y="0" width="70" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" 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 NC]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1130" y="0" width="60" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[No. Obligación]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1190" y="0" width="70" height="20" forecolor="#000000" backcolor="#A4CFF6"/>
				<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" 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 Obligación]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="653" y="0" width="90" height="20" forecolor="#000000" backcolor="#8DB7DC"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor Total NC]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="743" y="0" width="64" height="20" forecolor="#000000" backcolor="#8DB7DC"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Excedente en Uso]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="553" y="0" width="100" height="20" forecolor="#000000" backcolor="#8DB7DC"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor Excedente]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="60" height="20" forecolor="#000000" backcolor="#8DB7DC"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Id Excedente]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1260" y="0" width="60" height="20" forecolor="#000000" backcolor="#8DB7DC"/>
				<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" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Tipo Excedente]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="60" y="0" width="60" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{SEC_CREDITO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement stretchType="RelativeToTallestObject" x="947" y="0" width="183" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZON_SOC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement stretchType="RelativeToTallestObject" x="190" y="0" width="133" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_CORTA_CONCRE}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="323" y="0" width="100" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCRIPCION_TD}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="423" y="0" width="60" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy">
				<reportElement stretchType="RelativeToTallestObject" x="483" y="0" width="70" height="10"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="807" y="0" width="60" height="10"/>
				<box rightPadding="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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ID_REFERENCIA2}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="867" y="0" width="80" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NITOCC}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy">
				<reportElement stretchType="RelativeToTallestObject" x="120" y="0" width="70" height="10"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_PROCESO_CRE}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1130" y="0" width="60" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SEC_DEBITO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1190" y="0" width="70" height="10"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_PROCESO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="653" y="0" width="90" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_TOTAL_NC}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="743" y="0" width="64" height="10"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[($F{EN_USO}==0 ? "Activa" : "Cancelada" )]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="553" y="0" width="100" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="60" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ID_EXCEDENTE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1260" y="0" width="60" height="10"/>
				<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="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[($F{ID_EXCEDENTE}==0 ? "Migración" : "Cartera" )]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="8" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="552" 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="642" 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="552" y="0" width="150" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Cartera y Facturación]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="31" splitType="Stretch"/>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="1320" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
