<?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="Retenciones" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="2.143588810000006"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="108"/>
	<queryString>
		<![CDATA[select
ts.ID_TS_IM,
ts.ID_CIA,
ts.ID_CLASE_CUENTA,
ts.ID_GRUPO_CUENTA,
ts.ID_CUENTA_MAYOR,
ts.ID_CATALOGO,
ts.ID_AUXILIAR,
ts.ID_MAE_TER,
ts.NATURALEZA,
subc.DIGITOS,
subc.NOMBRE,
aux.COD_AUX,
aux.NOMBRE as nom_aux,
ter.NITOCC,
ter.NOMBRE as nom_ter
from CNI_TS_IM ts

JOIN CN_SUBC_DIGITOS subc ON
subc.id_clase_cuenta = ts.id_clase_cuenta
AND subc.id_grupo_cuenta = ts.id_grupo_cuenta
AND subc.id_cuenta_mayor = ts.id_cuenta_mayor
AND subc.id_catalogo = ts.id_catalogo

left join CN_AUXILIAR aux
on aux.ID_AUXILIAR = ts.ID_AUXILIAR
and aux.ID_CIA = ts.ID_CIA

left join CN_MAE_TER ter
on ter.ID_MAE_TER = ts.ID_MAE_TER
and ter.ID_CIA = ts.ID_CIA

order by
ID_TS_IM]]>
	</queryString>
	<field name="ID_TS_IM" class="java.math.BigDecimal"/>
	<field name="ID_CIA" class="java.math.BigDecimal"/>
	<field name="ID_CLASE_CUENTA" class="java.math.BigDecimal"/>
	<field name="ID_GRUPO_CUENTA" class="java.math.BigDecimal"/>
	<field name="ID_CUENTA_MAYOR" class="java.math.BigDecimal"/>
	<field name="ID_CATALOGO" class="java.math.BigDecimal"/>
	<field name="ID_AUXILIAR" class="java.math.BigDecimal"/>
	<field name="ID_MAE_TER" class="java.math.BigDecimal"/>
	<field name="NATURALEZA" class="java.lang.String"/>
	<field name="DIGITOS" class="java.lang.String"/>
	<field name="NOMBRE" class="java.lang.String"/>
	<field name="COD_AUX" class="java.lang.String"/>
	<field name="NOM_AUX" class="java.lang.String"/>
	<field name="NITOCC" class="java.lang.String"/>
	<field name="NOM_TER" class="java.lang.String"/>
	<group name="Group 1">
		<groupExpression><![CDATA[]]></groupExpression>
	</group>
	<group name="Group 2">
		<groupExpression><![CDATA[]]></groupExpression>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="64" splitType="Stretch">
			<staticText>
				<reportElement x="0" y="0" width="400" height="57"/>
				<textElement>
					<font size="22" isBold="true"/>
				</textElement>
				<text><![CDATA[WEBSAFI-ERP®
Sistema de Contabilidad General]]></text>
			</staticText>
			<image>
				<reportElement x="501" y="14" width="250" height="32"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
		</band>
	</title>
	<pageHeader>
		<band height="32" splitType="Stretch">
			<staticText>
				<reportElement x="0" y="0" width="400" height="20"/>
				<textElement verticalAlignment="Middle">
					<font size="16" isBold="true"/>
				</textElement>
				<text><![CDATA[Parametrización retenciones]]></text>
			</staticText>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="12" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="40" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Id Imp]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="672" y="0" width="80" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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[Naturaleza]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="40" y="0" width="50" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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[Cuenta]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="90" y="0" width="212" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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[Nombre]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="302" y="0" width="50" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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[Cod Aux]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="352" y="0" width="120" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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[Auxiliar]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="472" y="0" width="80" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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 o CC]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="552" y="0" width="120" height="12" forecolor="#000000" backcolor="#64B0F7"/>
				<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[Tercero]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField>
				<reportElement x="0" y="0" width="40" height="10"/>
				<box leftPadding="3">
					<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.math.BigDecimal"><![CDATA[$F{ID_TS_IM}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="672" y="0" width="80" height="10"/>
				<box leftPadding="3">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[($F{NATURALEZA}.toString()=="D" ? "Débito" : "Crédito" )]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="40" y="0" width="50" height="10"/>
				<box leftPadding="3">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIGITOS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="90" y="0" width="212" height="10"/>
				<box leftPadding="3">
					<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{NOMBRE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="302" y="0" width="50" height="10"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COD_AUX}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="352" y="0" width="120" height="10"/>
				<box leftPadding="3">
					<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{NOM_AUX}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="472" y="0" width="80" height="10"/>
				<box leftPadding="0" 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{NITOCC}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="552" y="0" width="120" height="10"/>
				<box leftPadding="3">
					<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{NOM_TER}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="16" splitType="Stretch">
			<textField>
				<reportElement x="631" y="0" width="80" height="16"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Página "+$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="711" y="0" width="40" height="16"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="0" width="91" height="16"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Reporte generado el:]]></text>
			</staticText>
			<staticText>
				<reportElement x="324" y="0" width="149" height="16"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Software House Ltda. © 2011]]></text>
			</staticText>
			<textField pattern="dd MMMMM yyyy">
				<reportElement x="91" y="0" width="73" height="16"/>
				<textElement verticalAlignment="Middle">
					<font size="8" isItalic="true" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField pattern="h.mm a">
				<reportElement x="164" y="0" width="85" height="16"/>
				<textElement verticalAlignment="Middle">
					<font size="8" isItalic="true" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<image>
				<reportElement x="304" y="0" width="17" height="16"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:favicon.jpg"]]></imageExpression>
			</image>
		</band>
	</pageFooter>
</jasperReport>
