branch feature/1241-account-report updated (92fe79e -> 901a044)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git from 92fe79e refs #1241 gérération des rapport de compte avec Jasper new c93c0d5 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné new 901a044 refs #1241 modification de l'affichage des infos The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 901a04485aeac499784770520e4f44cb34315eb2 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 12:05:27 2015 +0200 refs #1241 modification de l'affichage des infos commit c93c0d5cf4b5cb4e1b07b05abc29268a1d7b8a50 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 10:14:15 2015 +0200 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné Summary of changes: .../ejb/report/AccountReportServiceImpl.java | 14 +++++- .../jasperreports/account/AccountEntry.jrxml | 52 +++++++++++----------- .../jasperreports/account/DocumentReport.jrxml | 30 +++++++++---- 3 files changed, 59 insertions(+), 37 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit c93c0d5cf4b5cb4e1b07b05abc29268a1d7b8a50 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 10:14:15 2015 +0200 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné --- .../org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 8251a9a..aa08a2c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -72,7 +72,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc if (CollectionUtils.isNotEmpty(entries)) { for (Entry entry : entries) { - if (entry.getAmount() == null || BigDecimal.ZERO.equals(entry.getAmount())) { + if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { continue; } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 901a04485aeac499784770520e4f44cb34315eb2 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 12:05:27 2015 +0200 refs #1241 modification de l'affichage des infos --- .../ejb/report/AccountReportServiceImpl.java | 12 ++++- .../jasperreports/account/AccountEntry.jrxml | 52 +++++++++++----------- .../jasperreports/account/DocumentReport.jrxml | 30 +++++++++---- 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index aa08a2c..d43dd90 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -63,6 +63,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); if (from != null && to != null && account != null) { + String fromAccountLabel = account.getAccountNumber(); Collection<AccountEntry> accountEntries = new ArrayList<>(); @@ -71,7 +72,6 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc if (CollectionUtils.isNotEmpty(entries)) { for (Entry entry : entries) { - if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { continue; } @@ -98,6 +98,16 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); + if (CollectionUtils.isEmpty(accountEntries)) { + fromAccountLabel += ", aucune entrée trouvé sur ce compte"; + } else if (accountEntries.size() == 1){ + fromAccountLabel += ", et son compte fils"; + } else { + fromAccountLabel += ", et ses comptes fils"; + } + + documentReport.setFromAccount(fromAccountLabel); + } else { if (log.isWarnEnabled()) { log.warn("No account present"); diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml index 319105e..e46f3df 100644 --- a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-06-27T00:41:06 --> +<!-- 2015-06-29T11:10:52 --> <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"/> @@ -42,9 +42,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -59,15 +59,15 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> <paragraph lineSpacingSize="0.0" leftIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{transactionDate}]]></textFieldExpression> + <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy à HH:mm").format($F{transactionDate})]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="146" y="0" width="36" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> @@ -79,9 +79,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -98,13 +98,13 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> + <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> + <paragraph lineSpacingSize="0.0" leftIndent="2" rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> </textField> @@ -117,13 +117,13 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> + <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> + <paragraph lineSpacingSize="0.0" leftIndent="2" rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression> </textField> @@ -138,9 +138,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right"> <font size="8" isBold="false"/> @@ -155,9 +155,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -172,9 +172,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -194,10 +194,10 @@ <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"/> + <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> <textField> <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml index 6b60042..f753198 100644 --- a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-06-27T00:11:53 --> +<!-- 2015-06-29T11:12:29 --> <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"/> @@ -11,16 +11,17 @@ <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="accounts" class="java.util.List"/> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="currency" class="java.lang.String"/> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="fromAccount" class="java.lang.String"/> + <field name="fromDate" class="java.util.Date"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="title" class="java.lang.String"/> + <field name="toDate" class="java.util.Date"/> <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> </variable> @@ -90,7 +91,7 @@ </band> </title> <pageHeader> - <band height="45" splitType="Stretch"> + <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"/> @@ -101,6 +102,17 @@ </textElement> <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="5b52edd4-5983-4e67-8b3f-9e89cfe43818"> + <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> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm