<?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_iva" language="groovy" pageWidth="502" pageHeight="600" orientation="Landscape" columnWidth="502" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="3.0"/>
	<property name="ireport.x" value="256"/>
	<property name="ireport.y" value="0"/>
	<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="id_factura" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="cambio" class="java.math.BigDecimal"/>
	<queryString>
		<![CDATA[select

por_iva,
sum(valor_uni_iva*cantidad) as valor_iva,
sum((valor_uni_total)-(valor_uni_iva*cantidad)) as valor_bruto
from ca_factura_prod tab0
where tab0.id_factura = $P{id_factura}
group by tab0.POR_IVA

order by tab0.POR_IVA]]>
	</queryString>
	<field name="POR_IVA" class="java.math.BigDecimal"/>
	<field name="VALOR_IVA" class="java.math.BigDecimal"/>
	<field name="VALOR_BRUTO" class="java.math.BigDecimal"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<detail>
		<band height="10" splitType="Stretch">
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="373" y="0" width="129" 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_IVA}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="345" y="0" width="28" 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.lang.String"><![CDATA[$F{POR_IVA}+"%"]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="0" y="0" width="103" height="10" forecolor="#000000" backcolor="#CBE3F9"/>
				<box leftPadding="2"/>
				<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[Base Gravada (*)]]></text>
			</staticText>
			<textField pattern="#,##0.00" isBlankWhenNull="false">
				<reportElement mode="Transparent" x="103" y="0" width="145" 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_BRUTO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="248" y="0" width="97" height="10" forecolor="#000000" backcolor="#CBE3F9"/>
				<box leftPadding="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>
				<text><![CDATA[IVA]]></text>
			</staticText>
		</band>
	</detail>
	<columnFooter>
		<band height="1">
			<line>
				<reportElement x="0" y="0" width="502" height="1"/>
				<graphicElement>
					<pen lineStyle="Dashed"/>
				</graphicElement>
			</line>
		</band>
	</columnFooter>
</jasperReport>
