<?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="transferencia_economica" language="groovy" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.464100000000004"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="192"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/regalias/transferencia_economica"/>
	<property name="ireport.jasperserver.url" value="http://10.0.100.66:8080/jasperserver/services/repository"/>
	<parameter name="id_distribucion" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="comando" class="java.lang.String"/>
	<queryString>
		<![CDATA[select
tab.COD_LIQ as cod,
tab.*
from(

    select

    extract(year from tab0.fecha_crea) as anho_crea,
    ter.num_doc as num_doc_genero,
    ter.razon_soc as razon_soc_genero,
    to_char(tab0.fecha_crea, 'dd') as dd,
    to_char(tab0.fecha_crea, 'mm') as mm,
    to_char(tab0.fecha_crea, 'yyyy') as yyyy,
    NVL(tab0.dv, -1 ) as dv_obl,
    tab0.TITULAR,
    tab0.ID_TRANSFER,
    tab0.ID_TER_GENERO,
    tab0.ID_TER_ELABORO,
    tab0.COD_TIPO_CON,
    tab0.DESCRIPCION_CON,
    tab0.COD_PERIODO,
    tab0.DSCRIPCION_PER,
    tab0.COD_MINERAL,
    tab0.DESCRIPCION_MINE,
    tab0.CODIGO_BN,
    tab0.DESCRIPCION_BN,
    tab0.NUMERO_CUENTA,
    tab0.ID_OBLIGACION,
    tab0.ID_LIQ,
    case when tab0.COD_LIQ = '53' then '51' else tab0.COD_LIQ end as COD_LIQ,
    tab0.DESCRIPCION_LIQ,
    tab0.ID_MAE_TER,
    tab0.NUM_DOC_TER,
    tab0.RAZON_SOC,
    tab0.DV,
    tab0.FECHA_CREA_OBL,
    tab0.VALOR_CONTRAPRESTACION,
    tab0.ID_ACH,
    tab0.ESTADO_OBL,
    tab0.FECHA_ANU_OBL,
    tab0.MOTIVO_ANU_OBL,
    tab0.ID_DISTRIBUCION,
    tab0.ID_LOTE,
    tab0.ID_TIPO_CON,
    tab0.ID_PERIODO,
    tab0.ID_ANHOS,
    tab0.ID_MINERAL,
    tab0.ID_BN,
    tab0.ID_CB,
    tab0.FECHA_CREA,
    tab0.CONCEPTO,
    tab0.PRODUCCION,
    tab0.PRECIO,
    tab0.DISTRIBUCION,
    tab0.ESTADO,
    tab0.FECHA_ANU,
    tab0.MOTIVO_ANU,
    tab0.PORCENTAJE,
    tab0.VALOR,
    tab0.DISTRIBUIDO,
    tab0.EN_USO,
    tab0.ES_TRANSFER,
    tab0.PLACA_RMN,
    obldet.secuencia,
    obldet.id_tipo_beneficiario,
    obldet.valor_bruto,
    obldet.valor_dto,
    obldet.valor_gravamen,
    obldet.valor_girar,
    tab0.valor_produccion as valor_produccion,
    tab0.id_unidad_medida as id_unidad_medida,
    tab0.valor_cant_produccion as valor_cant_produccion,
    uni.descripcion

    from RE_DISTRI_OBL tab0

    Join re_obl_detalle obldet
    on obldet.id_distribucion = tab0.id_distribucion
    and obldet.id_obligacion = tab0.id_obligacion
    and obldet.secuencia = 1

    left join INTERCEROS_V ter
    on ter.id_mae_ter = tab0.id_ter_elaboro

    left join in_unidad_medida uni
    on uni.id_unidad_medida = tab0.id_unidad_medida

    where
    tab0.id_distribucion = $P{id_distribucion}
    and ( tab0.cod_liq = '50' or tab0.cod_liq = '51' or tab0.cod_liq = '52' or tab0.cod_liq = '53' or tab0.cod_liq = '54' or tab0.cod_liq = '55'  )
    and tab0.estado_obl = 1


)tab


order by
tab.id_distribucion,
tab.fecha_crea,
tab.cod_liq,
tab.razon_soc]]>
	</queryString>
	<field name="COD" class="java.lang.String"/>
	<field name="ANHO_CREA" class="java.math.BigDecimal"/>
	<field name="NUM_DOC_GENERO" class="java.lang.String"/>
	<field name="RAZON_SOC_GENERO" class="java.lang.String"/>
	<field name="DD" class="java.lang.String"/>
	<field name="MM" class="java.lang.String"/>
	<field name="YYYY" class="java.lang.String"/>
	<field name="DV_OBL" class="java.math.BigDecimal"/>
	<field name="TITULAR" class="java.lang.String"/>
	<field name="ID_TRANSFER" class="java.math.BigDecimal"/>
	<field name="ID_TER_GENERO" class="java.math.BigDecimal"/>
	<field name="ID_TER_ELABORO" class="java.math.BigDecimal"/>
	<field name="COD_TIPO_CON" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION_CON" class="java.lang.String"/>
	<field name="COD_PERIODO" class="java.lang.String"/>
	<field name="DSCRIPCION_PER" class="java.lang.String"/>
	<field name="COD_MINERAL" class="java.lang.String"/>
	<field name="DESCRIPCION_MINE" class="java.lang.String"/>
	<field name="CODIGO_BN" class="java.lang.String"/>
	<field name="DESCRIPCION_BN" class="java.lang.String"/>
	<field name="NUMERO_CUENTA" class="java.lang.String"/>
	<field name="ID_OBLIGACION" class="java.math.BigDecimal"/>
	<field name="ID_LIQ" class="java.math.BigDecimal"/>
	<field name="COD_LIQ" class="java.lang.String"/>
	<field name="DESCRIPCION_LIQ" class="java.lang.String"/>
	<field name="ID_MAE_TER" class="java.math.BigDecimal"/>
	<field name="NUM_DOC_TER" class="java.lang.String"/>
	<field name="RAZON_SOC" class="java.lang.String"/>
	<field name="DV" class="java.math.BigDecimal"/>
	<field name="FECHA_CREA_OBL" class="java.sql.Timestamp"/>
	<field name="VALOR_CONTRAPRESTACION" class="java.math.BigDecimal"/>
	<field name="ID_ACH" class="java.math.BigDecimal"/>
	<field name="ESTADO_OBL" class="java.math.BigDecimal"/>
	<field name="FECHA_ANU_OBL" class="java.sql.Timestamp"/>
	<field name="MOTIVO_ANU_OBL" class="java.lang.String"/>
	<field name="ID_DISTRIBUCION" class="java.math.BigDecimal"/>
	<field name="ID_LOTE" class="java.lang.String"/>
	<field name="ID_TIPO_CON" class="java.math.BigDecimal"/>
	<field name="ID_PERIODO" class="java.math.BigDecimal"/>
	<field name="ID_ANHOS" class="java.math.BigDecimal"/>
	<field name="ID_MINERAL" class="java.math.BigDecimal"/>
	<field name="ID_BN" class="java.math.BigDecimal"/>
	<field name="ID_CB" class="java.math.BigDecimal"/>
	<field name="FECHA_CREA" class="java.sql.Timestamp"/>
	<field name="CONCEPTO" class="java.lang.String"/>
	<field name="PRODUCCION" class="java.lang.String"/>
	<field name="PRECIO" class="java.lang.String"/>
	<field name="DISTRIBUCION" class="java.lang.String"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="FECHA_ANU" class="java.sql.Timestamp"/>
	<field name="MOTIVO_ANU" class="java.lang.String"/>
	<field name="PORCENTAJE" class="java.lang.String"/>
	<field name="VALOR" class="java.math.BigDecimal"/>
	<field name="DISTRIBUIDO" class="java.math.BigDecimal"/>
	<field name="EN_USO" class="java.math.BigDecimal"/>
	<field name="ES_TRANSFER" class="java.math.BigDecimal"/>
	<field name="PLACA_RMN" class="java.lang.String"/>
	<field name="SECUENCIA" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_BENEFICIARIO" class="java.math.BigDecimal"/>
	<field name="VALOR_BRUTO" class="java.math.BigDecimal"/>
	<field name="VALOR_DTO" class="java.math.BigDecimal"/>
	<field name="VALOR_GRAVAMEN" class="java.math.BigDecimal"/>
	<field name="VALOR_GIRAR" class="java.math.BigDecimal"/>
	<field name="VALOR_PRODUCCION" class="java.math.BigDecimal"/>
	<field name="ID_UNIDAD_MEDIDA" class="java.math.BigDecimal"/>
	<field name="VALOR_CANT_PRODUCCION" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<variable name="sum_valor_bruto" class="java.math.BigDecimal" resetType="Group" resetGroup="Liquidacion" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_BRUTO}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="total_valor_bruto" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_BRUTO}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="sum_valor_prod" class="java.math.BigDecimal" resetType="Group" resetGroup="Liquidacion" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_CANT_PRODUCCION}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="total_valor_prod" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_CANT_PRODUCCION}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="total_valor_prod_cant" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_PRODUCCION}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="sum_valor_prod_cant" class="java.math.BigDecimal" resetType="Group" resetGroup="Liquidacion" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_PRODUCCION}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<group name="Liquidacion" isReprintHeaderOnEachPage="true">
		<groupExpression><![CDATA[$F{COD_LIQ}]]></groupExpression>
		<groupHeader>
			<band height="94" splitType="Prevent">
				<staticText>
					<reportElement mode="Opaque" x="482" y="74" width="90" height="20" forecolor="#000000" backcolor="#88C2F9"/>
					<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 de Transferencia]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="0" y="74" width="212" height="20" forecolor="#000000" backcolor="#88C2F9"/>
					<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[Benefeciario]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="212" y="74" width="70" height="20" forecolor="#000000" backcolor="#88C2F9"/>
					<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-Dv / Cc]]></text>
				</staticText>
				<textField>
					<reportElement stretchType="RelativeToBandHeight" x="0" y="49" width="572" height="12"/>
					<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[( $F{COD_LIQ} == "50"
    ? "3. OTROS BENEFICIARIOS TR-" + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA}
    :  ( $F{COD_LIQ} == "51"
        ? "4. ASIGNACIONES DIRECTAS TR-" + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA}
        : "5. " + $F{DESCRIPCION_LIQ} + " TR-" + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA}
        )
)]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement stretchType="RelativeToBandHeight" x="0" y="10" width="572" height="29" isRemoveLineWhenBlank="true">
						<printWhenExpression><![CDATA[$V{PAGE_NUMBER} != 1]]></printWhenExpression>
					</reportElement>
					<box>
						<topPen lineWidth="1.0" lineStyle="Dotted"/>
					</box>
					<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA["Viene Transferencia TR-" + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="342" y="74" width="50" height="20" forecolor="#000000" backcolor="#88C2F9"/>
					<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[Unidad Medida]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="392" y="74" width="90" height="20" forecolor="#000000" backcolor="#88C2F9"/>
					<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 Producción]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="282" y="74" width="60" height="20" forecolor="#000000" backcolor="#88C2F9"/>
					<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[Producción]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="29">
				<textField>
					<reportElement mode="Opaque" x="0" y="0" width="282" height="12" backcolor="#D2D0D0"/>
					<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" markup="none">
						<font size="8" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[( $F{COD_LIQ} == "50"
    ? "Total Transferencias Otros Beneficiarios"
    :  ( $F{COD_LIQ} == "51"
        ? "Total Transferencias Asignaciones Directas"
        : ( $F{COD_LIQ} == "54"
            ? "Total Transferencias Rendimientos Financieros"
            : "Total Transferencias " + $F{DESCRIPCION_LIQ}
            )
        )
)]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement mode="Opaque" x="482" y="0" width="90" height="12" backcolor="#D2D0D0"/>
					<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" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_valor_bruto}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement mode="Opaque" x="392" y="0" width="90" height="12" backcolor="#D2D0D0"/>
					<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" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_valor_prod}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(-#,##0.00)">
					<reportElement mode="Opaque" x="282" y="0" width="60" height="12" backcolor="#D2D0D0"/>
					<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" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_valor_prod_cant}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
					<reportElement mode="Opaque" x="342" y="0" width="50" height="12" backcolor="#D2D0D0"/>
					<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" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="501" splitType="Stretch">
			<image>
				<reportElement x="0" y="0" width="572" height="143"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:logo_servicio_bicen.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement x="0" y="143" width="572" height="45"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema de Regalías y Compensaciones
Transferencia de Contraprestaciones Economicas]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="188" width="572" height="14"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TR No. " + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="207" width="572" height="50"/>
				<box topPadding="2" leftPadding="0"/>
				<textElement textAlignment="Justified" markup="none">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Con el fin de realizar la transferencia de los recursos al Sistema Nacional de Regalias a continuación, se presenta el reporte TR-" + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA} +  " de transferencia de los recursos de regalias y demas contraprestaciones economicas."]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="257" width="572" height="14"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[1. IDENTIFICACION DEL REPORTE]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="423" width="572" height="14"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[2. PARAMETROS BASE DEL CALCULO]]></text>
			</staticText>
			<textField>
				<reportElement x="116" y="282" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TR-" + $F{ID_TRANSFER} + "-" + $F{ANHO_CREA}]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MM-yyyy">
				<reportElement x="116" y="292" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[(   $F{MM} == "01" ? "Enero" :
    $F{MM} == "02" ? "Febrero" :
    $F{MM} == "03" ? "Marzo" :
    $F{MM} == "04" ? "Abril" :
    $F{MM} == "05" ? "Mayo" :
    $F{MM} == "06" ? "Junio" :
    $F{MM} == "07" ? "Julio" :
    $F{MM} == "08" ? "Agosto" :
    $F{MM} == "09" ? "Septiembre" :
    $F{MM} == "10" ? "Octubre" :
    $F{MM} == "11" ? "Noviembre" :
    $F{MM} == "12" ? "Diciembre" : $F{MM}
)
+ " " + $F{DD} + " de " + $F{YYYY}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="302" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COD_MINERAL} + " " + $F{DESCRIPCION_MINE}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="312" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COD_TIPO_CON} + " " + $F{DESCRIPCION_CON}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="322" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COD_PERIODO} + " " + $F{DSCRIPCION_PER} + " - " + $F{ID_ANHOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="332" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUMERO_CUENTA} + " del " + $F{CODIGO_BN} + "-" + $F{DESCRIPCION_BN}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement x="116" y="342" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="352" width="456" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CONCEPTO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="362" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ID_DISTRIBUCION}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="282" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Transferencia No. :]]></text>
			</staticText>
			<textField>
				<reportElement x="116" y="372" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PLACA_RMN}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="116" y="382" width="200" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TITULAR}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="292" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Fecha :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="302" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Mineral :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="312" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Tipo de Contraprestación :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="322" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Periodo :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="332" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Cuenta Recaudarora]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="342" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Total a Transferir :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="352" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Concepto :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="362" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Proceso No. :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="372" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Placa RMN :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="382" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Titular :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="450" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Produccion :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="460" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Precio: ]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="116" y="460" width="456" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PRECIO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="470" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Porcentaje :]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="116" y="470" width="456" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PORCENTAJE}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="480" width="116" height="10"/>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Asignaciones Directas :]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="116" y="480" width="456" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DISTRIBUCION}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="116" y="450" width="456" height="10"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PRODUCCION}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<detail>
		<band height="10" splitType="Stretch">
			<textField isStretchWithOverflow="true">
				<reportElement x="0" y="0" width="212" 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 pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="482" 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_BRUTO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" x="212" y="0" width="70" 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{NUM_DOC_TER} +

( $F{DV_OBL} != -1
    ? " - " + $F{DV_OBL}
    : "  "
)]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="342" y="0" width="50" height="10"/>
				<box leftPadding="2" rightPadding="0">
					<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}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="392" 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_CANT_PRODUCCION}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(-#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="282" 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{VALOR_PRODUCCION}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="184" splitType="Stretch">
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="90" width="572" height="18"/>
				<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[GRUPO RECAUDO Y TRANSFERENCIA DE REGALIAS Y COMPENSACIONES]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="282" height="12" backcolor="#C0BEBE"/>
				<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Total Transferencias Sistema General de Regalias:]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="139" y="142" width="294" height="12"/>
				<box>
					<bottomPen lineWidth="0.75" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Vo. Bo. :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" x="139" y="63" width="294" height="12"/>
				<box>
					<bottomPen lineWidth="0.75" lineStyle="Dotted"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Preparo :]]></text>
			</staticText>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement mode="Opaque" x="482" y="0" width="90" height="12" backcolor="#C0BEBE"/>
				<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" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_valor_bruto}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="0" y="75" width="572" height="15"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZON_SOC_GENERO}]]></textFieldExpression>
			</textField>
			<subreport>
				<reportElement x="0" y="154" width="572" height="30"/>
				<subreportParameter name="comando">
					<subreportParameterExpression><![CDATA[$P{comando}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:Firmas"]]></subreportExpression>
			</subreport>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement mode="Opaque" x="392" y="0" width="90" height="12" backcolor="#C0BEBE"/>
				<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" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_valor_prod}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(-#,##0.00)">
				<reportElement mode="Opaque" x="282" y="0" width="60" height="12" backcolor="#C0BEBE"/>
				<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" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total_valor_prod_cant}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="342" y="0" width="50" height="12" backcolor="#C0BEBE"/>
				<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" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="572" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
