<?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="nota_debito" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.2100000000000024"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/cartera/nota_debito"/>
	<property name="ireport.jasperserver.url" value="http://3.22.202.200:8080/jasperserver/services/repository"/>
	<parameter name="id_debito" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="numero_letras" class="java.lang.String"/>
	<parameter name="tag_contab" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["/home/dortega/Reportes Jasper/Reportes Jasper Cartera/Impreso Nota Debito/"]]></defaultValueExpression>
	</parameter>
	<parameter name="entidad_cliente" class="java.lang.String"/>
	<queryString>
		<![CDATA[select

to_char(tab0.fecha_anu, 'dd/mm/yyyy') as fecha_anu2,
tab0.*,
(select tab2.direccion from INTERCER_DU tab1 LEFT JOIN INTERCER_DU_DIR tab2 ON tab2.ID_MT_UBI=tab1.ID_MT_UBI where tab1.id_mae_ter=tab0.id_mae_ter and rownum=1) as direccion,
(select tab2.direccion from INTERCER_DU tab1 LEFT JOIN INTERCER_DU_DIR tab2 ON tab2.ID_MT_UBI=tab1.ID_MT_UBI where tab1.id_mae_ter=tab0.id_mae_ter and rownum=1) as tel,
(select tab2.direccion from INTERCER_DU tab1 LEFT JOIN INTERCER_DU_DIR tab2 ON tab2.ID_MT_UBI=tab1.ID_MT_UBI where tab1.id_mae_ter=tab0.id_mae_ter and rownum=1) as ciudad,
tab0.nombre||' '||tab0.apellido AS USUARIO_NAME

from CA_DEBITO_PRODUCTO tab0

where
tab0.id_debito = $P{id_debito}]]>
	</queryString>
	<field name="FECHA_ANU2" class="java.lang.String"/>
	<field name="ID_DEBITO" class="java.math.BigDecimal"/>
	<field name="ID_ANHOS" class="java.math.BigDecimal"/>
	<field name="ID_PUNTO_VENTA" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_DEBITO" class="java.math.BigDecimal"/>
	<field name="SEC_DEBITO" class="java.math.BigDecimal"/>
	<field name="ID_MAE_TER" class="java.math.BigDecimal"/>
	<field name="FECHA_PROCESO" class="java.sql.Timestamp"/>
	<field name="DIAS_PAGO" class="java.math.BigDecimal"/>
	<field name="VALOR_BRUTO" class="java.math.BigDecimal"/>
	<field name="VALOR_IVA" class="java.math.BigDecimal"/>
	<field name="VALOR_DCTO" class="java.math.BigDecimal"/>
	<field name="PORCEN_DCTO" class="java.math.BigDecimal"/>
	<field name="VALOR_TOTAL" class="java.math.BigDecimal"/>
	<field name="ID_MAE_TER_VEN" class="java.math.BigDecimal"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="ID_TIP_MON" class="java.math.BigDecimal"/>
	<field name="VALOR_MONEDA" class="java.math.BigDecimal"/>
	<field name="TRM_DEBITO" class="java.math.BigDecimal"/>
	<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="PERIODO_INI" class="java.sql.Timestamp"/>
	<field name="PERIODO_FIN" class="java.sql.Timestamp"/>
	<field name="USUARIO" class="java.lang.String"/>
	<field name="ID_REFERENCIA1" class="java.math.BigDecimal"/>
	<field name="ID_REFERENCIA2" class="java.lang.String"/>
	<field name="TITULO_MINERO" class="java.lang.String"/>
	<field name="PUNTO_VENTA" class="java.lang.String"/>
	<field name="ABREVIATURA" class="java.lang.String"/>
	<field name="NUM_DOC_VEN" class="java.lang.String"/>
	<field name="RAZON_SOC_VEN" class="java.lang.String"/>
	<field name="VENDEDOR" class="java.lang.String"/>
	<field name="TIPO_DEBITO" class="java.lang.String"/>
	<field name="MINERAL" class="java.lang.String"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="RAZON_SOC" class="java.lang.String"/>
	<field name="TERCERO" class="java.lang.String"/>
	<field name="CODIGO_TM" class="java.lang.String"/>
	<field name="TIPO_MONEDA" class="java.lang.String"/>
	<field name="ID_DEBITO_DETALLE" class="java.math.BigDecimal"/>
	<field name="ID_PRODUCTO" class="java.math.BigDecimal"/>
	<field name="CANTIDAD" class="java.math.BigDecimal"/>
	<field name="VALOR_UNITARIO_DEBDET" class="java.math.BigDecimal"/>
	<field name="VALOR_IVA_DEBDET" class="java.math.BigDecimal"/>
	<field name="POR_IVA_DEBDET" class="java.math.BigDecimal"/>
	<field name="VALOR_DCTO_DEBDET" class="java.math.BigDecimal"/>
	<field name="PORCEN_DCT_DEBDET" class="java.math.BigDecimal"/>
	<field name="VALOR_TOTAL_DEBDET" class="java.math.BigDecimal"/>
	<field name="OBSERVACIONES_DEBDET" class="java.lang.String"/>
	<field name="CODIGO_PRO" class="java.lang.String"/>
	<field name="DESCRIPCION_PRO" class="java.lang.String"/>
	<field name="PRECIO_VEN_PUB" class="java.math.BigDecimal"/>
	<field name="VALOR_UNITARIO_PRO" class="java.math.BigDecimal"/>
	<field name="NOMBRE" class="java.lang.String"/>
	<field name="APELLIDO" class="java.lang.String"/>
	<field name="DIRECCION" class="java.lang.String"/>
	<field name="TEL" class="java.lang.String"/>
	<field name="CIUDAD" class="java.lang.String"/>
	<field name="USUARIO_NAME" class="java.lang.String"/>
	<variable name="SUM_CANTIDAD" class="java.math.BigDecimal" resetType="Group" resetGroup="Obs" calculation="Sum">
		<variableExpression><![CDATA[$F{CANTIDAD}]]></variableExpression>
	</variable>
	<variable name="SUM_VALOR_UNI" class="java.math.BigDecimal" resetType="Group" resetGroup="Obs" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_UNITARIO_DEBDET}]]></variableExpression>
	</variable>
	<variable name="SUM_VALOR_IVA" class="java.math.BigDecimal" resetType="Group" resetGroup="Obs" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_IVA_DEBDET}]]></variableExpression>
	</variable>
	<variable name="SUM_VALOR_TOTAL" class="java.math.BigDecimal" resetType="Group" resetGroup="Obs" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_TOTAL_DEBDET}]]></variableExpression>
	</variable>
	<group name="Obs">
		<groupExpression><![CDATA[$F{ID_DEBITO}]]></groupExpression>
		<groupHeader>
			<band height="12">
				<staticText>
					<reportElement mode="Opaque" x="352" y="0" width="50" height="12" 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[Cantidad]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="252" y="0" width="100" height="12" 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[Valor Unitario]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="502" y="0" width="100" height="12" 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[Valor IVA]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="50" y="0" width="202" height="12" 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]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="602" y="0" width="100" height="12" 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[Valor Total]]></text>
				</staticText>
				<staticText>
					<reportElement mode="Opaque" x="402" y="0" width="100" height="12" 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[Valor Bruto]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="259">
				<staticText>
					<reportElement stretchType="RelativeToTallestObject" x="50" y="22" width="80" height="12"/>
					<box leftPadding="2"/>
					<textElement verticalAlignment="Middle" markup="none">
						<font fontName="SansSerif" size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Observaciones:]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
					<reportElement x="130" y="22" width="572" height="12"/>
					<box leftPadding="2" rightPadding="2"/>
					<textElement verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{OBSERVACIONES}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement mode="Opaque" x="352" y="0" width="50" 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 textAlignment="Center" verticalAlignment="Middle">
						<font size="6" isBold="true" isStrikeThrough="false"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{SUM_CANTIDAD}]]></textFieldExpression>
				</textField>
				<textField pattern="$#,##0.00">
					<reportElement mode="Opaque" x="402" y="0" width="100" height="12" backcolor="#D2D0D0"/>
					<box rightPadding="5">
						<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_UNI}*$V{SUM_CANTIDAD}]]></textFieldExpression>
				</textField>
				<textField pattern="$#,##0.00">
					<reportElement mode="Opaque" x="502" y="0" width="100" height="12" backcolor="#D2D0D0"/>
					<box rightPadding="5">
						<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_IVA}]]></textFieldExpression>
				</textField>
				<textField pattern="$#,##0.00">
					<reportElement mode="Opaque" x="602" y="0" width="100" height="12" backcolor="#D2D0D0"/>
					<box rightPadding="5">
						<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_TOTAL}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement mode="Opaque" x="50" y="0" width="202" height="12" backcolor="#D2D0D0"/>
					<box leftPadding="3" rightPadding="9">
						<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" isBold="true"/>
					</textElement>
					<text><![CDATA[TOTAL]]></text>
				</staticText>
				<staticText>
					<reportElement x="130" y="75" width="50" height="12"/>
					<box leftPadding="2"/>
					<textElement verticalAlignment="Middle" markup="none">
						<font fontName="SansSerif" size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Elaboró: ]]></text>
				</staticText>
				<textField>
					<reportElement x="180" y="87" width="150" height="12"/>
					<box>
						<topPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.0"/>
					</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{USUARIO_NAME}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="402" y="75" width="50" height="12"/>
					<box leftPadding="2"/>
					<textElement verticalAlignment="Middle" markup="none">
						<font fontName="SansSerif" size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Revisó: ]]></text>
				</staticText>
				<staticText>
					<reportElement x="452" y="87" width="150" height="12"/>
					<box>
						<topPen lineWidth="0.75"/>
					</box>
					<textElement>
						<font size="8"/>
					</textElement>
					<text><![CDATA[]]></text>
				</staticText>
				<textField pattern="$#,##0.00">
					<reportElement mode="Opaque" x="252" y="0" width="100" height="12" backcolor="#D2D0D0"/>
					<box rightPadding="5">
						<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_UNI}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="50" y="34" width="80" height="12">
						<printWhenExpression><![CDATA[$F{ESTADO} == 0]]></printWhenExpression>
					</reportElement>
					<box topPadding="1" leftPadding="1" bottomPadding="1">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.0"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement>
						<font size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Estado:]]></text>
				</staticText>
				<textField isBlankWhenNull="true">
					<reportElement x="130" y="34" width="572" height="12">
						<printWhenExpression><![CDATA[$F{ESTADO} == 0]]></printWhenExpression>
					</reportElement>
					<box topPadding="0" leftPadding="2">
						<pen lineWidth="0.75"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.0"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA["Se anulo el " + $F{FECHA_ANU2} + " por motivo de: " + $F{MOTIVO_ANU}]]></textFieldExpression>
				</textField>
				<subreport>
					<reportElement x="50" y="109" width="652" height="50" isRemoveLineWhenBlank="true">
						<printWhenExpression><![CDATA[$P{tag_contab}.intValue() != 0 && $F{ID_ANHOS} >= 2019]]></printWhenExpression>
					</reportElement>
					<subreportParameter name="id_debito">
						<subreportParameterExpression><![CDATA[$P{id_debito}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:nota_debito_subreport1"]]></subreportExpression>
				</subreport>
				<subreport>
					<reportElement x="50" y="209" width="652" height="50" isRemoveLineWhenBlank="true"/>
					<subreportParameter name="id_debito">
						<subreportParameterExpression><![CDATA[$P{id_debito}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:nota_debito_subreport2"]]></subreportExpression>
				</subreport>
				<subreport>
					<reportElement x="50" y="159" width="652" height="50" isRemoveLineWhenBlank="true">
						<printWhenExpression><![CDATA[$P{tag_contab}.intValue() != 0 && $F{ID_ANHOS} < 2019]]></printWhenExpression>
					</reportElement>
					<subreportParameter name="id_debito">
						<subreportParameterExpression><![CDATA[$P{id_debito}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.lang.String"><![CDATA["repo:nota_debito_subreport3"]]></subreportExpression>
				</subreport>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="73" splitType="Stretch">
			<staticText>
				<reportElement x="190" y="0" width="330" height="50"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema de Cartera y Facturación]]></text>
			</staticText>
			<image>
				<reportElement x="50" y="10" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<textField>
				<reportElement mode="Transparent" x="602" y="10" width="100" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SEC_DEBITO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="520" y="30" width="82" height="20"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Fecha: ]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy">
				<reportElement mode="Transparent" x="602" y="30" width="100" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2"/>
				<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>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_PROCESO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="520" y="10" width="82" height="20"/>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_DEBITO}+" No."]]></textFieldExpression>
			</textField>
			<subreport>
				<reportElement x="52" y="50" width="138" height="15"/>
				<subreportParameter name="entidad_cliente">
					<subreportParameterExpression><![CDATA[$P{entidad_cliente}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:nit_subreport"]]></subreportExpression>
			</subreport>
		</band>
	</title>
	<pageHeader>
		<band height="105" splitType="Stretch">
			<staticText>
				<reportElement x="50" y="0" width="80" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Debitado a: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="50" y="12" width="80" height="12" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[$F{DIRECCION}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Direccion:]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToTallestObject" x="502" y="80" width="98" height="12"/>
				<box leftPadding="0" rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Valor :]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToTallestObject" x="50" y="68" width="80" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[La suma de : ]]></text>
			</staticText>
			<textField>
				<reportElement x="130" y="0" width="260" height="12"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TERCERO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="600" y="80" width="102" height="12"/>
				<box rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_TOTAL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="false">
				<reportElement x="267" y="36" width="90" height="12">
					<printWhenExpression><![CDATA[$F{ID_REFERENCIA1}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MINERAL}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="220" y="36" width="47" height="12">
					<printWhenExpression><![CDATA[$F{ID_REFERENCIA1}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Mineral : ]]></text>
			</staticText>
			<staticText>
				<reportElement x="50" y="48" width="80" height="12">
					<printWhenExpression><![CDATA[$F{ID_REFERENCIA2}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Periodo desde: ]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement x="130" y="48" width="90" height="12" isRemoveLineWhenBlank="true"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{PERIODO_INI}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="220" y="48" width="47" height="12">
					<printWhenExpression><![CDATA[$F{ID_REFERENCIA2}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Hasta :]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement x="267" y="48" width="91" height="12" isRemoveLineWhenBlank="true"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{PERIODO_FIN}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="130" y="12" width="260" height="12" isRemoveLineWhenBlank="true"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIRECCION}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="130" y="36" width="90" height="12" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[$F{ID_REFERENCIA2}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TITULO_MINERO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="50" y="36" width="80" height="12">
					<printWhenExpression><![CDATA[$F{ID_REFERENCIA2}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Titulo Minero:]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement x="130" y="68" width="572" height="12"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{numero_letras}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="220" y="24" width="47" height="12" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF">
					<printWhenExpression><![CDATA[$F{TEL}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement textAlignment="Left" 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[Ciudad: ]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="50" y="24" width="80" height="12" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF">
					<printWhenExpression><![CDATA[$F{TEL}!=null]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2"/>
				<textElement textAlignment="Left" 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[Telefono: ]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="267" y="24" width="90" height="12" isRemoveLineWhenBlank="true"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CIUDAD}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="130" y="24" width="90" height="12" isRemoveLineWhenBlank="true"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TEL}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField isStretchWithOverflow="true">
				<reportElement x="50" y="0" width="202" height="10"/>
				<box leftPadding="6">
					<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{CODIGO_PRO}+" - "+$F{DESCRIPCION_PRO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement stretchType="RelativeToTallestObject" x="352" y="0" width="50" 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{CANTIDAD}]]></textFieldExpression>
			</textField>
			<textField pattern="$#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="402" y="0" width="100" height="10"/>
				<box rightPadding="5">
					<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_UNITARIO_DEBDET}*$F{CANTIDAD}  / $F{TRM_DEBITO}]]></textFieldExpression>
			</textField>
			<textField pattern="$#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="602" y="0" width="100" height="10"/>
				<box rightPadding="5">
					<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_DEBDET}  / $F{TRM_DEBITO}]]></textFieldExpression>
			</textField>
			<textField pattern="$#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="502" y="0" width="100" height="10"/>
				<box rightPadding="5">
					<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_IVA_DEBDET}  / $F{TRM_DEBITO}]]></textFieldExpression>
			</textField>
			<textField pattern="$#,##0.00">
				<reportElement stretchType="RelativeToTallestObject" x="252" y="0" width="100" height="10"/>
				<box rightPadding="5">
					<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_UNITARIO_DEBDET}  / $F{TRM_DEBITO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="12" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="600" y="0" 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="692" y="0" 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="299" 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>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="80" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha de Impresion:]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy  hh:mm aaa">
				<reportElement x="80" y="0" width="150" height="12"/>
				<box rightPadding="3"/>
				<textElement verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="752" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
