billing/input-files/DEMO/jasper/RETAIL/invoice/invoice.jrxml
2025-02-18 14:52:38 +03:00

433 lines
20 KiB
XML

<?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="Invoice" language="groovy" pageWidth="595" pageHeight="842" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isSummaryNewPage="true" uuid="801855a9-548e-443b-81d5-d27d42b5df88">
<property name="ireport.zoom" value="1.4641000000000017"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="84"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#FFBFBF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_CH" mode="Opaque" backcolor="#FFBFBF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 2_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2_CH" mode="Opaque" backcolor="#FFBFBF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Style_1" backcolor="#CCCCCC"/>
<style name="Text Body" mode="Opaque"/>
<style name="table 3">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 3_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<topPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<topPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<topPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 4_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 5_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<parameter name="logoPath" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["./"]]></defaultValueExpression>
</parameter>
<parameter name="messagePath" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["./"]]></defaultValueExpression>
</parameter>
<parameter name="xmlDateFormat" class="java.lang.String" isForPrompting="false">
<parameterDescription><![CDATA[]]></parameterDescription>
<defaultValueExpression><![CDATA["dd/MM/yyyy"]]></defaultValueExpression>
</parameter>
<queryString language="xPath">
<![CDATA[/invoice]]>
</queryString>
<field name="user_name" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/detail/userAccounts/userAccount/name/name]]></fieldDescription>
</field>
<field name="customerID" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/@customerAccountCode]]></fieldDescription>
</field>
<field name="invoiceDate" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/invoiceDate]]></fieldDescription>
</field>
<field name="baName" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/name/name]]></fieldDescription>
</field>
<field name="baFirstName" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/name/firstName]]></fieldDescription>
</field>
<field name="baAddrLine1" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/address/address1]]></fieldDescription>
</field>
<field name="baAddrLine2" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/address/address2]]></fieldDescription>
</field>
<field name="baAddrLine3" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/address/address3]]></fieldDescription>
</field>
<field name="baAddrCity" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/address/city]]></fieldDescription>
</field>
<field name="baAddrZip" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/address/postalCode]]></fieldDescription>
</field>
<field name="invoiceNumber" class="java.lang.String">
<fieldDescription><![CDATA[@number]]></fieldDescription>
</field>
<field name="externalRef1" class="java.lang.String">
<fieldDescription><![CDATA[/invoice/header/billingAccount/@externalRef1]]></fieldDescription>
</field>
<field name="providerAddrName" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_NAME"]]]></fieldDescription>
</field>
<field name="providerAddrLine1" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_LINE1"]]]></fieldDescription>
</field>
<field name="providerAddrLine2" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_LINE2"]]]></fieldDescription>
</field>
<field name="providerAddrZip" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_ZIP"]]]></fieldDescription>
</field>
<field name="providerAddrCity" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_CITY"]]]></fieldDescription>
</field>
<field name="providerAddrPhone" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_PHONE"]]]></fieldDescription>
</field>
<field name="providerAddrEmail" class="java.lang.String">
<fieldDescription><![CDATA[header/seller/customFields/customField[@code="CF_PROVIDER_ADDR_EMAIL"]]]></fieldDescription>
</field>
<group name="1">
<groupHeader>
<band height="172">
<elementGroup>
<rectangle radius="10">
<reportElement mode="Transparent" x="275" y="2" width="300" height="131" forecolor="#999999" uuid="21909fd2-6e38-4625-9533-41b75b6332c7"/>
<graphicElement>
<pen lineWidth="0.5" lineStyle="Dotted"/>
</graphicElement>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement x="307" y="69" width="237" height="16" uuid="eace4da8-07b1-4504-a427-22176845bbe8"/>
<textElement verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{baAddrLine2}.toUpperCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="307" y="92" width="237" height="16" uuid="e66640ae-3aa8-4545-b4bc-06f22b547e92"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{baAddrZip}.toUpperCase() + " " + $F{baAddrCity}.toUpperCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="307" y="27" width="237" height="16" uuid="1b9ca876-6b40-4fa6-bbcf-394b22d7a0f0"/>
<textElement>
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{baName}.toUpperCase() + " " +$F{baFirstName}.toUpperCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="307" y="48" width="237" height="16" uuid="d439f021-83cc-4fd0-b885-fe61586811dd"/>
<textElement>
<font fontName="DejaVu Sans" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{baAddrLine1}.toUpperCase()]]></textFieldExpression>
</textField>
</elementGroup>
<elementGroup>
<rectangle radius="10">
<reportElement mode="Transparent" x="16" y="1" width="240" height="132" forecolor="#999999" uuid="5d771da5-cddf-4296-897c-e7adc32d4c81"/>
<graphicElement>
<pen lineWidth="0.5" lineStyle="Dotted"/>
</graphicElement>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement x="34" y="68" width="189" height="16" uuid="4fd58fe3-d8a3-4baf-a42c-1b86c607199c"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{providerAddrZip}.toUpperCase() + " " + $F{providerAddrCity}.toUpperCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="34" y="17" width="189" height="16" uuid="d69099f6-c42c-4e36-8204-7bf7f9547ea6"/>
<textElement>
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{providerAddrName}.toUpperCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="34" y="34" width="189" height="16" uuid="bf5dba70-28ef-401e-926c-a71816ab8050"/>
<textElement>
<font fontName="DejaVu Sans" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{providerAddrLine1}.toUpperCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="34" y="50" width="189" height="16" uuid="b210865e-8bcd-48b0-9099-d0920440114a"/>
<textElement verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$F{providerAddrLine2}.toUpperCase()]]></textFieldExpression>
</textField>
</elementGroup>
<textField isBlankWhenNull="true">
<reportElement x="34" y="88" width="189" height="16" uuid="87fb30c8-ddb4-4893-b835-8399a290677b"/>
<textElement verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="10" isItalic="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{providerAddrPhone}.toLowerCase()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="34" y="104" width="189" height="16" uuid="ec800b79-62b2-4b6a-9a43-edeb3aed38e8"/>
<textElement verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="10" isItalic="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{providerAddrEmail}.toLowerCase()]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
<group name="2">
<groupHeader>
<band height="52">
<subreport isUsingCache="true" runToBottom="false">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="0" width="509" height="52" uuid="b44bd58e-33aa-493f-b247-b40b3da8d9e3"/>
<subreportParameter name="xmlDateFormat">
<subreportParameterExpression><![CDATA[$P{xmlDateFormat}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/invoice/header/categories/category")]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{messagePath}+"/invoice_categories.jasper"]]></subreportExpression>
</subreport>
</band>
</groupHeader>
</group>
<group name="3">
<groupHeader>
<band height="50">
<break>
<reportElement isPrintRepeatedValues="false" x="0" y="49" width="100" height="1" uuid="46b6e50d-bba8-4b7c-a6f7-bdf27555ae59"/>
</break>
<subreport isUsingCache="true" runToBottom="false">
<reportElement isPrintRepeatedValues="false" x="0" y="0" width="509" height="49" uuid="3c6dcd4b-38d1-4096-b8cd-54f56b3ae9f7"/>
<subreportParameter name="xmlDateFormat">
<subreportParameterExpression><![CDATA[$P{xmlDateFormat}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/invoice")]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{messagePath}+"/invoice_tva.jasper"]]></subreportExpression>
</subreport>
</band>
</groupHeader>
</group>
<group name="4">
<groupHeader>
<band height="55">
<subreport isUsingCache="false" runToBottom="false">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="1" y="0" width="508" height="52" isPrintWhenDetailOverflows="true" uuid="973ef3bd-d5d1-4db9-b2d8-1d5dd659abca"/>
<subreportParameter name="xmlDateFormat">
<subreportParameterExpression><![CDATA[$P{xmlDateFormat}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/invoice/detail/userAccounts/userAccount/categories/category/subCategories/subCategory/line")]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{messagePath}+"/invoice_detail.jasper"]]></subreportExpression>
</subreport>
</band>
</groupHeader>
</group>
<pageHeader>
<band height="125">
<rectangle>
<reportElement mode="Opaque" x="371" y="24" width="209" height="51" forecolor="#CCCCCC" backcolor="#CCCCCC" uuid="301bc202-ec47-4be4-9144-1ccecccd72cc"/>
</rectangle>
<textField isStretchWithOverflow="true" pattern="yyyy-MM-dd" isBlankWhenNull="true">
<reportElement mode="Transparent" x="445" y="36" width="135" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="9254a0b5-42c6-4759-be1f-610ef29327b3"/>
<box rightPadding="2"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[new SimpleDateFormat($P{xmlDateFormat}).parse($F{invoiceDate})]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Transparent" x="371" y="36" width="72" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="a3d705b3-efa8-4e0a-b1fd-43a8afbaee78"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="10"/>
</textElement>
<text><![CDATA[Invoice date]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="371" y="23" width="72" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="a5410dab-b69a-4ee2-bdd6-403382a425c5"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="10"/>
</textElement>
<text><![CDATA[Invoice #]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement mode="Transparent" x="445" y="49" width="135" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="308017f9-1ac8-4d9f-b0b0-4c9ab71b95c6"/>
<box rightPadding="2"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{customerID}]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Transparent" x="371" y="49" width="72" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="eeeeba3a-51db-4f25-a733-597f7ea27d5c"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="10"/>
</textElement>
<text><![CDATA[Customer]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement mode="Transparent" x="445" y="23" width="135" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="69f91cb5-f806-42cc-9588-2dbf3007fbd6"/>
<box rightPadding="2"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{invoiceNumber}]]></textFieldExpression>
</textField>
<image scaleImage="RetainShape" vAlign="Middle">
<reportElement x="32" y="17" width="275" height="80" uuid="d4627a82-65e4-4ae1-b1ed-073b03a7181c"/>
<imageExpression><![CDATA[$P{logoPath}+"logo.png"]]></imageExpression>
</image>
<staticText>
<reportElement mode="Transparent" x="371" y="62" width="73" height="13" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="c2c6a38e-5881-47fe-bb02-14f63e25dd58"/>
<textElement textAlignment="Justified" markup="none">
<font fontName="DejaVu Sans" size="10"/>
</textElement>
<text><![CDATA[VAT Number]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement mode="Transparent" x="445" y="62" width="133" height="13" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC" uuid="3c60aac9-32a2-4acb-9cd4-761211af9c8c"/>
<textElement textAlignment="Right" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{externalRef1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="532" y="99" width="41" height="20" uuid="1352ea8c-67df-4e57-a78f-1218fd2a572a"/>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+"/"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="232" y="97" width="139" height="26" uuid="1f8cc5fb-84b3-4574-aa35-c72f4478d00a">
<printWhenExpression><![CDATA[$V{PAGE_NUMBER}!=1]]></printWhenExpression>
</reportElement>
<box leftPadding="2"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="DejaVu Sans" isBold="true"/>
</textElement>
<text><![CDATA[Appendix<br/>]]></text>
</staticText>
<textField evaluationTime="Report">
<reportElement x="561" y="99" width="19" height="20" uuid="70ddbde0-a609-410d-8301-143597ebd6fe"/>
<textElement textAlignment="Right" markup="html">
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
</jasperReport>