<?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="distribucion_resumen_tipobene" language="groovy" pageWidth="752" pageHeight="555" orientation="Landscape" columnWidth="752" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.4641000000000006"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="id_distribucion" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select

tab0.*

from re_distri_obl_obldet tab0

where
tab0.id_distribucion = $P{id_distribucion}
and tab0.estado_obl = 1

order by
tab0.id_distribucion,
tab0.fecha_crea,
tab0.id_tipo_beneficiario,
tab0.id_obligacion,
tab0.secuencia]]>
	</queryString>
	<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="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="DESCRIPCION_TC" 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="SECUENCIA" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_BENEFICIARIO" class="java.math.BigDecimal"/>
	<field name="ABREVIATURA" class="java.lang.String"/>
	<field name="DESCRIPCION_TIPBEN" class="java.lang.String"/>
	<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="ID_DESCTO" class="java.math.BigDecimal"/>
	<field name="COD_DESCTO" class="java.lang.String"/>
	<field name="DESCRIPCION_DES" class="java.lang.String"/>
	<field name="ID_MAE_TER_OBLDET" class="java.math.BigDecimal"/>
	<field name="NUM_DOC_TER_OBLDET" class="java.lang.String"/>
	<field name="RAZON_SOC_OBLDET" class="java.lang.String"/>
	<field name="DV_OBLDET" class="java.math.BigDecimal"/>
	<field name="PAGO" class="java.math.BigDecimal"/>
	<field name="ID_DES_PAGO" class="java.math.BigDecimal"/>
	<field name="FECHA_APLICA" class="java.sql.Timestamp"/>
	<field name="RESUL_GIRO" class="java.math.BigDecimal"/>
	<variable name="sum_valor_bruto" class="java.math.BigDecimal" resetType="Group" resetGroup="TipoBeneficiario" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_BRUTO}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="sum_valor_dto" class="java.math.BigDecimal" resetType="Group" resetGroup="TipoBeneficiario" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_DTO}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="sum_valor_gravamen" class="java.math.BigDecimal" resetType="Group" resetGroup="TipoBeneficiario" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_GRAVAMEN}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<variable name="sum_valor_girar" class="java.math.BigDecimal" resetType="Group" resetGroup="TipoBeneficiario" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_GIRAR}]]></variableExpression>
		<initialValueExpression><![CDATA[0]]></initialValueExpression>
	</variable>
	<group name="TipoBeneficiario">
		<groupExpression><![CDATA[$F{ID_TIPO_BENEFICIARIO}]]></groupExpression>
		<groupHeader>
			<band height="30">
				<staticText>
					<reportElement mode="Transparent" x="0" y="0" width="357" height="12" forecolor="#000000" backcolor="#88C2F9"/>
					<box>
						<pen lineWidth="0.0"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.0"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<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[Tipo Beneficiario :]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="80" y="18" width="60" height="12" 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 / Cc]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="0" y="18" width="50" height="12" 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[Obligación]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="50" y="18" width="30" height="12" 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[Sec.]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="582" y="18" width="80" height="12" 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 Gravamen]]></text>
				</staticText>
				<textField>
					<reportElement x="357" y="0" width="395" height="12"/>
					<box leftPadding="2"/>
					<textElement verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCRIPCION_TIPBEN}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="662" y="18" width="90" height="12" 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 a Girar]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="412" y="18" width="90" height="12" 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 Distribuido]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="140" y="18" width="272" height="12" 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[Razon Social]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="502" y="18" width="80" height="12" 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[Descuentos de Ley]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="27">
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement mode="Opaque" x="502" y="0" width="80" 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_dto}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement mode="Opaque" x="0" y="0" width="412" height="12" backcolor="#D2D0D0"/>
					<box>
						<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["Total Tipo Beneficiario: " + $F{DESCRIPCION_TIPBEN}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement mode="Opaque" x="662" 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_girar}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement mode="Opaque" x="582" y="0" width="80" 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_gravamen}]]></textFieldExpression>
				</textField>
				<textField pattern="#,##0.00;(#,##0.00)">
					<reportElement mode="Opaque" x="412" 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>
			</band>
		</groupFooter>
	</group>
	<detail>
		<band height="10" splitType="Stretch">
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="50" 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_OBLIGACION}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="502" 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.math.BigDecimal"><![CDATA[$F{VALOR_DTO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="50" y="0" width="30" 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.math.BigDecimal"><![CDATA[$F{SECUENCIA}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="582" 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.math.BigDecimal"><![CDATA[$F{VALOR_GRAVAMEN}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="412" 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 isStretchWithOverflow="true">
				<reportElement x="140" y="0" width="272" 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_OBLDET}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="80" y="0" width="60" height="10"/>
				<box rightPadding="3">
					<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_OBLDET}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement stretchType="RelativeToTallestObject" x="662" 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_GIRAR}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
</jasperReport>
