This is an automated email from the git hooks/post-receive script. New commit to branch feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 988f41d4b632ca207d60b07209b8f563e5d2f1b1 Author: dcosse <japbiw74> Date: Fri Jan 23 00:05:08 2015 +0100 refs #769 Leger report generation --- .../chorem/lima/business/LimaServiceConfig.java | 4 +- .../ejb/report/LedgerReportServiceImpl.java | 6 +- .../resources/i18n/lima-business_en_GB.properties | 3 + .../resources/i18n/lima-business_fr_FR.properties | 2 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 56859 -> 56954 bytes .../entryBook/TransactionReport.jrxml | 2 +- .../main/jasperreports/ledger/DocumentReport.jrxml | 285 ------------------- .../jasperreports/ledger/LedgerPeriodReport.jrxml | 301 --------------------- .../chorem/lima/web/action/DocumentService.java | 1 + .../lima/web/action/balance/ReportBuilder.java | 22 +- 10 files changed, 24 insertions(+), 602 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java index aeb870c..b1caf54 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java @@ -451,8 +451,8 @@ public class LimaServiceConfig { ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.transactionReportModelPath", n("lima.config.documentReport.entrybook.transactionReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml", String.class, false, false), GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.generalLedger.documentReportModelPath", n("lima.config.documentReport.generalLedger.documentReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/DocumentReport.jrxml", String.class, false, false), - GENERAL_LEDGER_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerModelPath", n("lima.config.documentReport.generalLedger.generalLedgerModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/generalLedgerReport.jrxml", String.class, false, false), - GENERAL_LEDGER_ENTRY_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath", n("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/generalLedgerEntryReport.jrxml", String.class, false, false), + GENERAL_LEDGER_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerModelPath", n("lima.config.documentReport.generalLedger.generalLedgerModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/GeneralLedgerReport.jrxml", String.class, false, false), + GENERAL_LEDGER_ENTRY_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath", n("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml", String.class, false, false), SCALE("lima.scale", n("lima.config.scale.description"), "2", String.class, false, false), CURRENCY("lima.config.currency", "", "false", Boolean.class, false, false), diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java index a7cbe4e..9c6506e 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java @@ -96,7 +96,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg generalLedger.setCredit(amountCredit); generalLedger.setSolde(amountDebit.subtract(amountCredit)); generalLedger.setSubReportPath(generalLedgerEntryModelPath); - + generalLedger.setNbEntries(balanceTrial.getReportsDatas().size()); result.addGeneralLedgers(generalLedger); Collections.sort(entries, new EntryComparator()); @@ -118,13 +118,13 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg GeneralLedgerEntry generalLedgerEntry = new GeneralLedgerEntryImpl(); generalLedgerEntry.setFormatter(decimalFormat); generalLedgerEntry.setDate(entry.getFinancialTransaction().getTransactionDate()); - generalLedgerEntry.setEntrybook(entryBookCode); + generalLedgerEntry.setEntryBook(entryBookCode); generalLedgerEntry.setVoucher(entry.getVoucher()); generalLedgerEntry.setDescription(entry.getDescription()); generalLedgerEntry.setDebit(entryAmountDebit); generalLedgerEntry.setCredit(entryAmountCredit); generalLedgerEntry.setSolde(entryAmountDebit.subtract(entryAmountCredit)); - + generalLedgerEntry.setNbEntries(entries.size()); generalLedger.addEntries(generalLedgerEntry); } } diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index 5f2474e..7fd8ad5 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -137,6 +137,9 @@ lima.config.documentReport.entrybook.financialPeriodModelPath.description= lima.config.documentReport.entrybook.transactionReportModelPath.description= lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= +lima.config.documentReport.generalLedger.documentReportModelPath.description= +lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description= +lima.config.documentReport.generalLedger.generalLedgerModelPath.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= lima.config.reportvatpdfurl.description= diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 2e901ed..fe80f59 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -138,8 +138,8 @@ lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBookEntry' lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBook' lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' -lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedgerEntry' +lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.httpport.description=Port HTTP lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index 3e18915..50e0d42 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml b/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml index 282875c..dfe6ba9 100644 --- a/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml +++ b/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-21T11:00:00 --> +<!-- 2015-01-22T21:52:42 --> <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="BalanceClassesReport" pageWidth="578" pageHeight="30" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> diff --git a/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml b/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml deleted file mode 100644 index aded66d..0000000 --- a/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml +++ /dev/null @@ -1,285 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-21T10:10:15 --> -<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="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] - <property name="com.jaspersoft.studio.unit." value="pixel"/> - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <style name="Default" isDefault="true" fontName="Arial" fontSize="8"/> - <style name="Bold" fontName="Arial" fontSize="8"/> - <style name="Oblique" fontName="Monospaced" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" fontSize="12" isBold="true"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="fromDate" class="java.util.Date"/> - <field name="toDate" class="java.util.Date"/> - <field name="currency" class="java.lang.String"/> - <field name="generalLedgers" class="java.util.List"/> - <field name="subReportPath" class="java.lang.String"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <field name="fromAccount" class="java.lang.String"/> - <field name="toAccount" class="java.lang.String"/> - <variable name="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalLedgers})]]></variableExpression> - </variable> - <group name="entryBookPeriodReport"/> - <background> - <band splitType="Stretch"/> - </background> - <title> - <band height="41" splitType="Stretch"> - <frame> - <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - </box> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="14" isBold="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{title}]]></textFieldExpression> - </textField> - <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true"> - <reportElement style="Default" x="444" y="0" width="134" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="false"/> - <paragraph rightIndent="5"/> - </textElement> - <textFieldExpression><![CDATA["Edition du: " + new SimpleDateFormat("dd/MM/yyyy à HH:mm").format(new java.util.Date())]]></textFieldExpression> - </textField> - <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="80" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font isBold="true"/> - </textElement> - <textFieldExpression><![CDATA["Du " + new SimpleDateFormat("dd/MM/yyyy").format($F{fromDate})]]></textFieldExpression> - </textField> - <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> - <reportElement style="Default" x="290" y="20" width="80" height="20" forecolor="#736343" uuid="5fc4df4a-5930-4ccd-b450-cf7aac6be57b"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textElement verticalAlignment="Middle"> - <font isBold="true"/> - </textElement> - <textFieldExpression><![CDATA[" au " + new SimpleDateFormat("dd/MM/yyyy").format($F{toDate})]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> - </textField> - </frame> - </band> - </title> - <pageHeader> - <band height="25" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="444" y="9" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="02c35c41-1b1f-4554-ab87-5403d63ae3d6"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> - </textField> - </band> - </pageHeader> - <columnHeader> - <band height="20"> - <frame> - <reportElement style="Column header" mode="Opaque" x="0" y="0" width="578" height="20" forecolor="#D0B48E" backcolor="#FDCA97" uuid="6c2c2b44-eebf-41d3-8b56-47d4a20a4b24"> - <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> - </reportElement> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <staticText> - <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="60" height="20" forecolor="#804000" backcolor="#FFFFFF" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Date]]></text> - </staticText> - <staticText> - <reportElement x="60" y="0" width="40" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Journal]]></text> - </staticText> - <staticText> - <reportElement x="100" y="0" width="40" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Pièce]]></text> - </staticText> - <staticText> - <reportElement x="140" y="0" width="222" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Intitulé]]></text> - </staticText> - <staticText> - <reportElement x="362" y="0" width="72" height="20" forecolor="#804000" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Débit]]></text> - </staticText> - <staticText> - <reportElement x="434" y="0" width="72" height="20" forecolor="#804000" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <box> - <topPen lineColor="#804000"/> - <leftPen lineColor="#804000"/> - <bottomPen lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> - <staticText> - <reportElement x="506" y="0" width="72" height="20" forecolor="#804000" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <box> - <topPen lineColor="#804000"/> - <leftPen lineColor="#804000"/> - <bottomPen lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Solde]]></text> - </staticText> - </frame> - </band> - </columnHeader> - <detail> - <band height="20" splitType="Stretch"> - <subreport isUsingCache="false" runToBottom="false"> - <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> - <dataSourceExpression><![CDATA[$V{entryBookPeriodReport}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> - </subreport> - </band> - </detail> - <pageFooter> - <band height="10" splitType="Stretch"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> - <textField isBlankWhenNull="false"> - <reportElement x="0" y="0" width="288" height="10" uuid="7efdc24b-643b-4927-89e5-30edca53124f"/> - <textElement textAlignment="Right"> - <paragraph lineSpacingSize="0.0"/> - </textElement> - <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> - </textField> - <textField evaluationTime="Report"> - <reportElement x="288" y="0" width="287" height="10" uuid="78cfa3db-28e7-420e-b2e4-441f37387159"/> - <textElement textAlignment="Left"> - <paragraph lineSpacingSize="0.0"/> - </textElement> - <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> - </textField> - </band> - </pageFooter> -</jasperReport> diff --git a/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml b/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml deleted file mode 100644 index 370b349..0000000 --- a/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml +++ /dev/null @@ -1,301 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:29:22 --> -<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="BalanceClassesReport" pageWidth="578" pageHeight="31" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff [...] - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> - <property name="com.jaspersoft.studio.unit." value="pixel"/> - <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> - <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> - <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> - <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> - <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> - <style name="Default" isDefault="true" fontName="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="date" class="java.util.Date"/> - <field name="entryBook" class="java.lang.String"/> - <field name="voucher" class="java.lang.String"/> - <field name="libelle" class="java.lang.String"/> - <field name="debit" class="java.math.BigDecimal"/> - <field name="credit" class="java.math.BigDecimal"/> - <field name="solde" class="java.math.BigDecimal"/> - <field name="period" class="java.lang.String"/> - <field name="accountNumber" class="java.lang.String"/> - <field name="accountLabel" class="java.lang.String"/> - <variable name="totalPeriodDebit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{debit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalPeriodCredit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{credit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalPeriodSolde" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalAccountDebit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{debit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalAccountCredit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{credit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalAccountSolde" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="solde1" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> - </variable> - <pageHeader> - <band height="10"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <frame> - <reportElement mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#D0B48E" backcolor="#FDCA97" uuid="644d4927-8973-45d7-bd80-0512dad33987"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - </box> - <textField> - <reportElement x="0" y="0" width="60" height="10" uuid="be71eb35-fb58-473a-8ac1-07d658474372"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="60" y="0" width="518" height="10" uuid="c2b6613a-5505-4f7b-8aba-79e247b3edc6"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textFieldExpression><![CDATA[$F{accountLabel}]]></textFieldExpression> - </textField> - </frame> - </band> - </pageHeader> - <detail> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="60" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="60" y="0" width="40" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{entryBook}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="100" y="0" width="40" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="140" y="0" width="222" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" uuid="961e8048-c6ef-4b58-a857-31f9f29406c8"> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$F{solde}]]></textFieldExpression> - </textField> - </band> - </detail> - <columnFooter> - <band height="10"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <frame> - <reportElement x="0" y="0" width="578" height="10" uuid="5863f40f-6423-4463-ad4a-c4cecab0323c"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - </box> - <textField> - <reportElement x="362" y="0" width="72" height="10" forecolor="#D0B48E" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <textElement> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$V{totalPeriodDebit}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="434" y="0" width="72" height="10" forecolor="#D0B48E" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <textElement> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$V{totalPeriodCredit}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="506" y="0" width="72" height="10" forecolor="#D0B48E" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> - <textElement> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$V{totalPeriodSolde}]]></textFieldExpression> - </textField> - <staticText> - <reportElement x="0" y="0" width="362" height="10" forecolor="#D0B48E" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <textElement> - <font size="8"/> - </textElement> - <text><![CDATA[Sous total + $F{period}]]></text> - </staticText> - </frame> - </band> - </columnFooter> -</jasperReport> diff --git a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java index 4db1fe4..3369e9a 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -116,6 +116,7 @@ public class DocumentService { balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); + ledgerReportService = LimaServiceFactory.getService(LedgerReportService.class); reportBuilder = new ReportBuilder(); diff --git a/lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java b/lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java index 6862217..a7cf255 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java @@ -48,9 +48,10 @@ public class ReportBuilder { private static final Log log = LogFactory.getLog(ReportBuilder.class); - protected JasperReport balanceReport; - protected JasperReport generalEntryBookReport; - protected JasperReport entryBookReport; + protected JasperReport balanceDocumentReport; + protected JasperReport generalEntryBookDocumentReport; + protected JasperReport entryBookDocumentReport; + protected JasperReport generalLedgerDocumentReport; protected Map<DocumentsEnum, JasperReport> reportsByDocumentType; public ReportBuilder() { @@ -58,14 +59,17 @@ public class ReportBuilder { LimaServiceConfig config = LimaServiceConfig.getInstance(); // compile phase - balanceReport= JasperCompileManager.compileReport(config.getBalanceDocumentReportModelPath()); - generalEntryBookReport = JasperCompileManager.compileReport(config.getGeneralEntryBookDocumentReportModelPath()); - entryBookReport = JasperCompileManager.compileReport(config.getEntryBookDocumentReportModelPath()); + balanceDocumentReport = JasperCompileManager.compileReport(config.getBalanceDocumentReportModelPath()); + generalEntryBookDocumentReport = JasperCompileManager.compileReport(config.getGeneralEntryBookDocumentReportModelPath()); + entryBookDocumentReport = JasperCompileManager.compileReport(config.getEntryBookDocumentReportModelPath()); + generalLedgerDocumentReport = JasperCompileManager.compileReport(config.getGeneralLedgerDocumentReportModelPath()); + reportsByDocumentType = Maps.newHashMap(); - reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceReport); - reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRYBOOK, generalEntryBookReport); - reportsByDocumentType.put(DocumentsEnum.ENTRYBOOKS, entryBookReport); + reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceDocumentReport); + reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRYBOOK, generalEntryBookDocumentReport); + reportsByDocumentType.put(DocumentsEnum.ENTRYBOOKS, entryBookDocumentReport); + reportsByDocumentType.put(DocumentsEnum.LEDGER, generalLedgerDocumentReport); } catch (JRException e) { throw new LimaTechnicalException(e); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.