<?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" language="groovy" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="244"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/cartera/pdf_factura"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["/home/alexiab/Desktop/2013/Reportes Jasper/Reportes Jasper Cartera-Pos/Factura/"]]></defaultValueExpression>
	</parameter>
	<parameter name="id_factura" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select tab0.*

from(

    select
    tab1.*,tab3.encabezado, tab3.pie_pagina, tab2.sec_factura, tab2.fecha_facturacion, tab2.id_caja,tab2.cajero,
    tab2.porc_dcto as porc_dcto_fact,tab2.valor_dcto as valor_dcto_fact,tab2.estado,
    tab4.num_doc, tab4.razon_soc, tab7.direccion, tab7.tel, tab7.ciudad,
    tab2.valor_bruto, tab2.valor_iva,tab2.valor_total, tab6.valor AS VALOR_CONSIGNADO,
    tab5.codigo,tab5.descripcion,
    caj.num_doc as num_doc_cajero,
    caj.razon_soc as nombre_cajero,
    caja.prefijo,
    caja.ubicacion

    from ca_factura_prod tab1
    join ca_factura_pos tab2 ON tab1.id_factura = tab2.id_factura
    join ca_punto_venta tab3 ON tab3.id_punto_venta = tab2.id_punto_venta
    join interceros_v tab4 ON tab4.id_mae_ter = tab2.id_mae_ter
    join ca_producto tab5 ON tab5.id_producto = tab1.id_producto
    join(
        select id_factura,sum(nvl(valor,0)) as VALOR
        from ca_factura_pago
        group by id_factura
    )tab6 ON tab6.id_factura = tab1.id_factura
    join INTERCEROS_DU_DIR_V tab7 ON tab7.id_mae_ter = tab4.id_mae_ter

    join interceros_v caj ON caj.id_mae_ter = tab2.cajero

    join ca_caja caja on caja.id_caja = tab2.id_caja

)tab0

where tab0.id_factura = $P{id_factura}]]>
	</queryString>
	<field name="ID_FACTURA_PROD" class="java.math.BigDecimal"/>
	<field name="ID_FACTURA" class="java.math.BigDecimal"/>
	<field name="ID_PRODUCTO" class="java.math.BigDecimal"/>
	<field name="CANTIDAD" class="java.math.BigDecimal"/>
	<field name="VALOR_UNI_BRUTO" class="java.math.BigDecimal"/>
	<field name="VALOR_UNI_IVA" class="java.math.BigDecimal"/>
	<field name="VALOR_UNI_TOTAL" class="java.math.BigDecimal"/>
	<field name="REFERENCIA" class="java.lang.String"/>
	<field name="POR_IVA" class="java.math.BigDecimal"/>
	<field name="VALOR_DCTO" class="java.math.BigDecimal"/>
	<field name="PORC_DCTO" class="java.math.BigDecimal"/>
	<field name="ENCABEZADO" class="java.lang.String"/>
	<field name="PIE_PAGINA" class="java.lang.String"/>
	<field name="SEC_FACTURA" class="java.math.BigDecimal"/>
	<field name="FECHA_FACTURACION" class="java.sql.Timestamp"/>
	<field name="ID_CAJA" class="java.math.BigDecimal"/>
	<field name="CAJERO" class="java.math.BigDecimal"/>
	<field name="PORC_DCTO_FACT" class="java.math.BigDecimal"/>
	<field name="VALOR_DCTO_FACT" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="RAZON_SOC" 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="VALOR_BRUTO" class="java.math.BigDecimal"/>
	<field name="VALOR_IVA" class="java.math.BigDecimal"/>
	<field name="VALOR_TOTAL" class="java.math.BigDecimal"/>
	<field name="VALOR_CONSIGNADO" class="java.math.BigDecimal"/>
	<field name="CODIGO" class="java.lang.String"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="NUM_DOC_CAJERO" class="java.lang.String"/>
	<field name="NOMBRE_CAJERO" class="java.lang.String"/>
	<field name="PREFIJO" class="java.lang.String"/>
	<field name="UBICACION" class="java.lang.String"/>
	<variable name="sum_cantidad" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{CANTIDAD}]]></variableExpression>
	</variable>
	<variable name="sum_total" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_UNI_TOTAL}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="40" splitType="Stretch">
			<image>
				<reportElement x="0" y="0" width="140" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<textField isStretchWithOverflow="true">
				<reportElement stretchType="RelativeToBandHeight" x="140" y="0" width="338" height="40"/>
				<box topPadding="3"/>
				<textElement textAlignment="Center" markup="html">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ENCABEZADO}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="145" splitType="Stretch">
			<textField>
				<reportElement x="153" y="22" width="262" height="10"/>
				<box leftPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SEC_FACTURA}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy  HH:mm" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="153" y="32" width="262" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<textElement 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.sql.Timestamp"><![CDATA[$F{FECHA_FACTURACION}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="33" y="72" width="85" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<textElement 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[Cliente : ]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="33" y="84" width="85" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<textElement 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/C.C : ]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="33" y="96" width="85" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<textElement 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[Dirección : ]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="33" y="108" width="85" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<textElement 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>
			<staticText>
				<reportElement mode="Transparent" x="33" y="120" width="85" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<textElement 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>
			<textField>
				<reportElement x="118" y="84" width="297" height="12"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="118" y="96" width="297" height="12"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIRECCION}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="118" y="108" width="297" height="12"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TEL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="118" y="120" width="297" height="12"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CIUDAD}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="118" y="72" width="297" height="12"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZON_SOC}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="19" y="144" width="535" height="1"/>
				<graphicElement>
					<pen lineStyle="Dashed"/>
				</graphicElement>
			</line>
			<staticText>
				<reportElement x="33" y="22" width="120" height="10"/>
				<box leftPadding="2"/>
				<textElement>
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[FACTURA DE VENTA No : ]]></text>
			</staticText>
			<staticText>
				<reportElement x="33" y="32" width="120" height="10"/>
				<box leftPadding="2"/>
				<textElement>
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Fecha: ]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="33" y="60" width="85" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<textElement 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[Vendedor : ]]></text>
			</staticText>
			<textField>
				<reportElement x="118" y="60" width="297" height="12"/>
				<textElement verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC_CAJERO} + " " + $F{NOMBRE_CAJERO}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="153" y="42" width="262" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<textElement 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{PREFIJO} + " - " + $F{UBICACION}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="33" y="42" width="120" height="10"/>
				<box leftPadding="2"/>
				<textElement>
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Caja No.: ]]></text>
			</staticText>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="13" splitType="Stretch">
			<staticText>
				<reportElement mode="Transparent" x="19" y="0" width="85" 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[Código]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="104" y="0" width="160" 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>
			<staticText>
				<reportElement mode="Transparent" x="264" y="0" width="41" 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[Cantidad]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="478" y="0" width="77" 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[Total]]></text>
			</staticText>
			<line>
				<reportElement x="20" y="12" width="535" height="1"/>
				<graphicElement>
					<pen lineStyle="Dashed"/>
				</graphicElement>
			</line>
			<staticText>
				<reportElement mode="Transparent" x="305" y="1" width="70" 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[Precio Unitario]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="375" y="1" width="32" 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="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[% Dcto.]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="406" y="0" width="72" 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[Descuento Uni.]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="11" splitType="Stretch">
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="305" y="0" width="70" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2">
					<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="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[($F{VALOR_UNI_TOTAL}+($F{VALOR_DCTO}*$F{CANTIDAD})) / $F{CANTIDAD}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="478" y="0" width="77" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2">
					<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="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_UNI_TOTAL}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="19" y="0" width="85" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center" 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}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="264" y="0" width="41" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2">
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center" 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{CANTIDAD}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="104" y="0" width="160" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<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{DESCRIPCION}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="375" y="0" width="31" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2">
					<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="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{PORC_DCTO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="406" y="0" width="72" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box rightPadding="2">
					<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="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_DCTO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="62" splitType="Stretch">
			<textField pattern="" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="19" y="0" width="536" height="62" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="html">
					<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{PIE_PAGINA}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band height="219" splitType="Stretch">
			<staticText>
				<reportElement mode="Transparent" x="19" y="12" width="245" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineStyle="Solid"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineStyle="Solid"/>
					<bottomPen lineStyle="Solid"/>
					<rightPen lineStyle="Solid"/>
				</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[Tot. Unidad :]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="305" y="12" width="173" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineStyle="Solid"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineStyle="Solid"/>
					<bottomPen lineStyle="Solid"/>
					<rightPen lineStyle="Solid"/>
				</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[TOTAL :]]></text>
			</staticText>
			<textField>
				<reportElement mode="Transparent" x="264" y="12" width="41" height="12" forecolor="#000000" backcolor="#CBE3F9"/>
				<box>
					<pen lineStyle="Solid"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineStyle="Solid"/>
					<bottomPen lineStyle="Solid"/>
					<rightPen lineStyle="Solid"/>
				</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>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_cantidad}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="478" y="12" width="76" height="12" forecolor="#000000" backcolor="#D2D0D0"/>
				<box>
					<pen lineStyle="Solid"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineStyle="Solid"/>
					<bottomPen lineStyle="Solid"/>
					<rightPen lineStyle="Solid"/>
				</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>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_total}-$F{VALOR_DCTO_FACT}]]></textFieldExpression>
			</textField>
			<subreport>
				<reportElement stretchType="RelativeToBandHeight" x="28" y="142" width="502" height="62"/>
				<subreportParameter name="id_factura">
					<subreportParameterExpression><![CDATA[$F{ID_FACTURA}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="cambio">
					<subreportParameterExpression><![CDATA[$F{VALOR_CONSIGNADO}-$F{VALOR_TOTAL}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:pdf_factura_pago.jrxml"]]></subreportExpression>
			</subreport>
			<line>
				<reportElement x="20" y="0" width="535" height="1"/>
				<graphicElement>
					<pen lineStyle="Dashed"/>
				</graphicElement>
			</line>
			<subreport>
				<reportElement stretchType="RelativeToTallestObject" x="28" y="80" width="502" height="50" isRemoveLineWhenBlank="true"/>
				<subreportParameter name="id_factura">
					<subreportParameterExpression><![CDATA[$F{ID_FACTURA}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="cambio">
					<subreportParameterExpression><![CDATA[$F{VALOR_CONSIGNADO}-$F{VALOR_TOTAL}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:pdf_factura_reten.jrxml"]]></subreportExpression>
			</subreport>
			<line>
				<reportElement x="348" y="43" width="183" height="1"/>
				<graphicElement>
					<pen lineStyle="Dotted"/>
				</graphicElement>
			</line>
			<staticText>
				<reportElement x="29" y="37" width="502" height="12"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[[ INFORMACIÓN TRIBUTARIA ]]]></text>
			</staticText>
			<line>
				<reportElement x="29" y="43" width="183" height="1"/>
				<graphicElement>
					<pen lineStyle="Dotted"/>
				</graphicElement>
			</line>
			<subreport>
				<reportElement stretchType="RelativeToTallestObject" x="28" y="50" width="502" height="10" isRemoveLineWhenBlank="true"/>
				<subreportParameter name="id_factura">
					<subreportParameterExpression><![CDATA[$F{ID_FACTURA}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="cambio">
					<subreportParameterExpression><![CDATA[$F{VALOR_CONSIGNADO}-$F{VALOR_TOTAL}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:pdf_factura_iva"]]></subreportExpression>
			</subreport>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="478" y="0" width="76" height="12" forecolor="#000000" backcolor="#D2D0D0"/>
				<box>
					<pen lineStyle="Solid"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineStyle="Solid"/>
					<bottomPen lineStyle="Solid"/>
					<rightPen lineStyle="Solid"/>
				</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>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{PORC_DCTO_FACT}>0?$F{VALOR_DCTO_FACT}:null]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="305" y="0" width="173" height="12" forecolor="#000000" backcolor="#D2D0D0"/>
				<box>
					<pen lineStyle="Solid"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineStyle="Solid"/>
					<bottomPen lineStyle="Solid"/>
					<rightPen lineStyle="Solid"/>
				</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>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PORC_DCTO_FACT}>0?"Descuento Global "+$F{PORC_DCTO_FACT}.toString()+"% :":" "]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="204" width="572" height="15"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[( $F{ESTADO}==0 ? "FACTURA ANULADA": "" )]]></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>
