<?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="pdf_factura_reten" language="groovy" pageWidth="502" pageHeight="600" orientation="Landscape" columnWidth="502" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="2.2000000000000015"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/cartera/pdf_factura"/>
	<property name="ireport.jasperserver.url" value="http://localhost:18091/jasperserver/services/repository"/>
	<parameter name="id_factura" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="cambio" class="java.math.BigDecimal"/>
	<queryString>
		<![CDATA[select

tab0.id_factura_reten,
tab0.id_factura,
tab0.id_im,
tab0.valor_base,
tab0.porcentaje,
tab0.valor_retencion,
tab1.codigo,
tab1.desccorta,
tab1.descripcion

from ca_factura_reten tab0
left join ts_im tab1 on tab1.id = tab0.id_im

where tab0.id_factura = $P{id_factura}

order by
to_number(tab1.codigo)]]>
	</queryString>
	<field name="ID_FACTURA_RETEN" class="java.math.BigDecimal"/>
	<field name="ID_FACTURA" class="java.math.BigDecimal"/>
	<field name="ID_IM" class="java.math.BigDecimal"/>
	<field name="VALOR_BASE" class="java.math.BigDecimal"/>
	<field name="PORCENTAJE" class="java.math.BigDecimal"/>
	<field name="VALOR_RETENCION" class="java.math.BigDecimal"/>
	<field name="CODIGO" class="java.lang.String"/>
	<field name="DESCCORTA" class="java.lang.String"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<columnHeader>
		<band height="24">
			<staticText>
				<reportElement x="0" y="0" width="502" height="12"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[[ INFORMACIÓN RETENCIÓN ]]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="278" y="12" width="108" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0" lineStyle="Double"/>
					<rightPen lineWidth="0.0"/>
				</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[Porcentaje]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="387" y="12" width="115" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0" lineStyle="Double"/>
					<rightPen lineWidth="0.0"/>
				</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 Retención]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="166" y="12" width="112" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0" lineStyle="Double"/>
					<rightPen lineWidth="0.0"/>
				</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 Base]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="12" width="166" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0" lineStyle="Double"/>
					<rightPen lineWidth="0.0"/>
				</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[Descripción]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="6" width="183" height="1"/>
				<graphicElement>
					<pen lineStyle="Dotted"/>
				</graphicElement>
			</line>
			<line>
				<reportElement x="319" y="6" width="183" height="1"/>
				<graphicElement>
					<pen lineStyle="Dotted"/>
				</graphicElement>
			</line>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="0" y="0" width="166" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO} + " - " + $F{DESCCORTA}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="387" y="0" width="115" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_RETENCION}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="278" y="0" width="108" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{PORCENTAJE}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="166" y="0" width="112" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_BASE}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="1">
			<line>
				<reportElement x="0" y="0" width="502" height="1"/>
				<graphicElement>
					<pen lineStyle="Dashed"/>
				</graphicElement>
			</line>
		</band>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
</jasperReport>
