Lima-commits
Threads by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
August 2010
- 3 participants
- 42 discussions
Author: tchemit
Date: 2010-08-29 16:23:03 +0200 (Sun, 29 Aug 2010)
New Revision: 3031
Url: http://chorem.org/repositories/revision/lima/3031
Log:
Utilisation de mavenpom4redmine 2.2.4
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-08-27 17:29:13 UTC (rev 3030)
+++ trunk/pom.xml 2010-08-29 14:23:03 UTC (rev 3031)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.2.3</version>
+ <version>2.2.4</version>
</parent>
<groupId>org.chorem</groupId>
1
0
Author: echatellier
Date: 2010-08-27 19:29:13 +0200 (Fri, 27 Aug 2010)
New Revision: 3030
Url: http://chorem.org/repositories/revision/lima/3030
Log:
Fix splash name
Modified:
trunk/lima-swing/pom.xml
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2010-08-27 17:27:54 UTC (rev 3029)
+++ trunk/lima-swing/pom.xml 2010-08-27 17:29:13 UTC (rev 3030)
@@ -183,7 +183,7 @@
<classpathPrefix>./lib/</classpathPrefix>
</manifest>
<manifestEntries>
- <SplashScreen-Image>images/splash.png</SplashScreen-Image>
+ <SplashScreen-Image>images/puzzle_splash.png</SplashScreen-Image>
</manifestEntries>
</archive>
</configuration>
1
0
Author: echatellier
Date: 2010-08-27 19:27:54 +0200 (Fri, 27 Aug 2010)
New Revision: 3029
Url: http://chorem.org/repositories/revision/lima/3029
Log:
Zip file is named lima, not lima-swing
Modified:
trunk/lima-swing/pom.xml
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2010-08-27 16:44:52 UTC (rev 3028)
+++ trunk/lima-swing/pom.xml 2010-08-27 17:27:54 UTC (rev 3029)
@@ -90,7 +90,7 @@
<!--Main class in JAR -->
<maven.jar.main.class>org.chorem.lima.LimaMain</maven.jar.main.class>
- <redmine.releaseFiles>target/${project.artifactId}-${project.version}-bin.zip,</redmine.releaseFiles>
+ <redmine.releaseFiles>target/lima-${project.version}-bin.zip,</redmine.releaseFiles>
</properties>
<packaging>jar</packaging>
1
0
Aug. 27, 2010
Author: jpepin
Date: 2010-08-27 18:44:52 +0200 (Fri, 27 Aug 2010)
New Revision: 3028
Url: http://chorem.org/repositories/revision/lima/3028
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2010-08-27 16:44:50 UTC (rev 3027)
+++ trunk/lima-business/pom.xml 2010-08-27 16:44:52 UTC (rev 3028)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0</version>
+ <version>0.4.1-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2010-08-27 16:44:50 UTC (rev 3027)
+++ trunk/lima-callao/pom.xml 2010-08-27 16:44:52 UTC (rev 3028)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0</version>
+ <version>0.4.1-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2010-08-27 16:44:50 UTC (rev 3027)
+++ trunk/lima-swing/pom.xml 2010-08-27 16:44:52 UTC (rev 3028)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0</version>
+ <version>0.4.1-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-08-27 16:44:50 UTC (rev 3027)
+++ trunk/pom.xml 2010-08-27 16:44:52 UTC (rev 3028)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0</version>
+ <version>0.4.1-SNAPSHOT</version>
<modules>
<module>lima-callao</module>
@@ -335,9 +335,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.4.0</connection>
- <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.4.0</developerConnection>
- <url>http://www.chorem.org/repositories/browse/lima/tags/lima-0.4.0</url>
+ <connection>scm:svn:http://svn.chorem.org/svn/lima/trunk</connection>
+ <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/trunk</developerConnection>
+ <url>http://www.chorem.org/repositories/browse/lima/trunk</url>
</scm>
<repositories>
1
0
Author: jpepin
Date: 2010-08-27 18:44:50 +0200 (Fri, 27 Aug 2010)
New Revision: 3027
Url: http://chorem.org/repositories/revision/lima/3027
Log:
[maven-release-plugin] copy for tag lima-0.4.0
Added:
tags/lima-0.4.0/
Property changes on: tags/lima-0.4.0
___________________________________________________________________
Added: svn:ignore
+ *.log
target
bin
.classpath
.project
*.ipr
*.iws
*.iml
Added: svn:mergeinfo
+
1
0
Aug. 27, 2010
Author: jpepin
Date: 2010-08-27 18:44:48 +0200 (Fri, 27 Aug 2010)
New Revision: 3026
Url: http://chorem.org/repositories/revision/lima/3026
Log:
[maven-release-plugin] prepare release lima-0.4.0
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2010-08-27 16:42:59 UTC (rev 3025)
+++ trunk/lima-business/pom.xml 2010-08-27 16:44:48 UTC (rev 3026)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0-SNAPSHOT</version>
+ <version>0.4.0</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2010-08-27 16:42:59 UTC (rev 3025)
+++ trunk/lima-callao/pom.xml 2010-08-27 16:44:48 UTC (rev 3026)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0-SNAPSHOT</version>
+ <version>0.4.0</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2010-08-27 16:42:59 UTC (rev 3025)
+++ trunk/lima-swing/pom.xml 2010-08-27 16:44:48 UTC (rev 3026)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0-SNAPSHOT</version>
+ <version>0.4.0</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-08-27 16:42:59 UTC (rev 3025)
+++ trunk/pom.xml 2010-08-27 16:44:48 UTC (rev 3026)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.4.0-SNAPSHOT</version>
+ <version>0.4.0</version>
<modules>
<module>lima-callao</module>
@@ -335,9 +335,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/lima/trunk</connection>
- <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/trunk</developerConnection>
- <url>http://www.chorem.org/repositories/browse/lima/trunk</url>
+ <connection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.4.0</connection>
+ <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.4.0</developerConnection>
+ <url>http://www.chorem.org/repositories/browse/lima/tags/lima-0.4.0</url>
</scm>
<repositories>
1
0
r3025 - in trunk: . lima-business/src/license lima-swing/src/license
by jpepin@users.chorem.org Aug. 27, 2010
by jpepin@users.chorem.org Aug. 27, 2010
Aug. 27, 2010
Author: jpepin
Date: 2010-08-27 18:42:59 +0200 (Fri, 27 Aug 2010)
New Revision: 3025
Url: http://chorem.org/repositories/revision/lima/3025
Log:
licence jdom
Added:
trunk/release.properties
Modified:
trunk/lima-business/src/license/THIRD-PARTY.properties
trunk/lima-swing/src/license/THIRD-PARTY.properties
Modified: trunk/lima-business/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-business/src/license/THIRD-PARTY.properties 2010-08-27 15:14:51 UTC (rev 3024)
+++ trunk/lima-business/src/license/THIRD-PARTY.properties 2010-08-27 16:42:59 UTC (rev 3025)
@@ -1,37 +1,42 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
+# - ANTLR 2 License
# - Apache 2
# - Apache License Version 2.0
# - Apache Software License - Version 2.0
# - Apache Software License 2.0
+# - Apache Software License, Version 2.0
# - BSD License
# - Bouncy Castle Licence
# - Bouncy Castle License
# - CPL
+# - Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
# - Common Public License Version 1.0
# - Eclipse Public License - Version 1.0
# - GNU Lesser General Public License
# - General Public License (GPL)
# - HSQLDB License
+# - JDom license
# - Lesser General Public License (LGPL) v 3.0
+# - License Agreement for Java Transaction API Classes
# - MIT License
# - Mozilla Public License
# - Public Domain
# - The Apache Software License, Version 2.0
# - The H2 License, Version 1.0
-# - dom4j
# - http://asm.ow2.org/license.html
# - http://www.apache.org/licenses/LICENSE-2.0.txt
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Fri Aug 27 16:30:34 CEST 2010
+#Fri Aug 27 17:23:00 CEST 2010
antlr--antlr--2.7.6=ANTLR 2 License
com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
commons-net--commons-net--2.0=Apache Software License, Version 2.0
commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=jdomlicence
javassist--javassist--3.8.0.GA=GNU Lesser General Public License
javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
org.codehaus.swizzle--swizzle-stream--1.0.1=Apache Software License, Version 2.0
Modified: trunk/lima-swing/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-swing/src/license/THIRD-PARTY.properties 2010-08-27 15:14:51 UTC (rev 3024)
+++ trunk/lima-swing/src/license/THIRD-PARTY.properties 2010-08-27 16:42:59 UTC (rev 3025)
@@ -1,42 +1,48 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
+# - ANTLR 2 License
# - Apache 2
# - Apache License Version 2.0
-# - Apache License, Version 2.0
# - Apache Software License - Version 2.0
# - Apache Software License 2.0
-# - BSD
+# - Apache Software License, Version 2.0
+# - BSD License
# - Bouncy Castle Licence
# - Bouncy Castle License
# - CPL
# - Common Development and Distribution License (CDDL) v1.0
+# - Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
# - Common Public License Version 1.0
# - Eclipse Public License - Version 1.0
# - GNU Lesser General Public License
# - General Public License (GPL)
# - HSQLDB License
+# - JDom license
# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
+# - License Agreement for Java Transaction API Classes
+# - License Agreement for JavaMail(TM) API
# - MIT License
# - Mozilla Public License
+# - OpenSymphony Software License, Version 1.1
# - Public Domain
# - The Apache Software License, Version 2.0
# - The H2 License, Version 1.0
# - The OpenSymphony Software License 1.1
-# - dom4j
# - http://asm.ow2.org/license.html
# - http://www.apache.org/licenses/LICENSE-2.0.txt
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Fri Aug 27 15:06:50 CEST 2010
+#Fri Aug 27 18:08:51 CEST 2010
antlr--antlr--2.7.6=ANTLR 2 License
com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
commons-jxpath--commons-jxpath--1.3=Apache Software License, Version 2.0
commons-net--commons-net--2.0=Apache Software License, Version 2.0
commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=jdomlicence
javassist--javassist--3.8.0.GA=GNU Lesser General Public License
javax.mail--mail--1.4.1=License Agreement for JavaMail(TM) API
javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
Added: trunk/release.properties
===================================================================
--- trunk/release.properties (rev 0)
+++ trunk/release.properties 2010-08-27 16:42:59 UTC (rev 3025)
@@ -0,0 +1,8 @@
+#release configuration
+#Fri Aug 27 18:39:55 CEST 2010
+preparationGoals=clean verify
+scm.commentPrefix=[maven-release-plugin]
+remoteTagging=true
+exec.additionalArguments=-P nexus-profile
+completedPhase=check-poms
+scm.url=scm\:svn\:http\://svn.chorem.org/svn/lima/trunk
1
0
Author: jpepin
Date: 2010-08-27 17:14:51 +0200 (Fri, 27 Aug 2010)
New Revision: 3024
Url: http://chorem.org/repositories/revision/lima/3024
Log:
licence jdom
Modified:
trunk/lima-callao/src/license/THIRD-PARTY.properties
Modified: trunk/lima-callao/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-callao/src/license/THIRD-PARTY.properties 2010-08-27 14:51:45 UTC (rev 3023)
+++ trunk/lima-callao/src/license/THIRD-PARTY.properties 2010-08-27 15:14:51 UTC (rev 3024)
@@ -1,19 +1,22 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
+# - ANTLR 2 License
+# - Apache Software License, Version 2.0
# - BSD License
# - GNU Lesser General Public License
# - Lesser General Public License (LGPL) v 3.0
+# - License Agreement for Java Transaction API Classes
# - MIT License
# - The Apache Software License, Version 2.0
# - The H2 License, Version 1.0
-# - dom4j
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Fri Aug 27 16:18:28 CEST 2010
+#Fri Aug 27 17:06:55 CEST 2010
antlr--antlr--2.7.6=ANTLR 2 License
commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=jdomlicence
javassist--javassist--3.8.0.GA=GNU Lesser General Public License
javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
1
0
Author: jpepin
Date: 2010-08-27 16:51:45 +0200 (Fri, 27 Aug 2010)
New Revision: 3023
Url: http://chorem.org/repositories/revision/lima/3023
Log:
D?\195?\169bogue UI, manque une colonne dans les rapports.
D?\195?\169bogue g?\195?\169n?\195?\169ration BCR, et nouveau fichier de plan BCR.
Added:
trunk/src/site/resources/extras/
trunk/src/site/resources/extras/exemple_ecritures.csv
trunk/src/site/resources/extras/puzzle.svg
trunk/src/site/resources/extras/puzzle_icon.png
trunk/src/site/resources/screens/export_ebp_1.png
trunk/src/site/resources/screens/export_ebp_2.png
trunk/src/site/resources/screens/export_ebp_3.png
trunk/src/site/resources/screens/export_ebp_4.png
trunk/src/site/resources/screens/export_ebp_5.png
trunk/src/site/resources/screens/export_ebp_6.png
trunk/src/site/resources/screens/export_ebp_7.png
trunk/src/site/resources/screens/lima_import_charset.png
trunk/src/site/resources/screens/lima_import_limaall.png
trunk/src/site/resources/screens/lima_lettering.png
trunk/src/site/resources/screens/lima_open_account.png
trunk/src/site/resources/screens/lima_open_entrybook.png
trunk/src/site/resources/screens/lima_open_fiscalperiod.png
trunk/src/site/resources/screens/lima_open_identity.png
trunk/src/site/resources/screens/lima_open_welcome.png
trunk/src/site/resources/screens/lima_splashscreen.png
trunk/src/site/rst/assistant.rst
trunk/src/site/rst/importexport.rst
trunk/src/site/rst/rapports.rst
trunk/src/site/rst/saisie.rst
Removed:
trunk/src/site/resources/images/
trunk/src/site/resources/schemas/
trunk/src/site/resources/screenshots/
trunk/src/site/rst/howto.rst
trunk/src/site/rst/journal.rst
trunk/src/site/rst/planComptable.rst
trunk/src/site/rst/roadmap.rst
trunk/src/site/rst/todo.rst
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/resources/import/bcr_base.csv
trunk/lima-swing/src/main/resources/import/bcr_developed.csv
trunk/lima-swing/src/main/resources/import/bcr_shortened.csv
trunk/src/site/rst/contact.rst
trunk/src/site/rst/features.rst
trunk/src/site/rst/index.rst
trunk/src/site/rst/install.rst
trunk/src/site/rst/lexique.rst
trunk/src/site/rst/presentation.rst
trunk/src/site/site_fr.xml
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -31,6 +31,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.Amounts;
+import org.chorem.lima.beans.AmountsImpl;
import org.chorem.lima.beans.FinancialStatementAmounts;
import org.chorem.lima.beans.FinancialStatementAmountsImpl;
import org.chorem.lima.beans.FinancialStatementDatas;
@@ -290,7 +292,8 @@
List<FinancialStatement> financialStatements =
getChildrenFinancialStatement(financialStatement);
try {
- BigDecimal grossAmount = new BigDecimal(0), provisionDeprecationAmount = new BigDecimal(0);
+ BigDecimal grossAmount = new BigDecimal(0),
+ provisionDeprecationAmount = new BigDecimal(0);
List<FinancialStatementAmounts> subResult =
new ArrayList<FinancialStatementAmounts>();
for (FinancialStatement subFinancialStatement : financialStatements) {
@@ -299,7 +302,8 @@
selectedBeginDate, selectedEndDate, topiaContext);
if (!subFinancialStatement.getHeader()){
//on calcul
- grossAmount = grossAmount.add(financialStatementAmounts.getGrossAmount());
+ grossAmount =
+ grossAmount.add(financialStatementAmounts.getGrossAmount());
provisionDeprecationAmount = provisionDeprecationAmount.add(
financialStatementAmounts.getProvisionDeprecationAmount());
subResult.add(financialStatementAmounts);
@@ -354,8 +358,10 @@
subResult.add(headerfinancialStatementAmounts);
}
else {
- headerfinancialStatementAmounts.setGrossAmount(new BigDecimal(0));
- headerfinancialStatementAmounts.setProvisionDeprecationAmount(new BigDecimal(0));
+ headerfinancialStatementAmounts.
+ setGrossAmount(new BigDecimal(0));
+ headerfinancialStatementAmounts.
+ setProvisionDeprecationAmount(new BigDecimal(0));
subResult.add(headerfinancialStatementAmounts);
}
//ajoute liste
@@ -384,45 +390,76 @@
return result;
}
+
/**
* Permet de calculer le montant de tous les comptes contenu dans un mouvement
*/
public FinancialStatementAmounts financialStatementAmounts(FinancialStatement financialStatement, Date selectedBeginDate, Date selectedEndDate, TopiaContext topiaContext) throws LimaException{
FinancialStatementAmounts financialStatementAmounts =
new FinancialStatementAmountsImpl();
-
- FinancialStatement masterFinancialStatement = financialStatement.getMasterFinancialStatement();
- FinancialStatementWayEnum financialStatementWayEnum = FinancialStatementWayEnum.BOTH;
+ BigDecimal amount = new BigDecimal(0);
+ BigDecimal debitAmount = new BigDecimal(0);
+ BigDecimal creditAmount = new BigDecimal(0);
+ BigDecimal provisionDeprecationAmount = new BigDecimal(0);
+
+ FinancialStatement masterFinancialStatement =
+ financialStatement.getMasterFinancialStatement();
+ FinancialStatementWayEnum financialStatementWayEnum =
+ FinancialStatementWayEnum.BOTH;
if (masterFinancialStatement != null){
financialStatementWayEnum = masterFinancialStatement.getWay();
}
// DEBIT & CREDIT ACCOUNTS LIST
+ Amounts amounts = new AmountsImpl();
String accountsString = financialStatement.getAccounts();
- BigDecimal amount = accountsNumberListToAmount(accountsString,
- financialStatementWayEnum, FinancialStatementWayEnum.BOTH,
- selectedBeginDate,selectedEndDate, topiaContext);
+ if (accountsString != null && !accountsString.equals("")){
+ amounts = amountFromAccountList(accountsString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ debitAmount = debitAmount.add(amounts.getDebit());
+ creditAmount = creditAmount.add(amounts.getCredit());
+ }
// DEBIT ACCOUNTS LIST
String debitAccountsString = financialStatement.getDebitAccounts();
- BigDecimal debitAmount = accountsNumberListToAmount(debitAccountsString,
- financialStatementWayEnum, FinancialStatementWayEnum.DEBIT,
- selectedBeginDate, selectedEndDate, topiaContext);
+ if (debitAccountsString != null && !debitAccountsString.equals("")){
+ amounts = amountFromAccountList(debitAccountsString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ debitAmount = debitAmount.add(amounts.getDebit());
+ }
//CREDIT ACCOUNTS LIST
String creditAccountsString = financialStatement.getCreditAccounts();
- BigDecimal creditAmount = accountsNumberListToAmount(creditAccountsString,
- financialStatementWayEnum, FinancialStatementWayEnum.CREDIT,
- selectedBeginDate, selectedEndDate, topiaContext);
+ if (creditAccountsString != null && !creditAccountsString.equals("")){
+ amounts = amountFromAccountList(creditAccountsString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ creditAmount = creditAmount.add(amounts.getCredit());
+ }
// PROVISION & DEPRECATION
String provisionDeprecationAccountsString =
financialStatement.getProvisionDeprecationAccounts();
- BigDecimal provisionDeprecationAmount = accountsNumberListToAmount(
- provisionDeprecationAccountsString, financialStatementWayEnum,
- FinancialStatementWayEnum.BOTH, selectedBeginDate,
- selectedEndDate, topiaContext);
+ if (provisionDeprecationAccountsString != null && !provisionDeprecationAccountsString.equals("")){
+ amounts = amountFromAccountList(
+ provisionDeprecationAccountsString, selectedBeginDate,
+ selectedEndDate, topiaContext);
+ provisionDeprecationAmount =
+ provisionDeprecationAmount.add(amounts.getCredit());
+ provisionDeprecationAmount =
+ provisionDeprecationAmount.subtract(amounts.getDebit());
+ }
+ switch (financialStatementWayEnum) {
+ case BOTH:
+ amount = amount.add(debitAmount);
+ amount = amount.subtract(creditAmount);
+ amount = amount.abs();
+ break;
+ case CREDIT:
+ amount = amount.add(creditAmount);
+ amount = amount.subtract(debitAmount);
+ break;
+ case DEBIT:
+ amount = amount.add(debitAmount);
+ amount = amount.subtract(creditAmount);
+ }
- // set result
- amount = amount.add(creditAmount);
- amount = amount.add(debitAmount);
financialStatementAmounts.setGrossAmount(amount);
financialStatementAmounts.setLabel(financialStatement.getLabel());
financialStatementAmounts.setProvisionDeprecationAmount(
@@ -433,85 +470,57 @@
return financialStatementAmounts;
}
- /**
- * Calulate the amount of string contains a list of account
- * account number seperate by ',' use methode stringToList from account service
- * the list support '-' minus operation
- * @return
- */
- public BigDecimal accountsNumberListToAmount (String accountsNumberList, FinancialStatementWayEnum financialStatementWayEnum, FinancialStatementWayEnum debitCredit, Date selectedBeginDate, Date selectedEndDate, TopiaContext topiaContext) throws LimaException{
- BigDecimal amount = new BigDecimal(0);
+
+ public Amounts amountFromAccountList(String accountsNumberList, Date selectedBeginDate, Date selectedEndDate, TopiaContext topiaContext) throws LimaException{
+ Amounts amounts = new AmountsImpl();
+ BigDecimal debit = new BigDecimal(0);
+ BigDecimal credit = new BigDecimal(0);
+ Boolean substract = false;
try {
- if (accountsNumberList != null){
- //Remove Spaces
- AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
- String result = StringUtils.deleteWhitespace(accountsNumberList);
- StringTokenizer stQuote = new StringTokenizer(result, "-");
- while (stQuote.hasMoreTokens()) {
- String s = stQuote.nextToken();
- List<Account> accountsList = accountDAO.stringToListAccounts(s, false);
- BigDecimal resAmount = new BigDecimal(0);
-
- for (Account account : accountsList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(account, true,
- selectedBeginDate, selectedEndDate, topiaContext);
- BigDecimal tempAmount = new BigDecimal(0);
- //check the way of financialstatement amount
- //exemple compte de résultat : charge -> débit, produit -> crédit
- switch (financialStatementWayEnum) {
- case BOTH:
- tempAmount = tempAmount.add(reportsDatas.getAmountSolde());
- break;
- case DEBIT:
- tempAmount = tempAmount.add(reportsDatas.getAmountDebit());
- tempAmount = tempAmount.subtract(reportsDatas.getAmountCredit());
- break;
- case CREDIT:
- tempAmount = tempAmount.add(reportsDatas.getAmountCredit());
- tempAmount = tempAmount.subtract(reportsDatas.getAmountDebit());
- break;
- }
-
- //add the calcul in function of list type: allaccounts, debit or credit
- switch (debitCredit) {
- case BOTH:
- resAmount = resAmount.add(tempAmount);
- break;
- case DEBIT:
- if (reportsDatas.getSoldeDebit()){
- resAmount = resAmount.add(tempAmount);
- }
- break;
- case CREDIT:
- if (!reportsDatas.getSoldeDebit()){
- resAmount = resAmount.add(tempAmount);
- }
- break;
- }
-
- }
- if (amount.doubleValue() == 0){
- amount = resAmount;
- }
- //compte(s) précédé du signe -
- else {
- amount = amount.subtract(resAmount);
- }
+ AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
+ //Remove Spaces
+ String result = StringUtils.deleteWhitespace(accountsNumberList);
+ StringTokenizer stQuote = new StringTokenizer(result, "-");
+ while (stQuote.hasMoreTokens()) {
+ String s = stQuote.nextToken();
+ List<Account> accountsList = accountDAO.stringToListAccounts(s, false);
+ BigDecimal debitTemp = new BigDecimal(0);
+ BigDecimal creditTemp = new BigDecimal(0);
+ for (Account account : accountsList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(account, true,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ if (reportsDatas.getSoldeDebit()){
+ debitTemp = debitTemp.add(reportsDatas.getAmountSolde());
+ }
+ else {
+ creditTemp = creditTemp.add(reportsDatas.getAmountSolde());
+ }
}
- }
- }catch (LimaException ex) {
- doCatch(topiaContext, ex, log);
- } catch (TopiaException e) {
- doCatch(topiaContext, e, log);
+ if (!substract){
+ debit = debitTemp;
+ credit = creditTemp;
+ }
+ //compte(s) précédé du signe -
+ else {
+ debit = debit.subtract(debitTemp);
+ credit = credit.subtract(creditTemp);
+ }
+ substract = true;
+ }
+ amounts.setCredit(credit);
+ amounts.setDebit(debit);
+ } catch (TopiaException e) {
+ doCatch(topiaContext, e, log);
}
- return amount;
+ return amounts;
}
@Override
public String checkFinancialStatementChart() throws LimaException {
- StringBuffer result = new StringBuffer(_("lima-business.financialstatement.check.warn"));
+ StringBuffer result =
+ new StringBuffer(_("lima-business.financialstatement.check.warn"));
TopiaContext transaction = null;
try {
transaction = beginTransaction();
@@ -567,10 +576,14 @@
LimaCallaoDAOHelper.getFinancialStatementDAO(topiaContext);
TopiaQuery query = financialStatementDAO.createQuery();
- String accountProperty = TopiaQuery.getProperty(FinancialStatement.ACCOUNTS);
- String creditAccountProperty = TopiaQuery.getProperty(FinancialStatement.CREDIT_ACCOUNTS);
- String debitAccountProperty = TopiaQuery.getProperty(FinancialStatement.DEBIT_ACCOUNTS);
- String provisionDeprecationProperty = TopiaQuery.getProperty(FinancialStatement.PROVISION_DEPRECATION_ACCOUNTS);
+ String accountProperty =
+ TopiaQuery.getProperty(FinancialStatement.ACCOUNTS);
+ String creditAccountProperty =
+ TopiaQuery.getProperty(FinancialStatement.CREDIT_ACCOUNTS);
+ String debitAccountProperty =
+ TopiaQuery.getProperty(FinancialStatement.DEBIT_ACCOUNTS);
+ String provisionDeprecationProperty =
+ TopiaQuery.getProperty(FinancialStatement.PROVISION_DEPRECATION_ACCOUNTS);
String likeCondition = " " + Op.LIKE + " '%"+accountNumber + "%'";
query.addWhere(accountProperty + likeCondition
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -197,20 +197,20 @@
LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaContext);
String financialPeriodProperty = TopiaQuery.getProperty(FinancialTransaction.FINANCIAL_PERIOD);
- String entryBookLabelProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY_BOOK);
- String accountProperty = TopiaQuery.getProperty(Entry.ACCOUNT);
-
+ String entryBookLabelProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY_BOOK);
TopiaQuery query = financialTransactionDAO.createQuery("T");
- query.addFrom(FiscalPeriod.class, "F")
- .addDistinct()
+ query.addDistinct()
+ .addOrder("T."+FinancialTransaction.TOPIA_CREATE_DATE)
+ .addFrom(FiscalPeriod.class, "F")
.addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true)
.addWhere("T.amountCredit != T.amountDebit OR E.account = null OR T.entryBook = null")
.addInElements("T.financialPeriod", "F.financialPeriod")
.addEquals("F", fiscalPeriod)
// load lazy
- .addLeftJoin("E."+accountProperty,"A", true)
+ .addFetch("E."+Entry.ACCOUNT)
+ .addFetch("E."+Entry.LETTER)
.addLoad(financialPeriodProperty)
.addLoad(entryBookLabelProperty);
@@ -603,7 +603,7 @@
try {
topiaContext = beginTransaction();
LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- int n = letterDAO.count()+1;
+ int n = letterDAO.count();
String res = numberToString(n, null);
//if already exist
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -200,7 +200,6 @@
// DAOs
AccountDAO accountDAO = LimaCallaoDAOHelper
.getAccountDAO(topiaContext);
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllUnblockedFiscalPeriods();
@@ -225,17 +224,18 @@
Date beginDate = fiscalPeriods.get(0).getBeginDate();
Date endDate = fiscalPeriods.get(nbFiscalPeriods-1).getEndDate();
- // if account not exist not export
- if (account == null) {
- throw new LimaBusinessException(
- _("lima-business.import.ebpmissingaccount",
- entryEBP.getCompte()));
- }
+ //if entry date have fiscalperiod open
+ if (date.compareTo(beginDate) < 0 || date.compareTo(endDate) > 0){
- else if (date.compareTo(beginDate) < 0 || date.compareTo(endDate) > 0){
-
result.append(_("lima-business.import.entriesoutofdatesrange",date));
}
+ // if account not exist not export
+ else if (account == null) {
+ throw new LimaBusinessException(
+ _("lima-business.import.ebpmissingaccount",
+ entryEBP.getCompte()));
+ }
+ //create entry
else {
entry.setAccount(account);
BigDecimal debit = new BigDecimal(entryEBP.getDebit());
@@ -265,7 +265,7 @@
entryBookService.createEntryBook(entryBook);
result.append(_("lima-business.import.entrybooknotexist",entryBook));
}
-
+ //create transaction
if (financialTransaction == null
|| !(date.equals(financialTransaction.getTransactionDate())
&& entryBook.getCode().equals(financialTransaction.getEntryBook().getCode()))) {
@@ -273,6 +273,7 @@
// update previous financial transaction before create
// new
if (financialTransaction != null) {
+ //call methode to calculte amounts
financialTransaction.setAmounts();
financialTransactionService
.updateFinancialTransactionWithTransaction(
@@ -373,8 +374,8 @@
masterAccount, account, topiaContext);
result.append(_("lima-business.import.accountadded", accountNumber, label));
}
- // else is account
- else {
+ // else if account and exclude account start with 0 (fix from error on EBP)
+ else if (!accountNumber.startsWith("0")){
// if account is class account : 1, 2, 3, 4, 5, 6, 7,…
int nbCharAccountNumber = accountNumber.length();
if (nbCharAccountNumber == 1) {
@@ -976,6 +977,7 @@
if (letter == null) {
letter = new LetterImpl();
letter.setCode(letterCode);
+ financialTransactionService.createLetter(letter);
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -1093,7 +1095,6 @@
throws LimaException {
StringBuffer result = new StringBuffer();
try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -20,20 +20,38 @@
package org.chorem.lima.business.utils;
import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.util.Comparator;
+import java.util.Date;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.chorem.lima.beans.EntryEBP;
public class EntryEBPComparator implements Serializable, Comparator<EntryEBP>{
+ private static final Log log =
+ LogFactory.getLog(EntryEBPComparator.class);
+
private static final long serialVersionUID = 1L;
@Override
public int compare(EntryEBP o1, EntryEBP o2) {
-
- int result = o1.getDatEcr().compareTo(o2.getDatEcr());
+ int result = 0;
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+ try {
+ Date date1 = sdf.parse(o1.getDatEcr());
+ Date date2 = sdf.parse(o2.getDatEcr());
+ result = date1.compareTo(date2);
+ if(result==0){
+ result = o1.getJournal().compareTo(o2.getJournal());
+ }
+ } catch (ParseException eee) {
+ log.error("Can't parse date", eee);
+ }
+
- if(result==0)
- result = o1.getJournal().compareTo(o2.getJournal());
+
return result;
}
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -5,6 +5,8 @@
public class FinancialTransactionImpl extends FinancialTransactionAbstract {
+ private static final long serialVersionUID = 1L;
+
@Override
public void setAmounts() {
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -59,7 +59,7 @@
@Override
public int getColumnCount() {
- return 7;
+ return 8;
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -57,7 +57,7 @@
@Override
public int getColumnCount() {
- return 6;
+ return 7;
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -317,7 +317,9 @@
@Override
public void notifyMethod(String serviceName, String methodName) {
- if (methodName.contains("importFinancialStatements") || methodName.contains("importAll") || methodName.contains("importAs")){
+ if (methodName.contains("FinancialStatements")
+ || methodName.contains("importAll")
+ || methodName.contains("importAs")){
refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -222,7 +222,6 @@
}
//if entry
else {
- log.debug("not end");
//FIXME set value is doing after key pressed
// so update not terminated before get balanced
//Swing Worker stop the UI 500ms
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -56,7 +56,7 @@
public class FinancialTransactionSearchTableModel extends AbstractTableModel implements ServiceListener{
/** serialVersionUID. */
- private static final long serialVersionUID = 3914954536809622358L;
+ private static final long serialVersionUID = 1L;
/** log. */
private static final Log log = LogFactory
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -114,7 +114,7 @@
@Override
public void notifyMethod(String serviceName, String methodeName) {
- if (methodeName.contains("Account") || methodeName.contains("importAll") || methodeName.contains("importAsCSV")){
+ if (methodeName.contains("Account") || methodeName.contains("importAll") || methodeName.contains("importAs")){
refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -131,7 +131,8 @@
@Override
public void notifyMethod(String serviceName, String methodeName) {
- if (methodeName.contains("EntryBook") || methodeName.contains("importAll") || methodeName.contains("importAs")){
+ if (methodeName.contains("EntryBook") || methodeName.contains("importAll")
+ || methodeName.contains("importAs") || methodeName.contains("importEntries")){
refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -146,7 +146,9 @@
@Override
public void notifyMethod(String serviceName, String methodeName) {
- if (methodeName.contains("FiscalPeriod") || methodeName.contains("FinancialTransaction") || methodeName.contains("Entry") || methodeName.contains("importEntries") || methodeName.contains("importAll")){
+ if (methodeName.contains("FiscalPeriod") || methodeName.contains("FinancialTransaction")
+ || methodeName.contains("Entry") || methodeName.contains("importEntries")
+ || methodeName.contains("importAll") || methodeName.contains("importAs")){
refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -123,7 +123,8 @@
@Override
public void notifyMethod(String serviceName, String methodeName) {
- if (methodeName.contains("FiscalPeriod") || methodeName.contains("importAll")){
+ if (methodeName.contains("FiscalPeriod") || methodeName.contains("importAll")
+ || methodeName.contains("importAs")){
refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-27 14:51:45 UTC (rev 3023)
@@ -176,12 +176,13 @@
DialogHelper.showMessageDialog(_("lima.importexport.import.terminated"));
}
}
- } catch (InterruptedException eeeIE) {
+ } catch (InterruptedException eee) {
if (log.isDebugEnabled()){
- log.debug("Can't get result message", eeeIE);
+ log.error("Can't get result message", eee);
}
- } catch (ExecutionException eeeEE) {
- DialogHelper.showMessageDialog(eeeEE.getMessage());
+ } catch (ExecutionException eee) {
+ DialogHelper.showMessageDialog(eee.getCause().getMessage());
+ log.error("Error on import", eee);
}
}
}.execute();
@@ -222,8 +223,6 @@
if (importExportMethode.getEncodingOption()){
encodingEnum = EncodingEnum.valueOfDescription((String) comboBox.getSelectedItem());
}
- log.debug(encodingEnum.getEncoding());
- log.debug(filePath);
}
return filePath;
@@ -244,7 +243,7 @@
}
catch (IOException eee) {
if (log.isDebugEnabled()){
- log.debug("Can't write file " + filePath, eee);
+ log.error("Can't write file " + filePath, eee);
}
}
}
@@ -263,7 +262,7 @@
}
catch (IOException eee) {
if (log.isDebugEnabled()){
- log.debug("Can't read file "+filePath, eee);
+ log.error("Can't read file "+filePath, eee);
}
}
return new String(datas);
Modified: trunk/lima-swing/src/main/resources/import/bcr_base.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/bcr_base.csv 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/resources/import/bcr_base.csv 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,7 +1,7 @@
"FNST";"BILAN ACTIF";"true";"";"";"";"";"true";"false";"";"BOTH"
"FNST";"Capital Souscrit non appelé";"false";"109";" ";" ";" ";"false";"false";"BILAN ACTIF";""
"FNST";"BILAN PASSIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
+"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"CREDIT"
"FNST";"COMPTE DE RESULTAT";"true";"";"";"";"";"false";"false";"";"BOTH"
"FNST";"Capital (dont versé?)";"false";"101, 108";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"CHARGES";"true";" ";" ";" ";" ";"true";"false";"COMPTE DE RESULTAT";"DEBIT"
@@ -13,7 +13,7 @@
"FNST";"Stocks et en-cours";"true";"";"";"";"";"false";"true";"ACTIF CIRCULANT";"BOTH"
"FNST";"Marchandises";"false";"37";"";"";"397";"false";"false";"Stocks et en-cours";""
"FNST";"Variations de stocks de march.";"false";"6037";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Achat de marchandises";"false";"607, 6097";"";"";"";"false";"false";"Coût d'achat des marchandises";""
+"FNST";"Achat de marchandises";"false";"607, 6087, 6097";"";"";"";"false";"false";"Coût d'achat des marchandises";""
"FNST";"Immobilisations incorporelles";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
"FNST";"Frais d'établissement";"false";"201";"";"";"2801";"false";"false";"Immobilisations incorporelles";""
"FNST";"Frais de recherche et développement";"false";"203";"";"";"2803";"false";"false";"Immobilisations incorporelles";""
@@ -41,7 +41,7 @@
"FNST";"Valeurs mobilières de placement";"true";"";"";"";"";"false";"false";"ACTIF CIRCULANT";"BOTH"
"FNST";"Actions propres";"false";"502";"";"";"59";"false";"false";"Valeurs mobilières de placement";""
"FNST";"Autres titres";"false";"50 -502 -509";"";"";"59";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Disponibilités";"false";"53, 54";"51 -5181 -519";"";"";"false";"false";"ACTIF CIRCULANT";""
+"FNST";"Disponibilités";"false";"53, 54 -5181 -519";"51";"";"";"false";"false";"ACTIF CIRCULANT";""
"FNST";"Charges constatées d'avance";"false";"486";"";"";"";"false";"false";"ACTIF CIRCULANT";""
"FNST";"Instrument de trésorerie";"false";"";"52";"";"";"false";"false";"Valeurs mobilières de placement";""
"FNST";"Charges à répartir sur plusieurs exercices";"false";"481";"";"";"";"false";"false";"BILAN ACTIF";""
@@ -54,8 +54,8 @@
"FNST";"Réserve légale";"false";"1061";"";"";"";"false";"false";"Réserves";""
"FNST";"Réserves statutaires ou contractuelles";"false";"1063";"";"";"";"false";"false";"Réserves";""
"FNST";"Réserves réglementées";"false";"1062, 1064";"";"";"";"false";"false";"Réserves";""
-"FNST";"Report à nouveau";"false";"110-119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7-6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"Report à nouveau";"false";"110,119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7,6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"Subventions d'investissement";"false";"13";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"Provisions réglementées";"false";"14";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"AUTRES FONDS PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
@@ -71,13 +71,11 @@
"FNST";"Emprunts et dettes financières diverses";"false";"165, 166, 1675, 168, 16883, 17, 426 -16881 -457";"";"45";"";"false";"false";"DETTES";""
"FNST";"Avances et acomptes reçues sur commandes en cours";"false";"4191";"";"";"";"false";"false";"DETTES";""
"FNST";"Ecarts de conversion passif";"false";"477";"";"";"";"false";"false";"BILAN PASSIF";""
-"FNST";"Coût d'achats de matières premières et autres approvisionnements";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Achats de matières premières et autres approvisionnements";"false";"601, 602, 608, 6091, 6092";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Variation des stock d'approv.";"false";"6031, 6032";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Autres achats et charges externes";"false";"604, 605, 606, 6094, 6095, 6096, 61, 62";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Impôts, taxes et versements assimilés";"false";"63";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
+"FNST";"Coût d'achats de matières premières et autres approvisionnements";"true";"";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";"DEBIT"
+"FNST";"Achats de matières premières et autres approvisionnements";"false";"601, 6081, 6091";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
+"FNST";"Variation des stock";"false";"6031, 6032";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
"FNST";"Salaires et traitements";"false";"641, 644, 648";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Charges sociales";"false";"645, 646, 647, 648";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
+"FNST";"Charges sociales";"false";"645, 646, 647";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
"FNST";"Dotations aux amortis. & provisions";"true";" ";" ";" ";" ";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
"FNST";"Autres charges";"false";"65 -655";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
"FNST";"Quotes-parts de résultat sur opérations faites en commun";"false";"655";"";"";"";"false";"false";"CHARGES";""
@@ -88,20 +86,13 @@
"FNST";"Charges nettes sur cessions de valeurs mobilières de placement";"false";"667";"";"";"";"false";"false";"Charges financières";""
"FNST";"Charges exceptionnelles";"true";"";"";"";"";"false";"true";"CHARGES";"DEBIT"
"FNST";"Sur opérations de gestion";"false";"671";"";"";"";"false";"false";"Charges exceptionnelles";""
-"FNST";"Sur opérations en capital";"false";"675, 678";"";"";"";"false";"false";"Charges exceptionnelles";""
-"FNST";"Dotations aux amortissements et aux provisions";"false";"687";"";"";"";"false";"false";"Charges exceptionnelles";""
"FNST";"Participation des salariés aux résultats";"false";"691";"";"";"";"false";"false";"CHARGES";""
"FNST";"Impôts sur les bénéfices";"false";"695, 697, 689, 698, 699, 789";"";"";"";"false";"false";"CHARGES";""
"FNST";"Produits d'exploitation";"true";"";"";"";"";"true";"false";"PRODUITS";"CREDIT"
-"FNST";"Montant net Chiffre d'affaires";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
-"FNST";"Production vendue (B&S)";"false";"70 -707 -708 -7097";"";"";"";"false";"false";"Montant net Chiffre d'affaires";""
-"FNST";"Ventes de marchandises";"false";"707, 708 -7097";"";"";"";"false";"false";"Montant net Chiffre d'affaires";""
+"FNST";"Production vendue";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
+"FNST";"Ventes";"false";"701, 702, 703, 707, 708, 7091, 7092, 7097, 7098";"";"";"";"false";"false";"Production vendue";""
+"FNST";"Travaux";"false";"704, 708, 7094, 7098";"";"";"";"false";"false";"Production vendue";""
"FNST";"Autres produits d'exploitation";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
-"FNST";"Production stockée";"false";"713";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Production immobilisée";"false";"72, 73";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Subventions d'exploitation";"false";"74";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Reprises sur provisions (et amortissements), transferts de charges";"false";"781, 791";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Autres produits";"false";"75 -755";"";"";"";"false";"false";"Autres produits d'exploitation";""
"FNST";"Quote-parts de résultat sur opérations faites en commun";"false";"755";"";"";"";"false";"false";"PRODUITS";""
"FNST";"Produits financiers";"true";"";"";"";"";"false";"true";"PRODUITS";"CREDIT"
"FNST";"De participations";"false";"761";"";"";"";"false";"false";"Produits financiers";""
@@ -116,19 +107,56 @@
"FNST";"Sur immobilisations : dotations aux provisions";"false";"6816";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
"FNST";"Sur actif circulant : dotations aux provisions";"false";"6817";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
"FNST";"Pour risques et charges : dotations aux provisions";"false";"6815";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Créances Clients et Comptes rattachés";"false";"410, 411, 413, 416, 418";"";"";"491";"false";"false";"Créances";""
+"FNST";"Créance d'exploitation";"true";"";"";"";"";"false";"false";"Créances";"BOTH"
+"FNST";"Créances clients et Comptes rattachés";"false";"410, 411, 413, 416, 418";"";"";"491";"false";"false";"Créance d'exploitation";""
+"FNST";"Créances diverses";"false";"4411, 4418, 462, 465, 4687";"443, 444, 451, 456, 458, 467 -4562";"";"";"false";"false";"Créances";""
"FNST";"Capital souscrit et appelé, non versé";"false";"4562";"";"";"";"false";"false";"Créances";""
-"FNST";"Dettes Fournisseurs et Comptes rattachés";"false";"400, 401, 403, 4081, 4088";"";"";"";"false";"false";"DETTES";""
-"FNST";"Dettes fiscales et sociales";"false";"421, 422, 424, 427, 4282, 4286, 43, 442, 4455, 4457, 44584, 44587, 446, 447, 4482, 4486, 457 -4387";"";"443, 444";"";"false";"false";"DETTES";""
-"FNST";"Dettes sur immobilisations et Comptes rattachés";"false";"269, 279, 404, 405, 4084, 4088";"";"";"";"false";"false";"DETTES";""
-"FNST";"Autres dettes";"false";"4196, 4197, 4198, 464, 4686, 509";"";"467, 478";"";"false";"false";"DETTES";""
-"FNST";"Instruments de trésorerie";"false";"";"";"52";"";"false";"false";"DETTES";""
+"FNST";"Dettes d'exploitation";"true";"";"";"";"";"false";"false";"DETTES";"BOTH"
+"FNST";"Dettes fournisseurs et comptes rattachés";"false";"400, 401, 403, 4081, 4088";"";"";"";"false";"false";"Dettes d'exploitation";""
+"FNST";"Dettes fiscales et sociales";"false";"421, 422, 424, 427, 4282, 4286, 431, 437, 4386, 4455, 4457, 446, 447, 4486";"";"4458";"";"false";"false";"Dettes d'exploitation";""
+"FNST";"Dettes diverses";"true";"";"";"";"";"false";"false";"DETTES";"BOTH"
+"FNST";"Dettes sur immobilisations et Comptes rattachés";"false";"269, 279, 404, 405, 4084";"";"";"";"false";"false";"Dettes diverses";""
+"FNST";"Dettes fiscales (impôts sur les bénéfices)";"false";"";"";"444";"";"false";"false";"Dettes diverses";""
+"FNST";"Sur opérations en capital";"false";"775, 777, 778";"";"";"";"false";"false";"Produits exceptionnels";""
+"FNST";"Prestation de services";"false";"705, 706, 708, 7095, 7096, 7098";"";"";"";"false";"false";"Production vendue";""
+"FNST";"Production stockée";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
+"FNST";"En-cours de production de biens";"false";"7133";"";"";"";"false";"false";"Production stockée";""
+"FNST";"En-cours de production de services";"false";"7134";"";"";"";"false";"false";"Production stockée";""
+"FNST";"Produits";"false";"7135";"";"";"";"false";"false";"Production stockée";""
+"FNST";"Reprises sur provisions (et amortissements), transferts de charges";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
+"FNST";"Reprises sur provisions (et amortissements)";"false";"781";"";"";"";"false";"false";"Reprises sur provisions (et amortissements), transferts de charges";""
+"FNST";"Transferts de charges";"false";"791";"";"";"";"false";"false";"Reprises sur provisions (et amortissements), transferts de charges";""
+"FNST";"Production exceptionnels sur opérations en capital";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
+"FNST";"Produits des cessions d'éléments d'actif";"false";"775";"";"";"";"false";"false";"Production exceptionnels sur opérations en capital";""
+"FNST";"Subvention d'investissement virées au résultat de l'exercice";"false";"778";"";"";"";"false";"false";"Production exceptionnels sur opérations en capital";""
+"FNST";"Autres approvisionnements";"false";"602, 6082, 6092";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
+"FNST";"Autres charges et charges externes";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
+"FNST";"Achats de sous-traitance";"false";"604, 6084, 6094, 6095";"";"";"";"false";"false";"Autres charges et charges externes";""
+"FNST";"Achats non stockés de matières et fournitures";"false";"605, 606, 6085, 6086, 6096";"";"";"";"false";"false";"Autres charges et charges externes";""
+"FNST";"Services extérieurs";"true";"";"";"";"";"false";"true";"Autres charges et charges externes";"DEBIT"
+"FNST";"Personnel extérieur";"false";"621";"";"";"";"false";"false";"Services extérieurs";""
+"FNST";"Loyers en crédit-bail mobilier";"false";"6122";"";"";"";"false";"false";"Services extérieurs";""
+"FNST";"Loyers en crédit-bail immobilier";"false";"";"";"";"";"false";"false";"Services extérieurs";""
+"FNST";"Impôts, taxes et versements assimilés";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
+"FNST";"sur rémunérations";"false";"631, 633";"";"";"";"false";"false";"Impôts, taxes et versements assimilés";""
+"FNST";"autres";"false";"635, 637";"";"";"";"false";"false";"Impôts, taxes et versements assimilés";""
+"FNST";"sur opération en capital";"true";"";"";"";"";"false";"true";"Charges exceptionnelles";"DEBIT"
+"FNST";"valeurs comptables des éléments immobiliers et financiers cédés";"false";"675";"";"";"";"false";"false";"sur opération en capital";""
+"FNST";"Dotations aux amortissements et aux provisions";"true";"";"";"";"";"false";"true";"Charges exceptionnelles";"DEBIT"
+"FNST";"Dotations aux provisions réglementées";"false";"6872, 6873, 6874";"";"";"";"false";"false";"Dotations aux amortissements et aux provisions";""
+"FNST";"dotations aux amortissements et aux provisions";"false";"6871, 6875, 6876";"";"";"";"false";"false";"Dotations aux amortissements et aux provisions";""
"FNST";"Produits constatés d'avance";"false";"487";"";"";"";"false";"false";"DETTES";""
-"FNST";"Autres";"false";"4096, 4097, 4098, 425, 4287, 4387, 441, 4452, 4456, 44581, 44582, 44583, 44586, 4487, 462, 465, 467, 4687";"443, 444, 451, 455, 456, 458 -4562";"";"495, 496";"false";"false";"Créances";""
+"FNST";"Production immobilisée";"false";"72, 73";"";"";"";"false";"false";"Autres produits d'exploitation";""
+"FNST";"Subventions d'exploitation";"false";"74";"";"";"";"false";"false";"Autres produits d'exploitation";""
"FNST";"Autres";"false";"275, 2761, 27685, 27688";"";"";"2975, 2976";"false";"false";"Immobilisations financières";""
"FNST";"Autres";"false";"218";"";"";"2818";"false";"false";"Immobilisations corporelles";""
"FNST";"Autres";"false";"1068";"";"";"";"false";"false";"Réserves";""
"FNST";"Autres";"false";"";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
+"FNST";"Autres";"false";"4096, 4097, 4098, 425, 4287, 4387, 4417, 4452, 4456, 4487";"4458";"";"495, 496";"false";"false";"Créance d'exploitation";""
+"FNST";"Autres";"false";"4196, 4197, 4198, 4419";"";"";"";"false";"false";"Dettes d'exploitation";""
+"FNST";"Autres";"false";"424, 426, 4284, 4419, 442, 4486, 457, 464, 467, 4686, 509";"";"443, 451, 455, 456, 458";"";"false";"false";"Dettes diverses";""
+"FNST";"Autres";"false";"61, 62 -6122 -6125 -621";"";"";"";"false";"false";"Services extérieurs";""
+"FNST";"Autres";"false";"75 - 755";"";"";"";"false";"false";"Autres produits d'exploitation";""
"FNST";"Avances et acomptes";"false";"238";"";"";"";"false";"false";"Immobilisations corporelles";""
"FNST";"Sur opérations de gestion";"false";"771";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"Sur opérations en capital";"false";"775, 777, 778";"";"";"";"false";"false";"Produits exceptionnels";""
+"FNST";"autres";"false";"678";"";"";"";"false";"false";"sur opération en capital";""
Modified: trunk/lima-swing/src/main/resources/import/bcr_developed.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/bcr_developed.csv 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/resources/import/bcr_developed.csv 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,9 +1,9 @@
"FNST";"BILAN ACTIF";"true";"";"";"";"";"true";"false";"";"BOTH"
"FNST";"Capital Souscrit non appelé";"false";"109";" ";" ";" ";"false";"false";"BILAN ACTIF";""
"FNST";"BILAN PASSIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
+"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"CREDIT"
"FNST";"COMPTE DE RESULTAT";"true";"";"";"";"";"false";"false";"";"BOTH"
-"FNST";"Capital (dont versé?)";"false";"101, 108, 1013";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"Capital (dont versé?)";"false";"101, 108";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"CHARGES";"true";" ";" ";" ";" ";"true";"false";"COMPTE DE RESULTAT";"DEBIT"
"FNST";"PRODUITS";"true";"";"";"";"";"true";"false";"COMPTE DE RESULTAT";"CREDIT"
"FNST";"ACTIF IMMOBILISÉ";"true";" ";" ";" ";" ";"true";"false";"BILAN ACTIF";"BOTH"
@@ -54,8 +54,8 @@
"FNST";"Réserve légale";"false";"1061";"";"";"";"false";"false";"Réserves";""
"FNST";"Réserves statutaires ou contractuelles";"false";"1063";"";"";"";"false";"false";"Réserves";""
"FNST";"Réserves réglementées";"false";"1062, 1064";"";"";"";"false";"false";"Réserves";""
-"FNST";"Report à nouveau";"false";"110-119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7-6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"Report à nouveau";"false";"110,119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7,6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"Subventions d'investissement";"false";"13";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"Provisions réglementées";"false";"14";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"AUTRES FONDS PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
@@ -75,7 +75,7 @@
"FNST";"Achats de matières premières et autres approvisionnements";"false";"601, 6081, 6091";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
"FNST";"Variation des stock";"false";"6031, 6032";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
"FNST";"Salaires et traitements";"false";"641, 644, 648";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Charges sociales";"false";"645, 646, 647, 648";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
+"FNST";"Charges sociales";"false";"645, 646, 647";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
"FNST";"Dotations aux amortis. & provisions";"true";" ";" ";" ";" ";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
"FNST";"Autres charges";"false";"65 -655";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
"FNST";"Quotes-parts de résultat sur opérations faites en commun";"false";"655";"";"";"";"false";"false";"CHARGES";""
@@ -157,3 +157,6 @@
"FNST";"Avances et acomptes";"false";"238";"";"";"";"false";"false";"Immobilisations corporelles";""
"FNST";"Sur opérations de gestion";"false";"771";"";"";"";"false";"false";"Produits exceptionnels";""
"FNST";"autres";"false";"678";"";"";"";"false";"false";"sur opération en capital";""
+"FNST";"Production immobilisée";"false";"72, 73";"";"";"";"false";"false";"Autres produits d'exploitation";""
+"FNST";"Subventions d'exploitation";"false";"74";;;;"false";"false";"Autres produits d'exploitation";""
+"FNST";"Autres";"false";"75 - 755";;;;"false";"false";"Autres produits d'exploitation";""
Modified: trunk/lima-swing/src/main/resources/import/bcr_shortened.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/bcr_shortened.csv 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/lima-swing/src/main/resources/import/bcr_shortened.csv 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,6 +1,6 @@
"FNST";"BILAN ACTIF";"true";"";"";"";"";"true";"false";"";"BOTH"
"FNST";"BILAN PASSIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
+"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"CREDIT"
"FNST";"COMPTE DE RESULTAT";"true";"";"";"";"";"false";"false";"";"BOTH"
"FNST";"Capital";"false";"101, 108";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"CHARGES";"true";" ";" ";" ";" ";"true";"false";"COMPTE DE RESULTAT";"DEBIT"
@@ -21,8 +21,8 @@
"FNST";"Réserves";"true";"";"";"";"";"false";"false";"CAPITAUX PROPRES";"BOTH"
"FNST";"Réserve légale";"false";"1061";"";"";"";"false";"false";"Réserves";""
"FNST";"Réserves réglementées";"false";"1064";"";"";"";"false";"false";"Réserves";""
-"FNST";"Report à nouveau";"false";"110-119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7-6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"Report à nouveau";"false";"110,119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
+"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7,6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"Provisions réglementées";"false";"145, 146, 147, 148";"";"";"";"false";"false";"CAPITAUX PROPRES";""
"FNST";"Provisions pour risques et charges";"false";"15";"";"";"";"false";"false";"BILAN PASSIF";""
"FNST";"DETTES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
Added: trunk/src/site/resources/extras/exemple_ecritures.csv
===================================================================
--- trunk/src/site/resources/extras/exemple_ecritures.csv (rev 0)
+++ trunk/src/site/resources/extras/exemple_ecritures.csv 2010-08-27 14:51:45 UTC (rev 3023)
@@ -0,0 +1,96 @@
+"FTRC";"0";"23,03,2010 00:00:00";"60.0";"60.0";"01,03,2010 00:00:00";"31,03,2010 23:59:59";"VTE"
+"NTRY";"0";"vente de poisson";"60.0";"false";"";;"fact 2";;"707"
+"NTRY";"0";"vente de poisson";"60.0";"true";"";;"fact 2";;"410"
+"FTRC";"1";"23,03,2010 00:00:00";"60.0";"60.0";"01,03,2010 00:00:00";"31,03,2010 23:59:59";"BQE"
+"NTRY";"1";"encaissement vente";"60.0";"false";"";;"fact 2";;"410"
+"NTRY";"1";"encaissement vente";"60.0";"true";"";;"fact 2";;"530"
+"FTRC";"2";"23,03,2010 00:00:00";"40.0";"40.0";"01,03,2010 00:00:00";"31,03,2010 23:59:59";"VTE"
+"NTRY";"2";"vente de poisson";"40.0";"false";"";;"fact 1";;"707"
+"NTRY";"2";"vente de poisson";"40.0";"true";"";;"fact 1";;"410"
+"FTRC";"3";"23,03,2010 00:00:00";"10.0";"10.0";"01,03,2010 00:00:00";"31,03,2010 23:59:59";"ODT"
+"NTRY";"3";"impot et taxe";"10.0";"true";"";;"fact 700";;"633"
+"NTRY";"3";"impot et taxe";"10.0";"false";"";;"fact 700";;"400"
+"FTRC";"4";"23,04,2010 00:00:00";"10.0";"10.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"ACH"
+"NTRY";"4";"achat de poisson";"10.0";"true";"";;"fact 715";;"607"
+"NTRY";"4";"achat de poisson";"10.0";"false";"";;"fact 715";;"400"
+"FTRC";"5";"23,04,2010 00:00:00";"10.0";"10.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"BQE"
+"NTRY";"5";"achat de poisson";"10.0";"true";"";;"fact 715";;"400"
+"NTRY";"5";"achat de poisson";"10.0";"false";"";;"fact 715";;"530"
+"FTRC";"6";"23,04,2010 00:00:00";"30.0";"30.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"ACH"
+"NTRY";"6";"achat de poisson";"30.0";"true";"";;"fact 738";;"607"
+"NTRY";"6";"achat de poisson";"30.0";"false";"";;"fact 738";;"400"
+"FTRC";"7";"23,04,2010 00:00:00";"30.0";"30.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"BQE"
+"NTRY";"7";"achat de poisson";"30.0";"true";"";;"fact 738";;"400"
+"NTRY";"7";"achat de poisson";"30.0";"false";"";;"fact 738";;"530"
+"FTRC";"8";"23,03,2010 00:00:00";"10.0";"10.0";"01,03,2010 00:00:00";"31,03,2010 23:59:59";"BQE"
+"NTRY";"8";"impot et taxe";"10.0";"true";"";;"fact 700";;"400"
+"NTRY";"8";"impot et taxe";"10.0";"false";"";;"fact 700";;"530"
+"FTRC";"9";"23,05,2010 00:00:00";"50.0";"50.0";"01,05,2010 00:00:00";"31,05,2010 23:59:59";"BQE"
+"NTRY";"9";"réglements facts 326 532 603";"50.0";"true";"";;"piece de caisse";;"400"
+"NTRY";"9";"réglements facts 326 532 603";"50.0";"false";"";;"piece de caisse";;"530"
+"FTRC";"10";"23,05,2010 00:00:00";"20.0";"20.0";"01,05,2010 00:00:00";"31,05,2010 23:59:59";"ACH"
+"NTRY";"10";"achat de glace";"20.0";"true";"";;"fact 801";;"606"
+"NTRY";"10";"achat de glace";"20.0";"false";"";;"fact 801";;"400"
+"FTRC";"11";"23,05,2010 00:00:00";"20.0";"20.0";"01,05,2010 00:00:00";"31,05,2010 23:59:59";"BQE"
+"NTRY";"11";"achat de fourniture";"20.0";"true";"";;"fact 801";;"400"
+"NTRY";"11";"achat de fourniture";"20.0";"false";"";;"fact 801";;"530"
+"FTRC";"12";"23,05,2010 00:00:00";"30.0";"30.0";"01,05,2010 00:00:00";"31,05,2010 23:59:59";"ACH"
+"NTRY";"12";"achat frigo";"30.0";"true";"";;"fact 5328";;"215"
+"NTRY";"12";"achat frigo";"30.0";"false";"";;"fact 5328";;"400"
+"FTRC";"13";"23,05,2010 00:00:00";"20.0";"20.0";"01,05,2010 00:00:00";"31,05,2010 23:59:59";"BQE"
+"NTRY";"13";"reglement";"20.0";"true";"";;"piece de caisse";;"400"
+"NTRY";"13";"reglement";"20.0";"false";"";;"piece de caisse";;"530"
+"FTRC";"14";"23,06,2010 00:00:00";"80.0";"80.0";"01,06,2010 00:00:00";"30,06,2010 23:59:59";"VTE"
+"NTRY";"14";"ventede poisson";"80.0";"false";"";;"fact 5";;"707"
+"NTRY";"14";"ventede poisson";"80.0";"true";"";;"fact 5";;"410"
+"FTRC";"15";"23,06,2010 00:00:00";"40.0";"40.0";"01,06,2010 00:00:00";"30,06,2010 23:59:59";"BQE"
+"NTRY";"15";"reglement";"40.0";"false";"";;"fact 1";;"410"
+"NTRY";"15";"reglement";"40.0";"true";"";;"fact 1";;"530"
+"FTRC";"16";"07,01,2010 00:00:00";"200.0";"200.0";"01,01,2010 00:00:00";"31,01,2010 23:59:59";"ODT"
+"NTRY";"16";"Machine";"40.0";"true";"";;"statuts";;"215"
+"NTRY";"16";"Magasin";"100.0";"true";"";;"statuts";;"213"
+"NTRY";"16";"Capital";"200.0";"false";"";;"statuts";;"101"
+"NTRY";"16";"Camionnette";"50.0";"true";"";;"statuts";;"218"
+"NTRY";"16";"Caisse";"10.0";"true";"";;"statuts";;"530"
+"FTRC";"17";"23,04,2010 00:00:00";"50.0";"50.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"BQE"
+"NTRY";"17";"vente de poisson";"50.0";"false";"";;"fact 4";;"410"
+"NTRY";"17";"vente de poisson";"50.0";"true";"";;"fact 4";;"530"
+"FTRC";"18";"23,06,2010 00:00:00";"20.0";"20.0";"01,06,2010 00:00:00";"30,06,2010 23:59:59";"VTE"
+"NTRY";"18";"vente de poisson";"20.0";"false";"";;"fact 6";;"707"
+"NTRY";"18";"vente de poisson";"20.0";"true";"";;"fact 6";;"410"
+"FTRC";"19";"23,04,2010 00:00:00";"20.0";"20.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"BQE"
+"NTRY";"19";"vente de poisson";"20.0";"false";"";;"fact 3";;"410"
+"NTRY";"19";"vente de poisson";"20.0";"true";"";;"fact 3";;"530"
+"FTRC";"20";"23,06,2010 00:00:00";"50.0";"50.0";"01,06,2010 00:00:00";"30,06,2010 23:59:59";"ACH"
+"NTRY";"20";"achat de poisson";"50.0";"true";"";;"fact 910";;"607"
+"NTRY";"20";"achat de poisson";"50.0";"false";"";;"fact 910";;"400"
+"FTRC";"21";"23,04,2010 00:00:00";"20.0";"20.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"VTE"
+"NTRY";"21";"vente de poisson";"20.0";"false";"";;"fact 3";;"707"
+"NTRY";"21";"vente de poisson";"20.0";"true";"";;"fact 3";;"410"
+"FTRC";"22";"17,02,2010 00:00:00";"10.0";"10.0";"01,02,2010 00:00:00";"28,02,2010 23:59:59";"ACH"
+"NTRY";"22";"Achat poisson port de Lorient";"10.0";"true";"";;"FACT 603";;"607"
+"NTRY";"22";"Achat poisson port de Lorient";"10.0";"false";"";;"FACT 603";;"400"
+"FTRC";"23";"23,07,2010 00:00:00";"10.0";"10.0";"01,07,2010 00:00:00";"31,07,2010 23:59:59";"ODT"
+"NTRY";"23";"dotation aux amortissements";"10.0";"true";"";;"inventaire";;"68112"
+"NTRY";"23";"amortissement du matériel de transport";"10.0";"false";"";;"inventaire";;"281"
+"FTRC";"24";"28,02,2010 00:00:00";"30.0";"30.0";"01,02,2010 00:00:00";"28,02,2010 23:59:59";"ACH"
+"NTRY";"24";"Achat poisson port de Lorient";"30.0";"true";;;"FACT 532";;"607"
+"NTRY";"24";"Achat poisson port de Lorient";"30.0";"false";;;"FACT 532";;"400"
+"FTRC";"25";"28,02,2010 00:00:00";"10.0";"10.0";"01,02,2010 00:00:00";"28,02,2010 23:59:59";"ACH"
+"NTRY";"25";"Achat poisson port de Lorient";"10.0";"true";;;"FACT 326";;"607"
+"NTRY";"25";"Achat poisson port de Lorient";"10.0";"false";;;"FACT 326";;"400"
+"FTRC";"26";"23,04,2010 00:00:00";"50.0";"50.0";"01,04,2010 00:00:00";"30,04,2010 23:59:59";"VTE"
+"NTRY";"26";"vente de poisson";"50.0";"false";;;"fact 4";;"707"
+"NTRY";"26";"vente de poisson";"50.0";"true";;;"fact 4";;"410"
+"FTRC";"27";"23,06,2010 00:00:00";"20.0";"20.0";"01,06,2010 00:00:00";"30,06,2010 23:59:59";"ACH"
+"NTRY";"27";"achat de sachet";"20.0";"true";;;"fact 011475";;"601"
+"NTRY";"27";"achat de sachet";"20.0";"false";;;"fact 011475";;"400"
+"FTRC";"28";"23,06,2010 00:00:00";"20.0";"20.0";"01,06,2010 00:00:00";"30,06,2010 23:59:59";"BQE"
+"NTRY";"28";"achat de sachet - réglement";"20.0";"true";"";;"fact 011475";;"400"
+"NTRY";"28";"achat de sachet - réglement";"20.0";"false";"";;"fact 011475";;"530"
+"FTRC";"29";"30,07,2010 00:00:00";"10.0";"10.0";"01,07,2010 00:00:00";"31,07,2010 23:59:59";"ODT"
+"NTRY";"29";"stock sachet";"10.0";"true";;;"inventaire";;"326"
+"NTRY";"29";"variation de stocks sachet";"10.0";"false";;;"inventaire";;"6031"
+"FTRC";"30";"30,07,2010 00:00:00";"10.0";"10.0";"01,07,2010 00:00:00";"31,07,2010 23:59:59";"ODT"
+"NTRY";"30";"charges de personnel";"10.0";"true";;;"inventaire";;"6411"
+"NTRY";"30";"paiement personel - caisse";"10.0";"false";;;"inventaire";;"530"
Added: trunk/src/site/resources/extras/puzzle.svg
===================================================================
--- trunk/src/site/resources/extras/puzzle.svg (rev 0)
+++ trunk/src/site/resources/extras/puzzle.svg 2010-08-27 14:51:45 UTC (rev 3023)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="600px" height="320px" viewBox="0 0 600 320" enable-background="new 0 0 600 320" xml:space="preserve">
+<g>
+ <g>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7925" stroke-linecap="round" d="
+ M112.569,20.437c6.155-2.797,29.762-10.26,32.449-2.869c0.845,2.326-5.011,9.366-2.778,13.232
+ c6.918,11.984,32.843,9.294,33.967-1.857c0.456-4.525-7.024-9.375-3.784-13.443c1.181-1.482,15.286-0.389,16.419-0.247
+ c6.44,0.806,11.306,2.789,17.122,5.185"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7821" stroke-linecap="round" d="
+ M205.964,20.437c0.624,1,35.747,7.914,35.126,2.387c-0.647-5.765-8.141-11.704-1.897-17.257
+ c12.795-11.378,35.977-1.403,29.539,12.976c-5.904,13.188,23.637,2.929,31.571,1.895"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7702" stroke-linecap="round" d="
+ M300.304,20.437c1.77-1.348,26.947-10.338,31.033-4.608c2.691,3.775-6.24,9.711,0.326,17.556
+ c3.111,3.716,26.02,11.374,31.087-1.951c1.731-4.55-6.125-11.999-3.263-15.918c2.418-3.312,31.892,2.371,33.739,4.686"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7476" stroke-linecap="round" d="
+ M393.227,20.2c2.115-0.32,10.13,3.37,17.884,4.376c6.304,0.818,19.26,2.505,16.15-5.99c-3.647-9.96-4.657-13.421,6.492-16.441
+ c12.948-3.508,26.895,3.809,22.713,15.454c-5.135,14.305,19.572,4.743,31.099,2.602"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8067" stroke-linecap="round" d="
+ M487.564,20.2c9.936-3.858,21.351-6.935,31.896-3.975c-10.879,15.521,10.356,30.142,26.081,19.855
+ c11.851-7.753-2.489-15.099,1.673-20.565c3.323-4.364,31.891,3.197,32.163,3.542c2.761,3.483-11.096,40.242,2.049,34.901
+ c10.608-4.31,14.398-3.363,17.267,5.518c3.206,9.93-1.069,24.835-11.462,24.633c-3.396-0.066-6.644-4.825-9.843-2.78
+ c-5.286,3.38,1.114,20.411,3.101,32.502"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7476" stroke-linecap="round" d="
+ M18.938,207.698c-0.32-2.115,3.37-10.13,4.376-17.884c0.818-6.304,2.504-19.261-5.991-16.15
+ c-9.959,3.647-13.42,4.657-16.441-6.492c-3.508-12.947,3.809-26.895,15.454-22.713c14.305,5.135,4.744-19.573,2.602-31.1"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8126" stroke-linecap="round" d="
+ M18.938,113.359c-3.857-9.935-6.934-21.35-3.975-31.895c15.521,10.879,30.143-10.357,19.855-26.082
+ c-7.753-11.85-15.099,2.49-20.565-1.673c-4.364-3.322,3.198-31.89,3.542-32.162c3.483-2.762,40.242,11.096,34.902-2.049
+ C48.387,8.891,49.333,5.101,58.215,2.232c9.93-3.207,24.834,1.068,24.632,11.463c-0.066,3.395-4.825,6.643-2.78,9.841
+ c3.38,5.287,20.412-1.113,32.502-3.1"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9763" stroke-linecap="round" d="
+ M18.938,113.359c3.433,0.549,26.396-10.062,31.188-3.775c3.299,4.327-7.687,17.995,7.39,21.453
+ c6.439,1.477,35.435,0.313,21.537-16.107c-10.004-11.818,29.885-4.154,32.573-2.041"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.961" stroke-linecap="round" d="
+ M111.626,112.889c2.62-9.377,7.243-14.898,5.998-31.139c-0.51-6.649-12.35,2.566-16.185,1.371
+ c-12.182-3.801-10.102-33.043,6.082-33.215c9.089-0.098,11.295,4.568,9.243-15.128c-0.277-2.665-2.868-8.076-4.195-14.342"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9567" stroke-linecap="round" d="
+ M205.964,20.437c1.816,1.922-10.956,25.455-5.19,31.94c6.147,6.912,18.266-11.694,23.339,8.287
+ c1.632,6.428,0.018,20.425-7.443,23.196c-7.114,2.642-10.618-5.024-14.711-1.687c-3.84,3.132,0.096,14.949,0.457,17.169
+ c0.701,4.308,1.923,9.358,3.549,13.546"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9486" stroke-linecap="round" d="
+ M205.964,112.889c8.781-2.143,29.122-7.715,32.284-3.089c2.89,4.228-7.179,12.34,2.291,19.33
+ c6.077,4.485,19.318,2.448,22.797,1.168c11.203-4.123,2.916-5.28,1.665-19.261c-0.514-5.753,31.528-0.443,34.358,2.794"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M299.36,113.831c0.236-0.079,0.472-0.157,0.707-0.235"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9427" stroke-linecap="round" d="
+ M393.227,20.2c-1.374,5.997-3.719,12.398-4.471,18.766c0.027-0.225-1.826,13.276-0.031,14.686
+ c2.585,2.028,14.651-3.731,17.15-2.575c5.601,2.591,10.837,28.531-2.168,32.84c-5.998,1.987-13.4-6.856-14.95,0.334
+ c-1.59,7.383,2.913,21.171,4.941,28.639"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9652" stroke-linecap="round" d="
+ M393.698,112.889c6.645-1.379,12.054-3.559,14.757-3.999c4.448-0.726,13.604-2.911,16.24-0.249
+ c6.98,7.051-11.271,17.084,10.175,22.396c7.523,1.863,22.672,0.547,22.5-10.464c-0.102-6.565-7.465-7.682-2.883-12.622
+ c2.781-2.998,30.519,3.668,32.842,5.173"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M487.329,113.124c0.235-0.079,0.473-0.157,0.708-0.235"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9154" stroke-linecap="round" d="
+ M300.304,20.437c1.91,8.407,7.834,28.434,3.104,31.373c-2.141,1.33-3.746-1.894-8.431-2.353
+ c-19.992-1.955-13.671,31.447-6.322,33.461c7.159,1.963,10.695-6.845,15.436-3.391c2.343,1.708,0.281,17.947,0.407,16.188
+ c-0.231,3.229-2.572,8.779-4.431,17.881"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9384" stroke-linecap="round" d="
+ M300.067,113.596c1.214,2.08,37.851,8.974,33.971,1.507c-11.193-21.544,18.189-26.554,27.773-14.821
+ c5.306,6.494-3.987,12.434,0.229,17.557c4.094,4.971,28.536-4.005,31.658-4.949"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9831" stroke-linecap="round" d="
+ M487.564,20.2c-0.548,3.433,10.063,26.396,3.776,31.188c-4.327,3.299-17.994-7.688-21.453,7.39
+ c-1.483,6.472-0.301,35.425,16.106,21.537c11.82-10.004,4.155,29.885,2.043,32.573"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M111.626,112.889c0.079,0.235,0.157,0.471,0.236,0.707"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9576" stroke-linecap="round" d="
+ M111.862,113.596c3.774-0.121,37.778,11.95,34.148-0.52c-2.962-10.18-6.495-13.614,4.903-17.393
+ c6.951-2.305,22.412-0.671,25.085,7.438c1.275,3.867-5.393,13.74-0.555,14.705c7.981,1.594,19.421-1.215,30.364-4.467"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M205.808,113.359c0.052-0.156,0.104-0.314,0.157-0.471"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8808" stroke-linecap="round" d="
+ M111.626,207.227c6.562-2.337,28.98-8.865,32.284-4.031c3.967,5.804-8.897,15.057,6.06,21.236
+ c5.71,2.358,20.13,2.504,24.135-3.465c3.139-4.678-6.508-13.627-2.376-18.7c3.362-4.129,29.896,3.773,34.079,4.489"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9758" stroke-linecap="round" d="
+ M205.808,206.756c-1.114-1.516,10.428-28.44,4.395-33.312c-4.999-4.037-8.467,5.103-15.411,3.13
+ c-15.224-4.323-4.753-31.869,0.469-33.717c4.071-1.439,11.221,4.559,14.671,1.504c3.109-2.754-2.161-25.728-4.124-31.002"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9766" stroke-linecap="round" d="
+ M300.067,207.462c1.753,1.635,23.625-11.175,30.29-4.483c3.711,3.726-1.06,4.387-1.032,9.574
+ c0.093,17.719,29.807,16.169,33.46,6.323c3.191-8.607-7.56-11.223-2.634-16.586c2.021-2.2,22.575,2.268,22.833,2.331
+ c1.661,0.406,7.287,0.889,10.715,2.605"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M393.698,207.227c0.157-0.053,0.314-0.104,0.472-0.157"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8808" stroke-linecap="round" d="
+ M394.17,207.069c1.109-6.185,3.672-12.227,4.47-18.372c0.392-3.015,1.699-17.07-2.08-16.771c-9.47,0.75-17.292,11.149-21.01-5.871
+ c-1.667-7.625,0.404-18.833,6.497-22.239c6.652-3.72,15.21,5.499,16.593-1.347c1.522-7.539-1.923-21.927-4.941-29.581"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8021" stroke-linecap="round" d="
+ M580.488,207.227c0.824-0.659,10.743-30.466,4.297-34.181c-1.935-1.116-10.971,4.601-12.771,4.424
+ c-10.148-1-9.716-19.771-8.974-22.932c1.489-6.341,4.407-11.217,9.885-11.893c-0.334,0.041,11.628,4.939,12.477,1.967
+ c2.328-8.152-1.088-22.314-4.914-30.781"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9832" stroke-linecap="round" d="
+ M580.488,113.831c-8.747,1.837-10.785,4.589-22.641,4.62c-18.859,0.049,1.916-11.966-11.942-20.874
+ c-7.508-4.827-24.858-3.586-27.896,4.604c-1.872,5.046,8.351,15.448,1.166,16.664c-14.821,2.508-20.789-3.611-31.138-5.957"/>
+
+ <line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" x1="393.698" y1="112.889" x2="393.698" y2="112.889"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9774" stroke-linecap="round" d="
+ M394.17,207.069c1.515-1.113,28.44,10.429,33.311,4.395c4.037-4.999-5.102-8.467-3.13-15.41
+ c4.323-15.225,31.871-4.754,33.717,0.469c1.439,4.07-4.559,11.221-1.503,14.67c2.753,3.109,25.727-2.161,31-4.123"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9542" stroke-linecap="round" d="
+ M487.564,207.069c0.961-4.867-11.193-26.125-3.755-31.802c3.618-2.763,10.649,2.982,13.47,2.191
+ c9.686-2.711,9.701-19.536,7.514-25.562c-2.82-7.768-2.613-9.106-16.429-4.828c-12.179,3.771-2.435-26.246-1.035-33.945"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9419" stroke-linecap="round" d="
+ M18.938,207.698c5.998,1.374,12.398,3.718,18.766,4.471c-0.224-0.027,13.277,1.826,14.686,0.031
+ c2.028-2.585-3.731-14.651-2.575-17.15c2.591-5.601,28.53-10.837,32.839,2.168c1.988,5.998-6.856,13.401,0.334,14.95
+ c7.382,1.591,21.171-2.913,28.638-4.941"/>
+
+ <line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" x1="111.626" y1="207.227" x2="111.626" y2="207.227"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9523" stroke-linecap="round" d="
+ M111.626,207.227c-1.377-6.645-3.558-12.054-3.998-14.757c-0.726-4.448-2.911-13.604-0.25-16.24
+ c7.05-6.979,17.083,11.271,22.396-10.175c1.863-7.523,0.546-22.672-10.463-22.5c-6.565,0.103-7.682,7.466-12.622,2.883
+ c-2.999-2.78,3.667-30.518,5.172-32.842"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M205.808,206.756c0.052,0.156,0.104,0.313,0.157,0.471"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9648" stroke-linecap="round" d="
+ M205.964,207.227c2.829,0.69,36.763,12.077,34.385,0.188c-2.095-10.474-5.819-10.568,0.19-15.486
+ c5.754-4.709,26.764-4.347,29.848,5.289c1.08,3.372-4.471,10.761-2.468,13.799c3.519,5.334,28.782-2.259,31.44-3.79"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9339" stroke-linecap="round" d="
+ M299.36,207.227c-2.466-11.109-10.088-35.88,1.559-30.908c21.438,9.151,22.406-32.744,6.318-32.072
+ c-6.701,0.278-7.689,6.343-11.865,3.127c-4.947-3.812,3.404-28.087,3.987-33.542"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7683" stroke-linecap="round" d="
+ M393.227,300.857c2.324,0.646,29.727-10.943,32.988-1.283c0.524,1.554-2.713,6.293-2.695,6.196
+ c-1.557,8.183,4.838,11.703,10.233,13.143c4.297,1.146,22.595,2.328,23.549-8.824c0.445-5.218-7.319-9.101-3.75-13.461
+ c4.372-5.34,32.56,4.99,34.013,4.229"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9423" stroke-linecap="round" d="
+ M487.564,300.857c1.297-5.793,3.707-11.939,4.471-17.822c0.448-3.454,1.664-17.066-2.081-16.77
+ c-14.194,1.125-13.671,9.194-18.404-0.467c-1.706-3.482-6.237-24.751,5.534-28.657c3.623-1.202,11.039,4.389,13.99,2.415
+ c5.538-3.706-1.959-25.908-3.037-32.33"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M488.037,207.227c-0.158-0.053-0.315-0.104-0.473-0.157"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8025" stroke-linecap="round" d="
+ M18.938,207.698c-0.915,1.813-12.947,38.019,1.172,33.059c20.396-7.165,18.947,16.769,14.676,24.946
+ c-9.442,18.081-25.282-11.36-20.796,19.684c2.647,18.317,4.734,13.495,20.71,11.095c8.521-1.28,17.503-1.638,15.167,6.02
+ c-6.256,20.509,19.905,19.297,26.811,14.709c11.354-7.544-3.514-14.304,1.407-20.584c3.879-4.952,32.02,4.592,34.484,3.996"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8427" stroke-linecap="round" d="
+ M205.964,300.622c4.623-0.185,35.752-11.611,31.637,1.879c-6.445,21.128,21.418,18.292,26.811,14.709
+ c11.917-7.918-3.409-14.438,1.407-20.584c2.659-3.394,27.964,2.534,34.485,3.996"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.888" stroke-linecap="round" d="
+ M300.304,300.622c2.67-11.128,6.319-22.765,3.344-34.184c-7.716-0.787-8.166,6.646-14.475,4.416
+ c-12.481-4.413-9.976-35.345,6.083-33.215c3.682,0.488,6.765,2.708,8.072,1.919c6.158-3.721-3.209-28.396-3.26-32.097"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="2.8942" stroke-linecap="round" d="
+ M300.067,207.462c-0.235-0.078-0.471-0.157-0.707-0.235"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9214" stroke-linecap="round" d="
+ M111.626,207.227c1.399,5.645,4.053,10.175,4.941,14.758c1.013,5.229,2.757,13.731,0.249,16.239
+ c-5.849,5.85-18.911-9.225-21.744,9.387c-1.823,11.979-0.282,29.147,18.288,19.49c9.196-4.783,0.853,28.509-0.791,33.521"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.7586" stroke-linecap="round" d="
+ M112.569,300.622c0.291,0.654,30.637,10.824,34.182,4.29c1.158-2.135-4.717-12.959-3.6-15.568c5.319-12.416,32.65-7.217,34,3.716
+ c-0.176-1.429-4.593,11.726-1.966,12.477c8.196,2.341,23.509-1.56,30.78-4.914"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9682" stroke-linecap="round" d="
+ M205.964,300.622c-1.897-7.095-4.989-14.15-4.713-24.528c0.293-11.054,3.661-4.46,10.04-4.493
+ c16.363-0.086,17.76-29.217,6.323-33.459c-8.383-3.109-11.226,7.556-16.585,2.633c-2.059-1.891,2.206-22.323,2.331-22.833
+ c0.566-2.316,0.542-5.763,2.605-10.715"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.8061" stroke-linecap="round" d="
+ M300.304,300.622c2.797,2.289,9.91,3.469,14.955,4.249c3.539,0.546,19.878,2.876,19.072-1.058
+ c-1.872-9.145-8.687-16.655,6.025-20.539c6.364-1.681,20.446-0.51,23.427,7.339c1.362,3.588-4.643,14.373-0.839,14.999
+ c8.886,1.465,23.641-1.513,30.282-4.755"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9609" stroke-linecap="round" d="
+ M393.227,300.857c1.564-4.043-11.484-25.358-3.75-31.227c4.175-3.166,17.993,7.625,21.427-7.352
+ c2.968-12.94-2.204-32.87-16.178-21.583c-10.637,8.591-4.913-27.192-1.027-33.47"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.79" stroke-linecap="round" d="
+ M487.564,300.857c2.549,0.859,9.52,3.886,16.941,4.849c1.393,0.181,15.623,1.431,16.753-0.11
+ c3.517-4.798-7.626-11.46-0.921-18.862c5.668-6.258,27.788-6.493,31.115,3.848c0.858,2.67-4.201,14.465-0.774,15.031
+ c8.464,1.401,17.597,0.172,30.21-5.049c-0.255-1.156-10.425-29.557-2.316-32.397c6.688-2.342,8.761,7.748,16.498,0.817
+ c7.121-6.378,6.782-27.575-2.684-30.864c-2.119-0.737-13.812,5.162-15.964,3.503c-3.443-2.653,2.695-28.266,4.065-34.396"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="1.9564" stroke-linecap="round" d="
+ M580.488,207.227c-1.922,1.815-25.456-10.957-31.94-5.19c-6.912,6.146,11.694,18.267-8.287,23.34
+ c-6.428,1.631-20.425,0.018-23.195-7.443c-2.643-7.114,5.023-10.618,1.686-14.711c-3.132-3.842-14.949,0.096-17.169,0.457
+ c-4.309,0.699-9.357,1.922-13.545,3.548"/>
+ </g>
+</g>
+</svg>
Added: trunk/src/site/resources/extras/puzzle_icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/extras/puzzle_icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_4.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_5.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_6.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/export_ebp_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/export_ebp_7.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_import_charset.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_import_charset.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_import_limaall.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_import_limaall.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_lettering.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_lettering.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_open_account.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_open_account.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_open_entrybook.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_open_entrybook.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_open_fiscalperiod.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_open_fiscalperiod.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_open_identity.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_open_identity.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_open_welcome.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_open_welcome.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_splashscreen.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_splashscreen.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/rst/assistant.rst
===================================================================
--- trunk/src/site/rst/assistant.rst (rev 0)
+++ trunk/src/site/rst/assistant.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -0,0 +1,76 @@
+============
+Assistant
+============
+
+Au premier démarrage de LIMA un assistant vous guide pour créer votre comptabilité.
+Il est également possible de charger une précédente sauvegarde de LIMA au format CSV.
+Dans le cas par exemple d'une réinstallation du logiciel.
+Ou de fermer l'assistant pour créer sa comptabilité sans l'assistant.
+
+
+--------------------------------------
+Les différentes étapes de l'assistant
+--------------------------------------
+
+~~~~~~~~~~~~~~~~~
+Fiche d'identité
+~~~~~~~~~~~~~~~~~
+
+Vous pouvez renseigner les coordonnées de votre entreprise dans les champs
+correspondants. Ces informations permettent de personnalisé vos documents lors
+de l'impression des rapports PDF ou HTML : journaux, grand-livre, balance, …
+Ces coordonnées sont modifiables par la suite dans le menu Fichier -> Identité
+
+.. image:: screens/lima_open_identity.png
+
+
+~~~~~~~~~~~~~~~~~
+Plan comptable
+~~~~~~~~~~~~~~~~~
+
+Par défaut LIMA propose les trois plans comptables de la norme française :
+- abrégé ;
+- de base ;
+- développé.
+
+Choisissez celui qui correspond à votre activité.
+Ce plan comptable est modifiable à volonté : ajout, modification, suppression de compte.
+Menu Structure -> Plan comptable
+
+Il est également possible d'importer un plan comptable au format LIMA CSV, ou provenant
+du logiciel EBP. Pour plus d'information sur le format d'import/export EBP.
+Cf. (..IMPORT-EXPORT_)
+
+.. _IMPORT-EXPORT: ../importexport.rst
+
+Lors de l'import d'un plan comptable abregé, de base, ou développé. Le générateur
+de bilan / compte de résultat, charge le plan de passage des compte au poste
+correspondant (appelé BCR dans lima). Pour un import externe, le plan BCR chargé
+par défaut est celui de base.
+
+.. image:: screens/lima_open_account.png
+
+
+~~~~~~~~~~~~~~~~~
+Journaux
+~~~~~~~~~~~~~~~~~
+
+Par défaut les quatres journaux les plus courants sont proposés au chargement :
+- achat ;
+- vente ;
+- opérations diverses ;
+- trésorerie.
+
+Il est possible d'ajouter, modifier et supprimer des journaux en fonction de votre activité.
+Menu Structure -> Journaux
+
+.. image:: screens/lima_open_entrybook.png
+
+~~~~~~~~~~~~~~~~~
+Exercice
+~~~~~~~~~~~~~~~~~
+
+Séléctionner la date et fin du nouvel exercice, une fois crée un exercice ne
+peut-être supprimé ou sa date modifiée.
+
+.. image:: screens/lima_open_fiscalperiod.png
\ No newline at end of file
Modified: trunk/src/site/rst/contact.rst
===================================================================
--- trunk/src/site/rst/contact.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/contact.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -13,9 +13,7 @@
Support
=======
-.. image:: logo/codelutin.png
-
Code Lutin est une société de services en logiciels libres spécialisée dans les
technologies Java/J2EE, XML, UML. Son offre s'étend à l'audit, au conseil, à la
tierce maintenance applicative et à la formation.
Modified: trunk/src/site/rst/features.rst
===================================================================
--- trunk/src/site/rst/features.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/features.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,78 +1,84 @@
-========
+-----------------
Fonctionnalités
-========
+-----------------
-
+~~~~~~~~~~~~~
Structure
------------
+~~~~~~~~~~~~~
Cette section permet de définir le cadre de la comptabilité :
-- plan comptable
-.. image:: screens/lima_charts_accountschart.png
+- Plan comptable
-- journaux
+.. image:: screens/lima_charts_accounts.png
+- Journaux
+
.. image:: screens/lima_charts_entrybooks.png
-- exercices
+- Exercices
.. image:: screens/lima_charts_fiscalperiod.png
-- période comptable
+- Période comptable
.. image:: screens/lima_charts_financialperiod.png
-- plan bilan / compte de résultat
+- Plan bilan / compte de résultat
.. image:: screens/lima_charts_financialstatement.png
-
+~~~~~~~~~~~~~
Traitement
------------
+~~~~~~~~~~~~~
La partie traitement regroupe les fonctions utiles au quotidien :
-- saisie
+- Saisie
-.. image:: screenshots/lima_entries.png
+.. image:: screens/lima_entries.png
-- recherche
+- Recherche
-.. image:: screenshots/lima_searchtransaction.png
+.. image:: screens/lima_searchtransaction.png
+- Lettrage
+.. image:: screens/lima_lettering.png
+
+~~~~~~~~~~~~~
Rapports
------------
+~~~~~~~~~~~~~
Permet de visualiser les documents usuelles de la comptabilité :
-- journal
+- Journal
-.. image:: screenshots/lima_reports_entrybooks.png
+.. image:: screens/lima_reports_entrybooks.png
-- comptes
+- Comptes
-.. image:: screenshots/lima_reports_accounts.png
+.. image:: screens/lima_reports_accounts.png
-- balance
+- Balance
-.. image:: screenshots/lima_reports_balance.png
+.. image:: screens/lima_reports_balance.png
-- grand-livre
+- Grand-livre
-.. image:: screenshots/lima_reports_ledger.png
+.. image:: screens/lima_reports_ledger.png
- Bilan et compte de résultat
-.. image:: screenshots/lima_reports_financialstatement.png
+.. image:: screens/lima_reports_financialstatement.png
Les documents sont atteignables par les menu de LIMA et via un site internet embarqué.
+~~~~~~~~~~~~~~~~~
Import / Export
------------
+~~~~~~~~~~~~~~~~~
Toutes les données de LIMA sont exportables et importables à volontés au format CSV.
L'utilisation de ce format permet d'être exploité par un tableur.
Deleted: trunk/src/site/rst/howto.rst
===================================================================
--- trunk/src/site/rst/howto.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/howto.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,6 +0,0 @@
-
-==========================
-Télécharger et lancer LIMA
-==========================
-
-A venir
\ No newline at end of file
Added: trunk/src/site/rst/importexport.rst
===================================================================
--- trunk/src/site/rst/importexport.rst (rev 0)
+++ trunk/src/site/rst/importexport.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -0,0 +1,104 @@
+==================
+Import / Export
+==================
+
+LIMA supporte actuellement deux formats d'import export.
+Le CSV avec un modèle de donnée spécifique à LIMA ; et le format EBP.
+
+
+-------------------------
+Format CSV
+-------------------------
+
+La comptabilité de LIMA peut-être sauvegarder en intégralité via la fonction
+Import -> Tout. Ou seulement le plan des comptes, le plan BCR ou les journaux.
+
+.. image:: screens/lima_import_limaall.png
+
++-----------------------------------------------------------------------------------------------+
+| Structure des champs correspondant à chaque entité au format CSV LIMA |
++================+==============================================================================+
+| Compte | "ACCN";"AccountNumber";"Label";"ThirdParty";"MasterAccount";"GeneralLedger" |
++----------------+------------------------------------------------------------------------------+
+| Journal | "ENBK";"Code";"Label";"Type" |
++----------------+------------------------------------------------------------------------------+
+| Transaction | "FTRC";"TransactionNumber";"TransactionDate";"AmountDebit";"AmountCredit"; |
+| . | "FinancialPeriod BeginDate";"FinancialPeriod EndDate";"EntryBook Code" |
++----------------+------------------------------------------------------------------------------+
+| Entry | "NTRY";"TransactionNumber";"Description";"Amount";"Debit Boolean";"Letter"; |
+| . | "Details";"Voucher";"Position";"AccountNumber" |
++----------------+------------------------------------------------------------------------------+
+| Identity | "IDNT";"Name";"Description","Address";"Address2";"City";"PhoneNumber"; |
+| . | "Email";"ZipCode";"VatNumber";"ClassificationCode";"BusinessNumber" |
++----------------+------------------------------------------------------------------------------+
+| Financial | "FNST";"Label";"Header";"Accounts";"DebitAccounts";"CreditAccounts"; |
+| Statement | "ProvisionDeprecationAccnts";"SubAmount";"HeaderAmount";"MasterFincialStmnt" |
++----------------+------------------------------------------------------------------------------+
+| Fiscal Period | "FSCP";"BeginDate";"EndDate";"Locked" |
++----------------+------------------------------------------------------------------------------+
+| ClosedPeriodic | "CPEB";"Locked";"FinancialPeriod beginDate"; |
+| EntryBook | "FinancialPeriod endDate";"EntryBook Code" |
++----------------+------------------------------------------------------------------------------+
+
+
+Le format CSV est utilisable à partir d'un tableur, pour une compatibilité étendue
+avec les différents systèmes d'exploitation, différent charset au moment de l'import
+et de l'export sont supportés : UTF8, ISO Latin 1, MacRoman.
+
+.. image:: screens/lima_import_charset.png
+
+À partir de la fonction Import -> Tout, votre fichier peut contenir que les entités
+qui vous intéresse. Ainsi vous pouvez tapez au kilomètre vos écritures dans un tableur et les importer
+en respectant bien le système Transaction / Entrées.
+
+
+Une sauvegarde de démonstration au format CSV est (..disponible_) au téléchargement.
+
+.. _disponible: http://chorem.org/projects/list_files/lima
+
+
+
+-------------------------
+Format EBP
+-------------------------
+
+La procédure est identique pour l'export des comptes ou des écritures.
+
+
+.. image:: screens/export_ebp_1.png
+
+Choissisez l'option Export Paramétrable dans EBP
+
+
+.. image:: screens/export_ebp_2.png
+
+Choisissez l'export qui vous intéresse : comptes ou écritures.
+
+
+.. image:: screens/export_ebp_3.png
+
+Entrer un emplacement et un nom au fichier d'export
+
+
+.. image:: screens/export_ebp_4.png
+
+Cliquer sur le bouton "Tout exporter", tous les champs passe du cadre de droite
+à gauche
+
+
+.. image:: screens/export_ebp_5.png
+
+Choisir la première ligne devra contenir "les noms des champs". Vérifier que le
+séparateur est virgule et que les champs de texte sont entourés par rien.
+
+
+.. image:: screens/export_ebp_6.png
+
+Cliquer sur le bouton "Exporter" pour confirmer.
+
+
+.. image:: screens/export_ebp_7.png
+
+L'export est effectué !
+
+
\ No newline at end of file
Property changes on: trunk/src/site/rst/importexport.rst
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/index.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -2,6 +2,7 @@
Introduction
==================
+.. image:: extras/puzzle_icon.png
Acronyme de Lutin Invoice Monitoring and Accounting, l’application de comptabilité
LIMA est un logiciel libre pensé pour être la plus ergonomique possible et facile
Modified: trunk/src/site/rst/install.rst
===================================================================
--- trunk/src/site/rst/install.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/install.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,12 +1,16 @@
Installer et lancer Lima
-------------------------
+-------------------------
-Le lancement de Lima est assez simple, il suffit de télécharger le zip de la
-dernière version à partir du lien download et de le décompresser à l'endroit où
-vous souhaitez le voir installé.
+Installer LIMA en quelques instants. Télécharger l'archive au format zip sur la
+page de (..download_). Décompresser le fichier sur votre disque dur.
-Pour le lancer, il suffit de double-cliquer sur lima.exe si vous êtes sur
-Windows ou sur go.sh si vous êtes sur un système Linux. Vous accédez alors
-à l'interface de Lima après un temps de chargement.
+Pour lancer l'application :
-.. image:: screenshots/FirstLaunch.png
+- Linux : lancer le script go.sh ;
+- Mac OS X : double clique sur le jar lima.jar ;
+- Windows : double clique sur l'executable lima.exe.
+
+.. image:: screens/lima_splashscreen.png
+
+
+.. _download: http://chorem.org/projects/list_files/lima
\ No newline at end of file
Deleted: trunk/src/site/rst/journal.rst
===================================================================
--- trunk/src/site/rst/journal.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/journal.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,22 +0,0 @@
-Créer et modifier les journaux
-------------------------------
-
-Pour obtenir la liste des journaux, il suffit de cliquer sur Editer > Journal.
-Vous ouvrez ainsi un onglet qui indique la liste des journaux créés. Si c'est la
-première fois que vous utilisez Lima, cette liste est vide.
-
-.. image:: screenshots/journaux.png
-
-Pour créer un journal, il suffit de cliquer sur 'Ajout'. Il est demandé de
-renseigner les différentes information du journal : Nom, Description et Préfixe.
-
-.. image:: screenshots/AjoutJournal.png
-
-Pour modifier un journal, il suffit de le sélectionner dans la liste et de
-cliquer sur 'Mettre à jour'. Il est ainsi possible de modifier le préfixe et la
-description d'un journal.
-
-.. image:: screenshots/EditJournal.png
-
-Pour supprimer un journal, on le sélectionne dans la liste et on clique sur
-'Supprimer' une validation plus tard, le journal est supprimé.
\ No newline at end of file
Modified: trunk/src/site/rst/lexique.rst
===================================================================
--- trunk/src/site/rst/lexique.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/lexique.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -5,22 +5,36 @@
Nous définirons ici les quelques notions de comptabilité d'entreprise nécessaires
à l'appréhension du fonctionnement de LIMA.
-``Actif :``
------------
-L'actif d'une entreprise est l'ensemble de son patrimoine. Il comporte notamment
-la trésorerie, les immobilisations et les créances (sommes dues par des tiers).
-``Bilan :``
------------
-Le bilan est un état comptable, obligatoirement publié à l'issue de l'exercice
-et déduit du Grand Livre. Il présente l'état des actifs (patrimoines, ou emplois
-des ressources) et passifs (ressources, sous diverses formes de dettes) de
-l'entreprise à une date donnée : la date de clôture de l'exercice.
+~~~~~~~~~~~~~~~~~
+Transaction
+~~~~~~~~~~~~~~~~~
+Ce que nous appelons ici transaction désigne une opération comptable,
+c'est-à-dire l'inscription au journal, à une date donnée, d'un certain nombre
+d'écritures au débit et au crédit. Pour que l'opération soit équilibrée, il faut
+que la somme des écritures au crédit soit égale à celle des écritures au débit.
+L'ensemble compose une transaction entre plusieurs comptes.
-On peut également établir un bilan provisoire avant la fin de l'exercice.
+Une transaction peut, par exemple, représenter une opération d'achat à un
+fournisseur (Crédit du compte de "Achat", débit du compte "Fournisseur"), une
+opération de vente à un client...
-``Compte :``
-------------
+Historiquement, une transaction est inscrite au Journal (ou, pour la comptabilité
+multi-journaux au journal concerné : journal des ventes, journal des achats...)
+et ses écritures sont reportées au Grand Livre.
+
+
+~~~~~~~~~~~~~~~~~
+Ecriture
+~~~~~~~~~~~~~~~~~
+Une écriture comptable représente tout simplement le débit ou le crédit d'un
+compte. Elles sont passées par compte dans le Grand Livre, et rassemblées par
+opérations dans le Journal.
+
+
+~~~~~~~~~~~~~~~~~
+Compte
+~~~~~~~~~~~~~~~~~
Un compte est la plus petite unité retenue pour le classement des flux de valeur.
Il sera débité ou crédité pour symboliser certaines opérations. Il existe par
exemple des comptes de charges (Impôts sur les sociétés, Achats, Variations de
@@ -41,36 +55,10 @@
passées respectivement au débit et au crédit du compte. Cela leur donne une forme
de T, ce qui a donné naissance à l'appellation de compte en T.
-``Compte de résultat :``
-------------------------
-Le compte de résultat est un état comptable, obligatoirement publié à l'issue de
-l'exercice et déduit du Grand Livre. Il oppose la liste des différentes charges
-(pertes d'argent ou de valeur, que ce soit par consommation, par paiement de
-taxes ou de salaires, par donations, par dépréciation d'actif...) à celle des
-différents produits (gains d'argent, généralement par vente de produits finis ou
-de marchandises).
-Il met également en avant la différence entre les deux, qui représente le
-résultat de l'entreprise pour l'exercice. Celui-ci peut être positif ou négatif,
-suivant que la somme des produits dépasse celle des charges ou non. S'il est
-positif, on parle alors de bénéfice qui pourra être redistribué aux actionnaires
-(propriétaires) ou conservé pour financer l'activité.
-
-``Ecriture :``
---------------
-Une écriture comptable représente tout simplement le débit ou le crédit d'un
-compte. Elles sont passées par compte dans le Grand Livre, et rassemblées par
-opérations dans le Journal.
-
-``Etats comptables :``
-----------------------
-Les états comptables sont des documents de synthèse déduits du Journal et du
-Grand Livre et dont la publication est également obligatoire à la fin de
-l'exercice. Ils fournissent des indications sur la santé de l'entreprise. Les
-états sont, en France, le bilan, le compte de résultat et l'annexe.
-
-``Exercice :``
---------------
+~~~~~~~~~~~~~~~~~
+Exercice
+~~~~~~~~~~~~~~~~~
Un exercice est une période, généralement de un an, pour laquelle l'entreprise
établit sa comptabilité. A l'issu de l'exercice, l'entreprise doit publier sa
comptabilité concernant cette période. Une fois cette publication effectuée,
@@ -78,14 +66,10 @@
exercice, une fois fini, doit être clôturé, ce qui interdit alors toutes
modifications sur les informations comptables concernant cet exercice.
-``Grand Livre :``
------------------
-Historiquement, le Grand Livre est le cahier où sont consignés tous les comptes
-en T de l'entreprises (tableaux de deux colonnes, débit et crédit, consignant
-les diverses écritures passées sur le compte), à raison d'un par page.
-``Journal :``
--------------
+~~~~~~~~~~~~~~~~~
+Journal
+~~~~~~~~~~~~~~~~~
Historiquement, le journal est le cahier où l'entreprise consigne par ordre
chronologique la trace de ses opérations comptables (transactions). Parfois,
celle-ci utilise plusieurs journaux (journal des achats, journal des stocks,
@@ -94,41 +78,53 @@
transactions entre différentes personnes, chacune responsable d'un domaine
précis (achat, vente, stock...). On parle alors de comptabilité multi-journaux.
-``Passif :``
-------------
+
+~~~~~~~~~~~~~~~~~
+Grand Livre
+~~~~~~~~~~~~~~~~~
+Historiquement, le Grand Livre est le cahier où sont consignés tous les comptes
+en T de l'entreprises (tableaux de deux colonnes, débit et crédit, consignant
+les diverses écritures passées sur le compte), à raison d'un par page.
+
+
+~~~~~~~~~~~~~~~~~
+Actif
+~~~~~~~~~~~~~~~~~
+L'actif d'une entreprise est l'ensemble de son patrimoine. Il comporte notamment
+la trésorerie, les immobilisations et les créances (sommes dues par des tiers).
+
+
+~~~~~~~~~~~~~~~~~
+Passif
+~~~~~~~~~~~~~~~~~
Le passif d'une entreprise est l'ensemble des ressources de l'entreprise, sous
la forme de capitaux et de dettes.
-``Report à nouveau :``
-----------------------
-Historiquement, lors de la clôture d'un exercice comptable, on changeait de
-cahiers (Journal et Grand Live) pour attaquer la consignation des opérations du
-nouvel exercice. On soldait alors tous les comptes du Grand Livre en débitant
-les comptes créditeurs et en créditant les comptes débiteurs de la valeur du
-solde (différence entre débit et crédit) du compte. On effectuait alors
-l'opération inverse en première opération du nouvel exercice. On appelle cette
-opération un report à nouveau.
-Dans notre cas, comme dans tous les logiciels de comptabilité, le report à
-nouveau ne sera que partiellement effectué. Si CALLAO reportera bien le solde
-des différents comptes sur l'exercice suivant, nous ne solderons pas l'exercice
-précédent.
+~~~~~~~~~~~~~~~~~
+Bilan
+~~~~~~~~~~~~~~~~~
+Le bilan est un état comptable, obligatoirement publié à l'issue de l'exercice
+et déduit du Grand Livre. Il présente l'état des actifs (patrimoines, ou emplois
+des ressources) et passifs (ressources, sous diverses formes de dettes) de
+l'entreprise à une date donnée : la date de clôture de l'exercice.
-``Transaction :``
------------------
-Ce que nous appelons ici transaction désigne une opération comptable,
-c'est-à-dire l'inscription au journal, à une date donnée, d'un certain nombre
-d'écritures de débit et de crédit. Pour que l'opération soit équilibrée, il faut
-que la somme des écritures de crédit (sur certains comptes) la composant soit
-égale à celle des écritures de débit (sur d'autres comptes). C'est pourquoi on
-peut voir l'ensemble comme une transaction entre plusieurs comptes.
+On peut également établir un bilan provisoire avant la fin de l'exercice.
-Une transaction peut, par exemple, représenter une opération d'achat à un
-fournisseur (Crédit du compte de "Achat", débit du compte "Fournisseur"), une
-opération de vente à un client... Dans ce genre de cas, la réalité de l'opération
-peut être prouvée à l'aide d'un justificatif, dont la référence sera inscrite
-dans la comptabilité.
-Historiquement, une transaction est inscrite au Journal (ou, pour la comptabilité
-multi-journaux au journal concerné : journal des ventes, journal des achats...)
-et ses écritures sont reportées au Grand Livre.
\ No newline at end of file
+~~~~~~~~~~~~~~~~~~~~
+Compte de résultat
+~~~~~~~~~~~~~~~~~~~~
+Le compte de résultat est un état comptable, obligatoirement publié à l'issue de
+l'exercice et déduit du Grand Livre. Il oppose la liste des différentes charges
+(pertes d'argent ou de valeur, que ce soit par consommation, par paiement de
+taxes ou de salaires, par donations, par dépréciation d'actif...) à celle des
+différents produits (gains d'argent, généralement par vente de produits finis ou
+de marchandises).
+
+Il met également en avant la différence entre les deux, qui représente le
+résultat de l'entreprise pour l'exercice. Celui-ci peut être positif ou négatif,
+suivant que la somme des produits dépasse celle des charges ou non. S'il est
+positif, on parle alors de bénéfice qui pourra être redistribué aux actionnaires
+(propriétaires) ou conservé pour financer l'activité.
+
Deleted: trunk/src/site/rst/planComptable.rst
===================================================================
--- trunk/src/site/rst/planComptable.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/planComptable.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,24 +0,0 @@
-Créer-modifier son plan comptable
----------------------------------
-
-Lima possède un plan-comptable simple, cependant vous pouvez modifier ce dernier
-ou bien créer le votre. Pour accéder au plan comptable, il suffit de cliquer sur
-'Editer>Compte'. Cela ouvre un nouvel onglet contenant le plan comptable
-utilisé.
-
-.. image:: screenshots/PlanComptable.png
-
-Pour ajouter un compte, il suffit de sélectionner son compte père et de cliquer
-sur 'Ajout'. Il faut ensuite compléter le nom et le numéro du compte ainsi que
-son type (Actif, Passif, Produit ou Charge).
-
-.. image:: screenshots/AjouterCompte.png
-
-Pour une modification, il suffit de sélectionner le compte et de cliquer sur
-'Mettre à jour', seuls la description et le type de compte sont modifiables.
-
-Pour une suppression, il suffit de sélectionner le compte à supprimer et de
-cliquer sur 'Supprimer', une validation plus tard, le compte est supprimé.
-
-Attention, si vous supprimer un compte, tous ses compte-fils seront aussi
-supprimés.
Modified: trunk/src/site/rst/presentation.rst
===================================================================
--- trunk/src/site/rst/presentation.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/presentation.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -2,8 +2,9 @@
Présentation de LIMA
========================
+------------------
Introduction
-------------
+------------------
Acronyme de Lutin Invoice Monitoring and Accounting, l’application de comptabilité
LIMA est un logiciel libre pensé pour être la plus ergonomique possible et facile
@@ -22,8 +23,9 @@
désiré.
+------------------
Historique
-------------
+------------------
Ce projet est né d'un besoin d'adapter l'ergonomie d'OFBiz Neogia qui
proposait un système de comptabilité générale.
@@ -43,16 +45,14 @@
programmation de Code Lutin. LIMA s'appuie notamment sur les projets internes Topia,
EuGene et JAXX.
-
+------------------
Architecture
-------------
+------------------
LIMA est un projet MAVEN multi-module, il est en réalité composé de trois projets Java :
lima-business, lima-callao, lima-swing.
-.. image:: resources/schemas/lima-callao-architecture.png
-
-
+~~~~~~~~~~~~~
Lima-callao
~~~~~~~~~~~~~
@@ -68,7 +68,7 @@
de définir les méthodes associées à la base de données pour le stockage de ces
entités : ajout, modification, suppression.
-
+~~~~~~~~~~~~~
lima-business
~~~~~~~~~~~~~
@@ -83,7 +83,7 @@
service des périodes financières, service des entrées, services des rapports, etc...
On peut ajouter, modifier et supprimer des services selon les besoins de l'activité.
-
+~~~~~~~~~~~~~
lima-swing
~~~~~~~~~~~~~
@@ -98,9 +98,9 @@
les bons messages, d’appeler les services correspondants, et de retourner les
données, par exemple : le remplissage d’un tableau.
-
+------------------
Licence
--------
+------------------
Lima est développé sous licence GPL :
GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007
\ No newline at end of file
Added: trunk/src/site/rst/rapports.rst
===================================================================
--- trunk/src/site/rst/rapports.rst (rev 0)
+++ trunk/src/site/rst/rapports.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -0,0 +1,5 @@
+============
+Rapports
+============
+
+TODO
\ No newline at end of file
Property changes on: trunk/src/site/rst/rapports.rst
___________________________________________________________________
Added: svn:executable
+ *
Deleted: trunk/src/site/rst/roadmap.rst
===================================================================
--- trunk/src/site/rst/roadmap.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/roadmap.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,10 +0,0 @@
-=======
-RoadMap
-=======
-
-+-----------------------------------------------------------------------------------------+
-| **A venir** |
-+-------------------+---------------------------------------------------------------------+
-| *Release* | Release d'une version packagée exécutable comprenant Lima et Callao |
-+-------------------+---------------------------------------------------------------------+
-
Added: trunk/src/site/rst/saisie.rst
===================================================================
--- trunk/src/site/rst/saisie.rst (rev 0)
+++ trunk/src/site/rst/saisie.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -0,0 +1,5 @@
+============
+Saisie
+============
+
+TODO
\ No newline at end of file
Property changes on: trunk/src/site/rst/saisie.rst
___________________________________________________________________
Added: svn:executable
+ *
Deleted: trunk/src/site/rst/todo.rst
===================================================================
--- trunk/src/site/rst/todo.rst 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/rst/todo.rst 2010-08-27 14:51:45 UTC (rev 3023)
@@ -1,29 +0,0 @@
-TODO
-====
-
-- probleme sur les copyright (non present dans les jaxx, en double dans certain
- fichier java
-
-- idem pour service Lima, sans doute n'en avoir qu'un
-- prefixer les DTO lima par 'Lima' et sans mettre DTO a la fin
- AccountDTO -> LimaAccount (ca evite de se perdre dans les noms de classes qui
- se nome pareil dans les differents projets :(
-- Les dto de lima, n'ont pas a etre generee (pas de plus value, car pas de
- persistance)
-- Les dta lima ne devrait etre que des interfaces de la meme facon que les
- service et etre dans le meme module que les services
-- Les methodes specifiques sur les DTO seront donc dans des Helper ou dans les
- service
-
-- Balance.Category devrait etre un helper plus general
-- les comparator devrait etre dans les dto (Comparable)
-- a quoi servent tous les enumerations ? elles sont de toute facon mal placee
-- dans les filters, il ne devrait pas y avoir de '_' dans les if. Ces filters
- ne devrait-il pas plutot etre des Criteria utilise pour des appels au Service
-- a quoi sert Item et PeriodItem (essayer de les enlever)
-
-- verifier que ApplicationConfig est utilise de facon convenable (chose bizarre
- dans la declaration de l'enum 'Option'
-
-- le jaxx est a revoir trop de composant instancier a la main au lieu d'utiliser
- le xml, pas d'utilisation de beanModel, ...
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-08-27 14:39:46 UTC (rev 3022)
+++ trunk/src/site/site_fr.xml 2010-08-27 14:51:45 UTC (rev 3023)
@@ -23,7 +23,7 @@
</menu>
<menu name="Mode d'emploi" inherit="top" >
<item name="Installer et lancer" href="install.html" />
- <item name="Création de sa comptabilité" href="assistant.html" />
+ <item name="Créer sa comptabilité" href="assistant.html" />
<item name="Saisie d'écritures" href="saisie.html" />
<item name="Rapports" href="rapports.html" />
<item name="Import / Export" href="importexport.html" />
1
0
r3022 - in trunk: lima-business/src lima-business/src/license lima-callao/src lima-callao/src/license
by echatellier@users.chorem.org Aug. 27, 2010
by echatellier@users.chorem.org Aug. 27, 2010
Aug. 27, 2010
Author: echatellier
Date: 2010-08-27 16:39:46 +0200 (Fri, 27 Aug 2010)
New Revision: 3022
Url: http://chorem.org/repositories/revision/lima/3022
Log:
Add third party file
Added:
trunk/lima-business/src/license/
trunk/lima-business/src/license/THIRD-PARTY.properties
trunk/lima-callao/src/license/
trunk/lima-callao/src/license/THIRD-PARTY.properties
Added: trunk/lima-business/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-business/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/lima-business/src/license/THIRD-PARTY.properties 2010-08-27 14:39:46 UTC (rev 3022)
@@ -0,0 +1,40 @@
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache 2
+# - Apache License Version 2.0
+# - Apache Software License - Version 2.0
+# - Apache Software License 2.0
+# - BSD License
+# - Bouncy Castle Licence
+# - Bouncy Castle License
+# - CPL
+# - Common Public License Version 1.0
+# - Eclipse Public License - Version 1.0
+# - GNU Lesser General Public License
+# - General Public License (GPL)
+# - HSQLDB License
+# - Lesser General Public License (LGPL) v 3.0
+# - MIT License
+# - Mozilla Public License
+# - Public Domain
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - dom4j
+# - http://asm.ow2.org/license.html
+# - http://www.apache.org/licenses/LICENSE-2.0.txt
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Aug 27 16:30:34 CEST 2010
+antlr--antlr--2.7.6=ANTLR 2 License
+com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
+commons-net--commons-net--2.0=Apache Software License, Version 2.0
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+javassist--javassist--3.8.0.GA=GNU Lesser General Public License
+javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
+org.codehaus.swizzle--swizzle-stream--1.0.1=Apache Software License, Version 2.0
+org.jdom--jdom--1.1=JDom license
+org.osgi--org.osgi.core--4.1.0=Apache Software License, Version 2.0
+quartz--quartz--1.5.2=Apache Software License, Version 2.0
Added: trunk/lima-callao/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-callao/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/lima-callao/src/license/THIRD-PARTY.properties 2010-08-27 14:39:46 UTC (rev 3022)
@@ -0,0 +1,19 @@
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - BSD License
+# - GNU Lesser General Public License
+# - Lesser General Public License (LGPL) v 3.0
+# - MIT License
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - dom4j
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Aug 27 16:18:28 CEST 2010
+antlr--antlr--2.7.6=ANTLR 2 License
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+javassist--javassist--3.8.0.GA=GNU Lesser General Public License
+javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
1
0
Aug. 27, 2010
Author: echatellier
Date: 2010-08-27 16:05:13 +0200 (Fri, 27 Aug 2010)
New Revision: 3021
Url: http://chorem.org/repositories/revision/lima/3021
Log:
Add third party file
Added:
trunk/lima-swing/src/license/
trunk/lima-swing/src/license/THIRD-PARTY.properties
Added: trunk/lima-swing/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-swing/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/lima-swing/src/license/THIRD-PARTY.properties 2010-08-27 14:05:13 UTC (rev 3021)
@@ -0,0 +1,48 @@
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache 2
+# - Apache License Version 2.0
+# - Apache License, Version 2.0
+# - Apache Software License - Version 2.0
+# - Apache Software License 2.0
+# - BSD
+# - Bouncy Castle Licence
+# - Bouncy Castle License
+# - CPL
+# - Common Development and Distribution License (CDDL) v1.0
+# - Common Public License Version 1.0
+# - Eclipse Public License - Version 1.0
+# - GNU Lesser General Public License
+# - General Public License (GPL)
+# - HSQLDB License
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - MIT License
+# - Mozilla Public License
+# - Public Domain
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - The OpenSymphony Software License 1.1
+# - dom4j
+# - http://asm.ow2.org/license.html
+# - http://www.apache.org/licenses/LICENSE-2.0.txt
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Aug 27 15:06:50 CEST 2010
+antlr--antlr--2.7.6=ANTLR 2 License
+com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
+commons-jxpath--commons-jxpath--1.3=Apache Software License, Version 2.0
+commons-net--commons-net--2.0=Apache Software License, Version 2.0
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+javassist--javassist--3.8.0.GA=GNU Lesser General Public License
+javax.mail--mail--1.4.1=License Agreement for JavaMail(TM) API
+javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
+opensymphony--ognl--2.6.11=OpenSymphony Software License, Version 1.1
+org.apache.commons--commons-email--1.2=Apache Software License, Version 2.0
+org.codehaus.swizzle--swizzle-stream--1.0.1=Apache Software License, Version 2.0
+org.jdom--jdom--1.1=JDom license
+org.osgi--org.osgi.core--4.1.0=Apache Software License, Version 2.0
+quartz--quartz--1.5.2=Apache Software License, Version 2.0
1
0
Author: jpepin
Date: 2010-08-26 00:04:25 +0200 (Thu, 26 Aug 2010)
New Revision: 3020
Url: http://chorem.org/repositories/revision/lima/3020
Log:
Ajout fonction de lettrage.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -513,7 +513,7 @@
nextLine[2] = entry.getDescription();
nextLine[3] = entry.getAmount().toString();
nextLine[4] = Boolean.toString(entry.getDebit());
- nextLine[5] = entry.getLettering();
+ nextLine[5] = entry.getLetter().getCode();
nextLine[6] = entry.getDetail();
nextLine[7] = entry.getVoucher();
nextLine[8] = entry.getPosition();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -41,6 +41,9 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialPeriodDAO;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.entity.LetterDAO;
+import org.chorem.lima.entity.LetterImpl;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionDAO;
@@ -86,7 +89,6 @@
public void createFinancialTransactionWithTransaction(
FinancialTransaction financialtransaction, TopiaContext topiaContext)
throws LimaException {
- log.debug(financialtransaction);
try {
//check if the financial period is blocked
accountingRules.checkFinancialPeriodBlockedWithFinancialTransaction(
@@ -149,7 +151,6 @@
String financialPeriodProperty = TopiaQuery.getProperty(FinancialTransaction.FINANCIAL_PERIOD);
String entryBookLabelProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY_BOOK);
- String accountProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY, Entry.ACCOUNT);
// filter with topia query
TopiaQuery query = transactionDAO.createQuery("T");
@@ -166,7 +167,9 @@
//load for lazy
.addLoad(financialPeriodProperty)
.addLoad(entryBookLabelProperty)
- .addFetch("T."+accountProperty);
+ .addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true)
+ .addFetch("E."+Entry.ACCOUNT)
+ .addFetch("E."+Entry.LETTER);
financialTransactions = transactionDAO.findAllByQuery(query);
}
catch (TopiaException ex) {
@@ -501,7 +504,7 @@
entryOld.setVoucher(entry.getVoucher());
entryOld.setFinancialTransaction(entry.getFinancialTransaction());
entryOld.setPosition(entry.getPosition());
- entryOld.setLettering(entry.getLettering());
+ entryOld.setLetter(entry.getLetter());
//calculate financial transaction amounts
FinancialTransaction financialTransaction =
@@ -589,9 +592,158 @@
}
+ /**
+ * Get letter from count of existing letter
+ * 1 -> A, 2 -> B, 26 -> Z, 27 -> AA, 28 -> AB, ...
+ */
+ @Override
+ public Letter getNewLetter() throws LimaException {
+ Letter letter = new LetterImpl();
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ int n = letterDAO.count()+1;
+ String res = numberToString(n, null);
+
+ //if already exist
+ while (letterDAO.findByCode(res) != null){
+ res = numberToString(n++, null);
+ }
+ letter.setCode(res);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ return letter;
+ }
+ public static String numberToString(int n, StringBuffer result){
+ if (result == null){
+ result = new StringBuffer();
+ }
+ int mod = (n-1) % 26;
+ int div = (n-1) / 26;
+ if (div > 0){
+ result.append(numberToString(div, result));
+ }
+ return (result.append((char) (mod+65))).toString();
+ }
+
+ @Override
+ public void createLetter(Letter letter) throws LimaException {
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ createLetterWithTransaction(letter, topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+ public void createLetterWithTransaction(Letter letter, TopiaContext topiaContext) throws LimaException {
+ try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letterDAO.create(letter);
+ commitTransaction(topiaContext);
+ } catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ }
- @Override
+ @Override
+ public void removeLetter(Letter letter) throws LimaException {
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letterDAO.delete(letter);
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+
+ @Override
+ public List<Letter> getAllLetters() throws LimaException {
+ List<Letter> letters = null;
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letters = letterDAO.findAll();
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ return letters;
+ }
+
+
+
+ @Override
+ public void setEntryLetter(Entry entry, Letter letter) throws LimaException {
+
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ Letter letterOld = letterDAO.findByCode(letter.getCode());
+ if (letterOld == null){
+ createLetterWithTransaction(letter, topiaContext);
+ letterOld = letter;
+ }
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ Entry entryOld = entryDAO.findByTopiaId(entry.getTopiaId());
+ entryOld.setLetter(letterOld);
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+
+
+ @Override
+ public void removeEntryLetter(Entry entry) throws LimaException {
+
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ Entry entryOld = entryDAO.findByTopiaId(entry.getTopiaId());
+ entryOld.setLetter(null);
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+ @Override
public List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException {
List<Object> result = new ArrayList<Object>();
List<FinancialTransaction> financialTransactions = null;
@@ -627,9 +779,9 @@
if (description != null){
query.addWhere("E.description", Op.LIKE, "%"+description+"%");
}
- String letter = financialTransactionSearch.getLetter();
+ Letter letter = financialTransactionSearch.getLetter();
if (letter != null){
- query.addWhere("E.lettering", Op.LIKE, "%"+letter+"%");
+ query.addEquals("E.letter", letter);
}
Account account = financialTransactionSearch.getAccount();
String accountsList = financialTransactionSearch.getAccountList();
@@ -688,7 +840,7 @@
TopiaQuery query2 = entryDAO.createQuery();
query2.addEquals(Entry.FINANCIAL_TRANSACTION, financialTransaction);
//Load for lazy
- query2.addLoad(Entry.ACCOUNT);
+ query2.addLoad(Entry.ACCOUNT, Entry.LETTER);
List<Entry> entries = entryDAO.findAllByQuery(query2);
result.addAll(entries);
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -95,6 +95,9 @@
import org.chorem.lima.entity.FiscalPeriodImpl;
import org.chorem.lima.entity.Identity;
import org.chorem.lima.entity.IdentityImpl;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.entity.LetterDAO;
+import org.chorem.lima.entity.LetterImpl;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
@@ -175,17 +178,17 @@
strat.setColumnMapping(csvReader.readNext());
// check if file have a good header
- List<String> headAccount = new ArrayList<String>();
- headAccount.add("Journal");
- headAccount.add("Compte");
- headAccount.add("DatEcr");
- headAccount.add("Piece");
- headAccount.add("Libelle");
- headAccount.add("Debit");
- headAccount.add("Credit");
- headAccount.add("Lettre");
+ List<String> headEntry = new ArrayList<String>();
+ headEntry.add("Journal");
+ headEntry.add("Compte");
+ headEntry.add("DatEcr");
+ headEntry.add("Piece");
+ headEntry.add("Libelle");
+ headEntry.add("Debit");
+ headEntry.add("Credit");
+ headEntry.add("Lettre");
if (!Arrays.asList(strat.getColumnMapping()).containsAll(
- headAccount)) {
+ headEntry)) {
throw new LimaBusinessException(
_("lima-business.import.ebpnoentry"));
}
@@ -197,6 +200,7 @@
// DAOs
AccountDAO accountDAO = LimaCallaoDAOHelper
.getAccountDAO(topiaContext);
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllUnblockedFiscalPeriods();
@@ -244,12 +248,15 @@
entry.setAmount(debit);
}
entry.setDescription(entryEBP.getLibelle());
- entry.setLettering(entryEBP.getLettre());
entry.setVoucher(entryEBP.getPiece());
+
+ Letter letter = createLetter(
+ entryEBP.getLettre(), topiaContext);
+ entry.setLetter(letter);
+
String entryBookCode = entryEBP.getJournal();
EntryBook entryBook = entryBookDAO
.findByCode(entryBookCode);
-
// if entrybook not exist create it !
if (entryBook == null) {
entryBook = new EntryBookImpl();
@@ -685,7 +692,36 @@
}
return result.toString();
}
+
+
+ /**
+ * Import and create Letter : TYPE | Code
+ */
+ public String importLetterCSV(String[] nextLine,
+ TopiaContext topiaContext) throws LimaException {
+ StringBuffer result = new StringBuffer();
+ try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+
+ Letter letter = new LetterImpl();
+ String code = nextLine[1];
+ letter.setCode(code);
+
+ // if exist, skip
+ if (letterDAO.findByCode(code) != null) {
+ result.append(_("lima-business.import.letteralreadyexist", code));
+ } else {
+ // create it
+ financialTransactionService.createLetter(letter);
+ result.append(_("lima-business.import.letteradded",code));
+ }
+ } catch (TopiaException eeeTE) {
+ doCatch(topiaContext, eeeTE, log);
+ }
+ return result.toString();
+ }
+
/**
* Import and create closedperiodicentrybook import Structure : TYPE |
* BeginDate | EndDate | Locked
@@ -927,6 +963,26 @@
return result.toString();
}
+
+ /**
+ * Dynamic letter creation used by CSV and EBP Import
+ */
+ public Letter createLetter(String letterCode, TopiaContext topiaContext) throws LimaException{
+ Letter letter = null;
+ try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letter = letterDAO.findByCode(letterCode);
+ // if letter not exist create it !
+ if (letter == null) {
+ letter = new LetterImpl();
+ letter.setCode(letterCode);
+ }
+ } catch (TopiaException eeeTE) {
+ doCatch(topiaContext, eeeTE, log);
+ }
+ return letter;
+ }
+
public String createAccounts(Map<String, AccountImport> accounts,
TopiaContext topiaContext) throws LimaException {
StringBuffer result = new StringBuffer();
@@ -1037,6 +1093,7 @@
throws LimaException {
StringBuffer result = new StringBuffer();
try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
@@ -1080,7 +1137,11 @@
entry.setDescription(entryImport.getDescription());
entry.setAmount(new BigDecimal(entryImport.getAmount()));
entry.setDebit(Boolean.parseBoolean(entryImport.getDebit()));
- entry.setLettering(entryImport.getLettering());
+
+ Letter letter = createLetter(
+ entryImport.getLettering(), topiaContext);
+ entry.setLetter(letter);
+
entry.setDetail(entryImport.getDetail());
entry.setVoucher(entryImport.getVoucher());
entry.setPosition(entryImport.getPosition());
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -198,12 +198,11 @@
TopiaQuery entriesQuery =
createEntryQuery(account, beginDate, endDate, entryDAO, queryAlias);
//IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- entriesQuery.addLoad(Entry.FINANCIAL_TRANSACTION);
- entriesQuery.addLoad(Entry.ACCOUNT);
String loadEntryBookProperty =
TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION,
FinancialTransaction.ENTRY_BOOK);
- entriesQuery.addLoad(loadEntryBookProperty);
+ entriesQuery.addLoad(Entry.ACCOUNT, Entry.FINANCIAL_TRANSACTION, Entry.LETTER)
+ .addLoad(loadEntryBookProperty);
reportsDatas.setListEntry(entryDAO.findAllByQuery(entriesQuery));
TopiaQuery amountsQuery =
@@ -348,7 +347,7 @@
TopiaQuery entriesQuery = createEntryBookReportsQuery(
entryBook, beginDate, endDate, entryDAO, "E");
//IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- entriesQuery.addLoad(Entry.ACCOUNT, Entry.FINANCIAL_TRANSACTION);
+ entriesQuery.addLoad(Entry.ACCOUNT, Entry.FINANCIAL_TRANSACTION, Entry.LETTER);
String orderDateProperty =
TopiaQuery.getProperty("E", Entry.FINANCIAL_TRANSACTION, FinancialTransaction.TRANSACTION_DATE);
String orderIdProperty =
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -28,6 +28,7 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
/**
* Transaction service.
@@ -51,6 +52,13 @@
* @return all transaction for entry book and period
* @throws LimaException
*/
+
+ void createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
List<FinancialTransaction> getAllFinancialTransactionsForFinancialPeriod(
FinancialPeriod period) throws LimaException;
@@ -60,13 +68,9 @@
List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod) throws LimaException;
+ List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
- void createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
- void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
- void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
/**
* Methodes for create, update and remove the entry
* @param entry
@@ -79,5 +83,23 @@
void removeEntry(Entry entry) throws LimaException;
- List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
+
+ /**
+ * Methodes for create, update and remove the letter
+ * @param entry
+ * @throws LimaException
+ */
+
+ Letter getNewLetter() throws LimaException;
+
+ void createLetter(Letter letter) throws LimaException;
+
+ void removeLetter(Letter letter) throws LimaException;
+
+ List<Letter> getAllLetters() throws LimaException;
+
+ void setEntryLetter(Entry entry, Letter letter) throws LimaException;
+
+ void removeEntryLetter(Entry entry) throws LimaException;
+
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -52,6 +52,8 @@
lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
+lima-business.import.letteradded=SUCCESS \: The letter %s - %s is created \! \n
+lima-business.import.letteralreadyexist=FAILED \: The letter %s already exists \!\n
lima-business.import.noaccount=ERROR \: This file contains no account
lima-business.import.nofiscalperiodopen=FAILED \: No Fiscal period open \! \n
lima-business.import.transactionadded=SUCCES \: FinancialTransaction, %s - %s, added\n
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -52,6 +52,8 @@
lima-business.import.fiscalperiodadded=Succ\u00E8s \: Exercice %s - %s ajout\u00E9e \! \n
lima-business.import.fiscalperiodalreadyexist=u00C9chec \: L'exerice %s - %s existe d\u00E9j\u00E0 \!\n
lima-business.import.identityadded=Succ\u00E8s \: Identit\u00E9 %s ajout\u00E9e \! \n
+lima-business.import.letteradded=Succ\u00E8s \: ajout\u00E9e \! \n
+lima-business.import.letteralreadyexist=u00C9chec \: La lettre %s existe d\u00E9j\u00E0 \!\n
lima-business.import.noaccount=Erreur \: Ce fichier ne contient aucun compte.
lima-business.import.nofiscalperiodopen=u00C9chec \: Aucun exercice ouvert \! \n
lima-business.import.transactionadded=Succ\u00E8s \: Transaction, %s, %s, ajout\u00E9e\n
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Added: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,60 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.enums;
+
+import static org.nuiton.i18n.I18n._;
+
+
+public enum ComboBoxLetterEnum {
+
+ ALL(_("lima.enum.comboboxletter.all")),
+ SELECT_ONE(_("lima.enum.comboboxletter.selectone"));
+
+ private final String description;
+
+ private ComboBoxLetterEnum(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public static String[] descriptions(){
+ int nbElts = ComboBoxLetterEnum.values().length;
+ String[] descriptions = new String[nbElts];
+ ComboBoxLetterEnum[] enums = ComboBoxLetterEnum.values();
+ for (int i = 0; i < nbElts; i++) {
+ descriptions[i] = enums[i].getDescription();
+ }
+ return descriptions;
+ }
+
+ public static ComboBoxLetterEnum valueOfDescription(String description){
+ ComboBoxLetterEnum value = null;
+
+ for (ComboBoxLetterEnum enums : ComboBoxLetterEnum.values()) {
+ if (description.equals(enums.description)){
+ value = enums;
+ break;
+ }
+ }
+ return value;
+ }
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -160,10 +160,8 @@
actionIcon='entries-unbalanced'/>
<JMenuItem text="lima.entries.searchtransaction" onActionPerformed='getHandler().showTransactionSearchView(this)'
actionIcon='entries-search'/>
- <!-- Menu prévu pour le lettrage automatique
<JMenuItem text="lima.entries.lettering" onActionPerformed='getHandler().showLetteringView(this)'
actionIcon='lettering'/>
- -->
</JMenu>
<JMenu text="lima.reports" mnemonic="{'R'}">
<JMenuItem text="lima.reports.accounts" onActionPerformed='getHandler().showAccountReports(this)'
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -46,6 +46,7 @@
import org.chorem.lima.ui.identity.IdentityForm;
import org.chorem.lima.ui.importexport.ImportExport;
import org.chorem.lima.ui.ledger.LedgerView;
+import org.chorem.lima.ui.lettering.LetteringView;
import org.chorem.lima.util.ErrorHelper;
/**
@@ -377,6 +378,12 @@
mainView.showTab(_("lima.entries.searchtransaction"), searchView);
}
+ public void showLetteringView(JAXXContext rootContext){
+ MainView mainView = getUI(rootContext);
+ LetteringView letteringView = new LetteringView(mainView);
+ mainView.showTab(_("lima.entries.lettering"), letteringView);
+ }
+
public void showBalanceView(JAXXContext rootContext) {
MainView mainView = getUI(rootContext);
BalanceView balanceView = new BalanceView(mainView);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -27,6 +27,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
import org.chorem.lima.ui.combobox.AccountComboBoxModel;
+import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -1,49 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.ui.accountsreports;
-
-import java.awt.Component;
-
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JLabel;
-import javax.swing.JList;
-
-import org.chorem.lima.entity.Account;
-
-public class AccountRenderer extends DefaultListCellRenderer {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
-
- JLabel label = new JLabel();
- Account account = (Account) value;
- if (account != null){
- String accountLabel = account.getLabel();
- int nbChars = 30;
- if (accountLabel.length()>nbChars){
- accountLabel = accountLabel.substring(0, nbChars)+"…";
- }
- label.setText(account.getAccountNumber() +" - " + accountLabel);
- }
- return label;
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -82,9 +82,12 @@
res = _("lima.table.description"); //Description
break;
case 5:
+ res = _("lima.table.letter"); //Letter
+ break;
+ case 6:
res = _("lima.table.debit"); //Debit
break;
- case 6:
+ case 7:
res = _("lima.table.credit"); //Credit
break;
}
@@ -122,9 +125,17 @@
result = currentRow.getDescription();
break;
case 5:
+ if (currentRow.getLetter() != null){
+ result = currentRow.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 6:
result = currentRow.getDebit() ? currentRow.getAmount() : 0;
break;
- case 6:
+ case 7:
result = currentRow.getDebit() ? 0 : currentRow.getAmount();
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -42,7 +42,7 @@
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <JTextField id='balanceFilter' toolTipText="lima.tooltip.filter" minimumSize='{balanceFilter.getPreferredSize()}'/>
<javax.swing.text.Document javaBean="balanceFilter.getDocument()"
onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -34,7 +34,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.ui.accountsreports.AccountRenderer;
+import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.ui.combobox.SubAccountComboBoxModel;
import org.chorem.lima.util.AccountToString;
import org.chorem.lima.widgets.JWideComboBox;
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,146 @@
+/*
+ * *##% Lima Main
+ * Copyright (C) 2008 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*
+ */
+
+package org.chorem.lima.ui.celleditor;
+
+import java.awt.Component;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.SwingUtilities;
+import javax.swing.table.TableCellEditor;
+import javax.swing.text.JTextComponent;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.ui.combobox.LetterComboBoxModel;
+import org.chorem.lima.ui.combobox.LetterRenderer;
+import org.chorem.lima.util.LetterToString;
+import org.chorem.lima.widgets.JWideComboBox;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class LetterTableCellEditor extends AbstractCellEditor implements TableCellEditor, KeyListener {
+
+ protected static final Log log = LogFactory.getLog(EntryBookTableCellEditor.class);
+ private final JWideComboBox comboBox;
+ private static final long serialVersionUID = 1L;
+ private static LetterTableCellEditor editor;
+ private static LetterComboBoxModel comboBoxModel;
+ private static boolean keyPressed = false;
+
+ /**
+ * constructor
+ */
+ public LetterTableCellEditor() {
+ super();
+ comboBox = new JWideComboBox();
+ comboBoxModel = new LetterComboBoxModel();
+ comboBox.setModel(comboBoxModel);
+ LetterRenderer renderer = new LetterRenderer();
+ comboBox.setRenderer(renderer);
+ AutoCompleteDecorator.decorate(comboBox, LetterToString.getInstance());
+ comboBox.getEditor().getEditorComponent().addKeyListener(this);
+ }
+
+ @Override
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
+ if (value instanceof Account){
+ comboBox.setSelectedItem((Account) value);
+ }
+ return comboBox;
+ }
+
+ @Override
+ public Object getCellEditorValue() {
+ return comboBox.getSelectedItem();
+ }
+
+ /**
+ * Vérifie si la cellule peut être éditable :
+ * seulement si il y a une frappe au clavier ou un double clic.
+ * @param evt
+ * @return
+ */
+ @Override
+ public boolean isCellEditable(EventObject evt) {
+ // Si il y a une frappe au clavier
+ if (evt instanceof KeyEvent) {
+ final KeyEvent keyEvent = (KeyEvent) evt;
+ // Empèche la touche echap
+ if ( keyEvent.getKeyChar() != KeyEvent.VK_ESCAPE){
+ // Permet de placer le focus sur l'editor de la comboBox
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ comboBox.getEditor().getEditorComponent().requestFocus();
+ JTextComponent edit = (JTextComponent) comboBox.getEditor().getEditorComponent();
+ if (!Character.isIdentifierIgnorable(keyEvent.getKeyChar()))
+ {
+ edit.setText(Character.toString(keyEvent.getKeyChar()));
+ }
+ }
+ });
+ }
+ }
+ keyPressed = false;
+ return ( !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2 );
+ }
+
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+
+ // Vérifie si c'est la première frappe au clavier
+ if ( keyPressed == false )
+ {
+ // Récupère l'editor de la comboBox
+ JTextComponent edit = (JTextComponent) comboBox.getEditor().getEditorComponent();
+ // Met en place le curseur et la selection après la première lettre
+ edit.select(1, edit.getText().length());
+ keyPressed = true;
+ }
+
+ // delegate popup list menu
+ if ( e.getKeyChar() == KeyEvent.VK_ENTER )
+ {
+ fireEditingStopped();
+ }
+ }
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+
+ }
+
+ public static LetterTableCellEditor getInstance() {
+ if (editor == null) {
+ editor = new LetterTableCellEditor();
+ }
+ return editor;
+ }
+
+}
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java (from rev 2999, trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,49 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.combobox;
+
+import java.awt.Component;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JLabel;
+import javax.swing.JList;
+
+import org.chorem.lima.entity.Account;
+
+public class AccountRenderer extends DefaultListCellRenderer {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+
+ JLabel label = new JLabel();
+ Account account = (Account) value;
+ if (account != null){
+ String accountLabel = account.getLabel();
+ int nbChars = 30;
+ if (accountLabel.length()>nbChars){
+ accountLabel = accountLabel.substring(0, nbChars)+"…";
+ }
+ label.setText(account.getAccountNumber() +" - " + accountLabel);
+ }
+ return label;
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,110 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.combobox;
+
+import java.util.List;
+import javax.swing.AbstractListModel;
+import javax.swing.ComboBoxModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.ImportServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel;
+
+/**
+ * Account combo box model.
+ */
+
+public class LetterComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(FinancialPeriodTableModel.class);
+
+ protected Object selectedAccount;
+
+ protected List<Letter> datasCache;
+
+ protected FinancialTransactionServiceMonitorable service;
+
+ public LetterComboBoxModel () {
+ service =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ service.addListener(this);
+ LimaServiceFactory.getInstance().getService(
+ ImportServiceMonitorable.class).addListener(this);
+ datasCache = getDataList();
+ }
+
+ @Override
+ public Object getSelectedItem() {
+ return selectedAccount;
+ }
+
+ @Override
+ public void setSelectedItem(Object anItem) {
+ selectedAccount = anItem;
+ fireContentsChanged(this, -1, -1);
+ }
+
+
+ @Override
+ public Object getElementAt(int index) {
+ return datasCache.get(index);
+ }
+
+ @Override
+ public int getSize() {
+ return datasCache.size();
+ }
+
+ public List<Letter> getDataList(){
+ List<Letter> result = null;
+ try {
+ result = service.getAllLetters();
+ }
+ catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't get list letters", eee);
+ }
+ }
+ return result;
+
+ }
+
+ public void refresh(){
+ datasCache = getDataList();
+ fireContentsChanged(this, 0, datasCache.size());
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if (methodeName.contains("Letter") || methodeName.contains("importAll")){
+ refresh();
+ }
+ }
+
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,42 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.combobox;
+
+import java.awt.Component;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import org.chorem.lima.entity.Letter;
+
+public class LetterRenderer extends DefaultListCellRenderer {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+
+ JLabel label = new JLabel();
+ Letter letter = (Letter) value;
+ if (letter != null){
+ label.setText(letter.getCode());
+ }
+ return label;
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -65,23 +65,26 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.table.date"); //Date
+ res = _("lima.table.date");
break;
case 1:
- res = _("lima.table.account"); //Account
+ res = _("lima.table.account");
break;
case 2:
- res = _("lima.table.voucher"); // Voucher
+ res = _("lima.table.voucher");
break;
case 3:
- res = _("lima.table.description"); //Description
+ res = _("lima.table.description");
break;
case 4:
- res = _("lima.table.debit"); //Debit
- break;
+ res = _("lima.table.letter");
+ break;
case 5:
- res = _("lima.table.credit"); //Credit
+ res = _("lima.table.debit");
break;
+ case 6:
+ res = _("lima.table.credit");
+ break;
}
return res;
}
@@ -114,9 +117,17 @@
result = currentRow.getDescription();
break;
case 4:
+ if (currentRow.getLetter() != null){
+ result = currentRow.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 5:
result = currentRow.getDebit() ? currentRow.getAmount() : 0;
break;
- case 5:
+ case 6:
result = currentRow.getDebit() ? 0 : currentRow.getAmount();
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -20,22 +20,14 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import javax.swing.JComboBox;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.ui.combobox.EntryBookComboBoxModel;
-import org.chorem.lima.ui.combobox.EntryBookRenderer;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.util.EntryBookToString;
-import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
public class FinancialPeriodComboBox extends JComboBox implements ActionListener {
private static final long serialVersionUID = 1L;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -43,6 +43,7 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -159,7 +160,7 @@
result = String.class;
break;
case 5:
- result = String.class;
+ result = Letter.class;
break;
case 6:
result = BigDecimal.class;
@@ -297,8 +298,13 @@
result = currentEntry.getDescription();
break;
case 5 :
- result = currentEntry.getLettering();
- break;
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
case 6:
result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
@@ -495,7 +501,7 @@
currentEntry.setDescription((String)value);
break;
case 5 :
- currentEntry.setLettering((String)value);
+ currentEntry.setLetter((Letter)value);
break;
case 6:
currentEntry.setAmount((BigDecimal)value);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -26,8 +26,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.ui.accountsreports.AccountRenderer;
import org.chorem.lima.ui.combobox.AccountComboBoxModel;
+import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -18,6 +18,7 @@
package org.chorem.lima.ui.financialtransactionsearch;
+import static org.nuiton.i18n.I18n._;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JPanel;
@@ -55,6 +56,7 @@
case ACCOUNT_LIST:
final JTextField accountsList = new JTextField(16);
accountsList.setMinimumSize(accountsList.getPreferredSize());
+ accountsList.setToolTipText(_("lima.tooltip.filter"));
KeyListener accountsListKeyListener = new KeyListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -35,6 +35,7 @@
import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -158,7 +159,7 @@
result = BigDecimal.class;
break;
case 8:
- result = String.class;
+ result = Letter.class;
break;
}
@@ -295,8 +296,13 @@
result = null;
break;
case 8:
- result = currentEntry.getLettering();
- break;
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
}
}
@@ -409,7 +415,7 @@
currentEntry.setDebit(false);
break;
case 8:
- currentEntry.setLettering((String)value);
+ currentEntry.setLetter((Letter)value);
break;
}
try {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -24,12 +24,14 @@
import org.chorem.lima.enums.ComboBoxPeriodEnum;
import org.chorem.lima.enums.ComboBoxAccountsEnum;
import org.chorem.lima.enums.ComboBoxEntryBooksEnum;
+ import org.chorem.lima.enums.ComboBoxLetterEnum;
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.enums.ComboBoxOperatorsEnum;
AccountSearchPanel accountSearchPanel = new AccountSearchPanel(handler);
AmountSearchPanel amountSearchPanel = new AmountSearchPanel(handler);
EntryBookSearchPanel entryBookSearchPanel = new EntryBookSearchPanel(handler);
+ LetterSearchPanel letterSearchPanel = new LetterSearchPanel(handler);
FinancialTransactionPeriodSearchPanel periodSearchPanel = new FinancialTransactionPeriodSearchPanel(handler);
void $afterCompleteSetup() {
@@ -64,12 +66,10 @@
onInsertUpdate='handler.setDescription(description.getText())'
onRemoveUpdate='handler.setDescription(description.getText())' />
</cell>
- <cell><JLabel text="lima.table.letter"/></cell>
- <cell><JTextField id='letter' minimumSize='{letter.getPreferredSize()}'/>
- <javax.swing.text.Document javaBean="letter.getDocument()"
- onInsertUpdate='handler.setLetter(letter.getText())'
- onRemoveUpdate='handler.setLetter(letter.getText())' />
- </cell>
+ <cell><JComboBox id="letterComboBox" javaBean="new JComboBox(ComboBoxLetterEnum.descriptions())"
+ onActionPerformed="letterSearchPanel.refresh(ComboBoxLetterEnum.valueOfDescription((String) letterComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><LetterSearchPanel javaBean="letterSearchPanel"/></cell>
</row></Table></cell>
</row>
<row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -28,6 +28,7 @@
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
@@ -97,12 +98,8 @@
financialTransactionSearch.setDescription(result);
}
- public void setLetter(String letter){
- String result = null;
- if (!letter.equals("")){
- result = letter;
- }
- financialTransactionSearch.setLetter(result);
+ public void setLetter(Letter letter){
+ financialTransactionSearch.setLetter(letter);
}
public String getAccountsList(){
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,87 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.ui.combobox.LetterComboBoxModel;
+import org.chorem.lima.ui.combobox.LetterRenderer;
+import org.chorem.lima.util.LetterToString;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class LetterSearchComboBox extends JComboBox implements KeyListener, ActionListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(LetterSearchComboBox.class);
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public LetterSearchComboBox(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+ LetterComboBoxModel letterComboBoxModel = new LetterComboBoxModel();
+ LetterRenderer letterRenderer = new LetterRenderer();
+ setModel(letterComboBoxModel);
+ setRenderer(letterRenderer);
+ setEditable(true);
+ AutoCompleteDecorator.decorate(this, LetterToString.getInstance());
+ this.getEditor().getEditorComponent().addKeyListener(this);
+ this.addActionListener(this);
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof Letter){
+ handler.setLetter((Letter) this.getSelectedItem());
+ }
+ }
+
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof Letter){
+ handler.setLetter((Letter) this.getSelectedItem());
+ }
+ // delegate popup list menu
+ if ( e.getKeyChar() == KeyEvent.VK_ENTER )
+ {
+ firePopupMenuCanceled();
+ }
+ }
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,53 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import javax.swing.JPanel;
+import org.chorem.lima.enums.ComboBoxLetterEnum;
+
+public class LetterSearchPanel extends JPanel {
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public LetterSearchPanel(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxLetterEnum comboBoxEnum){
+
+ switch (comboBoxEnum) {
+ case ALL:
+ handler.setLetter(null);
+ handler.refresh();
+ this.removeAll();
+ break;
+
+ case SELECT_ONE:
+ LetterSearchComboBox comboBox = new LetterSearchComboBox(handler);
+ this.removeAll();
+ this.add(comboBox);
+ break;
+
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -37,6 +37,7 @@
import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -160,7 +161,7 @@
result = BigDecimal.class;
break;
case 8:
- result = String.class;
+ result = Letter.class;
break;
}
@@ -297,8 +298,13 @@
result = null;
break;
case 8:
- result = currentEntry.getLettering();
- break;
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
}
}
@@ -411,7 +417,7 @@
currentEntry.setDebit(false);
break;
case 8:
- currentEntry.setLettering((String)value);
+ currentEntry.setLetter((Letter)value);
break;
}
try {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -41,7 +41,7 @@
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <JTextField id='balanceFilter' toolTipText="lima.tooltip.filter" minimumSize='{balanceFilter.getPreferredSize()}'/>
<javax.swing.text.Document javaBean="balanceFilter.getDocument()"
onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,57 @@
+<!-- ##% Lima Swing
+ Copyright (C) 2008 - 2010 CodeLutin
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ##% -->
+
+<JDialog modal="true">
+ <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/>
+ <Boolean id="validOk" javaBean='true'/>
+
+ <script>
+ <![CDATA[
+
+ getRootPane().setDefaultButton(ok);
+ protected void performCancel() {
+ setValidOk(false);
+ dispose();
+ }
+ ]]>
+ </script>
+
+ <Table>
+ <row fill="horizontal">
+ <cell>
+ <JRadioButton id="newLetter" text='lima.entries.lettering.radiobutton.new' value='{true}' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+ <cell><JTextField editable="false" visible="{newLetter.isSelected()}" id='newLetterTextField' /></cell>
+ </row>
+ <row>
+ <cell>
+ <JRadioButton id="listLetter" text='lima.entries.lettering.radiobutton.list' value='{false}' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+ <cell><JComboBox id='LetterListComboBox' visible="{listLetter.isSelected()}" javaBean="new LetterComboBox()"/></cell>
+ </row>
+ <row>
+ <cell fill="none">
+ <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/>
+ </cell>
+ <cell fill="none">
+ <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/>
+ </cell>
+ </row>
+ </Table>
+</JDialog>
\ No newline at end of file
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,47 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.ui.combobox.LetterComboBoxModel;
+import org.chorem.lima.ui.combobox.LetterRenderer;
+import org.chorem.lima.util.LetterToString;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class LetterComboBox extends JComboBox {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(LetterComboBox.class);
+
+
+ public LetterComboBox() {
+
+ LetterComboBoxModel letterComboBoxModel = new LetterComboBoxModel();
+ LetterRenderer letterRenderer = new LetterRenderer();
+ setModel(letterComboBoxModel);
+ setRenderer(letterRenderer);
+ setEditable(true);
+ AutoCompleteDecorator.decorate(this, LetterToString.getInstance());
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,82 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+
+
+public class LetteringFinancialPeriodComboBox extends JComboBox implements ActionListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(LetteringFinancialPeriodComboBox.class);
+
+ protected LetteringViewHandler handler;
+
+ public LetteringFinancialPeriodComboBox(LetteringViewHandler handler) {
+ this.handler = handler;
+
+ FinancialPeriodComboBoxModel comboBoxModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer comboBoxRenderer = new FinancialPeriodComboBoxRenderer();
+
+ setModel(comboBoxModel);
+ setRenderer(comboBoxRenderer);
+ addActionListener(this);
+
+ }
+
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.setSelectedItem(this.getItemAt(row-1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.setSelectedItem(this.getItemAt(row+1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof FinancialPeriod){
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,174 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import static org.nuiton.i18n.I18n._;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
+import org.chorem.lima.ui.celleditor.DateTableCellEditor;
+import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
+import org.chorem.lima.ui.celleditor.LetterTableCellEditor;
+import org.jdesktop.swingx.JXTable;
+import org.jdesktop.swingx.decorator.ColorHighlighter;
+import org.jdesktop.swingx.decorator.ComponentAdapter;
+import org.jdesktop.swingx.decorator.HighlightPredicate;
+import org.jdesktop.swingx.decorator.Highlighter;
+
+
+/**
+ * Table des transaction qui ajoute des comportement (keys).
+ *
+ * @author jpepin
+ */
+public class LetteringTable extends JXTable implements KeyListener {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3133690382049594727L;
+
+ /** log. */
+ private static final Log log = LogFactory
+ .getLog(LetteringTable.class);
+
+ protected LetteringViewHandler handler;
+
+ private Highlighter colorTransaction;
+
+ private ColorHighlighter colorBalance;
+
+ public LetteringTable(LetteringViewHandler handler) {
+
+ this.handler = handler;
+
+ addKeyListener(this);
+
+ //Get new date editor
+ setDefaultEditor(Date.class, new DateTableCellEditor());
+ //Get new entry book editor
+ setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor());
+ //Get new account editor
+ setDefaultEditor(Account.class, new AccountTableCellEditor());
+ //Get new letter editor
+ setDefaultEditor(Letter.class, new LetterTableCellEditor());
+
+ //highlight financial financial transactions
+ addColorTransaction();
+ // highlight unbalanced financial transactions
+ addColorNonBalancedTransaction();
+
+
+ }
+
+ /**
+ * Cette méthode permet de colorer toutes les transactions dans le tableau
+ * afin de bien distinguer les transactions et entrées comptables.
+ * On récupère la première cellule, on vérifie que c'est une date
+ */
+ protected void addColorTransaction() {
+ if (colorTransaction != null) {
+ removeHighlighter(colorTransaction);
+ }
+ HighlightPredicate predicate = new HighlightPredicate() {
+ @Override
+ public boolean isHighlighted(Component renderer,
+ ComponentAdapter adapter) {
+ return adapter.getValueAt(adapter.row, 0) instanceof Date;
+ }
+ };
+ colorTransaction =
+ new ColorHighlighter(predicate, new Color(222,222,222), null);
+ addHighlighter(colorTransaction);
+ }
+
+
+
+ /**
+ * Permet de surligner une transaction dans le tableau lorsque
+ * cette dernière n'est pas équilibrée.
+ * On récupère la dernière cellule de la ligne
+ * et on vérifie si la valeur est différente de 0
+ */
+ protected void addColorNonBalancedTransaction() {
+ if (colorBalance != null) {
+ removeHighlighter(colorBalance);
+ }
+ HighlightPredicate predicate = new HighlightPredicate() {
+ @Override
+ public boolean isHighlighted(Component renderer,
+ ComponentAdapter adapter) {
+ boolean isHighlighted = false;
+ Object value = adapter.getValueAt(adapter.row, 8);
+ if (value instanceof BigDecimal) {
+ BigDecimal currentBalance = (BigDecimal) value;
+ if (currentBalance.doubleValue() != 0) {
+ isHighlighted = true;
+ }
+ }
+ return isHighlighted;
+ }
+ };
+ colorTransaction =
+ new ColorHighlighter(predicate, new Color(255, 198, 209), null);
+ addHighlighter(colorTransaction);
+ }
+
+ /**
+ * for each action combination key are think
+ * for extend keyboard and laptop keyboard
+ */
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+
+ // add letter with the key combination : ctrl + L
+ if (e.getKeyCode() == KeyEvent.VK_L
+ && e.getModifiers() == KeyEvent.CTRL_MASK) {
+ handler.addLetter();
+ }
+
+ }
+
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+
+ }
+
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+
+ }
+
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,415 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import static org.nuiton.i18n.I18n._;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import javax.swing.table.AbstractTableModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.ImportServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.business.utils.EntryComparator;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.Entry;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.util.DialogHelper;
+import org.chorem.lima.util.ErrorHelper;
+
+
+/**
+ * Basic transaction table model.
+ *
+ * Le modele est filtré sur {@link #selectedEntryBook} et
+ * {@link #selectedFinancialPeriod} (montée en charge !).
+ *
+ * @author ore
+ * @author chatellier
+ * @version $Revision: 2897 $
+ *
+ * Last update : $Date: 2010-05-14 13:22:26 +0200 (ven. 14 mai 2010) $
+ * By : $Author: jpepin $
+ */
+public class LetteringTableModel extends AbstractTableModel implements ServiceListener{
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 1L;
+
+ /** log. */
+ private static final Log log = LogFactory
+ .getLog(LetteringTableModel.class);
+
+ /** Transaction service. */
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
+
+ /** selected financial period */
+ protected FinancialPeriod selectedFinancialPeriod;
+
+ /** data cache */
+ protected List<Object> cacheDataList;
+
+ /** collection
+
+
+ /**
+ * Model constructor.
+ *
+ * Just init service proxies.
+ */
+ public LetteringTableModel() {
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
+ LimaServiceFactory.getInstance().getService(
+ ImportServiceMonitorable.class).addListener(this);
+ }
+
+ /**
+ * Le model est une combinaison de Transaction/Entries.
+ *
+ *
+ * @return
+ */
+ protected List<Object> getDataList() {
+ List<Object> results = new ArrayList<Object>();
+ if (selectedFinancialPeriod != null){
+ try {
+ List<FinancialTransaction> financialtransactions =
+ financialTransactionService.getAllFinancialTransactionsForFinancialPeriod(
+ selectedFinancialPeriod);
+ for (FinancialTransaction financialtransaction : financialtransactions) {
+ results.add(financialtransaction);
+ List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
+ Collections.sort(entries, new EntryComparator());
+ results.addAll(entries);
+ }
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't update model", eee);
+ }
+ ErrorHelper.showErrorDialog("Can't get transaction list", eee);
+ }
+ }
+ return results;
+ }
+
+ public void setLetter(int row, Letter letter){
+ try {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof Entry){
+ Entry entry = (Entry) currentRow;
+ financialTransactionService.setEntryLetter(entry, letter);
+ }
+ } catch (LimaException eee) {
+ log.error("Can't set letter", eee);
+ }
+ }
+
+ public void removeLetter(int row){
+ try {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof Entry){
+ Entry entry = (Entry) currentRow;
+ financialTransactionService.removeEntryLetter(entry);
+ }
+ } catch (LimaException eee) {
+ log.error("Can't remove letter", eee);
+ }
+ }
+
+ public void refresh(){
+ cacheDataList = getDataList();
+ fireTableDataChanged();
+ }
+
+ @Override
+ public int getColumnCount() {
+ return 9;
+ }
+
+ @Override
+ public Class<?> getColumnClass(int column) {
+
+ Class<?> result = null;
+
+ switch (column) {
+ case 0:
+ result = Date.class;
+ break;
+ case 1:
+ result = EntryBook.class;
+ break;
+ case 2:
+ result = String.class;
+ break;
+ case 3:
+ result = Account.class;
+ break;
+ case 4:
+ result = String.class;
+ break;
+ case 5:
+ result = Letter.class;
+ break;
+ case 6:
+ result = BigDecimal.class;
+ break;
+ case 7:
+ result = BigDecimal.class;
+ break;
+ case 8:
+ result = BigDecimal.class;
+ break;
+ }
+
+ return result;
+ }
+
+
+
+ @Override
+ public String getColumnName(int column) {
+ String result = "n/a";
+
+ switch (column) {
+ case 0:
+ result = _("lima.table.date");
+ break;
+ case 1:
+ result = _("lima.table.entrybook");
+ break;
+ case 2:
+ result = _("lima.table.voucher");
+ break;
+ case 3:
+ result = _("lima.table.account");
+ break;
+ case 4:
+ result = _("lima.table.description");
+ break;
+ case 5:
+ result = _("lima.table.letter");
+ break;
+ case 6:
+ result = _("lima.table.debit");
+ break;
+ case 7:
+ result = _("lima.table.credit");
+ break;
+ case 8:
+ result = _("lima.table.balance");
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public int getRowCount() {
+ int result = 0;
+
+ if (cacheDataList != null) {
+ result = cacheDataList.size();
+ }
+
+ return result;
+ }
+
+ @Override
+ public Object getValueAt(int row, int column) {
+ Object result = null;
+
+ // just prevent too much result
+ if (cacheDataList != null) {
+ result = cacheDataList.get(row);
+
+ if (result instanceof FinancialTransaction) {
+ FinancialTransaction currentRow = (FinancialTransaction)result;
+ BigDecimal amountDebit = currentRow.getAmountDebit();
+ BigDecimal amountCredit = currentRow.getAmountCredit();
+
+ switch (column) {
+ case 0:
+ result = currentRow.getTransactionDate();
+ break;
+ case 1:
+ if (currentRow.getEntryBook() != null){
+ result = currentRow.getEntryBook().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 2:
+ result = null; //voucher
+ break;
+ case 3:
+ result = null; // account
+ break;
+ case 4:
+ result = null; // description
+ break;
+ case 5 :
+ result = null; // letter
+ break;
+ case 6:
+ result = amountDebit;
+ break;
+ case 7:
+ result = amountCredit;
+ break;
+ case 8:
+ result = amountDebit.subtract(amountCredit);
+ break;
+ }
+ }
+ else if (result instanceof Entry) {
+ Entry currentEntry = (Entry)result;
+ switch (column) {
+ case 0:
+ result = null; // date
+ break;
+ case 1 : // entry book
+ result = null;
+ break;
+ case 2:
+ result = currentEntry.getVoucher();
+ break;
+ case 3: // account
+ if (currentEntry.getAccount() != null){
+ result = currentEntry.getAccount().getAccountNumber();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 4:
+ result = currentEntry.getDescription();
+ break;
+ case 5 :
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 6:
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
+ break;
+ case 7:
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
+ break;
+ case 8:
+ result = null;
+ break;
+ }
+
+ }
+ }
+ return result;
+ }
+
+
+ public void setFinancialPeriod(FinancialPeriod financialPeriod){
+ selectedFinancialPeriod = financialPeriod;
+ refresh();
+ }
+
+ /**
+ * To set cells editable or not
+ * different condition for entry or financial transaction
+ */
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex) {
+ boolean editableCell=false;
+ Object currentRow = cacheDataList.get(rowIndex);
+ // cells editable for the entry row, all cells exclude the date
+ if ((currentRow instanceof Entry) && ((columnIndex==5))) {
+ editableCell=true;
+ }
+ return editableCell; }
+
+
+
+ public Object getElementAt(int row){
+ Object result = null;
+ if (cacheDataList != null){
+ result = cacheDataList.get(row);
+ }
+ return result;
+ }
+
+
+ /**
+ * to modifiy letter entry
+ */
+ @Override
+ public void setValueAt(Object value, int row, int column) {
+ int financialTransactionRow = 0;
+ if (cacheDataList != null) {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ switch (column) {
+ case 5 :
+ currentEntry.setLetter((Letter)value);
+ break;
+ }
+ try {
+ financialTransactionService.updateEntry(currentEntry);
+
+ } catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.error("Can't update entry", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ //update the financial transaction in entire
+ financialTransactionRow =
+ getDataList().indexOf(((Entry) currentRow).
+ getFinancialTransaction());
+ }
+ //on recharge la liste
+ cacheDataList = getDataList();
+ fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);
+ }
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if (serviceName.contains("FinancialTransaction") || methodeName.contains("importEntries") || methodeName.contains("importAll")){
+ refresh();
+ }
+ }
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,90 @@
+<!-- ##% Lima Swing
+ Copyright (C) 2008 - 2010 CodeLutin
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ##% -->
+
+<Table>
+ <LetteringViewHandler id="handler" javaBean="new LetteringViewHandler(this)" />
+ <Boolean id="selectedRow" javaBean="false" />
+ <org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel id="modelFinancialPeriod"/>
+ <org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel id="modelFiscalPeriod"/>
+ <script>
+ <![CDATA[
+ import org.chorem.lima.entity.FiscalPeriod;
+ import org.chorem.lima.entity.FinancialPeriod;
+ import org.chorem.lima.ui.lettering.LetteringFinancialPeriodComboBox;
+
+ LetteringFinancialPeriodComboBox financialPeriodComboBox = new LetteringFinancialPeriodComboBox(handler);
+
+
+ void $afterCompleteSetup() {
+ getHandler().refresh();
+ }
+
+ ]]>
+ </script>
+
+ <row weightx="1" weighty="0" anchor="center">
+ <cell anchor="east">
+ <JLabel id="fiscalPeriodLabel" text="lima.charts.fiscalyear"/>
+ </cell>
+ <cell anchor="west">
+ <JComboBox id="fiscalPeriodComboBox"
+ model="{getModelFiscalPeriod()}"
+ renderer="{new org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer()}"
+ onActionPerformed="getModelFinancialPeriod().setFiscalPeriod( (FiscalPeriod) fiscalPeriodComboBox.getSelectedItem());
+ getHandler().refresh()"
+ editable="false"/>
+ </cell>
+ <cell anchor="east">
+ <JLabel id="financialPeriodLabel" text="lima.common.period"
+ />
+ </cell>
+ <cell anchor="west">
+ <JComboBox javaBean="financialPeriodComboBox"/>
+ </cell>
+ <cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="financialPeriodComboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="financialPeriodComboBox.next()"/>
+ </cell>
+ <cell>
+ <JButton text="lima.entries.lettering.add"
+ onActionPerformed="handler.addLetter()" toolTipText="lima.tooltip.lettering" enabled="{isSelectedRow()}"/>
+ </cell>
+ <cell>
+ <JButton text="lima.entries.lettering.remove"
+ onActionPerformed="handler.removeLetter()" enabled="{isSelectedRow()}"/>
+ </cell>
+
+ </row>
+ <row>
+ <cell fill="both" weightx="1" weighty="1" rows="3" columns="11">
+ <JScrollPane>
+ <org.chorem.lima.ui.lettering.LetteringTableModel
+ id="tableModel"/>
+ <org.chorem.lima.ui.lettering.LetteringTable
+ id="table" sortable="false" rowHeight="22"
+ constructorParams="getHandler()" model="{getTableModel()}"
+ selectionMode="{ListSelectionModel.MULTIPLE_INTERVAL_SELECTION }" />
+ <javax.swing.ListSelectionModel javaBean="getTable().getSelectionModel()"
+ onValueChanged="setSelectedRow(table.getSelectedRow() != -1)"/>
+ </JScrollPane>
+ </cell>
+ </row>
+</Table>
\ No newline at end of file
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,138 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.util.DialogHelper;
+
+
+/**
+ * Handler associated with financial transaction view.
+ *
+ * @author chatellier
+ * @version $Revision: 3015 $
+ *
+ * Last update : $Date: 2010-08-23 18:38:53 +0200 (lun., 23 août 2010) $
+ * By : $Author: jpepin $
+ */
+public class LetteringViewHandler {
+
+ /** log. */
+ private static final Log log =
+ LogFactory.getLog(LetteringViewHandler.class);
+
+ protected LetteringView view;
+
+ protected LetteringTable table;
+
+ protected LetteringTableModel tableModel;
+
+ protected FiscalPeriodComboBoxModel fiscalPeriodComboBoxModel;
+
+ protected FinancialPeriodComboBoxModel financialPeriodComboBoxModel;
+
+ /** Transaction service. */
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
+
+ protected Object clipBoard;
+
+ protected LetteringViewHandler(LetteringView view) {
+ this.view = view;
+
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ }
+
+
+
+ public void addLetter(){
+ Letter letter = null;
+ Boolean valid = true;
+
+ table = view.getTable();
+ tableModel = view.getTableModel();
+
+ AddLetterForm addLetterForm = new AddLetterForm();
+ JTextField newLetterTextField = addLetterForm.getNewLetterTextField();
+
+ try {
+ letter = financialTransactionService.getNewLetter();
+ newLetterTextField.setText(letter.getCode());
+ } catch (LimaException eee) {
+ log.error("Can't get new letter", eee);
+ }
+
+ addLetterForm.setLocationRelativeTo(view);
+ addLetterForm.setVisible(true);
+
+ //false = cancel Action
+ if (addLetterForm.validOk){
+ Object object = addLetterForm.getRadioButtons().getSelectedValue();
+ if (!(Boolean) object){
+ JComboBox comboBox = addLetterForm.getLetterListComboBox();
+ Object selectedObject = comboBox.getSelectedItem();
+ if (selectedObject instanceof Letter){
+ letter = (Letter) selectedObject;
+ }
+ else {
+ DialogHelper.showMessageDialog(_("lima.entries.lettering.noletterselected"));
+ valid = false;
+ }
+ }
+ if (valid){
+ //addLetters
+ int[] rows = table.getSelectedRows();
+ for (int i : rows) {
+ tableModel.setLetter(i, letter);
+ }
+ tableModel.refresh();
+ }
+ }
+ }
+
+ public void removeLetter(){
+
+ table = view.getTable();
+ tableModel = view.getTableModel();
+
+ //removeLetters
+ int[] rows = table.getSelectedRows();
+ for (int i : rows) {
+ tableModel.removeLetter(i);
+ }
+ tableModel.refresh();
+ }
+
+ public void refresh(){
+ tableModel = view.getTableModel();
+ tableModel.refresh();
+ }
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -18,7 +18,6 @@
* ##%*/
import static org.nuiton.i18n.I18n._;
-
import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -1,3 +1,21 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
package org.chorem.lima.util;
import org.chorem.lima.entity.Account;
Added: trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,47 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.util;
+
+import org.chorem.lima.entity.Letter;
+import org.jdesktop.swingx.autocomplete.ObjectToStringConverter;
+
+public class LetterToString extends ObjectToStringConverter {
+
+ private static LetterToString converter;
+
+ @Override
+ public String getPreferredStringForItem(Object item) {
+ String result = null;
+ if (item != null){
+ if (item instanceof Letter){
+ Letter letter = (Letter) item;
+ result = letter.getCode();
+ }
+ }
+ return result;
+ }
+
+ public static LetterToString getInstance() {
+ if (converter == null) {
+ converter = new LetterToString();
+ }
+ return converter;
+ }
+
+}
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -80,14 +80,25 @@
lima.entries=Entries
lima.entries.addEntry=Add entry
lima.entries.addTransaction=Add transaction
+lima.entries.lettering=Lettering
+lima.entries.lettering.add=Add letter
+lima.entries.lettering.noletterselected=Error \: No selected letter
+lima.entries.lettering.radiobutton.list=Existing letters
+lima.entries.lettering.radiobutton.new=New letter
+lima.entries.lettering.remove=Remove letter
lima.entries.searchtransaction=Search transaction
lima.entries.searchunbalancedtransaction=Incorrect transactions
lima.entries.writetransaction=Write entries
lima.enum.comboboxaccount.account=Account
lima.enum.comboboxaccount.accountlist=Account list
lima.enum.comboboxaccount.allaccount=All accounts
+lima.enum.comboboxamount.both=Both
+lima.enum.comboboxamount.credit=Credit
+lima.enum.comboboxamount.debit=Debit
lima.enum.comboboxentrybook.all=All entrybooks
lima.enum.comboboxentrybook.select_one=EntryBook
+lima.enum.comboboxletter.all=All letters
+lima.enum.comboboxletter.selectone=Letter
lima.enum.comboboxoperator.equal=Equal
lima.enum.comboboxoperator.inferior=Inferior
lima.enum.comboboxoperator.inferiororequal=Inferior or equal
@@ -220,4 +231,6 @@
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=About Lima...
lima.title.about.description=Open sources accounting software
+lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html>
+lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html>
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -80,6 +80,12 @@
lima.entries=Traitement
lima.entries.addEntry=Ajouter entr\u00E9e
lima.entries.addTransaction=Ajouter transaction
+lima.entries.lettering=Lettrage
+lima.entries.lettering.add=Ajouter une lettre
+lima.entries.lettering.noletterselected=Erreur \: Aucune lettre s\u00E9lectionn\u00E9e.
+lima.entries.lettering.radiobutton.list=Lettres existantes
+lima.entries.lettering.radiobutton.new=Nouvelle lettre
+lima.entries.lettering.remove=Supprimer une lettre
lima.entries.searchtransaction=Rechercher des \u00E9critures
lima.entries.searchunbalancedtransaction=Entr\u00E9es incorrect
lima.entries.writetransaction=Saisir des \u00E9critures
@@ -91,6 +97,8 @@
lima.enum.comboboxamount.debit=D\u00E9bit
lima.enum.comboboxentrybook.all=Tous les journaux
lima.enum.comboboxentrybook.select_one=Journal
+lima.enum.comboboxletter.all=Toutes les lettres
+lima.enum.comboboxletter.selectone=Lettre
lima.enum.comboboxoperator.equal=\u00C9gal
lima.enum.comboboxoperator.inferior=Inf\u00E9rieur
lima.enum.comboboxoperator.inferiororequal=Inf\u00E9rieur ou \u00E9gal
@@ -223,4 +231,6 @@
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=\u00C0 propos de Lima...
lima.title.about.description=Logiciel de comptabilit\u00E9 Libre
+lima.tooltip.filter=<html>Expression r\u00E9guli\u00E8re \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
+lima.tooltip.lettering=<html>Pour ajouter une lettre \u00E0 plusieurs \u00E9critures <br/>S\u00E9lectionner plusieurs lignes avec la combinaison ctrl + click</html>
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
1
0
Author: jpepin
Date: 2010-08-24 18:54:17 +0200 (Tue, 24 Aug 2010)
New Revision: 3019
Url: http://chorem.org/repositories/revision/lima/3019
Log:
Ajout bouton next back pour rapports journaux, comptes, et la saisie d'?\195?\169criture.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
trunk/src/site/resources/screens/
trunk/src/site/resources/screens/lima_charts_accounts.png
trunk/src/site/resources/screens/lima_charts_entrybooks.png
trunk/src/site/resources/screens/lima_charts_financialperiod.png
trunk/src/site/resources/screens/lima_charts_financialstatement.png
trunk/src/site/resources/screens/lima_charts_fiscalperiod.png
trunk/src/site/resources/screens/lima_entries.png
trunk/src/site/resources/screens/lima_financialstatement.png
trunk/src/site/resources/screens/lima_home.png
trunk/src/site/resources/screens/lima_reports_accounts.png
trunk/src/site/resources/screens/lima_reports_balance.png
trunk/src/site/resources/screens/lima_reports_entrybooks.png
trunk/src/site/resources/screens/lima_reports_financialstatement.png
trunk/src/site/resources/screens/lima_reports_ledger.png
trunk/src/site/resources/screens/lima_searchtransaction.png
trunk/src/site/resources/screens/lima_webreports.png
Removed:
trunk/src/site/rst/screenshots.rst
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
trunk/src/site/rst/features.rst
trunk/src/site/rst/index.rst
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -912,7 +912,11 @@
t.addCell(new Phrase(dateFormat.format(
entry.getFinancialTransaction().getTransactionDate()),
normalFont));
- t.addCell(new Phrase(entry.getAccount().getAccountNumber(), normalFont));
+ String account = "";
+ if (entry.getAccount() != null){
+ account = entry.getAccount().getAccountNumber();
+ }
+ t.addCell(new Phrase(account, normalFont));
t.addCell(new Phrase(entry.getVoucher(), normalFont));
t.addCell(new Phrase(entry.getDescription(), normalFont));
t.addCell(new Phrase(String.valueOf(
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -48,6 +48,7 @@
import org.chorem.lima.business.ejbinterface.HttpServerServiceLocal;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.FormatsEnum;
+import org.hibernate.exception.GenericJDBCException;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
@@ -113,6 +114,7 @@
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ try {
//get all params
String imageParam = req.getParameter("img");
String model = req.getParameter("model");
@@ -251,6 +253,9 @@
resp.getWriter().write(pageContent.toString());
}
+ }catch (GenericJDBCException eee) {
+ log.error("Can't read db", eee);
+ }
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -51,7 +51,25 @@
this.addActionListener(this);
}
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.getEditor().setItem(this.getItemAt(row-1));
+ handler.setAccount((Account) this.getSelectedItem());
+ }
+ }
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.getEditor().setItem(this.getItemAt(row+1));
+ handler.setAccount((Account) this.getSelectedItem());
+ }
+ }
@Override
public void actionPerformed(ActionEvent e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -23,7 +23,9 @@
<![CDATA[
import org.chorem.lima.enums.ComboBoxDatesEnum;
+ import org.chorem.lima.ui.accountsreports.AccountComboBox;
AccountsReportsPeriodSearchPanel periodSearchPanel = new AccountsReportsPeriodSearchPanel(handler);
+ AccountComboBox comboBox = new AccountComboBox(handler);
void $afterCompleteSetup() {
}
@@ -41,8 +43,16 @@
<JLabel id="accountSelectorLabel" text="lima.common.account"/>
</cell>
<cell anchor="west">
- <JComboBox javaBean='new org.chorem.lima.ui.accountsreports.AccountComboBox(getHandler())' />
+ <JComboBox javaBean='comboBox' />
</cell>
+ <cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="comboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="comboBox.next()"/>
+ </cell>
</row>
<row>
<cell fill="both" weightx="1" weighty="1" columns="6">
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -162,21 +162,23 @@
public void createDocument() {
- FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="
- +selectedEnum.getExtension()+"&model="
- + DocumentsEnum.BALANCE.getFileName();
- Desktop.getDesktop().browse(new URI(url));
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null & selectedEndDate != null){
+ FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
+ String address = LimaConfig.getInstance().getHostAdress();
+
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)+"&format="
+ +selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.BALANCE.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -52,7 +52,25 @@
this.addActionListener(this);
}
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.getEditor().setItem(this.getItemAt(row-1));
+ handler.setEntryBook((EntryBook) this.getSelectedItem());
+ }
+ }
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.getEditor().setItem(this.getItemAt(row+1));
+ handler.setEntryBook((EntryBook) this.getSelectedItem());
+ }
+ }
@Override
public void actionPerformed(ActionEvent e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -24,7 +24,9 @@
<![CDATA[
import org.chorem.lima.enums.ComboBoxDatesEnum;
+ import org.chorem.lima.ui.entrybooksreports.EntryBookComboBox;
EntryBooksReportsPeriodSearchPanel periodSearchPanel = new EntryBooksReportsPeriodSearchPanel(handler);
+ EntryBookComboBox comboBox = new EntryBookComboBox(handler);
void $afterCompleteSetup() {
}
@@ -42,9 +44,17 @@
<JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/>
</cell>
<cell anchor="west">
- <JComboBox javaBean='new org.chorem.lima.ui.entrybooksreports.EntryBookComboBox(getHandler())' />
+ <JComboBox javaBean='comboBox' />
</cell>
<cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="comboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="comboBox.next()"/>
+ </cell>
+ <cell>
<EnumEditor id='DocumentEditor'
constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'
onActionPerformed="getHandler().createDocument()"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -170,29 +170,31 @@
public void createDocument() {
- FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+selectedEnum.getExtension()+"&model="
- + DocumentsEnum.ENTRYBOOKS.getFileName();
- Desktop.getDesktop().browse(new URI(url));
-
- String url2 = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+selectedEnum.getExtension()+"&model="
- + DocumentsEnum.GENERAL_ENTRYBOOK.getFileName();
- Desktop.getDesktop().browse(new URI(url2));
-
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
+ String address = LimaConfig.getInstance().getHostAdress();
+
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.ENTRYBOOKS.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+
+ String url2 = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.GENERAL_ENTRYBOOK.getFileName();
+ Desktop.getDesktop().browse(new URI(url2));
+
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -43,10 +43,10 @@
private static final Log log =
LogFactory.getLog(FinancialStatementReportPeriodSearchPanel.class);
- protected FinancialStatementReportViewHandler handler;
+ protected FinancialStatementReportTableModel model;
- public FinancialStatementReportPeriodSearchPanel(FinancialStatementReportViewHandler handler) {
- this.handler = handler;
+ public FinancialStatementReportPeriodSearchPanel(FinancialStatementReportTableModel model) {
+ this.model = model;
//init date
refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
@@ -55,7 +55,7 @@
static final long serialVersionUID = 1L;
public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
-
+
switch (comboBoxPeriodEnum) {
case PERIOD:
// get begin date
@@ -74,11 +74,11 @@
ActionListener beginDateActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- handler.model.setBeginDate(beginDatePicker.getDate());
- handler.refresh();
+ model.setBeginDate(beginDatePicker.getDate());
+ model.refresh();
}
};
- handler.model.setBeginDate(beginDatePicker.getDate());
+ model.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
@@ -86,13 +86,13 @@
ActionListener endDateActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- handler.model.setEndDate(endDatePicker.getDate());
- handler.refresh();
+ model.setEndDate(endDatePicker.getDate());
+ model.refresh();
}
};
- handler.model.setEndDate(endDatePicker.getDate());
+ model.setEndDate(endDatePicker.getDate());
endDatePicker.addActionListener(endDateActionListener);
- handler.refresh();
+ model.refresh();
this.removeAll();
this.add(beginDateLabel);
@@ -112,9 +112,9 @@
public void actionPerformed(ActionEvent e) {
FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
if (fPeriod != null){
- handler.model.setBeginDate(fPeriod.getBeginDate());
- handler.model.setEndDate(fPeriod.getEndDate());
- handler.refresh();
+ model.setBeginDate(fPeriod.getBeginDate());
+ model.setEndDate(fPeriod.getEndDate());
+ model.refresh();
}
}
};
@@ -135,9 +135,9 @@
public void actionPerformed(ActionEvent e) {
FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
if (fPeriod !=null){
- handler.model.setBeginDate(fPeriod.getBeginDate());
- handler.model.setEndDate(fPeriod.getEndDate());
- handler.refresh();
+ model.setBeginDate(fPeriod.getBeginDate());
+ model.setEndDate(fPeriod.getEndDate());
+ model.refresh();
}
}
};
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -240,20 +240,21 @@
public void createDocument(FormatsEnum formatsEnum) {
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+formatsEnum.getExtension()+"&model="
- + DocumentsEnum.FINANCIALSTATEMENT.getFileName();
- Desktop.getDesktop().browse(new URI(url));
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ String address = LimaConfig.getInstance().getHostAdress();
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+formatsEnum.getExtension()+"&model="
+ + DocumentsEnum.FINANCIALSTATEMENT.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -22,49 +22,23 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.Account;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ FinancialStatementReportPeriodSearchPanel periodSearchPanel =
+ new FinancialStatementReportPeriodSearchPanel(modelTable);
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
- getModelTable().setBeginDate(beginDate);
- getModelTable().setEndDate(endDate);
-
void $afterCompleteSetup() {
- getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
- <cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.common.begindate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getModelTable().setBeginDate(beginDatePicker.getDate());
- getHandler().refresh()" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.common.enddate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getModelTable().setEndDate(endDatePicker.getDate());
- getHandler().refresh()"/>
- </cell>
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><FinancialStatementReportPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell>
<EnumEditor id='DocumentEditor'
constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -52,6 +52,7 @@
public void createDocument() {
+ model = view.getModelTable();
FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
model.createDocument(selectedEnum);
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -0,0 +1,90 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransaction;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.ui.combobox.EntryBookComboBoxModel;
+import org.chorem.lima.ui.combobox.EntryBookRenderer;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.util.EntryBookToString;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class FinancialPeriodComboBox extends JComboBox implements ActionListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(FinancialPeriodComboBox.class);
+
+ protected FinancialTransactionViewHandler handler;
+
+ public FinancialPeriodComboBox(FinancialTransactionViewHandler handler) {
+ this.handler = handler;
+
+ FinancialPeriodComboBoxModel comboBoxModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer comboBoxRenderer = new FinancialPeriodComboBoxRenderer();
+
+ setModel(comboBoxModel);
+ setRenderer(comboBoxRenderer);
+ addActionListener(this);
+
+ }
+
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.setSelectedItem(this.getItemAt(row-1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.setSelectedItem(this.getItemAt(row+1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof FinancialPeriod){
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -318,6 +318,7 @@
public void setFinancialPeriod(FinancialPeriod financialPeriod){
selectedFinancialPeriod = financialPeriod;
+ refresh();
}
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -24,22 +24,17 @@
<![CDATA[
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FinancialPeriod;
+ import org.chorem.lima.ui.financialtransaction.FinancialPeriodComboBox;
+ FinancialPeriodComboBox financialPeriodComboBox = new FinancialPeriodComboBox(handler);
+
+
void $afterCompleteSetup() {
getHandler().refresh();
}
]]>
</script>
-
- <!-- <JPopupMenu id="MenuRightPanel">
- <JMenuItem text="lima.add.transaction" onActionPerformed='addEmptyTransaction()'/>
- <JMenuItem text="lima.print"/>
- </JPopupMenu>
- <JPopupMenu id="MenuRightTransaction">
- <JMenuItem text="lima.add" onActionPerformed='addEmptyTransaction()'/>
- <JMenuItem text="lima.print"/>
- </JPopupMenu> -->
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
@@ -58,19 +53,21 @@
/>
</cell>
<cell anchor="west">
- <JComboBox id="financialPeriodComboBox"
- model="{getModelFinancialPeriod()}"
- renderer="{new org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer()}"
- onActionPerformed="getFinancialTransactionTableModel().setFinancialPeriod( (FinancialPeriod) financialPeriodComboBox.getSelectedItem());
- getHandler().refresh()"
- editable="false"
- />
+ <JComboBox javaBean="financialPeriodComboBox"/>
</cell>
<cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="financialPeriodComboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="financialPeriodComboBox.next()"/>
+ </cell>
+ <cell>
<JButton text="lima.common.copy"
onActionPerformed="getHandler().copyRow()" enabled="{isSelectedRow()}"/>
</cell>
- <cell>
+ <cell>
<JButton text="lima.common.paste"
onActionPerformed="getHandler().pasteRow()" enabled="{isSelectedRow()}"/>
</cell>
@@ -88,7 +85,7 @@
</cell>
</row>
<row>
- <cell fill="both" weightx="1" weighty="1" rows="3" columns="9">
+ <cell fill="both" weightx="1" weighty="1" rows="3" columns="11">
<JScrollPane>
<org.chorem.lima.ui.financialtransaction.FinancialTransactionTableModel
id="financialTransactionTableModel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -183,21 +183,23 @@
public void createDocument() {
- FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+selectedEnum.getExtension()+"&model="
- + DocumentsEnum.LEDGER.getFileName();
- Desktop.getDesktop().browse(new URI(url));
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
+ String address = LimaConfig.getInstance().getHostAdress();
+
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.LEDGER.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-24 16:54:17 UTC (rev 3019)
@@ -36,6 +36,8 @@
lima.common.amountcredit=Credit amount
lima.common.amountdebit=Debit amount
lima.common.begindate=Begin
+lima.common.buttonback=\u276E
+lima.common.buttonnext=\u276F
lima.common.cancel=Cancel
lima.common.close=Close
lima.common.closed=Closed
@@ -172,7 +174,7 @@
lima.message.help.usage=Options (set with --option <key> <value>\:
lima.misc.supportemail.description=Support email
lima.openejb.remotemode.description=
-lima.opening.accounts=<html><center>No account chart is load<br/>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html>
+lima.opening.accounts=<html><center>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html>
lima.opening.entrybook=<html>Tick box to import default accounts chart\:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
lima.opening.import=Import a CSV Save
lima.opening.welcome=<html><center>Welcome to Lima<br/>this assistant help you to start your business accounting in the blink of an eye<br/>OR import instantanly your already existing save in CSV format<br/><br/><br/><br/></center></html>
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 16:54:17 UTC (rev 3019)
@@ -36,6 +36,8 @@
lima.common.amountcredit=Total Cr\u00E9dit
lima.common.amountdebit=Total D\u00E9bit
lima.common.begindate=D\u00E9but
+lima.common.buttonback=\u276E
+lima.common.buttonnext=\u276F
lima.common.cancel=Annuler
lima.common.close=Fermer
lima.common.closed=Ferm\u00E9
@@ -175,7 +177,7 @@
lima.message.help.usage=Options (set with --option <key> <value>\:
lima.misc.supportemail.description=Adresse email de support
lima.openejb.remotemode.description=
-lima.opening.accounts=<html><center>Aucun plan comptable charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
+lima.opening.accounts=<html><center>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.opening.entrybook=<html>Cochez la case pour importer les journaux par d\u00E9faut \:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
lima.opening.import=Importer une sauvegarde CSV
lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour d\u00E9marrer votre comptabilit\u00E9 en quelques instants\u0085<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
Added: trunk/src/site/resources/screens/lima_charts_accounts.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_accounts.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_entrybooks.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_entrybooks.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_financialperiod.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_financialperiod.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_financialstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_financialstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_fiscalperiod.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_fiscalperiod.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_entries.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_entries.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_financialstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_financialstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_home.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_home.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_accounts.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_accounts.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_balance.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_balance.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_entrybooks.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_entrybooks.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_financialstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_financialstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_ledger.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_ledger.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_searchtransaction.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_searchtransaction.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_webreports.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_webreports.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/site/rst/features.rst
===================================================================
--- trunk/src/site/rst/features.rst 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/src/site/rst/features.rst 2010-08-24 16:54:17 UTC (rev 3019)
@@ -8,29 +8,66 @@
Cette section permet de définir le cadre de la comptabilité :
- plan comptable
+
+.. image:: screens/lima_charts_accountschart.png
+
- journaux
+
+.. image:: screens/lima_charts_entrybooks.png
+
- exercices
+
+.. image:: screens/lima_charts_fiscalperiod.png
+
- période comptable
+
+.. image:: screens/lima_charts_financialperiod.png
+
- plan bilan / compte de résultat
+.. image:: screens/lima_charts_financialstatement.png
+
Traitement
-----------
La partie traitement regroupe les fonctions utiles au quotidien :
-Saisie et recherche
+- saisie
+.. image:: screenshots/lima_entries.png
+
+- recherche
+
+.. image:: screenshots/lima_searchtransaction.png
+
+
Rapports
-----------
Permet de visualiser les documents usuelles de la comptabilité :
+
- journal
+
+.. image:: screenshots/lima_reports_entrybooks.png
+
- comptes
+
+.. image:: screenshots/lima_reports_accounts.png
+
- balance
+
+.. image:: screenshots/lima_reports_balance.png
+
- grand-livre
+
+.. image:: screenshots/lima_reports_ledger.png
+
- Bilan et compte de résultat
+.. image:: screenshots/lima_reports_financialstatement.png
+
+
Les documents sont atteignables par les menu de LIMA et via un site internet embarqué.
@@ -42,5 +79,5 @@
-Actuellement LIMA permet l'import et l'export pour EBP. Il serait envisageable d'ajouté
-l'import / export pour d'autre logiciel à la demande.
+Actuellement LIMA permet l'import et l'export pour EBP. Il est possible d'ajouté
+à la demande l'import / export pour des formats de fichiers d'autres logiciels.
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/src/site/rst/index.rst 2010-08-24 16:54:17 UTC (rev 3019)
@@ -2,13 +2,11 @@
Introduction
==================
-Issu du projet Chorem_, et créé pour fonctionner en collaboration avec CALLAO_,
-LIMA_ est une interface graphique capable d'utiliser différents moteurs de
-comptabilité générale respectant les conventions ainsi que normes imposées par
-la législation française aux entreprises.
-Initialement, LIMA utilisait le moteur de comptabilité d'OfBiz-Neogia, CALLAO_
-est maintenant utilisé comme moteur de comptabilité par défaut.
-.. _ChoreM: http://chorem.org/
-.. _LIMA: http://chorem.org/projects/show/lima
-.. _CALLAO: http://chorem.org/projects/show/callao
\ No newline at end of file
+Acronyme de Lutin Invoice Monitoring and Accounting, l’application de comptabilité
+LIMA est un logiciel libre pensé pour être la plus ergonomique possible et facile
+d’accès à tout utilisateur quelque soit leur niveau en comptabilité : débutant
+comme confirmé.
+La particularité de LIMA est qu’il s’agit d’un produit évolutif permettant de
+répondre aux besoins spécifiques de toute entreprise ou organisation, tout en
+garantissant le maintien des données comptables.
\ No newline at end of file
Deleted: trunk/src/site/rst/screenshots.rst
===================================================================
--- trunk/src/site/rst/screenshots.rst 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/src/site/rst/screenshots.rst 2010-08-24 16:54:17 UTC (rev 3019)
@@ -1,71 +0,0 @@
-====================
-Présentation de LIMA
-====================
-
-Présentation imagée
--------------------
-
-L'interface de Lima intègre les fonctionalités suivantes
-
-
-Interface multi utilisateurs avec authentification :
-
-.. image:: screenshots/lima-capture4-mini.png
-
-Connexion_
-
-.. _Connexion: screenshots/lima-capture4.png
-
-
-Gestion des écritures dans le journal :
-
-.. image:: screenshots/lima-capture-mini.png
-
-Ecritures_
-
-.. _Ecritures: screenshots/lima-capture.png
-
-
-Gestion des comptes du plan comptable général :
-
-.. image:: screenshots/lima-capture2-mini.png
-
-PCG_
-
-.. _PCG: screenshots/lima-capture2.png
-
-
-Edition des états comptables :
-
-.. image:: screenshots/etat-mini.png
-
-Etat_
-
-.. _Etat: screenshots/etat.png
-
-
-Recherches :
-
-.. image:: screenshots/recherche-mini.png
-
-Recherche_
-
-.. _Recherche: screenshots/recherche.png
-
-
-Les journaux :
-
-.. image:: screenshots/journaux-mini.png
-
-Journaux_
-
-.. _Journaux: screenshots/journaux.png
-
-
-Le lettrage :
-
-.. image:: screenshots/lettrage-mini.png
-
-Lettrage_
-
-.. _Lettrage: screenshots/lettrage.png
1
0
Aug. 24, 2010
Author: jpepin
Date: 2010-08-24 14:31:17 +0200 (Tue, 24 Aug 2010)
New Revision: 3018
Url: http://chorem.org/repositories/revision/lima/3018
Log:
D?\195?\169bogue UI des rapports.
Removed:
trunk/doc/
trunk/src/referencement.txt
trunk/src/site/resources/callao/
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
trunk/src/site/rst/features.rst
trunk/src/site/rst/presentation.rst
trunk/src/site/site_fr.xml
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -608,7 +608,8 @@
query.addDistinct();
query.addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true);
//Load for lazy
- query.addLoad(FinancialTransaction.FINANCIAL_PERIOD);
+ query.addLoad(FinancialTransaction.ENTRY_BOOK)
+ .addLoad(FinancialTransaction.FINANCIAL_PERIOD);
Date beginDate = financialTransactionSearch.getBeginDate();
Date endDate = financialTransactionSearch.getEndDate();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -56,24 +56,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -111,36 +111,40 @@
public void refresh(){
- ReportsDatas datasList = getDataList();
-
- tableModel = view.getModelAccountsReportsTable();
- tableModel.refresh(datasList);
-
- /**
- * set text and amounts of labels credit, debit, solde
- */
-
- if (datasList != null){
- // set amounts credit and debit and solde
- view.amountCreditLabel.setText(datasList.getAmountCredit().toString());
- view.amountDebitLabel.setText(datasList.getAmountDebit().toString());
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(amountSolde.toString());
-
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+ if (selectedBeginDate != null && selectedEndDate != null && selectedAccount != null){
+ ReportsDatas datasList = getDataList();
+
+ tableModel = view.getModelAccountsReportsTable();
+ tableModel.refresh(datasList);
+
+ /**
+ * set text and amounts of labels credit, debit, solde
+ */
+
+ if (datasList != null){
+ // set amounts credit and debit and solde
+ view.amountCreditLabel.setText(
+ datasList.getAmountCredit().toString());
+ view.amountDebitLabel.setText(
+ datasList.getAmountDebit().toString());
+ BigDecimal amountSolde = datasList.getAmountSolde();
+ view.amountSoldeLabel.setText(amountSolde.toString());
+
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (datasList.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -69,24 +69,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -122,36 +122,42 @@
}
public void refresh(){
- model = view.getModelBalanceTable();
- BalanceTrial datasList = getDataList();
- model.refresh(datasList);
-
- /**
- * update the labels credit, debit, solde on the footer
- * get all entries for all accounts on the selected period
- */
-
- if (datasList != null){
- // set amounts credit, debit and solde
- view.amountCreditLabel.setText(String.valueOf(datasList.getAmountCredit()));
- view.amountDebitLabel.setText(String.valueOf(datasList.getAmountDebit()));
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(String.valueOf(amountSolde));
-
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+
+ if (selectedBeginDate != null && selectedEndDate != null){
+ model = view.getModelBalanceTable();
+ BalanceTrial datasList = getDataList();
+ model.refresh(datasList);
+
+ /**
+ * update the labels credit, debit, solde on the footer
+ * get all entries for all accounts on the selected period
+ */
+
+ if (datasList != null){
+ // set amounts credit, debit and solde
+ view.amountCreditLabel.setText(
+ String.valueOf(datasList.getAmountCredit()));
+ view.amountDebitLabel.setText(
+ String.valueOf(datasList.getAmountDebit()));
+ BigDecimal amountSolde = datasList.getAmountSolde();
+ view.amountSoldeLabel.setText(
+ String.valueOf(amountSolde));
+
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (datasList.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
public void createDocument() {
@@ -160,8 +166,10 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)+"&format="
+ +selectedEnum.getExtension()+"&model="
+ DocumentsEnum.BALANCE.getFileName();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -61,24 +61,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -19,7 +19,6 @@
package org.chorem.lima.ui.entrybooksreports;
import static org.nuiton.i18n.I18n._;
-
import java.awt.Desktop;
import java.io.IOException;
import java.math.BigDecimal;
@@ -27,12 +26,10 @@
import java.net.URISyntaxException;
import java.text.SimpleDateFormat;
import java.util.Date;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.beans.ReportsDatasImpl;
import org.chorem.lima.business.DocumentServiceMonitorable;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.HttpServerServiceMonitorable;
@@ -118,7 +115,8 @@
if (selectedEntryBook != null){
try {
results =
- reportService.generateEntryBooksReports(selectedEntryBook, selectedBeginDate, selectedEndDate);
+ reportService.generateEntryBooksReports(
+ selectedEntryBook, selectedBeginDate, selectedEndDate);
}
catch (LimaException eee) {
if (log.isErrorEnabled()) {
@@ -131,36 +129,41 @@
}
public void refresh(){
- tableModel = view.getModelTable();
-
- ReportsDatas datasList = getDataList();
-
- tableModel.refresh(datasList);
-
- /**
- * set text and amounts of labels credit, debit, solde
- */
-
- if (datasList != null){
- // set amounts credit, debit and solde
- view.amountCreditLabel.setText(String.valueOf(datasList.getAmountCredit()));
- view.amountDebitLabel.setText(String.valueOf(datasList.getAmountDebit()));
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(String.valueOf(amountSolde));
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+
+ if (selectedBeginDate != null && selectedEndDate != null && selectedEntryBook != null){
+ tableModel = view.getModelTable();
+
+ ReportsDatas datasList = getDataList();
+
+ tableModel.refresh(datasList);
+
+ /**
+ * set text and amounts of labels credit, debit, solde
+ */
+
+ if (datasList != null){
+ // set amounts credit, debit and solde
+ view.amountCreditLabel.setText(
+ String.valueOf(datasList.getAmountCredit()));
+ view.amountDebitLabel.setText(
+ String.valueOf(datasList.getAmountDebit()));
+ BigDecimal amountSolde = datasList.getAmountSolde();
+ view.amountSoldeLabel.setText(String.valueOf(amountSolde));
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (datasList.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
@@ -171,13 +174,17 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ DocumentsEnum.ENTRYBOOKS.getFileName();
Desktop.getDesktop().browse(new URI(url));
- String url2 = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url2 = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ DocumentsEnum.GENERAL_ENTRYBOOK.getFileName();
Desktop.getDesktop().browse(new URI(url2));
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -218,15 +218,17 @@
*/
public List<FinancialStatementAmounts> getDataList(){
List<FinancialStatementAmounts> results = null;
- try {
- results = financialStatementService.financialStatementReport(selectedBeginDate, selectedEndDate);
- }
- catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.debug("Can't update model", eee);
- }
- ErrorHelper.showErrorDialog("Can't get entries list", eee);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ try {
+ results = financialStatementService.financialStatementReport(selectedBeginDate, selectedEndDate);
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.debug("Can't update model", eee);
+ }
+ ErrorHelper.showErrorDialog("Can't get entries list", eee);
+ }
+ }
return results;
}
@@ -241,8 +243,10 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+formatsEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+formatsEnum.getExtension()+"&model="
+ DocumentsEnum.FINANCIALSTATEMENT.getFileName();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -18,13 +18,6 @@
package org.chorem.lima.ui.financialstatementreport;
-import java.awt.Desktop;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.chorem.lima.LimaConfig;
-import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.FormatsEnum;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -67,24 +67,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -19,7 +19,6 @@
package org.chorem.lima.ui.ledger;
import static org.nuiton.i18n.I18n._;
-
import java.awt.Desktop;
import java.io.IOException;
import java.math.BigDecimal;
@@ -30,7 +29,6 @@
import java.util.Collections;
import java.util.Date;
import java.util.List;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
@@ -47,7 +45,6 @@
import org.chorem.lima.business.utils.EntryComparator;
import org.chorem.lima.business.utils.FormatsEnum;
import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.ErrorHelper;
@@ -69,9 +66,6 @@
protected ReportServiceMonitorable reportService;
protected DocumentServiceMonitorable documentService;
- /** Account. */
- protected EntryBook selectedEntryBook;
-
/** Begin Date. */
protected Date selectedBeginDate;
@@ -129,7 +123,8 @@
List<Object> results = new ArrayList<Object>();
try {
balanceTrialCache = reportService.generateLedger(selectedBeginDate,
- selectedEndDate, selectedAccounts, view.getMovmentedFilter().isSelected());
+ selectedEndDate, selectedAccounts,
+ view.getMovmentedFilter().isSelected());
if (balanceTrialCache.getReportsDatas() != null){
for (ReportsDatas reportsDatas : balanceTrialCache.getReportsDatas()) {
results.add(reportsDatas);
@@ -151,37 +146,39 @@
}
public void refresh(){
- model = view.getModelTable();
- cachedatasList = getDataList();
- model.refresh(cachedatasList);
-
- /**
- * set text and amounts of labels credit, debit, solde
- */
-
- if (balanceTrialCache != null){
- // set amounts credit, debit and solde
- view.amountCreditLabel.setText(
- String.valueOf(balanceTrialCache.getAmountCredit()));
- view.amountDebitLabel.setText(
- String.valueOf(balanceTrialCache.getAmountDebit()));
- BigDecimal amountSolde = balanceTrialCache.getAmountSolde();
- view.amountSoldeLabel.setText(
- String.valueOf(amountSolde));
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (balanceTrialCache.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ model = view.getModelTable();
+ cachedatasList = getDataList();
+ model.refresh(cachedatasList);
+
+ /**
+ * set text and amounts of labels credit, debit, solde
+ */
+
+ if (balanceTrialCache != null){
+ // set amounts credit, debit and solde
+ view.amountCreditLabel.setText(
+ String.valueOf(balanceTrialCache.getAmountCredit()));
+ view.amountDebitLabel.setText(
+ String.valueOf(balanceTrialCache.getAmountDebit()));
+ BigDecimal amountSolde = balanceTrialCache.getAmountSolde();
+ view.amountSoldeLabel.setText(
+ String.valueOf(amountSolde));
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (balanceTrialCache.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
public void createDocument() {
@@ -190,8 +187,10 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ DocumentsEnum.LEDGER.getFileName();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 12:31:17 UTC (rev 3018)
@@ -84,6 +84,9 @@
lima.enum.comboboxaccount.account=Compte
lima.enum.comboboxaccount.accountlist=Liste de comptes
lima.enum.comboboxaccount.allaccount=Tous les comptes
+lima.enum.comboboxamount.both=Les deux
+lima.enum.comboboxamount.credit=Cr\u00E9dit
+lima.enum.comboboxamount.debit=D\u00E9bit
lima.enum.comboboxentrybook.all=Tous les journaux
lima.enum.comboboxentrybook.select_one=Journal
lima.enum.comboboxoperator.equal=\u00C9gal
Deleted: trunk/src/referencement.txt
===================================================================
--- trunk/src/referencement.txt 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/referencement.txt 2010-08-24 12:31:17 UTC (rev 3018)
@@ -1,4 +0,0 @@
-Voici les adresses où la promotion du logiciel a été assurée :
-- http://forum.framasoft.org/viewtopic.php?f=99&t=30743
-- http://freshmeat.net/projects/limacallao/
-- http://linuxfr.org/forums/12/26311.html
Modified: trunk/src/site/rst/features.rst
===================================================================
--- trunk/src/site/rst/features.rst 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/site/rst/features.rst 2010-08-24 12:31:17 UTC (rev 3018)
@@ -1,51 +1,46 @@
========
-Features
+Fonctionnalités
========
-Description
+
+Structure
-----------
-Le moteur de comptabilité CALLAO, couplé à l'interface graphique LIMA,
-propose toutes les fonctionnalités indispensables et légales à la tenue de la
-comptabilité générale d'une entreprise. Il peut communiquer avec l'ERP Chorem,
-pour effectuer de la comptabilité analytique.
+Cette section permet de définir le cadre de la comptabilité :
+- plan comptable
+- journaux
+- exercices
+- période comptable
+- plan bilan / compte de résultat
-Le tout proposera à terme un maximum de flexibilité avec des possibilités de
-stockage des données autonomes sur un seul poste, ou centralisées et accessibles
-à plusieurs personnes sur un serveur. On notera aussi que chacune des composantes
-se veut indépendante : LIMA pourra fonctionner sur CALLAO, OFBiz Neogia ou tout
-autre moteur de comptabilité conçu de manière à être compatible. Il en va de
-même pour Callao, qui pourra fonctionner avec d'autres interfaces conçues pour,
-et qui pourra donc être intégré dans un autre logiciel (ERP ou autre).
+Traitement
+-----------
-Liste de fonctionnalités
-------------------------
+La partie traitement regroupe les fonctions utiles au quotidien :
+Saisie et recherche
-Voici la liste de fonctionnalités de LIMA :
-- Saisie des écritures comptables multi-journal
-- Affichage des transactions des différents journaux et des comptes du grand livre
-- Clôture d'une période
-- Possibilité de modifier/supprimer les écritures d'une période non-clôturée
-- Fonctionnalité de semi-clôture pour éviter les saisies accidentelles sur un
- intervalle de temps donné.
-- Lettrage
-- Import/export des données depuis/vers un fichier.
-- Génération et publication des états comptables définitifs pour les périodes
- clôturés
-- Génération et publication d'états comptables provisoires pour les périodes
- non-clôturées
-- Conformité au cadre légal de la comptabilité informatisée en France
-- Labellisation des opérations suivant différentes informations (clients,
- projets, catégorie) afin de rendre possibles des échanges avec le projet
- Chorem_
+Rapports
+-----------
+Permet de visualiser les documents usuelles de la comptabilité :
+- journal
+- comptes
+- balance
+- grand-livre
+- Bilan et compte de résultat
-``Solutions``
-=============
+Les documents sont atteignables par les menu de LIMA et via un site internet embarqué.
-.. image:: schemas/schema-solutions.png
+Import / Export
+-----------
-.. _Chorem: http://chorem.org/
+Toutes les données de LIMA sont exportables et importables à volontés au format CSV.
+L'utilisation de ce format permet d'être exploité par un tableur.
+
+
+
+Actuellement LIMA permet l'import et l'export pour EBP. Il serait envisageable d'ajouté
+l'import / export pour d'autre logiciel à la demande.
Modified: trunk/src/site/rst/presentation.rst
===================================================================
--- trunk/src/site/rst/presentation.rst 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/site/rst/presentation.rst 2010-08-24 12:31:17 UTC (rev 3018)
@@ -5,114 +5,102 @@
Introduction
------------
-LIMA_ est un logiciel libre de gestion de comptabilité pensé pour être le
-plus ergonomique possible.
+Acronyme de Lutin Invoice Monitoring and Accounting, l’application de comptabilité
+LIMA est un logiciel libre pensé pour être la plus ergonomique possible et facile
+d’accès à tout utilisateur quelque soit leur niveau en comptabilité : débutant
+comme confirmé.
+La particularité de LIMA est qu’il s’agit d’un produit évolutif permettant de
+répondre aux besoins spécifiques de toute entreprise ou organisation, tout en
+garantissant le maintien des données comptables.
-Ayant comme particularité d'être évolutif au fil des besoins de votre entreprise.
-LIMA_ n'est pas figé et doit vous garantir un maintien de vos données comptable
-ainsi que de vos habitudes de travail.
-Ce logiciel est multiplatforme, développé en JAVA, il peut s'adapter aux
-environnement Windows,UNIX: MacOs ou linux. Il peut être implanté avec un système
-de base de données embarqué ou sur un serveur.
+Le logiciel est écrit en Java ce qui assure une compatibilité multiplateforme :
+Windows, Mac OS X, Linux. Il peut-être installé en fonctionnement client monoposte,
+ou en configuration client <–> serveur.
+Lors d'une installation en client serveur, le moteur de persistence de donnée est
+installé coté serveur, et l'interface est installée sur autant de poste client que
+désiré.
-Cela permet de se conformer aux besoins de sociétés de taille diverse. Il n'est
-pas indispensable de disposer d'un serveur de base de données pour tenir sa
-comptabilité avec LIMA_.
+Historique
+------------
Ce projet est né d'un besoin d'adapter l'ergonomie d'OFBiz Neogia qui
proposait un système de comptabilité générale.
-OFBiz Neogia n'étant pas un système de comptablitié a part entière son interface
-n'est pas adaptée à la gestion de la comptabilité. Code Lutin à donc décidé de
-remplacer cette interface tout en gardant la possibilité d'utiliser le moteur
-d'OFBiz Neogia.
+OFBiz Neogia n'étant pas un simple système de comptablitié a part entière, mais
+un ERP complet.
+Son interface n'était pas adaptée au besoin d'un logiciel de comptabilité indépendant.
+Code Lutin à donc décidé de remplacer cette interface tout en gardant la possibilité
+d'utiliser le moteur d'OFBiz Neogia. La première étape a donc été d’adapter une
+interface autonome avec la technologie de bibliothèque graphique Java Swing.
-LIMA_ est indépendant du système gérant la comptabilité. Il a donc été décidé de
-développer un moteur propre à Code lutin: CALLAO_.
+L'interface de LIMA_ est indépendant du moteur gérant la comptabilité. Il a donc
+été décidé de développer un moteur propre à Code lutin: CALLAO_.
-.. _CALLAO: callao.html
-.. _LIMA: presentation.html
+En 2010, l'application a été réécrite en majeur partie pour d'une part répondre le
+plus fidèlement aux normes comptables, et d'autre part correspondre aux normes de
+programmation de Code Lutin. LIMA s'appuie notamment sur les projets internes Topia,
+ EuGene et JAXX.
-
Architecture
------------
+LIMA est un projet MAVEN multi-module, il est en réalité composé de trois projets Java :
+lima-business, lima-callao, lima-swing.
+
.. image:: resources/schemas/lima-callao-architecture.png
+Lima-callao
+~~~~~~~~~~~~~
-Présentation
-------------
+Ce projet permet de définir les entités appelées objets (données informatiques
+regroupant les principales caractéristiques des éléments du monde réel) nécessaires
+au métier du logiciel de comptabilité. Toutes les classes java correspondantes
+sont générées à l’aide d’un modèle UML (langage de modélisation unifié). Ce modèle
+est contenu dans un seul fichier au format zargo éditable avec le logiciel Argouml.
+Ce principe permet d’utiliser avantageusement la langue UML et ces normes. L’ensemble
+du schéma est ensuite généré via les projets internes à Code Lutin :
+EUGene et ToPIA grâce à Maven.
+Outre la définition des entités, le projet lima-callao permet via ToPIA- persistence
+de définir les méthodes associées à la base de données pour le stockage de ces
+entités : ajout, modification, suppression.
-L'interface de Lima se intègre les fonctionnalités suivantes
-
-Interface multi utilisateurs avec authentification :
+lima-business
+~~~~~~~~~~~~~
-.. image:: screenshots/lima-capture4-mini.png
+Ce projet permet d’implémenter/de définir le métier en utilisant des entités issues
+du projet lima-callao. Des services EJB qui ont un rôle précis y sont programmés.
+Ce sont ces services qui sont appelés par l’utilisateur lorsqu’il appelle des
+fonctions. Les services sont programmés avec un système de session afin de pouvoir
+être exécuté en mode client serveur. En effet, les services sont exécutés côté
+serveur et ainsi le client appelle les services en ouvrant une transaction.
+Il existe une multitude de services relatifs aux besoins du métier :
+service des comptes, service des journaux, service des périodes fiscales,
+service des périodes financières, service des entrées, services des rapports, etc...
+On peut ajouter, modifier et supprimer des services selon les besoins de l'activité.
-Connexion_
-.. _Connexion: screenshots/lima-capture4.png
+lima-swing
+~~~~~~~~~~~~~
+Il s’agit du projet qui permet d’exécuter l’UI (interface utilisateur) de LIMA.
+Le design de l’application y est défini : fenêtres, boutons, tableaux,...
+L’interface est programmée selon la méthode de conception MVC (modèle-vue-
+contrôleur). Le modèle est le couple lima-callao - lima-business. La partie
+vue-contrôleur se trouve donc dans lima-swing. La partie vue, ce qui s’affiche à
+l’utilisateur, est programmée en JAXX. Toutes les actions des éléments de la vue
+(fenêtres, boutons, menus, tableaux) sont définies dans le contrôleur. Le
+contrôleur est implémenté sous forme de classes Java qui s’occupent d’afficher
+les bons messages, d’appeler les services correspondants, et de retourner les
+données, par exemple : le remplissage d’un tableau.
-Gestion des écritures dans le journal :
-.. image:: screenshots/lima-capture-mini.png
-
-Ecritures_
-
-.. _Ecritures: screenshots/lima-capture.png
-
-
-Gestion des comptes du plan comptable général :
-
-.. image:: screenshots/lima-capture2-mini.png
-
-PCG_
-
-.. _PCG: screenshots/lima-capture2.png
-
-
-Edition des états comptables :
-
-.. image:: screenshots/etat-mini.png
-
-Etat_
-
-.. _Etat: screenshots/etat.png
-
-
-Recherches :
-
-.. image:: screenshots/recherche-mini.png
-
-Recherche_
-
-.. _Recherche: screenshots/recherche.png
-
-
-Les journaux :
-
-.. image:: screenshots/journaux-mini.png
-
-Journaux_
-
-.. _Journaux: screenshots/journaux.png
-
-
-Le lettrage :
-
-.. image:: screenshots/lettrage-mini.png
-
-Lettrage_
-
-.. _Lettrage: screenshots/lettrage.png
-
Licence
-------
-Lima est développé sous licence GPL.
+Lima est développé sous licence GPL :
+GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007
\ No newline at end of file
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/site/site_fr.xml 2010-08-24 12:31:17 UTC (rev 3018)
@@ -13,20 +13,21 @@
</poweredBy>
<body>
- <menu name="Lima" inherit="top">
+ <menu name="Le projet" inherit="top">
<item name="Présentation" href="presentation.html"/>
- <item name="ScreenShots" href="screenshots.html"/>
- <item name="Features" href="features.html"/>
+ <item name="Fonctionnalités" href="features.html"/>
<item name="Lancer Lima en ligne" href="lima-main/jnlp/launch.jnlp" />
<item name="Téléchargements" href="http://chorem.org/projects/list_files/lima" />
- <item name="Lexique comptable" href="lexique.html" />
<item name="Contacts" href="contact.html" />
<item name="Dépôt SVN" href="http://svn.chorem.org/svn/lima/"/>
</menu>
- <menu name="Utilisateur" inherit="top" >
+ <menu name="Mode d'emploi" inherit="top" >
<item name="Installer et lancer" href="install.html" />
- <item name="Créer les journaux" href="journal.html" />
- <item name="Créer le plan comptable général" href="planComptable.html" />
+ <item name="Création de sa comptabilité" href="assistant.html" />
+ <item name="Saisie d'écritures" href="saisie.html" />
+ <item name="Rapports" href="rapports.html" />
+ <item name="Import / Export" href="importexport.html" />
+ <item name="Lexique comptable" href="lexique.html" />
</menu>
<menu ref="reports"/>
</body>
1
0
r3017 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/resources/images lima-swing/src/main/java/org/chorem/lima lima-swing/src/main/resources/images
by jpepin@users.chorem.org Aug. 23, 2010
by jpepin@users.chorem.org Aug. 23, 2010
Aug. 23, 2010
Author: jpepin
Date: 2010-08-23 22:01:24 +0200 (Mon, 23 Aug 2010)
New Revision: 3017
Url: http://chorem.org/repositories/revision/lima/3017
Log:
Ajout icone LIMA sur la page web.
Slpash screen puzzle v2.
Added:
trunk/lima-business/src/main/resources/images/puzzle_icon_mini.png
Removed:
trunk/lima-business/src/main/resources/images/logo-codelutin.png
trunk/lima-business/src/main/resources/images/splash.png
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
trunk/lima-swing/src/main/resources/images/puzzle_splash.png
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-23 16:49:11 UTC (rev 3016)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-23 20:01:24 UTC (rev 3017)
@@ -203,14 +203,15 @@
+ "<style type=\"text/css\">"
+ "body { font: 14px sans-serif; }"
+ "h1 { font: 20px sans-serif; text-align: center; }"
- + "table.paddingleft td {padding-left:100px;}"
+ + "table.padding td {padding-right:20px;}"
+ ".tdright {text-align: right;}"
+ "</style>"
+ "</head>\n"
+ "<body>\n"
- + "<table class=\"paddingleft\">\n"
- + "<tr><td colspan=2><h1>LIMA Documents Report</h1></td></tr>\n"
- + "<tr><td><img src=\"?img=identity.png\"/></td>\n"
+ + "<table class=\"padding\">\n"
+ + "<tr><td><img src=\"?img=puzzle_icon_mini.png\"/></td>\n"
+ + "<td><h1>LIMA Documents Report</h1></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=identity.png\"/></td>\n"
+ "<td rowspan=3><form method=GET action="
+ serverAdress + ">\n"
+ _("lima-business.document.date.begin")
@@ -237,12 +238,12 @@
}
pageContent.append("</select>\n"
- + "<tr><td><img src=\"?img=entries.png\"/></td></tr>\n"
- + "<tr><td><img src=\"?img=accounts.png\"/></td></tr>\n"
- + "<tr><td><img src=\"?img=entrybooks.png\"/></td>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=entries.png\"/></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=accounts.png\"/></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=entrybooks.png\"/></td>\n"
+ "<td class=\"tdright\"><input type=\"submit\"></td></tr>"
+ "</form>\n"
- + "<tr><td><img src=\"?img=fiscalperiods.png\"/></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=fiscalperiods.png\"/></td></tr>\n"
+ "</table>\n"
+ "</body>\n"
+ "</html>");
Deleted: trunk/lima-business/src/main/resources/images/logo-codelutin.png
===================================================================
(Binary files differ)
Added: trunk/lima-business/src/main/resources/images/puzzle_icon_mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-business/src/main/resources/images/puzzle_icon_mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/lima-business/src/main/resources/images/splash.png
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 16:49:11 UTC (rev 3016)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 20:01:24 UTC (rev 3017)
@@ -54,6 +54,9 @@
/** Lima configuration. */
public static LimaConfig config;
+ /** splash */
+ private static LimaSplash splash;
+
/**
* Lima main method.
*
@@ -67,6 +70,7 @@
}
try {
+
// init root context
final LimaContext context = init(args);
@@ -98,6 +102,10 @@
*/
public static synchronized LimaContext init(String... args) throws Exception {
+ // update splash
+ splash = new LimaSplash();
+ splash.initSplash();
+
// to enable javassist on webstart, must remove any securityManager,
// see if this can be dangerous (should not be since jnlp is signed ?)
// moreover it speeds up the loading :)
@@ -114,6 +122,7 @@
log.debug("i18n loading time : " + (StringUtil.convertTime(t0, System.nanoTime())));
}
+
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
// init root context
@@ -150,12 +159,10 @@
protected static void launch(LimaContext context) throws Exception {
+
+ splash.drawVersion(config.getVersion());
+ splash.updateProgression(0.1, _("lima.splash.1"));
- // update splash
- LimaSplash splash = new LimaSplash();
- splash.initSplash(config.getVersion());
- splash.updateProgression(0.1, _("lima.splash.1"));
-
// do init ui
MainViewHandler uiHandler = context.getContextValue(MainViewHandler.class);
final MainView ui = uiHandler.initUI(context, context.getConfig().isFullScreen());
@@ -166,7 +173,7 @@
// load accounts and test if there is an account plan defined
// if not, call #loadDefaultAccount()
- splash.updateProgression(0.5, _("lima.splash.2"));
+ splash.updateProgression(0.7, _("lima.splash.2"));
//start http server
LimaServiceFactory.getInstance().getService(HttpServerServiceMonitorable.class).start();
@@ -185,7 +192,7 @@
openingView.setLocationRelativeTo(null);
openingView.setVisible(true);
}
- splash.updateProgression(0.5, _("lima.splash.3"));
+ splash.updateProgression(1, _("lima.splash.3"));
// show ui
SwingUtilities.invokeLater(new Runnable() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 16:49:11 UTC (rev 3016)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 20:01:24 UTC (rev 3017)
@@ -67,10 +67,18 @@
*
* @param version version to display on splash screen
*/
- public void initSplash(String version) {
+ public void initSplash() {
if (splashGraphics != null) {
- splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawString("Version : " + version, 394, 42);
+ splashGraphics.setColor(Color.GRAY);
+ splashGraphics.drawRect(65, 253, 300, 10);
+ splashGraphics.fillRect(65, 253, 0, 10);
+
+ splashGraphics.setColor(Color.DARK_GRAY);
+ Font font = new Font("Lucida Sans", Font.BOLD, 14);
+ splashGraphics.setFont(font);
+ splashGraphics.drawString("Lutin Invoice Monitoring and Accounting", 65, 249);
+
+ splash.update();
}
else {
if (log.isWarnEnabled()) {
@@ -81,6 +89,17 @@
}
}
+ public void drawVersion(String version){
+ if (splashGraphics != null) {
+ splashGraphics.setColor(Color.DARK_GRAY);
+ Font font = new Font("Lucida Sans", Font.PLAIN, 12);
+ splashGraphics.setFont(font);
+ splashGraphics.setColor(Color.BLACK);
+ splashGraphics.drawString("Version : " + version, 394, 42);
+ splash.update();
+ }
+ }
+
/**
* Update progression.
*
Modified: trunk/lima-swing/src/main/resources/images/puzzle_splash.png
===================================================================
(Binary files differ)
1
0
r3016 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui resources/import
by jpepin@users.chorem.org Aug. 23, 2010
by jpepin@users.chorem.org Aug. 23, 2010
Aug. 23, 2010
Author: jpepin
Date: 2010-08-23 18:49:11 +0200 (Mon, 23 Aug 2010)
New Revision: 3016
Url: http://chorem.org/repositories/revision/lima/3016
Log:
Ajout ic?\195?\180ne ?\195?\160 la fen?\195?\170tre principale.
Mis ?\195?\160 jour fichier journaux par d?\195?\169faut.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/resources/import/eb_default.csv
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 16:49:11 UTC (rev 3016)
@@ -19,7 +19,8 @@
defaultCloseOperation="do_nothing_on_close"
undecorated='{getConfig().isFullScreen()}'
resizable="true" width="800" height="600"
- extendedState='{this.MAXIMIZED_BOTH}'>
+ extendedState='{this.MAXIMIZED_BOTH}'
+ iconImage='{new ImageIcon(getClass().getResource("/images/puzzle_icon.png")).getImage()}'>
<java.awt.Desktop id='desktop' javaBean='java.awt.Desktop.getDesktop()'/>
Modified: trunk/lima-swing/src/main/resources/import/eb_default.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/eb_default.csv 2010-08-23 16:38:53 UTC (rev 3015)
+++ trunk/lima-swing/src/main/resources/import/eb_default.csv 2010-08-23 16:49:11 UTC (rev 3016)
@@ -1,4 +1,4 @@
-"ENBK";"ACH";"Journal des achats";"Achats"
-"ENBK";"VTE";"Journal des ventes";"Ventes"
-"ENBK";"ODT";"Journal des opérations diverses";"Général"
-"ENBK";"BQE";"Journal de trésorerie";"Trésorerie"
+"ENBK";"ACH";"Journal des achats"
+"ENBK";"VTE";"Journal des ventes"
+"ENBK";"ODT";"Journal des opérations diverses"
+"ENBK";"BQE";"Journal de trésorerie"
1
0
Author: jpepin
Date: 2010-08-23 18:38:53 +0200 (Mon, 23 Aug 2010)
New Revision: 3015
Url: http://chorem.org/repositories/revision/lima/3015
Log:
Suppression de code inutile.
Nettoyage des cl?\195?\169s i18n et traduction.
Added:
trunk/lima-swing/src/main/resources/images/puzzle_icon.png
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx
trunk/lima-swing/src/main/resources/images/logo-codelutin.png
trunk/lima-swing/src/main/resources/images/splash.png
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java
trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -85,7 +85,7 @@
accountDAO.findByAccountNumber(account.getAccountNumber());
if (existAccount != null) {
throw new LimaBusinessException(_(
- "An account already exists with this number : %s",
+ "lima-business.account.accountalreardyexist",
account.getAccountNumber()));
}
@@ -153,7 +153,7 @@
accountDAO.findByAccountNumber(account.getAccountNumber());
if (existAccount != null) {
throw new LimaBusinessException(_(
- "An account already exists with this number : %s",
+ "lima-business.account.accountalreardyexist",
account.getAccountNumber()));
}
@@ -432,109 +432,6 @@
}
- /*
- * Convert string of extends number to list of accounts
- * Example '22, 45..48, 67' -> [22, 45, 46, 47, 48, 67]
- * SubAccountsMode return list of existing subaccounts ex 6 return : 61, 62, .., 69, 610, .., 619 etc
- *
- @Override
- public List<Account> stringToListAccountsWithTransaction(String selectedAccounts, Boolean subAccountsMode, TopiaContext topiaContext) throws LimaException{
- List<Account> accounts = new ArrayList<Account>();
- if (selectedAccounts != null){
- try {
- AccountDAO accountDAO =
- LimaCallaoDAOHelper.getAccountDAO(topiaContext);
- //Remove Spaces
- selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts);
- //use hashset for delete duplicate numbers
- HashSet<String> accountNumbers = new HashSet<String>();
- HashSet<String> accountNumbersToRemove = new HashSet<String>();
- Boolean first = true;
- StringTokenizer stStar = new StringTokenizer(selectedAccounts, "-");
- while (stStar.hasMoreTokens()) {
- String subString = stStar.nextToken();
-
- //Split comma
- StringTokenizer stComma = new StringTokenizer(subString, ",");
- while (stComma.hasMoreTokens()) {
- String s = stComma.nextToken();
- if (s.contains("..")){
- //Split ..
- String stringDoubleDot[] = s.split("\\.\\.");
- int lowAccount=Integer.parseInt(stringDoubleDot[0]);
- int highAccount=Integer.parseInt(stringDoubleDot[1]);
- for (int i=lowAccount; i <= highAccount; i++) {
- //if first add accounts, else remove
- if (first){
- accountNumbers.add(String.valueOf(i));
- }
- else {
- accountNumbersToRemove.add(String.valueOf(i));
- }
- }
- }
- else{
- //if first
- if (first){
- accountNumbers.add(s);
- }
- else {
- accountNumbersToRemove.add(s);
- }
- }
- }
- first=false;
- }
- //add all accounts
- for (String accountNumber : accountNumbers) {
- Account account = null;
- if (subAccountsMode){
- account = accountDAO.findSubAccountByNumber(accountNumber);
- }
- else {
- account = accountDAO.findByAccountNumber(accountNumber);
-
- }
- //add account if exist
- if (account != null){
- accounts.add(account);
- }
- //search all account start with accountnumber
- else {
- TopiaQuery query = accountDAO.createQuery();
- String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
- //String subLedgersProperty = TopiaQuery.getProperty(Account.SUB_LEDGERS);
- query.addWhere("not exists elements ("+subAccountsProperty+")")
- //.addWhere("not exists elements ("+subLedgersProperty+")")
- .addWhere(Account.ACCOUNT_NUMBER, Op.LIKE, accountNumber+"%");
- List<Account> accountsResult = accountDAO.findAllByQuery(query);
- if (accountsResult != null){
- accounts.addAll(accountsResult);
- }
- }
- }
- //remove all accounts
- for (String accountNumber : accountNumbersToRemove) {
- Account account = null;
- if (subAccountsMode){
- account = accountDAO.findSubAccountByNumber(accountNumber);
- }
- else {
- account = accountDAO.findByAccountNumber(accountNumber);
- }
- if (account != null) {
- accounts.remove(account);
- }
- }
- }
- catch (TopiaException ex) {
- doCatch(topiaContext, ex, log);
- }
- }
-
- return accounts;
- }*/
-
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
// TODO move it into JTA
@@ -554,6 +451,5 @@
throw eee;
}
}
-
}
\ No newline at end of file
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -272,7 +272,6 @@
//create pages
for (List<FinancialStatementAmounts> list : listList) {
String title = list.get(0).getLabel();
- //list = list.subList(1, list.size());
int i = 0;
int n = list.size();
int max = n;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -85,7 +85,7 @@
entryBookDAO.findByLabel(entryBook.getCode());
if (existingEntryBook != null) {
throw new LimaBusinessException(
- _("An EntryBook already exists with this label : %s",
+ _("lima-business.entrybook.entrybookalreadyexist",
entryBook.getLabel()));
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -209,7 +209,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -249,7 +249,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -279,7 +279,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -366,7 +366,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -381,7 +381,7 @@
*/
public void exportEntryBookChartAsCSV(CSVWriter csvWriter, TopiaContext topiaContext) throws LimaException {
try {
- String[] nextLine = new String[4];
+ String[] nextLine = new String[3];
// Get all entrybook
EntryBookDAO entryBookDAO =
LimaCallaoDAOHelper.getEntryBookDAO(topiaContext);
@@ -391,7 +391,6 @@
nextLine[0] = ImportExportEntityEnum.ENTRYBOOK.getLabel();
nextLine[1] = entryBook.getCode();
nextLine[2] = entryBook.getLabel();
- nextLine[3] = entryBook.getType();
// Ajoute la ligne au fichier
csvWriter.writeNext(nextLine);
}
@@ -423,7 +422,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -90,19 +90,6 @@
FinancialStatementDAO financialStatementDAO =
LimaCallaoDAOHelper.getFinancialStatementDAO(topiaContext);
- /* check if FinancialStatementHeader label already exist
- * too much strict check, many financialstatement can have the same name
- *
- * FinancialStatement existFinancialStatementHeader =
- financialStatementDAO.findByLabel(financialStatement.getLabel());
-
-
- if (existFinancialStatementHeader != null) {
- throw new LimaBusinessException(_(
- "An financialStatement already exists with this label : %s",
- financialStatement.getLabel()));
- }*/
-
financialStatementDAO.create(financialStatement);
FinancialStatement masterfinancialStatementUpdate = null;
@@ -560,8 +547,8 @@
for (Account account : accountsList) {
- result.append(_("lima-business.financialstatement.check.nothing")
- + " : "+account.getAccountNumber()+" - "+account.getLabel()+"\n");
+ result.append(_("lima-business.financialstatement.check.nothing",
+ account.getAccountNumber(), account.getLabel()));
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -678,9 +678,7 @@
break;
}
}
- log.debug(query);
financialTransactions = financialTransactionDAO.findAllByQuery(query);
- log.debug(financialTransactions);
EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
for (FinancialTransaction financialTransaction : financialTransactions) {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -35,7 +35,6 @@
import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
import org.chorem.lima.business.ejbinterface.FiscalPeriodServiceLocal;
import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FinancialPeriodDAO;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FiscalPeriodDAO;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
@@ -253,35 +252,6 @@
}
}
- /**
- * just for debug, this method must delete
- * Unauthorized action for user !!!
- */
- public void removeAllFiscalPeriods() throws LimaException{
- TopiaContext transaction = null;
- try {
- transaction = beginTransaction();
-
- FiscalPeriodDAO fiscalPeriodDAO =
- LimaCallaoDAOHelper.getFiscalPeriodDAO(transaction);
- FinancialPeriodDAO financialPeriodDAO =
- LimaCallaoDAOHelper.getFinancialPeriodDAO(transaction);
- for (FiscalPeriod fiscalPeriod : fiscalPeriodDAO.findAll()) {
- for (FinancialPeriod financialPeriod : fiscalPeriod.getFinancialPeriod()){
- financialPeriodDAO.delete(financialPeriod);
- }
- fiscalPeriodDAO.delete(fiscalPeriod);
- }
-
- commitTransaction(transaction);
-
- } catch (TopiaException ex) {
- doCatch(transaction, ex, log);
- }
- finally {
- doFinally(transaction, log);
- }
- }
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -19,6 +19,7 @@
package org.chorem.lima.business.ejb;
+import static org.nuiton.i18n.I18n._;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
@@ -36,7 +37,6 @@
import java.util.TreeMap;
import javax.ejb.EJB;
import javax.ejb.Stateless;
-
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -187,7 +187,7 @@
if (!Arrays.asList(strat.getColumnMapping()).containsAll(
headAccount)) {
throw new LimaBusinessException(
- "ERROR : This file contains no entries");
+ _("lima-business.import.ebpnoentry"));
}
CsvToBean<EntryEBPImpl> csv = new CsvToBean<EntryEBPImpl>();
@@ -207,7 +207,7 @@
if (nbFiscalPeriods == 0) {
throw new LimaBusinessException(
- "Can't import entries, no fiscalperiod is open");
+ _("lima-business.import.nofiscalperiodopen"));
}
FinancialTransaction financialTransaction = null;
@@ -224,17 +224,13 @@
// if account not exist not export
if (account == null) {
throw new LimaBusinessException(
- "FAILED : Account "
- + entryEBP.getCompte()
- + " not exist !\n"
- + "Import aborted ! Create all accounts before import entries");
+ _("lima-business.import.ebpmissingaccount",
+ entryEBP.getCompte()));
}
else if (date.compareTo(beginDate) < 0 || date.compareTo(endDate) > 0){
- result.append("WARNING : " + date + " entries is out of range of" +
- " opened fiscal periods. "
- + "Entry was skip !\n");
+ result.append(_("lima-business.import.entriesoutofdatesrange",date));
}
else {
entry.setAccount(account);
@@ -260,8 +256,7 @@
entryBook.setCode(entryBookCode);
// create it
entryBookService.createEntryBook(entryBook);
- result.append("WARNING : Entrybook " + entryBook
- + "not exist was created !\n");
+ result.append(_("lima-business.import.entrybooknotexist",entryBook));
}
if (financialTransaction == null
@@ -287,15 +282,13 @@
financialTransactionService
.createFinancialTransactionWithTransaction(
financialTransaction, topiaContext);
- result.append("SUCCES : FinancialTransaction" + date + " "
- + entryBook.getCode() + " added\n");
+ result.append(_("lima-business.import.transactionadded", date, entryBook.getCode()));
}
financialTransaction.addEntry(entry);
financialTransactionService.createEntryWithTransaction(
entry, topiaContext);
- result.append("SUCCES : Entry" + entry.getDescription() + " "
- + entry.getAmount() + " added\n");
+ result.append(_("lima-business.import.entryadded", entry.getDescription(), entry.getAmount()));
}
}
// update last financial transaction
@@ -310,13 +303,9 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- if (log.isDebugEnabled()) {
- log.debug("Can't read string", eeeIO);
- }
+ log.error("Can't read string", eeeIO);
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
} finally {
doFinally(topiaContext, log);
}
@@ -343,7 +332,7 @@
if (!Arrays.asList(strat.getColumnMapping()).containsAll(
headAccount)) {
throw new LimaBusinessException(
- "ERROR : This file contains no account");
+ _("lima-business.import.noaccount"));
}
CsvToBean<AccountEBPImpl> csv = new CsvToBean<AccountEBPImpl>();
@@ -355,8 +344,7 @@
for (AccountEBP accountEBP : list) {
String accountNumber = accountEBP.getNumero();
if (accountDAO.findByAccountNumber(accountNumber) != null) {
- result.append("FAILED : Account" + accountNumber
- + " already exist \n");
+ result.append(_("lima-business.import.accountalreadyexist", accountNumber));
} else {
String label = accountEBP.getIntitule();
Account account = new AccountImpl();
@@ -376,8 +364,7 @@
}
accountService.createSubLedgerWithTransaction(
masterAccount, account, topiaContext);
- result.append("SUCCES : Account" + accountNumber + " "
- + label + " added\n");
+ result.append(_("lima-business.import.accountadded", accountNumber, label));
}
// else is account
else {
@@ -386,8 +373,7 @@
if (nbCharAccountNumber == 1) {
accountService.createAccountWithTransaction(null,
account, topiaContext);
- result.append("SUCCES : Account" + accountNumber + " "
- + label + " added\n");
+ result.append(_("lima-business.import.accountadded", accountNumber, label));
}
else {
Account masterAccount = null;
@@ -401,8 +387,7 @@
}
accountService.createAccountWithTransaction(
masterAccount, account, topiaContext);
- result.append("SUCCES : Account" + accountNumber + " "
- + label + " added\n");
+ result.append(_("lima-business.import.accountadded", accountNumber, label));
}
}
}
@@ -410,9 +395,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- if (log.isDebugEnabled()) {
- log.debug("Can't read string", eeeIO);
- }
+ log.error("Can't read string", eeeIO);
} finally {
doFinally(topiaContext, log);
}
@@ -523,7 +506,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- log.debug("Can't create new CSV Reader", eeeIO);
+ log.error("Can't create new CSV Reader", eeeIO);
} finally {
doFinally(topiaContext, log);
}
@@ -593,7 +576,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- log.debug("Can't create new CSV Reader", eeeIO);
+ log.error("Can't create new CSV Reader", eeeIO);
} finally {
doFinally(topiaContext, log);
}
@@ -633,8 +616,7 @@
// put it in hashset
accounts.put(accountNumber, accountImport);
} else {
- result.append("FAILED : The account " + accountNumber
- + " already exists !\n");
+ result.append(_("lima-business.import.accountalreadyexist", accountNumber));
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -665,13 +647,10 @@
if (fiscalPeriodDAO.findByNaturalId(beginDate, endDate) == null) {
fiscalPeriods.add(fiscalPeriod);
} else {
- result.append("FAILED : The fiscalperiod " + beginDate + "-"
- + endDate + " already exists !\n");
+ result.append(_("lima-business.import.fiscalperiodalreadyexist", beginDate , endDate));
}
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
@@ -692,17 +671,14 @@
EntryBook entryBook = new EntryBookImpl();
entryBook.setCode(nextLine[1]);
entryBook.setLabel(nextLine[2]);
- entryBook.setType(nextLine[3]);
// if exist, skip
if (entryBookDAO.findByCode(entryBook.getCode()) != null) {
- result.append("FAILED : The entrybook " + entryBook.getLabel()
- + " already exists !\n");
+ result.append(_("lima-business.import.entrybookalreadyexist", entryBook.getLabel()));
} else {
// create it
entryBookService.createEntryBook(entryBook);
- result.append("SUCCESS : The financialStatement "
- + entryBook.getLabel() + " is created ! \n");
+ result.append(_("lima-business.import.financialstatementadded", entryBook.getLabel()));
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -788,8 +764,7 @@
financialStatements.put(label, (ArrayList<FinancialStatementImport>) list);
}
} else {
- result.append("FAILED : The financialstatement " + label
- + " already exists !\n");
+ result.append(_("lima-business.import.financialstatementalreadyexist", label));
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -911,18 +886,15 @@
masterFinancialStatement,
financialStatement, topiaContext);
- result.append("SUCCESS : The financialStatement "
- + financialStatementImport.getLabel()
- + " is created ! \n");
+ result.append(_("lima-business.import.financialstatementadded",
+ financialStatementImport.getLabel()));
itr2.remove();
} else if (!financialStatements
.containsKey(masterFinancialStatementLabel)) {
- result.append("FAILED : The financialStatement "
- + financialStatementImport.getLabel()
- + " have masterFinancialStatement : "
- + masterFinancialStatementLabel
- + "which not exist \n");
+ result.append(_("lima-business.import.financialstatementalnomaster",
+ financialStatementImport.getLabel(),
+ masterFinancialStatementLabel));
itr2.remove();
}
}
@@ -945,11 +917,11 @@
try {
fiscalPeriodService.createFiscalPeriodWithTransaction(
fiscalPeriod, topiaContext);
- result.append("SUCCESS : The fiscalPeriod "
- + fiscalPeriod.getBeginDate() + "-"
- + fiscalPeriod.getEndDate() + " is created ! \n");
+ result.append(_("lima-business.import.fiscalperiodadded",
+ fiscalPeriod.getBeginDate(),
+ fiscalPeriod.getEndDate()));
} catch (LimaException eee) {
- result.append("FAILED : " + eee + " \n");
+ result.append(_("lima-business.common.failed", eee.getMessage()));
}
}
return result.toString();
@@ -993,16 +965,15 @@
accountService.createAccountWithTransaction(
masterAccount, account, topiaContext);
}
- result.append("SUCCESS : The account "
- + accountImport.getAccountNumber()
- + " is created ! \n");
+ result.append(_("lima-business.import.accountadded",
+ accountImport.getAccountNumber(),
+ accountImport.getLabel()));
itr.remove();
} else if (!accounts.containsKey(masterAccountNumber)
&& !accounts.containsKey(generalLedgerNumber)) {
- result.append("FAILED : The account "
- + accountImport.getAccountNumber()
- + " have masterAccount : "
- + masterAccountNumber + "which not exist \n");
+ result.append(_("lima-business.import.accountnomaster",
+ accountImport.getAccountNumber(),
+ masterAccountNumber));
itr.remove();
}
}
@@ -1046,20 +1017,16 @@
financialPeriodService
.blockClosedPeriodicEntryBookWithTransaction(
closedPeriodicEntryBook, topiaContext);
- result.append("SUCCESS : The blockClosedPeriodicEntryBook "
- + beginDateFinancialPeriod + "-"
- + endDateFinancialPeriod + ", " + codeEntryBook
- + " is updated ! \n");
+ result.append(_("lima-business.import.closedperiodicentrybookupdated",
+ beginDateFinancialPeriod, endDateFinancialPeriod, codeEntryBook));
} catch (LimaException eee) {
- result.append("FAILED : " + eee + " \n");
+ result.append(_("lima-business.common.failed", eee));
}
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
}
return result.toString();
}
@@ -1124,9 +1091,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
}
return result.toString();
}
@@ -1151,8 +1116,7 @@
identityService.updateIdentityWithTransaction(identity, topiaContext);
// create it
- result.append("SUCCESS : The identity " + identity.getName()
- + " is created ! \n");
+ result.append(_("lima-business.import.identityadded", identity.getName()));
return result.toString();
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -44,7 +44,5 @@
void createFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
- void blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-
- void removeAllFiscalPeriods() throws LimaException;
+ void blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,56 +1,62 @@
-An\ EntryBook\ already\ exists\ with\ this\ label\ \:\ %s=
-An\ account\ already\ exists\ with\ this\ number\ \:\ %s=
-An\ financialStatement\ already\ exists\ with\ this\ label\ \:\ %s=
-business.document.financialstatement=
-lima-business.config.configFileName.description=
-lima-business.config.rulesnationality=
-lima-business.document.accountnubmer=
-lima-business.document.accountnumber=
-lima-business.document.amount=Amout
-lima-business.document.amounts=
-lima-business.document.balance=
-lima-business.document.businessnumber=
+lima-business.account.accountalreardyexist=An account already exists with this number \: %s
+lima-business.common.failed=FAILED \: %s \n
+lima-business.document.accountnumber=Account N\u00B0
+lima-business.document.amounts=Amounts
+lima-business.document.balance=Balance
+lima-business.document.businessnumber=Business N\u00B0
lima-business.document.carryback=Carry Back
lima-business.document.carryforward=reporter\u00C0
-lima-business.document.classificationcode=
-lima-business.document.classificationcode\ \:=
-lima-business.document.createdate1=
-lima-business.document.createdate2=
+lima-business.document.classificationcode=Classification Code
+lima-business.document.createdate1=Editing Date
+lima-business.document.createdate2=to
lima-business.document.credit=Credit
lima-business.document.date=Date
-lima-business.document.date.begin=
-lima-business.document.date.end=
+lima-business.document.date.begin=Begin date
+lima-business.document.date.end=End date
lima-business.document.debit=Debit
lima-business.document.description=Description
lima-business.document.entrybook=EntryBook
-lima-business.document.financialstatement=
-lima-business.document.generalentrybook=
+lima-business.document.financialstatement=FinancialStatement
+lima-business.document.generalentrybook=General EntryBook
lima-business.document.grossamount=Gross Amount
lima-business.document.label=Label
-lima-business.document.ledger=
-lima-business.document.movementcredit=
-lima-business.document.movementdebit=
+lima-business.document.ledger=Ledger
+lima-business.document.movementcredit=Credit movement
+lima-business.document.movementdebit=Debit movement
lima-business.document.netamount=Net Amount
-lima-business.document.pagenumber=
-lima-business.document.period1=
-lima-business.document.period2=
+lima-business.document.pagenumber=Page N\u00B0
+lima-business.document.period1=Periode from
+lima-business.document.period2=to
lima-business.document.provisiondeprecationamount=Provision Deprecation Amount
lima-business.document.solde=Solde
-lima-business.document.soldecredit=
-lima-business.document.soldedebit=
-lima-business.document.vatnumber=
+lima-business.document.soldecredit=Credit solde
+lima-business.document.soldedebit=Debit solde
+lima-business.document.vatnumber=VAT N\u00B0
lima-business.document.voucher=Voucher
-lima-business.financialstatement.check.nothing=
-lima-business.financialstatement.check.warn=
-lima.business.document.date=Date
+lima-business.entrybook.entrybookalreadyexist=An EntryBook already exists with this label \: %s
+lima-business.financialstatement.check.nothing=Not found \: %s - %s \n
+lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financialstatement.\n Some account marked not found is normally.\n\n
+lima-business.import.accountadded=SUCCES \: Account %s - %s added\n
+lima-business.import.accountalreadyexist=FAILED \: Account %s already exist \n
+lima-business.import.accountnomaster=FAILED \: The account %s have master \: %s which not exist \n
+lima-business.import.closedperiodicentrybookupdated=SUCCESS \: The blockClosedPeriodicEntryBook %s - %s - %s is updated \! \n
+lima-business.import.ebpmissingaccount=FAILED \: Account %s already exist, import aborted. \nCreate all accounts before import entries.
+lima-business.import.ebpnoentry=FAILED \: This file contains no entries.
+lima-business.import.entriesoutofdatesrange=WARNING \: %s entries is out of range of opened fiscal periods. Entry was skip \!\n
+lima-business.import.entryadded=SUCCES \: Entry %s %s added\n"
+lima-business.import.entrybookalreadyexist=FAILED \: The entrybook %s already exists \!\n
+lima-business.import.entrybooknotexist=WARNING \: Entrybook %s not exist was created \!\n
+lima-business.import.financialstatementadded=SUCCESS \: The financialStatement %s is created \n
+lima-business.import.financialstatementalnomaster=FAILED \: The financialStatement %s have master \: %s which not exist \n
+lima-business.import.financialstatementalreadyexist=FAILED \: The financialstatement %s already exists \!\n
+lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
+lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
+lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
+lima-business.import.noaccount=ERROR \: This file contains no account
+lima-business.import.nofiscalperiodopen=FAILED \: No Fiscal period open \! \n
+lima-business.import.transactionadded=SUCCES \: FinancialTransaction, %s - %s, added\n
lima.config.configFileName.description=
-lima.config.http-port=
-lima.config.httpport=
-lima.config.reports-dir=
-lima.config.reportsdir=
-lima.config.rulesnationality=
-lima.config.serveraddress=
-lima.table.grossamount=
-lima.table.label=Test
-lima.table.netamount=
-lima.table.provisiondeprecationamount=
+lima.config.httpport=HTTP Port
+lima.config.reportsdir=Reports directories
+lima.config.rulesnationality=Rules Nationality
+lima.config.serveraddress=Server Address
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,11 +1,8 @@
-An\ EntryBook\ already\ exists\ with\ this\ label\ \:\ %s=
-An\ account\ already\ exists\ with\ this\ number\ \:\ %s=
-An\ financialStatement\ already\ exists\ with\ this\ label\ \:\ %s=
-business.document.financialstatement=
+lima-business.account.accountalreardyexist=Un compte existe d\u00E9j\u00E0 avec ce num\u00E9ro \: %s
+lima-business.common.failed=\u00C9chec \: %s \n
lima-business.document.accountnumber=N\u00B0 Compte
lima-business.document.amounts=Totaux
lima-business.document.balance=Balance
-lima-business.document.beginDate=Date de d\u00E9but \:
lima-business.document.businessnumber=N\u00B0 Siret
lima-business.document.carryback=Report
lima-business.document.carryforward=\u00C0 reporter
@@ -18,7 +15,6 @@
lima-business.document.date.end=Date de fin \:
lima-business.document.debit=D\u00E9bit
lima-business.document.description=Description
-lima-business.document.endDate=Date de fin \:
lima-business.document.entrybook=Journal
lima-business.document.financialstatement=Bilan et compte de r\u00E9sultat
lima-business.document.generalentrybook=Journal G\u00E9n\u00E9ral
@@ -37,12 +33,30 @@
lima-business.document.soldedebit=Solde D\u00E9biteur
lima-business.document.vatnumber=N\u00B0 TVA
lima-business.document.voucher=Pi\u00E8ce comptable
-lima-business.financialstatement.check.nothing=Introuvable
+lima-business.entrybook.entrybookalreadyexist=Un journal existe d\u00E9j\u00E0 avec ce libell\u00E9 \: %s
+lima-business.financialstatement.check.nothing=Introuvable \: %s - %s \n
lima-business.financialstatement.check.warn=Attention cette fonctionnalit\u00E9 n'est qu'une aide utilisateur.\n Certains comptes ne doivent pas \u00EAtre pr\u00E9sent au bilan et compte de r\u00E9sultat.\n Il est donc normal que des comptes sont marqu\u00E9s comme introuvable.\n\n
+lima-business.import.accountadded=Succ\u00E8s \: Compte %s - %s ajout\u00E9\n
+lima-business.import.accountalreadyexist=\u00C9chec \: Le compte %s existe d\u00E9j\u00E0 \n
+lima-business.import.accountnomaster=\u00C9chec \: Le compte %s poss\u00E8de le master \: %s inexistant \n
+lima-business.import.closedperiodicentrybookupdated=Succ\u00E8s \: La p\u00E9riode financi\u00E8re %s - %s - %s est ajout\u00E9e \! \n
+lima-business.import.ebpmissingaccount=\u00C9chec \: Compte %s inexistant. \nImportation annul\u00E9e. \nCr\u00E9er tous les comptes avant d'importer les \u00E9critures.
+lima-business.import.ebpnoentry=\u00C9chec \: Ce fichier ne contient aucune entr\u00E9e.
+lima-business.import.entriesoutofdatesrange=Attention \: Cette entr\u00E9e %s ne fait partie d'aucune p\u00E9riode ouverte. Entr\u00E9e non import\u00E9e \!\n
+lima-business.import.entryadded=Succ\u00E8s \: Entr\u00E9e %s %s ajout\u00E9e \n
+lima-business.import.entrybookalreadyexist=\u00C9chec \: Le journal %s exist d\u00E9j\u00E0 \!\n
+lima-business.import.entrybooknotexist=Attention \: Le journal %s inexistant a \u00E9t\u00E9 cr\u00E9\u00E9 \!\n
+lima-business.import.financialstatementadded=Succ\u00E8s \: Mouvement %s ajout\u00E9e \n
+lima-business.import.financialstatementalnomaster=u00C9chec \: Le mouvement %s poss\u00E8de le master \: %s inexistant \n
+lima-business.import.financialstatementalreadyexist=u00C9chec \: Le mouvement %s exist d\u00E9j\u00E0 \!\n
+lima-business.import.fiscalperiodadded=Succ\u00E8s \: Exercice %s - %s ajout\u00E9e \! \n
+lima-business.import.fiscalperiodalreadyexist=u00C9chec \: L'exerice %s - %s existe d\u00E9j\u00E0 \!\n
+lima-business.import.identityadded=Succ\u00E8s \: Identit\u00E9 %s ajout\u00E9e \! \n
+lima-business.import.noaccount=Erreur \: Ce fichier ne contient aucun compte.
+lima-business.import.nofiscalperiodopen=u00C9chec \: Aucun exercice ouvert \! \n
+lima-business.import.transactionadded=Succ\u00E8s \: Transaction, %s, %s, ajout\u00E9e\n
lima.config.configFileName.description=
-lima.config.http-port=
-lima.config.httpport=
-lima.config.reports-dir=
-lima.config.reportsdir=
-lima.config.rulesnationality=
-lima.config.serveraddress=
+lima.config.httpport=Port HTTP
+lima.config.reportsdir=Dossier des rapports
+lima.config.rulesnationality=R\u00E8gles nationales
+lima.config.serveraddress=Addresse serveur
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -75,7 +75,6 @@
StringTokenizer stStar = new StringTokenizer(result, "-");
while (stStar.hasMoreTokens()) {
String subString = stStar.nextToken();
- log.debug(subString);
//Split comma
StringTokenizer stComma = new StringTokenizer(subString, ",");
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -80,9 +80,9 @@
}
} catch (Exception ex) {
if (log.isErrorEnabled()) {
- log.error(_("Global lima exception"), ex);
+ log.error(_("lima.common.globalexception"), ex);
}
- ErrorHelper.showErrorDialog(_("Global lima exception"), ex);
+ ErrorHelper.showErrorDialog(_("lima.common.globalexception"), ex);
System.exit(1);
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -98,10 +98,10 @@
splashGraphics.setComposite(AlphaComposite.Clear);
splashGraphics.fillRect(65, 238, 300, 15);
splashGraphics.setPaintMode();
- splashGraphics.setColor(new Color(255, 210, 55));
+ splashGraphics.setColor(Color.DARK_GRAY);
Font font = new Font("Lucida Sans", Font.BOLD, 14);
splashGraphics.setFont(font);
- splashGraphics.drawString(message + "...", 65, 248);
+ splashGraphics.drawString(message + "...", 65, 249);
}
splash.update();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -43,7 +43,6 @@
public void help() {
System.out.println(_("lima.message.help.usage"));
- System.out.println("Options (set with --option <key> <value>:");
for (LimaConfig.Option o : LimaConfig.Option.values()) {
System.out.println("\t" + o.key + "(" + o.defaultValue + "):" + o.description);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -105,13 +105,13 @@
<JMenu text="lima.importexport.import" actionIcon='import-element'>
<JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_IMPORT)'/>
<JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT)'/>
- <JMenuItem text="lima.importexport.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/>
+ <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/>
<JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT)'/>
</JMenu>
<JMenu text="lima.importexport.export" actionIcon='export-element'>
<JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_EXPORT)'/>
<JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_EXPORT)'/>
- <JMenuItem text="lima.importexport.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/>
+ <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/>
<JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_EXPORT)'/>
</JMenu>
</JMenu>
@@ -142,7 +142,7 @@
<JMenu text="lima.structure" mnemonic="{'S'}">
<JMenuItem text="lima.charts.account" onActionPerformed='getHandler().showAccountView(this)'
actionIcon='charts-accounts'/>
- <JMenuItem text="lima.charts.entrybook" onActionPerformed='getHandler().showEntryBookView(this)'
+ <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showEntryBookView(this)'
actionIcon='charts-entrybooks'/>
<JMenuItem text="lima.charts.fiscalyear" onActionPerformed='getHandler().showFiscalPeriodView(this)'
actionIcon='charts-fiscalperiod'/>
@@ -153,7 +153,7 @@
</JMenu>
<JMenu text="lima.entries" mnemonic="{'E'}">
- <JMenuItem text="lima.entries.addtransaction" onActionPerformed='getHandler().showTransactionView(this)'
+ <JMenuItem text="lima.entries.writetransaction" onActionPerformed='getHandler().showTransactionView(this)'
actionIcon='entries-balanced'/>
<JMenuItem text="lima.entries.searchunbalancedtransaction" onActionPerformed='getHandler().showTransactionUnbalancedView(this)'
actionIcon='entries-unbalanced'/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -201,7 +201,7 @@
}
}*/;
about.setTitle(_("lima.title.about"));
- about.setAboutText(_("lima.about.message"));
+ about.setAboutText(_("lima.title.about.description"));
about.setBottomText(ui.getConfig().getCopyrightText());
about.setIconPath("/icons/lima.png");
about.setLicenseFile("META-INF/lima-main-LICENSE.txt");
@@ -298,7 +298,7 @@
public void showEntryBookView(JAXXContext rootContext) {
MainView mainView = getUI(rootContext);
EntryBookView entryBookView= new EntryBookView(mainView);
- mainView.showTab(_("lima.charts.entrybook"), entryBookView);
+ mainView.showTab(_("lima.common.entrybooks"), entryBookView);
}
/**
@@ -362,7 +362,7 @@
public void showTransactionView(JAXXContext rootContext) {
MainView mainView = getUI(rootContext);
FinancialTransactionView transactionView = new FinancialTransactionView(mainView);
- mainView.showTab(_("lima.entries.addtransaction"), transactionView);
+ mainView.showTab(_("lima.entries.writetransaction"), transactionView);
}
public void showTransactionUnbalancedView(JAXXContext rootContext) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -33,7 +33,7 @@
<Table>
<row>
<cell fill="horizontal">
- <JLabel text="lima.account.number"/>
+ <JLabel text="lima.charts.account.number"/>
</cell>
<cell fill="horizontal">
<JTextField id="numberTextField" editable='{isAddState()}' text="{getAccount().getAccountNumber()}"/>
@@ -44,7 +44,7 @@
</row>
<row>
<cell fill="horizontal">
- <JLabel text="lima.account.label"/>
+ <JLabel text="lima.common.label"/>
</cell>
<cell fill="horizontal">
<JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -39,13 +39,13 @@
</JScrollPane>
</cell>
<cell fill="horizontal">
- <JButton id="addButton" text="lima.common.add"
+ <JButton id="addButton" text="lima.charts.account.addAccount"
onActionPerformed="getHandler().addAccount()"/>
</cell>
</row>
<row>
<cell fill="horizontal">
- <JButton id="addSubLedger" text="lima.common.addSubLedger"
+ <JButton id="addSubLedger" text="lima.charts.account.addSubLedger"
onActionPerformed="getHandler().addSubLedger()"
enabled="{isSelectedRow()}"/>
</cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -226,8 +226,8 @@
int selectedRow = view.getAccountsTreeTable().getSelectedRow();
if ( selectedRow != -1) {
int n = JOptionPane.showConfirmDialog(view,
- _("lima.question.remove.account"),
- _("lima.question"),
+ _("lima.charts.account.question.remove"),
+ _("lima.common.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (n == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -34,7 +34,7 @@
<Table>
<row>
<cell fill="horizontal">
- <JLabel text="lima.subledger.code"/>
+ <JLabel text="lima.common.code"/>
</cell>
<cell fill="horizontal">
<JTextField id="numberTextField" editable='{isAddState()}'
@@ -46,7 +46,7 @@
</row>
<row>
<cell fill="horizontal">
- <JLabel text="lima.account.label"/>
+ <JLabel text="lima.common.label"/>
</cell>
<cell fill="horizontal">
<JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -38,7 +38,7 @@
<cell><AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
</row></Table></cell>
<cell anchor="east">
- <JLabel id="accountSelectorLabel" text="lima.account"/>
+ <JLabel id="accountSelectorLabel" text="lima.common.account"/>
</cell>
<cell anchor="west">
<JComboBox javaBean='new org.chorem.lima.ui.accountsreports.AccountComboBox(getHandler())' />
@@ -58,19 +58,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -129,15 +129,15 @@
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -70,7 +70,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -82,7 +82,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -71,19 +71,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -140,15 +140,15 @@
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,76 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.ui.combobox;
-
-import static org.nuiton.i18n.I18n._;
-import javax.swing.AbstractListModel;
-import javax.swing.ComboBoxModel;
-
-/**
- * Combo box model with entrybook types.
- * (achats, ventes, trésorerie, général, situation).
- *
- */
-public class EntryBookTypeListModel extends AbstractListModel implements ComboBoxModel {
-
- private static final long serialVersionUID = 1L;
-
- protected Object selectedObject;
-
- /** Data. TODO put string in another place, don't use hard coded string. */
- protected Object[] data = new Object[]{ _("lima.entrybook.type1"),
- _("lima.entrybook.type2"), _("lima.entrybook.type3"),
- _("lima.entrybook.type4"), _("lima.entrybook.type5")};
-
- public EntryBookTypeListModel() {
- super();
- }
-
- /*
- * @see javax.swing.ComboBoxModel#setSelectedItem(java.lang.Object)
- */
- @Override
- public void setSelectedItem(Object anItem) {
- selectedObject = anItem;
- }
-
- /*
- * @see javax.swing.ComboBoxModel#getSelectedItem()
- */
- @Override
- public Object getSelectedItem() {
- return selectedObject;
- }
-
- /*
- * @see javax.swing.ListModel#getSize()
- */
- @Override
- public int getSize() {
- return data.length;
- }
-
- /*
- * @see javax.swing.ListModel#getElementAt(int)
- */
- @Override
- public Object getElementAt(int index) {
- return data[index];
- }
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -33,7 +33,7 @@
<Table>
<row>
<cell>
- <JLabel text="lima.entrybook.code"/>
+ <JLabel text="lima.common.code"/>
</cell>
<cell>
<JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/>
@@ -44,7 +44,7 @@
</row>
<row>
<cell>
- <JLabel text="lima.entrybook.label"/>
+ <JLabel text="lima.common.label"/>
</cell>
<cell>
<JTextField id="entryBookLabelField" editable='{isAddState()}' text="{getEntryBook().getLabel()}"/>
@@ -55,16 +55,6 @@
</row>
<row>
<cell>
- <JLabel text="lima.entrybook.type"/>
- </cell>
- <cell>
- <JComboBox id="typeComboBox" model='{new org.chorem.lima.ui.combobox.EntryBookTypeListModel()}'
- selectedItem="{getEntryBook().getType()}"
- onActionPerformed="getEntryBook().setType((String)getTypeComboBox().getSelectedItem())"/>
- </cell>
- </row>
- <row>
- <cell>
<JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/>
</cell>
<cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -68,8 +68,9 @@
try {
result = entryBookService.getAllEntryBooks().size();
} catch (LimaException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ if (log.isDebugEnabled()){
+ log.debug("Can't get all entrybooks",e);
+ }
}
return result;
@@ -77,7 +78,7 @@
@Override
public int getColumnCount() {
- return 3;
+ return 2;
}
@Override
@@ -90,9 +91,6 @@
case 1:
res = _("lima.table.label");
break;
- case 2:
- res = _("lima.table.type");
- break;
}
return res;
}
@@ -118,9 +116,6 @@
case 1:
result = entryBook.getLabel();
break;
- case 2:
- result = entryBook.getType();
- break;
}
} catch (LimaException eee) {
if (log.isDebugEnabled()){
@@ -176,7 +171,9 @@
public void notifyMethod(String serviceName, String methodeName) {
//refresh on import datas
- if (methodeName.contains("importEntryBooks") || methodeName.contains("importAll") || methodeName.contains("importAs")){
+ if (methodeName.contains("importEntryBooks")
+ || methodeName.contains("importAll")
+ || methodeName.contains("importAs")){
fireTableDataChanged();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -42,7 +42,7 @@
</row>
<row>
<cell fill="horizontal">
- <JButton id="addButton" text="lima.entrybook.add"
+ <JButton id="addButton" text="lima.charts.entrybook.add"
onActionPerformed="getHandler().addEntryBook()"/>
</cell>
</row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -130,9 +130,9 @@
int response =
JOptionPane.showConfirmDialog(view,
- _("Do you really want to delete entry book %s ?",
+ _("lima.charts.entrybook.confirmation",
selectedEntryBook.getLabel()),
- _("Confirmation"), JOptionPane.YES_NO_OPTION,
+ _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -39,7 +39,7 @@
<cell><EntryBooksReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
</row></Table></cell>
<cell anchor="east">
- <JLabel id="entryBookSelectorLabel" text="lima.entrybook"/>
+ <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/>
</cell>
<cell anchor="west">
<JComboBox javaBean='new org.chorem.lima.ui.entrybooksreports.EntryBookComboBox(getHandler())' />
@@ -63,19 +63,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -149,15 +149,15 @@
view.amountSoldeLabel.setText(String.valueOf(amountSolde));
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -151,10 +151,10 @@
break;
case 2:
if(closedPeriodicEntryBook.getLocked()){
- result = _("lima.close");
+ result = _("lima.common.closed");
}
else{
- result = _("lima.open");
+ result = _("lima.common.open");
}
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -42,7 +42,7 @@
<Table>
<row>
<cell>
- <JButton id="blockButton" text="lima.financialperiod.block" enabled="{isSelectedPeriod()}"
+ <JButton id="blockButton" text="lima.charts.financialperiod.block" enabled="{isSelectedPeriod()}"
onActionPerformed="getHandler().blockFinancialPeriod();" />
</cell>
</row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -56,8 +56,8 @@
// blocked it
try {
ClosedPeriodicEntryBook closedPeriodicEntryBook = model.getFinancialPeriodAtRow(selectedRow);
- int response = JOptionPane.showConfirmDialog(view, _("lima.question.financialperiod.blocked"),
- _("lima.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int response = JOptionPane.showConfirmDialog(view, _("lima.charts.financialperiod.question.blocked"),
+ _("lima.common.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
model.blockFinancialPeriod(closedPeriodicEntryBook);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -236,8 +236,8 @@
int selectedRow = view.treeTable.getSelectedRow();
if ( selectedRow != -1) {
int n = JOptionPane.showConfirmDialog(view,
- _("lima.question.remove.account"),
- _("lima.question"),
+ _("lima.charts.account.question.remove"),
+ _("lima.common.confirmation"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (n == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.model.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -50,7 +50,7 @@
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
+ <JLabel id="beginCalendarPanelLabel" text="lima.common.begindate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
@@ -58,7 +58,7 @@
getHandler().refresh()" />
</cell>
<cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
+ <JLabel id="endCalendarPanelLabel" text="lima.common.enddate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,41 +0,0 @@
-<!-- ##% Lima Swing
- Copyright (C) 2008 - 2010 CodeLutin
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ##% -->
-
-<Table insets='5,5,5,5'>
- <script>
- protected void removeCriteriaWidget(){}
- </script>
- <row>
- <cell>
- <JAXXComboBox id="criteriaComboBox" width="200">
- <item value='date' label='{_("lima.date")}' selected="true"/>
- <item value='voucher' label='{_("lima.voucher")}'/>
- <item value='account' label='{_("lima.account")}'/>
- <item value='description' label='{_("lima.description")}'/>
- <item value='debit' label='{_("lima.debit")}'/>
- <item value='credit' label='{_("lima.credit")}'/>
- <item value='amount' label='{_("lima.amount")}'/>
- </JAXXComboBox>
- </cell>
- <cell weightx="0">
- <JPanel id="criteriaPanel"/>
- </cell>
- <cell>
- <JButton id="removeButton" text="lima.remove" onActionPerformed="removeCriteriaWidget()"/>
- </cell>
- </row>
-</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -54,7 +54,7 @@
editable="false"/>
</cell>
<cell anchor="east">
- <JLabel id="financialPeriodLabel" text="lima.transaction.period"
+ <JLabel id="financialPeriodLabel" text="lima.common.period"
/>
</cell>
<cell anchor="west">
@@ -75,11 +75,11 @@
onActionPerformed="getHandler().pasteRow()" enabled="{isSelectedRow()}"/>
</cell>
<cell>
- <JButton text="lima.add.transaction"
+ <JButton text="lima.entries.addTransaction"
onActionPerformed="getHandler().addFinancialTransaction()"/>
</cell>
<cell>
- <JButton text="lima.add.entry" onActionPerformed="getHandler().addEmptyEntry()" enabled="{isSelectedRow()}"/>
+ <JButton text="lima.entries.addEntry" onActionPerformed="getHandler().addEmptyEntry()" enabled="{isSelectedRow()}"/>
</cell>
<cell>
<JButton text="lima.common.remove"
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -179,14 +179,14 @@
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
String message = null;
if (selectedValue instanceof FinancialTransaction) {
- message = _("lima.question.remove.transaction");
+ message = _("lima.charts.financialtransaction.question.removetransaction");
}
else {
- message = _("lima.question.remove.entry");
+ message = _("lima.charts.financialtransaction.question.removeentry");
}
int response = JOptionPane.showConfirmDialog(view, message,
- _("lima.transaction.confirmdelete"), JOptionPane.YES_NO_OPTION);
+ _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -90,7 +90,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -102,7 +102,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -86,7 +86,7 @@
</row>
<row>
<cell fill='both'><Table><row>
- <cell><JLabel text="lima.amount"/></cell>
+ <cell><JLabel text="lima.common.amount"/></cell>
<cell><JComboBox id="amountComboBox" javaBean="new JComboBox(FinancialStatementWayEnum.descriptions())"
onActionPerformed="handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription((String)amountComboBox.getSelectedItem()));
handler.refresh()"/></cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -56,7 +56,7 @@
editable="false"/>
</cell>
<cell>
- <JButton text="lima.add.entry"
+ <JButton text="lima.entries.addEntry"
onActionPerformed="getHandler().addEmptyEntry()"
enabled="{isSelectedRow()}"/>
</cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -109,14 +109,14 @@
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
String message = null;
if (selectedValue instanceof FinancialTransaction) {
- message = _("lima.question.remove.transaction");
+ message = _("lima.charts.financialtransaction.question.removetransaction");
}
else {
- message = _("lima.question.remove.entry");
+ message = _("lima.charts.financialtransaction.question.removeentry");
}
int response = JOptionPane.showConfirmDialog(view, message,
- _("lima.transaction.confirmdelete"), JOptionPane.YES_NO_OPTION);
+ _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -80,7 +80,7 @@
<Table fill="both">
<row>
<cell>
- <JLabel text="lima.period.begindate"/>
+ <JLabel text="lima.common.begindate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/>
@@ -88,7 +88,7 @@
</row>
<row>
<cell>
- <JLabel text="lima.period.enddate"/>
+ <JLabel text="lima.common.enddate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -143,10 +143,10 @@
break;
case 1:
if(fiscalPeriod.getLocked()){
- result = _("lima.close");
+ result = _("lima.common.closed");
}
else{
- result = _("lima.open");
+ result = _("lima.common.open");
}
break;
}
@@ -181,11 +181,6 @@
fireTableRowsInserted(currentRowCount, currentRowCount);
}
- public void removeAllFiscalPeriods() throws LimaException {
- fiscalPeriodService.removeAllFiscalPeriods();
- fireTableDataChanged();
- }
-
public void blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException {
fiscalPeriodService.blockFiscalPeriod(fiscalPeriod);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -41,20 +41,14 @@
</row>
<row>
<cell fill="horizontal">
- <JButton id="addButton" text="lima.fiscalperiod.addFiscalPeriod"
+ <JButton id="addButton" text="lima.charts.fiscalperiod.add"
onActionPerformed="getHandler().addFiscalPeriod()"/>
</cell>
</row>
<row>
<cell>
- <JButton id="blockButton" text="lima.fiscalperiod.block" enabled="{isSelectedPeriod()}"
+ <JButton id="blockButton" text="lima.charts.fiscalperiod.block" enabled="{isSelectedPeriod()}"
onActionPerformed="getHandler().blockFiscalPeriod()" />
</cell>
</row>
- <row>
- <cell>
- <JButton id="deleteButton" text="DEBUG delete all"
- onActionPerformed="getHandler().removeAllFiscalPeriods()" />
- </cell>
- </row>
</Table>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,8 +69,8 @@
int n = 0;
if(nbMonth !=12){
n = JOptionPane.showConfirmDialog(getView(),
- _("lima.question.fiscalperiod.morethan12"),
- _("lima.question"),
+ _("lima.charts.fiscalperiod.question.morethan12"),
+ _("lima.common.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
}
@@ -99,8 +99,8 @@
model.getFiscalPeriodAtRow(selectedRow);
int response =
JOptionPane.showConfirmDialog(getView(),
- _("lima.question.fiscalperiod.blocked"),
- _("lima.question"), JOptionPane.YES_NO_OPTION,
+ _("lima.charts.fiscalperiod.question.blocked"),
+ _("lima.common.question"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
@@ -114,20 +114,6 @@
}
}
- /** just for debug, no release version */
- public void removeAllFiscalPeriods(){
- FiscalPeriodTableModel model =
- (FiscalPeriodTableModel)getView().getFiscalPeriodTable().getModel();
- try {
- model.removeAllFiscalPeriods();
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't delete all fiscal period", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
- }
-
public FiscalPeriodView getView() {
return view;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -92,18 +92,18 @@
List<Account> accounts = accountService.getAllAccounts();
if (accounts.size()>0){
setBackground(greenBackground);
- String accountsString = _("limahome.chartaccounts.state1_2") + " "
- + accounts.size() + " " + _("limahome.chartaccounts.state2_2")
+ String accountsString = _("lima.home.chartaccounts.state1_2") + " "
+ + accounts.size() + " " + _("lima.home.chartaccounts.state2_2")
+ "<br/><br/><a href='#accountschart'>"
- + _("limahome.chartaccounts.modify") + "</a>";
+ + _("lima.home.chartaccounts.modify") + "</a>";
//set Text
setText(htmlBegin + accountsString + htmlEnd);
}
else {
setBackground(redBackground);
- String accountsString = _("limahome.chartaccounts.nothing")
+ String accountsString = _("lima.home.chartaccounts.nothing")
+ "<br/><br/><a href='#accountschart'>"
- + _("limahome.chartaccounts.create") + "</a>";
+ + _("lima.home.chartaccounts.create") + "</a>";
//set Text
setText(htmlBegin + accountsString + htmlEnd);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -94,23 +94,23 @@
setBackground(greenBackground);
String entryBooksString="";
if (ebSize == 1){
- entryBooksString = _("limahome.entrybooks.state.single")
+ entryBooksString = _("lima.home.entrybooks.state.single")
+ "<br/>" + entryBooks.get(0)
+ "<br/><br/><a href='#entrybookschart'>"
- + _("limahome.entrybooks.modify") + "</a>";
+ + _("lima.home.entrybooks.modify") + "</a>";
}
else {
- entryBooksString = _("limahome.entrybooks.state1_2.plural")
+ entryBooksString = _("lima.home.entrybooks.state1_2.plural")
+ " " + entryBooks.size() + " "
- + _("limahome.entrybooks.state2_2.plural") + "<ul>";
+ + _("lima.home.entrybooks.state2_2.plural") + "<ul>";
for (EntryBook entryBook : entryBooks) {
entryBooksString += "<li>"+entryBook.getCode() +
" - "+entryBook.getLabel()+"</li>";
}
entryBooksString += "</ul></p><p horizontal-align:'center'>"
+ "<a href='#entrybookschart'>"
- + _("limahome.entrybooks.modify") + "</a>";
+ + _("lima.home.entrybooks.modify") + "</a>";
}
//set Text
setText(htmlBegin + entryBooksString + htmlEnd);
@@ -119,9 +119,9 @@
setBackground(redBackground);
//set Text
setText(htmlBegin
- + _("limahome.entrybooks.nothing")
+ + _("lima.home.entrybooks.nothing")
+ "<br/><br/><a href='#entrybookschart'>"
- + _("limahome.entrybooks.create") +"</a>" + htmlEnd);
+ + _("lima.home.entrybooks.create") +"</a>" + htmlEnd);
}
} catch (LimaException eee) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -105,9 +105,9 @@
if (financialTransactionsUnbal.size()>0){
setBackground(redBackground);
String transactionsString = financialTransactionsUnbal.size()
- + " " + _("limahome.transaction.unbalanced")
+ + " " + _("lima.home.transaction.unbalanced")
+ "<br/><br/><a href='#financialtransactionunbalanced'>"
- + _("limahome.transaction.modifiy.unbalanced") + "</a>";
+ + _("lima.home.transaction.modifiy.unbalanced") + "</a>";
//set Text
setText(htmlBegin + transactionsString + htmlEnd);
}
@@ -118,17 +118,17 @@
if (financialTransactionsBal.size()>0){
setBackground(greenBackground);
String transactionsString = financialTransactionsBal.size()
- + " " + _("limahome.transaction.balanced")
+ + " " + _("lima.home.transaction.balanced")
+ "<br/><br/><a href='#financialtransactionbalanced'>"
- + _("limahome.transaction.modifiy.balanced") + "</a>";
+ + _("lima.home.transaction.modifiy.balanced") + "</a>";
//set Text
setText(htmlBegin + transactionsString + htmlEnd);
}
else {
setBackground(redBackground);
- String transactionsString = _("limahome.transaction.nothing")
+ String transactionsString = _("lima.home.transaction.nothing")
+ "<br/><br/><a href='#financialtransactionbalanced'>"
- + _("limahome.transaction.create") + "</a>";
+ + _("lima.home.transaction.create") + "</a>";
//set Text
setText(htmlBegin + transactionsString + htmlEnd);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -93,11 +93,11 @@
if (unblockedFiscalPeriods.size()>0){
setBackground(greenBackground);
String fiscalString = unblockedFiscalPeriods.size() + " "
- + _("limahome.fiscalperiod.opened") + "<br/>"
+ + _("lima.home.fiscalperiod.opened") + "<br/>"
+ (fiscalPeriods.size()-unblockedFiscalPeriods.size())
- + " " + _("limahome.fiscalperiod.closed")
+ + " " + _("lima.home.fiscalperiod.closed")
+ "<br/><br/><a href='#fiscalperiodschart'>"
- + _("limahome.fiscalperiod.modify") + "</a>";
+ + _("lima.home.fiscalperiod.modify") + "</a>";
//set Text
setText(htmlBegin + fiscalString + htmlEnd);
@@ -105,13 +105,13 @@
}
else {
setBackground(redBackground);
- String fiscalString = _("limahome.fiscalperiod.noopen");
+ String fiscalString = _("lima.home.fiscalperiod.noopen");
if (fiscalPeriods.size()>0){
fiscalString += "<br/>" + fiscalPeriods.size() + " "
- + _("limahome.fiscalperiod.closed");
+ + _("lima.home.fiscalperiod.closed");
}
fiscalString += "<br/><br/><a href='#fiscalperiodschart'>"
- + _("limahome.fiscalperiod.create") + "</a>";
+ + _("lima.home.fiscalperiod.create") + "</a>";
//set Text
setText(htmlBegin + fiscalString + htmlEnd);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -32,7 +32,7 @@
<row>
<cell anchor="southeast">
<JPanel
- id = 'accountPanel'
+ id='accountPanel'
border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}'
minimumSize='{getMiniSize()}'
preferredSize='{getFixedSize()}'
@@ -60,7 +60,7 @@
<Table>
<row>
<cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/></cell>
- <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.charts.entrybook'/></cell>
+ <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.common.entrybooks'/></cell>
</row>
<row fill="both">
<cell columns="2" weightx="1" weighty="0.9">
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -49,7 +49,6 @@
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.account.AccountViewHandler;
import org.chorem.lima.util.DialogHelper;
-import org.chorem.lima.util.FileChooseView;
import org.jdesktop.swingx.painter.BusyPainter;
public class ImportExport {
@@ -97,95 +96,97 @@
encodingEnum = EncodingEnum.UTF8;
if (file.equals("")){
file = chooseFile(importExportMethode.getImportMode(), importExportMethode);
- log.debug(encodingEnum.getEncoding());
}
- final EncodingEnum charset = encodingEnum;
- final String filePath = file;
- final Boolean verboseMode = verbose;
- new SwingWorker<String,Void>() {
- @Override protected String doInBackground() throws LimaException {
- String datas = "";
- String result = "";
- switch (importExportMethodeF) {
- case CSV_ALL_EXPORT:
- datas = exportService.exportAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case CSV_ACCOUNTCHARTS_EXPORT:
- datas = exportService.exportAccountsChartAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case CSV_ENTRYBOOKS_EXPORT:
- datas = exportService.exportEntryBookChartAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case CSV_FINANCIALSTATEMENTS_EXPORT:
- datas = exportService.exportFinancialStatementChartAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case EBP_ACCOUNTCHARTS_EXPORT:
- //For windows ebp
- datas = exportService.exportAccountsAsEBP();
- createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
- break;
- case EBP_ENTRIES_EXPORT:
- //For windows ebp
- datas = exportService.exportEntriesAsEBP();
- createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
- break;
- case CSV_ALL_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAllAsCSV(datas);
- break;
- case CSV_ACCOUNTCHARTS_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.ACCOUNT);
- break;
- case CSV_ENTRYBOOKS_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.ENTRYBOOK);
- break;
- case CSV_FINANCIALSTATEMENTS_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.FINANCIALSTATEMENT);
- break;
- case EBP_ACCOUNTCHARTS_IMPORT:
- //For windows ebp
- datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
- result = importService.importAccountsChartFromEbp(datas);
- break;
- case EBP_ENTRIES_IMPORT:
- //For windows ebp
- datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
- result = importService.importEntriesFromEbp(datas);
- break;
+ //if export cancel
+ if (!file.equals("")){
+ final EncodingEnum charset = encodingEnum;
+ final String filePath = file;
+ final Boolean verboseMode = verbose;
+ new SwingWorker<String,Void>() {
+ @Override protected String doInBackground() throws LimaException {
+ String datas = "";
+ String result = "";
+ switch (importExportMethodeF) {
+ case CSV_ALL_EXPORT:
+ datas = exportService.exportAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case CSV_ACCOUNTCHARTS_EXPORT:
+ datas = exportService.exportAccountsChartAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case CSV_ENTRYBOOKS_EXPORT:
+ datas = exportService.exportEntryBookChartAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case CSV_FINANCIALSTATEMENTS_EXPORT:
+ datas = exportService.exportFinancialStatementChartAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case EBP_ACCOUNTCHARTS_EXPORT:
+ //For windows ebp
+ datas = exportService.exportAccountsAsEBP();
+ createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
+ break;
+ case EBP_ENTRIES_EXPORT:
+ //For windows ebp
+ datas = exportService.exportEntriesAsEBP();
+ createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
+ break;
+ case CSV_ALL_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAllAsCSV(datas);
+ break;
+ case CSV_ACCOUNTCHARTS_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAsCSV(datas, ImportExportEntityEnum.ACCOUNT);
+ break;
+ case CSV_ENTRYBOOKS_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAsCSV(datas, ImportExportEntityEnum.ENTRYBOOK);
+ break;
+ case CSV_FINANCIALSTATEMENTS_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAsCSV(datas, ImportExportEntityEnum.FINANCIALSTATEMENT);
+ break;
+ case EBP_ACCOUNTCHARTS_IMPORT:
+ //For windows ebp
+ datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
+ result = importService.importAccountsChartFromEbp(datas);
+ break;
+ case EBP_ENTRIES_IMPORT:
+ //For windows ebp
+ datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
+ result = importService.importEntriesFromEbp(datas);
+ break;
+ }
+ return result;
+ }
+ @Override protected void done() {
+ try {
+ //hidde wait dialog panel
+ waitView.setVisible(false);
+ // display result dialog
+ if (verboseMode){
+ String result = get();
+ if (!result.equals("")){
+ DialogHelper.showReportDialog(result, _("lima.importexport.import"), viewComponent);
+ }
+ else {
+ DialogHelper.showMessageDialog(_("lima.importexport.import.terminated"));
+ }
+ }
+ } catch (InterruptedException eeeIE) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't get result message", eeeIE);
+ }
+ } catch (ExecutionException eeeEE) {
+ DialogHelper.showMessageDialog(eeeEE.getMessage());
}
- return result;
- }
- @Override protected void done() {
- try {
- //hidde wait dialog panel
- waitView.setVisible(false);
- // display result dialog
- if (verboseMode){
- String result = get();
- if (!result.equals("")){
- DialogHelper.showReportDialog(result, _("lima.importexport.import"), viewComponent);
- }
- else {
- DialogHelper.showMessageDialog(_("lima.importexport.import.terminated"));
- }
- }
- } catch (InterruptedException eeeIE) {
- if (log.isDebugEnabled()){
- log.debug("Can't get result message", eeeIE);
- }
- } catch (ExecutionException eeeEE) {
- DialogHelper.showMessageDialog(eeeEE.getMessage());
- }
- }
- }.execute();
- waitView.setVisible(true);
+ }
+ }.execute();
+ waitView.setVisible(true);
+ }
}
@@ -197,8 +198,7 @@
*/
public String chooseFile(Boolean importMode, ImportExportEnum importExportMethode){
String filePath = "";
- FileChooseView fileChooseView = new FileChooseView();
- JFileChooser chooser = fileChooseView.getChooser();
+ JFileChooser chooser = new JFileChooser();
//Encoding option
JComboBox comboBox = new JComboBox(EncodingEnum.descriptions());
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,19 +69,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -170,15 +170,15 @@
String.valueOf(amountSolde));
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (balanceTrialCache.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -26,7 +26,7 @@
</row>
<row>
<cell>
- <JCheckBox id='importEntryBook' text='lima.import.journal' selected='false'/>
+ <JCheckBox id='importEntryBook' text='lima.importexport.defaultentrybooks' selected='false'/>
</cell>
</row>
</Table>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -59,18 +59,18 @@
<Table fill="both">
<row>
<cell columns ="3">
- <JLabel text="lima.period.create"/>
+ <JLabel text="lima.charts.fiscalperiod.create"/>
</cell>
</row>
<row>
<cell>
- <JLabel text="lima.period.begindate"/>
+ <JLabel text="lima.common.begindate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/>
</cell>
<cell>
- <JLabel text="lima.period.enddate"/>
+ <JLabel text="lima.common.enddate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -35,7 +35,7 @@
String[] response = {_("lima.response.yes"), _("lima.response.no")};
return JOptionPane.showOptionDialog(null,
message,
- _("lima.question"),
+ _("lima.common.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, //do not use a custom Icon
@@ -49,7 +49,7 @@
JOptionPane.showMessageDialog(
f,
message,
- _("lima.error"),
+ _("lima.common.error"),
JOptionPane.ERROR_MESSAGE);
f.dispose();
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -67,7 +67,7 @@
public static void showErrorDialog(Component parent, String message,
Throwable cause) {
JXErrorPane pane = new JXErrorPane();
- ErrorInfo info = new ErrorInfo(_("lima.error.errorpane.title"),
+ ErrorInfo info = new ErrorInfo(_("lima.common.error"),
_("lima.error.errorpane.htmlmessage", message), null, null,
cause, null, null);
pane.setErrorInfo(info);
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,3 +0,0 @@
-<JFrame title="lima.export">
- <JFileChooser id="chooser" width="620" height="400"/>
-</JFrame>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,182 +1,165 @@
-Confirmation=
-DEBUG\ delete\ all=
-Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
-Global\ lima\ exception=
-lima.about.message=
-lima.account=Account
-lima.account.label=Label
-lima.account.number=Number
-lima.accountsreports.accountfilter=Filter
-lima.accountsreports.begincalendar=
-lima.accountsreports.endcalendar=
-lima.accountsreports.movmentedfilter=
lima.action.commandline.help=Show help in console
lima.action.fullscreen=Full screen
lima.action.fullscreen.tip=Open ui in full screen
lima.action.normalscreen=Normal screen
lima.action.normalscreen.tip=Open ui in normal screen
-lima.add.entry=Add an entry
-lima.add.transaction=Add a transaction
-lima.amount=Amount
-lima.amountcredit=
-lima.amountdebit=
lima.charts.account=Accounts chart
-lima.charts.account.base=
-lima.charts.account.developed=
-lima.charts.account.nothing=
-lima.charts.account.shortened=
-lima.charts.entrybook=EntryBooks chart
-lima.charts.entrybook.default=
-lima.charts.entrybook.import=
+lima.charts.account.addAccount=Add account
+lima.charts.account.addSubLedger=Add thirdpart account
+lima.charts.account.base=Base accountchart
+lima.charts.account.developed=Developped accountchart
+lima.charts.account.number=Account Number
+lima.charts.account.question.remove=Do you really remove this account ?
+lima.charts.account.shortened=Shorthened accountchart
+lima.charts.entrybook.add=Add entrybook
+lima.charts.entrybook.confirmation=Do you really remove this entrybook ?
+lima.charts.entrybook.default=Defaults entrybooks
+lima.charts.entrybook.import=Import entrybooks
lima.charts.financialperiod=Financial Periods
-lima.charts.financialstatement=
-lima.charts.financialstatement.base=
-lima.charts.financialstatement.developed=
-lima.charts.financialstatement.nothing=
-lima.charts.financialstatement.shortened=
+lima.charts.financialperiod.block=Block financialperiod
+lima.charts.financialperiod.question.blocked=Do you really block this financialperiod ? This action is irreversible \!
+lima.charts.financialstatement=Financialstatement chart
+lima.charts.financialstatement.base=Base financialstatement chart
+lima.charts.financialstatement.developed=Developped financialstatement chart
+lima.charts.financialstatement.nothing=NO financialstatement chart
+lima.charts.financialstatement.shortened=Shortened financialstatement chart
+lima.charts.financialtransaction.question.removeentry=Do you really remove this entry ?
+lima.charts.financialtransaction.question.removetransaction=Do you really remove this transaction ?
+lima.charts.fiscalperiod.add=Add fiscalperiod
+lima.charts.fiscalperiod.block=Block fiscalperiod
+lima.charts.fiscalperiod.create=Create fiscalperiod
+lima.charts.fiscalperiod.question.blocked=Block financialperiod
+lima.charts.fiscalperiod.question.morethan12=This period is longer than 12 months. Do you really create this ?
lima.charts.fiscalyear=Fiscal Years
-lima.close=Closed
-lima.common.add=
-lima.common.addSubLedger=
-lima.common.cancel=
-lima.common.close=
-lima.common.copy=
-lima.common.filter=
-lima.common.fin=
-lima.common.import=
-lima.common.importexport=Import/Export
-lima.common.movmentedfilter=
-lima.common.next=
-lima.common.ok=
-lima.common.paste=
-lima.common.print=
-lima.common.quit=
-lima.common.remove=
-lima.common.search=
-lima.common.update=
-lima.config.category.directories=
-lima.config.category.directories.description=
-lima.config.category.other=
-lima.config.category.other.description=
+lima.common.account=Account
+lima.common.amount=Amount
+lima.common.amountcredit=Credit amount
+lima.common.amountdebit=Debit amount
+lima.common.begindate=Begin
+lima.common.cancel=Cancel
+lima.common.close=Close
+lima.common.closed=Closed
+lima.common.code=Code
+lima.common.confirmation=Confirmation
+lima.common.copy=Copy
+lima.common.enddate=End
+lima.common.entrybook=EntryBook
+lima.common.entrybooks=EntryBooks
+lima.common.error=Error
+lima.common.filter=Filter
+lima.common.fin=Terminated
+lima.common.globalexception=Global lima exception
+lima.common.label=Label
+lima.common.movmentedfilter=Accounts filtered
+lima.common.next=Next
+lima.common.ok=OK
+lima.common.open=Open
+lima.common.paste=Paste
+lima.common.period=Period
+lima.common.question=Question
+lima.common.quit=Exit
+lima.common.remove=Remove
+lima.common.search=Search
+lima.common.solde=Solde
+lima.common.soldecredit=Credit solde
+lima.common.soldedebit=Debit solde
+lima.common.update=Modify
+lima.config.category.directories=Directories
+lima.config.category.directories.description=Directories used by LIMA
+lima.config.category.other=Other
+lima.config.category.other.description=Other configuration properties
lima.config.configFileName.description=
-lima.config.host.adress=
-lima.config.host.httpport=
-lima.config.locale.description=
+lima.config.host.adress=Host adress
+lima.config.locale.description=Localization used by LIMA
lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=
-lima.createPDF=
-lima.credit=Credit
+lima.config.ui.fullscreen.description=FullScreen
lima.daily=Daily
-lima.date=Date
-lima.debit=Debit
-lima.description=Description
-lima.dialogreport=
-lima.documents=
-lima.documents.html=
+lima.documents=Documents...
lima.entries=Entries
-lima.entries.addtransaction=
-lima.entries.lettering=
-lima.entries.searchtransaction=
-lima.entries.searchunbalancedtransaction=
-lima.entrybook=Entry Book
-lima.entrybook.add=Add Entry Book
-lima.entrybook.code=
-lima.entrybook.label=
-lima.entrybook.type=
-lima.entrybook.type1=
-lima.entrybook.type2=
-lima.entrybook.type3=
-lima.entrybook.type4=
-lima.entrybook.type5=
-lima.enum.comboboxaccount.account=
-lima.enum.comboboxaccount.accountlist=
-lima.enum.comboboxaccount.allaccount=
-lima.enum.comboboxamount.both=
-lima.enum.comboboxamount.credit=
-lima.enum.comboboxamount.debit=
-lima.enum.comboboxentrybook.all=
-lima.enum.comboboxentrybook.select_one=
-lima.enum.comboboxoperator.equal=
-lima.enum.comboboxoperator.inferior=
-lima.enum.comboboxoperator.inferiororequal=
-lima.enum.comboboxoperator.interval=
-lima.enum.comboboxoperator.intervalle=
-lima.enum.comboboxoperator.notequal=
-lima.enum.comboboxoperator.superior=
-lima.enum.comboboxoperator.superiororequal=
-lima.enum.comboboxperiod.date=
-lima.enum.comboboxperiod.financialperiod=
-lima.enum.comboboxperiod.fiscalperiod=
-lima.enum.comboboxperiod.period=
-lima.error=Error
+lima.entries.addEntry=Add entry
+lima.entries.addTransaction=Add transaction
+lima.entries.searchtransaction=Search transaction
+lima.entries.searchunbalancedtransaction=Incorrect transactions
+lima.entries.writetransaction=Write entries
+lima.enum.comboboxaccount.account=Account
+lima.enum.comboboxaccount.accountlist=Account list
+lima.enum.comboboxaccount.allaccount=All accounts
+lima.enum.comboboxentrybook.all=All entrybooks
+lima.enum.comboboxentrybook.select_one=EntryBook
+lima.enum.comboboxoperator.equal=Equal
+lima.enum.comboboxoperator.inferior=Inferior
+lima.enum.comboboxoperator.inferiororequal=Inferior or equal
+lima.enum.comboboxoperator.interval=Inteval
+lima.enum.comboboxoperator.notequal=Not equal
+lima.enum.comboboxoperator.superior=Superior
+lima.enum.comboboxoperator.superiororequal=Superior or equal
+lima.enum.comboboxperiod.date=Date
+lima.enum.comboboxperiod.financialperiod=Financial period
+lima.enum.comboboxperiod.fiscalperiod=Fiscal period
+lima.enum.comboboxperiod.period=Period
lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html>
-lima.error.errorpane.title=Lima error
-lima.export=Export
-lima.export.account=Export PCG
-lima.export.all=Export all datas (XML)
-lima.export.all.csv=Exporter all datas (CSV)
-lima.financialperiod.block=
-lima.financialstament.check=
-lima.financialstatement.accounts=
-lima.financialstatement.check=
-lima.financialstatement.credit=
-lima.financialstatement.creditaccounts=
-lima.financialstatement.debit=
-lima.financialstatement.debitaccounts=
-lima.financialstatement.delete=
-lima.financialstatement.formula=
-lima.financialstatement.header.add=
-lima.financialstatement.headeramount=
-lima.financialstatement.label=
-lima.financialstatement.movement.add=
-lima.financialstatement.provisiondeprecationaccounts=
-lima.financialstatement.subamount=
-lima.fiscalperiod.addFiscalPeriod=
-lima.fiscalperiod.block=
-lima.identity=
-lima.identity.address=
-lima.identity.address2=
-lima.identity.businessNumber=
-lima.identity.city=
-lima.identity.classificationCode=
-lima.identity.contact=
-lima.identity.description=
-lima.identity.email=
-lima.identity.name=
-lima.identity.phoneNumber=
-lima.identity.vatNumber=
-lima.identity.zipCode=
-lima.import=Import
-lima.import.account=Import PCG
-lima.import.all=Import all datas
-lima.import.all.csv=Import all datas (CSV)
-lima.import.all.csv.ebp=Import all datas (EBP)
-lima.import.journal=Import journal
-lima.importexport.accountcharts=
-lima.importexport.all=
-lima.importexport.choiceencoding=
-lima.importexport.csv=
-lima.importexport.ebp=
-lima.importexport.entries=
-lima.importexport.entrybooks=
+lima.financialstatement.accounts=Account list on debit and on credit
+lima.financialstatement.check=Check accounts passing to movement
+lima.financialstatement.creditaccounts=Account credit list
+lima.financialstatement.debitaccounts=Account debit list
+lima.financialstatement.delete=Delete actual financialstatement chart before import new
+lima.financialstatement.header.add=Add category
+lima.financialstatement.headeramount=Calculate amount on header
+lima.financialstatement.label=Label
+lima.financialstatement.movement.add=Add movement
+lima.financialstatement.provisiondeprecationaccounts=Provisions and deprecations accounts list
+lima.financialstatement.subamount=Calculate a subamount
+lima.home.chartaccounts.create=Create accountschart
+lima.home.chartaccounts.modify=Modify accountschart
+lima.home.chartaccounts.nothing=No accountschart
+lima.home.chartaccounts.state1_2=The chart have
+lima.home.chartaccounts.state2_2=accounts
+lima.home.entrybooks.create=Create entrybook
+lima.home.entrybooks.modify=Modifiy entrybook
+lima.home.entrybooks.nothing=No entrybook
+lima.home.entrybooks.state.single=Entrybook is
+lima.home.entrybooks.state1_2.plural=The
+lima.home.entrybooks.state2_2.plural=entrybooks are
+lima.home.fiscalperiod.closed=fiscalperiods closed
+lima.home.fiscalperiod.create=Create fiscalperiod
+lima.home.fiscalperiod.modify=Modify fiscalperiod
+lima.home.fiscalperiod.noopen=No fiscalperiod
+lima.home.fiscalperiod.opened=fiscalperiods open
+lima.home.transaction.balanced=transactions are balanced
+lima.home.transaction.create=Create entries
+lima.home.transaction.modifiy.balanced=Modify entries
+lima.home.transaction.modifiy.unbalanced=Modify incorrect entries
+lima.home.transaction.nothing=No transaction
+lima.home.transaction.unbalanced=transactions are not balanced
+lima.identity=Identity
+lima.identity.address=Address
+lima.identity.address2=Address (next)
+lima.identity.businessNumber=Business number
+lima.identity.city=City
+lima.identity.classificationCode=Classification code
+lima.identity.contact=Contact
+lima.identity.description=Description
+lima.identity.email=Email
+lima.identity.name=Name
+lima.identity.phoneNumber=Phone number
+lima.identity.vatNumber=VAT number
+lima.identity.zipCode=Zip code
+lima.importexport.accountcharts=Accounts chart
+lima.importexport.all=All
+lima.importexport.choiceencoding=Choice encoding
+lima.importexport.csv=Import/Export CSV
+lima.importexport.defaultentrybooks=Defaults entrybooks
+lima.importexport.ebp=Import/Export EBP
+lima.importexport.entries=Entries
lima.importexport.export=Export
-lima.importexport.financialstatements=
+lima.importexport.financialstatements=FinancialStatements chart
lima.importexport.import=Import
-lima.importexport.import.terminated=
-lima.importexport.importcsv=
-lima.importexport.importebp=
-lima.importexport.lima=
-lima.importexport.wait=
+lima.importexport.import.terminated=Import terminated
+lima.importexport.importcsv=Import CSV
+lima.importexport.importebp=Import EBP
+lima.importexport.wait=Job in progress\u2026
lima.init.closed=Lima closed at %1$s
-lima.init.errorclosing=
-lima.lettering.add=
-lima.lettering.entries=
-lima.lettering.from=
-lima.lettering.lettered=
-lima.lettering.letteredall=
-lima.lettering.notlettered=
-lima.lettering.remove=
-lima.lettering.to=
+lima.init.errorclosing=Error during Lima close
lima.menu.file=File
lima.menu.help=Help
lima.menu.help.about=About
@@ -185,115 +168,54 @@
lima.menu.help.i18n.fr=French
lima.menu.help.i18n.uk=English
lima.menu.help.site=WebSite
-lima.menu.window=
-lima.message.help.usage=
-lima.misc.supportemail.description=
-lima.open=Open
+lima.menu.window=Window
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Support email
lima.openejb.remotemode.description=
-lima.opening.accounts=
-lima.opening.entrybook=
-lima.opening.import=
-lima.opening.welcome=
-lima.pdf=
-lima.period.begindate=
-lima.period.create=
-lima.period.enddate=
+lima.opening.accounts=<html><center>No account chart is load<br/>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html>
+lima.opening.entrybook=<html>Tick box to import default accounts chart\:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
+lima.opening.import=Import a CSV Save
+lima.opening.welcome=<html><center>Welcome to Lima<br/>this assistant help you to start your business accounting in the blink of an eye<br/>OR import instantanly your already existing save in CSV format<br/><br/><br/><br/></center></html>
lima.preferences=Preferences
-lima.question=Question
-lima.question.financialperiod.blocked=
-lima.question.fiscalperiod.blocked=
-lima.question.fiscalperiod.morethan12=
-lima.question.load.accounts=There is no existing accounts in Lima. Do you want to load default accounts ?
-lima.question.remove.account=Do you want to remove this account ?
-lima.question.remove.entry=Do you want to remove this entry ?
-lima.question.remove.transaction=Do you want to remove this transaction ?
lima.refresh=\u21BB
-lima.remove=Remove
lima.reports=Reports
lima.reports.accounts=Edit account
lima.reports.balance=Balance
lima.reports.entrybooks=Edit entrybook
-lima.reports.financialstatement=
+lima.reports.financialstatement=Financialstatements
lima.reports.ledger=Ledger
lima.response.no=No
lima.response.yes=Yes
-lima.solde=
-lima.soldecredit=
-lima.soldedebit=
lima.splash.1=Loading services...
lima.splash.2="Loading accounting...
lima.splash.3=Ready \!
lima.structure=Structure
-lima.subledger.code=Code
lima.tab.home=Home
-lima.tab.result=Result
-lima.table.account=
-lima.table.balance=
-lima.table.closure=
-lima.table.code=
-lima.table.credit=
-lima.table.date=
-lima.table.debit=
-lima.table.debitcredit=
-lima.table.description=
-lima.table.entrybook=
-lima.table.fiscalperiod=
-lima.table.grossamount=
-lima.table.label=
-lima.table.letter=
-lima.table.lettering=
-lima.table.move.credit=
-lima.table.move.debit=
-lima.table.netamount=
-lima.table.number=
-lima.table.period=
-lima.table.position=
-lima.table.provisiondeprecationamount=
-lima.table.solde=
-lima.table.solde.credit=
-lima.table.solde.debit=
-lima.table.type=
-lima.table.voucher=
+lima.table.account=Account
+lima.table.balance=Balance
+lima.table.closure=Closed
+lima.table.code=Code
+lima.table.credit=Credit
+lima.table.date=Date
+lima.table.debit=Debit
+lima.table.debitcredit=Debit and credit
+lima.table.description=Description
+lima.table.entrybook=EntryBook
+lima.table.fiscalperiod=Fiscalperiod
+lima.table.grossamount=Gross amount
+lima.table.label=Label
+lima.table.letter=Letter
+lima.table.move.credit=Movmented Credit
+lima.table.move.debit=Movemented Debit
+lima.table.netamount=Net amount
+lima.table.number=Account Number
+lima.table.period=Period
+lima.table.provisiondeprecationamount=Provision & Deprecation
+lima.table.solde=Solder
+lima.table.solde.credit=Credit solde
+lima.table.solde.debit=Debit solde
+lima.table.voucher=Voucher
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=About Lima...
-lima.transaction.confirmdelete=
-lima.transaction.period=Period
-lima.voucher=Voucher
+lima.title.about.description=Open sources accounting software
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
-lima.welcome=
-limahome.chartaccounts.create=
-limahome.chartaccounts.modify=
-limahome.chartaccounts.nothing=
-limahome.chartaccounts.state1_2=
-limahome.chartaccounts.state2_2=
-limahome.chartaccounts1=
-limahome.chartaccounts2=
-limahome.createchartaccounts=
-limahome.createchartaccounts1=
-limahome.createchartaccounts2=
-limahome.entrybooknoopen=
-limahome.entrybooks.create=
-limahome.entrybooks.modify=
-limahome.entrybooks.nothing=
-limahome.entrybooks.state.single=
-limahome.entrybooks.state1_2.plural=
-limahome.entrybooks.state2_2.plural=
-limahome.entrybooks1=
-limahome.entrybooks2=
-limahome.fiscalperiod.closed=
-limahome.fiscalperiod.create=
-limahome.fiscalperiod.modify=
-limahome.fiscalperiod.noopen=
-limahome.fiscalperiod.opened=
-limahome.fiscalperiodclosed=
-limahome.fiscalperiodnoopen=
-limahome.fiscalperiodopened=
-limahome.transaction.balanced=
-limahome.transaction.create=
-limahome.transaction.modifiy=
-limahome.transaction.modifiy.balanced=
-limahome.transaction.modifiy.unbalanced=
-limahome.transaction.nothing=
-limahome.transaction.unbalanced=
-limahome.transactionbalanced=
-limahome.transactionunbalanced=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,94 +1,89 @@
-Confirmation=
-DEBUG\ delete\ all=
-Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
-Global\ lima\ exception=
-lima.about.message=\u00C0 propos de Lima
-lima.account=Compte
-lima.account.label=
-lima.account.number=
-lima.accountsreports.begincalendar=
-lima.accountsreports.endcalendar=
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
lima.action.normalscreen=Ecran normal
lima.action.normalscreen.tip=Revenir en \u00E9cran normal
-lima.add.entry=Ajouter entr\u00E9e
-lima.add.transaction=Ajouter transaction
-lima.amount=Montant
-lima.amountcredit=Total Cr\u00E9dit
-lima.amountdebit=Total D\u00E9bit
lima.charts.account=Plan comptable
+lima.charts.account.addAccount=Ajout Compte G\u00E9n\u00E9ral
+lima.charts.account.addSubLedger=Ajouter Compte Tiers
lima.charts.account.base=Plan comptable de base
lima.charts.account.developed=Plan comptable d\u00E9velopp\u00E9
+lima.charts.account.number=Num\u00E9ro de compte
+lima.charts.account.question.remove=Voulez-vous supprimer ce compte?
lima.charts.account.shortened=Plan comptable abr\u00E9g\u00E9
-lima.charts.entrybook=Journaux
+lima.charts.entrybook.add=Ajouter un journal
+lima.charts.entrybook.confirmation=Do you really want to delete entry book %s ?
lima.charts.entrybook.default=Journaux par d\u00E9fault
lima.charts.entrybook.import=Importer des journaux
lima.charts.financialperiod=P\u00E9riodes comptables
+lima.charts.financialperiod.block=Cloturer une p\u00E9riode
+lima.charts.financialperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette p\u00E9riode ? Cette action est irr\u00E9versible \!
lima.charts.financialstatement=Plan BCR
lima.charts.financialstatement.base=Plan BCR de base
lima.charts.financialstatement.developed=Plan BCR d\u00E9velopp\u00E9
lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.charts.financialstatement.shortened=Plan BCR abr\u00E9g\u00E9
+lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction?
+lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction?
+lima.charts.fiscalperiod.add=Nouvel exercice
+lima.charts.fiscalperiod.block=Cloturer un exercice
+lima.charts.fiscalperiod.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
+lima.charts.fiscalperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette exercice ? Cette action est irr\u00E9versible \!
+lima.charts.fiscalperiod.question.morethan12=La p\u00E9riode s\u00E9lectionn\u00E9e n'est pas de 12 mois, voulez-vous continuer ?
lima.charts.fiscalyear=Exercices
-lima.close=Ferm\u00E9
-lima.common.add=Ajout Compte G\u00E9n\u00E9ral
-lima.common.addSubLedger=Ajouter Compte Tiers
+lima.common.account=Compte
+lima.common.amount=Montant
+lima.common.amountcredit=Total Cr\u00E9dit
+lima.common.amountdebit=Total D\u00E9bit
+lima.common.begindate=D\u00E9but
lima.common.cancel=Annuler
lima.common.close=Fermer
+lima.common.closed=Ferm\u00E9
+lima.common.code=Code
+lima.common.confirmation=Confirmation
lima.common.copy=Copier
+lima.common.enddate=Fin
+lima.common.entrybook=Journal
+lima.common.entrybooks=Journaux
+lima.common.error=Erreur
lima.common.filter=Filtrer
lima.common.fin=Termin\u00E9
-lima.common.importexport=Importer/Exporter
+lima.common.globalexception=Global lima exception
+lima.common.label=Libell\u00E9
lima.common.movmentedfilter=Comptes mouvement\u00E9s
lima.common.next=Suivant
lima.common.ok=OK
+lima.common.open=Ouvert
lima.common.paste=Coller
-lima.common.print=
+lima.common.period=P\u00E9riode
+lima.common.question=Question
lima.common.quit=Quitter
lima.common.remove=Supprimer
lima.common.search=Rechercher
+lima.common.solde=Solde
+lima.common.soldecredit=Solde Cr\u00E9diteur
+lima.common.soldedebit=Solde D\u00E9biteur
lima.common.update=Modifier
lima.config.category.directories=R\u00E9pertoires
lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
lima.config.category.other=Autre
lima.config.category.other.description=Autre propri\u00E9t\u00E9s de configuration
lima.config.configFileName.description=
-lima.config.host.adress=
-lima.config.host.httpport=
+lima.config.host.adress=Adresse du serveur distant
lima.config.locale.description=Locale utilis\u00E9e par l'application
lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=
-lima.createPDF=
-lima.credit=Credit
+lima.config.ui.fullscreen.description=Plein \u00E9cran
lima.daily=Quotidien
-lima.date=Date
-lima.debit=Debit
-lima.description=Description
-lima.dialogreport=
lima.documents=Documents\u0085
lima.entries=Traitement
-lima.entries.addtransaction=Saisir des \u00E9critures
-lima.entries.lettering=Ajouter une lettre
+lima.entries.addEntry=Ajouter entr\u00E9e
+lima.entries.addTransaction=Ajouter transaction
lima.entries.searchtransaction=Rechercher des \u00E9critures
lima.entries.searchunbalancedtransaction=Entr\u00E9es incorrect
-lima.entrybook=Journal
-lima.entrybook.add=Ajouter un journal
-lima.entrybook.code=
-lima.entrybook.label=
-lima.entrybook.type=
-lima.entrybook.type1=Achats
-lima.entrybook.type2=Ventes
-lima.entrybook.type3=Tr\u00E9sorerie
-lima.entrybook.type4=G\u00E9n\u00E9ral
-lima.entrybook.type5=Situation
+lima.entries.writetransaction=Saisir des \u00E9critures
lima.enum.comboboxaccount.account=Compte
lima.enum.comboboxaccount.accountlist=Liste de comptes
lima.enum.comboboxaccount.allaccount=Tous les comptes
-lima.enum.comboboxamount.both=Les deux
-lima.enum.comboboxamount.credit=Cr\u00E9dit
-lima.enum.comboboxamount.debit=D\u00E9bit
lima.enum.comboboxentrybook.all=Tous les journaux
lima.enum.comboboxentrybook.select_one=Journal
lima.enum.comboboxoperator.equal=\u00C9gal
@@ -102,29 +97,40 @@
lima.enum.comboboxperiod.financialperiod=P\u00E9riode Financi\u00E8re
lima.enum.comboboxperiod.fiscalperiod=Exercice
lima.enum.comboboxperiod.period=P\u00E9riode
-lima.error=Erreur
lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
-lima.error.errorpane.title=Lima erreur
-lima.export=Export
-lima.export.account=Exporter le PCG
-lima.export.all=Exporter toutes les donn\u00E9es (XML)
-lima.export.all.csv=Exporter toutes les donn\u00E9es (CSV)
-lima.financialperiod.block=Cloturer une p\u00E9riode
lima.financialstatement.accounts=Liste de comptes au cr\u00E9dit et au d\u00E9bit
lima.financialstatement.check=V\u00E9rification des comptes aux postes
-lima.financialstatement.credit=Sens du poste \: d\u00E9bit
lima.financialstatement.creditaccounts=Liste de comptes au cr\u00E9dit
lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
lima.financialstatement.delete=Supprimer le plan BCR actuel avant d'importer
-lima.financialstatement.formula=Formule de compte, ex \: '7'-'6'+'510-520'
lima.financialstatement.header.add=Ajouter une cat\u00E9gorie
lima.financialstatement.headeramount=Calculer le total en en-tete
lima.financialstatement.label=Libell\u00E9
lima.financialstatement.movement.add=Ajouter un regrouprement
lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
lima.financialstatement.subamount=Calculer un sous-total
-lima.fiscalperiod.addFiscalPeriod=Nouvel exercice
-lima.fiscalperiod.block=Cloturer un exercice
+lima.home.chartaccounts.create=Cr\u00E9er le plan des comptes
+lima.home.chartaccounts.modify=Modifier le plan des comptes
+lima.home.chartaccounts.nothing=Aucun compte \!
+lima.home.chartaccounts.state1_2=Le plan comptable possede
+lima.home.chartaccounts.state2_2=comptes
+lima.home.entrybooks.create=Cr\u00E9er les journaux
+lima.home.entrybooks.modify=Modifier les journaux
+lima.home.entrybooks.nothing=Aucun journal ouvert \!
+lima.home.entrybooks.state.single=Le journal est \:
+lima.home.entrybooks.state1_2.plural=Les
+lima.home.entrybooks.state2_2.plural=journaux sont \:
+lima.home.fiscalperiod.closed=exercices clotur\u00E9s
+lima.home.fiscalperiod.create=Cr\u00E9er un exercice
+lima.home.fiscalperiod.modify=Modifier les exercices
+lima.home.fiscalperiod.noopen=Aucun exercice ouvert \!
+lima.home.fiscalperiod.opened=exercices ouverts
+lima.home.transaction.balanced=transactions, toutes sont \u00E9quilibr\u00E9es
+lima.home.transaction.create=Ajouter des \u00E9critures
+lima.home.transaction.modifiy.balanced=Modifier les \u00E9critures
+lima.home.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrect
+lima.home.transaction.nothing=Aucune \u00E9criture
+lima.home.transaction.unbalanced=transactions ne sont pas \u00E9quilibr\u00E9es \!
lima.identity=Identit\u00E9
lima.identity.address=Adresse
lima.identity.address2=Adresse (suite)
@@ -138,14 +144,13 @@
lima.identity.phoneNumber=n\u00B0 Tel
lima.identity.vatNumber=n\u00B0 TVA
lima.identity.zipCode=Code Postal
-lima.import.journal=Journaux par d\u00E9faut
lima.importexport.accountcharts=Plan des comptes
lima.importexport.all=Tout
lima.importexport.choiceencoding=Choisir encodage \:
lima.importexport.csv=Import/Export CSV
+lima.importexport.defaultentrybooks=Journaux par d\u00E9faut
lima.importexport.ebp=Import/Export EBP
lima.importexport.entries=\u00C9critures
-lima.importexport.entrybooks=Journaux
lima.importexport.export=Export
lima.importexport.financialstatements=Plan BCR
lima.importexport.import=Import
@@ -154,15 +159,7 @@
lima.importexport.importebp=Import EBP
lima.importexport.wait=Traitement en cours \u2026
lima.init.closed=Lima ferm\u00E9 \u00E0 %1$s
-lima.init.errorclosing=
-lima.lettering.add=Ajouter une lettre
-lima.lettering.entries=Op\u00E9ration de saisie
-lima.lettering.from=De
-lima.lettering.lettered=Lettr\u00E9e
-lima.lettering.letteredall=Toutes
-lima.lettering.notlettered=Non lettr\u00E9e
-lima.lettering.remove=Supprimer
-lima.lettering.to=\u00C0
+lima.init.errorclosing=Erreur lors de la fermeture
lima.menu.file=Fichier
lima.menu.help=Aide
lima.menu.help.about=\u00C0 Propos
@@ -172,29 +169,15 @@
lima.menu.help.i18n.uk=Anglais
lima.menu.help.site=Acc\u00E9der au site de Lima
lima.menu.window=Fen\u00EAtre
-lima.message.help.usage=
-lima.misc.supportemail.description=
-lima.open=Ouvert
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Adresse email de support
lima.openejb.remotemode.description=
lima.opening.accounts=<html><center>Aucun plan comptable charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.opening.entrybook=<html>Cochez la case pour importer les journaux par d\u00E9faut \:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
lima.opening.import=Importer une sauvegarde CSV
lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour d\u00E9marrer votre comptabilit\u00E9 en quelques instants\u0085<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
-lima.pdf=
-lima.period.begindate=D\u00E9but
-lima.period.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
-lima.period.enddate=Fin
lima.preferences=Pr\u00E9f\u00E9rences
-lima.question=Question
-lima.question.financialperiod.blocked=
-lima.question.fiscalperiod.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette exercice ? Cette action est irr\u00E9versible \!
-lima.question.fiscalperiod.morethan12=La p\u00E9riode s\u00E9lectionner n'est pas de 12 mois, voulez-vous continuer ?
-lima.question.load.accounts=Il n'y a aucun plan comptable existant dans Lima. Voulez-vous en charger un par d\u00E9faut ?
-lima.question.remove.account=Voulez-vous supprimer ce compte?
-lima.question.remove.entry=Voulez-vous supprimer cette ligne de transaction?
-lima.question.remove.transaction=Voulez-vous supprimer cette transaction?
lima.refresh=\u21BB
-lima.remove=
lima.reports=Rapports
lima.reports.accounts=Edition compte
lima.reports.balance=Balance
@@ -203,16 +186,11 @@
lima.reports.ledger=Grand Livre
lima.response.no=Non
lima.response.yes=Oui
-lima.solde=Solde
-lima.soldecredit=Solde Cr\u00E9diteur
-lima.soldedebit=Solde D\u00E9biteur
lima.splash.1=Chargement des services...
lima.splash.2=Chargement de la comptabilit\u00E9
lima.splash.3=Application pr\u00EAte \!
lima.structure=Structure
-lima.subledger.code=Code
lima.tab.home=Accueil
-lima.tab.result=
lima.table.account=Compte
lima.table.balance=Balance
lima.table.closure=Cloture
@@ -227,44 +205,17 @@
lima.table.grossamount=Brut
lima.table.label=Libell\u00E9
lima.table.letter=Lettre
-lima.table.lettering=
lima.table.move.credit=Mouvement au cr\u00E9dit
lima.table.move.debit=Mouvement au d\u00E9bit
lima.table.netamount=Net
-lima.table.number=Num\u00E9ro du compte
+lima.table.number=Num\u00E9ro de compte
lima.table.period=P\u00E9riode
-lima.table.position=Statut
lima.table.provisiondeprecationamount=Amortissements et provisions
lima.table.solde=Solde
lima.table.solde.credit=Solde cr\u00E9dit
lima.table.solde.debit=Solde d\u00E9bit
-lima.table.type=Type
lima.table.voucher=Pi\u00E8ce comptable
lima.title=Lutin Invoice Monitoring and Accounting
-lima.title.about=A propos de Lima...
-lima.transaction.confirmdelete=
-lima.transaction.period=P\u00E9riode
-lima.voucher=Document
+lima.title.about=\u00C0 propos de Lima...
+lima.title.about.description=Logiciel de comptabilit\u00E9 Libre
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
-limahome.chartaccounts.create=Cr\u00E9er le plan des comptes
-limahome.chartaccounts.modify=Modifier le plan des comptes
-limahome.chartaccounts.nothing=Aucun compte \!
-limahome.chartaccounts.state1_2=Le plan comptable possede
-limahome.chartaccounts.state2_2=comptes
-limahome.entrybooks.create=Cr\u00E9er les journaux
-limahome.entrybooks.modify=Modifier les journaux
-limahome.entrybooks.nothing=Aucun journal ouvert \!
-limahome.entrybooks.state.single=Le journal est \:
-limahome.entrybooks.state1_2.plural=Les
-limahome.entrybooks.state2_2.plural=journaux sont \:
-limahome.fiscalperiod.closed=exercices clotur\u00E9s
-limahome.fiscalperiod.create=Cr\u00E9er un exercice
-limahome.fiscalperiod.modify=Modifier les exercices
-limahome.fiscalperiod.noopen=Aucun exercice ouvert \!
-limahome.fiscalperiod.opened=exercices ouverts
-limahome.transaction.balanced=transactions, toutes sont \u00E9quilibr\u00E9es
-limahome.transaction.create=Ajouter des \u00E9critures
-limahome.transaction.modifiy.balanced=Modifier les \u00E9critures
-limahome.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrect
-limahome.transaction.nothing=Aucune \u00E9criture
-limahome.transaction.unbalanced=\u00E9critures ne sont pas \u00E9quilibr\u00E9es \!
Deleted: trunk/lima-swing/src/main/resources/images/logo-codelutin.png
===================================================================
(Binary files differ)
Added: trunk/lima-swing/src/main/resources/images/puzzle_icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/images/puzzle_icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/lima-swing/src/main/resources/images/splash.png
===================================================================
(Binary files differ)
1
0
Aug. 23, 2010
Author: jpepin
Date: 2010-08-23 11:35:53 +0200 (Mon, 23 Aug 2010)
New Revision: 3014
Url: http://chorem.org/repositories/revision/lima/3014
Log:
Ajout dans les rapports choix de s?\195?\169lection de la p?\195?\169riod.
Ajout nouveau splash-screen puzzle.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
trunk/lima-swing/src/main/resources/images/puzzle_splash.png
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -154,6 +154,7 @@
// update splash
LimaSplash splash = new LimaSplash();
splash.initSplash(config.getVersion());
+ splash.updateProgression(0.1, _("lima.splash.1"));
// do init ui
MainViewHandler uiHandler = context.getContextValue(MainViewHandler.class);
@@ -165,7 +166,7 @@
// load accounts and test if there is an account plan defined
// if not, call #loadDefaultAccount()
- splash.updateProgression(0.5, _("Loading accounting..."));
+ splash.updateProgression(0.5, _("lima.splash.2"));
//start http server
LimaServiceFactory.getInstance().getService(HttpServerServiceMonitorable.class).start();
@@ -184,7 +185,7 @@
openingView.setLocationRelativeTo(null);
openingView.setVisible(true);
}
-
+ splash.updateProgression(0.5, _("lima.splash.3"));
// show ui
SwingUtilities.invokeLater(new Runnable() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -20,6 +20,7 @@
import java.awt.AlphaComposite;
import java.awt.Color;
+import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.SplashScreen;
@@ -69,7 +70,7 @@
public void initSplash(String version) {
if (splashGraphics != null) {
splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawString("Version : " + version, 300, 90);
+ splashGraphics.drawString("Version : " + version, 394, 42);
}
else {
if (log.isWarnEnabled()) {
@@ -89,16 +90,18 @@
public void updateProgression(double progress, String message) {
if (splashGraphics != null) {
- splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawRect(50, 130, 300, 10);
- splashGraphics.fillRect(50, 130, (int)(300.0 * progress), 10);
+ splashGraphics.setColor(Color.GRAY);
+ splashGraphics.drawRect(65, 253, 300, 10);
+ splashGraphics.fillRect(65, 253, (int)(300.0 * progress), 10);
if (message != null) {
splashGraphics.setComposite(AlphaComposite.Clear);
- splashGraphics.fillRect(50,150, 200, 40);
+ splashGraphics.fillRect(65, 238, 300, 15);
splashGraphics.setPaintMode();
- splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawString(message + "...", 50, 160);
+ splashGraphics.setColor(new Color(255, 210, 55));
+ Font font = new Font("Lucida Sans", Font.BOLD, 14);
+ splashGraphics.setFont(font);
+ splashGraphics.drawString(message + "...", 65, 248);
}
splash.update();
Added: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,61 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.enums;
+
+import static org.nuiton.i18n.I18n._;
+
+
+public enum ComboBoxDatesEnum {
+
+ FISCAL_PERIOD(_("lima.enum.comboboxperiod.fiscalperiod")),
+ FINANCIAL_PERIOD(_("lima.enum.comboboxperiod.financialperiod")),
+ PERIOD(_("lima.enum.comboboxperiod.period"));
+
+ private final String description;
+
+ private ComboBoxDatesEnum(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public static String[] descriptions(){
+ int nbElts = ComboBoxDatesEnum.values().length;
+ String[] descriptions = new String[nbElts];
+ ComboBoxDatesEnum[] enums = ComboBoxDatesEnum.values();
+ for (int i = 0; i < nbElts; i++) {
+ descriptions[i] = enums[i].getDescription();
+ }
+ return descriptions;
+ }
+
+ public static ComboBoxDatesEnum valueOfDescription(String description){
+ ComboBoxDatesEnum value = null;
+
+ for (ComboBoxDatesEnum enums : ComboBoxDatesEnum.values()) {
+ if (description.equals(enums.description)){
+ value = enums;
+ break;
+ }
+ }
+ return value;
+ }
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.accountsreports;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class AccountsReportsPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(AccountsReportsPeriodSearchPanel.class);
+
+ protected AccountsReportsViewHandler handler;
+
+ public AccountsReportsPeriodSearchPanel(AccountsReportsViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -22,47 +22,22 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.Account;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ AccountsReportsPeriodSearchPanel periodSearchPanel = new AccountsReportsPeriodSearchPanel(handler);
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- getHandler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- getHandler().setEndDate(endDate);
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
-
void $afterCompleteSetup() {
- //getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel id="accountSelectorLabel" text="lima.account"/>
</cell>
<cell anchor="west">
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,153 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.balance;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class BalancePeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(BalancePeriodSearchPanel.class);
+
+ protected BalanceViewHandler handler;
+
+ public BalancePeriodSearchPanel(BalanceViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -22,48 +22,23 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.Account;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
-
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ BalancePeriodSearchPanel periodSearchPanel = new BalancePeriodSearchPanel(handler);
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
- getHandler().setBeginDate(beginDate);
- getHandler().setEndDate(endDate);
-
void $afterCompleteSetup() {
- getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><BalancePeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.entrybooksreports;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class EntryBooksReportsPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(EntryBooksReportsPeriodSearchPanel.class);
+
+ protected EntryBooksReportsViewHandler handler;
+
+ public EntryBooksReportsPeriodSearchPanel(EntryBooksReportsViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -23,47 +23,22 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.EntryBook;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ EntryBooksReportsPeriodSearchPanel periodSearchPanel = new EntryBooksReportsPeriodSearchPanel(handler);
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- getHandler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- getHandler().setEndDate(endDate);
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
-
void $afterCompleteSetup() {
- //getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><EntryBooksReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel id="entryBookSelectorLabel" text="lima.entrybook"/>
</cell>
<cell anchor="west">
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialstatementreport;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class FinancialStatementReportPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(FinancialStatementReportPeriodSearchPanel.class);
+
+ protected FinancialStatementReportViewHandler handler;
+
+ public FinancialStatementReportPeriodSearchPanel(FinancialStatementReportViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.model.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.model.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.model.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.model.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.model.setBeginDate(fPeriod.getBeginDate());
+ handler.model.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.model.setBeginDate(fPeriod.getBeginDate());
+ handler.model.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -19,25 +19,15 @@
package org.chorem.lima.ui.financialtransaction;
import static org.nuiton.i18n.I18n._;
-
import java.awt.Color;
import java.awt.Component;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.util.Date;
-import java.util.concurrent.ExecutionException;
-
import javax.swing.SwingWorker;
-import javax.swing.table.TableColumn;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
@@ -45,7 +35,6 @@
import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
import org.chorem.lima.ui.celleditor.DateTableCellEditor;
import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
-import org.chorem.lima.util.DialogHelper;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
import org.jdesktop.swingx.decorator.ComponentAdapter;
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java (from rev 3007, trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,169 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxPeriodEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class FinancialTransactionPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(FinancialTransactionPeriodSearchPanel.class);
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public FinancialTransactionPeriodSearchPanel(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxPeriodEnum.PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxPeriodEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case DATE:
+ Calendar calendar = Calendar.getInstance();
+ Date date = calendar.getTime();
+ date = DateUtils.truncate(date, Calendar.DATE);
+ final JXDatePicker datePicker = new JXDatePicker(date);
+ ActionListener dateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(datePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(datePicker.getDate());
+ handler.setEndDate(null);
+ handler.refresh();
+ datePicker.addActionListener(dateActionListener);
+ this.removeAll();
+ this.add(datePicker);
+ break;
+
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -20,8 +20,6 @@
import java.awt.Color;
import java.awt.Component;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import java.math.BigDecimal;
import java.util.Date;
import org.chorem.lima.entity.Account;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -30,7 +30,7 @@
AccountSearchPanel accountSearchPanel = new AccountSearchPanel(handler);
AmountSearchPanel amountSearchPanel = new AmountSearchPanel(handler);
EntryBookSearchPanel entryBookSearchPanel = new EntryBookSearchPanel(handler);
- PeriodSearchPanel periodSearchPanel = new PeriodSearchPanel(handler);
+ FinancialTransactionPeriodSearchPanel periodSearchPanel = new FinancialTransactionPeriodSearchPanel(handler);
void $afterCompleteSetup() {
handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription(
@@ -47,7 +47,7 @@
<cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxPeriodEnum.descriptions())"
onActionPerformed="periodSearchPanel.refresh(ComboBoxPeriodEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
- <cell><PeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ <cell><FinancialTransactionPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
</row></Table></cell>
</row>
<row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -18,23 +18,18 @@
package org.chorem.lima.ui.financialtransactionsearch;
-import java.util.ArrayList;
import java.util.Date;
-import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.beans.FinancialTransactionSearchImpl;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
-import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.util.ErrorHelper;
/**
* Handler associated with financial transaction view.
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -1,169 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.ui.financialtransactionsearch;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Calendar;
-import java.util.Date;
-import static org.nuiton.i18n.I18n._;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.enums.ComboBoxPeriodEnum;
-import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
-import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
-import org.jdesktop.swingx.JXDatePicker;
-
-public class PeriodSearchPanel extends JPanel {
-
- private static final Log log =
- LogFactory.getLog(PeriodSearchPanel.class);
-
- protected FinancialTransactionSearchViewHandler handler;
-
- public PeriodSearchPanel(FinancialTransactionSearchViewHandler handler) {
- this.handler = handler;
-
- //init date
- refresh(ComboBoxPeriodEnum.PERIOD);
- }
-
- static final long serialVersionUID = 1L;
-
- public void refresh(ComboBoxPeriodEnum comboBoxPeriodEnum){
-
- switch (comboBoxPeriodEnum) {
- case DATE:
- Calendar calendar = Calendar.getInstance();
- Date date = calendar.getTime();
- date = DateUtils.truncate(date, Calendar.DATE);
- final JXDatePicker datePicker = new JXDatePicker(date);
- ActionListener dateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setBeginDate(datePicker.getDate());
- handler.refresh();
- }
- };
- handler.setBeginDate(datePicker.getDate());
- handler.setEndDate(null);
- handler.refresh();
- datePicker.addActionListener(dateActionListener);
- this.removeAll();
- this.add(datePicker);
- break;
-
- case PERIOD:
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- //handler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- //handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
- final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
- ActionListener beginDateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setBeginDate(beginDatePicker.getDate());
- handler.refresh();
- }
- };
- handler.setBeginDate(beginDatePicker.getDate());
- beginDatePicker.addActionListener(beginDateActionListener);
-
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
- final JXDatePicker endDatePicker = new JXDatePicker(endDate);
- ActionListener endDateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setEndDate(endDatePicker.getDate());
- handler.refresh();
- }
- };
- handler.setEndDate(endDatePicker.getDate());
- endDatePicker.addActionListener(endDateActionListener);
- handler.refresh();
-
- this.removeAll();
- this.add(beginDateLabel);
- this.add(beginDatePicker);
- this.add(endDateLabel);
- this.add(endDatePicker);
- break;
-
- case FISCAL_PERIOD:
- FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
- FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
- final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
- fiscalPeriod.setRenderer(fiscalRenderer);
- fiscalPeriod.setEditable(false);
- ActionListener fiscalPeriodActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
- handler.setBeginDate(fPeriod.getBeginDate());
- handler.setEndDate(fPeriod.getEndDate());
- handler.refresh();
- }
- };
- fiscalPeriod.addActionListener(fiscalPeriodActionListener);
-
- this.removeAll();
- this.add(fiscalPeriod);
- break;
-
- case FINANCIAL_PERIOD:
- FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
- FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
- final JComboBox financialPeriod = new JComboBox(financialModel);
- financialPeriod.setRenderer(financialRenderer);
- financialPeriod.setEditable(false);
- ActionListener financialPeriodActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
- handler.setBeginDate(fPeriod.getBeginDate());
- handler.setEndDate(fPeriod.getEndDate());
- handler.refresh();
- }
- };
- financialPeriod.addActionListener(financialPeriodActionListener);
- this.removeAll();
- this.add(financialPeriod);
- break;
- }
-
- }
-
-}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.ledger;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class LedgerPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(LedgerPeriodSearchPanel.class);
+
+ protected LedgerViewHandler handler;
+
+ public LedgerPeriodSearchPanel(LedgerViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -22,47 +22,22 @@
<org.chorem.lima.ui.ledger.LedgerTableModel id="modelTable"/>
<script>
<![CDATA[
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ LedgerPeriodSearchPanel periodSearchPanel = new LedgerPeriodSearchPanel(handler);
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
-
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- getHandler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- getHandler().setEndDate(endDate);
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
-
void $afterCompleteSetup() {
- getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><LedgerPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-23 09:35:53 UTC (rev 3014)
@@ -2,12 +2,6 @@
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
-LIMA=
-Loading\ accounting...=
-blabla=
-export=
-hello\ world=
-import=
lima.about.message=
lima.account=Account
lima.account.label=Label
@@ -226,6 +220,9 @@
lima.solde=
lima.soldecredit=
lima.soldedebit=
+lima.splash.1=Loading services...
+lima.splash.2="Loading accounting...
+lima.splash.3=Ready \!
lima.structure=Structure
lima.subledger.code=Code
lima.tab.home=Home
@@ -300,4 +297,3 @@
limahome.transaction.unbalanced=
limahome.transactionbalanced=
limahome.transactionunbalanced=
-update=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 09:35:53 UTC (rev 3014)
@@ -2,10 +2,6 @@
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
-LIMA=
-Loading\ accounting...=
-export=
-hello\ world=
lima.about.message=\u00C0 propos de Lima
lima.account=Compte
lima.account.label=
@@ -210,6 +206,9 @@
lima.solde=Solde
lima.soldecredit=Solde Cr\u00E9diteur
lima.soldedebit=Solde D\u00E9biteur
+lima.splash.1=Chargement des services...
+lima.splash.2=Chargement de la comptabilit\u00E9
+lima.splash.3=Application pr\u00EAte \!
lima.structure=Structure
lima.subledger.code=Code
lima.tab.home=Accueil
@@ -269,4 +268,3 @@
limahome.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrect
limahome.transaction.nothing=Aucune \u00E9criture
limahome.transaction.unbalanced=\u00E9critures ne sont pas \u00E9quilibr\u00E9es \!
-update=
Added: trunk/lima-swing/src/main/resources/images/puzzle_splash.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/images/puzzle_splash.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
Aug. 22, 2010
Author: jpepin
Date: 2010-08-22 21:14:52 +0200 (Sun, 22 Aug 2010)
New Revision: 3013
Url: http://chorem.org/repositories/revision/lima/3013
Log:
Fonction recherche des ?\195?\169critures : affichage couple entr?\195?\169es/transactions ?\195?\169ditables
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/assembly/bin.xml
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -20,12 +20,14 @@
package org.chorem.lima.business.ejb;
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
@@ -590,44 +592,48 @@
@Override
- public List<Entry> searchEntry(Date beginDate, Date endDate, String voucher,
- String description, String letter, String accountsList,
- Account account, EntryBook entryBook,
- FinancialStatementWayEnum fStWayEnum, String operator,
- String amount, String amount2) throws LimaException {
- List<Entry> entries = null;
+ public List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException {
+ List<Object> result = new ArrayList<Object>();
+ List<FinancialTransaction> financialTransactions = null;
TopiaContext topiaContext = null;
try {
topiaContext = beginTransaction();
- EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
- TopiaQuery query = entryDAO.createQuery();
- String dateProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.TRANSACTION_DATE);
- String entryBookProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK);
- String entryBookLabelProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK, EntryBook.LABEL);
- String accountProperty = TopiaQuery.getProperty(Entry.ACCOUNT, Account.ACCOUNT_NUMBER);
+ FinancialTransactionDAO financialTransactionDAO =
+ LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaContext);
+ TopiaQuery query = financialTransactionDAO.createQuery("T");
+
+ String dateProperty = TopiaQuery.getProperty(FinancialTransaction.TRANSACTION_DATE);
+ String accountNumberProperty = TopiaQuery.getProperty(Entry.ACCOUNT, Account.ACCOUNT_NUMBER);
+ query.addDistinct();
+ query.addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true);
//Load for lazy
- query.addLoad(dateProperty)
- .addLoad(entryBookLabelProperty)
- .addLoad(accountProperty);
+ query.addLoad(FinancialTransaction.FINANCIAL_PERIOD);
+ Date beginDate = financialTransactionSearch.getBeginDate();
+ Date endDate = financialTransactionSearch.getEndDate();
if (beginDate != null && endDate != null){
query.addBetween(dateProperty, beginDate, endDate);
}
else if (beginDate != null){
query.addEquals(dateProperty, beginDate);
}
+ String voucher = financialTransactionSearch.getVoucher();
if (voucher != null){
- query.addWhere(Entry.VOUCHER, Op.LIKE, "%"+voucher+"%");
+ query.addWhere("E.voucher", Op.LIKE, "%"+voucher+"%");
}
+ String description = financialTransactionSearch.getDescription();
if (description != null){
- query.addWhere(Entry.DESCRIPTION, Op.LIKE, "%"+description+"%");
+ query.addWhere("E.description", Op.LIKE, "%"+description+"%");
}
+ String letter = financialTransactionSearch.getLetter();
if (letter != null){
- query.addWhere(Entry.LETTERING, Op.LIKE, "%"+letter+"%");
+ query.addWhere("E.lettering", Op.LIKE, "%"+letter+"%");
}
+ Account account = financialTransactionSearch.getAccount();
+ String accountsList = financialTransactionSearch.getAccountList();
if (account != null){
- query.addEquals(Entry.ACCOUNT, account);
+ query.addEquals("E.account", account);
}
else if (accountsList != null){
AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
@@ -642,33 +648,51 @@
}
}
if (accounts.size() > 0){
- query.addWhere(accountProperty + " in (" + accountNumbers + ")");
+ query.addWhere("E."+accountNumberProperty + " in (" + accountNumbers + ")");
}
}
+ EntryBook entryBook = financialTransactionSearch.getEntryBook();
+ String amount = financialTransactionSearch.getAmount();
+ String amount2 = financialTransactionSearch.getAmount2();
+ String operator = financialTransactionSearch.getOperator();
+ FinancialStatementWayEnum fStWayEnum = financialTransactionSearch.getAmountWayEnum();
if (entryBook != null){
- query.addEquals(entryBookProperty, entryBook);
+ query.addEquals("T."+FinancialTransaction.ENTRY_BOOK, entryBook);
}
- else if (amount != null){
+ if (amount != null){
if (amount2 != null){
BigDecimal value1 = new BigDecimal(amount);
BigDecimal value2 = new BigDecimal(amount2);
- query.addBetween(Entry.AMOUNT, value1, value2);
+ query.addBetween("E.amount", value1, value2);
}
else if (operator != null) {
- query.addWhere(Entry.AMOUNT+" "+operator+" "+amount);
+ query.addWhere("E.amount"+" "+operator+" "+amount);
}
switch (fStWayEnum) {
case CREDIT:
- query.addEquals(Entry.DEBIT, false);
+ query.addEquals("E.debit", false);
break;
case DEBIT:
- query.addEquals(Entry.DEBIT, true);
+ query.addEquals("E.debit", true);
break;
}
}
log.debug(query);
- entries = entryDAO.findAllByQuery(query);
+ financialTransactions = financialTransactionDAO.findAllByQuery(query);
+ log.debug(financialTransactions);
+
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ for (FinancialTransaction financialTransaction : financialTransactions) {
+ result.add(financialTransaction);
+
+ TopiaQuery query2 = entryDAO.createQuery();
+ query2.addEquals(Entry.FINANCIAL_TRANSACTION, financialTransaction);
+ //Load for lazy
+ query2.addLoad(Entry.ACCOUNT);
+ List<Entry> entries = entryDAO.findAllByQuery(query2);
+ result.addAll(entries);
+ }
}
catch (TopiaException ex) {
doCatch(topiaContext, ex, log);
@@ -676,7 +700,7 @@
finally {
doFinally(topiaContext, log);
}
- return entries;
+ return result;
}
protected TopiaContext beginTransaction() throws TopiaException {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -68,7 +68,7 @@
protected int port;
- private static SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd");
+ private static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd");
public HttpServerServiceImpl() {
path = LimaConfig.getInstance().getReportsDir();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -41,7 +41,7 @@
public interface FinancialPeriodServiceLocal extends FinancialPeriodService {
void createFinancialPeriodsWithTransaction(List<FinancialPeriod> financialPeriods, TopiaContext topiaContext) throws LimaException;
- public void blockClosedPeriodicEntryBookWithTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException;
+ void blockClosedPeriodicEntryBookWithTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -19,13 +19,10 @@
package org.chorem.lima.business.ejbinterface;
-import java.util.Date;
import java.util.List;
-import java.util.Set;
import javax.ejb.Remote;
-import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
@@ -82,5 +79,5 @@
void removeEntry(Entry entry) throws LimaException;
- List<Entry> searchEntry(Date beginDate, Date endDate, String voucher, String description, String letter, String accountsList, Account account, EntryBook entryBook, FinancialStatementWayEnum fStWayEnum, String operator, String amount, String amount2) throws LimaException;
+ List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
}
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/assembly/bin.xml
===================================================================
--- trunk/lima-swing/src/main/assembly/bin.xml 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/assembly/bin.xml 2010-08-22 19:14:52 UTC (rev 3013)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
<id>bin</id>
<formats>
<format>zip</format>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -19,21 +19,16 @@
package org.chorem.lima.ui.financialtransactionsearch;
import static org.nuiton.i18n.I18n._;
-
import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.Date;
import java.util.List;
-import java.util.Set;
-
import javax.swing.table.AbstractTableModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
-import org.chorem.lima.business.utils.EntryComparator;
+import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
@@ -57,8 +52,7 @@
* Last update : $Date: 2010-05-14 13:22:26 +0200 (ven. 14 mai 2010) $
* By : $Author: jpepin $
*/
-public class FinancialTransactionSearchTableModel extends AbstractTableModel {
-
+public class FinancialTransactionSearchTableModel extends AbstractTableModel implements ServiceListener{
/** serialVersionUID. */
private static final long serialVersionUID = 3914954536809622358L;
@@ -67,15 +61,67 @@
private static final Log log = LogFactory
.getLog(FinancialTransactionSearchTableModel.class);
+ /** Transaction service. */
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
+ /** selected financial period */
+ protected FiscalPeriod selectedFiscalPeriod;
+
/** data cache */
- protected List<Entry> cacheDataList;
+ protected FinancialTransactionSearch financialTransactionSearch;
+ protected List<Object> cacheDataList;
+
- public void refresh(List<Entry> objects){
- cacheDataList = objects;
+ /**
+ * Model constructor.
+ *
+ * Just init service proxies.
+ */
+ public FinancialTransactionSearchTableModel() {
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
+ }
+
+ /**
+ * Le model est une combinaison de Transaction/Entries.
+ *
+ *
+ * @return
+ */
+ protected List<Object> getDataList(FinancialTransactionSearch financialTransactionSearch) {
+ List<Object> results = null;
+ //prevent to much result
+ if (financialTransactionSearch != null && (financialTransactionSearch.getVoucher() != null || financialTransactionSearch.getDescription() != null
+ || financialTransactionSearch.getLetter() != null || financialTransactionSearch.getAccountList() != null
+ || financialTransactionSearch.getAccount() != null || financialTransactionSearch.getEntryBook() != null
+ || (financialTransactionSearch.getAmount() != null && financialTransactionSearch.getOperator() != null)
+ || (financialTransactionSearch.getAmount() != null && financialTransactionSearch.getAmount2() != null))){
+ try {
+ results = financialTransactionService.searchFinancialTransaction(financialTransactionSearch);
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.debug("Can't update model", eee);
+ }
+
+ ErrorHelper.showErrorDialog("Can't get transaction list", eee);
+ }
+ }
+
+ return results;
+ }
+
+
+ protected void refresh(FinancialTransactionSearch financialTransactionSearch) {
+ this.financialTransactionSearch = financialTransactionSearch;
+ cacheDataList = getDataList(financialTransactionSearch);
fireTableDataChanged();
}
+
@Override
public int getColumnCount() {
return 9;
@@ -174,67 +220,253 @@
// just prevent too much result
if (cacheDataList != null) {
- Entry currentRow = cacheDataList.get(row);
-
+ result = cacheDataList.get(row);
+
+ if (result instanceof FinancialTransaction) {
+ FinancialTransaction currentRow = (FinancialTransaction)result;
+ BigDecimal amountDebit = currentRow.getAmountDebit();
+ BigDecimal amountCredit = currentRow.getAmountCredit();
+
switch (column) {
case 0:
- result = currentRow.getFinancialTransaction().getTransactionDate();
+ result = currentRow.getTransactionDate();
break;
case 1:
- EntryBook entryBook =
- currentRow.getFinancialTransaction().getEntryBook();
- if (entryBook != null){
- result = entryBook.getCode();
+ if (currentRow.getEntryBook() != null){
+ result = currentRow.getEntryBook().getCode();
}
else {
result = null;
}
break;
case 2:
- result = currentRow.getVoucher();
+ result = null; //entrybook
break;
+ case 3:
+ result = null; // account
+ break;
+ case 4:
+ result = null; // description
+ break;
+ case 5 :
+ result = amountDebit;
+ break;
+ case 6:
+ result = amountCredit;
+ break;
+ case 7:
+ result = amountDebit.subtract(amountCredit);
+ break;
+ case 8:
+ result = null;
+ break;
+ }
+ }
+ else if (result instanceof Entry) {
+ Entry currentEntry = (Entry)result;
+ switch (column) {
+ case 0:
+ result = null; // date
+ break;
+ case 1 : // entry book
+ result = null;
+ break;
+ case 2:
+ result = currentEntry.getVoucher();
+ break;
case 3: // account
- Account account = currentRow.getAccount();
- if (account != null){
- result = account.getAccountNumber();
+ if (currentEntry.getAccount() != null){
+ result = currentEntry.getAccount().getAccountNumber();
}
else {
result = null;
}
break;
case 4:
- result = currentRow.getDescription();
+ result = currentEntry.getDescription();
break;
case 5 :
- result = currentRow.getDebit() ? currentRow.getAmount() : 0;
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
case 6:
- result = currentRow.getDebit() ? 0 : currentRow.getAmount();
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
break;
case 7:
- result = null; // balance
+ result = null;
break;
case 8:
- result = currentRow.getLettering();
+ result = currentEntry.getLettering();
break;
}
}
+ }
return result;
}
+ public void setFiscalPeriod(FiscalPeriod fiscalPeriod){
+ selectedFiscalPeriod = fiscalPeriod;
+ }
+ /**
+ * To set cells editable or not
+ * different condition for entry or financial transaction
+ */
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
-
- return false;
+ boolean editableCell=false;
+ Object currentRow = cacheDataList.get(rowIndex);
+ // cells editable for the entry row, all cells exclude the date
+ if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1))) {
+ editableCell=true;
+ }
+ // cells editable for the financialtransaction row, no cells exclude the date
+ if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1))){
+ editableCell=true;
+ }
+ return editableCell;
}
+
+ /**
+ * @throws LimaException
+ */
+ public void addEmptyEntry(Object value, int row) throws LimaException {
+ FinancialTransaction currentTransaction = null;
+ Object currentRow = cacheDataList.get(row);
+ Entry entry = new EntryImpl();
+ entry.setAmount(new BigDecimal(0));
+ //check if current row is a transaction or an entry
+ if (currentRow instanceof FinancialTransaction) {
+ currentTransaction = (FinancialTransaction)currentRow;
+ }
+ else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ //get back the parent transaction of the entry
+ currentTransaction = currentEntry.getFinancialTransaction();
+ }
+ //create it
+ entry.setFinancialTransaction(currentTransaction);
+ financialTransactionService.createEntry(entry);
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+
+ /**
+ * to modifiy financialtransaction or entry
+ */
+ @Override
+ public void setValueAt(Object value, int row, int column) {
+ int financialTransactionRow = 0;
+ // just prevent too much result
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof FinancialTransaction) {
+ FinancialTransaction currentFinancialTransaction =
+ (FinancialTransaction)currentRow;
+ switch (column) {
+ case 0:
+ //update
+ currentFinancialTransaction.setTransactionDate((Date)value);
+ break;
+ case 1 :
+ currentFinancialTransaction.setEntryBook((EntryBook)value);
+ break;
+ }
+ // notify service for modification
+ try {
+ financialTransactionService.
+ updateFinancialTransaction(currentFinancialTransaction);
+ } catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't update financial transaction", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ //update the financial transaction in entire
+ financialTransactionRow =
+ cacheDataList.indexOf(((FinancialTransaction) currentRow));
+ }
+ else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ switch (column) {
+ case 2 :
+ currentEntry.setVoucher((String)value);
+ break;
+ case 3:
+ currentEntry.setAccount((Account)value);
+ break;
+ case 4:
+ currentEntry.setDescription((String)value);
+ break;
+ case 5 :
+ currentEntry.setAmount((BigDecimal)value);
+ currentEntry.setDebit(true);
+ break;
+ case 6:
+ currentEntry.setAmount((BigDecimal)value);
+ currentEntry.setDebit(false);
+ break;
+ case 8:
+ currentEntry.setLettering((String)value);
+ break;
+ }
+ try {
+ financialTransactionService.updateEntry(currentEntry);
+ } catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't update entry", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ //update the financial transaction in entire
+ financialTransactionRow =
+ cacheDataList.indexOf(((Entry) currentRow).
+ getFinancialTransaction());
+ }
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+
public Object getElementAt(int row){
-
Object currentRow = cacheDataList.get(row);
return currentRow;
}
-
+
+
+ /**
+ * Delete selected row in table (could be transaction or entry).
+ *
+ * Called by model.
+ * @param Object, int
+ * @throws LimaException
+ */
+ public void removeObject(Object object, int row) throws LimaException {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof FinancialTransaction) {
+ FinancialTransaction currentTransaction =
+ (FinancialTransaction)currentRow;
+ financialTransactionService.removeFinancialTransaction(currentTransaction);
+ }
+ else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ financialTransactionService.removeEntry(currentEntry);
+ }
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if ((serviceName.contains("FinancialTransaction") || methodeName.contains("importEntries")
+ || methodeName.contains("importAll")) && !methodeName.contains("search")){
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+ }
+
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -18,11 +18,14 @@
package org.chorem.lima.ui.financialtransactionsearch;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
+import org.chorem.lima.beans.FinancialTransactionSearchImpl;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
@@ -59,19 +62,8 @@
/** Transaction service. */
protected final FinancialTransactionService financialTransactionService;
- protected Date beginDate;
- protected Date endDate;
- protected String voucher;
- protected String description;
- protected String letter;
- protected String accountsList;
- protected Account account;
- protected EntryBook entryBook;
- protected FinancialStatementWayEnum amountWayEnum;
- protected String operator;
- protected String amount;
- protected String amount2;
-
+ /** data cache */
+ protected FinancialTransactionSearch financialTransactionSearch;
protected FinancialTransactionSearchViewHandler(FinancialTransactionSearchView view) {
this.view = view;
@@ -80,14 +72,17 @@
financialTransactionService =
LimaServiceFactory.getInstance().getService(
FinancialTransactionServiceMonitorable.class);
+
+ financialTransactionSearch = new FinancialTransactionSearchImpl();
+
}
public void setBeginDate(Date beginDate){
- this.beginDate = beginDate;
+ financialTransactionSearch.setBeginDate(beginDate);
}
public void setEndDate(Date endDate){
- this.endDate = endDate;
+ financialTransactionSearch.setEndDate(endDate);
}
public void setVoucher(String voucher){
@@ -96,7 +91,7 @@
if (!voucher.equals("")){
result = voucher;
}
- this.voucher=result;
+ financialTransactionSearch.setVoucher(result);
}
public void setDescription(String description){
@@ -104,7 +99,7 @@
if (!description.equals("")){
result = description;
}
- this.description=result;
+ financialTransactionSearch.setDescription(result);
}
public void setLetter(String letter){
@@ -112,11 +107,11 @@
if (!letter.equals("")){
result = letter;
}
- this.letter=result;
+ financialTransactionSearch.setLetter(result);
}
public String getAccountsList(){
- return this.accountsList;
+ return financialTransactionSearch.getAccountList();
}
public void setAccountsList(String accountsList){
@@ -124,24 +119,24 @@
if (!accountsList.equals("")){
result = accountsList;
}
- this.accountsList=result;
+ financialTransactionSearch.setAccountList(result);
}
public Account getAccount(){
- return this.account;
+ return financialTransactionSearch.getAccount();
}
public void setAccount(Account account){
- this.account=account;
+ financialTransactionSearch.setAccount(account);
}
public void setEntryBook(EntryBook entryBook){
- this.entryBook=entryBook;
+ financialTransactionSearch.setEntryBook(entryBook);
}
public String getAmount(){
- return this.amount;
+ return financialTransactionSearch.getAmount();
}
public void setAmount(String amount){
@@ -149,11 +144,11 @@
if (!amount.equals("")){
result = amount;
}
- this.amount=result;
+ financialTransactionSearch.setAmount(result);
}
public String getAmount2(){
- return this.amount2;
+ return financialTransactionSearch.getAmount2();
}
public void setAmount2(String amount2){
@@ -161,11 +156,11 @@
if (!amount2.equals("")){
result = amount2;
}
- this.amount2=result;
+ financialTransactionSearch.setAmount2(result);
}
public void setAmountWayEnum(FinancialStatementWayEnum amountWayEnum){
- this.amountWayEnum=amountWayEnum;
+ financialTransactionSearch.setAmountWayEnum(amountWayEnum);
}
public void setOperator(String operator){
@@ -173,39 +168,15 @@
if (!operator.equals("")){
result = operator;
}
- this.operator=result;
+ financialTransactionSearch.setOperator(result);
}
-
+
+
public void refresh(){
tableModel = view.getFinancialTransactionSearchTableModel();
if (tableModel != null){
- log.debug(voucher+" "
- +description+" "+letter+" "+accountsList+" "
- +account+" "+entryBook+" "+amount);
- tableModel.refresh(getDataList());
+ tableModel.refresh(financialTransactionSearch);
}
}
- protected List<Entry> getDataList() {
- List<Entry> results = null;
- //prevent to much result
- if (voucher != null || description != null || letter != null ||
- accountsList != null || account != null || entryBook != null ||
- (amount != null && operator != null) || (amount != null && amount2 != null)){
- try {
- results = financialTransactionService.searchEntry(beginDate, endDate,
- voucher, description, letter, accountsList, account,
- entryBook, amountWayEnum, operator, amount, amount2);
-
- }
- catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.debug("Can't update model", eee);
- }
- ErrorHelper.showErrorDialog("Can't get transaction list", eee);
- }
- }
- return results;
- }
-
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -19,20 +19,17 @@
package org.chorem.lima.ui.financialtransactionunbalanced;
import static org.nuiton.i18n.I18n._;
-
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
-import java.util.Set;
-
import javax.swing.table.AbstractTableModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.utils.EntryComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
@@ -57,7 +54,7 @@
* Last update : $Date: 2010-05-14 13:22:26 +0200 (ven. 14 mai 2010) $
* By : $Author: jpepin $
*/
-public class FinancialTransactionUnbalancedTableModel extends AbstractTableModel {
+public class FinancialTransactionUnbalancedTableModel extends AbstractTableModel implements ServiceListener{
/** serialVersionUID. */
private static final long serialVersionUID = 3914954536809622358L;
@@ -67,7 +64,7 @@
.getLog(FinancialTransactionUnbalancedTableModel.class);
/** Transaction service. */
- protected final FinancialTransactionService financialTransactionService;
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
/** selected financial period */
protected FiscalPeriod selectedFiscalPeriod;
@@ -88,6 +85,7 @@
financialTransactionService =
LimaServiceFactory.getInstance().getService(
FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
}
/**
@@ -430,8 +428,8 @@
getFinancialTransaction());
}
//on recharge la liste
- //TODO PEPIN 20100607 Get financial transaction of cachedatelist on replace it
- fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);
+ cacheDataList = getDataList();
+ fireTableDataChanged();
}
}
@@ -464,4 +462,10 @@
refresh();
}
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if (serviceName.contains("FinancialTransaction") || methodeName.contains("importEntries") || methodeName.contains("importAll")){
+ refresh();
+ }
+ }
}
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-22 19:14:52 UTC (rev 3013)
@@ -10,6 +10,8 @@
lima.account=Compte
lima.account.label=
lima.account.number=
+lima.accountsreports.begincalendar=
+lima.accountsreports.endcalendar=
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
1
0
r3012 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui/balance java/org/chorem/lima/ui/financialtransactionsearch java/org/chorem/lima/ui/ledger resources/i18n
by jpepin@users.chorem.org Aug. 21, 2010
by jpepin@users.chorem.org Aug. 21, 2010
Aug. 21, 2010
Author: jpepin
Date: 2010-08-21 15:01:48 +0200 (Sat, 21 Aug 2010)
New Revision: 3012
Url: http://chorem.org/repositories/revision/lima/3012
Log:
Modification UI recherche d'?\195?\169criture.
Retouche UI balance et grand-journal.
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -1,56 +0,0 @@
-/*
- * *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*
- */
-
-package org.chorem.lima.ui.balance;
-
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import javax.swing.JTextField;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class BalanceFilterTextField extends JTextField implements KeyListener {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(BalanceFilterTextField.class);
-
- protected BalanceViewHandler handler;
-
- public BalanceFilterTextField(BalanceViewHandler handler) {
- this.handler = handler;
- addKeyListener(this);
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- handler.setAccountFilter(getText());
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-21 13:01:48 UTC (rev 3012)
@@ -50,27 +50,30 @@
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
+ <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())"/>
</cell>
<cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
+ <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"
onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
</cell>
<cell anchor="east">
- <JLabel text="lima.accountsreports.accountfilter"/>
+ <JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField javaBean="new org.chorem.lima.ui.balance.BalanceFilterTextField(getHandler())"/>
+ <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="balanceFilter.getDocument()"
+ onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
+ onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
</cell>
<cell anchor="center">
- <JCheckBox id='movmentedFilter' text='lima.accountsreports.movmentedfilter' selected='false'
+ <JCheckBox id='movmentedFilter' text='lima.common.movmentedfilter' selected='false'
onActionPerformed="getHandler().refresh()"/>
</cell>
<cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -59,7 +59,6 @@
Object object = this.getSelectedItem();
if (object instanceof Account){
handler.setAccount((Account) this.getSelectedItem());
- handler.refresh();
}
}
@@ -77,7 +76,6 @@
//to prevent useless call to service
if (!account.equals(handler.getAccount())){
handler.setAccount(account);
- handler.refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -54,6 +54,7 @@
case ACCOUNT_LIST:
final JTextField accountsList = new JTextField(16);
+ accountsList.setMinimumSize(accountsList.getPreferredSize());
KeyListener accountsListKeyListener = new KeyListener() {
@Override
@@ -66,7 +67,6 @@
//to prevent useless call to service
if (!accounts.equals(handler.getAccountsList())){
handler.setAccountsList(accounts);
- handler.refresh();
}
}
@@ -77,7 +77,6 @@
accountsList.addKeyListener(accountsListKeyListener);
handler.setAccountsList(accountsList.getText());
handler.setAccount(null);
- handler.refresh();
this.removeAll();
this.add(accountsList);
break;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -38,6 +38,7 @@
public void refresh(ComboBoxOperatorsEnum enums){
final JTextField amountTextField = new JTextField(16);
+ amountTextField.setMinimumSize(amountTextField.getPreferredSize());
KeyListener amountKeyListener = new KeyListener() {
@Override
@@ -50,7 +51,6 @@
//to prevent useless call to service
if (!amount.equals(handler.getAmount())){
handler.setAmount(amount);
- handler.refresh();
}
}
@@ -61,12 +61,14 @@
amountTextField.addKeyListener(amountKeyListener);
handler.setAmount2("");
handler.setOperator(enums.getSymbol());
+ handler.refresh();
this.removeAll();
this.add(amountTextField);
switch (enums) {
case INTERVAL:
final JTextField amount2TextField = new JTextField(16);
+ amount2TextField.setMinimumSize(amount2TextField.getPreferredSize());
KeyListener amount2KeyListener = new KeyListener() {
@Override
@@ -80,7 +82,6 @@
//to prevent useless call to service
if (!amount2.equals(handler.getAmount2())){
handler.setAmount2(amount2);
- handler.refresh();
}
}
@@ -93,9 +94,7 @@
this.add(amount2TextField);
break;
}
- amountTextField.setText(handler.getAmount());
- handler.refresh();
-
+ amountTextField.setText(handler.getAmount());
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -59,7 +59,6 @@
Object object = this.getSelectedItem();
if (object instanceof EntryBook){
handler.setEntryBook((EntryBook) this.getSelectedItem());
- handler.refresh();
}
}
@@ -74,7 +73,6 @@
Object object = this.getSelectedItem();
if (object instanceof EntryBook){
handler.setEntryBook((EntryBook) this.getSelectedItem());
- handler.refresh();
}
// delegate popup list menu
if ( e.getKeyChar() == KeyEvent.VK_ENTER )
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -37,14 +37,12 @@
case SELECT_ONE:
EntryBookSearchComboBox entryBookSearchComboBox = new EntryBookSearchComboBox(handler);
handler.setEntryBook(null);
- handler.refresh();
this.removeAll();
this.add(entryBookSearchComboBox);
break;
case ALL:
handler.setEntryBook(null);
- handler.refresh();
this.removeAll();
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-21 13:01:48 UTC (rev 3012)
@@ -18,6 +18,7 @@
<Table>
<FinancialTransactionSearchViewHandler id="handler" javaBean="new FinancialTransactionSearchViewHandler(this)" />
<Boolean id="selectedRow" javaBean="false" />
+ <java.awt.Dimension id="fieldSize" javaBean="new java.awt.Dimension()" />
<script>
<![CDATA[
import org.chorem.lima.enums.ComboBoxPeriodEnum;
@@ -32,7 +33,6 @@
PeriodSearchPanel periodSearchPanel = new PeriodSearchPanel(handler);
void $afterCompleteSetup() {
- handler.init();
handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription(
(String) getAmountComboBox().getSelectedItem()));
handler.setOperator(ComboBoxOperatorsEnum.valueOfDescription(
@@ -43,7 +43,7 @@
</script>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxPeriodEnum.descriptions())"
onActionPerformed="periodSearchPanel.refresh(ComboBoxPeriodEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
@@ -51,17 +51,29 @@
</row></Table></cell>
</row>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell><JLabel text="lima.table.voucher"/></cell>
- <cell><JTextField id='voucher'/></cell>
+ <cell><JTextField id='voucher' minimumSize="{voucher.getPreferredSize()}"/>
+ <javax.swing.text.Document javaBean="voucher.getDocument()"
+ onInsertUpdate='handler.setVoucher(voucher.getText())'
+ onRemoveUpdate='handler.setVoucher(voucher.getText())' />
+ </cell>
<cell><JLabel text="lima.table.description"/></cell>
- <cell><JTextField id='description'/></cell>
+ <cell><JTextField id='description' minimumSize='{description.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="description.getDocument()"
+ onInsertUpdate='handler.setDescription(description.getText())'
+ onRemoveUpdate='handler.setDescription(description.getText())' />
+ </cell>
<cell><JLabel text="lima.table.letter"/></cell>
- <cell><JTextField id='letter'/></cell>
+ <cell><JTextField id='letter' minimumSize='{letter.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="letter.getDocument()"
+ onInsertUpdate='handler.setLetter(letter.getText())'
+ onRemoveUpdate='handler.setLetter(letter.getText())' />
+ </cell>
</row></Table></cell>
</row>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell><JComboBox id="accountComboBox" javaBean="new JComboBox(ComboBoxAccountsEnum.descriptions())"
onActionPerformed="accountSearchPanel.refresh(ComboBoxAccountsEnum.valueOfDescription((String) accountComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
@@ -73,7 +85,7 @@
</row></Table></cell>
</row>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell><JLabel text="lima.amount"/></cell>
<cell><JComboBox id="amountComboBox" javaBean="new JComboBox(FinancialStatementWayEnum.descriptions())"
onActionPerformed="handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription((String)amountComboBox.getSelectedItem()));
@@ -85,6 +97,9 @@
</row></Table></cell>
</row>
<row>
+ <cell><JButton id="validSearch" text='lima.common.search' onActionPerformed="handler.refresh()"/></cell>
+ </row>
+ <row>
<cell fill="both" weightx="1" weighty="1">
<JScrollPane>
<org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchTableModel
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -1,4 +1,4 @@
-/* *##% Lima Swing
+ /* *##% Lima Swing
* Copyright (C) 2008 - 2010 CodeLutin
*
* This program is free software; you can redistribute it and/or
@@ -18,12 +18,8 @@
package org.chorem.lima.ui.financialtransactionsearch;
-import static org.nuiton.i18n.I18n._;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import java.util.Date;
import java.util.List;
-import javax.swing.JTextField;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
@@ -86,85 +82,16 @@
FinancialTransactionServiceMonitorable.class);
}
- public void init(){
-
- final JTextField descriptionTextField = view.getDescription();
- KeyListener descriptionKeyListener = new KeyListener() {
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- setDescription(descriptionTextField.getText());
- refresh();
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
- };
- descriptionTextField.addKeyListener(descriptionKeyListener);
-
- final JTextField letterTextField = view.getLetter();
- KeyListener letterKeyListener = new KeyListener() {
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- //to prevent useless call to service
- String letterNew = letterTextField.getText();
- if (!letterNew.equals(letter)){
- setLetter(letterNew);
- refresh();
- }
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
- };
- letterTextField.addKeyListener(letterKeyListener);
-
- final JTextField voucherTextField = view.getVoucher();
- KeyListener voucherKeyListener = new KeyListener() {
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- //to prevent useless call to service
- String voucherNew = voucherTextField.getText();
- if (!voucherNew.equals(voucher)){
- setVoucher(voucherNew);
- refresh();
- }
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
- };
- voucherTextField.addKeyListener(voucherKeyListener);
- }
-
public void setBeginDate(Date beginDate){
this.beginDate = beginDate;
- log.debug(beginDate);
}
public void setEndDate(Date endDate){
this.endDate = endDate;
- log.debug(endDate);
}
public void setVoucher(String voucher){
+
String result = null;
if (!voucher.equals("")){
result = voucher;
@@ -255,13 +182,13 @@
log.debug(voucher+" "
+description+" "+letter+" "+accountsList+" "
+account+" "+entryBook+" "+amount);
- //prevent to much result
tableModel.refresh(getDataList());
}
}
protected List<Entry> getDataList() {
List<Entry> results = null;
+ //prevent to much result
if (voucher != null || description != null || letter != null ||
accountsList != null || account != null || entryBook != null ||
(amount != null && operator != null) || (amount != null && amount2 != null)){
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -1,58 +0,0 @@
-/*
- * *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*
- */
-
-package org.chorem.lima.ui.ledger;
-
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import javax.swing.JTextField;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class LedgerFilterTextField extends JTextField implements KeyListener {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(LedgerFilterTextField.class);
-
- protected LedgerViewHandler handler;
-
- public LedgerFilterTextField(LedgerViewHandler handler) {
- this.handler = handler;
- addKeyListener(this);
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
-
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- handler.setAccountFilter(getText());
-
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-21 13:01:48 UTC (rev 3012)
@@ -49,27 +49,30 @@
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
+ <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
</cell>
<cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
+ <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"
onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
</cell>
<cell anchor="east">
- <JLabel text="lima.accountsreports.accountfilter"/>
+ <JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField javaBean="new org.chorem.lima.ui.ledger.LedgerFilterTextField(getHandler())"/>
+ <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="balanceFilter.getDocument()"
+ onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
+ onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
</cell>
<cell anchor="center">
- <JCheckBox id='movmentedFilter' text='lima.accountsreports.movmentedfilter' selected='false'
+ <JCheckBox id='movmentedFilter' text='lima.common.movmentedfilter' selected='false'
onActionPerformed="getHandler().refresh()"/>
</cell>
<cell>
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-21 13:01:48 UTC (rev 3012)
@@ -47,15 +47,18 @@
lima.common.cancel=
lima.common.close=
lima.common.copy=
+lima.common.filter=
lima.common.fin=
lima.common.import=
lima.common.importexport=Import/Export
+lima.common.movmentedfilter=
lima.common.next=
lima.common.ok=
lima.common.paste=
lima.common.print=
lima.common.quit=
lima.common.remove=
+lima.common.search=
lima.common.update=
lima.config.category.directories=
lima.config.category.directories.description=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-21 13:01:48 UTC (rev 3012)
@@ -10,10 +10,6 @@
lima.account=Compte
lima.account.label=
lima.account.number=
-lima.accountsreports.accountfilter=Filtrer
-lima.accountsreports.begincalendar=Date d\u00E9but
-lima.accountsreports.endcalendar=Date fin
-lima.accountsreports.movmentedfilter=Afficher que les comptes mouvement\u00E9s
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
@@ -44,14 +40,17 @@
lima.common.cancel=Annuler
lima.common.close=Fermer
lima.common.copy=Copier
+lima.common.filter=Filtrer
lima.common.fin=Termin\u00E9
lima.common.importexport=Importer/Exporter
+lima.common.movmentedfilter=Comptes mouvement\u00E9s
lima.common.next=Suivant
lima.common.ok=OK
lima.common.paste=Coller
lima.common.print=
lima.common.quit=Quitter
lima.common.remove=Supprimer
+lima.common.search=Rechercher
lima.common.update=Modifier
lima.config.category.directories=R\u00E9pertoires
lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
1
0
r3011 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/java/org/chorem/lima/business/ejbinterface lima-callao/src/main/java/org/chorem/lima/entity lima-callao/src/main/xmi lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced lima-swing/src/main/java/org/chorem/lima/ui/home
by jpepin@users.chorem.org Aug. 21, 2010
by jpepin@users.chorem.org Aug. 21, 2010
Aug. 21, 2010
Author: jpepin
Date: 2010-08-21 13:51:36 +0200 (Sat, 21 Aug 2010)
New Revision: 3011
Url: http://chorem.org/repositories/revision/lima/3011
Log:
Optimize topiaquery and lazy loading.
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
trunk/lima-callao/src/main/xmi/accounting.properties
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -21,9 +21,7 @@
import java.math.BigDecimal;
import java.util.Date;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import javax.ejb.Stateless;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -147,8 +145,12 @@
FinancialTransactionDAO transactionDAO =
LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaTransaction);
+ String financialPeriodProperty = TopiaQuery.getProperty(FinancialTransaction.FINANCIAL_PERIOD);
+ String entryBookLabelProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY_BOOK);
+ String accountProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY, Entry.ACCOUNT);
+
// filter with topia query
- TopiaQuery query = transactionDAO.createQuery();
+ TopiaQuery query = transactionDAO.createQuery("T");
if (entryBook != null) {
query.addEquals("entryBook", entryBook);
@@ -157,19 +159,13 @@
if (financialPeriod != null) {
query.addEquals("financialPeriod", financialPeriod);
}
- query.addOrder(FinancialTransaction.TOPIA_CREATE_DATE);
+ query.addDistinct()
+ .addOrder("T."+FinancialTransaction.TOPIA_CREATE_DATE)
+ //load for lazy
+ .addLoad(financialPeriodProperty)
+ .addLoad(entryBookLabelProperty)
+ .addFetch("T."+accountProperty);
financialTransactions = transactionDAO.findAllByQuery(query);
-
- //IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- for (FinancialTransaction financialTransaction : financialTransactions) {
- financialTransaction.getEntryBook();
-
- for (Entry entry : financialTransaction.getEntry()) {
- entry.getAccount();
- entry.getFinancialTransaction();
- entry.getFinancialTransaction().getFinancialPeriod();
- }
- }
}
catch (TopiaException ex) {
doCatch(topiaTransaction, ex, log);
@@ -186,44 +182,35 @@
* Get unbalanced financialtransaction from selected fiscalperiod
*/
@Override
- public Set<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException {
+ public List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException {
TopiaContext topiaContext = null;
- Set<FinancialTransaction> result = new HashSet<FinancialTransaction>();
+ List<FinancialTransaction> result = null;
try {
topiaContext = beginTransaction();
FinancialTransactionDAO financialTransactionDAO =
LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaContext);
- TopiaQuery query = financialTransactionDAO.createQuery("E");
- query.addFrom(FiscalPeriod.class, "F")
- .addWhere("E.amountCredit != E.amountDebit OR E.entryBook = null")
- .addInElements("E.financialPeriod", "F.financialPeriod")
- .addEquals("F", fiscalPeriod);
- result.addAll(financialTransactionDAO.findAllByQuery(query));
- TopiaQuery query2 = financialTransactionDAO.createQuery("T");
- query2.addFrom(Entry.class, "E")
- .addWhere("E.account = null")
- .addInElements("E", "T.entry");
- result.addAll(financialTransactionDAO.findAllByQuery(query2));
+ String financialPeriodProperty = TopiaQuery.getProperty(FinancialTransaction.FINANCIAL_PERIOD);
+ String entryBookLabelProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY_BOOK);
+ String accountProperty = TopiaQuery.getProperty(Entry.ACCOUNT);
- /* Just for fun : IN HQL
- result = topiaContext.find(
- "FROM org.chorem.lima.entity.FinancialTransaction "+
- "WHERE amountCredit != amountDebit and (financialPeriod in (" +
- "FROM org.chorem.lima.entity.FinancialPeriod " +
- "WHERE (fiscalPeriod = :fiscalPeriod)))","fiscalPeriod",fiscalPeriod);*/
+
+
+ TopiaQuery query = financialTransactionDAO.createQuery("T");
+ query.addFrom(FiscalPeriod.class, "F")
+ .addDistinct()
+ .addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true)
+ .addWhere("T.amountCredit != T.amountDebit OR E.account = null OR T.entryBook = null")
+ .addInElements("T.financialPeriod", "F.financialPeriod")
+ .addEquals("F", fiscalPeriod)
+ // load lazy
+ .addLeftJoin("E."+accountProperty,"A", true)
+ .addLoad(financialPeriodProperty)
+ .addLoad(entryBookLabelProperty);
- //IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- for (FinancialTransaction financialTransaction : result) {
-
- for (Entry entry : financialTransaction.getEntry()) {
- entry.getAccount();
- entry.getFinancialTransaction();
- entry.getFinancialTransaction().getEntryBook();
- entry.getFinancialTransaction().getFinancialPeriod();
- }
- }
+ result = financialTransactionDAO.findAllByQuery(query);
+
}
catch (TopiaException ex) {
@@ -241,7 +228,7 @@
List<FinancialTransaction> result = null;
try {
topiaContext = beginTransaction();
- result = getAllFinancialTransactionsBalanced(topiaContext);
+ result = getAllFinancialTransactionsBalanced(fiscalPeriod, topiaContext);
}
catch (TopiaException ex) {
doCatch(topiaContext, ex, log);
@@ -256,28 +243,24 @@
/**
* Get balanced financialtransaction from selected fiscalperiod
*/
- @Override
- public List<FinancialTransaction> getAllFinancialTransactionsBalanced(TopiaContext topiaContext) throws LimaException {
+ public List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod, TopiaContext topiaContext) throws LimaException {
List<FinancialTransaction> result = null;
try {
FinancialTransactionDAO financialTransactionDAO =
LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaContext);
+
+ // WARN No load lazy, modify query with addLoad or addFetch if loading is necessary
+ TopiaQuery query = financialTransactionDAO.createQuery("T");
+ query.addFrom(FiscalPeriod.class, "F")
+ .addLeftJoin("T."+FinancialTransaction.ENTRY, "E", false)
+ .addWhere("T.amountCredit = T.amountDebit")
+ .addNotNull("E.account")
+ .addNotNull("T.entryBook")
+ .addInElements("T.financialPeriod", "F.financialPeriod")
+ .addEquals("F", fiscalPeriod);
- TopiaQuery query = financialTransactionDAO.createQuery("E");
- query.addWhere("E.amountCredit = E.amountDebit")
- .addNotNull("E.entryBook");
- result = financialTransactionDAO.findAllByQuery(query);
-
- //IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- for (FinancialTransaction financialTransaction : result) {
-
- for (Entry entry : financialTransaction.getEntry()) {
- entry.getAccount();
- entry.getFinancialTransaction();
- entry.getFinancialTransaction().getEntryBook();
- entry.getFinancialTransaction().getFinancialPeriod();
- }
- }
+ result = financialTransactionDAO.findAllByQuery(query);
+
}
catch (TopiaException ex) {
doCatch(topiaContext, ex, log);
@@ -648,7 +631,8 @@
}
else if (accountsList != null){
AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
- List<Account> accounts = accountDAO.stringToListAccounts(accountsList, false);
+ List<Account> accounts =
+ accountDAO.stringToListAccounts(accountsList, false);
StringBuffer accountNumbers = new StringBuffer("0,");
int max = accounts.size();
for (int i = 1; i <= max; i++) {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -155,23 +155,24 @@
/**
* Query for find entries for accountsreports and balancereports
- * Just balanced transaction are calculated
+ * Just exact and balanced transaction are calculated
*/
public TopiaQuery createEntryQuery(Account account, Date beginDate, Date endDate, EntryDAO entryDAO, String queryAlias) throws LimaException{
TopiaQuery query = entryDAO.createQuery(queryAlias);
- String transactionDateProperty =
- TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION,
- FinancialTransaction.TRANSACTION_DATE);
- String amountCreditProperty =
- TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION,
- FinancialTransaction.AMOUNT_CREDIT);
- String amountDebitProperty =
- TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION,
- FinancialTransaction.AMOUNT_DEBIT);
+ String transactionDateProperty = TopiaQuery.getProperty(
+ Entry.FINANCIAL_TRANSACTION, FinancialTransaction.TRANSACTION_DATE);
+ String amountCreditProperty = TopiaQuery.getProperty(
+ Entry.FINANCIAL_TRANSACTION, FinancialTransaction.AMOUNT_CREDIT);
+ String amountDebitProperty = TopiaQuery.getProperty(
+ Entry.FINANCIAL_TRANSACTION, FinancialTransaction.AMOUNT_DEBIT);
+ String entryBookProperty = TopiaQuery.getProperty(
+ Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK);
+
query
.addWhere(amountCreditProperty+" = "+amountDebitProperty)
.addWhere(transactionDateProperty+" BETWEEN :beginDate AND :endDate")
+ .addNotNull(entryBookProperty)
.addParam("beginDate", beginDate)
.addParam("endDate", endDate)
.addEquals(Entry.ACCOUNT, account);
@@ -355,12 +356,6 @@
entriesQuery.addOrder(orderDateProperty)
.addOrder(orderIdProperty);
reportsDatas.setListEntry(entryDAO.findAllByQuery(entriesQuery));
-
-
- //TODO 20100603 PEPIN imbriqué les deux conditions de comparator
- // tri sur date, tri sur topiaid
- //Collections.sort(entries, new EntryFinancialTransactionDateComparator());
- //Collections.sort(entries, new EntryFinancialTransactionComparator());
TopiaQuery amountsQuery =
createEntryBookReportsQuery(entryBook, beginDate, endDate, entryDAO, "E");
@@ -427,7 +422,6 @@
FinancialTransaction.ENTRY_BOOK);
query
.addWhere(amountCreditProperty+" = "+amountDebitProperty)
- //TODO check this
.addEquals(entryBookProperty, entryBook)
.addWhere(transactionDateProperty+" BETWEEN :beginDate AND :endDate")
.addParam("beginDate", beginDate)
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -60,7 +60,7 @@
List<FinancialTransaction> getAllFinancialTransactionsForEntryBookAndFinancialPeriod(
EntryBook entryBook, FinancialPeriod period) throws LimaException;
- Set<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
+ List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod) throws LimaException;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -19,7 +19,6 @@
package org.chorem.lima.business.ejbinterface;
-import java.util.List;
import javax.ejb.Local;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Entry;
@@ -38,8 +37,6 @@
@Local
public interface FinancialTransactionServiceLocal extends FinancialTransactionService {
-
- List<FinancialTransaction> getAllFinancialTransactionsBalanced(TopiaContext topiaContext) throws LimaException;
void createFinancialTransactionWithTransaction(FinancialTransaction financialtransaction, TopiaContext topiaContext) throws LimaException;
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -23,12 +23,16 @@
import java.util.List;
import java.util.StringTokenizer;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
import org.nuiton.topia.framework.TopiaQuery.Op;
public class AccountDAOImpl <E extends Account> extends AccountDAOAbstract<E> {
+ private static final Log log = LogFactory.getLog(AccountDAOImpl.class);
+
/**
* List all subaccounts (no folderaccounts, exclude accounts contains thirdpart accounts)
* Sort by accout number in lexicographical order
@@ -42,118 +46,98 @@
return (List<Account>) findAllByQuery(query);
}
-
- /**
- * Convert string of extends number to list of accounts
- * Example '22, 45..48, 67' -> [22, 45, 46, 47, 48, 67]
- * SubAccountsMode return list of existing subaccounts ex 6 return : 61, 62, .., 69, 610, .., 619 etc
- */
@Override
+ public Account findSubAccountByNumber(String number) throws TopiaException {
+ TopiaQuery query = createQuery();
+ String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
+ String subLedgersProperty = TopiaQuery.getProperty(Account.SUB_LEDGERS);
+ query.addWhere("not exists elements ("+subAccountsProperty+")")
+ .addWhere("not exists elements ("+subLedgersProperty+")")
+ .addEquals(Account.ACCOUNT_NUMBER, number);
+ return findByQuery(query);
+ }
+
+ public List<Account> findIntervalAccountByNumber(String accountNumberLow, String accountNumberHigh) throws TopiaException {
+ TopiaQuery query = createQuery();
+ query.addBetween(Account.ACCOUNT_NUMBER, accountNumberLow, accountNumberHigh);
+ return (List<Account>) findAllByQuery(query);
+ }
+
+ @Override
public List<Account> stringToListAccounts(String selectedAccounts,
Boolean subAccountsMode) throws TopiaException {
- List<Account> accounts = new ArrayList<Account>();
+ HashSet<Account> accounts = new HashSet<Account>();
if (selectedAccounts != null){
//Remove Spaces
- selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts);
- //use hashset for delete duplicate numbers
- HashSet<String> accountNumbers = new HashSet<String>();
- HashSet<String> accountNumbersToRemove = new HashSet<String>();
+ String result = StringUtils.deleteWhitespace(selectedAccounts);
+
Boolean first = true;
- StringTokenizer stStar = new StringTokenizer(selectedAccounts, "-");
+ StringTokenizer stStar = new StringTokenizer(result, "-");
while (stStar.hasMoreTokens()) {
String subString = stStar.nextToken();
+ log.debug(subString);
//Split comma
StringTokenizer stComma = new StringTokenizer(subString, ",");
while (stComma.hasMoreTokens()) {
String s = stComma.nextToken();
+ //if intervall account
if (s.contains("..") && !s.endsWith("..")){
//Split ..
String stringDoubleDot[] = s.split("\\.\\.");
- int lowAccount = Integer.parseInt(stringDoubleDot[0]);
- int highAccount = Integer.parseInt(stringDoubleDot[1]);
- //prevent to much result, can't let intervall superior to 1000
- if (highAccount - lowAccount <= 10000){
- for (int i=lowAccount; i <= highAccount; i++) {
- //if first add accounts, else remove
- if (first){
- accountNumbers.add(String.valueOf(i));
- }
- else {
- accountNumbersToRemove.add(String.valueOf(i));
- }
- }
- }
+ List<Account> resultIntervall =
+ findIntervalAccountByNumber(stringDoubleDot[0], stringDoubleDot[1]);
+
+ //if first add accounts, else remove
+ if (first){
+ accounts.addAll(resultIntervall);
+ }
+ else {
+ accounts.removeAll(resultIntervall);
+ }
}
+ //else one account
else{
- //if first
- if (first){
- accountNumbers.add(s);
- }
- else {
- accountNumbersToRemove.add(s);
- }
+ Account account = null;
+ if (subAccountsMode){
+ account = findSubAccountByNumber(s);
+ }
+ else {
+ account = findByAccountNumber(s);
+ }
+ //if exist
+ if (account != null){
+ //if first
+ if (first){
+ accounts.add(account);
+ }
+ else {
+ accounts.remove(account);
+ }
+ }
+ //search all account start with accountnumber
+ else {
+ TopiaQuery query = createQuery();
+ String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
+ query.addWhere("not exists elements ("+subAccountsProperty+")")
+ .addWhere(Account.ACCOUNT_NUMBER, Op.LIKE, s+"%");
+ List<Account> accountsResult = (List<Account>) findAllByQuery(query);
+ if (accountsResult != null){
+ //if first
+ if (first){
+ accounts.addAll(accountsResult);
+ }
+ else {
+ accounts.removeAll(accountsResult);
+ }
+ }
+ }
}
}
first=false;
}
- //add all accounts
- for (String accountNumber : accountNumbers) {
- Account account = null;
- if (subAccountsMode){
- account = findSubAccountByNumber(accountNumber);
- }
- else {
- account = findByAccountNumber(accountNumber);
-
- }
- //add account if exist
- if (account != null){
- accounts.add(account);
- }
- //search all account start with accountnumber
- else {
- TopiaQuery query = createQuery();
- String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
- //String subLedgersProperty = TopiaQuery.getProperty(Account.SUB_LEDGERS);
- query.addWhere("not exists elements ("+subAccountsProperty+")")
- //.addWhere("not exists elements ("+subLedgersProperty+")")
- .addWhere(Account.ACCOUNT_NUMBER, Op.LIKE, accountNumber+"%");
- List<Account> accountsResult = (List<Account>) findAllByQuery(query);
- if (accountsResult != null){
- accounts.addAll(accountsResult);
- }
- }
- }
- //remove all accounts
- for (String accountNumber : accountNumbersToRemove) {
- Account account = null;
- if (subAccountsMode){
- account = findSubAccountByNumber(accountNumber);
- }
- else {
- account = findByAccountNumber(accountNumber);
- }
- if (account != null) {
- accounts.remove(account);
- }
- }
}
- return accounts;
+ return new ArrayList(accounts);
}
-
-
-
- @Override
- public Account findSubAccountByNumber(String number) throws TopiaException {
- TopiaQuery query = createQuery();
- String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
- String subLedgersProperty = TopiaQuery.getProperty(Account.SUB_LEDGERS);
- query.addWhere("not exists elements ("+subAccountsProperty+")")
- .addWhere("not exists elements ("+subLedgersProperty+")")
- .addEquals(Account.ACCOUNT_NUMBER, number);
- return findByQuery(query);
- }
-
}
Modified: trunk/lima-callao/src/main/xmi/accounting.properties
===================================================================
--- trunk/lima-callao/src/main/xmi/accounting.properties 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-callao/src/main/xmi/accounting.properties 2010-08-21 11:51:36 UTC (rev 3011)
@@ -21,7 +21,6 @@
# lazy
org.chorem.lima.entity.Account.attribute.subAccounts.tagvalue.lazy=false
org.chorem.lima.entity.Account.attribute.subLedgers.tagvalue.lazy=false
-org.chorem.lima.entity.FinancialTransaction.attribute.financialPeriod.tagvalue.lazy=false
org.chorem.lima.entity.FiscalPeriod.attribute.financialPeriod.tagvalue.lazy=false
org.chorem.lima.entity.FinancialStatement.attribute.subFinancialStatements.tagvalue.lazy=false
org.chorem.lima.entity.FinancialStatement.attribute.masterFinancialStatement.tagvalue.lazy=false
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -100,7 +100,7 @@
List<Object> results = new ArrayList<Object>();
if(selectedFiscalPeriod != null){
try {
- Set<FinancialTransaction> financialtransactions =
+ List<FinancialTransaction> financialtransactions =
financialTransactionService.getAllInexactFinancialTransactions(selectedFiscalPeriod);
for (FinancialTransaction financialtransaction : financialtransactions) {
results.add(financialtransaction);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-20 23:46:18 UTC (rev 3010)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-21 11:51:36 UTC (rev 3011)
@@ -21,8 +21,6 @@
import static org.nuiton.i18n.I18n._;
import java.awt.Color;
import java.util.List;
-import java.util.Set;
-
import javax.swing.JEditorPane;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
@@ -101,7 +99,7 @@
List<FiscalPeriod> unblockedFiscalPeriods =
fiscalPeriodService.getAllUnblockedFiscalPeriods();
if (unblockedFiscalPeriods.size() != 0){
- Set<FinancialTransaction> financialTransactionsUnbal =
+ List<FinancialTransaction> financialTransactionsUnbal =
financialTransactionService.
getAllInexactFinancialTransactions(unblockedFiscalPeriods.get(0));
if (financialTransactionsUnbal.size()>0){
1
0
Author: jpepin
Date: 2010-08-21 01:46:18 +0200 (Sat, 21 Aug 2010)
New Revision: 3010
Url: http://chorem.org/repositories/revision/lima/3010
Log:
D?\195?\169bogue et optimisation ?\195?\160 partir du rapport Sonar.
Removed:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/RecordServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/UserServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordServiceLocal.java
trunk/lima-business/src/test/java/org/chorem/lima/business/RecordServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/UserServiceImplTest.java
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/AccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountComparator.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountEBPComparator.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FiscalPeriodComparator.java
trunk/lima-business/src/test/java/org/chorem/lima/business/LimaConfigTest.java
trunk/lima-swing/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/AccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/AccountingRules.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/AccountingRules.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -18,8 +18,8 @@
*/
package org.chorem.lima.business;
+
import java.util.List;
-
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
import org.chorem.lima.entity.Entry;
@@ -42,11 +42,11 @@
* @param account
* @throws LimaException
*/
- public void createAccountRules(Account masterAccount, Account account) throws LimaException;
- public void createSubLedgerRules(Account masterAccount, Account account) throws LimaException;
- public void updateAccountRules(Account masterAccount, Account account) throws LimaException;
- public void updateSubLedgerRules(Account account) throws LimaException;
- public void removeAccountRules(Account account, TopiaContext transaction) throws LimaException;
+ void createAccountRules(Account masterAccount, Account account) throws LimaException;
+ void createSubLedgerRules(Account masterAccount, Account account) throws LimaException;
+ void updateAccountRules(Account masterAccount, Account account) throws LimaException;
+ void updateSubLedgerRules(Account account) throws LimaException;
+ void removeAccountRules(Account account, TopiaContext transaction) throws LimaException;
/**
* Entrybook rules
@@ -54,7 +54,7 @@
* @param topiaTransaction
* @throws LimaException
*/
- public void removeEntryBookRules(EntryBook entryBook, TopiaContext topiaTransaction) throws LimaException;
+ void removeEntryBookRules(EntryBook entryBook, TopiaContext topiaTransaction) throws LimaException;
/**
* Fiscal Period rules
@@ -62,8 +62,8 @@
* @param transaction
* @throws LimaException
*/
- public List<FinancialPeriod> createFiscalPeriodRules(FiscalPeriod fiscalPeriod, TopiaContext transaction) throws LimaException;
- public void blockFiscalPeriodRules(FiscalPeriod fiscalPeriod, TopiaContext transaction) throws LimaException;
+ List<FinancialPeriod> createFiscalPeriodRules(FiscalPeriod fiscalPeriod, TopiaContext transaction) throws LimaException;
+ void blockFiscalPeriodRules(FiscalPeriod fiscalPeriod, TopiaContext transaction) throws LimaException;
/**
* Entry rules
@@ -71,14 +71,14 @@
* @param topiaTransaction
* @throws LimaException
*/
- public void updateEntryRules(Entry entry, Entry entryOld, TopiaContext topiaTransaction) throws LimaException;
- public void updateFinancialTransactionDateRules(FinancialTransaction financialTransaction, FinancialTransaction financialTransactionOld, TopiaContext topiaContext) throws LimaException, LimaBusinessException;
+ void updateEntryRules(Entry entry, Entry entryOld, TopiaContext topiaTransaction) throws LimaException;
+ void updateFinancialTransactionDateRules(FinancialTransaction financialTransaction, FinancialTransaction financialTransactionOld, TopiaContext topiaContext) throws LimaException;
/**
* Financialperiod/entrybook rules
* @param financialTransaction
* @param topiaContext
* @throws LimaException
*/
- public void checkFinancialPeriodBlockedWithFinancialTransaction(FinancialTransaction financialTransaction, TopiaContext topiaContext) throws LimaException;
- public void blockClosedPeriodicEntryBookRules(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException;
+ void checkFinancialPeriodBlockedWithFinancialTransaction(FinancialTransaction financialTransaction, TopiaContext topiaContext) throws LimaException;
+ void blockClosedPeriodicEntryBookRules(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -43,9 +43,9 @@
private static final Log log = LogFactory.getLog(LimaConfig.class);
- protected static LimaConfig instance;
+ private static LimaConfig instance;
- private static final String configFile = "lima.properties";
+ private static final String CONFIGFILE = "lima.properties";
protected AccountingRules accountingRules;
@@ -59,7 +59,7 @@
public static LimaConfig getInstance() {
if (instance == null) {
instance = new LimaConfig();
- instance.loadConfiguration(configFile);
+ instance.loadConfiguration(CONFIGFILE);
}
return instance;
}
@@ -136,41 +136,41 @@
HTTP_PORT("lima.httpport", _("lima.config.httpport"), "5462", String.class, false, false),
SERVER_ADRESS("lima.serveraddress", _("lima.config.serveraddress"), "", String.class, false, false);
- public final String key;
- public final String description;
- public String defaultValue;
- public final Class<?> type;
- public boolean _transient;
- public boolean _final;
+ private final String key;
+ private final String description;
+ private String defaultValue;
+ private final Class<?> type;
+ private boolean transientBoolean;
+ private boolean finalBoolean;
private Option(String key, String description, String defaultValue,
- Class<?> type, boolean _transient, boolean _final) {
+ Class<?> type, boolean transientBoolean, boolean finalBoolean) {
this.key = key;
this.description = description;
this.defaultValue = defaultValue;
this.type = type;
- this._final = _final;
- this._transient = _transient;
+ this.finalBoolean = finalBoolean;
+ this.transientBoolean = transientBoolean;
}
@Override
public boolean isFinal() {
- return _final;
+ return finalBoolean;
}
@Override
- public void setFinal(boolean _final){
- this._final=_final;
+ public void setFinal(boolean finalBoolean){
+ this.finalBoolean=finalBoolean;
}
@Override
public boolean isTransient() {
- return _transient;
+ return transientBoolean;
}
@Override
- public void setTransient(boolean _transient) {
- this._transient=_transient;
+ public void setTransient(boolean transientBoolean) {
+ this.transientBoolean = transientBoolean;
}
@Override
@@ -180,7 +180,7 @@
@Override
public void setDefaultValue(String defaultValue) {
- this.defaultValue=defaultValue;
+ this.defaultValue = defaultValue;
}
@Override
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -20,6 +20,6 @@
package org.chorem.lima.business;
public interface ServiceMonitorable {
- public void addListener(ServiceListener l);
- public void removeListener(ServiceListener l);
+ void addListener(ServiceListener l);
+ void removeListener(ServiceListener l);
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -131,7 +131,7 @@
/**
* Check if entrybook have financial transaction
*/
- @Override
+ @Override
public void removeEntryBookRules(EntryBook entryBook, TopiaContext topiaTransaction) throws LimaException {
try {
FinancialTransactionDAO financialTransactionDAO = LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaTransaction);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -89,8 +89,8 @@
/**
* Rules to check before create subledger
*/
- public void createSubLedgerRules(Account masterAccount, Account account) throws LimaException {
- super.createSubLedgerRules(masterAccount, account);
+ public void createSubLedgerRules(Account masterAccount, Account account) throws LimaException {
+ super.createSubLedgerRules(masterAccount, account);
// check if the master account number is begin with 4
if (!masterAccount.getAccountNumber().startsWith("4")){
@@ -308,24 +308,4 @@
}
throw new LimaException("Exception during query", cause);
}
-
- /**
- * Generic code used too close a transaction.
- *
- * @param transaction transaction to close
- * @param log log (can be null)
- * @throws LimaException
- */
- protected void doFinally(TopiaContext transaction, Log log) throws LimaException {
- if (transaction != null) {
- try {
- transaction.closeContext();
- } catch (TopiaException ex) {
- if (log != null && log.isErrorEnabled()) {
- log.error("Can't close transaction", ex);
- }
- throw new LimaException("Can't close transaction", ex);
- }
- }
- }
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -22,11 +22,8 @@
import static org.nuiton.i18n.I18n._;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
-import java.util.StringTokenizer;
import javax.ejb.Stateless;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.AccountingRules;
@@ -44,7 +41,6 @@
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.TopiaNotFoundException;
import org.nuiton.topia.framework.TopiaQuery;
-import org.nuiton.topia.framework.TopiaQuery.Op;
/**
* Permet d'implémenter le Plan Comptable Général.
@@ -78,8 +74,7 @@
@Override
- public void createAccountWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException,
- LimaBusinessException {
+ public void createAccountWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException {
try {
// check if account number already exist
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -43,7 +43,6 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.DocumentService;
import org.chorem.lima.business.ejbinterface.DocumentServiceLocal;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
import org.chorem.lima.business.ejbinterface.FinancialStatementService;
import org.chorem.lima.business.ejbinterface.IdentityService;
import org.chorem.lima.business.ejbinterface.ReportService;
@@ -92,17 +91,14 @@
//Services
@EJB
- IdentityService identityService;
+ private IdentityService identityService;
@EJB
- EntryBookService entryBookService;
+ private FinancialStatementService financialStatementService;
@EJB
- FinancialStatementService financialStatementService;
+ private ReportService reportService;
- @EJB
- ReportService reportService;
-
protected String path;
//SDFs
@@ -261,7 +257,7 @@
for (int i=0;i<size;i++) {
FinancialStatementAmounts fStatementAmounts =
financialStatementAmounts.get(i);
- if (fStatementAmounts.getLevel() == 1 && fStatementAmounts.getSubAmount() == false){
+ if (fStatementAmounts.getLevel() == 1 && !fStatementAmounts.getSubAmount()){
if (first){
first=false;
}
@@ -406,9 +402,9 @@
}
else {
//cell1
- String tab = "";
+ StringBuffer tab = new StringBuffer();
for (int i = 0; i < level; i++) {
- tab += "\t";
+ tab.append("\t");
}
Phrase phrase = null;
if (financialStatementAmount.getHeader()){
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -146,16 +146,16 @@
*/
public List<EntryBook> getAllEntryBooks() throws LimaException {
- List<EntryBook> EntryBooksList = new ArrayList<EntryBook>();
+ List<EntryBook> entryBooksList = new ArrayList<EntryBook>();
TopiaContext transaction = null;
try {
transaction = beginTransaction();
// check if entrybook with is name already exist
- EntryBookDAO EntryBookDAO =
+ EntryBookDAO entryBookDAO =
LimaCallaoDAOHelper.getEntryBookDAO(transaction);
- List<EntryBook> EntryBooks = EntryBookDAO.findAll();
- EntryBooksList.addAll(EntryBooks);
+ List<EntryBook> entryBooks = entryBookDAO.findAll();
+ entryBooksList.addAll(entryBooks);
}
catch (TopiaException ex) {
doCatch(transaction, ex, log);
@@ -164,7 +164,7 @@
doFinally(transaction, log);
}
- return EntryBooksList;
+ return entryBooksList;
}
/**
@@ -213,9 +213,9 @@
accountingRules.removeEntryBookRules(entryBook, topiaTransaction);
//delete
- EntryBookDAO EntryBookDAO =
+ EntryBookDAO entryBookDAO =
LimaCallaoDAOHelper.getEntryBookDAO(topiaTransaction);
- EntryBookDAO.delete(entryBook);
+ entryBookDAO.delete(entryBook);
commitTransaction(topiaTransaction);
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -73,7 +73,7 @@
private TopiaContext rootContext;
- private static final SimpleDateFormat SDateFormat = new SimpleDateFormat("dd,MM,yyyy HH:mm:ss");
+ private static final SimpleDateFormat SDATEFORMAT = new SimpleDateFormat("dd,MM,yyyy HH:mm:ss");
public ExportServiceImpl() {
LimaConfig config = LimaConfig.getInstance();
@@ -96,7 +96,7 @@
public String exportEntriesAsEBP() throws LimaException {
TopiaContext topiaContext = null;
SimpleDateFormat epbDateFormat = new SimpleDateFormat("ddMMyyyy");
- String result = "";
+ StringBuffer result = new StringBuffer();
int num = 0;
try {
@@ -151,10 +151,10 @@
string = nextln;
}
if (i==8){
- result+=string+"\r\n";
+ result.append(string+"\r\n");
}
else {
- result+=string+",";
+ result.append(string+",");
}
}
}
@@ -169,7 +169,7 @@
finally {
doFinally(topiaContext, log);
}
- return result;
+ return result.toString();
}
/**
@@ -310,17 +310,17 @@
for (FinancialStatement financialStatement : listFinancialStatements) {
nextLine[0] = ImportExportEntityEnum.FINANCIALSTATEMENT.getLabel();
nextLine[1] = financialStatement.getLabel();
- nextLine[2] = new Boolean(
- financialStatement.getHeader()).toString();
+ nextLine[2] = Boolean.toString(
+ financialStatement.getHeader());
nextLine[3] = financialStatement.getAccounts();
nextLine[4] = financialStatement.getDebitAccounts();
nextLine[5] = financialStatement.getCreditAccounts();
nextLine[6] = financialStatement.
getProvisionDeprecationAccounts();
- nextLine[7] = new Boolean(
- financialStatement.getSubAmount()).toString();
- nextLine[8] = new Boolean(
- financialStatement.getHeaderAmount()).toString();
+ nextLine[7] = Boolean.toString(
+ financialStatement.getSubAmount());
+ nextLine[8] = Boolean.toString(
+ financialStatement.getHeaderAmount());
FinancialStatement masterFinancialStatement =
financialStatement.getMasterFinancialStatement();
String masterFinancialStatementString = "";
@@ -491,14 +491,14 @@
nextLine[0] = ImportExportEntityEnum.FINANCIALTRANSACTION.getLabel();
nextLine[1] = String.valueOf(numTransaction);
nextLine[2] =
- SDateFormat.format(financialTransaction.getTransactionDate());
+ SDATEFORMAT.format(financialTransaction.getTransactionDate());
nextLine[3] = financialTransaction.getAmountDebit().toString();
nextLine[4] = financialTransaction.getAmountCredit().toString();
nextLine[5] =
- SDateFormat.format(financialTransaction.getFinancialPeriod().
+ SDATEFORMAT.format(financialTransaction.getFinancialPeriod().
getBeginDate());
nextLine[6] =
- SDateFormat.format(financialTransaction.getFinancialPeriod().
+ SDATEFORMAT.format(financialTransaction.getFinancialPeriod().
getEndDate());
EntryBook entryBook = financialTransaction.getEntryBook();
if (entryBook != null){
@@ -513,7 +513,7 @@
nextLine[1] = String.valueOf(numTransaction);
nextLine[2] = entry.getDescription();
nextLine[3] = entry.getAmount().toString();
- nextLine[4] = new Boolean(entry.getDebit()).toString();
+ nextLine[4] = Boolean.toString(entry.getDebit());
nextLine[5] = entry.getLettering();
nextLine[6] = entry.getDetail();
nextLine[7] = entry.getVoucher();
@@ -546,9 +546,9 @@
// For all Entry
for (FiscalPeriod fiscalPeriod : listFiscalPeriod) {
nextLine[0] = ImportExportEntityEnum.FISCALPERIOD.getLabel();
- nextLine[1] = SDateFormat.format(fiscalPeriod.getBeginDate());
- nextLine[2] = SDateFormat.format(fiscalPeriod.getEndDate());
- nextLine[3] = new Boolean(fiscalPeriod.getLocked()).toString();
+ nextLine[1] = SDATEFORMAT.format(fiscalPeriod.getBeginDate());
+ nextLine[2] = SDATEFORMAT.format(fiscalPeriod.getEndDate());
+ nextLine[3] = Boolean.toString(fiscalPeriod.getLocked());
// Ajoute la ligne au fichier
csvWriter.writeNext(nextLine);
}
@@ -574,13 +574,13 @@
// For all Entry
for (ClosedPeriodicEntryBook closedPeriodicEntryBook : listClosedPeriodicEntryBook) {
nextLine[0] = ImportExportEntityEnum.CLOSEDPERIODICENTRYBOOK.getLabel();
- nextLine[1] = new Boolean(
- closedPeriodicEntryBook.getLocked()).toString();
+ nextLine[1] = Boolean.toString(
+ closedPeriodicEntryBook.getLocked());
nextLine[2] =
- SDateFormat.format(closedPeriodicEntryBook.getFinancialPeriod().
+ SDATEFORMAT.format(closedPeriodicEntryBook.getFinancialPeriod().
getBeginDate());
nextLine[3] =
- SDateFormat.format(closedPeriodicEntryBook.getFinancialPeriod().
+ SDATEFORMAT.format(closedPeriodicEntryBook.getFinancialPeriod().
getEndDate());
nextLine[4] = closedPeriodicEntryBook.getEntryBook().getCode();
// Ajoute la ligne au fichier
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -37,7 +37,6 @@
import org.chorem.lima.beans.FinancialStatementDatasImpl;
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.business.AccountingRules;
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.FinancialStatementService;
@@ -66,7 +65,7 @@
protected AccountingRules accountingRules;
@EJB
- ReportServiceLocal reportServiceLocal;
+ private ReportServiceLocal reportServiceLocal;
public FinancialStatementServiceImpl() {
LimaConfig config = LimaConfig.getInstance();
@@ -84,7 +83,7 @@
public void createFinancialStatementWithTransaction(
FinancialStatement masterFinancialStatement,
FinancialStatement financialStatement, TopiaContext topiaContext)
- throws LimaException, LimaBusinessException {
+ throws LimaException {
try {
@@ -126,7 +125,7 @@
}
@Override
- public void createFinancialStatement(FinancialStatement masterFinancialStatement, FinancialStatement financialStatement) throws LimaException, LimaBusinessException {
+ public void createFinancialStatement(FinancialStatement masterFinancialStatement, FinancialStatement financialStatement) throws LimaException {
TopiaContext transaction = null;
try {
@@ -144,7 +143,7 @@
@Override
- public void removeFinancialStatement(FinancialStatement financialStatement) throws LimaException, LimaBusinessException {
+ public void removeFinancialStatement(FinancialStatement financialStatement) throws LimaException {
TopiaContext transaction = null;
try {
@@ -189,8 +188,7 @@
@Override
- public void removeAllFinancialStatement() throws LimaException,
- LimaBusinessException {
+ public void removeAllFinancialStatement() throws LimaException {
for (FinancialStatement financialStatement : getChildrenFinancialStatement(null)) {
removeFinancialStatement(financialStatement);
}
@@ -212,7 +210,7 @@
}
@Override
- public List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement, List<FinancialStatement> result) throws LimaException, LimaBusinessException {
+ public List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement, List<FinancialStatement> result) throws LimaException {
List<FinancialStatement> childFinancialStatements =
getChildrenFinancialStatement(financialStatement);
for (FinancialStatement childFinancialStatement: childFinancialStatements) {
@@ -250,7 +248,7 @@
@Override
- public void updateFinancialStatement(FinancialStatement financialStatement) throws LimaException, LimaBusinessException {
+ public void updateFinancialStatement(FinancialStatement financialStatement) throws LimaException {
TopiaContext transaction = null;
try {
transaction = beginTransaction();
@@ -460,8 +458,8 @@
if (accountsNumberList != null){
//Remove Spaces
AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
- accountsNumberList = StringUtils.deleteWhitespace(accountsNumberList);
- StringTokenizer stQuote = new StringTokenizer(accountsNumberList, "-");
+ String result = StringUtils.deleteWhitespace(accountsNumberList);
+ StringTokenizer stQuote = new StringTokenizer(result, "-");
while (stQuote.hasMoreTokens()) {
String s = stQuote.nextToken();
List<Account> accountsList = accountDAO.stringToListAccounts(s, false);
@@ -526,7 +524,7 @@
@Override
public String checkFinancialStatementChart() throws LimaException {
- String result =_("lima-business.financialstatement.check.warn");
+ StringBuffer result = new StringBuffer(_("lima-business.financialstatement.check.warn"));
TopiaContext transaction = null;
try {
transaction = beginTransaction();
@@ -562,8 +560,8 @@
for (Account account : accountsList) {
- result += _("lima-business.financialstatement.check.nothing")
- + " : "+account.getAccountNumber()+" - "+account.getLabel()+"\n";
+ result.append(_("lima-business.financialstatement.check.nothing")
+ + " : "+account.getAccountNumber()+" - "+account.getLabel()+"\n");
}
}
@@ -573,7 +571,7 @@
finally {
doFinally(transaction, log);
}
- return result;
+ return result.toString();
}
public List<FinancialStatement> findFinancialStatementByAccountNumber(String accountNumber, TopiaContext topiaContext) throws TopiaException{
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,9 +19,7 @@
package org.chorem.lima.business.ejb;
-import static org.nuiton.i18n.I18n._;
import java.math.BigDecimal;
-import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
@@ -651,12 +649,12 @@
else if (accountsList != null){
AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
List<Account> accounts = accountDAO.stringToListAccounts(accountsList, false);
- String accountNumbers = "0,";
+ StringBuffer accountNumbers = new StringBuffer("0,");
int max = accounts.size();
for (int i = 1; i <= max; i++) {
- accountNumbers += accounts.get(i-1).getAccountNumber();
+ accountNumbers.append(accounts.get(i-1).getAccountNumber());
if (i != max){
- accountNumbers += ",";
+ accountNumbers.append(",");
}
}
if (accounts.size() > 0){
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,7 +19,6 @@
package org.chorem.lima.business.ejb;
-import static org.nuiton.i18n.I18n._;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -63,7 +62,7 @@
protected AccountingRules accountingRules;
@EJB
- FinancialPeriodServiceLocal financialPeriodService;
+ private FinancialPeriodServiceLocal financialPeriodService;
public FiscalPeriodServiceImpl() {
LimaConfig config = LimaConfig.getInstance();
@@ -222,7 +221,7 @@
try {
transaction = beginTransaction();
- if (fiscalPeriod.getLocked()==true){
+ if (fiscalPeriod.getLocked()){
throw new LimaBusinessException("Fiscal Period already blocked");
}
//check rules
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -57,11 +57,10 @@
@Stateless
public class HttpServerServiceImpl extends AbstractLimaService implements HttpServerService, HttpServerServiceLocal {
- private static final Log log =
- LogFactory.getLog(HttpServerServiceImpl.class);
+ private static final Log log = LogFactory.getLog(HttpServerServiceImpl.class);
@EJB
- DocumentService documentService;
+ private DocumentService documentService;
protected Server server;
@@ -69,8 +68,7 @@
protected int port;
- private static SimpleDateFormat dateFormat =
- new SimpleDateFormat("yyyy-MM-dd");
+ private static SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd");
public HttpServerServiceImpl() {
path = LimaConfig.getInstance().getReportsDir();
@@ -110,7 +108,7 @@
/** this servlet send a static html page */
public class MainServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
- String serverAddressConfig = LimaConfig.getInstance().getAddressServer();
+ private String serverAddressConfig = LimaConfig.getInstance().getAddressServer();
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
@@ -139,8 +137,8 @@
+ model +formatsEnum.getExtension());
//create docs
try {
- Date beginDateFormat = dateFormat.parse(beginDate);
- Date endDateFormat = dateFormat.parse(endDate);
+ Date beginDateFormat = DATEFORMAT.parse(beginDate);
+ Date endDateFormat = DATEFORMAT.parse(endDate);
switch (DocumentsEnum.valueOfLink(model)) {
case BALANCE:
@@ -177,7 +175,7 @@
// else return home html
else {
resp.setContentType(FormatsEnum.HTML.getMimeType());
- String pageContent = "";
+ StringBuffer pageContent = new StringBuffer();
String serverAdress = "http://";
log.info("Page load");
@@ -198,7 +196,7 @@
beginDatePicker =
DateUtils.truncate(beginDatePicker, Calendar.YEAR);
- pageContent = "<!DOCTYPE html>\n"
+ pageContent.append("<!DOCTYPE html>\n"
+ "<html lang=\"fr\">\n"
+ "<head>\n"
+ "<title>LIMA Documents Report</title>\n"
@@ -216,29 +214,29 @@
+ "<td rowspan=3><form method=GET action="
+ serverAdress + ">\n"
+ _("lima-business.document.date.begin")
- + "<input value=\""+dateFormat.format(beginDatePicker)
+ + "<input value=\""+DATEFORMAT.format(beginDatePicker)
+ "\" type=\"date\" name=\"beginDate\">\n"
+ _("lima-business.document.date.end")
- + "<input value=\""+dateFormat.format(endDatePicker)
+ + "<input value=\""+DATEFORMAT.format(endDatePicker)
+ "\" type=\"date\" name=\"endDate\">\n<br/><br/>"
- + "Format : <select name=\"format\">";
+ + "Format : <select name=\"format\">");
for (FormatsEnum formatsEnum : FormatsEnum.values()) {
- pageContent += "<option value=\""
+ pageContent.append("<option value=\""
+ formatsEnum.getExtension()+"\">"
- + formatsEnum.getDescription()+"</option>\n";
+ + formatsEnum.getDescription()+"</option>\n");
}
- pageContent += "</select>\n"
- + "Documents : <select name=\"model\">";
+ pageContent.append("</select>\n"
+ + "Documents : <select name=\"model\">");
for (DocumentsEnum documentsEnum : DocumentsEnum.values()) {
- pageContent += "<option value=\""
+ pageContent.append("<option value=\""
+ documentsEnum.getFileName()+"\">"
- + documentsEnum.getDescription()+"</option>\n";
+ + documentsEnum.getDescription()+"</option>\n");
}
- pageContent += "</select>\n"
+ pageContent.append("</select>\n"
+ "<tr><td><img src=\"?img=entries.png\"/></td></tr>\n"
+ "<tr><td><img src=\"?img=accounts.png\"/></td></tr>\n"
+ "<tr><td><img src=\"?img=entrybooks.png\"/></td>\n"
@@ -247,9 +245,9 @@
+ "<tr><td><img src=\"?img=fiscalperiods.png\"/></td></tr>\n"
+ "</table>\n"
+ "</body>\n"
- + "</html>";
+ + "</html>");
- resp.getWriter().write(pageContent);
+ resp.getWriter().write(pageContent.toString());
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -123,27 +123,27 @@
// Services
@EJB
- AccountServiceLocal accountService;
+ private AccountServiceLocal accountService;
@EJB
- FiscalPeriodServiceLocal fiscalPeriodService;
+ private FiscalPeriodServiceLocal fiscalPeriodService;
@EJB
- FinancialPeriodServiceLocal financialPeriodService;
+ private FinancialPeriodServiceLocal financialPeriodService;
@EJB
- FinancialTransactionServiceLocal financialTransactionService;
+ private FinancialTransactionServiceLocal financialTransactionService;
@EJB
- FinancialStatementServiceLocal financialStatementService;
+ private FinancialStatementServiceLocal financialStatementService;
@EJB
- EntryBookServiceLocal entryBookService;
+ private EntryBookServiceLocal entryBookService;
@EJB
- IdentityServiceLocal identityService;
+ private IdentityServiceLocal identityService;
- private static final SimpleDateFormat SDateFormat = new SimpleDateFormat(
+ private static final SimpleDateFormat SDATEFORMAT = new SimpleDateFormat(
"dd,MM,yyyy HH:mm:ss");
public ImportServiceImpl() {
@@ -162,7 +162,7 @@
@Override
public String importEntriesFromEbp(String datas) throws LimaException {
SimpleDateFormat epbDateFormat = new SimpleDateFormat("dd/MM/yyyy");
- String result = "";
+ StringBuffer result = new StringBuffer();
TopiaContext topiaContext = null;
try {
@@ -232,9 +232,9 @@
else if (date.compareTo(beginDate) < 0 || date.compareTo(endDate) > 0){
- result += "WARNING : " + date + " entries is out of range of" +
+ result.append("WARNING : " + date + " entries is out of range of" +
" opened fiscal periods. "
- + "Entry was skip !\n";
+ + "Entry was skip !\n");
}
else {
entry.setAccount(account);
@@ -260,8 +260,8 @@
entryBook.setCode(entryBookCode);
// create it
entryBookService.createEntryBook(entryBook);
- result += "WARNING : Entrybook " + entryBook
- + "not exist was created !\n";
+ result.append("WARNING : Entrybook " + entryBook
+ + "not exist was created !\n");
}
if (financialTransaction == null
@@ -287,15 +287,15 @@
financialTransactionService
.createFinancialTransactionWithTransaction(
financialTransaction, topiaContext);
- result += "SUCCES : FinancialTransaction" + date + " "
- + entryBook.getCode() + " added\n";
+ result.append("SUCCES : FinancialTransaction" + date + " "
+ + entryBook.getCode() + " added\n");
}
financialTransaction.addEntry(entry);
financialTransactionService.createEntryWithTransaction(
entry, topiaContext);
- result += "SUCCES : Entry" + entry.getDescription() + " "
- + entry.getAmount() + " added\n";
+ result.append("SUCCES : Entry" + entry.getDescription() + " "
+ + entry.getAmount() + " added\n");
}
}
// update last financial transaction
@@ -320,12 +320,12 @@
} finally {
doFinally(topiaContext, log);
}
- return result;
+ return result.toString();
}
@Override
public String importAccountsChartFromEbp(String datas) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
TopiaContext topiaContext = null;
try {
@@ -355,8 +355,8 @@
for (AccountEBP accountEBP : list) {
String accountNumber = accountEBP.getNumero();
if (accountDAO.findByAccountNumber(accountNumber) != null) {
- result += "FAILED : Account" + accountNumber
- + " already exist \n";
+ result.append("FAILED : Account" + accountNumber
+ + " already exist \n");
} else {
String label = accountEBP.getIntitule();
Account account = new AccountImpl();
@@ -376,8 +376,8 @@
}
accountService.createSubLedgerWithTransaction(
masterAccount, account, topiaContext);
- result += "SUCCES : Account" + accountNumber + " "
- + label + " added\n";
+ result.append("SUCCES : Account" + accountNumber + " "
+ + label + " added\n");
}
// else is account
else {
@@ -386,8 +386,8 @@
if (nbCharAccountNumber == 1) {
accountService.createAccountWithTransaction(null,
account, topiaContext);
- result += "SUCCES : Account" + accountNumber + " "
- + label + " added\n";
+ result.append("SUCCES : Account" + accountNumber + " "
+ + label + " added\n");
}
else {
Account masterAccount = null;
@@ -401,8 +401,8 @@
}
accountService.createAccountWithTransaction(
masterAccount, account, topiaContext);
- result += "SUCCES : Account" + accountNumber + " "
- + label + " added\n";
+ result.append("SUCCES : Account" + accountNumber + " "
+ + label + " added\n");
}
}
}
@@ -417,7 +417,7 @@
doFinally(topiaContext, log);
}
- return result;
+ return result.toString();
}
@Override
@@ -439,7 +439,7 @@
*/
@Override
public String importAllAsCSV(String datas) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
Map<String, AccountImport> accounts = new TreeMap<String, AccountImport>();
@@ -470,20 +470,20 @@
if (importExportEntityEnum != null) {
switch (importExportEntityEnum) {
case ACCOUNT:
- result += importAccountsChartsCSV(nextLine, accounts,
- topiaContext);
+ result.append(importAccountsChartsCSV(nextLine, accounts,
+ topiaContext));
break;
case ENTRYBOOK:
- result += importEntryBooksChartCSV(nextLine,
- topiaContext);
+ result.append(importEntryBooksChartCSV(nextLine,
+ topiaContext));
break;
case FINANCIALSTATEMENT:
- result += importFinancialsStatementChartCSV(nextLine,
- financialStatements, topiaContext);
+ result.append(importFinancialsStatementChartCSV(nextLine,
+ financialStatements, topiaContext));
break;
case FISCALPERIOD:
- result += importFiscalPeriodCSV(nextLine,
- fiscalPeriods, topiaContext);
+ result.append(importFiscalPeriodCSV(nextLine,
+ fiscalPeriods, topiaContext));
break;
case CLOSEDPERIODICENTRYBOOK:
importClosedPeriodicEntryBookCSV(nextLine,
@@ -504,19 +504,19 @@
}
// create accounts
- result += createAccounts(accounts, topiaContext);
+ result.append(createAccounts(accounts, topiaContext));
// create financialStatements
- result += createFinancialStatements(financialStatements,
- topiaContext);
+ result.append(createFinancialStatements(financialStatements,
+ topiaContext));
// create fiscalperiod
Collections.sort(fiscalPeriods, new FiscalPeriodComparator());
- result += createFiscalPeriod(fiscalPeriods, topiaContext);
+ result.append(createFiscalPeriod(fiscalPeriods, topiaContext));
// update closedperiodicentrybooks
- result += updateClosedPeriodicEntryBooks(closedPeriodicEntryBooks,
- topiaContext);
+ result.append(updateClosedPeriodicEntryBooks(closedPeriodicEntryBooks,
+ topiaContext));
// create financialtransaction and entries
- result += createFinancialTransactionsAndEntries(
- financialTransactions, entries, topiaContext);
+ result.append(createFinancialTransactionsAndEntries(
+ financialTransactions, entries, topiaContext));
commitTransaction(topiaContext);
@@ -527,7 +527,7 @@
} finally {
doFinally(topiaContext, log);
}
- return result;
+ return result.toString();
}
/**
@@ -536,7 +536,7 @@
*/
@Override
public String importAsCSV(String datas, ImportExportEntityEnum importExportEntityEnum) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
// FinancialStatements
LinkedHashMap<String, ArrayList<FinancialStatementImport>> financialStatements = null;
@@ -563,17 +563,17 @@
if (ImportExportEntityEnum.valueOfLabel(nextLine[0]) == importExportEntityEnum) {
switch (importExportEntityEnum) {
case ENTRYBOOK:
- result += importEntryBooksChartCSV(nextLine, topiaContext);
+ result.append(importEntryBooksChartCSV(nextLine, topiaContext));
break;
case ACCOUNT:
- result += importAccountsChartsCSV(nextLine, accounts,
- topiaContext);
+ result.append(importAccountsChartsCSV(nextLine, accounts,
+ topiaContext));
break;
case FINANCIALSTATEMENT:
- result += importFinancialsStatementChartCSV(nextLine,
- financialStatements, topiaContext);
+ result.append(importFinancialsStatementChartCSV(nextLine,
+ financialStatements, topiaContext));
break;
}
}
@@ -582,11 +582,11 @@
//create entity
switch (importExportEntityEnum) {
case ACCOUNT:
- result += createAccounts(accounts, topiaContext);
+ result.append(createAccounts(accounts, topiaContext));
break;
case FINANCIALSTATEMENT:
- result += createFinancialStatements(financialStatements,
- topiaContext);
+ result.append(createFinancialStatements(financialStatements,
+ topiaContext));
break;
}
@@ -597,7 +597,7 @@
} finally {
doFinally(topiaContext, log);
}
- return result;
+ return result.toString();
}
@@ -610,7 +610,7 @@
public String importAccountsChartsCSV(String[] nextLine,
Map<String, AccountImport> accounts, TopiaContext topiaContext)
throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
String accountNumber = nextLine[1];
String label = nextLine[2];
String thirdParty = nextLine[3];
@@ -633,13 +633,13 @@
// put it in hashset
accounts.put(accountNumber, accountImport);
} else {
- result += "FAILED : The account " + accountNumber
- + " already exists !\n";
+ result.append("FAILED : The account " + accountNumber
+ + " already exists !\n");
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
- return result;
+ return result.toString();
}
/**
@@ -649,24 +649,24 @@
public String importFiscalPeriodCSV(String[] nextLine,
List<FiscalPeriod> fiscalPeriods, TopiaContext topiaContext)
throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
try {
FiscalPeriodDAO fiscalPeriodDAO = LimaCallaoDAOHelper
.getFiscalPeriodDAO(topiaContext);
FiscalPeriod fiscalPeriod = new FiscalPeriodImpl();
- Date beginDate = SDateFormat.parse(nextLine[1]);
+ Date beginDate = SDATEFORMAT.parse(nextLine[1]);
fiscalPeriod.setBeginDate(beginDate);
- Date endDate = SDateFormat.parse(nextLine[2]);
+ Date endDate = SDATEFORMAT.parse(nextLine[2]);
fiscalPeriod.setEndDate(endDate);
- fiscalPeriod.setLocked(new Boolean(nextLine[3]));
+ fiscalPeriod.setLocked(Boolean.parseBoolean(nextLine[3]));
// if not exist, skip
if (fiscalPeriodDAO.findByNaturalId(beginDate, endDate) == null) {
fiscalPeriods.add(fiscalPeriod);
} else {
- result += "FAILED : The fiscalperiod " + beginDate + "-"
- + endDate + " already exists !\n";
+ result.append("FAILED : The fiscalperiod " + beginDate + "-"
+ + endDate + " already exists !\n");
}
} catch (ParseException eeePE) {
if (log.isDebugEnabled()) {
@@ -675,7 +675,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
- return result;
+ return result.toString();
}
/**
@@ -683,7 +683,7 @@
*/
public String importEntryBooksChartCSV(String[] nextLine,
TopiaContext topiaContext) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
try {
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
@@ -696,18 +696,18 @@
// if exist, skip
if (entryBookDAO.findByCode(entryBook.getCode()) != null) {
- result += "FAILED : The entrybook " + entryBook.getLabel()
- + " already exists !\n";
+ result.append("FAILED : The entrybook " + entryBook.getLabel()
+ + " already exists !\n");
} else {
// create it
entryBookService.createEntryBook(entryBook);
- result += "SUCCESS : The financialStatement "
- + entryBook.getLabel() + " is created ! \n";
+ result.append("SUCCESS : The financialStatement "
+ + entryBook.getLabel() + " is created ! \n");
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
- return result;
+ return result.toString();
}
/**
@@ -722,7 +722,7 @@
String endDate = nextLine[3];
String entryBookCode = nextLine[4];
- if (new Boolean(locked)) {
+ if (Boolean.parseBoolean(locked)) {
ClosedPeriodicEntryBookImport closedPeriodicEntryBookImport = new ClosedPeriodicEntryBookImportImpl();
closedPeriodicEntryBookImport.setLocked(locked);
closedPeriodicEntryBookImport
@@ -744,7 +744,7 @@
public String importFinancialsStatementChartCSV(String[] nextLine,
LinkedHashMap<String, ArrayList<FinancialStatementImport>> financialStatements,
TopiaContext topiaContext) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
String label = nextLine[1];
String header = nextLine[2];
@@ -788,13 +788,13 @@
financialStatements.put(label, (ArrayList<FinancialStatementImport>) list);
}
} else {
- result += "FAILED : The financialstatement " + label
- + " already exists !\n";
+ result.append("FAILED : The financialstatement " + label
+ + " already exists !\n");
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
- return result;
+ return result.toString();
}
/**
@@ -852,7 +852,7 @@
public String createFinancialStatements(LinkedHashMap<String, ArrayList<FinancialStatementImport>> financialStatements,
TopiaContext topiaContext) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
try {
FinancialStatementDAO financialStatementDAO = LimaCallaoDAOHelper
@@ -911,18 +911,18 @@
masterFinancialStatement,
financialStatement, topiaContext);
- result += "SUCCESS : The financialStatement "
+ result.append("SUCCESS : The financialStatement "
+ financialStatementImport.getLabel()
- + " is created ! \n";
+ + " is created ! \n");
itr2.remove();
} else if (!financialStatements
.containsKey(masterFinancialStatementLabel)) {
- result += "FAILED : The financialStatement "
+ result.append("FAILED : The financialStatement "
+ financialStatementImport.getLabel()
+ " have masterFinancialStatement : "
+ masterFinancialStatementLabel
- + "which not exist \n";
+ + "which not exist \n");
itr2.remove();
}
}
@@ -934,30 +934,30 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
- return result;
+ return result.toString();
}
public String createFiscalPeriod(List<FiscalPeriod> fiscalPeriods,
TopiaContext topiaContext) {
- String result = "";
+ StringBuffer result = new StringBuffer();
for (FiscalPeriod fiscalPeriod : fiscalPeriods) {
// create fiscalPeriod
try {
fiscalPeriodService.createFiscalPeriodWithTransaction(
fiscalPeriod, topiaContext);
- result += "SUCCESS : The fiscalPeriod "
+ result.append("SUCCESS : The fiscalPeriod "
+ fiscalPeriod.getBeginDate() + "-"
- + fiscalPeriod.getEndDate() + " is created ! \n";
+ + fiscalPeriod.getEndDate() + " is created ! \n");
} catch (LimaException eee) {
- result += "FAILED : " + eee + " \n";
+ result.append("FAILED : " + eee + " \n");
}
}
- return result;
+ return result.toString();
}
public String createAccounts(Map<String, AccountImport> accounts,
TopiaContext topiaContext) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
try {
AccountDAO accountDAO = LimaCallaoDAOHelper
@@ -993,16 +993,16 @@
accountService.createAccountWithTransaction(
masterAccount, account, topiaContext);
}
- result += "SUCCESS : The account "
+ result.append("SUCCESS : The account "
+ accountImport.getAccountNumber()
- + " is created ! \n";
+ + " is created ! \n");
itr.remove();
} else if (!accounts.containsKey(masterAccountNumber)
&& !accounts.containsKey(generalLedgerNumber)) {
- result += "FAILED : The account "
+ result.append("FAILED : The account "
+ accountImport.getAccountNumber()
+ " have masterAccount : "
- + masterAccountNumber + "which not exist \n";
+ + masterAccountNumber + "which not exist \n");
itr.remove();
}
}
@@ -1010,13 +1010,13 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
- return result;
+ return result.toString();
}
public String updateClosedPeriodicEntryBooks(
List<ClosedPeriodicEntryBookImport> closedPeriodicEntryBooks,
TopiaContext topiaContext) throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
try {
FinancialPeriodDAO financialPeriodDAO = LimaCallaoDAOHelper
@@ -1027,10 +1027,10 @@
.getClosedPeriodicEntryBookDAO(topiaContext);
for (ClosedPeriodicEntryBookImport closedPeriodicEntryBookImport : closedPeriodicEntryBooks) {
// update closedPeriodicEntryBook
- Date beginDateFinancialPeriod = SDateFormat
+ Date beginDateFinancialPeriod = SDATEFORMAT
.parse(closedPeriodicEntryBookImport
.getBeginDateFinancialPeriod());
- Date endDateFinancialPeriod = SDateFormat
+ Date endDateFinancialPeriod = SDATEFORMAT
.parse(closedPeriodicEntryBookImport
.getEndDateFinancialPeriod());
FinancialPeriod financialPeriod = financialPeriodDAO
@@ -1046,12 +1046,12 @@
financialPeriodService
.blockClosedPeriodicEntryBookWithTransaction(
closedPeriodicEntryBook, topiaContext);
- result += "SUCCESS : The blockClosedPeriodicEntryBook "
+ result.append("SUCCESS : The blockClosedPeriodicEntryBook "
+ beginDateFinancialPeriod + "-"
+ endDateFinancialPeriod + ", " + codeEntryBook
- + " is updated ! \n";
+ + " is updated ! \n");
} catch (LimaException eee) {
- result += "FAILED : " + eee + " \n";
+ result.append("FAILED : " + eee + " \n");
}
}
} catch (TopiaException eeeTE) {
@@ -1061,14 +1061,14 @@
log.debug("Can't parse date", eeePE);
}
}
- return result;
+ return result.toString();
}
public String createFinancialTransactionsAndEntries(
Map<Integer, FinancialTransactionImport> financialTransactions,
Map<Integer, List<EntryImport>> entries, TopiaContext topiaContext)
throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
try {
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
@@ -1085,7 +1085,7 @@
FinancialTransactionImport financialTransactionImport = map
.getValue();
FinancialTransaction financialTransaction = new FinancialTransactionImpl();
- Date dateFinancialTransaction = SDateFormat
+ Date dateFinancialTransaction = SDATEFORMAT
.parse(financialTransactionImport.getDate());
financialTransaction
.setTransactionDate(dateFinancialTransaction);
@@ -1112,7 +1112,7 @@
entry.setAccount(account);
entry.setDescription(entryImport.getDescription());
entry.setAmount(new BigDecimal(entryImport.getAmount()));
- entry.setDebit(new Boolean(entryImport.getDebit()));
+ entry.setDebit(Boolean.parseBoolean(entryImport.getDebit()));
entry.setLettering(entryImport.getLettering());
entry.setDetail(entryImport.getDetail());
entry.setVoucher(entryImport.getVoucher());
@@ -1128,12 +1128,12 @@
log.debug("Can't parse date", eeePE);
}
}
- return result;
+ return result.toString();
}
public String importIdentity(String[] nextLine, TopiaContext topiaContext)
throws LimaException {
- String result = "";
+ StringBuffer result = new StringBuffer();
Identity identity = new IdentityImpl();
nextLine[0] = ImportExportEntityEnum.IDENTITY.getLabel();
@@ -1151,10 +1151,10 @@
identityService.updateIdentityWithTransaction(identity, topiaContext);
// create it
- result += "SUCCESS : The identity " + identity.getName()
- + " is created ! \n";
+ result.append("SUCCESS : The identity " + identity.getName()
+ + " is created ! \n");
- return result;
+ return result.toString();
}
protected TopiaContext beginTransaction() throws TopiaException {
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/RecordServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/RecordServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/RecordServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,371 +0,0 @@
-/* *##% Lima Business
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*
- */
-
-package org.chorem.lima.business.ejb;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.ejb.Stateless;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaConfig;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.RecordService;
-import org.chorem.lima.business.ejbinterface.RecordServiceLocal;
-import org.chorem.lima.entity.LimaCallaoDAOHelper;
-import org.chorem.lima.entity.Record;
-import org.chorem.lima.entity.RecordDAO;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaContextFactory;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.TopiaNotFoundException;
-
-/**
- * Permet d'ajouter des logs au systeme.
- *
- * ATTENTION on ne peut supprimer un log.
- *
- * @author Rémi Chapelet
- */
-@Stateless
-public class RecordServiceImpl implements RecordService, RecordServiceLocal {
-
- /** log */
- private static final Log log = LogFactory.getLog(RecordServiceImpl.class);
-
- private TopiaContext rootContext;
-
-
- public RecordServiceImpl() {
- LimaConfig config = LimaConfig.getInstance();
- try {
- rootContext = TopiaContextFactory.getContext(config.getOptions());
- } catch (TopiaNotFoundException ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't init topia context", ex);
- }
- }
- }
-
- /**
- * Création d'un log dans le systeme.
- *
- * @param entryLog date de creation du log
- * @throws LimaException
- */
- public void addLog(Record entryLog) throws LimaException {
- /*String result = ServiceHelper.RESPOND_ERROR;
- try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- EntryLogDAO logDAO = LimaCallaoDAOHelper.getEntryLogDAO(topiaContext);
- // Creation du log
- EntryLog newlog = logDAO.create();
- newlog.setLogDate(logDate);
- newlog.setTransDate(transDate);
- newlog.setVoucherRef(voucherRef);
- newlog.setType(type);
- newlog.setTransDesc(transDesc);
- newlog.setEntryDesc(entryDesc);
- newlog.setAmount(amount);
- newlog.setDebit(debit);
- newlog.setLettering(lettering);
- // Création BDD
- topiaContext.commitTransaction();
- // Fermeture BDD
- topiaContext.closeContext();
- // Affichage pour les logs
- String topiaId = newlog.getTopiaId();
- if (log.isInfoEnabled()) {
- log.info("Log created: "+ topiaId);
- }
- result = ServiceHelper.RESPOND_SUCCESS;
- }catch (TopiaException e) {
- log.error(e);
- }
- return result;*/
-
- TopiaContext transaction = null;
- try {
- // basic check done, make check in database
- // TODO move it into JTA
- transaction = rootContext.beginTransaction();
-
- // creation
- RecordDAO recordDAO = LimaCallaoDAOHelper
- .getRecordDAO(transaction);
- recordDAO.create(entryLog);
-
- // commit
- transaction.commitTransaction();
- } catch (TopiaException ex) {
- if (transaction != null) {
- try {
- transaction.rollbackTransaction();
- } catch (TopiaException e) {
- if (log.isErrorEnabled()) {
- log.error("Error during rollback context", ex);
- }
- }
- }
- if (log.isErrorEnabled()) {
- log.error("Error during create account", ex);
- }
- throw new LimaException("Can't create entry log", ex);
- } finally {
- if (transaction != null) {
- try {
- transaction.closeContext();
- } catch (TopiaException ex) {
- if (log.isErrorEnabled()) {
- log.error("Error during rollback context", ex);
- }
- throw new LimaException("Can't create entry log", ex);
- }
- }
- }
- }
-
- /*
- * Création d'un log à partir d'un log DTO.
- * @param logDTO log en format DTO qu'on souhaite créer
- * @return
- *
- public String addLog (LogDTO logDTO) {
- String result = ServiceHelper.RESPOND_ERROR;
- // Vérifie si logDTO existe
- if (logDTO != null)
- {
- result = addLog(logDTO.getLogDate(),logDTO.getTransDate(),logDTO.getType(),
- logDTO.getVoucherRef(),logDTO.getTransDesc(),logDTO.getEntryDesc(),
- logDTO.getAmount(),logDTO.isDebit(),logDTO.getLettering());
- }
- return result;
- }*/
-
- /**
- * Recherche tous les logs dans la base de donnees.
- *
- * @return la liste des logs
- * @throws LimaException
- */
- public List<Record> listeAllLog() throws LimaException {
- /*List<EntryLog> listelog = null;
- try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- EntryLogDAO logDAO = LimaCallaoDAOHelper
- .getEntryLogDAO(topiaContext);
- // recherche des log
- listelog = logDAO.findAll();
- // Fermeture BDD
- topiaContext.closeContext();
- if (log.isInfoEnabled()) {
- log.info("Search all logs");
- }
- } catch (TopiaException e) {
- log.error(e);
- }
- return listelog;*/
-
- List<Record> entryLogsList = new ArrayList<Record>();
- TopiaContext transaction = null;
- try {
- // basic check done, make check in database
- // TODO move it into JTA
- transaction = rootContext.beginTransaction();
-
- // creation
- RecordDAO recordDAO = LimaCallaoDAOHelper
- .getRecordDAO(transaction);
- List<Record> entryLogs = recordDAO.findAll();
- entryLogsList.addAll(entryLogs);
-
- // commit
- transaction.commitTransaction();
- } catch (TopiaException ex) {
- if (transaction != null) {
- try {
- transaction.rollbackTransaction();
- } catch (TopiaException e) {
- if (log.isErrorEnabled()) {
- log.error("Error during rollback context", ex);
- }
- }
- }
- if (log.isErrorEnabled()) {
- log.error("Error during create account", ex);
- }
- throw new LimaException("Can't create entry log", ex);
- } finally {
- if (transaction != null) {
- try {
- transaction.closeContext();
- } catch (TopiaException ex) {
- if (log.isErrorEnabled()) {
- log.error("Error during rollback context", ex);
- }
- throw new LimaException("Can't create entry log", ex);
- }
- }
- }
-
- return entryLogsList;
- }
-
- /*
- * Permet de renvoyer tous les logs au format DTO.
- * @return
- *
- public List<LogDTO> listeAllLogDTO() {
- List<LogDTO> listLogDTO = new ArrayList<LogDTO>();
- // On recherche tous les logs.
- List<EntryLog> listLog = listeAllLog();
- // Pour chaque log, on le converti en logDTO et on l'ajoute à la nouvelle liste de DTO
- for (EntryLog log : listLog) {
- // conerti de l'entity en DTO
- LogDTO logDTO = convertLog.logEntityToDto(log);
- // Ajoute à la liste des logs DTO
- listLogDTO.add(logDTO);
- }
- return listLogDTO;
- }*/
-
- /*
- * Renvoie une liste de tous les logs suivant la date de creation
- * @param datecreate date de creation des logs recherchés
- * @return une liste des logs trouves
- *
- public List<EntryLog> searchLogWithDateCreate(Date dateCreate) {
- List<EntryLog> listelog = null;
- try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- EntryLogDAO logDAO = LimaCallaoDAOHelper
- .getEntryLogDAO(topiaContext);
- // recherche des log
- listelog = logDAO.findAllByLogDate(dateCreate);
- // Fermeture BDD
- topiaContext.closeContext();
- if (log.isInfoEnabled()) {
- log.info("Log(s) find : " + listelog.size() + "log(s)");
- }
- } catch (TopiaException e) {
- log.error(e);
- }
- return listelog;
- }*/
-
- /*
- * Permet de rechercher tous les logs suivant la date de création, c'est à
- * dire de l'opération effectuée sur une entry à un jour précis, et qui a
- * déclenchée automatiquement une création de log.
- * La méthode renvoie sous forme de liste, en convertissant les objets
- * entitys en DTO.
- * @param dateCreate date de création des logs recherchés
- * @return
- *
- public List<LogDTO> searchLogDTOWithDateCreate(Date dateCreate) {
- List<LogDTO> listLogDTO = new ArrayList<LogDTO>();
- // On recherche tous les logs suivant la date de création.
- List<EntryLog> listLog = searchLogWithDateCreate(dateCreate);
- // Pour chaque log, on le converti en logDTO et on l'ajoute à la nouvelle liste de DTO
- for (EntryLog log : listLog) {
- // conerti de l'entity en DTO
- LogDTO logDTO = convertLog.logEntityToDto(log);
- // Ajoute à la liste des logs DTO
- listLogDTO.add(logDTO);
- }
- return listLogDTO;
- }*/
-
- /*
- * Recherche un log avec son identifiant topiaId.
- * @param topiaId identifiant d'un log
- * @return
- *
- public EntryLog searchLogWithTopiaId(String topiaId) {
- EntryLog logSearch = null;
- try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- EntryLogDAO logDAO = LimaCallaoDAOHelper
- .getEntryLogDAO(topiaContext);
- // Creation du journal
- logSearch = logDAO.findByTopiaId(topiaId);
- // Fermeture BDD
- topiaContext.closeContext();
- } catch (TopiaException e) {
- log.error(e);
- }
- return logSearch;
- }*/
-
- /*
- * Efface un log : uniquement utilisé pour supprimer les logs dans les tests
- * unitaires.
- * @param topiaId identifiant du log à supprimer
- * @return
- *
- public String removeLog(String topiaId) {
- String result = ServiceHelper.RESPOND_ERROR;
- EntryLog logDelete = searchLogWithTopiaId(topiaId);
- // Si le log n'existe pas
- if (logDelete == null) {
- if (log.isWarnEnabled()) {
- log.warn("Le log " + topiaId + " n'existe pas !");
- }
- } else // Sinon on efface le log
- {
- try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- EntryLogDAO logDAO = LimaCallaoDAOHelper
- .getEntryLogDAO(topiaContext);
- // Supprime le log
- logDAO.delete(logDelete);
- // Création BDD
- topiaContext.commitTransaction();
- // Fermeture BDD
- topiaContext.closeContext();
- result = ServiceHelper.RESPOND_SUCCESS;
- } catch (TopiaException e) {
- log.error(e);
- }
- }
- return result;
- }*/
-
- /*
- * Permet de supprimer un log à partir de son DTO.
- * @param logDTO log à supprimer
- * @return
- *
- public String removeLog(LogDTO logDTO) {
- String result = removeLog(logDTO.getId());
- return result;
- }*/
-}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -105,7 +105,7 @@
BigDecimal solde = new BigDecimal(0);
List<Entry> entries = new ArrayList<Entry>();
if (account != null){
-
+
//Get allsubaccounts and thirdParts accounts
List<Account> accounts = (List<Account>) account.getSubAccounts();
if (thirdPartAccountsMode){
@@ -183,7 +183,6 @@
* Get list entries
* Calculate all credit, debit and solde amounts for the accounts reports
*/
- @SuppressWarnings("unchecked")
protected ReportsDatas generateSubAccountReportsWithTransaction(Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException {
ReportsDatas reportsDatas = new ReportsDatasImpl();
BigDecimal credit = new BigDecimal(0);
@@ -254,7 +253,6 @@
*
* Get all entries if true
*/
- @SuppressWarnings("unchecked")
protected ReportsDatas generateSubAccountBalanceWithTransaction(Account account, Date beginDate, Date endDate, Boolean getEntries, TopiaContext topiaContext) throws LimaException {
ReportsDatas reportsDatas = new ReportsDatasImpl();
BigDecimal credit = new BigDecimal(0);
@@ -332,7 +330,6 @@
* Just balanced transaction are calculated
*
*/
- @SuppressWarnings({ "unchecked" })
@Override
public ReportsDatas generateEntryBooksReports(EntryBook entryBook, Date beginDate, Date endDate) throws LimaException {
ReportsDatas reportsDatas = new ReportsDatasImpl();
@@ -468,15 +465,15 @@
List<Account> accounts =null;
//Remove Spaces
- selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts);
+ String result = StringUtils.deleteWhitespace(selectedAccounts);
//if no filter account
- if (selectedAccounts == null || selectedAccounts.equals("")){
+ if (result == null || result.equals("")){
accounts = accountDAO.findAll();
}
//build list account from selectedAccounts
else{
accounts = accountDAO.stringToListAccounts(
- selectedAccounts, false);
+ result, false);
}
for (Account account : accounts) {
ReportsDatas reportsDatas =
@@ -549,15 +546,4 @@
return topiaTransaction;
}
- protected void commitTransaction(TopiaContext topiaTransaction) throws TopiaException {
- try {
- topiaTransaction.commitTransaction();
- } catch (TopiaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Error during commit context", eee);
- }
- throw eee;
- }
- }
-
}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/UserServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/UserServiceImpl.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/UserServiceImpl.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,114 +0,0 @@
-/* *##% Lima Business
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*
- */
-
-package org.chorem.lima.business.ejb;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaConfig;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaContextFactory;
-import org.nuiton.topia.TopiaNotFoundException;
-
-/**
- * User service.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class UserServiceImpl {
-
- /** log */
- private static final Log log = LogFactory.getLog(UserServiceImpl.class);
-
- private TopiaContext rootContext;
-
- public UserServiceImpl() {
- LimaConfig config = LimaConfig.getInstance();
- try {
- rootContext = TopiaContextFactory.getContext(config.getOptions());
- } catch (TopiaNotFoundException ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't init topia context", ex);
- }
- }
- }
-
- /**
- * Add new user.
- *
- * @param name new user name
- * @throws LimaException
- */
- /*
- public void addUser(User user/*String name) throws LimaException {
- // Attention doublon utilisateur
- try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- UsersDAO userdao = LimaCallaoDAOHelper.getUsersDAO(topiaContext);
- // Création de l'user
- Users newuser = userdao.create();
- newuser.setMatcher(name);
- // Création BDD
- topiaContext.commitTransaction();
- topiaContext.closeContext();
- if (log.isInfoEnabled()) {
- log.info("Add user : " + name);
- }
- } catch (TopiaException ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't create user", ex);
- throw new LimaException("Can't create user", ex);
- }
-
- }
- }*/
-
- /**
- * Find user with name.
- *
- * @param name
- * @throws LimaException
- */
- /*public void findUser(String name) throws LimaException {
- /*try {
- // Acces BDD
- TopiaContext topiaContext = rootContext.beginTransaction();
- // Chargement du DAO
- UsersDAO userdao = LimaCallaoDAOHelper.getUsersDAO(topiaContext);
- // Recherche du user
- Users newuser = userdao.findByMatcher(name);
- // Fermeture BDD
- topiaContext.closeContext();
- if (newuser == null) {
- throw new LimaBusinessException("can't find user " + name);
- }
- } catch (TopiaException ex) {
- if (log.isErrorEnabled()) {
- log.error("Can't find user", ex);
- throw new LimaException("Can't find user", ex);
- }
- }
- }*/
-}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -21,7 +21,6 @@
import java.util.List;
import javax.ejb.Remote;
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
@@ -51,13 +50,13 @@
* @throws LimaException
*/
//EJB Remote
- void createAccount(Account masterAccount, Account account) throws LimaException, LimaBusinessException;
+ void createAccount(Account masterAccount, Account account) throws LimaException;
- void createSubLedger(Account masterAccount, Account account) throws LimaException, LimaBusinessException;
+ void createSubLedger(Account masterAccount, Account account) throws LimaException;
- void updateAccount(Account account) throws LimaException, LimaBusinessException;
+ void updateAccount(Account account) throws LimaException;
- void removeAccount(Account account) throws LimaException, LimaBusinessException;
+ void removeAccount(Account account) throws LimaException;
void removeAllAccount() throws LimaException;
List<Account> getAllChildrenAccounts(Account masterAccount, List<Account> accounts) throws LimaException;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,10 +19,7 @@
package org.chorem.lima.business.ejbinterface;
-import java.util.List;
import javax.ejb.Local;
-
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.nuiton.topia.TopiaContext;
@@ -40,7 +37,7 @@
@Local
public interface AccountServiceLocal extends AccountService{
- void createAccountWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException, LimaBusinessException;
+ void createAccountWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException;
void createSubLedgerWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException;
}
\ No newline at end of file
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -33,10 +33,10 @@
@Remote
public interface DocumentService {
- public void createFinancialStatementsDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
- public void createLedgerDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
- public void createEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
- public void createBalanceDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
- public void createGeneralEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+ void createFinancialStatementsDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+ void createLedgerDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+ void createEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+ void createBalanceDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+ void createGeneralEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -30,5 +30,4 @@
@Local
public interface DocumentServiceLocal {
-
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -39,6 +39,6 @@
@Local
public interface EntryBookServiceLocal extends EntryBookService {
- public void createEntryBookWithTransaction(EntryBook entryBook, TopiaContext topiaContext) throws LimaException;
+ void createEntryBookWithTransaction(EntryBook entryBook, TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -43,32 +43,32 @@
* @return export as byte array
* @throws LimaException
*/
- public String exportAsCSV() throws LimaException;
+ String exportAsCSV() throws LimaException;
/**
* export entrybook chart as CSV.
*/
- public String exportEntryBookChartAsCSV() throws LimaException;
+ String exportEntryBookChartAsCSV() throws LimaException;
/**
* export financialstatement chart as CSV.
*/
- public String exportFinancialStatementChartAsCSV() throws LimaException;
+ String exportFinancialStatementChartAsCSV() throws LimaException;
/**
* export accounts chart as CSV.
*/
- public String exportAccountsChartAsCSV() throws LimaException;
+ String exportAccountsChartAsCSV() throws LimaException;
/**
* export entries as EBP
*/
- public String exportEntriesAsEBP() throws LimaException;
+ String exportEntriesAsEBP() throws LimaException;
/**
* export accounts as EBP
*/
- public String exportAccountsAsEBP() throws LimaException;
+ String exportAccountsAsEBP() throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -23,7 +23,6 @@
import java.util.List;
import javax.ejb.Remote;
import org.chorem.lima.beans.FinancialStatementAmounts;
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.FinancialStatement;
@@ -31,17 +30,17 @@
public interface FinancialStatementService {
- public void createFinancialStatement(FinancialStatement masterFinancialStatement, FinancialStatement financialStatement) throws LimaException, LimaBusinessException;
- public void updateFinancialStatement(FinancialStatement financialStatement) throws LimaException, LimaBusinessException;
- public void removeFinancialStatement(FinancialStatement financialStatement) throws LimaException, LimaBusinessException;
- public void removeAllFinancialStatement() throws LimaException, LimaBusinessException;
+ void createFinancialStatement(FinancialStatement masterFinancialStatement, FinancialStatement financialStatement) throws LimaException;
+ void updateFinancialStatement(FinancialStatement financialStatement) throws LimaException;
+ void removeFinancialStatement(FinancialStatement financialStatement) throws LimaException;
+ void removeAllFinancialStatement() throws LimaException;
- public List<FinancialStatement> getAllFinancialStatements() throws LimaException;
- public List<FinancialStatement> getChildrenFinancialStatement(FinancialStatement financialStatement) throws LimaException;
- public List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement, List<FinancialStatement> financialStatements) throws LimaException, LimaBusinessException;
+ List<FinancialStatement> getAllFinancialStatements() throws LimaException;
+ List<FinancialStatement> getChildrenFinancialStatement(FinancialStatement financialStatement) throws LimaException;
+ List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement, List<FinancialStatement> financialStatements) throws LimaException;
- public List<FinancialStatementAmounts> financialStatementReport(Date selectedBeginDate, Date selectedEndDate) throws LimaException;
+ List<FinancialStatementAmounts> financialStatementReport(Date selectedBeginDate, Date selectedEndDate) throws LimaException;
- public String checkFinancialStatementChart() throws LimaException;
+ String checkFinancialStatementChart() throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -20,8 +20,6 @@
package org.chorem.lima.business.ejbinterface;
import javax.ejb.Local;
-
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.FinancialStatement;
import org.nuiton.topia.TopiaContext;
@@ -29,8 +27,8 @@
@Local
public interface FinancialStatementServiceLocal extends FinancialStatementService {
- public void createFinancialStatementWithTransaction(FinancialStatement masterFinancialStatement,
- FinancialStatement financialStatement, TopiaContext topiaContext) throws LimaException, LimaBusinessException;
+ void createFinancialStatementWithTransaction(FinancialStatement masterFinancialStatement,
+ FinancialStatement financialStatement, TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -22,11 +22,8 @@
import java.util.Date;
import java.util.List;
import java.util.Set;
-
import javax.ejb.Remote;
-
import org.chorem.lima.FinancialStatementWayEnum;
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
@@ -69,7 +66,7 @@
void createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
- void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException, LimaBusinessException;
+ void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -21,8 +21,6 @@
import java.util.List;
import javax.ejb.Local;
-
-import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.FinancialTransaction;
@@ -41,11 +39,11 @@
@Local
public interface FinancialTransactionServiceLocal extends FinancialTransactionService {
- public List<FinancialTransaction> getAllFinancialTransactionsBalanced(TopiaContext topiaContext) throws LimaException;
+ List<FinancialTransaction> getAllFinancialTransactionsBalanced(TopiaContext topiaContext) throws LimaException;
void createFinancialTransactionWithTransaction(FinancialTransaction financialtransaction, TopiaContext topiaContext) throws LimaException;
- void updateFinancialTransactionWithTransaction(FinancialTransaction financialtransaction, TopiaContext topiaContext) throws LimaException, LimaBusinessException;
+ void updateFinancialTransactionWithTransaction(FinancialTransaction financialtransaction, TopiaContext topiaContext) throws LimaException;
void createEntryWithTransaction(Entry entry, TopiaContext topiaContext) throws LimaException;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -25,7 +25,7 @@
@Remote
public interface HttpServerService {
- public void start();
- public int getHttpPort();
+ void start();
+ int getHttpPort();
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -27,7 +27,7 @@
@Remote
public interface IdentityService {
- public Identity getIdentity() throws LimaException;
- public void updateIdentity(Identity identity) throws LimaException;
+ Identity getIdentity() throws LimaException;
+ void updateIdentity(Identity identity) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -28,7 +28,7 @@
@Local
public interface IdentityServiceLocal {
- public void updateIdentityWithTransaction(Identity identity, TopiaContext topiaContext) throws LimaException;
- public Identity getIdentityWithTransaction(TopiaContext topiaContext) throws LimaException;
+ void updateIdentityWithTransaction(Identity identity, TopiaContext topiaContext) throws LimaException;
+ Identity getIdentityWithTransaction(TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -43,8 +43,8 @@
* @param data
* @throws LimaException
*/
- public String importEntriesFromEbp(String datas) throws LimaException;
- public String importAccountsChartFromEbp(String datas) throws LimaException;
+ String importEntriesFromEbp(String datas) throws LimaException;
+ String importAccountsChartFromEbp(String datas) throws LimaException;
/**
@@ -53,7 +53,7 @@
* @param data
* @throws LimaException
*/
- public void importAsSage(byte[] data) throws LimaException;
+ void importAsSage(byte[] data) throws LimaException;
/**
* Import data as Ciel Compta export.
@@ -61,13 +61,13 @@
* @param data
* @throws LimaException
*/
- public void importAsCiel(byte[] data) throws LimaException;
+ void importAsCiel(byte[] data) throws LimaException;
/**
* import CSV.
* Return result log
*/
- public String importAllAsCSV(String path) throws LimaException;
+ String importAllAsCSV(String path) throws LimaException;
- public String importAsCSV(String path, ImportExportEntityEnum importExportEntityEnum) throws LimaException;
+ String importAsCSV(String path, ImportExportEntityEnum importExportEntityEnum) throws LimaException;
}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordService.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordService.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,44 +0,0 @@
-/* *##% Lima Business
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Remote;
-
-/**
- * Fiscal period service.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-
-@Remote
-public interface RecordService {
-
- //List<FiscalPeriod> getAllFiscalPeriods() throws LimaException;
-
- //void createFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-
- //void updateFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-
- //void removeFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/RecordServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,37 +0,0 @@
-/* *##% Lima Business
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Local;
-
-/**
- * Fiscal period service.
- *
- * @author chatellier
- * @version $Revision: 2902 $
- *
- * Last update : $Date: 2010-05-19 18:38:02 +0200 (mer. 19 mai 2010) $
- * By : $Author: jpepin $
- */
-
-@Local
-public interface RecordServiceLocal extends RecordService {
-
-}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -46,6 +46,6 @@
@Local
public interface ReportServiceLocal extends ReportService {
- public ReportsDatas generateAccountReportsWithTransaction (Account account, Boolean thirdPartAccountsMode, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException;
+ ReportsDatas generateAccountReportsWithTransaction (Account account, Boolean thirdPartAccountsMode, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountComparator.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountComparator.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,12 +19,15 @@
package org.chorem.lima.business.utils;
+import java.io.Serializable;
import java.util.Comparator;
import org.chorem.lima.entity.Account;
-public class AccountComparator implements Comparator<Account>{
+public class AccountComparator implements Serializable, Comparator<Account>{
- /**
+ private static final long serialVersionUID = 1L;
+
+ /**
* sort by accout number in lexicographical order
*/
@Override
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountEBPComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountEBPComparator.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/AccountEBPComparator.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,11 +1,14 @@
package org.chorem.lima.business.utils;
+import java.io.Serializable;
import java.util.Comparator;
import org.chorem.lima.beans.AccountEBP;
-public class AccountEBPComparator implements Comparator<AccountEBP> {
+public class AccountEBPComparator implements Serializable, Comparator<AccountEBP> {
+ private static final long serialVersionUID = 1L;
+
@Override
public int compare(AccountEBP o1, AccountEBP o2) {
return o1.getNumero().compareTo(o2.getNumero());
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,11 +19,14 @@
package org.chorem.lima.business.utils;
+import java.io.Serializable;
import java.util.Comparator;
import org.chorem.lima.entity.Entry;
-public class EntryComparator implements Comparator<Entry>{
+public class EntryComparator implements Serializable, Comparator<Entry>{
+ private static final long serialVersionUID = 1L;
+
@Override
public int compare(Entry o1, Entry o2) {
return o1.getTopiaCreateDate().compareTo(o2.getTopiaCreateDate());
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,11 +19,14 @@
package org.chorem.lima.business.utils;
+import java.io.Serializable;
import java.util.Comparator;
import org.chorem.lima.beans.EntryEBP;
-public class EntryEBPComparator implements Comparator<EntryEBP>{
+public class EntryEBPComparator implements Serializable, Comparator<EntryEBP>{
+ private static final long serialVersionUID = 1L;
+
@Override
public int compare(EntryEBP o1, EntryEBP o2) {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FiscalPeriodComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FiscalPeriodComparator.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FiscalPeriodComparator.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -19,11 +19,14 @@
package org.chorem.lima.business.utils;
+import java.io.Serializable;
import java.util.Comparator;
import org.chorem.lima.entity.FiscalPeriod;
-public class FiscalPeriodComparator implements Comparator<FiscalPeriod>{
+public class FiscalPeriodComparator implements Serializable, Comparator<FiscalPeriod>{
+ private static final long serialVersionUID = 1L;
+
/**
* sort by fiscal begin date
*/
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/LimaConfigTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/LimaConfigTest.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/LimaConfigTest.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -20,9 +20,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.junit.Ignore;
-import org.nuiton.util.ArgumentsParserException;
/**
* TODO add comment here.
@@ -40,12 +38,13 @@
private static final String configFile = "lima_test.properties";
+ /*
public static LimaConfig getInstance() {
-
+
if (instance == null) {
instance = new LimaConfig();
instance.loadConfiguration(configFile);
}
return instance;
- }
+ }*/
}
Deleted: trunk/lima-business/src/test/java/org/chorem/lima/business/RecordServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/RecordServiceImplTest.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/RecordServiceImplTest.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,109 +0,0 @@
-package org.chorem.lima.business;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.ejb.RecordServiceImpl;
-import org.chorem.lima.entity.Record;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Tests pour la gestion des timespans
- * @author Rémi Chapelet
- */
-public class RecordServiceImplTest {
-
- /** log. */
- private static final org.apache.commons.logging.Log log = LogFactory
- .getLog(UserServiceImplTest.class);
-
- private static RecordServiceImpl instance;
-
- @BeforeClass
- public static void setUpClass() throws Exception {
- LimaConfigTest.getInstance();
- }
-
- @Before
- public void setUp() {
- instance = new RecordServiceImpl();
- }
-
- @AfterClass
- public static void tearDownClass() throws Exception {
- /*List<LogDTO> list = instance.listeAllLogDTO();
- for (LogDTO logDTO : list)
- {
- instance.removeLog(logDTO);
- }*/
- }
-
- /**
- * Permet de tester la recherche de tous les logs
- */
- @Test
- public void listeAllLogTest() {
- /*// Ajout d'un log
- Date logDate = new Date(2008,1,1);
- Date transDate = new Date();
- instance.addLog(logDate, transDate, "test", "test", "test",
- "test", "test", true, "test");
- // Recherche des logs
- List<EntryLog> result = instance.listeAllLog();
- if (log.isDebugEnabled()) {
- log.debug("Nombre de log : " + result.size());
- }
- // trouve un log
- Assert.assertEquals(1,result.size());*/
- }
-
- /**
- * Test de la fonction de recherche de tous les logs suivant la date
- * de création
- */
- @Test
- public void searchDateCreateTest() {
- /*// Ajout d'un log avec comme date de creation 01/01/2009
- Date logDate = new Date(2009,1,1);
- Date transDate = new Date();
- instance.addLog(logDate, transDate, "test", "test", "test",
- "test", "test", true, "test");
- // Recherche des logs suivant la date
- List<EntryLog> result = instance.searchLogWithDateCreate(logDate);
- if (log.isDebugEnabled()) {
- log.debug("Nombre de log recherche pour la date de creation : "
- + result.size());
- }
- // Apres avoir inséré un log a la date, il doit obligatoirement
- // avoir au moins un log.
- Assert.assertEquals(1,result.size());*/
- }
-
- /**
- * Permet de tester la recherche de logs en format DTO.
- */
- @Test
- public void searchLogDTOWithDateCreate() {
-
- // Création de trois logs DTO
- /*Date logDate = new Date(2000,1,1);
- Date transDate = new Date();
- // Création logDTO
- LogDTO logDTO = new LogDTO("",logDate, "test", transDate, "test", "test",
- "test", "test", true, "test");
- // Ajout de trois logs
- instance.addLog(logDTO);
- instance.addLog(logDTO);
- instance.addLog(logDTO);
- // Recherche de ses trois logs sous forme de list de DTO
- List<LogDTO> listLogDTO = instance.searchLogDTOWithDateCreate(logDate);
- Assert.assertEquals(3,listLogDTO.size());*/
- }
-
-}
Deleted: trunk/lima-business/src/test/java/org/chorem/lima/business/UserServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/UserServiceImplTest.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/UserServiceImplTest.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -1,52 +0,0 @@
-package org.chorem.lima.business;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.ejb.UserServiceImpl;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Tests pour la gestion des timespans
- * @author Rémi Chapelet
- */
-public class UserServiceImplTest {
-
- /** log. */
- private static final Log log = LogFactory.getLog(UserServiceImplTest.class);
-
- private UserServiceImpl instance;
-
- @BeforeClass
- public static void setUpClass() throws Exception {
- LimaConfigTest.getInstance();
- }
-
- @Before
- public void setUp() {
- instance = new UserServiceImpl();
- }
-
- @AfterClass
- public static void tearDownClass() throws Exception {
-
- }
-
- public UserServiceImplTest() {
- }
-
- /**
- * Permet de tester l'ajout d'un utilisateur dans la base de données
- */
- @Test
- public void addUserTest() {
- /*String result = instance.addUser("test-add-user");
- if (log.isDebugEnabled()) {
- log.debug("Ajout utilisateur (name is test-add-user) : result " + result);
- }
- Assert.assertEquals("success", instance.findUser("test-add-user"));*/
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -32,8 +32,6 @@
import org.apache.openejb.assembler.classic.Assembler;
import org.apache.openejb.loader.SystemInstance;
import org.chorem.lima.LimaMain;
-import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejb.AbstractLimaService;
/**
* This class is a service factory based on embedded openejb container.
@@ -44,7 +42,7 @@
private static Log log = LogFactory.getLog(LimaServiceFactory.class);
/** Single instance. */
- protected static LimaServiceFactory instance;
+ private static LimaServiceFactory instance;
protected HashMap<Class, Object> services = new HashMap<Class, Object>();
/** JNDI context used to look for EJB. */
@@ -108,215 +106,9 @@
}
return result;
}
-
-
- /**
- * Get Account service.
- *
- * @return account service proxy
- */
- /*public AccountServiceMonitorable getAccountService() {
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "AccountServiceImplRemote";
- AccountService ejbHome = null;
- try {
- ejbHome = (AccountService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- InvocationHandler handler = new ServiceMonitorableHandler(ejbHome);
- AccountServiceMonitorable result = (AccountServiceMonitorable)Proxy.newProxyInstance(
- AccountServiceMonitorable.class.getClassLoader(),
- new Class[]{AccountServiceMonitorable.class}, handler);
- return result;
- }
-
- /**
- * Get FiscalPeriod service.
- *
- * @return fiscalPeriod service proxy
- *
- public FiscalPeriodService getFiscalPeriodService() {
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "FiscalPeriodServiceImplRemote";
- FiscalPeriodService ejbHome = null;
- try {
- ejbHome = (FiscalPeriodService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
/**
- * Get FinancialPeriod service.
- *
- * @return Financial Period service proxy
- *
- public FinancialPeriodService getFinancialPeriodService() {
-
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "FinancialPeriodServiceImplRemote";
- FinancialPeriodService ejbHome = null;
- try {
- ejbHome = (FinancialPeriodService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
- /**
- * Get transaction service.
- *
- * @return transaction service proxy
- *
- public FinancialTransactionService getTransactionService() {
-
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "FinancialTransactionServiceImplRemote";
- FinancialTransactionService ejbHome = null;
- try {
- ejbHome = (FinancialTransactionService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
- /**
- * Get entrybook service.
- *
- * @return entrybook service proxy
- *
- public EntryBookService getEntryBookService() {
-
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "EntryBookServiceImplRemote";
- EntryBookService ejbHome = null;
- try {
- ejbHome = (EntryBookService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
-
- /**
- * Get report service.
- *
- *
- public ReportService getReportService() {
-
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "ReportServiceImplRemote";
- ReportService ejbHome = null;
- try {
- ejbHome = (ReportService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
- /**
- * Get financial statement service.
- *
- *
- public FinancialStatementService getFinancialStatementService() {
-
- String lookupName = "FinancialStatementServiceImplRemote";
- FinancialStatementService ejbHome = null;
- try {
- ejbHome = (FinancialStatementService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
- /**
- * Get import service.
- *
- *
- public ImportService getImportService() {
-
- String lookupName = "ImportServiceImplRemote";
- ImportService ejbHome = null;
- try {
- ejbHome = (ImportService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
-
- /**
- * Get export service.
- *
- *
- public ExportService getExportService() {
-
- String lookupName = "ExportServiceImplRemote";
- ExportService ejbHome = null;
- try {
- ejbHome = (ExportService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }
-
- /**
- * Get record service.
- *
- * @return record service proxy
- *
- public RecordService getRecordService() {
-
- // TODO EC-20100410 put lookup name in configuration
- // name should be fully configurable due to custom implementation used
- String lookupName = "RecordServiceImplRemote";
- RecordService ejbHome = null;
- try {
- ejbHome = (RecordService)ctx.lookup(lookupName);
- } catch (NamingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't lookup for service : " + lookupName, eee);
- }
- }
- return ejbHome;
- }*/
-
- /**
* Destroy openejb jndi context.
*
* Code taken from openEJB faq :
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -88,8 +88,8 @@
// null == cancel action
newFinancialStatementHeader = financialStatementHeaderForm.getFinancialStatement();
- newFinancialStatementHeader.setHeader(true);
if (newFinancialStatementHeader != null) {
+ newFinancialStatementHeader.setHeader(true);
// get current selection path
TreePath treePath = null;
int selectedRow = treeTable.getSelectedRow();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2010-08-20 12:11:16 UTC (rev 3009)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2010-08-20 23:46:18 UTC (rev 3010)
@@ -114,19 +114,20 @@
email.setSubject("Project error notification : Lima");
// message description
- String message = formatMessage("Project", "Lima " + LimaMain.config.getVersion());
- message += formatMessage("Date", new Date().toString());
- message += formatMessage("Title", errorInfo.getTitle());
- message += formatMessage("Description", errorInfo.getBasicErrorMessage().replaceAll("<[^>]+>", ""));
+ StringBuffer message = new StringBuffer();
+ message.append(formatMessage("Project", "Lima " + LimaMain.config.getVersion()));
+ message.append(formatMessage("Date", new Date().toString()));
+ message.append(formatMessage("Title", errorInfo.getTitle()));
+ message.append(formatMessage("Description", errorInfo.getBasicErrorMessage().replaceAll("<[^>]+>", "")));
// message configuration
- message += formatMessage("Configuration", null);
+ message.append(formatMessage("Configuration", null));
List<String> propertiesNames = new ArrayList<String>(LimaMain.config.getOptions().stringPropertyNames());
Collections.sort(propertiesNames);
for (String propertyName : propertiesNames) {
// security, don't send string containing password :
if (!propertyName.contains("pass")) {
- message += "\t" + propertyName + " : " + LimaMain.config.getOptions().getProperty(propertyName) + "\n";
+ message.append("\t" + propertyName + " : " + LimaMain.config.getOptions().getProperty(propertyName) + "\n");
}
}
@@ -134,10 +135,10 @@
StringWriter out = new StringWriter();
PrintWriter writer = new PrintWriter(out);
errorInfo.getErrorException().printStackTrace(writer);
- message += formatMessage("Exception", out.toString());
+ message.append(formatMessage("Exception", out.toString()));
// TODO EC-20100409 i18n files are iso encoded ?
- email.setContent(message, "text/plain; charset=ISO-8859-9");
+ email.setContent(message.toString(), "text/plain; charset=ISO-8859-9");
// send mail
email.send();
1
0
r3009 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction
by jpepin@users.chorem.org Aug. 20, 2010
by jpepin@users.chorem.org Aug. 20, 2010
Aug. 20, 2010
Author: jpepin
Date: 2010-08-20 14:11:16 +0200 (Fri, 20 Aug 2010)
New Revision: 3009
Url: http://chorem.org/repositories/revision/lima/3009
Log:
D?\195?\169bogue ajout de ligne automatique.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-19 23:48:02 UTC (rev 3008)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-20 12:11:16 UTC (rev 3009)
@@ -18,6 +18,8 @@
package org.chorem.lima.ui.financialtransaction;
+import static org.nuiton.i18n.I18n._;
+
import java.awt.Color;
import java.awt.Component;
import java.awt.event.FocusEvent;
@@ -28,11 +30,14 @@
import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.util.Date;
+import java.util.concurrent.ExecutionException;
+import javax.swing.SwingWorker;
import javax.swing.table.TableColumn;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
@@ -40,6 +45,7 @@
import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
import org.chorem.lima.ui.celleditor.DateTableCellEditor;
import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
+import org.chorem.lima.util.DialogHelper;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
import org.jdesktop.swingx.decorator.ComponentAdapter;
@@ -66,6 +72,9 @@
private Highlighter colorTransaction;
private ColorHighlighter colorBalance;
+
+ private int x_tab;
+ private int y_tab;
public FinancialTransactionTable(FinancialTransactionViewHandler handler) {
@@ -148,7 +157,7 @@
//TODO combinaison de touches dans la config
- // delete selected row with the key : delete or ctrl clear
+ // delete selected row with the key : delete or ctrl + clear
// ou de l'entree
if ((e.getKeyCode() == KeyEvent.VK_DELETE )
|| (e.getKeyCode() == KeyEvent.VK_CLEAR
@@ -164,11 +173,27 @@
}
// add financial transaction with the key combination : ctrl + tab
+ if (e.getKeyCode() == KeyEvent.VK_C
+ && e.getModifiers() == KeyEvent.CTRL_MASK) {
+ handler.copyRow();
+ }
+
+ // copy : ctrl + c
+
+ // add financial transaction with the key combination : ctrl + tab
+ if (e.getKeyCode() == KeyEvent.VK_V
+ && e.getModifiers() == KeyEvent.CTRL_MASK) {
+ handler.pasteRow();
+ }
+
+ // paste : ctrl + v
+
+ // add financial transaction with the key combination : ctrl + tab
if (e.getKeyCode() == KeyEvent.VK_TAB
&& e.getModifiers() == KeyEvent.CTRL_MASK) {
handler.addFinancialTransaction();
}
-
+
/**
* Touche tab
* Incrémente le curseur de case tant que la case n'est pas editable
@@ -176,21 +201,24 @@
* la dernière cellule et si la transaction est non équilibré
* sinon rajoute une transaction
*/
+
if (e.getKeyChar() == KeyEvent.VK_TAB) {
int max_x = this.getColumnCount();
int max_y = this.getRowCount();
- int x_tab = this.getSelectedColumn();
- int y_tab = this.getSelectedRow();
+ x_tab = this.getSelectedColumn();
+ y_tab = this.getSelectedRow();
+ Boolean end = true;
- if (x_tab < max_x - 1){
+ if (x_tab < max_x - 1){
x_tab++;
}
+ //end of row
else {
+ x_tab=0;
y_tab++;
}
- //skip all cell while not editable
- while (!isCellEditable(y_tab, x_tab)){
-
+ //skip all cell while not editable or if end of table add entry or transaction or end of table
+ while (!isCellEditable(y_tab, x_tab) && end ){
//if end of row
if (x_tab == max_x-1) {
Object object = this.handler.tableModel.getElementAt(y_tab);
@@ -205,35 +233,60 @@
}
//if entry
else {
- Entry entry = (Entry) object;
- FinancialTransaction financialTransaction = entry.getFinancialTransaction();
- Boolean balanced =
- financialTransaction.getAmountCredit() ==
- financialTransaction.getAmountDebit();
- if (balanced){
- if (y_tab == max_y-1){
- handler.addFinancialTransaction();
- this.setColumnSelectionInterval(0, 0);
- }
- }
- else {
- handler.addEmptyEntry();
- this.setColumnSelectionInterval(1, 1);
- }
+ log.debug("not end");
+ //FIXME set value is doing after key pressed
+ // so update not terminated before get balanced
+ //Swing Worker stop the UI 500ms
+ // found best solution ?
+ final JXTable table = this;
+ final int y_t = y_tab;
+ final int m_t = max_y;
+ new SwingWorker<Void,Void>() {
+ @Override protected Void doInBackground() throws InterruptedException {
+ Thread.sleep(500);
+ return null;
+ }
+ @Override protected void done() {
+ Object object = handler.tableModel.getElementAt(y_tab-1);
+ FinancialTransaction financialTransaction = null;
+ if (object instanceof Entry){
+ financialTransaction = ((Entry) object).getFinancialTransaction();
+ }
+ else if (object instanceof FinancialTransaction){
+ financialTransaction = (FinancialTransaction) object;
+ }
+ BigDecimal amountC = financialTransaction.getAmountCredit();
+ BigDecimal amountD = financialTransaction.getAmountDebit();
+ if (amountC == amountD){
+ if (y_t == m_t-1){
+ handler.addFinancialTransaction();
+ table.setColumnSelectionInterval(0, 0);
+ }
+ }
+ else {
+ handler.addEmptyEntry();
+ table.setColumnSelectionInterval(1, 1);
+ y_tab++;
+ // positionne la sélection sur la nouvelle ligne créée
+ table.setRowSelectionInterval(y_tab, y_tab);
+ x_tab=0;
+ }
+ }
+ }.execute();
}
- y_tab++;
- // positionne la sélection sur la nouvelle ligne créée
- this.setRowSelectionInterval(y_tab, y_tab);
- x_tab=0;
+ end = false;
}
else {
if (x_tab < max_x){
+ this.setRowSelectionInterval(y_tab, y_tab);
this.setColumnSelectionInterval(x_tab, x_tab);
x_tab++;
}
}
}
}
+
+
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-19 23:48:02 UTC (rev 3008)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-20 12:11:16 UTC (rev 3009)
@@ -159,7 +159,7 @@
result = String.class;
break;
case 5:
- result = BigDecimal.class;
+ result = String.class;
break;
case 6:
result = BigDecimal.class;
@@ -168,7 +168,7 @@
result = BigDecimal.class;
break;
case 8:
- result = String.class;
+ result = BigDecimal.class;
break;
}
@@ -198,16 +198,16 @@
result = _("lima.table.description");
break;
case 5:
- result = _("lima.table.debit");
+ result = _("lima.table.letter");
break;
case 6:
- result = _("lima.table.credit");
+ result = _("lima.table.debit");
break;
case 7:
- result = _("lima.table.balance");
+ result = _("lima.table.credit");
break;
case 8:
- result = _("lima.table.letter");
+ result = _("lima.table.balance");
break;
}
@@ -260,16 +260,16 @@
result = null; // description
break;
case 5 :
- result = amountDebit;
+ result = null; // letter
break;
case 6:
- result = amountCredit;
+ result = amountDebit;
break;
case 7:
- result = amountDebit.subtract(amountCredit);
+ result = amountCredit;
break;
case 8:
- result = null;
+ result = amountDebit.subtract(amountCredit);
break;
}
}
@@ -297,16 +297,16 @@
result = currentEntry.getDescription();
break;
case 5 :
- result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
+ result = currentEntry.getLettering();
break;
case 6:
- result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
case 7:
- result = null;
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
break;
case 8:
- result = currentEntry.getLettering();
+ result = null;
break;
}
@@ -329,11 +329,11 @@
boolean editableCell=false;
Object currentRow = cacheDataList.get(rowIndex);
// cells editable for the entry row, all cells exclude the date
- if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1))) {
+ if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1) || (columnIndex==8))) {
editableCell=true;
}
// cells editable for the financialtransaction row, no cells exclude the date
- if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1) || (columnIndex==8))){
+ if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1))){
editableCell=true;
}
return editableCell;
@@ -494,16 +494,16 @@
currentEntry.setDescription((String)value);
break;
case 5 :
+ currentEntry.setLettering((String)value);
+ break;
+ case 6:
currentEntry.setAmount((BigDecimal)value);
currentEntry.setDebit(true);
break;
- case 6:
+ case 7:
currentEntry.setAmount((BigDecimal)value);
currentEntry.setDebit(false);
break;
- case 8:
- currentEntry.setLettering((String)value);
- break;
}
try {
financialTransactionService.updateEntry(currentEntry);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-08-19 23:48:02 UTC (rev 3008)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-08-20 12:11:16 UTC (rev 3009)
@@ -67,6 +67,7 @@
//copy entry
public void copyRow(){
+ table = view.getFinancialTransactionTable();
int indexSelectedRow = table.getSelectedRow();
if (indexSelectedRow != -1) {
@@ -76,6 +77,7 @@
//paste entry
public void pasteRow(){
+ table = view.getFinancialTransactionTable();
int indexSelectedRow = table.getSelectedRow();
if (indexSelectedRow != -1) {
1
0
r3008 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui java/org/chorem/lima/ui/financialtransaction java/org/chorem/lima/ui/financialtransactionsearch java/org/chorem/lima/ui/financialtransactionunbalanced java/org/chorem/lima/ui/importexport java/org/chorem/lima/ui/opening resources/i18n
by jpepin@users.chorem.org Aug. 19, 2010
by jpepin@users.chorem.org Aug. 19, 2010
Aug. 19, 2010
Author: jpepin
Date: 2010-08-20 01:48:02 +0200 (Fri, 20 Aug 2010)
New Revision: 3008
Url: http://chorem.org/repositories/revision/lima/3008
Log:
Fen?\195?\170tre d'import/export est d?\195?\169sormais modal
Optimisation import/export : remont?\195?\169 des exception ?\195?\160 l'utilisateur
Remise en marche du jaxx configbuilder
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExportWaitView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-19 23:48:02 UTC (rev 3008)
@@ -159,16 +159,11 @@
actionIcon='entries-unbalanced'/>
<JMenuItem text="lima.entries.searchtransaction" onActionPerformed='getHandler().showTransactionSearchView(this)'
actionIcon='entries-search'/>
- <JMenuItem text="lima.entries.lettering" onActionPerformed='getHandler().showLetteringView(this)'
+ <!-- Menu prévu pour le lettrage automatique
+ <JMenuItem text="lima.entries.lettering" onActionPerformed='getHandler().showLetteringView(this)'
actionIcon='lettering'/>
+ -->
</JMenu>
- <!--
- <JMenu text="lima.view">
- <JCheckBoxMenuItem id="viewFlatten" text="lima.view.flatten"
- onItemStateChanged='getHandler().onChangeView(this)'
- selected="false" actionIcon='view'/>
- </JMenu>
- -->
<JMenu text="lima.reports" mnemonic="{'R'}">
<JMenuItem text="lima.reports.accounts" onActionPerformed='getHandler().showAccountReports(this)'
actionIcon='reports-account'/>
@@ -225,12 +220,7 @@
</JMenu>
</JMenuBar>
<JPanel layout='{new BorderLayout()}'>
-
<JTabbedPane id="contentTabbedPane" constraints="BorderLayout.CENTER"/>
-
- <!-- class not found <jaxx.runtime.swing.StatusMessagePanel id='statusBar'
- _help='"ui.main.statusBar"'
- constraints="BorderLayout.SOUTH"/> -->
</JPanel>
</JFrame>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -24,9 +24,7 @@
import java.util.Locale;
import jaxx.runtime.JAXXContext;
import jaxx.runtime.swing.AboutPanel;
-import jaxx.runtime.swing.editor.config.ConfigUI;
-import jaxx.runtime.swing.editor.config.ConfigUIBuilder;
-import jaxx.runtime.swing.editor.config.model.ConfigUIModel;
+import jaxx.runtime.swing.editor.config.ConfigUIHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
@@ -151,27 +149,19 @@
public void showConfig(JAXXContext context) {
MainView ui = getUI(context);
LimaConfig config = context.getContextValue(LimaConfig.class);
- ConfigUIModel model = new ConfigUIModel(config);
- //TODO pepin 20100510 methode deprecate
- /*
- // categorie repertoires
- model.addCategory(
- n_("lima.config.category.directories"),
- n_("lima.config.category.directories.description"),
- LimaConfig.Option.CONFIG_FILE);
+ //TODO pepin 2010-08-20 add all options
- // others
- model.addCategory(
- n_("lima.config.category.other"),
- n_("lima.config.category.other.description"),
- LimaConfig.Option.FULL_SCREEN,
- LimaConfig.Option.LOCALE);
- */
-
- ConfigUI configUI = ConfigUIBuilder.newConfigUI(context, model, "lima.config.category.directories");
-
- ConfigUIBuilder.showConfigUI(configUI, ui, false);
+ ConfigUIHelper helper = new ConfigUIHelper(config);
+ helper.addCategory(_("lima.config.category.directories"), _("lima.config.category.directories.description"));
+ helper.addOption(LimaConfig.Option.CONFIG_FILE);
+
+ helper.addCategory(_("lima.config.category.other"), _("lima.config.category.other.description"));
+ helper.addOption(LimaConfig.Option.FULL_SCREEN);
+ helper.addOption(LimaConfig.Option.LOCALE);
+
+ helper.buildUI(context, _("lima.config.category.directories"));
+ helper.displayUI(ui, false);
}
public void showHelp(JAXXContext context, String helpId) {
@@ -410,31 +400,4 @@
ImportExport importExport = ImportExport.getInstance(mainView);
importExport.importExport(type, "", true);
}
-
- public void showExportView(String type) {
-
- /*if (!getExportView(type).isEnabled()) {
- getExportView(type).setEnabled(true);
- }*/
- }
-
- public void showLetteringView(JAXXContext rootContext) {
- MainView mainView = getUI(rootContext);
- // LetteringView letteringView = new LetteringView(mainView);
- // mainView.showTab(_("lima.entries.lettering"), letteringView);
- }
-
- public void showSearchView(JAXXContext rootContext) {
- /*if (!getSearchView().isEnabled()) {
- getSearchView().setEnabled(true);
- }
- getSearchView().setVisible(true);*/
- }
-
- public void showResultView(JAXXContext rootContext) {
- MainView mainView = getUI(rootContext);
- //ResultView resultView = new ResultView(mainView);
- // mainView.showTab(_("lima.tab.result"), resultView);
- }
-
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -29,6 +29,8 @@
import java.math.BigDecimal;
import java.util.Date;
+import javax.swing.table.TableColumn;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
@@ -68,7 +70,7 @@
public FinancialTransactionTable(FinancialTransactionViewHandler handler) {
this.handler = handler;
-
+
addKeyListener(this);
//Get new date editor
@@ -83,7 +85,7 @@
// highlight unbalanced financial transactions
addColorNonBalancedTransaction();
}
-
+
/**
* Cette méthode permet de colorer toutes les transactions dans le tableau
* afin de bien distinguer les transactions et entrées comptables.
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -159,7 +159,7 @@
result = String.class;
break;
case 5:
- result = String.class;
+ result = BigDecimal.class;
break;
case 6:
result = BigDecimal.class;
@@ -168,13 +168,15 @@
result = BigDecimal.class;
break;
case 8:
- result = BigDecimal.class;
+ result = String.class;
break;
}
return result;
}
+
+
@Override
public String getColumnName(int column) {
String result = "n/a";
@@ -196,16 +198,16 @@
result = _("lima.table.description");
break;
case 5:
- result = _("lima.table.position");
+ result = _("lima.table.debit");
break;
case 6:
- result = _("lima.table.debit");
+ result = _("lima.table.credit");
break;
case 7:
- result = _("lima.table.credit");
+ result = _("lima.table.balance");
break;
case 8:
- result = _("lima.table.balance");
+ result = _("lima.table.letter");
break;
}
@@ -258,16 +260,16 @@
result = null; // description
break;
case 5 :
- result = null; // position
+ result = amountDebit;
break;
case 6:
- result = amountDebit;
+ result = amountCredit;
break;
case 7:
- result = amountCredit;
+ result = amountDebit.subtract(amountCredit);
break;
case 8:
- result = amountDebit.subtract(amountCredit);
+ result = null;
break;
}
}
@@ -295,16 +297,16 @@
result = currentEntry.getDescription();
break;
case 5 :
- result = currentEntry.getPosition();
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
case 6:
- result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
break;
case 7:
- result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
+ result = null;
break;
case 8:
- result = null; // balance
+ result = currentEntry.getLettering();
break;
}
@@ -327,11 +329,11 @@
boolean editableCell=false;
Object currentRow = cacheDataList.get(rowIndex);
// cells editable for the entry row, all cells exclude the date
- if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1) || (columnIndex==8))) {
+ if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1))) {
editableCell=true;
}
// cells editable for the financialtransaction row, no cells exclude the date
- if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1))){
+ if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1) || (columnIndex==8))){
editableCell=true;
}
return editableCell;
@@ -492,16 +494,16 @@
currentEntry.setDescription((String)value);
break;
case 5 :
- currentEntry.setPosition((String)value);
- break;
- case 6:
currentEntry.setAmount((BigDecimal)value);
currentEntry.setDebit(true);
break;
- case 7:
- currentEntry.setAmount((BigDecimal)value);
+ case 6:
+ currentEntry.setAmount((BigDecimal)value);
currentEntry.setDebit(false);
break;
+ case 8:
+ currentEntry.setLettering((String)value);
+ break;
}
try {
financialTransactionService.updateEntry(currentEntry);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -58,6 +58,7 @@
* By : $Author: jpepin $
*/
public class FinancialTransactionSearchTableModel extends AbstractTableModel {
+
/** serialVersionUID. */
private static final long serialVersionUID = 3914954536809622358L;
@@ -69,7 +70,6 @@
/** data cache */
protected List<Entry> cacheDataList;
-
public void refresh(List<Entry> objects){
cacheDataList = objects;
@@ -103,7 +103,7 @@
result = String.class;
break;
case 5:
- result = String.class;
+ result = BigDecimal.class;
break;
case 6:
result = BigDecimal.class;
@@ -112,7 +112,7 @@
result = BigDecimal.class;
break;
case 8:
- result = BigDecimal.class;
+ result = String.class;
break;
}
@@ -140,16 +140,16 @@
result = _("lima.table.description");
break;
case 5:
- result = _("lima.table.position");
+ result = _("lima.table.debit");
break;
case 6:
- result = _("lima.table.debit");
+ result = _("lima.table.credit");
break;
case 7:
- result = _("lima.table.credit");
+ result = _("lima.table.balance");
break;
case 8:
- result = _("lima.table.balance");
+ result = _("lima.table.letter");
break;
}
@@ -206,16 +206,16 @@
result = currentRow.getDescription();
break;
case 5 :
- result = currentRow.getPosition();
+ result = currentRow.getDebit() ? currentRow.getAmount() : 0;
break;
case 6:
- result = currentRow.getDebit() ? currentRow.getAmount() : 0;
+ result = currentRow.getDebit() ? 0 : currentRow.getAmount();
break;
case 7:
- result = currentRow.getDebit() ? 0 : currentRow.getAmount();
+ result = null; // balance
break;
case 8:
- result = null; // balance
+ result = currentRow.getLettering();
break;
}
@@ -225,104 +225,12 @@
}
- /**
- * To set cells editable or not
- * different condition for entry or financial transaction
- */
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
- boolean editableCell=false;
- Object currentRow = cacheDataList.get(rowIndex);
- // cells editable for the entry row, all cells exclude the date
- if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1))) {
- editableCell=true;
- }
- // cells editable for the financialtransaction row, no cells exclude the date
- if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1))){
- editableCell=true;
- }
- return editableCell;
+
+ return false;
}
-
- /* /**
- * to modifiy financialtransaction or entry
- *
- @Override
- public void setValueAt(Object value, int row, int column) {
- int financialTransactionRow=0;
- // just prevent too much result
- if (selectedFiscalPeriod != null) {
- Object currentRow = cacheDataList.get(row);
- if (currentRow instanceof FinancialTransaction) {
- FinancialTransaction currentFinancialTransaction =
- (FinancialTransaction)currentRow;
- switch (column) {
- case 0:
- //update
- currentFinancialTransaction.setTransactionDate((Date)value);
- break;
- case 1 :
- currentFinancialTransaction.setEntryBook((EntryBook)value);
- break;
- }
- // notify service for modification
- try {
- financialTransactionService.
- updateFinancialTransaction(currentFinancialTransaction);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()){
- log.debug("Can't update financial transaction", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
- //update the financial transaction in entire
- financialTransactionRow =
- cacheDataList.indexOf(((FinancialTransaction) currentRow));
- }
- else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry)currentRow;
- switch (column) {
- case 2 :
- currentEntry.setVoucher((String)value);
- break;
- case 3:
- currentEntry.setAccount((Account)value);
- break;
- case 4:
- currentEntry.setDescription((String)value);
- break;
- case 5 :
- currentEntry.setPosition((String)value);
- break;
- case 6:
- currentEntry.setAmount((BigDecimal)value);
- currentEntry.setDebit(true);
- break;
- case 7:
- currentEntry.setAmount((BigDecimal)value);
- currentEntry.setDebit(false);
- break;
- }
- try {
- financialTransactionService.updateEntry(currentEntry);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()){
- log.debug("Can't update entry", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
- //update the financial transaction in entire
- financialTransactionRow =
- cacheDataList.indexOf(((Entry) currentRow).
- getFinancialTransaction());
- }
- //on recharge la liste
- //TODO PEPIN 20100607 Get financial transaction of cachedatelist on replace it
- fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);
- }
- }*/
-
public Object getElementAt(int row){
Object currentRow = cacheDataList.get(row);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -153,7 +153,7 @@
result = String.class;
break;
case 5:
- result = String.class;
+ result = BigDecimal.class;
break;
case 6:
result = BigDecimal.class;
@@ -162,7 +162,7 @@
result = BigDecimal.class;
break;
case 8:
- result = BigDecimal.class;
+ result = String.class;
break;
}
@@ -190,16 +190,16 @@
result = _("lima.table.description");
break;
case 5:
- result = _("lima.table.position");
+ result = _("lima.table.debit");
break;
case 6:
- result = _("lima.table.debit");
+ result = _("lima.table.credit");
break;
case 7:
- result = _("lima.table.credit");
+ result = _("lima.table.balance");
break;
case 8:
- result = _("lima.table.balance");
+ result = _("lima.table.letter");
break;
}
@@ -253,16 +253,16 @@
result = null; // description
break;
case 5 :
- result = null; // position
+ result = amountDebit;
break;
case 6:
- result = amountDebit;
+ result = amountCredit;
break;
case 7:
- result = amountCredit;
+ result = amountDebit.subtract(amountCredit);
break;
case 8:
- result = amountDebit.subtract(amountCredit);
+ result = null;
break;
}
}
@@ -290,16 +290,16 @@
result = currentEntry.getDescription();
break;
case 5 :
- result = currentEntry.getPosition();
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
case 6:
- result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
break;
case 7:
- result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
+ result = null;
break;
case 8:
- result = null; // balance
+ result = currentEntry.getLettering();
break;
}
@@ -405,16 +405,16 @@
currentEntry.setDescription((String)value);
break;
case 5 :
- currentEntry.setPosition((String)value);
- break;
- case 6:
currentEntry.setAmount((BigDecimal)value);
currentEntry.setDebit(true);
break;
- case 7:
- currentEntry.setAmount((BigDecimal)value);
+ case 6:
+ currentEntry.setAmount((BigDecimal)value);
currentEntry.setDebit(false);
break;
+ case 8:
+ currentEntry.setLettering((String)value);
+ break;
}
try {
financialTransactionService.updateEntry(currentEntry);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -181,9 +181,7 @@
log.debug("Can't get result message", eeeIE);
}
} catch (ExecutionException eeeEE) {
- if (log.isDebugEnabled()){
- log.debug("Can't get result message", eeeEE);
- }
+ DialogHelper.showMessageDialog(eeeEE.getMessage());
}
}
}.execute();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExportWaitView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExportWaitView.jaxx 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExportWaitView.jaxx 2010-08-19 23:48:02 UTC (rev 3008)
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##% -->
-<JDialog id="waitDialog">
+<JDialog modal="true" id="waitDialog">
<script>
<![CDATA[
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx 2010-08-19 23:48:02 UTC (rev 3008)
@@ -41,6 +41,7 @@
<cell weightx="0.9" rows="4" fill="both">
<JPanel id='panel'>
<JLabel text='lima.opening.welcome' />
+ <JButton text='lima.opening.import' onActionPerformed="handler.importSave()"/>
</JPanel>
</cell>
</row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2010-08-19 23:48:02 UTC (rev 3008)
@@ -63,6 +63,13 @@
step = 0;
}
+
+ public void importSave(){
+ ImportExport importExport = new ImportExport(view);
+ importExport.importExport(ImportExportEnum.CSV_ALL_IMPORT, "", true);
+ view.dispose();
+ }
+
public void next(){
ImportExport importExport = ImportExport.getInstance(view);
JPanel panel = view.getPanel();
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-19 23:48:02 UTC (rev 3008)
@@ -195,6 +195,7 @@
lima.openejb.remotemode.description=
lima.opening.accounts=
lima.opening.entrybook=
+lima.opening.import=
lima.opening.welcome=
lima.pdf=
lima.period.begindate=
@@ -240,6 +241,7 @@
lima.table.grossamount=
lima.table.label=
lima.table.letter=
+lima.table.lettering=
lima.table.move.credit=
lima.table.move.debit=
lima.table.netamount=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-19 21:13:17 UTC (rev 3007)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-19 23:48:02 UTC (rev 3008)
@@ -181,7 +181,8 @@
lima.openejb.remotemode.description=
lima.opening.accounts=<html><center>Aucun plan comptable charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.opening.entrybook=<html>Cochez la case pour importer les journaux par d\u00E9faut \:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
-lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour d\u00E9marrer votre comptabilit\u00E9 en quelques instants\u0085</center></html>
+lima.opening.import=Importer une sauvegarde CSV
+lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour d\u00E9marrer votre comptabilit\u00E9 en quelques instants\u0085<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
lima.pdf=
lima.period.begindate=D\u00E9but
lima.period.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
@@ -226,6 +227,7 @@
lima.table.grossamount=Brut
lima.table.label=Libell\u00E9
lima.table.letter=Lettre
+lima.table.lettering=
lima.table.move.credit=Mouvement au cr\u00E9dit
lima.table.move.debit=Mouvement au d\u00E9bit
lima.table.netamount=Net
1
0
Author: jpepin
Date: 2010-08-19 23:13:17 +0200 (Thu, 19 Aug 2010)
New Revision: 3007
Url: http://chorem.org/repositories/revision/lima/3007
Log:
Impl?\195?\169mentation recherche ?\195?\169critures.
D?\195?\169placement de la m?\195?\169thode accountsToStrings du service account vers le DAO account.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAmountEnum.java
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -344,13 +344,15 @@
Account accountToDelete = accountDAO.findByTopiaId(account.getTopiaId());
//get all subaccounts
- List<Account> accounts = getAllChildrenAccounts(accountToDelete, new ArrayList<Account>());
+ List<Account> accounts =
+ getAllChildrenAccounts(accountToDelete, new ArrayList<Account>());
//if account have sub accounts
if (accounts.size() > 0){
for (Account subAccount : accounts) {
// Check rules for subaccount if have entries
accountingRules.removeAccountRules(subAccount, transaction);
- Account subAccountToDelete = accountDAO.findByTopiaId(subAccount.getTopiaId());
+ Account subAccountToDelete =
+ accountDAO.findByTopiaId(subAccount.getTopiaId());
accountDAO.delete(subAccountToDelete);
}
}
@@ -435,11 +437,11 @@
}
- /**
+ /*
* Convert string of extends number to list of accounts
* Example '22, 45..48, 67' -> [22, 45, 46, 47, 48, 67]
* SubAccountsMode return list of existing subaccounts ex 6 return : 61, 62, .., 69, 610, .., 619 etc
- */
+ *
@Override
public List<Account> stringToListAccountsWithTransaction(String selectedAccounts, Boolean subAccountsMode, TopiaContext topiaContext) throws LimaException{
List<Account> accounts = new ArrayList<Account>();
@@ -536,7 +538,7 @@
}
return accounts;
- }
+ }*/
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -40,7 +40,6 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountServiceLocal;
import org.chorem.lima.business.ejbinterface.FinancialStatementService;
import org.chorem.lima.business.ejbinterface.FinancialStatementServiceLocal;
import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
@@ -67,9 +66,6 @@
protected AccountingRules accountingRules;
@EJB
- AccountServiceLocal accountServiceLocal;
-
- @EJB
ReportServiceLocal reportServiceLocal;
public FinancialStatementServiceImpl() {
@@ -463,12 +459,12 @@
try {
if (accountsNumberList != null){
//Remove Spaces
+ AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
accountsNumberList = StringUtils.deleteWhitespace(accountsNumberList);
StringTokenizer stQuote = new StringTokenizer(accountsNumberList, "-");
while (stQuote.hasMoreTokens()) {
String s = stQuote.nextToken();
- List<Account> accountsList = accountServiceLocal.
- stringToListAccountsWithTransaction(s, false, topiaContext);
+ List<Account> accountsList = accountDAO.stringToListAccounts(s, false);
BigDecimal resAmount = new BigDecimal(0);
for (Account account : accountsList) {
@@ -521,7 +517,9 @@
}
}catch (LimaException ex) {
doCatch(topiaContext, ex, log);
- }
+ } catch (TopiaException e) {
+ doCatch(topiaContext, e, log);
+ }
return amount;
}
@@ -546,20 +544,20 @@
for (FinancialStatement financialStatement : financialStatementsList) {
accountsList.removeAll(
- accountServiceLocal.stringToListAccountsWithTransaction(
- financialStatement.getAccounts(), true, transaction));
+ accountDAO.stringToListAccounts(
+ financialStatement.getAccounts(), true));
accountsList.removeAll(
- accountServiceLocal.stringToListAccountsWithTransaction(
- financialStatement.getCreditAccounts(), true, transaction));
+ accountDAO.stringToListAccounts(
+ financialStatement.getCreditAccounts(), true));
accountsList.removeAll(
- accountServiceLocal.stringToListAccountsWithTransaction(
- financialStatement.getDebitAccounts(), true, transaction));
+ accountDAO.stringToListAccounts(
+ financialStatement.getDebitAccounts(), true));
accountsList.removeAll(
- accountServiceLocal.stringToListAccountsWithTransaction(
- financialStatement.getProvisionDeprecationAccounts(), true, transaction));
+ accountDAO.stringToListAccounts(
+ financialStatement.getProvisionDeprecationAccounts(), true));
}
for (Account account : accountsList) {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -20,21 +20,23 @@
package org.chorem.lima.business.ejb;
import static org.nuiton.i18n.I18n._;
-
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-
import javax.ejb.Stateless;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.business.ejbinterface.FinancialTransactionServiceLocal;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.EntryDAO;
@@ -605,7 +607,97 @@
- protected TopiaContext beginTransaction() throws TopiaException {
+
+ @Override
+ public List<Entry> searchEntry(Date beginDate, Date endDate, String voucher,
+ String description, String letter, String accountsList,
+ Account account, EntryBook entryBook,
+ FinancialStatementWayEnum fStWayEnum, String operator,
+ String amount, String amount2) throws LimaException {
+ List<Entry> entries = null;
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ TopiaQuery query = entryDAO.createQuery();
+ String dateProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.TRANSACTION_DATE);
+ String entryBookProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK);
+ String entryBookLabelProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK, EntryBook.LABEL);
+ String accountProperty = TopiaQuery.getProperty(Entry.ACCOUNT, Account.ACCOUNT_NUMBER);
+
+ //Load for lazy
+ query.addLoad(dateProperty)
+ .addLoad(entryBookLabelProperty)
+ .addLoad(accountProperty);
+
+ if (beginDate != null && endDate != null){
+ query.addBetween(dateProperty, beginDate, endDate);
+ }
+ else if (beginDate != null){
+ query.addEquals(dateProperty, beginDate);
+ }
+ if (voucher != null){
+ query.addWhere(Entry.VOUCHER, Op.LIKE, "%"+voucher+"%");
+ }
+ if (description != null){
+ query.addWhere(Entry.DESCRIPTION, Op.LIKE, "%"+description+"%");
+ }
+ if (letter != null){
+ query.addWhere(Entry.LETTERING, Op.LIKE, "%"+letter+"%");
+ }
+ if (account != null){
+ query.addEquals(Entry.ACCOUNT, account);
+ }
+ else if (accountsList != null){
+ AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
+ List<Account> accounts = accountDAO.stringToListAccounts(accountsList, false);
+ String accountNumbers = "0,";
+ int max = accounts.size();
+ for (int i = 1; i <= max; i++) {
+ accountNumbers += accounts.get(i-1).getAccountNumber();
+ if (i != max){
+ accountNumbers += ",";
+ }
+ }
+ if (accounts.size() > 0){
+ query.addWhere(accountProperty + " in (" + accountNumbers + ")");
+ }
+
+ }
+ if (entryBook != null){
+ query.addEquals(entryBookProperty, entryBook);
+ }
+ else if (amount != null){
+ if (amount2 != null){
+ BigDecimal value1 = new BigDecimal(amount);
+ BigDecimal value2 = new BigDecimal(amount2);
+ query.addBetween(Entry.AMOUNT, value1, value2);
+ }
+ else if (operator != null) {
+ query.addWhere(Entry.AMOUNT+" "+operator+" "+amount);
+ }
+ switch (fStWayEnum) {
+ case CREDIT:
+ query.addEquals(Entry.DEBIT, false);
+ break;
+ case DEBIT:
+ query.addEquals(Entry.DEBIT, true);
+ break;
+ }
+ }
+ log.debug(query);
+ entries = entryDAO.findAllByQuery(query);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ return entries;
+ }
+
+ protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
// TODO move it into JTA
TopiaContext topiaTransaction;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -23,7 +23,6 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import javax.ejb.EJB;
import javax.ejb.Stateless;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -34,7 +33,6 @@
import org.chorem.lima.beans.ReportsDatasImpl;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountServiceLocal;
import org.chorem.lima.business.ejbinterface.ReportService;
import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
import org.chorem.lima.entity.Account;
@@ -57,9 +55,6 @@
private TopiaContext rootContext;
- @EJB
- AccountServiceLocal accountServiceLocal;
-
public ReportServiceImpl() {
LimaConfig config = LimaConfig.getInstance();
try {
@@ -480,8 +475,8 @@
}
//build list account from selectedAccounts
else{
- accounts = accountServiceLocal.stringToListAccountsWithTransaction(
- selectedAccounts, false, topiaTransaction);
+ accounts = accountDAO.stringToListAccounts(
+ selectedAccounts, false);
}
for (Account account : accounts) {
ReportsDatas reportsDatas =
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -40,7 +40,6 @@
@Local
public interface AccountServiceLocal extends AccountService{
- public List<Account> stringToListAccountsWithTransaction(String selectedAccounts, Boolean subAccountsMode, TopiaContext topiaContext) throws LimaException;
void createAccountWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException, LimaBusinessException;
void createSubLedgerWithTransaction(Account masterAccount, Account account, TopiaContext topiaContext) throws LimaException;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -19,12 +19,16 @@
package org.chorem.lima.business.ejbinterface;
+import java.util.Date;
import java.util.List;
import java.util.Set;
import javax.ejb.Remote;
+
+import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
@@ -80,5 +84,6 @@
void updateEntry(Entry entry) throws LimaException;
void removeEntry(Entry entry) throws LimaException;
-
+
+ List<Entry> searchEntry(Date beginDate, Date endDate, String voucher, String description, String letter, String accountsList, Account account, EntryBook entryBook, FinancialStatementWayEnum fStWayEnum, String operator, String amount, String amount2) throws LimaException;
}
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/FinancialStatementWayEnum.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -1,7 +1,43 @@
package org.chorem.lima;
+import static org.nuiton.i18n.I18n._;
+
public enum FinancialStatementWayEnum {
- BOTH, DEBIT, CREDIT;
+ BOTH(_("lima.enum.comboboxamount.both")),
+ DEBIT(_("lima.enum.comboboxamount.debit")),
+ CREDIT(_("lima.enum.comboboxamount.credit"));
+ private final String description;
+
+ private FinancialStatementWayEnum(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public static String[] descriptions(){
+ int nbElts = FinancialStatementWayEnum.values().length;
+ String[] descriptions = new String[nbElts];
+ FinancialStatementWayEnum[] enums = FinancialStatementWayEnum.values();
+ for (int i = 0; i < nbElts; i++) {
+ descriptions[i] = enums[i].getDescription();
+ }
+ return descriptions;
+ }
+
+ public static FinancialStatementWayEnum valueOfDescription(String description){
+ FinancialStatementWayEnum value = null;
+
+ for (FinancialStatementWayEnum enums : FinancialStatementWayEnum.values()) {
+ if (description.equals(enums.description)){
+ value = enums;
+ break;
+ }
+ }
+ return value;
+ }
+
}
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -18,9 +18,14 @@
package org.chorem.lima.entity;
+import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.StringTokenizer;
+import org.apache.commons.lang.StringUtils;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery.Op;
public class AccountDAOImpl <E extends Account> extends AccountDAOAbstract<E> {
@@ -34,11 +39,113 @@
String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
query.addWhere("not exists elements ("+subAccountsProperty+")")
.addOrder(Account.ACCOUNT_NUMBER);
-
return (List<Account>) findAllByQuery(query);
}
+
+ /**
+ * Convert string of extends number to list of accounts
+ * Example '22, 45..48, 67' -> [22, 45, 46, 47, 48, 67]
+ * SubAccountsMode return list of existing subaccounts ex 6 return : 61, 62, .., 69, 610, .., 619 etc
+ */
@Override
+ public List<Account> stringToListAccounts(String selectedAccounts,
+ Boolean subAccountsMode) throws TopiaException {
+ List<Account> accounts = new ArrayList<Account>();
+ if (selectedAccounts != null){
+ //Remove Spaces
+ selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts);
+ //use hashset for delete duplicate numbers
+ HashSet<String> accountNumbers = new HashSet<String>();
+ HashSet<String> accountNumbersToRemove = new HashSet<String>();
+ Boolean first = true;
+ StringTokenizer stStar = new StringTokenizer(selectedAccounts, "-");
+ while (stStar.hasMoreTokens()) {
+ String subString = stStar.nextToken();
+
+ //Split comma
+ StringTokenizer stComma = new StringTokenizer(subString, ",");
+ while (stComma.hasMoreTokens()) {
+ String s = stComma.nextToken();
+ if (s.contains("..") && !s.endsWith("..")){
+ //Split ..
+ String stringDoubleDot[] = s.split("\\.\\.");
+ int lowAccount = Integer.parseInt(stringDoubleDot[0]);
+ int highAccount = Integer.parseInt(stringDoubleDot[1]);
+
+ //prevent to much result, can't let intervall superior to 1000
+ if (highAccount - lowAccount <= 10000){
+ for (int i=lowAccount; i <= highAccount; i++) {
+ //if first add accounts, else remove
+ if (first){
+ accountNumbers.add(String.valueOf(i));
+ }
+ else {
+ accountNumbersToRemove.add(String.valueOf(i));
+ }
+ }
+ }
+ }
+ else{
+ //if first
+ if (first){
+ accountNumbers.add(s);
+ }
+ else {
+ accountNumbersToRemove.add(s);
+ }
+ }
+ }
+ first=false;
+ }
+ //add all accounts
+ for (String accountNumber : accountNumbers) {
+ Account account = null;
+ if (subAccountsMode){
+ account = findSubAccountByNumber(accountNumber);
+ }
+ else {
+ account = findByAccountNumber(accountNumber);
+
+ }
+ //add account if exist
+ if (account != null){
+ accounts.add(account);
+ }
+ //search all account start with accountnumber
+ else {
+ TopiaQuery query = createQuery();
+ String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
+ //String subLedgersProperty = TopiaQuery.getProperty(Account.SUB_LEDGERS);
+ query.addWhere("not exists elements ("+subAccountsProperty+")")
+ //.addWhere("not exists elements ("+subLedgersProperty+")")
+ .addWhere(Account.ACCOUNT_NUMBER, Op.LIKE, accountNumber+"%");
+ List<Account> accountsResult = (List<Account>) findAllByQuery(query);
+ if (accountsResult != null){
+ accounts.addAll(accountsResult);
+ }
+ }
+ }
+ //remove all accounts
+ for (String accountNumber : accountNumbersToRemove) {
+ Account account = null;
+ if (subAccountsMode){
+ account = findSubAccountByNumber(accountNumber);
+ }
+ else {
+ account = findByAccountNumber(accountNumber);
+ }
+ if (account != null) {
+ accounts.remove(account);
+ }
+ }
+ }
+ return accounts;
+ }
+
+
+
+ @Override
public Account findSubAccountByNumber(String number) throws TopiaException {
TopiaQuery query = createQuery();
String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAccountsEnum.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -23,6 +23,7 @@
public enum ComboBoxAccountsEnum {
+ ALL(_("lima.enum.comboboxaccount.allaccount")),
ACCOUNT(_("lima.enum.comboboxaccount.account")),
ACCOUNT_LIST(_("lima.enum.comboboxaccount.accountlist"));
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAmountEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAmountEnum.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxAmountEnum.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -1,61 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.enums;
-
-import static org.nuiton.i18n.I18n._;
-
-
-public enum ComboBoxAmountEnum {
-
- BOTH(_("lima.enum.comboboxamount.both")),
- DEBIT(_("lima.enum.comboboxamount.debit")),
- CREDIT(_("lima.enum.comboboxamount.credit"));
-
- private final String description;
-
- private ComboBoxAmountEnum(String description) {
- this.description = description;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public static String[] descriptions(){
- int nbElts = ComboBoxAmountEnum.values().length;
- String[] descriptions = new String[nbElts];
- ComboBoxAmountEnum[] enums = ComboBoxAmountEnum.values();
- for (int i = 0; i < nbElts; i++) {
- descriptions[i] = enums[i].getDescription();
- }
- return descriptions;
- }
-
- public static ComboBoxAmountEnum valueOfDescription(String description){
- ComboBoxAmountEnum value = null;
-
- for (ComboBoxAmountEnum enums : ComboBoxAmountEnum.values()) {
- if (description.equals(enums.description)){
- value = enums;
- break;
- }
- }
- return value;
- }
-}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxEntryBooksEnum.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -0,0 +1,60 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.enums;
+
+import static org.nuiton.i18n.I18n._;
+
+
+public enum ComboBoxEntryBooksEnum {
+
+ ALL(_("lima.enum.comboboxentrybook.all")),
+ SELECT_ONE(_("lima.enum.comboboxentrybook.select_one"));
+
+ private final String description;
+
+ private ComboBoxEntryBooksEnum(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public static String[] descriptions(){
+ int nbElts = ComboBoxEntryBooksEnum.values().length;
+ String[] descriptions = new String[nbElts];
+ ComboBoxEntryBooksEnum[] enums = ComboBoxEntryBooksEnum.values();
+ for (int i = 0; i < nbElts; i++) {
+ descriptions[i] = enums[i].getDescription();
+ }
+ return descriptions;
+ }
+
+ public static ComboBoxEntryBooksEnum valueOfDescription(String description){
+ ComboBoxEntryBooksEnum value = null;
+
+ for (ComboBoxEntryBooksEnum enums : ComboBoxEntryBooksEnum.values()) {
+ if (description.equals(enums.description)){
+ value = enums;
+ break;
+ }
+ }
+ return value;
+ }
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxOperatorsEnum.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -23,20 +23,30 @@
public enum ComboBoxOperatorsEnum {
- EQUAL(_("lima.enum.comboboxoperator.equal")),
- SUPERIOR(_("lima.enum.comboboxoperator.superior")),
- INFERIOR(_("lima.enum.comboboxoperator.inferior"));;
+ EQUAL(_("lima.enum.comboboxoperator.equal"), "="),
+ SUPERIOR_OR_EQUAL(_("lima.enum.comboboxoperator.superiororequal"), ">="),
+ INFERIOR_OR_EQUAL(_("lima.enum.comboboxoperator.inferiororequal"), "<="),
+ SUPERIOR(_("lima.enum.comboboxoperator.superior"), ">"),
+ INFERIOR(_("lima.enum.comboboxoperator.inferior"), "<"),
+ INTERVAL(_("lima.enum.comboboxoperator.interval"), ""),
+ NOT_EQUAL(_("lima.enum.comboboxoperator.notequal"),"!=");
private final String description;
+ private final String symbol;
- private ComboBoxOperatorsEnum(String description) {
+ private ComboBoxOperatorsEnum(String description, String symbol) {
this.description = description;
+ this.symbol = symbol;
}
public String getDescription() {
- return this.description;
+ return this.description;
}
+ public String getSymbol(){
+ return this.symbol;
+ }
+
public static String[] descriptions(){
int nbElts = ComboBoxOperatorsEnum.values().length;
String[] descriptions = new String[nbElts];
@@ -46,6 +56,7 @@
}
return descriptions;
}
+
public static ComboBoxOperatorsEnum valueOfDescription(String description){
ComboBoxOperatorsEnum value = null;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxPeriodEnum.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -23,8 +23,8 @@
public enum ComboBoxPeriodEnum {
+ PERIOD(_("lima.enum.comboboxperiod.period")),
DATE(_("lima.enum.comboboxperiod.date")),
- PERIOD(_("lima.enum.comboboxperiod.period")),
FISCAL_PERIOD(_("lima.enum.comboboxperiod.fiscalperiod")),
FINANCIAL_PERIOD(_("lima.enum.comboboxperiod.financialperiod"));
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -100,6 +100,7 @@
return result;
}
+
public void refresh(){
cacheDatas = getDataList();
fireContentsChanged(this, 0, cacheDatas.size());
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -58,7 +58,8 @@
public void actionPerformed(ActionEvent e) {
Object object = this.getSelectedItem();
if (object instanceof Account){
- //handler.setAccount((Account) this.getSelectedItem());
+ handler.setAccount((Account) this.getSelectedItem());
+ handler.refresh();
}
}
@@ -72,7 +73,13 @@
public void keyReleased(KeyEvent e) {
Object object = this.getSelectedItem();
if (object instanceof Account){
- //handler.setAccount((Account) this.getSelectedItem());
+ Account account = (Account) this.getSelectedItem();
+ //to prevent useless call to service
+ if (!account.equals(handler.getAccount())){
+ handler.setAccount(account);
+ handler.refresh();
+ }
+
}
// delegate popup list menu
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -18,8 +18,11 @@
package org.chorem.lima.ui.financialtransactionsearch;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
import javax.swing.JPanel;
import javax.swing.JTextField;
+import org.chorem.lima.entity.Account;
import org.chorem.lima.enums.ComboBoxAccountsEnum;
public class AccountSearchPanel extends JPanel {
@@ -28,7 +31,6 @@
public AccountSearchPanel(FinancialTransactionSearchViewHandler handler) {
this.handler = handler;
- refresh(ComboBoxAccountsEnum.ACCOUNT);
}
static final long serialVersionUID = 1L;
@@ -36,14 +38,46 @@
public void refresh(ComboBoxAccountsEnum comboBoxAccountsEnum){
switch (comboBoxAccountsEnum) {
+ case ALL:
+ handler.setAccount(null);
+ handler.refresh();
+ this.removeAll();
+ break;
+
case ACCOUNT:
- AccountSearchComboBox accountComboBox = new AccountSearchComboBox(handler);
+ final AccountSearchComboBox accountComboBox = new AccountSearchComboBox(handler);
+ handler.setAccount((Account) accountComboBox.getSelectedItem());
+ handler.refresh();
this.removeAll();
this.add(accountComboBox);
break;
case ACCOUNT_LIST:
- JTextField accountsList = new JTextField(16);
+ final JTextField accountsList = new JTextField(16);
+ KeyListener accountsListKeyListener = new KeyListener() {
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ String accounts = accountsList.getText();
+ //to prevent useless call to service
+ if (!accounts.equals(handler.getAccountsList())){
+ handler.setAccountsList(accounts);
+ handler.refresh();
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ };
+ accountsList.addKeyListener(accountsListKeyListener);
+ handler.setAccountsList(accountsList.getText());
+ handler.setAccount(null);
+ handler.refresh();
this.removeAll();
this.add(accountsList);
break;
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -0,0 +1,101 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import org.chorem.lima.enums.ComboBoxOperatorsEnum;
+
+public class AmountSearchPanel extends JPanel {
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public AmountSearchPanel(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+ refresh(ComboBoxOperatorsEnum.EQUAL);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxOperatorsEnum enums){
+
+ final JTextField amountTextField = new JTextField(16);
+ KeyListener amountKeyListener = new KeyListener() {
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ String amount = amountTextField.getText();
+ //to prevent useless call to service
+ if (!amount.equals(handler.getAmount())){
+ handler.setAmount(amount);
+ handler.refresh();
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ };
+ amountTextField.addKeyListener(amountKeyListener);
+ handler.setAmount2("");
+ handler.setOperator(enums.getSymbol());
+ this.removeAll();
+ this.add(amountTextField);
+
+ switch (enums) {
+ case INTERVAL:
+ final JTextField amount2TextField = new JTextField(16);
+ KeyListener amount2KeyListener = new KeyListener() {
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+
+ String amount2 = amount2TextField.getText();
+ //to prevent useless call to service
+ if (!amount2.equals(handler.getAmount2())){
+ handler.setAmount2(amount2);
+ handler.refresh();
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ };
+ amount2TextField.addKeyListener(amount2KeyListener);
+ handler.setAmount("");
+ this.add(amount2TextField);
+ break;
+ }
+ amountTextField.setText(handler.getAmount());
+ handler.refresh();
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -58,7 +58,8 @@
public void actionPerformed(ActionEvent e) {
Object object = this.getSelectedItem();
if (object instanceof EntryBook){
- //handler.setEntryBook((EntryBook) this.getSelectedItem());
+ handler.setEntryBook((EntryBook) this.getSelectedItem());
+ handler.refresh();
}
}
@@ -72,7 +73,8 @@
public void keyReleased(KeyEvent e) {
Object object = this.getSelectedItem();
if (object instanceof EntryBook){
- //handler.setEntryBook((EntryBook) this.getSelectedItem());
+ handler.setEntryBook((EntryBook) this.getSelectedItem());
+ handler.refresh();
}
// delegate popup list menu
if ( e.getKeyChar() == KeyEvent.VK_ENTER )
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -0,0 +1,54 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import javax.swing.JPanel;
+import org.chorem.lima.enums.ComboBoxEntryBooksEnum;
+
+public class EntryBookSearchPanel extends JPanel {
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public EntryBookSearchPanel(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxEntryBooksEnum enums){
+
+ switch (enums) {
+ case SELECT_ONE:
+ EntryBookSearchComboBox entryBookSearchComboBox = new EntryBookSearchComboBox(handler);
+ handler.setEntryBook(null);
+ handler.refresh();
+ this.removeAll();
+ this.add(entryBookSearchComboBox);
+ break;
+
+ case ALL:
+ handler.setEntryBook(null);
+ handler.refresh();
+ this.removeAll();
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -42,7 +42,7 @@
* @author ore
* @author Rémi Chapelet
*/
-public class FinancialTransactionSearchTable extends JXTable implements KeyListener {
+public class FinancialTransactionSearchTable extends JXTable {
/** serialVersionUID. */
private static final long serialVersionUID = 3133690382049594727L;
@@ -58,8 +58,6 @@
public FinancialTransactionSearchTable(FinancialTransactionSearchViewHandler handler) {
this.handler = handler;
-
- addKeyListener(this);
//Get new date editor
setDefaultEditor(Date.class, new DateTableCellEditor());
@@ -126,29 +124,4 @@
new ColorHighlighter(predicate, new Color(255, 198, 209), null);
addHighlighter(colorTransaction);
}
-
- /**
- * for each action combination key are think
- * for extend keyboard and laptop keyboard
- */
- @Override
- public void keyPressed(KeyEvent e) {
-
- }
-
- /*
- * @see java.awt.event.KeyListener#keyTyped(java.awt.event.KeyEvent)
- */
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
- /*
- * @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
- */
- @Override
- public void keyReleased(KeyEvent e) {
-
- }
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -66,63 +66,13 @@
private static final Log log = LogFactory
.getLog(FinancialTransactionSearchTableModel.class);
- /** Transaction service. */
- protected final FinancialTransactionService financialTransactionService;
- /** selected financial period */
- protected FiscalPeriod selectedFiscalPeriod;
-
/** data cache */
- protected List<Object> cacheDataList;
-
- /** collection
+ protected List<Entry> cacheDataList;
- /**
- * Model constructor.
- *
- * Just init service proxies.
- */
- public FinancialTransactionSearchTableModel() {
- /* Services */
- financialTransactionService =
- LimaServiceFactory.getInstance().getService(
- FinancialTransactionServiceMonitorable.class);
- }
-
- /**
- * Le model est une combinaison de Transaction/Entries.
- *
- *
- * @return
- */
- protected List<Object> getDataList() {
- List<Object> results = new ArrayList<Object>();
- if(selectedFiscalPeriod != null){
- try {
- Set<FinancialTransaction> financialtransactions =
- financialTransactionService.getAllInexactFinancialTransactions(selectedFiscalPeriod);
- for (FinancialTransaction financialtransaction : financialtransactions) {
- results.add(financialtransaction);
- List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
- Collections.sort(entries, new EntryComparator());
- results.addAll(entries);
- }
- }
- catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.debug("Can't update model", eee);
- }
-
- ErrorHelper.showErrorDialog("Can't get transaction list", eee);
- }
- }
-
- return results;
- }
-
- public void refresh(){
- cacheDataList = getDataList();
+ public void refresh(List<Entry> objects){
+ cacheDataList = objects;
fireTableDataChanged();
}
@@ -224,79 +174,45 @@
// just prevent too much result
if (cacheDataList != null) {
- result = cacheDataList.get(row);
-
- if (result instanceof FinancialTransaction) {
- FinancialTransaction currentRow = (FinancialTransaction)result;
- BigDecimal amountDebit = currentRow.getAmountDebit();
- BigDecimal amountCredit = currentRow.getAmountCredit();
-
+ Entry currentRow = cacheDataList.get(row);
+
switch (column) {
case 0:
- result = currentRow.getTransactionDate();
+ result = currentRow.getFinancialTransaction().getTransactionDate();
break;
case 1:
- if (currentRow.getEntryBook() != null){
- result = currentRow.getEntryBook().getCode();
+ EntryBook entryBook =
+ currentRow.getFinancialTransaction().getEntryBook();
+ if (entryBook != null){
+ result = entryBook.getCode();
}
else {
result = null;
}
break;
case 2:
- result = null; //entrybook
+ result = currentRow.getVoucher();
break;
- case 3:
- result = null; // account
- break;
- case 4:
- result = null; // description
- break;
- case 5 :
- result = null; // position
- break;
- case 6:
- result = amountDebit;
- break;
- case 7:
- result = amountCredit;
- break;
- case 8:
- result = amountDebit.subtract(amountCredit);
- break;
- }
- }
- else if (result instanceof Entry) {
- Entry currentEntry = (Entry)result;
- switch (column) {
- case 0:
- result = null; // date
- break;
- case 1 : // entry book
- result = null;
- break;
- case 2:
- result = currentEntry.getVoucher();
- break;
case 3: // account
- if (currentEntry.getAccount() != null){
- result = currentEntry.getAccount().getAccountNumber();
+ Account account = currentRow.getAccount();
+ if (account != null){
+ result = account.getAccountNumber();
}
else {
result = null;
}
break;
case 4:
- result = currentEntry.getDescription();
+ result = currentRow.getDescription();
break;
case 5 :
- result = currentEntry.getPosition();
+ result = currentRow.getPosition();
break;
case 6:
- result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
+ result = currentRow.getDebit() ? currentRow.getAmount() : 0;
break;
case 7:
- result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
+ result = currentRow.getDebit() ? 0 : currentRow.getAmount();
break;
case 8:
result = null; // balance
@@ -304,14 +220,10 @@
}
}
- }
return result;
}
- public void setFiscalPeriod(FiscalPeriod fiscalPeriod){
- selectedFiscalPeriod = fiscalPeriod;
- }
/**
* To set cells editable or not
@@ -333,33 +245,9 @@
}
- /**
- * @throws LimaException
- */
- public void addEmptyEntry(Object value, int row) throws LimaException {
- FinancialTransaction currentTransaction = null;
- Object currentRow = cacheDataList.get(row);
- Entry entry = new EntryImpl();
- entry.setAmount(new BigDecimal(0));
- //check if current row is a transaction or an entry
- if (currentRow instanceof FinancialTransaction) {
- currentTransaction = (FinancialTransaction)currentRow;
- }
- else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry)currentRow;
- //get back the parent transaction of the entry
- currentTransaction = currentEntry.getFinancialTransaction();
- }
- //create it
- entry.setFinancialTransaction(currentTransaction);
- financialTransactionService.createEntry(entry);
- //on recharge la liste
- refresh();
- }
-
- /**
+ /* /**
* to modifiy financialtransaction or entry
- */
+ *
@Override
public void setValueAt(Object value, int row, int column) {
int financialTransactionRow=0;
@@ -433,35 +321,12 @@
//TODO PEPIN 20100607 Get financial transaction of cachedatelist on replace it
fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);
}
- }
+ }*/
public Object getElementAt(int row){
Object currentRow = cacheDataList.get(row);
return currentRow;
}
-
-
- /**
- * Delete selected row in table (could be transaction or entry).
- *
- * Called by model.
- * @param Object, int
- * @throws LimaException
- */
- public void removeObject(Object object, int row) throws LimaException {
- Object currentRow = cacheDataList.get(row);
- if (currentRow instanceof FinancialTransaction) {
- FinancialTransaction currentTransaction =
- (FinancialTransaction)currentRow;
- financialTransactionService.removeFinancialTransaction(currentTransaction);
- }
- else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry)currentRow;
- financialTransactionService.removeEntry(currentEntry);
- }
- //on recharge la liste
- refresh();
- }
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-19 21:13:17 UTC (rev 3007)
@@ -22,13 +22,21 @@
<![CDATA[
import org.chorem.lima.enums.ComboBoxPeriodEnum;
import org.chorem.lima.enums.ComboBoxAccountsEnum;
- import org.chorem.lima.enums.ComboBoxAmountEnum;
+ import org.chorem.lima.enums.ComboBoxEntryBooksEnum;
+ import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.enums.ComboBoxOperatorsEnum;
AccountSearchPanel accountSearchPanel = new AccountSearchPanel(handler);
+ AmountSearchPanel amountSearchPanel = new AmountSearchPanel(handler);
+ EntryBookSearchPanel entryBookSearchPanel = new EntryBookSearchPanel(handler);
PeriodSearchPanel periodSearchPanel = new PeriodSearchPanel(handler);
void $afterCompleteSetup() {
+ handler.init();
+ handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription(
+ (String) getAmountComboBox().getSelectedItem()));
+ handler.setOperator(ComboBoxOperatorsEnum.valueOfDescription(
+ (String) getOperatorComboBox().getSelectedItem()).getSymbol());
}
]]>
@@ -58,16 +66,22 @@
onActionPerformed="accountSearchPanel.refresh(ComboBoxAccountsEnum.valueOfDescription((String) accountComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
<cell><AccountSearchPanel javaBean="accountSearchPanel"/></cell>
- <cell anchor='east'><JLabel text="lima.table.entrybook"/></cell>
- <cell anchor='west'><EntryBookSearchComboBox javaBean="new EntryBookSearchComboBox(handler)"/></cell>
+ <cell><JComboBox id="entryBookComboBox" javaBean="new JComboBox(ComboBoxEntryBooksEnum.descriptions())"
+ onActionPerformed="entryBookSearchPanel.refresh(ComboBoxEntryBooksEnum.valueOfDescription((String) entryBookComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><EntryBookSearchPanel javaBean="entryBookSearchPanel"/></cell>
</row></Table></cell>
</row>
<row>
<cell><Table><row>
<cell><JLabel text="lima.amount"/></cell>
- <cell><JComboBox id="amountComboBox" javaBean="new JComboBox(ComboBoxAmountEnum.descriptions())"/></cell>
- <cell><JComboBox id="operatorComboBox" javaBean="new JComboBox(ComboBoxOperatorsEnum.descriptions())"/></cell>
- <cell><JTextField id='amount'/></cell>
+ <cell><JComboBox id="amountComboBox" javaBean="new JComboBox(FinancialStatementWayEnum.descriptions())"
+ onActionPerformed="handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription((String)amountComboBox.getSelectedItem()));
+ handler.refresh()"/></cell>
+ <cell><JComboBox id="operatorComboBox" javaBean="new JComboBox(ComboBoxOperatorsEnum.descriptions())"
+ onActionPerformed="amountSearchPanel.refresh(ComboBoxOperatorsEnum.valueOfDescription((String) operatorComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><AmountSearchPanel javaBean="amountSearchPanel"/></cell>
</row></Table></cell>
</row>
<row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -19,10 +19,23 @@
package org.chorem.lima.ui.financialtransactionsearch;
import static org.nuiton.i18n.I18n._;
-
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.util.Date;
+import java.util.List;
+import javax.swing.JTextField;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.Entry;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.util.ErrorHelper;
/**
* Handler associated with financial transaction view.
@@ -47,14 +60,225 @@
protected FiscalPeriodComboBoxModel comboBoxModel;
+ /** Transaction service. */
+ protected final FinancialTransactionService financialTransactionService;
+
+ protected Date beginDate;
+ protected Date endDate;
+ protected String voucher;
+ protected String description;
+ protected String letter;
+ protected String accountsList;
+ protected Account account;
+ protected EntryBook entryBook;
+ protected FinancialStatementWayEnum amountWayEnum;
+ protected String operator;
+ protected String amount;
+ protected String amount2;
+
protected FinancialTransactionSearchViewHandler(FinancialTransactionSearchView view) {
this.view = view;
+
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ }
+
+ public void init(){
+
+ final JTextField descriptionTextField = view.getDescription();
+ KeyListener descriptionKeyListener = new KeyListener() {
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ setDescription(descriptionTextField.getText());
+ refresh();
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ };
+ descriptionTextField.addKeyListener(descriptionKeyListener);
+
+ final JTextField letterTextField = view.getLetter();
+ KeyListener letterKeyListener = new KeyListener() {
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ //to prevent useless call to service
+ String letterNew = letterTextField.getText();
+ if (!letterNew.equals(letter)){
+ setLetter(letterNew);
+ refresh();
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ };
+ letterTextField.addKeyListener(letterKeyListener);
+
+ final JTextField voucherTextField = view.getVoucher();
+ KeyListener voucherKeyListener = new KeyListener() {
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ //to prevent useless call to service
+ String voucherNew = voucherTextField.getText();
+ if (!voucherNew.equals(voucher)){
+ setVoucher(voucherNew);
+ refresh();
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ }
+ };
+ voucherTextField.addKeyListener(voucherKeyListener);
+ }
+
+ public void setBeginDate(Date beginDate){
+ this.beginDate = beginDate;
+ log.debug(beginDate);
+ }
+
+ public void setEndDate(Date endDate){
+ this.endDate = endDate;
+ log.debug(endDate);
+ }
+
+ public void setVoucher(String voucher){
+ String result = null;
+ if (!voucher.equals("")){
+ result = voucher;
+ }
+ this.voucher=result;
+ }
+
+ public void setDescription(String description){
+ String result = null;
+ if (!description.equals("")){
+ result = description;
+ }
+ this.description=result;
+ }
+
+ public void setLetter(String letter){
+ String result = null;
+ if (!letter.equals("")){
+ result = letter;
+ }
+ this.letter=result;
+ }
+
+ public String getAccountsList(){
+ return this.accountsList;
+ }
+
+ public void setAccountsList(String accountsList){
+ String result = null;
+ if (!accountsList.equals("")){
+ result = accountsList;
+ }
+ this.accountsList=result;
+ }
+ public Account getAccount(){
+ return this.account;
}
+ public void setAccount(Account account){
+ this.account=account;
+ }
+
+ public void setEntryBook(EntryBook entryBook){
+ this.entryBook=entryBook;
+ }
+
+
+ public String getAmount(){
+ return this.amount;
+ }
+
+ public void setAmount(String amount){
+ String result = null;
+ if (!amount.equals("")){
+ result = amount;
+ }
+ this.amount=result;
+ }
+
+ public String getAmount2(){
+ return this.amount2;
+ }
+
+ public void setAmount2(String amount2){
+ String result = null;
+ if (!amount2.equals("")){
+ result = amount2;
+ }
+ this.amount2=result;
+ }
+
+ public void setAmountWayEnum(FinancialStatementWayEnum amountWayEnum){
+ this.amountWayEnum=amountWayEnum;
+ }
+
+ public void setOperator(String operator){
+ String result = null;
+ if (!operator.equals("")){
+ result = operator;
+ }
+ this.operator=result;
+ }
+
public void refresh(){
tableModel = view.getFinancialTransactionSearchTableModel();
- tableModel.refresh();
+ if (tableModel != null){
+ log.debug(voucher+" "
+ +description+" "+letter+" "+accountsList+" "
+ +account+" "+entryBook+" "+amount);
+ //prevent to much result
+ tableModel.refresh(getDataList());
+ }
}
+
+ protected List<Entry> getDataList() {
+ List<Entry> results = null;
+ if (voucher != null || description != null || letter != null ||
+ accountsList != null || account != null || entryBook != null ||
+ (amount != null && operator != null) || (amount != null && amount2 != null)){
+ try {
+ results = financialTransactionService.searchEntry(beginDate, endDate,
+ voucher, description, letter, accountsList, account,
+ entryBook, amountWayEnum, operator, amount, amount2);
+
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.debug("Can't update model", eee);
+ }
+ ErrorHelper.showErrorDialog("Can't get transaction list", eee);
+ }
+ }
+ return results;
+ }
+
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -18,6 +18,8 @@
package org.chorem.lima.ui.financialtransactionsearch;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.util.Calendar;
import java.util.Date;
import static org.nuiton.i18n.I18n._;
@@ -28,6 +30,8 @@
import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.enums.ComboBoxPeriodEnum;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
@@ -44,7 +48,9 @@
public PeriodSearchPanel(FinancialTransactionSearchViewHandler handler) {
this.handler = handler;
- refresh(ComboBoxPeriodEnum.DATE);
+
+ //init date
+ refresh(ComboBoxPeriodEnum.PERIOD);
}
static final long serialVersionUID = 1L;
@@ -56,7 +62,18 @@
Calendar calendar = Calendar.getInstance();
Date date = calendar.getTime();
date = DateUtils.truncate(date, Calendar.DATE);
- JXDatePicker datePicker = new JXDatePicker(date);
+ final JXDatePicker datePicker = new JXDatePicker(date);
+ ActionListener dateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(datePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(datePicker.getDate());
+ handler.setEndDate(null);
+ handler.refresh();
+ datePicker.addActionListener(dateActionListener);
this.removeAll();
this.add(datePicker);
break;
@@ -74,9 +91,30 @@
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
- JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
- JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
this.removeAll();
this.add(beginDateLabel);
this.add(beginDatePicker);
@@ -87,10 +125,20 @@
case FISCAL_PERIOD:
FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
- JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
fiscalPeriod.setRenderer(fiscalRenderer);
fiscalPeriod.setEditable(false);
- //fiscalPeriod.actionPerformed(handler.);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
this.removeAll();
this.add(fiscalPeriod);
break;
@@ -98,9 +146,19 @@
case FINANCIAL_PERIOD:
FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
- JComboBox financialPeriod = new JComboBox(financialModel);
+ final JComboBox financialPeriod = new JComboBox(financialModel);
financialPeriod.setRenderer(financialRenderer);
financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
this.removeAll();
this.add(financialPeriod);
break;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java 2010-08-19 21:13:17 UTC (rev 3007)
@@ -157,6 +157,9 @@
* Ajoute une entrée comptable si tab est sur
* la dernière cellule.
*/
+
+ //TODO 2010-08-19 verifier si la transaction est équilibré
+ // cf. FinancialTransactionTable.java comme modèle
if (e.getKeyChar() == KeyEvent.VK_TAB) {
// Vérifie si la cellule sélectionnée est la dernière
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-19 21:13:17 UTC (rev 3007)
@@ -93,12 +93,20 @@
lima.entrybook.type5=
lima.enum.comboboxaccount.account=
lima.enum.comboboxaccount.accountlist=
+lima.enum.comboboxaccount.allaccount=
lima.enum.comboboxamount.both=
lima.enum.comboboxamount.credit=
lima.enum.comboboxamount.debit=
+lima.enum.comboboxentrybook.all=
+lima.enum.comboboxentrybook.select_one=
lima.enum.comboboxoperator.equal=
lima.enum.comboboxoperator.inferior=
+lima.enum.comboboxoperator.inferiororequal=
+lima.enum.comboboxoperator.interval=
+lima.enum.comboboxoperator.intervalle=
+lima.enum.comboboxoperator.notequal=
lima.enum.comboboxoperator.superior=
+lima.enum.comboboxoperator.superiororequal=
lima.enum.comboboxperiod.date=
lima.enum.comboboxperiod.financialperiod=
lima.enum.comboboxperiod.fiscalperiod=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-18 14:47:44 UTC (rev 3006)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-19 21:13:17 UTC (rev 3007)
@@ -87,13 +87,20 @@
lima.entrybook.type4=G\u00E9n\u00E9ral
lima.entrybook.type5=Situation
lima.enum.comboboxaccount.account=Compte
-lima.enum.comboboxaccount.accountlist=Liste de compte
+lima.enum.comboboxaccount.accountlist=Liste de comptes
+lima.enum.comboboxaccount.allaccount=Tous les comptes
lima.enum.comboboxamount.both=Les deux
lima.enum.comboboxamount.credit=Cr\u00E9dit
lima.enum.comboboxamount.debit=D\u00E9bit
+lima.enum.comboboxentrybook.all=Tous les journaux
+lima.enum.comboboxentrybook.select_one=Journal
lima.enum.comboboxoperator.equal=\u00C9gal
lima.enum.comboboxoperator.inferior=Inf\u00E9rieur
+lima.enum.comboboxoperator.inferiororequal=Inf\u00E9rieur ou \u00E9gal
+lima.enum.comboboxoperator.interval=Intervalle
+lima.enum.comboboxoperator.notequal=Diff\u00E9rent
lima.enum.comboboxoperator.superior=Sup\u00E9rieur
+lima.enum.comboboxoperator.superiororequal=Sup\u00E9rieur ou \u00E9gal
lima.enum.comboboxperiod.date=Date
lima.enum.comboboxperiod.financialperiod=P\u00E9riode Financi\u00E8re
lima.enum.comboboxperiod.fiscalperiod=Exercice
1
0