Lima-commits
Threads by month
- ----- 2026 -----
- 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
June 2010
- 4 participants
- 37 discussions
Author: jpepin
Date: 2010-06-30 19:10:09 +0200 (Wed, 30 Jun 2010)
New Revision: 2955
Url: http://chorem.org/repositories/revision/lima/2955
Log:
Export du plan comptable.
Ajout cl?\195?\169 m?\195?\169tier sur account number.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/ImportExportForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/FileChooseView.jaxx
Modified:
trunk/lima-business/pom.xml
trunk/lima-business/src/main/java/org/chorem/lima/business/ImportExportService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/CSVExport.java
trunk/lima-callao/src/main/xmi/accounting.properties
trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java
trunk/lima-swing/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
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/celleditor/AccountTableCellEditor.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/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-business/pom.xml 2010-06-30 17:10:09 UTC (rev 2955)
@@ -25,6 +25,10 @@
<artifactId>jdom</artifactId>
</dependency>
<dependency>
+ <groupId>net.sf.opencsv</groupId>
+ <artifactId>opencsv</artifactId>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ImportExportService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ImportExportService.java 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ImportExportService.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -84,4 +84,44 @@
* @throws LimaException
*/
void importAsEbpCSV(byte[] data) throws LimaException;
+
+ /**
+ * Import data as Sage Maestria export.
+ *
+ * @param data
+ * @throws LimaException
+ */
+ void importAsSage(byte[] data) throws LimaException;
+
+ /**
+ * Import data as Ciel Compta export.
+ *
+ * @param data
+ * @throws LimaException
+ */
+ void importAsCiel(byte[] data) throws LimaException;
+
+ /**
+ * export accounts chart as CSV.
+ *
+ * @param data
+ * @throws LimaException
+ */
+ void exportAccountsChartAsCSV(String path) throws LimaException;
+
+ /**
+ * export entrybook chart as CSV.
+ *
+ * @param data
+ * @throws LimaException
+ */
+ void exportEntryBookChartAsCSV(byte[] data) throws LimaException;
+
+ /**
+ * export financialstatement chart as CSV.
+ *
+ * @param data
+ * @throws LimaException
+ */
+ void exportFinancialStatementChartAsCSV(byte[] data) 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-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -119,10 +119,10 @@
public final String key;
public final String description;
- public final String defaultValue;
+ public String defaultValue;
public final Class<?> type;
- public final boolean _transient;
- public final boolean _final;
+ public boolean _transient;
+ public boolean _final;
private Option(String key, String description, String defaultValue,
Class<?> type, boolean _transient, boolean _final) {
@@ -138,16 +138,31 @@
public boolean isFinal() {
return _final;
}
+
+ @Override
+ public void setFinal(boolean _final){
+ this._final=_final;
+ }
@Override
public boolean isTransient() {
return _transient;
}
+
+ @Override
+ public void setTransient(boolean _transient) {
+ this._transient=_transient;
+ }
@Override
public String getDefaultValue() {
return defaultValue;
}
+
+ @Override
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue=defaultValue;
+ }
@Override
public String getDescription() {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportExportServiceImpl.java 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportExportServiceImpl.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -20,18 +20,30 @@
package org.chorem.lima.business.ejb;
import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
-
+import java.util.List;
import javax.ejb.Stateless;
-
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.ImportExportService;
import org.chorem.lima.business.ImportExportServiceLocal;
+import org.chorem.lima.business.LimaBusinessException;
+import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.AccountDAO;
+import org.chorem.lima.entity.LimaCallaoDAOHelper;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaContextFactory;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaNotFoundException;
+import au.com.bytecode.opencsv.CSVWriter;
+
/**
* XML and CSV import export service.
*
@@ -44,10 +56,23 @@
* By : $Author$
*/
@Stateless
-public class ImportExportServiceImpl implements ImportExportService, ImportExportServiceLocal {
+public class ImportExportServiceImpl extends AbstractLimaService implements ImportExportService, ImportExportServiceLocal {
private static final Log log = LogFactory.getLog(ImportExportServiceImpl.class);
+
+ private TopiaContext rootContext;
+ public ImportExportServiceImpl() {
+ LimaConfig config = LimaConfig.getInstance();
+ try {
+ rootContext = TopiaContextFactory.getContext(config.getOptions());
+ } catch (TopiaNotFoundException ex) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't init topia context", ex);
+ }
+ }
+ }
+
/*
* @see org.chorem.lima.business.ImportExportService#exportAsXML()
*/
@@ -118,4 +143,82 @@
public void importAsEbpCSV(byte[] data) throws LimaException {
}
+
+ @Override
+ public void importAsCiel(byte[] data) throws LimaException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void importAsSage(byte[] data) throws LimaException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void exportAccountsChartAsCSV(String path) throws LimaException {
+ File f = new File(path);
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ CSVWriter csvWriter = new CSVWriter(new FileWriter(f), ';');
+ String[] nextLine = new String[5];
+ // Récupère tous les comptes
+ AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
+ List<Account> listAccount = accountDAO.findAll();
+ nextLine[0] = "lima.accountschart";
+ csvWriter.writeNext(nextLine);
+ // Pour tous les comptes
+ for (Account account : listAccount) {
+ nextLine[0] = account.getAccountNumber();
+ nextLine[1] = account.getLabel();
+ nextLine[2] = account.getThirdParty();
+ Account masterAccount = account.getMasterAccount();
+ Account generalLedger = account.getGeneralLedger();
+ if (masterAccount != null){
+ nextLine[3] = masterAccount.getAccountNumber();
+ }
+ if (generalLedger != null){
+ nextLine[4] = generalLedger.getAccountNumber();
+ }
+ // Ajoute la ligne au fichier
+ csvWriter.writeNext(nextLine);
+ }
+ // Write cache in file
+ csvWriter.flush();
+ csvWriter.close();
+ }
+ catch (TopiaException eeeTE){
+ doCatch(topiaContext, eeeTE, log);
+ }
+ catch (IOException eeeIO) {
+ log.debug("Can't create new CSV Writer with file"+f+eeeIO);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+ @Override
+ public void exportEntryBookChartAsCSV(byte[] data) throws LimaException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void exportFinancialStatementChartAsCSV(byte[] data)
+ throws LimaException {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected TopiaContext beginTransaction() throws TopiaException {
+ // basic check done, make check in database
+ // TODO move it into JTA
+ TopiaContext topiaTransaction;
+ topiaTransaction = rootContext.beginTransaction();
+ log.trace("beginTransaction"+topiaTransaction);
+ return topiaTransaction;
+ }
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/CSVExport.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/CSVExport.java 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/CSVExport.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -23,11 +23,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaContext;
-import org.chorem.lima.dto.AccountDTO;
-import org.chorem.lima.dto.EntryDTO;
-import org.chorem.lima.dto.JournalDTO;
-import org.chorem.lima.dto.PeriodDTO;
-import org.chorem.lima.dto.TransactionDTO;
+
import org.chorem.lima.util.Util;
import org.chorem.lima.service.util.ServiceHelper;
Modified: trunk/lima-callao/src/main/xmi/accounting.properties
===================================================================
--- trunk/lima-callao/src/main/xmi/accounting.properties 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-callao/src/main/xmi/accounting.properties 2010-06-30 17:10:09 UTC (rev 2955)
@@ -1,5 +1,10 @@
# Precise l'entete de l'ensemble des fichiers generes
model.tagvalue.copyright=/*\n Copyright (C) 2009-2010 Lima Callao\n */
+
+org.chorem.lima.entity.Account.class.tagvalue.naturalIdMutable=false
+org.chorem.lima.entity.Account.attribute.accountNumber.tagvalue.naturalId=true
+org.chorem.lima.entity.Account.attribute.accountNumber.tagvalue.notNull=true
+
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
@@ -8,6 +13,5 @@
org.chorem.lima.entity.FinancialStatement.attribute.masterFinancialStatement.tagvalue.lazy=false
-
#model.tagvalue.dbSchema=Callao
model.tagvalue.String=text
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -249,10 +249,10 @@
public final String key;
public final String description;
- public final String defaultValue;
+ public String defaultValue;
public final Class<?> type;
- public final boolean _transient;
- public final boolean _final;
+ public boolean _transient;
+ public boolean _final;
private Option(String key, String description, String defaultValue,
Class<?> type, boolean _transient, boolean _final) {
@@ -268,11 +268,21 @@
public boolean isFinal() {
return _final;
}
-
+
@Override
+ public void setFinal(boolean _final){
+ this._final=_final;
+ }
+
+ @Override
public boolean isTransient() {
return _transient;
}
+
+ @Override
+ public void setTransient(boolean _transient) {
+ this._transient=_transient;
+ }
@Override
public String getDefaultValue() {
@@ -280,6 +290,11 @@
}
@Override
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue=defaultValue;
+ }
+
+ @Override
public String getDescription() {
return description;
}
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-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -36,6 +36,7 @@
import org.chorem.lima.business.FinancialPeriodService;
import org.chorem.lima.business.FinancialStatementService;
import org.chorem.lima.business.FiscalPeriodService;
+import org.chorem.lima.business.ImportExportService;
import org.chorem.lima.business.RecordService;
import org.chorem.lima.business.FinancialTransactionService;
import org.chorem.lima.business.ReportService;
@@ -274,6 +275,24 @@
}
/**
+ * Get financial statement service.
+ *
+ */
+ public ImportExportService getImportExportService() {
+
+ String lookupName = "ImportExportServiceImplRemote";
+ ImportExportService ejbHome = null;
+ try {
+ ejbHome = (ImportExportService)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
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/FileChooseView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/FileChooseView.jaxx 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/FileChooseView.jaxx 2010-06-30 17:10:09 UTC (rev 2955)
@@ -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/java/org/chorem/lima/ui/account/AccountView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-06-30 17:10:09 UTC (rev 2955)
@@ -27,7 +27,7 @@
</script>
<row>
- <cell fill="both" weightx="1" weighty="1" rows='4'>
+ <cell fill="both" weightx="1" weighty="1" rows='5'>
<JScrollPane>
<org.jdesktop.swingx.JXTreeTable id="accountsTreeTable"
selectionMode="{ListSelectionModel.SINGLE_SELECTION}"
@@ -64,4 +64,10 @@
enabled="{isSelectedRow()}"/>
</cell>
</row>
+ <row>
+ <cell fill="horizontal">
+ <JButton id="importexportButton" text="lima.common.importexport"
+ onActionPerformed="getHandler().importexportAccount()"/>
+ </cell>
+ </row>
</Table>
\ No newline at end of file
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-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -19,21 +19,23 @@
package org.chorem.lima.ui.account;
import static org.nuiton.i18n.I18n._;
-
+import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.tree.TreePath;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.ImportExportService;
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountImpl;
+import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.account.AccountForm;
import org.chorem.lima.ui.account.AccountView;
import org.chorem.lima.ui.account.SubLedgerForm;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
+import org.chorem.lima.util.FileChooseView;
import org.jdesktop.swingx.JXTreeTable;
/**
@@ -52,8 +54,12 @@
protected AccountView view;
+ protected ImportExportService importExportService;
+
protected AccountViewHandler(AccountView view) {
this.view = view;
+ // Gets factory service
+ importExportService = LimaServiceFactory.getInstance().getImportExportService();
}
/**
@@ -239,4 +245,40 @@
}
};
+ public void importexportAccount(){
+ ImportExportForm importExportForm = new ImportExportForm(view);
+ importExportForm.setLocationRelativeTo(view);
+ importExportForm.setVisible(true);
+
+ Object value = importExportForm.getRadioButtons().getSelectedValue();
+ log.debug(value);
+ // if action confirmed
+ if (value != null){
+ String mode = (String) value;
+ FileChooseView fileChooseView = new FileChooseView(view);
+
+ JFileChooser chooser = fileChooseView.getChooser();
+ if (mode.equals("import") || mode.equals("update")){
+ chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+ }
+ else {
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ if (chooser.showOpenDialog(view) == JFileChooser.APPROVE_OPTION) {
+ String filePath = chooser.getSelectedFile().getAbsolutePath();
+ log.debug(filePath);
+ try {
+ importExportService.exportAccountsChartAsCSV(filePath);
+ } catch (LimaException eee) {
+ if (log.isErrorEnabled()){
+ log.error("Can't export this file", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ }
+ }
+
+ }
+
+ }
+
}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/ImportExportForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/ImportExportForm.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/ImportExportForm.jaxx 2010-06-30 17:10:09 UTC (rev 2955)
@@ -0,0 +1,56 @@
+<!-- ##% 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">
+
+ <org.chorem.lima.entity.Account id="account" javaBean='null'/>
+ <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/>
+ <Boolean id="addState" javaBean='true'/>
+
+ <script>
+ <![CDATA[
+ protected void performCancel() {
+ getRadioButtons().setSelectedValue(null);
+ dispose();
+ }
+ ]]>
+ </script>
+
+ <Table>
+ <row>
+ <cell>
+ <JRadioButton text='lima.importexport.export' value='export' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+ <cell>
+ <JRadioButton text='lima.importexport.import' value='import' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+ <cell>
+ <JRadioButton text='lima.importexport.update' value='update' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+
+ <cell fill="none">
+ <JButton text="lima.common.ok" onActionPerformed="dispose()"/>
+ </cell>
+ <cell fill="none">
+ <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/>
+ </cell>
+ </row>
+ </Table>
+</JDialog>
\ No newline at end of file
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/ImportExportForm.jaxx
___________________________________________________________________
Added: svn:executable
+ *
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-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2010-06-30 17:10:09 UTC (rev 2955)
@@ -81,6 +81,7 @@
// Validate editing with enter key
if ( e.getKeyChar() == KeyEvent.VK_ENTER )
{
+
stopCellEditing();
}
}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx 2010-06-30 17:10:09 UTC (rev 2955)
@@ -0,0 +1,3 @@
+<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-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-06-30 17:10:09 UTC (rev 2955)
@@ -4,7 +4,9 @@
Global\ lima\ exception=
LIMA=
Loading\ accounting...=
+export=
hello\ world=
+import=
lima.about.message=
lima.account=Account
lima.account.label=Label
@@ -31,6 +33,7 @@
lima.common.add=
lima.common.addSubLedger=
lima.common.cancel=
+lima.common.importexport=
lima.common.ok=
lima.common.print=
lima.common.quit=
@@ -90,6 +93,9 @@
lima.import.all.csv=Import all datas (CSV)
lima.import.all.csv.ebp=Import all datas (EBP)
lima.import.journal=Import journal
+lima.importexport.export=
+lima.importexport.import=
+lima.importexport.update=
lima.init.closed=Lima closed at %1$s
lima.init.errorclosing=
lima.lettering.add=
@@ -183,3 +189,4 @@
limahome.fiscalperiodopened=
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-06-30 09:01:22 UTC (rev 2954)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-06-30 17:10:09 UTC (rev 2955)
@@ -4,7 +4,9 @@
Global\ lima\ exception=
LIMA=
Loading\ accounting...=
+export=
hello\ world=
+import=
lima.about.message=\u00C0 propos de Lima
lima.account=Compte
lima.account.label=
@@ -31,6 +33,7 @@
lima.common.add=Ajout Compte G\u00E9n\u00E9ral
lima.common.addSubLedger=Ajouter Compte Tiers
lima.common.cancel=Annuler
+lima.common.importexport=
lima.common.ok=OK
lima.common.print=
lima.common.quit=Quitter
@@ -90,6 +93,9 @@
lima.import.all.csv=Importer une nouvelle base (CSV)
lima.import.all.csv.ebp=Importer des donn\u00E9es de EBP
lima.import.journal=Importer le journal
+lima.importexport.export=
+lima.importexport.import=
+lima.importexport.update=
lima.init.closed=Lima ferm\u00E9 \u00E0 %1$s
lima.init.errorclosing=
lima.lettering.add=Ajouter une lettre
@@ -182,3 +188,4 @@
limahome.fiscalperiodopened=exercices ouverts
limahome.transactionbalanced=Toutes les entr\u00E9es sont \u00E9quilibr\u00E9es
limahome.transactionunbalanced=ne sont pas \u00E9quilibr\u00E9e \!
+update=
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-30 09:01:22 UTC (rev 2954)
+++ trunk/pom.xml 2010-06-30 17:10:09 UTC (rev 2955)
@@ -249,6 +249,7 @@
<platform>chorem.org</platform>
<projectId>lima</projectId>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- customized libs version -->
<nuiton-utils.version>1.3.2-SNAPSHOT</nuiton-utils.version>
1
0
Author: tchemit
Date: 2010-06-30 11:01:22 +0200 (Wed, 30 Jun 2010)
New Revision: 2954
Url: http://chorem.org/repositories/revision/lima/2954
Log:
fix pom
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-29 14:04:36 UTC (rev 2953)
+++ trunk/pom.xml 2010-06-30 09:01:22 UTC (rev 2954)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.2.1</version>
+ <version>2.2.2-SNAPSHOT</version>
</parent>
<groupId>org.chorem</groupId>
@@ -72,12 +72,12 @@
<version>${nuiton-utils.version}</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.nuiton.eugene</groupId>
<artifactId>eugene</artifactId>
<version>${eugene.version}</version>
<scope>runtime</scope>
- </dependency>
+ </dependency-->
<!-- librairie Jaxx -->
<dependency>
@@ -205,6 +205,17 @@
<role>Développeur</role>
</roles>
</developer>
+ <developer>
+ <id>tchemit</id>
+ <name>Chatellier Eric</name>
+ <email>chemit(a)codelutin.com</email>
+ <organization>Code Lutin</organization>
+ <organizationUrl>http://www.codelutin.com</organizationUrl>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
</developers>
<contributors>
<contributor>
@@ -240,11 +251,11 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- customized libs version -->
- <nuiton-utils.version>1.2.2</nuiton-utils.version>
- <eugene.version>2.0.3-SNAPSHOT</eugene.version>
+ <nuiton-utils.version>1.3.2-SNAPSHOT</nuiton-utils.version>
+ <eugene.version>2.1-SNAPSHOT</eugene.version>
<topia.version>2.3.5-SNAPSHOT</topia.version>
<jaxx.version>2.0.2</jaxx.version>
- <i18n.version>1.2.2</i18n.version>
+ <i18n.version>1.2.3-SNAPSHOT</i18n.version>
<!--axis.version>1.4.1</axis.version-->
<!-- 1.4 and 1.4.1 breaks jnlp with corrupt jar
@@ -307,7 +318,7 @@
<repositories>
<!-- depot des releases nuiton -->
- <repository>
+ <!--repository>
<id>nuiton.release</id>
<name>NuitonReleaseRepository</name>
<url>http://maven.nuiton.org/release</url>
@@ -318,9 +329,9 @@
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
- </repository>
+ </repository-->
<!-- depot des snapshots nuiton -->
- <repository>
+ <!--repository>
<id>nuiton.snapshot</id>
<name>NuitonSnapshotRepository</name>
<url>http://maven.nuiton.org/snapshot</url>
@@ -331,21 +342,21 @@
<releases>
<enabled>false</enabled>
</releases>
- </repository>
+ </repository-->
<!-- jboss -->
- <repository>
+ <!--repository>
<id>jboss.repo</id>
<url>http://repository.jboss.org/maven2</url>
</repository>
<repository>
<id>apache.snapshot</id>
<url>http://repository.apache.org/snapshots</url>
- </repository>
+ </repository-->
</repositories>
<pluginRepositories>
<!-- depot des releases nuiton -->
- <pluginRepository>
+ <!--pluginRepository>
<id>nuiton.release</id>
<name>NuitonReleaseRepository</name>
<url>http://maven.nuiton.org/release</url>
@@ -356,9 +367,9 @@
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
- </pluginRepository>
+ </pluginRepository-->
<!-- depot des snapshots nuiton -->
- <pluginRepository>
+ <!--pluginRepository>
<id>nuiton.snapshot</id>
<name>NuitonSnapshotRepository</name>
<url>http://maven.nuiton.org/snapshot</url>
@@ -369,6 +380,6 @@
<releases>
<enabled>false</enabled>
</releases>
- </pluginRepository>
+ </pluginRepository-->
</pluginRepositories>
</project>
1
0
r2953 - in trunk: . lima-callao lima-callao/src/main/xmi lima-swing/src/main/java/org/chorem/lima/ui/celleditor lima-swing/src/main/java/org/chorem/lima/ui/combobox lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction lima-swing/src/main/java/org/chorem/lima/util
by jpepin@users.chorem.org 29 Jun '10
by jpepin@users.chorem.org 29 Jun '10
29 Jun '10
Author: jpepin
Date: 2010-06-29 16:04:36 +0200 (Tue, 29 Jun 2010)
New Revision: 2953
Url: http://chorem.org/repositories/revision/lima/2953
Log:
Ajout de l'autocompl?\195?\169tion dans la fonction de saisie d'?\195?\169criture.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/EntryBookToString.java
Modified:
trunk/lima-callao/pom.xml
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java
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/pom.xml
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2010-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-callao/pom.xml 2010-06-29 14:04:36 UTC (rev 2953)
@@ -65,7 +65,12 @@
<phase>generate-sources</phase>
<configuration>
<inputs>zargo</inputs>
- <templates>org.nuiton.topia.generator.TopiaMetaTransformer, org.nuiton.eugene.java.JavaBeanTransformer</templates>
+ <templates>org.nuiton.topia.generator.TopiaMetaTransformer, org.nuiton.topia.generator.EntityTransformer, org.nuiton.eugene.java.JavaBeanTransformer, org.nuiton.topia.generator.QueryHelperTransformer</templates>
+ <excludeTemplates>
+ <excludeTemplate>org.nuiton.topia.generator.EntityAbstractTransformer</excludeTemplate>
+ <excludeTemplate>org.nuiton.topia.generator.EntityImplTransformer</excludeTemplate>
+ <excludeTemplate>org.nuiton.topia.generator.EntityInterfaceTransformer</excludeTemplate>
+ </excludeTemplates>
<defaultPackage>org.chorem.lima.entity</defaultPackage>
<fullPackagePath>org.chorem.lima</fullPackagePath>
</configuration>
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
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-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -20,19 +20,25 @@
package org.chorem.lima.ui.celleditor;
import java.awt.Component;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
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.AccountRenderer;
import org.chorem.lima.ui.combobox.SubAccountComboBoxModel;
+import org.chorem.lima.util.AccountToString;
import org.chorem.lima.widgets.JWideComboBox;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
public class AccountTableCellEditor extends AbstractCellEditor implements TableCellEditor {
@@ -40,6 +46,7 @@
private final JWideComboBox comboBox;
private static final long serialVersionUID = 2580476608066111095L;
private static AccountTableCellEditor editor;
+ private static boolean keyPressed = false;
/**
* constructor
@@ -50,6 +57,34 @@
comboBox.setModel(accountComboBoxModel);
AccountRenderer accountRenderer = new AccountRenderer();
comboBox.setRenderer(accountRenderer);
+ AutoCompleteDecorator.decorate(comboBox, AccountToString.getInstance());
+
+
+ /**
+ * Ajout d'un listener pour la frappe au clavier seulement, permettant
+ * de déplacer la sélection (et le caret) du fait que la première touche
+ * n'est pas prise en compte.
+ */
+ comboBox.getEditor().getEditorComponent().addKeyListener(new KeyAdapter() {
+
+ @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;
+ }
+ // Validate editing with enter key
+ if ( e.getKeyChar() == KeyEvent.VK_ENTER )
+ {
+ stopCellEditing();
+ }
+ }
+ });
}
@Override
@@ -66,9 +101,37 @@
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) {
- return !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2;
+ // 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()));
+ }
+ }
+ });
+ }
+ }
+ // Remet à faux pour la premiere lettre tapée au clavier
+ keyPressed = false;
+ return ( !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2 );
}
public static AccountTableCellEditor getInstance() {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java 2010-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -20,19 +20,23 @@
package org.chorem.lima.ui.celleditor;
import java.awt.Component;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
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.EntryBook;
import org.chorem.lima.ui.combobox.EntryBookComboBoxModel;
import org.chorem.lima.ui.combobox.EntryBookRenderer;
+import org.chorem.lima.util.EntryBookToString;
import org.chorem.lima.widgets.JWideComboBox;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
public class EntryBookTableCellEditor extends AbstractCellEditor implements TableCellEditor {
@@ -40,6 +44,7 @@
private final JWideComboBox comboBox;
private static final long serialVersionUID = 2580476608066111095L;
private static EntryBookTableCellEditor editor;
+ private static boolean keyPressed = false;
/**
* constructor
@@ -53,16 +58,44 @@
/*// Property Change Listener
LimaContext.getContext().getDataManager().getJournalModel().addPropertyChangeListener(comboBoxModel);
- comboBox.setModel(comboBoxModel);
+ comboBox.setModel(comboBoxModel);*/
+ //LimaContext.getContext().addPropertyChangeListener(entryBookComboBoxModel);
+
// AutoCompletion
- AutoCompleteDecorator.decorate(comboBox, JournalToStringConverter.getInstance());*/
+ AutoCompleteDecorator.decorate(comboBox, EntryBookToString.getInstance());
+
+ /**
+ * Ajout d'un listener pour la frappe au clavier seulement, permettant
+ * de déplacer la sélection (et le caret) du fait que la première touche
+ * n'est pas prise en compte.
+ */
+ comboBox.getEditor().getEditorComponent().addKeyListener(new KeyAdapter() {
+
+ @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;
+ }
+ // Validate editing with enter key
+ if ( e.getKeyChar() == KeyEvent.VK_ENTER )
+ {
+ stopCellEditing();
+ }
+ }
+ });
+
}
@Override
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
if (value instanceof EntryBook){
- comboBox.setSelectedItem((EntryBook) value);
-
+ comboBox.setSelectedItem((EntryBook) value);
}
return comboBox;
}
@@ -72,9 +105,38 @@
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) {
- return !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2;
+ // 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()));
+ }
+ }
+ });
+ }
+ }
+ // Remet à faux pour la premiere lettre tapée au clavier
+ keyPressed = false;
+ return ( !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2 );
}
public static EntryBookTableCellEditor getInstance() {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2010-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -19,7 +19,6 @@
package org.chorem.lima.ui.combobox;
import java.util.List;
-
import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
import org.apache.commons.logging.Log;
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-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -17,11 +17,9 @@
* ##%*/
package org.chorem.lima.ui.combobox;
-import java.util.List;
-import javax.swing.AbstractListModel;
-import javax.swing.ComboBoxModel;
-import javax.swing.event.ListDataListener;
+import java.util.List;
+import javax.swing.DefaultComboBoxModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.EntryBookService;
@@ -39,7 +37,7 @@
* Last update : $Date$
* By : $Author$
*/
-public class EntryBookComboBoxModel extends AbstractListModel implements ComboBoxModel {
+public class EntryBookComboBoxModel extends DefaultComboBoxModel {
private static final Log log = LogFactory.getLog(FinancialPeriodTableModel.class);
@@ -94,5 +92,4 @@
cacheDatas = getDataList();
fireContentsChanged(this, 0, cacheDatas.size());
}
-
}
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-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-06-29 14:04:36 UTC (rev 2953)
@@ -22,7 +22,6 @@
<org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel id="modelFiscalPeriod"/>
<script>
<![CDATA[
-
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FinancialPeriod;
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-06-28 15:47:17 UTC (rev 2952)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -171,8 +171,7 @@
public void refresh(){
tableModel = view.getFinancialTransactionTableModel();
- tableModel.refresh();
-
+ tableModel.refresh();
fiscalPeriodComboBoxModel = view.getModelFiscalPeriod();
fiscalPeriodComboBoxModel.refresh();
Added: trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -0,0 +1,29 @@
+package org.chorem.lima.util;
+
+import org.chorem.lima.entity.Account;
+import org.jdesktop.swingx.autocomplete.ObjectToStringConverter;
+
+public class AccountToString extends ObjectToStringConverter {
+
+ private static AccountToString converter;
+
+ @Override
+ public String getPreferredStringForItem(Object item) {
+ String result = null;
+ if (item != null){
+ if (item instanceof Account){
+ Account account = (Account) item;
+ result = account.getAccountNumber()+" - "+account.getLabel();
+ }
+ }
+ return result;
+ }
+
+ public static AccountToString getInstance() {
+ if (converter == null) {
+ converter = new AccountToString();
+ }
+ return converter;
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/util/EntryBookToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/EntryBookToString.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/EntryBookToString.java 2010-06-29 14:04:36 UTC (rev 2953)
@@ -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.EntryBook;
+import org.jdesktop.swingx.autocomplete.ObjectToStringConverter;
+
+public class EntryBookToString extends ObjectToStringConverter{
+
+ private static EntryBookToString converter;
+
+ @Override
+ public String getPreferredStringForItem(Object item) {
+ String result = null;
+ if (item != null){
+ if (item instanceof EntryBook){
+ EntryBook entryBook = (EntryBook) item;
+ result = entryBook.getCode()+" - "+entryBook.getLabel();
+ }
+ }
+ return result;
+ }
+
+
+ public static EntryBookToString getInstance() {
+ if (converter == null) {
+ converter = new EntryBookToString();
+ }
+ return converter;
+ }
+}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-28 15:47:17 UTC (rev 2952)
+++ trunk/pom.xml 2010-06-29 14:04:36 UTC (rev 2953)
@@ -241,8 +241,8 @@
<!-- customized libs version -->
<nuiton-utils.version>1.2.2</nuiton-utils.version>
- <eugene.version>2.0.2-SNAPSHOT</eugene.version>
- <topia.version>2.3.4</topia.version>
+ <eugene.version>2.0.3-SNAPSHOT</eugene.version>
+ <topia.version>2.3.5-SNAPSHOT</topia.version>
<jaxx.version>2.0.2</jaxx.version>
<i18n.version>1.2.2</i18n.version>
1
0
r2952 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart lima-swing/src/main/resources/i18n
by jpepin@users.chorem.org 28 Jun '10
by jpepin@users.chorem.org 28 Jun '10
28 Jun '10
Author: jpepin
Date: 2010-06-28 17:47:17 +0200 (Mon, 28 Jun 2010)
New Revision: 2952
Url: http://chorem.org/repositories/revision/lima/2952
Log:
Ajout d'une option dans le plan BCR pour afficher les totaux d'une cat?\195?\169gorie ou non dans son titre.
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.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-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-06-28 15:14:33 UTC (rev 2951)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-06-28 15:47:17 UTC (rev 2952)
@@ -321,8 +321,15 @@
}//sinon
else {
- //ajoute head avec amount
- subResult.add(headerfinancialStatementAmounts);
+
+ if (subFinancialStatement.getHeaderAmount()){
+ subResult.add(headerfinancialStatementAmounts);
+ }
+ else {
+ headerfinancialStatementAmounts.setGrossAmount(0);
+ headerfinancialStatementAmounts.setProvisionDeprecationAmount(0);
+ subResult.add(headerfinancialStatementAmounts);
+ }
//ajoute liste
if (financialStatementDatas.getListResult() != null){
subResult.addAll(financialStatementDatas.getListResult());
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx 2010-06-28 15:14:33 UTC (rev 2951)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx 2010-06-28 15:47:17 UTC (rev 2952)
@@ -49,6 +49,13 @@
</cell>
</row>
<row>
+ <cell>
+ <JCheckBox id='headerAmountCheckBox' text='lima.financialstatement.headeramount'
+ selected="{getFinancialStatement().getHeaderAmount()}"
+ onActionPerformed="getFinancialStatement().setHeaderAmount(headerAmountCheckBox.isSelected())"/>
+ </cell>
+ </row>
+ <row>
<cell fill="none">
<JButton text="lima.common.ok" onActionPerformed="dispose()"/>
</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-06-28 15:14:33 UTC (rev 2951)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-06-28 15:47:17 UTC (rev 2952)
@@ -76,6 +76,7 @@
lima.financialstatement.debitaccounts=
lima.financialstatement.formula=
lima.financialstatement.header.add=
+lima.financialstatement.headeramount=
lima.financialstatement.label=
lima.financialstatement.movement.add=
lima.financialstatement.provisiondeprecationaccounts=
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-06-28 15:14:33 UTC (rev 2951)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-06-28 15:47:17 UTC (rev 2952)
@@ -76,6 +76,7 @@
lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
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
1
0
r2951 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-callao/src/main/xmi lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart
by jpepin@users.chorem.org 28 Jun '10
by jpepin@users.chorem.org 28 Jun '10
28 Jun '10
Author: jpepin
Date: 2010-06-28 17:14:33 +0200 (Mon, 28 Jun 2010)
New Revision: 2951
Url: http://chorem.org/repositories/revision/lima/2951
Log:
Recherche d'une extension de comptes gr?\195?\162ce ?\195?\160 '..' Dans le plan BCR fusion des champs "credit & debit" et "formule".
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-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx
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-06-28 11:03:51 UTC (rev 2950)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-06-28 15:14:33 UTC (rev 2951)
@@ -386,7 +386,7 @@
/**
* Convert string of extends number to list of accounts
- * Example '22, 45-48, 67' -> [22, 45, 46, 47, 48, 67]
+ * Example '22, 45..48, 67' -> [22, 45, 46, 47, 48, 67]
*/
@Override
public List<Account> stringToListAccountsWithTransaction(String selectedAccounts, TopiaContext topiaContext) throws LimaException{
@@ -403,11 +403,13 @@
StringTokenizer stComma = new StringTokenizer(selectedAccounts, ",");
while (stComma.hasMoreTokens()) {
String s = stComma.nextToken();
- if (s.contains("-")){
- //Split hypen
- String stringHypen[] = s.split("-");
- int lowAccount=Integer.parseInt(stringHypen[0]);
- int highAccount=Integer.parseInt(stringHypen[1]);
+ if (s.contains("..")){
+ //Split ..
+ String stringDoubleDot[] = s.split("\\.\\.");
+ log.debug(stringDoubleDot[0]);
+ log.debug(stringDoubleDot[1]);
+ int lowAccount=Integer.parseInt(stringDoubleDot[0]);
+ int highAccount=Integer.parseInt(stringDoubleDot[1]);
for (int i=lowAccount; i <= highAccount; i++) {
accountNumbers.add(String.valueOf(i));
}
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-06-28 11:03:51 UTC (rev 2950)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-06-28 15:14:33 UTC (rev 2951)
@@ -134,16 +134,22 @@
// remove financialstatement
- FinancialStatement financialStatementToDelete = financialStatementDAO.findByTopiaId(financialStatement.getTopiaId());
+ FinancialStatement financialStatementToDelete =
+ financialStatementDAO.findByTopiaId(
+ financialStatement.getTopiaId());
financialStatementDAO.delete(financialStatementToDelete);
//get all subFinancialStatement
- List<FinancialStatement> financialStatements = getAllChildrenFinancialStatement(financialStatement, new ArrayList<FinancialStatement>());
+ List<FinancialStatement> financialStatements =
+ getAllChildrenFinancialStatement(financialStatement,
+ new ArrayList<FinancialStatement>());
//if FinancialStatement have subFinancialStatement
if (financialStatements.size() > 0){
for (FinancialStatement subFinancialStatement : financialStatements) {
- FinancialStatement subFinancialStatementToDelete = financialStatementDAO.findByTopiaId(subFinancialStatement.getTopiaId());
+ FinancialStatement subFinancialStatementToDelete =
+ financialStatementDAO.findByTopiaId(
+ subFinancialStatement.getTopiaId());
financialStatementDAO.delete(subFinancialStatementToDelete);
}
}
@@ -164,7 +170,8 @@
@Override
public List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement, List<FinancialStatement> result) throws LimaException, LimaBusinessException {
- List<FinancialStatement> childFinancialStatements = getChildrenFinancialStatement(financialStatement);
+ List<FinancialStatement> childFinancialStatements =
+ getChildrenFinancialStatement(financialStatement);
for (FinancialStatement childFinancialStatement: childFinancialStatements) {
result.add(childFinancialStatement);
getAllChildrenFinancialStatement(childFinancialStatement, result);
@@ -236,7 +243,9 @@
try {
transaction = beginTransaction();
//create list form tree
- result = financialStatementReport(null, selectedBeginDate, selectedEndDate, new FinancialStatementDatasImpl(), transaction).getListResult();
+ result = financialStatementReport(null, selectedBeginDate,
+ selectedEndDate, new FinancialStatementDatasImpl(),
+ transaction).getListResult();
}
catch (TopiaException ex) {
@@ -255,25 +264,35 @@
getChildrenFinancialStatement(financialStatement);
try {
Double grossAmount = 0.0, provisionDeprecationAmount = 0.0;
- List<FinancialStatementAmounts> subResult = new ArrayList<FinancialStatementAmounts>();
+ List<FinancialStatementAmounts> subResult =
+ new ArrayList<FinancialStatementAmounts>();
for (FinancialStatement subFinancialStatement : financialStatements) {
- FinancialStatementAmounts financialStatementAmounts = financialStatementAmounts(subFinancialStatement, selectedBeginDate, selectedEndDate, topiaContext);
+ FinancialStatementAmounts financialStatementAmounts =
+ financialStatementAmounts(subFinancialStatement,
+ selectedBeginDate, selectedEndDate, topiaContext);
if (!subFinancialStatement.getHeader()){
//on calcul
grossAmount += financialStatementAmounts.getGrossAmount();
- provisionDeprecationAmount += financialStatementAmounts.getProvisionDeprecationAmount();
+ provisionDeprecationAmount +=
+ financialStatementAmounts.getProvisionDeprecationAmount();
subResult.add(financialStatementAmounts);
}
else {
- FinancialStatementDatas financialStatementDatas = financialStatementReport(subFinancialStatement, selectedBeginDate, selectedEndDate, result, topiaContext);
- grossAmount += financialStatementDatas.getFinancialStatementAmounts().getGrossAmount();
- provisionDeprecationAmount += financialStatementDatas.getFinancialStatementAmounts().getProvisionDeprecationAmount();
+ FinancialStatementDatas financialStatementDatas =
+ financialStatementReport(subFinancialStatement,
+ selectedBeginDate, selectedEndDate, result, topiaContext);
+ grossAmount += financialStatementDatas.
+ getFinancialStatementAmounts().getGrossAmount();
+ provisionDeprecationAmount += financialStatementDatas.
+ getFinancialStatementAmounts().getProvisionDeprecationAmount();
- FinancialStatementAmounts headerfinancialStatementAmounts = financialStatementDatas.getFinancialStatementAmounts();
+ FinancialStatementAmounts headerfinancialStatementAmounts =
+ financialStatementDatas.getFinancialStatementAmounts();
//Si sous-total
if (subFinancialStatement.getSubAmount()){
- FinancialStatementAmounts header = new FinancialStatementAmountsImpl();
+ FinancialStatementAmounts header =
+ new FinancialStatementAmountsImpl();
header.setLabel(headerfinancialStatementAmounts.getLabel());
header.setLevel(headerfinancialStatementAmounts.getLevel());
header.setHeader(true);
@@ -284,14 +303,20 @@
subResult.addAll(financialStatementDatas.getListResult());
}
//ajoute sstotal
- FinancialStatementAmounts subAmount = new FinancialStatementAmountsImpl();
- subAmount.setLabel("TOTAL "+headerfinancialStatementAmounts.getLabel());
- subAmount.setLevel(headerfinancialStatementAmounts.getLevel());
- subAmount.setGrossAmount(headerfinancialStatementAmounts.getGrossAmount());
- subAmount.setProvisionDeprecationAmount(headerfinancialStatementAmounts.getProvisionDeprecationAmount());
+ FinancialStatementAmounts subAmount =
+ new FinancialStatementAmountsImpl();
+ subAmount.setLabel(
+ "TOTAL "+headerfinancialStatementAmounts.getLabel());
+ subAmount.setLevel(
+ headerfinancialStatementAmounts.getLevel());
+ subAmount.setGrossAmount(
+ headerfinancialStatementAmounts.getGrossAmount());
+ subAmount.setProvisionDeprecationAmount(
+ headerfinancialStatementAmounts.
+ getProvisionDeprecationAmount());
subAmount.setSubAmount(true);
subResult.add(subAmount);
- //ajoute ligne vide
+ //ajoute une ligne vide
subResult.add(new FinancialStatementAmountsImpl());
}//sinon
@@ -305,9 +330,11 @@
}
}
}
- FinancialStatementAmounts financialStatementAmounts = new FinancialStatementAmountsImpl();
+ FinancialStatementAmounts financialStatementAmounts =
+ new FinancialStatementAmountsImpl();
financialStatementAmounts.setGrossAmount(grossAmount);
- financialStatementAmounts.setProvisionDeprecationAmount(provisionDeprecationAmount);
+ financialStatementAmounts.setProvisionDeprecationAmount(
+ provisionDeprecationAmount);
if (financialStatement != null){
financialStatementAmounts.setLabel(financialStatement.getLabel());
financialStatementAmounts.setHeader(financialStatement.getHeader());
@@ -334,13 +361,26 @@
String accountsString = financialStatement.getAccounts();
Double amount = 0.0;
if (accountsString != null){
- List<Account> accountsList = accountServiceLocal.
- stringToListAccountsWithTransaction(accountsString, topiaContext);
- for (Account account : accountsList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(account,
- selectedBeginDate, selectedEndDate, topiaContext);
- amount += reportsDatas.getAmountSolde();
+ //Remove Spaces
+ accountsString = StringUtils.deleteWhitespace(accountsString);
+ StringTokenizer stQuote = new StringTokenizer(accountsString, "-");
+ while (stQuote.hasMoreTokens()) {
+ String s = stQuote.nextToken();
+ List<Account> accountsStringList = accountServiceLocal.
+ stringToListAccountsWithTransaction(s, topiaContext);
+ Double resAmount = 0.0;
+ for (Account accountString : accountsStringList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(accountString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ resAmount += reportsDatas.getAmountSolde();
+ }
+ if (amount == 0){
+ amount=resAmount;
+ }
+ else {
+ amount-=resAmount;
+ }
}
}
@@ -379,8 +419,9 @@
financialStatement.getProvisionDeprecationAccounts();
Double provisionDeprecationAmount = 0.0;
if (provisionDeprecationAccountsString != null){
- List<Account> provisionDeprecationAccountsList = accountServiceLocal.
- stringToListAccountsWithTransaction(provisionDeprecationAccountsString, topiaContext);
+ List<Account> provisionDeprecationAccountsList =
+ accountServiceLocal.stringToListAccountsWithTransaction(
+ provisionDeprecationAccountsString, topiaContext);
for (Account account : provisionDeprecationAccountsList) {
ReportsDatas reportsDatas = reportServiceLocal.
generateAccountReportsWithTransaction(account,
@@ -388,69 +429,16 @@
provisionDeprecationAmount += reportsDatas.getAmountSolde();
}
}
-
- // FORMULA
- String formulaString =
- financialStatement.getFormula();
- Double formulaAmount = 0.0;
- if (formulaString != null){
- //Remove Spaces
- formulaString = StringUtils.deleteWhitespace(formulaString);
- log.debug(formulaString);
- //Split simple quote
- StringTokenizer stQuote = new StringTokenizer(formulaString, "'");
- while (stQuote.hasMoreTokens()) {
- String s = stQuote.nextToken();
- log.debug(s);
- if (s.contentEquals("-")){
- s = stQuote.nextToken();
- List<Account> accountsStringList = accountServiceLocal.
- stringToListAccountsWithTransaction(s, topiaContext);
- Double resAmount = 0.0;
- for (Account accountString : accountsStringList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(accountString,
- selectedBeginDate, selectedEndDate, topiaContext);
- resAmount += reportsDatas.getAmountSolde();
- }
- formulaAmount-=resAmount;
- }
- else if (s.contains("-")){
- List<Account> accountsStringList = accountServiceLocal.
- stringToListAccountsWithTransaction(s, topiaContext);
- Double resAmount = 0.0;
- for (Account accountString : accountsStringList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(accountString,
- selectedBeginDate, selectedEndDate, topiaContext);
- resAmount += reportsDatas.getAmountSolde();
- }
- formulaAmount+=resAmount;
- }
- else{
- List<Account> accountsStringList = accountServiceLocal.
- stringToListAccountsWithTransaction(s, topiaContext);
- Double resAmount = 0.0;
- for (Account accountString : accountsStringList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(accountString,
- selectedBeginDate, selectedEndDate, topiaContext);
- resAmount += reportsDatas.getAmountSolde();
- }
- formulaAmount+=resAmount;}
- }
- }
-
-
// set result
- financialStatementAmounts.setGrossAmount(amount+creditAmount+debitAmount+formulaAmount);
+ financialStatementAmounts.setGrossAmount(
+ amount+creditAmount+debitAmount);
financialStatementAmounts.setLabel(financialStatement.getLabel());
- financialStatementAmounts.setProvisionDeprecationAmount(provisionDeprecationAmount);
+ financialStatementAmounts.setProvisionDeprecationAmount(
+ provisionDeprecationAmount);
financialStatementAmounts.setLevel(
financialStatement.getLevel());
-
}
catch (LimaException ex) {
doCatch(topiaContext, ex, log);
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx 2010-06-28 11:03:51 UTC (rev 2950)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx 2010-06-28 15:14:33 UTC (rev 2951)
@@ -86,17 +86,6 @@
onRemoveUpdate='getFinancialStatement().setProvisionDeprecationAccounts(getProvisionDeprecationAccountsTextField().getText())' />
</cell>
</row>
- <row>
- <cell fill="horizontal">
- <JLabel text="lima.financialstatement.formula"/>
- </cell>
- <cell fill="horizontal">
- <JTextField id="formulaTextField" text="{getFinancialStatement().getFormula()}"/>
- <javax.swing.text.Document javaBean="getFormulaTextField().getDocument()"
- onInsertUpdate='getFinancialStatement().setFormula(getFormulaTextField().getText())'
- onRemoveUpdate='getFinancialStatement().setFormula(getFormulaTextField().getText())' />
- </cell>
- </row>
<row>
<cell fill="none">
<JButton text="lima.common.ok" onActionPerformed="dispose()"/>
1
0
r2950 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui/fiscalperiod java/org/chorem/lima/ui/home java/org/chorem/lima/util resources/i18n
by jpepin@users.chorem.org 28 Jun '10
by jpepin@users.chorem.org 28 Jun '10
28 Jun '10
Author: jpepin
Date: 2010-06-28 13:03:51 +0200 (Mon, 28 Jun 2010)
New Revision: 2950
Url: http://chorem.org/repositories/revision/lima/2950
Log:
Ajout de lien hypertext d'acc?\195?\168s aux diff?\195?\169rentes fonctions dans l'onglet d'accueil.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
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-06-27 06:36:49 UTC (rev 2949)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2010-06-28 11:03:51 UTC (rev 2950)
@@ -19,20 +19,16 @@
package org.chorem.lima.ui.fiscalperiod;
import static org.nuiton.i18n.I18n._;
-
import javax.swing.JOptionPane;
-
import org.jdesktop.swingx.JXTable;
import org.nuiton.util.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
-
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.ui.fiscalperiod.AddPeriod;
import org.chorem.lima.ui.fiscalperiod.FiscalPeriodView;
import org.chorem.lima.util.DialogHelper;
-import org.chorem.lima.util.ErrorHelper;
/**
* TODO add comment here.
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-06-27 06:36:49 UTC (rev 2949)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-06-28 11:03:51 UTC (rev 2950)
@@ -5,7 +5,7 @@
<script>
<![CDATA[
import static org.nuiton.i18n.I18n._;
-
+
void $afterCompleteSetup() {
getHandler().refresh();
}
@@ -23,7 +23,7 @@
minimumSize='{getFixedSize()}'
preferredSize='{getFixedSize()}'
layout='{new BoxLayout(limaHomeChartAccount,BoxLayout.X_AXIS)}'>
- <JEditorPane id="textHomeAccount" />
+ <JEditorPane id="textHomeAccount"/>
</JPanel>
</cell>
</row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-06-27 06:36:49 UTC (rev 2949)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-06-28 11:03:51 UTC (rev 2950)
@@ -2,10 +2,17 @@
import static org.nuiton.i18n.I18n._;
import java.awt.Color;
-import java.awt.Component;
+import java.io.IOException;
import java.util.List;
+import javax.swing.JEditorPane;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.text.html.HTMLDocument;
+import javax.swing.text.html.HTMLFrameHyperlinkEvent;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.LimaContext;
import org.chorem.lima.business.AccountService;
import org.chorem.lima.business.EntryBookService;
import org.chorem.lima.business.FinancialTransactionService;
@@ -16,8 +23,10 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.ui.MainView;
+import org.chorem.lima.util.DialogHelper;
-public class HomeViewHandler {
+public class HomeViewHandler implements HyperlinkListener {
private static final Log log = LogFactory.getLog(HomeViewHandler.class);
@@ -30,13 +39,21 @@
protected FinancialTransactionService financialTransactionService;
protected FiscalPeriodService fiscalPeriodService;
+
+ protected HyperlinkListener accountsListener;
+
+ protected HyperlinkListener entrybookListener;
private Color greenBackground;
private Color redBackground;
protected HomeViewHandler(HomeView view) {
+
+
this.view=view;
+
+
accountService =
LimaServiceFactory.getInstance().getAccountService();
entryBookService =
@@ -48,54 +65,90 @@
greenBackground = new Color(153, 255, 153);
redBackground = new Color(255, 102, 102);
+
+
}
- public void goToAccountChart(){
-
- }
+ public void hyperlinkUpdate(HyperlinkEvent e) {
+
+ if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+
+ log.debug(e.getDescription());
+
+ if (e.getDescription().equals("#accountschart")) {
+ MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view);
+ ui.getHandler().showAccountView(ui);
+ }
+ else if (e.getDescription().equals("#entrybookschart")) {
+ MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view);
+ ui.getHandler().showEntryBookView(ui);
+ }
+ else if (e.getDescription().equals("#fiscalperiodschart")) {
+ MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view);
+ ui.getHandler().showFiscalPeriodView(ui);
+ }
+ else if (e.getDescription().equals("#financialtransactionunbalanced")) {
+ MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view);
+ ui.getHandler().showTransactionUnbalancedView(ui);
+ }
+ else if (e.getDescription().equals("#financialtransactionbalanced")) {
+ MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view);
+ ui.getHandler().showTransactionView(ui);
+ }
+ }
+
+ }
+
+
+
public void refresh(){
try {
//ACCOUNT
List<Account> accounts = accountService.getAllAccounts();
- view.getTextHomeAccount().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
- view.getTextHomeAccount().setOpaque(true);
- view.getTextHomeAccount().setContentType("text/html");
- view.getTextHomeAccount().setEditable(false);
+ JEditorPane accountPane = view.getTextHomeAccount();
+ accountPane.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ accountPane.setOpaque(true);
+ accountPane.setContentType("text/html");
+ accountPane.setEditable(false);
+ accountPane.addHyperlinkListener(this);
if (accounts.size()>0){
String accountsString = _("limahome.chartaccounts1") + " " +
accounts.size() + " " + _("limahome.chartaccounts2");
- view.getTextHomeAccount().setBackground(greenBackground);
- view.getTextHomeAccount().setText("<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://accountcharts'>"+accountsString+"</a></p>");
+ accountPane.setBackground(greenBackground);
+ accountPane.setText("<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#accountschart'>"+accountsString+"</a></p>");
}
else {
- view.getTextHomeAccount().setBackground(redBackground);
+ accountPane.setBackground(redBackground);
String accountsString = "<p style=vertical-align:'bottom', horizontal-align:'center'>"+_("limahome.fiscalperiodnoopen") +
- "<br/><a href='lima://accountcharts'>"+_("limahome.createchartaccounts")+"</a>";
- view.getTextHomeAccount().setText(accountsString+"</p>");
+ "<br/><a href='#accountschart'>"+_("limahome.createchartaccounts")+"</a>";
+ accountPane.setText(accountsString+"</p>");
}
//ENTRYBOOK
List<EntryBook> entryBooks = entryBookService.getAllEntryBooks();
- view.getTextHomeEntryBook().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
- view.getTextHomeEntryBook().setOpaque(true);
- view.getTextHomeEntryBook().setContentType("text/html");
- view.getTextHomeEntryBook().setEditable(false);
+ JEditorPane entryBookPane = view.getTextHomeEntryBook();
+ entryBookPane.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ entryBookPane.setOpaque(true);
+ entryBookPane.setContentType("text/html");
+ entryBookPane.setEditable(false);
+ entryBookPane.addHyperlinkListener(this);
+
if (entryBooks.size()>0){
- view.getTextHomeEntryBook().setBackground(greenBackground);
- String entryBooksString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://entrybookcharts'>"+_("limahome.entrybooks1") +
+ entryBookPane.setBackground(greenBackground);
+ String entryBooksString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#entrybookschart'>"+_("limahome.entrybooks1") +
" " + entryBooks.size() + " " + _("limahome.entrybooks2") +
"</a><br/><ul>";
for (EntryBook entryBook : entryBooks) {
entryBooksString += "<li>"+entryBook.getCode() +
" - "+entryBook.getLabel()+"</li>";
}
- view.getTextHomeEntryBook().setText(entryBooksString+"</ul>"+"</p>");
+ entryBookPane.setText(entryBooksString+"</ul>"+"</p>");
}
else {
- view.getTextHomeEntryBook().setBackground(redBackground);
- view.getTextHomeEntryBook().setText("<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://entrybookcharts'>"+_("limahome.entrybooknoopen")+"</a></p>");
+ entryBookPane.setBackground(redBackground);
+ entryBookPane.setText("<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#entrybookschart'>"+_("limahome.entrybooknoopen")+"</a></p>");
}
//FISCAL PERIOD
@@ -104,52 +157,57 @@
List<FiscalPeriod> unblockedFiscalPeriods =
fiscalPeriodService.getAllUnblockedFiscalPeriods();
- view.getTextHomeFiscalYear().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
- view.getTextHomeFiscalYear().setOpaque(true);
- view.getTextHomeFiscalYear().setContentType("text/html");
- view.getTextHomeFiscalYear().setEditable(false);
- view.getTextHomeDaily().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
- view.getTextHomeDaily().setOpaque(true);
- view.getTextHomeDaily().setContentType("text/html");
- view.getTextHomeDaily().setEditable(false);
+ JEditorPane fiscalYearPane = view.getTextHomeFiscalYear();
+ fiscalYearPane.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ fiscalYearPane.setOpaque(true);
+ fiscalYearPane.setContentType("text/html");
+ fiscalYearPane.setEditable(false);
+ fiscalYearPane.addHyperlinkListener(this);
+ JEditorPane dailyPane = view.getTextHomeDaily();
+ dailyPane.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ dailyPane.setOpaque(true);
+ dailyPane.setContentType("text/html");
+ dailyPane.setEditable(false);
+ dailyPane.addHyperlinkListener(this);
+
if (unblockedFiscalPeriods.size()>0){
- view.getTextHomeFiscalYear().setBackground(greenBackground);
- String fiscalString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://fiscalcharts'>"
+ fiscalYearPane.setBackground(greenBackground);
+ String fiscalString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#fiscalperiodschart'>"
+ unblockedFiscalPeriods.size() +
" " + _("limahome.fiscalperiodopened")+"<br/>" +
(fiscalPeriods.size()-unblockedFiscalPeriods.size()) +
" " + _("limahome.fiscalperiodclosed");
- view.getTextHomeFiscalYear().setText(fiscalString+"</a></p>");
+ fiscalYearPane.setText(fiscalString+"</a></p>");
//FINACIAL TRANSACTION
List<FinancialTransaction> financialTransactions =
financialTransactionService.
getAllFinancialTransactionsUnbalanced(fiscalPeriods.get(0));
if (financialTransactions.size()>0){
- view.getTextHomeDaily().setBackground(redBackground);
- String transactionsString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://financialtransactionunbalanced'>"
+ dailyPane.setBackground(redBackground);
+ String transactionsString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#financialtransactionunbalanced'>"
+ financialTransactions.size() +
_("limahome.transactionunbalanced")+"</a></p>";
- view.getTextHomeDaily().setText(transactionsString);
+ dailyPane.setText(transactionsString);
}
else {
- view.getTextHomeDaily().setBackground(greenBackground);
- String transactionsString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://financialtransactionbalanced'>"
+ dailyPane.setBackground(greenBackground);
+ String transactionsString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#financialtransactionbalanced'>"
+ _("limahome.transactionbalanced");
- view.getTextHomeDaily().setText(transactionsString+"</a></p>");
+ dailyPane.setText(transactionsString+"</a></p>");
}
}
else {
- view.getTextHomeFiscalYear().setBackground(redBackground);
- view.getTextHomeDaily().setBackground(redBackground);
- String fiscalString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://fiscalcharts'>" + _("limahome.fiscalperiodnoopen");
+ fiscalYearPane.setBackground(redBackground);
+ dailyPane.setBackground(redBackground);
+ String fiscalString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='#fiscalperiodschart'>" + _("limahome.fiscalperiodnoopen");
if (fiscalPeriods.size()>0){
fiscalString += fiscalPeriods.size() +
_("limahome.fiscalperiodclosed");
}
- view.getTextHomeFiscalYear().setText(fiscalString+"</a></p>");
+ fiscalYearPane.setText(fiscalString+"</a></p>");
}
} catch (LimaException eee) {
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-06-27 06:36:49 UTC (rev 2949)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2010-06-28 11:03:51 UTC (rev 2950)
@@ -1,21 +1,20 @@
-/**
- * *##% Lima Main
- * Copyright (C) 2008 CodeLutin
+/* *##% 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 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 Lesser Public License for more details.
+ * GNU General 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>. ##%*
- */
+ * 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;
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-06-27 06:36:49 UTC (rev 2949)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-06-28 11:03:51 UTC (rev 2950)
@@ -174,6 +174,7 @@
limahome.createchartaccounts=
limahome.createchartaccounts1=
limahome.createchartaccounts2=
+limahome.entrybooknoopen=
limahome.entrybooks1=
limahome.entrybooks2=
limahome.fiscalperiodclosed=
1
0
Author: tchemit
Date: 2010-06-27 08:36:49 +0200 (Sun, 27 Jun 2010)
New Revision: 2949
Url: http://chorem.org/repositories/revision/lima/2949
Log:
Utilisation de mavenpom4redmine 2.2.1
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-25 14:59:10 UTC (rev 2948)
+++ trunk/pom.xml 2010-06-27 06:36:49 UTC (rev 2949)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.2</version>
+ <version>2.2.1</version>
</parent>
<groupId>org.chorem</groupId>
1
0
r2948 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui/home resources/i18n
by jpepin@users.chorem.org 25 Jun '10
by jpepin@users.chorem.org 25 Jun '10
25 Jun '10
Author: jpepin
Date: 2010-06-25 16:59:10 +0200 (Fri, 25 Jun 2010)
New Revision: 2948
Url: http://chorem.org/repositories/revision/lima/2948
Log:
Modification accueil, utilisation de JEditorPane au lieu de vbox et jlabel.
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/HomeViewHandler.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/home/HomeView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-06-24 17:18:43 UTC (rev 2947)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-06-25 14:59:10 UTC (rev 2948)
@@ -11,6 +11,11 @@
}
]]>
</script>
+ <row weightx="1" weighty="1" anchor="west">
+ <cell>
+ <JLabel font='{new Font("Arial", 0, 16)}' text="LIMA"/>
+ </cell>
+ </row>
<row weightx="1" weighty="1">
<cell>
<JPanel id="limaHomeChartAccount"
@@ -18,12 +23,7 @@
minimumSize='{getFixedSize()}'
preferredSize='{getFixedSize()}'
layout='{new BoxLayout(limaHomeChartAccount,BoxLayout.X_AXIS)}'>
- <VBox id="homeBoxAccount"
- margin='0'
- horizontalAlignment='center'
- verticalAlignment='middle'>
- <JLabel id="textHomeAccount"/>
- </VBox>
+ <JEditorPane id="textHomeAccount" />
</JPanel>
</cell>
</row>
@@ -34,12 +34,7 @@
minimumSize='{getFixedSize()}'
preferredSize='{getFixedSize()}'
layout='{new BoxLayout(limaHomeEntryBook,BoxLayout.X_AXIS)}'>
- <VBox id="homeBoxEntryBook"
- margin='0'
- horizontalAlignment='center'
- verticalAlignment='middle'>
- <JLabel id="textHomeEntryBook"/>
- </VBox>
+ <JEditorPane id="textHomeEntryBook"/>
</JPanel>
</cell>
</row>
@@ -50,12 +45,7 @@
minimumSize='{getFixedSize()}'
preferredSize='{getFixedSize()}'
layout='{new BoxLayout(limaHomeFiscalYear,BoxLayout.X_AXIS)}'>
- <VBox id="homeBoxFiscalYear"
- margin='0'
- horizontalAlignment='center'
- verticalAlignment='middle'>
- <JLabel id="textHomeFiscalYear"/>
- </VBox>
+ <JEditorPane id="textHomeFiscalYear"/>
</JPanel>
</cell>
</row>
@@ -66,16 +56,11 @@
minimumSize='{getFixedSize()}'
preferredSize='{getFixedSize()}'
layout='{new BoxLayout(limaHomeDaily,BoxLayout.X_AXIS)}'>
- <VBox id="homeBoxDaily"
- margin='0'
- horizontalAlignment='center'
- verticalAlignment='middle'>
- <JLabel id="textHomeDaily"/>
- </VBox>
+ <JEditorPane id="textHomeDaily"/>
</JPanel>
</cell>
</row>
- <row insets="40" weightx="1" weighty="1" anchor="west">
+ <row weightx="1" weighty="1" anchor="west">
<cell>
<JLabel icon='{new ImageIcon(getClass().getResource("/images/logo-codelutin.png"))}'/>
</cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-06-24 17:18:43 UTC (rev 2947)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-06-25 14:59:10 UTC (rev 2948)
@@ -2,6 +2,7 @@
import static org.nuiton.i18n.I18n._;
import java.awt.Color;
+import java.awt.Component;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -49,78 +50,106 @@
redBackground = new Color(255, 102, 102);
}
+ public void goToAccountChart(){
+
+ }
public void refresh(){
try {
+ //ACCOUNT
List<Account> accounts = accountService.getAllAccounts();
+ view.getTextHomeAccount().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ view.getTextHomeAccount().setOpaque(true);
+ view.getTextHomeAccount().setContentType("text/html");
+ view.getTextHomeAccount().setEditable(false);
if (accounts.size()>0){
- view.homeBoxAccount.setBackground(greenBackground);
String accountsString = _("limahome.chartaccounts1") + " " +
accounts.size() + " " + _("limahome.chartaccounts2");
- view.textHomeAccount.setText(accountsString);
+ view.getTextHomeAccount().setBackground(greenBackground);
+ view.getTextHomeAccount().setText("<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://accountcharts'>"+accountsString+"</a></p>");
}
else {
- view.homeBoxAccount.setBackground(redBackground);
- String accountsString = "<html>"+_("limahome.fiscalperiodnoopen") +
- "<br/>"+_("limahome.createchartaccounts")+"</html>";
- view.textHomeAccount.setText(accountsString);
+ view.getTextHomeAccount().setBackground(redBackground);
+ String accountsString = "<p style=vertical-align:'bottom', horizontal-align:'center'>"+_("limahome.fiscalperiodnoopen") +
+ "<br/><a href='lima://accountcharts'>"+_("limahome.createchartaccounts")+"</a>";
+ view.getTextHomeAccount().setText(accountsString+"</p>");
}
+ //ENTRYBOOK
List<EntryBook> entryBooks = entryBookService.getAllEntryBooks();
+ view.getTextHomeEntryBook().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ view.getTextHomeEntryBook().setOpaque(true);
+ view.getTextHomeEntryBook().setContentType("text/html");
+ view.getTextHomeEntryBook().setEditable(false);
if (entryBooks.size()>0){
- view.homeBoxEntryBook.setBackground(greenBackground);
- String entryBooksString = "<html>"+_("limahome.entrybooks1") +
+ view.getTextHomeEntryBook().setBackground(greenBackground);
+ String entryBooksString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://entrybookcharts'>"+_("limahome.entrybooks1") +
" " + entryBooks.size() + " " + _("limahome.entrybooks2") +
- "<br/><ul>";
+ "</a><br/><ul>";
for (EntryBook entryBook : entryBooks) {
entryBooksString += "<li>"+entryBook.getCode() +
" - "+entryBook.getLabel()+"</li>";
}
- view.textHomeEntryBook.setText(entryBooksString+"</ul></html>");
+ view.getTextHomeEntryBook().setText(entryBooksString+"</ul>"+"</p>");
}
else {
- view.homeBoxEntryBook.setBackground(redBackground);
- view.textHomeEntryBook.setText(_("limahome.fiscalperiodnoopen"));
+ view.getTextHomeEntryBook().setBackground(redBackground);
+ view.getTextHomeEntryBook().setText("<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://entrybookcharts'>"+_("limahome.entrybooknoopen")+"</a></p>");
}
+ //FISCAL PERIOD
List<FiscalPeriod> fiscalPeriods =
fiscalPeriodService.getAllFiscalPeriods();
List<FiscalPeriod> unblockedFiscalPeriods =
fiscalPeriodService.getAllUnblockedFiscalPeriods();
+
+ view.getTextHomeFiscalYear().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ view.getTextHomeFiscalYear().setOpaque(true);
+ view.getTextHomeFiscalYear().setContentType("text/html");
+ view.getTextHomeFiscalYear().setEditable(false);
+ view.getTextHomeDaily().setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
+ view.getTextHomeDaily().setOpaque(true);
+ view.getTextHomeDaily().setContentType("text/html");
+ view.getTextHomeDaily().setEditable(false);
+
if (unblockedFiscalPeriods.size()>0){
- view.homeBoxFiscalYear.setBackground(greenBackground);
- String fiscalString = "<html>"+unblockedFiscalPeriods.size() +
+ view.getTextHomeFiscalYear().setBackground(greenBackground);
+ String fiscalString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://fiscalcharts'>"
+ + unblockedFiscalPeriods.size() +
" " + _("limahome.fiscalperiodopened")+"<br/>" +
(fiscalPeriods.size()-unblockedFiscalPeriods.size()) +
- " " + _("limahome.fiscalperiodclosed")+"</html>";
- view.textHomeFiscalYear.setText(fiscalString);
+ " " + _("limahome.fiscalperiodclosed");
+ view.getTextHomeFiscalYear().setText(fiscalString+"</a></p>");
+ //FINACIAL TRANSACTION
List<FinancialTransaction> financialTransactions =
financialTransactionService.
getAllFinancialTransactionsUnbalanced(fiscalPeriods.get(0));
if (financialTransactions.size()>0){
- view.homeBoxDaily.setBackground(redBackground);
- String transactionsString = financialTransactions.size() +
- _("limahome.transactionunbalanced");
- view.textHomeAccount.setText(transactionsString);
+ view.getTextHomeDaily().setBackground(redBackground);
+ String transactionsString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://financialtransactionunbalanced'>"
+ + financialTransactions.size() +
+ _("limahome.transactionunbalanced")+"</a></p>";
+ view.getTextHomeDaily().setText(transactionsString);
}
else {
- view.homeBoxDaily.setBackground(greenBackground);
- String transactionsString =_("limahome.transactionbalanced");
- view.textHomeDaily.setText(transactionsString);
+ view.getTextHomeDaily().setBackground(greenBackground);
+ String transactionsString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://financialtransactionbalanced'>"
+ + _("limahome.transactionbalanced");
+ view.getTextHomeDaily().setText(transactionsString+"</a></p>");
}
}
else {
- view.homeBoxFiscalYear.setBackground(redBackground);
- view.homeBoxDaily.setBackground(redBackground);
- String fiscalString = "<html>"+_("limahome.fiscalperiodnoopen");
+ view.getTextHomeFiscalYear().setBackground(redBackground);
+ view.getTextHomeDaily().setBackground(redBackground);
+ String fiscalString = "<p style=vertical-align:'bottom', horizontal-align:'center'><a href='lima://fiscalcharts'>" + _("limahome.fiscalperiodnoopen");
if (fiscalPeriods.size()>0){
fiscalString += fiscalPeriods.size() +
_("limahome.fiscalperiodclosed");
}
- view.textHomeFiscalYear.setText(fiscalString+"</html>");
+ view.getTextHomeFiscalYear().setText(fiscalString+"</a></p>");
}
} catch (LimaException eee) {
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-06-24 17:18:43 UTC (rev 2947)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-06-25 14:59:10 UTC (rev 2948)
@@ -2,7 +2,9 @@
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
+LIMA=
Loading\ accounting...=
+hello\ world=
lima.about.message=
lima.account=Account
lima.account.label=Label
@@ -167,10 +169,13 @@
lima.transaction.period=Period
lima.voucher=Voucher
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
+limahome.chartaccounts1=
+limahome.chartaccounts2=
limahome.createchartaccounts=
limahome.createchartaccounts1=
limahome.createchartaccounts2=
limahome.entrybooks1=
+limahome.entrybooks2=
limahome.fiscalperiodclosed=
limahome.fiscalperiodnoopen=
limahome.fiscalperiodopened=
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-06-24 17:18:43 UTC (rev 2947)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-06-25 14:59:10 UTC (rev 2948)
@@ -2,7 +2,9 @@
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
+LIMA=
Loading\ accounting...=
+hello\ world=
lima.about.message=\u00C0 propos de Lima
lima.account=Compte
lima.account.label=
1
0
r2947 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui java/org/chorem/lima/ui/financialtransaction java/org/chorem/lima/ui/home resources/i18n resources/images
by jpepin@users.chorem.org 24 Jun '10
by jpepin@users.chorem.org 24 Jun '10
24 Jun '10
Author: jpepin
Date: 2010-06-24 19:18:43 +0200 (Thu, 24 Jun 2010)
New Revision: 2947
Url: http://chorem.org/repositories/revision/lima/2947
Log:
Cr?\195?\169ation de la vue d'accueil.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java
trunk/lima-swing/src/main/resources/images/logo-codelutin.png
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/HomeView.jaxx
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.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
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/HomeView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/HomeView.jaxx 2010-06-23 16:26:43 UTC (rev 2946)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/HomeView.jaxx 2010-06-24 17:18:43 UTC (rev 2947)
@@ -1,7 +0,0 @@
-<Table insets="0,0,0,0" fill="both">
- <row>
- <cell>
- <JLabel text="lima.home"/>
- </cell>
- </row>
-</Table>
\ No newline at end of file
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-06-23 16:26:43 UTC (rev 2946)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-06-24 17:18:43 UTC (rev 2947)
@@ -46,6 +46,7 @@
import org.chorem.lima.ui.financialtransaction.FinancialTransactionView;
import org.chorem.lima.ui.financialtransaction.LetteringView;
import org.chorem.lima.ui.financialtransactionunbalanced.FinancialTransactionUnbalancedView;
+import org.chorem.lima.ui.home.HomeView;
import org.chorem.lima.ui.ledger.LedgerView;
import org.chorem.lima.util.ErrorHelper;
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-06-23 16:26:43 UTC (rev 2946)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-06-24 17:18:43 UTC (rev 2947)
@@ -100,7 +100,8 @@
//select the new line
ListSelectionModel selectionModel =
table.getSelectionModel();
- selectionModel.setSelectionInterval(indexSelectedRow+1, indexSelectedRow+1);
+ selectionModel.setSelectionInterval(
+ indexSelectedRow+1, indexSelectedRow+1);
//focus on second column
table.changeSelection(indexSelectedRow+1, 1, false, false);
table.requestFocusInWindow();
@@ -151,7 +152,8 @@
//select the upper line
ListSelectionModel selectionModel =
table.getSelectionModel();
- selectionModel.setSelectionInterval(indexSelectedRow-1, indexSelectedRow-1);
+ selectionModel.setSelectionInterval(
+ indexSelectedRow-1, indexSelectedRow-1);
} catch (LimaException eee) {
if (log.isErrorEnabled()) {
log.error("Can't remove transaction or entry", eee);
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx (from rev 2944, trunk/lima-swing/src/main/java/org/chorem/lima/ui/HomeView.jaxx)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-06-24 17:18:43 UTC (rev 2947)
@@ -0,0 +1,83 @@
+<Table>
+ <HomeViewHandler id="handler" javaBean='new HomeViewHandler(this)' />
+ <Dimension id="fixedSize" javaBean='new Dimension(600,150)' />
+
+ <script>
+ <![CDATA[
+ import static org.nuiton.i18n.I18n._;
+
+ void $afterCompleteSetup() {
+ getHandler().refresh();
+ }
+ ]]>
+ </script>
+ <row weightx="1" weighty="1">
+ <cell>
+ <JPanel id="limaHomeChartAccount"
+ border='{BorderFactory.createTitledBorder(_("lima.charts.account"))}'
+ minimumSize='{getFixedSize()}'
+ preferredSize='{getFixedSize()}'
+ layout='{new BoxLayout(limaHomeChartAccount,BoxLayout.X_AXIS)}'>
+ <VBox id="homeBoxAccount"
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel id="textHomeAccount"/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JPanel id="limaHomeEntryBook"
+ border='{BorderFactory.createTitledBorder(_("lima.charts.entrybook"))}'
+ minimumSize='{getFixedSize()}'
+ preferredSize='{getFixedSize()}'
+ layout='{new BoxLayout(limaHomeEntryBook,BoxLayout.X_AXIS)}'>
+ <VBox id="homeBoxEntryBook"
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel id="textHomeEntryBook"/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JPanel id="limaHomeFiscalYear"
+ border='{BorderFactory.createTitledBorder(_("lima.charts.fiscalyear"))}'
+ minimumSize='{getFixedSize()}'
+ preferredSize='{getFixedSize()}'
+ layout='{new BoxLayout(limaHomeFiscalYear,BoxLayout.X_AXIS)}'>
+ <VBox id="homeBoxFiscalYear"
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel id="textHomeFiscalYear"/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JPanel id="limaHomeDaily"
+ border='{BorderFactory.createTitledBorder(_("lima.daily"))}'
+ minimumSize='{getFixedSize()}'
+ preferredSize='{getFixedSize()}'
+ layout='{new BoxLayout(limaHomeDaily,BoxLayout.X_AXIS)}'>
+ <VBox id="homeBoxDaily"
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel id="textHomeDaily"/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ <row insets="40" weightx="1" weighty="1" anchor="west">
+ <cell>
+ <JLabel icon='{new ImageIcon(getClass().getResource("/images/logo-codelutin.png"))}'/>
+ </cell>
+ </row>
+</Table>
\ No newline at end of file
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-06-24 17:18:43 UTC (rev 2947)
@@ -0,0 +1,131 @@
+package org.chorem.lima.ui.home;
+
+import static org.nuiton.i18n.I18n._;
+import java.awt.Color;
+import java.util.List;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.AccountService;
+import org.chorem.lima.business.EntryBookService;
+import org.chorem.lima.business.FinancialTransactionService;
+import org.chorem.lima.business.FiscalPeriodService;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.service.LimaServiceFactory;
+
+public class HomeViewHandler {
+
+ private static final Log log = LogFactory.getLog(HomeViewHandler.class);
+
+ private HomeView view;
+
+ protected AccountService accountService;
+
+ protected EntryBookService entryBookService;
+
+ protected FinancialTransactionService financialTransactionService;
+
+ protected FiscalPeriodService fiscalPeriodService;
+
+
+ private Color greenBackground;
+ private Color redBackground;
+
+ protected HomeViewHandler(HomeView view) {
+ this.view=view;
+ accountService =
+ LimaServiceFactory.getInstance().getAccountService();
+ entryBookService =
+ LimaServiceFactory.getInstance().getEntryBookService();
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getTransactionService();
+ fiscalPeriodService =
+ LimaServiceFactory.getInstance().getFiscalPeriodService();
+
+ greenBackground = new Color(153, 255, 153);
+ redBackground = new Color(255, 102, 102);
+ }
+
+
+ public void refresh(){
+
+ try {
+ List<Account> accounts = accountService.getAllAccounts();
+ if (accounts.size()>0){
+ view.homeBoxAccount.setBackground(greenBackground);
+ String accountsString = _("limahome.chartaccounts1") + " " +
+ accounts.size() + " " + _("limahome.chartaccounts2");
+ view.textHomeAccount.setText(accountsString);
+ }
+ else {
+ view.homeBoxAccount.setBackground(redBackground);
+ String accountsString = "<html>"+_("limahome.fiscalperiodnoopen") +
+ "<br/>"+_("limahome.createchartaccounts")+"</html>";
+ view.textHomeAccount.setText(accountsString);
+ }
+
+ List<EntryBook> entryBooks = entryBookService.getAllEntryBooks();
+ if (entryBooks.size()>0){
+ view.homeBoxEntryBook.setBackground(greenBackground);
+ String entryBooksString = "<html>"+_("limahome.entrybooks1") +
+ " " + entryBooks.size() + " " + _("limahome.entrybooks2") +
+ "<br/><ul>";
+ for (EntryBook entryBook : entryBooks) {
+ entryBooksString += "<li>"+entryBook.getCode() +
+ " - "+entryBook.getLabel()+"</li>";
+ }
+ view.textHomeEntryBook.setText(entryBooksString+"</ul></html>");
+ }
+ else {
+ view.homeBoxEntryBook.setBackground(redBackground);
+ view.textHomeEntryBook.setText(_("limahome.fiscalperiodnoopen"));
+ }
+
+ List<FiscalPeriod> fiscalPeriods =
+ fiscalPeriodService.getAllFiscalPeriods();
+ List<FiscalPeriod> unblockedFiscalPeriods =
+ fiscalPeriodService.getAllUnblockedFiscalPeriods();
+ if (unblockedFiscalPeriods.size()>0){
+ view.homeBoxFiscalYear.setBackground(greenBackground);
+ String fiscalString = "<html>"+unblockedFiscalPeriods.size() +
+ " " + _("limahome.fiscalperiodopened")+"<br/>" +
+ (fiscalPeriods.size()-unblockedFiscalPeriods.size()) +
+ " " + _("limahome.fiscalperiodclosed")+"</html>";
+ view.textHomeFiscalYear.setText(fiscalString);
+
+ List<FinancialTransaction> financialTransactions =
+ financialTransactionService.
+ getAllFinancialTransactionsUnbalanced(fiscalPeriods.get(0));
+ if (financialTransactions.size()>0){
+ view.homeBoxDaily.setBackground(redBackground);
+ String transactionsString = financialTransactions.size() +
+ _("limahome.transactionunbalanced");
+ view.textHomeAccount.setText(transactionsString);
+ }
+ else {
+ view.homeBoxDaily.setBackground(greenBackground);
+ String transactionsString =_("limahome.transactionbalanced");
+ view.textHomeDaily.setText(transactionsString);
+ }
+
+ }
+ else {
+ view.homeBoxFiscalYear.setBackground(redBackground);
+ view.homeBoxDaily.setBackground(redBackground);
+ String fiscalString = "<html>"+_("limahome.fiscalperiodnoopen");
+ if (fiscalPeriods.size()>0){
+ fiscalString += fiscalPeriods.size() +
+ _("limahome.fiscalperiodclosed");
+ }
+ view.textHomeFiscalYear.setText(fiscalString+"</html>");
+
+ }
+ } catch (LimaException eee) {
+ log.debug("Can't get datas home", eee);
+ }
+ }
+
+}
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-06-23 16:26:43 UTC (rev 2946)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-06-24 17:18:43 UTC (rev 2947)
@@ -1,78 +1,33 @@
-Bloqu\u00E9e=
-Can't\ add\ fiscal\ period=
-Can't\ block\ financialperiod=
-Can't\ delete\ all\ fiscal\ period=
Confirmation=
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
-Exercice=
Global\ lima\ exception=
Loading\ accounting...=
-TODO\ begincalendarPanel=
-TODO\ endcalendarPanel=
-calendarPanel\ TODO=
lima.about.message=
lima.account=Account
lima.account.label=Label
lima.account.number=Number
-lima.account.type=Account type
-lima.account.type1=
-lima.account.type2=
-lima.account.type3=
-lima.account.type4=
-lima.accountplan=Plan de comptes
-lima.accounts=Accounts
lima.accountsreports.accountfilter=Filter
lima.accountsreports.begincalendar=
lima.accountsreports.endcalendar=
-lima.actif=Asset
-lima.action.commandline.disable.main.ui=Do not launch main ui
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=Add
lima.add.entry=Add an entry
-lima.add.financialstatementheader=
-lima.add.financialstatementmovement=
-lima.add.lettering=Add a letter
lima.add.transaction=Add a transaction
-lima.all=All
-lima.all.criteria=All criteria are met
lima.amount=Amount
lima.amountcredit=
lima.amountdebit=
-lima.any.criteria=Any criteria are met
-lima.balance.account.libelle=Title
-lima.balance.account.number=N\u00B0 account
-lima.balance.move.credit=Credit
-lima.balance.move.debit=Debit
-lima.balance.solde.credit=Balance credit
-lima.balance.solde.debit=Balance debit
-lima.balance.total=Total
-lima.bilan=Bilan
-lima.bilan.actif=Actif
-lima.bilan.brut=Brut
-lima.bilan.depreciation=Depreciation
-lima.bilan.net=Net
-lima.bilan.passif=Passif
-lima.bilan.total=Total
-lima.block=block
-lima.cancel=Cancel
-lima.charge=Expense
lima.charts.account=Accounts chart
lima.charts.entrybook=EntryBooks chart
lima.charts.financialperiod=Financial Periods
lima.charts.financialstatement=
lima.charts.fiscalyear=Fiscal Years
lima.close=Closed
-lima.closure=Closure
-lima.closure.period.begin=Period from
-lima.closure.timespan.warning=Warning\: when the period is blocked, it is possible to add, edit and delete entries on the accounting period.
lima.common.add=
lima.common.addSubLedger=
-lima.common.all=
lima.common.cancel=
lima.common.ok=
lima.common.print=
@@ -86,27 +41,12 @@
lima.config.configFileName.description=
lima.config.locale.description=
lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen=
lima.config.ui.fullscreen.description=
lima.credit=Credit
lima.daily=Daily
lima.date=Date
-lima.date.april=April
-lima.date.august=August
-lima.date.december=December
-lima.date.february=February
-lima.date.january=January
-lima.date.july=July
-lima.date.june=June
-lima.date.march=March
-lima.date.may=May
-lima.date.november=November
-lima.date.october=October
-lima.date.september=September
lima.debit=Debit
lima.description=Description
-lima.edit=Edit
-lima.edit.transaction=Edit transaction
lima.entries=Entries
lima.entries.addtransaction=
lima.entries.lettering=
@@ -121,110 +61,42 @@
lima.entrybook.type3=
lima.entrybook.type4=
lima.entrybook.type5=
-lima.entrybooks=EntryBooks
lima.error=Error
-lima.error.account.double=It exists an account with a same number
-lima.error.account.not.exist=This account doesn't exist
-lima.error.account.not.master=This account has not an account master
-lima.error.account.with.entries=This account has some entries
-lima.error.entry.not.exist=
-lima.error.entry.not.remove=
lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html>
lima.error.errorpane.title=Lima error
-lima.error.journal.double=A journal exist with this name
-lima.error.journal.not.exist=This journal doesn't exist
-lima.error.journal.with.transactions=This journal has some transactions
-lima.error.period.all.timespan=
-lima.error.period.create.timespan=
-lima.error.period.next.not.blocked=
-lima.error.period.not.exist=
-lima.error.period.prec.not.blocked=It exists periods not blocked
-lima.error.period.timespan.block=
-lima.error.period.timespan.not.blocked=
-lima.error.transaction.exist.not.balanced=It exists transactions not balanced
-lima.error.transaction.not.create=This transaction has not been created
-lima.error.transaction.not.exist=This transaction doesn't exist
-lima.error.transaction.not.journal=This transaction has not a journal
-lima.error.transaction.not.period=This transaction has not a period
-lima.error.transaction.not.remove=This transaction has not been removed
-lima.error.transaction.period.not.blocked=The period is blocked
-lima.exception.number.format=Numeric format only accepted
lima.export=Export
-lima.export.CSV=CSV Export
-lima.export.PDF=PDF Export
lima.export.account=Export PCG
lima.export.all=Export all datas (XML)
lima.export.all.csv=Exporter all datas (CSV)
-lima.filter.after=After
-lima.filter.before=Before
-lima.filter.contains=Contains
-lima.filter.equals.to=Equals to
-lima.filter.greater.than=Greater than
-lima.filter.less.than=Less than
-lima.filter.not.contains=Not contains
-lima.filter.starts.with=Starts with
lima.financialperiod.block=
-lima.financialperiod.management=
lima.financialstatement.accounts=
lima.financialstatement.creditaccounts=
lima.financialstatement.debitaccounts=
lima.financialstatement.formula=
-lima.financialstatement.header=
lima.financialstatement.header.add=
lima.financialstatement.label=
lima.financialstatement.movement.add=
lima.financialstatement.provisiondeprecationaccounts=
-lima.financialstatement.style=
lima.financialstatement.subamount=
-lima.financialstatementreports=
-lima.find.transaction=Find transaction
lima.fiscalperiod.addFiscalPeriod=
lima.fiscalperiod.block=
-lima.fiscalperiod.periodFilterLabel=
-lima.fiscalyear=
-lima.fiscalyear.addperiod=
-lima.fiscalyear.closefiscalyear=
-lima.fiscalyear.closeperiod=
-lima.fiscalyear.listclosed=
-lima.fiscalyear.management=
-lima.grand.livre=General Ledger
-lima.home=Home - TODO
-lima.identity.address=
-lima.identity.adress=
-lima.identity.city=
lima.identity.contact=
-lima.identity.country=
-lima.identity.email=
-lima.identity.fax=
-lima.identity.name=
-lima.identity.phone=
-lima.identity.siret=
-lima.identity.website=
-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.error=Your datas had't not been loaded
lima.import.journal=Import journal
-lima.import.success=Your datas had been loaded
lima.init.closed=Lima closed at %1$s
-lima.init.context.done=Context was initialized in %1$s
lima.init.errorclosing=
-lima.init.ui.done=UI initialized
-lima.lettered=Lettered
-lima.lettering=Lettering
lima.lettering.add=
lima.lettering.entries=
lima.lettering.from=
lima.lettering.lettered=
lima.lettering.letteredall=
-lima.lettering.not.lettered=
lima.lettering.notlettered=
lima.lettering.remove=
lima.lettering.to=
-lima.loading=Loading
lima.menu.file=File
lima.menu.help=Help
lima.menu.help.about=About
@@ -233,78 +105,23 @@
lima.menu.help.i18n.fr=French
lima.menu.help.i18n.uk=English
lima.menu.help.site=WebSite
-lima.menubar.closure=Closure
-lima.menubar.closure.addPeriod=Add a period
-lima.menubar.closure.listperiod=See all periods
-lima.menubar.closure.period=close a period (annual)
-lima.menubar.closure.timespan=close a period (monthly)
-lima.message.config.loaded=Config was loaded
-lima.message.error.empty.line=Please choose an account
lima.message.help.usage=
lima.misc.supportemail.description=
-lima.model.account=Account
-lima.model.balance=Balance
-lima.model.credit=Credit
-lima.model.date=Date
-lima.model.debit=Debit
-lima.model.description=Description
-lima.model.etat=Etat
-lima.model.journal=Journal
-lima.model.lettering=Lettering
-lima.model.name=Name
-lima.model.period=Period
-lima.model.prefix=Prefix
-lima.model.status=Status
-lima.model.voucher=Voucher
-lima.name=Name
-lima.non.valids.transactions=No valids transactions
-lima.not.lettered=Not lettered
-lima.number=Number
-lima.ok=OK
lima.open=Open
lima.openejb.remotemode.description=
-lima.passif=Liability
-lima.period=Period
-lima.period.addFiscalPeriod=
lima.period.begindate=
-lima.period.block=
-lima.period.close=Close
lima.period.enddate=
-lima.period.filter=
-lima.period.open=Open
-lima.period.periodFilterLabel=
lima.preferences=Preferences
-lima.prefix=Prefix
-lima.print=Print
-lima.produit=Revenue
-lima.progressBar.export.etape1=Create the file
-lima.progressBar.export.etape2=Create informations
-lima.progressBar.export.etape3=Create periods
-lima.progressBar.export.etape4=Create journals
-lima.progressBar.export.etape5=Create accounts
-lima.progressBar.export.etape6=Create transactions
-lima.progressBar.export.etape7=Save the file
-lima.progressBar.export.title=Save
-lima.progressBar.load.etape1=Loading journals
-lima.progressBar.load.etape2=Loading accounts
-lima.progressBar.load.etape3=Loading status
-lima.progressBar.load.etape4=Loading periods
-lima.progressBar.load.etape5=Loading transactions
lima.question=Question
-lima.question.confirmremove.account=This account have subaccounts, do you want remove this account ?
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.journal=Do you want to remove this journal ?
lima.question.remove.transaction=Do you want to remove this transaction ?
-lima.quit=Quit
lima.refresh=\u21BB
lima.remove=Remove
-lima.remove.lettering=Remove a letter
-lima.remove.transaction=Remove a transaction
lima.reports=Reports
lima.reports.accounts=Edit account
lima.reports.balance=Balance
@@ -313,46 +130,13 @@
lima.reports.ledger=Ledger
lima.response.no=No
lima.response.yes=Yes
-lima.result=Result
-lima.result.charge=CHARGES
-lima.result.loss=Perte
-lima.result.produit=PRODUITS
-lima.result.profit=B\u00E9n\u00E9fice
-lima.result.total.charge=TOTAL CHARGES
-lima.result.total.produit=TOTAL PRODUITS
-lima.search=Search
-lima.search.items.where=Search items where
-lima.search.title.criteria.box=Criteria
-lima.since=Since
lima.solde=
lima.soldecredit=
lima.soldedebit=
-lima.status.tr.balanced=Balanced
-lima.status.tr.finalized=Finalized
-lima.status.tr.wip=Work in progress
lima.structure=Structure
-lima.style.1=
-lima.subledger.accountnumber=
lima.subledger.code=Code
-lima.subledger.label=
-lima.subledger.type=
-lima.success=Success
-lima.tab.account=Account
-lima.tab.accounts=
-lima.tab.balance=Balance
-lima.tab.bilan=Results
-lima.tab.closure=Closure
-lima.tab.financialperiod=
-lima.tab.fiscalperiod=
lima.tab.home=Home
-lima.tab.journal=Journal
-lima.tab.lettering=Lettering
-lima.tab.period=Period
-lima.tab.reports=Reports
lima.tab.result=Result
-lima.tab.search.result=Search result
-lima.tab.subledgers=
-lima.tab.transaction=Transaction
lima.table.account=
lima.table.balance=
lima.table.closure=
@@ -379,34 +163,16 @@
lima.table.voucher=
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=About Lima...
-lima.to=To
-lima.transaction.column.account=Account
-lima.transaction.column.balance=Balance
-lima.transaction.column.credit=Credit
-lima.transaction.column.date=Date
-lima.transaction.column.debit=Debit
-lima.transaction.column.description=Description
-lima.transaction.column.document=Voucher
-lima.transaction.column.entrybook=Entrybook
-lima.transaction.column.period=Period
-lima.transaction.column.position=
-lima.transaction.column.solde=Solde
-lima.transaction.column.status=Status
-lima.transaction.column.voucher=
lima.transaction.confirmdelete=
-lima.transaction.entrybook=
lima.transaction.period=Period
-lima.ui.add.account=Add account
-lima.ui.add.journal=Add journal
-lima.ui.block.timespan=Block period
-lima.ui.unblock.timespan=Unblock period
-lima.ui.update.account=Update account
-lima.ui.update.journal=Update journal
-lima.unblock=Unblock
-lima.update=Update
-lima.view=View
-lima.view.flatten=Flatten view
lima.voucher=Voucher
-lima.warning.entrybookscloded=All EntryBook of this financial period are blocked
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
-lima.warning.no.ui=No ui display detected
+limahome.createchartaccounts=
+limahome.createchartaccounts1=
+limahome.createchartaccounts2=
+limahome.entrybooks1=
+limahome.fiscalperiodclosed=
+limahome.fiscalperiodnoopen=
+limahome.fiscalperiodopened=
+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-06-23 16:26:43 UTC (rev 2946)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-06-24 17:18:43 UTC (rev 2947)
@@ -1,66 +1,31 @@
-Bloqu\u00E9e=
-Can't\ add\ fiscal\ period=
-Can't\ block\ financialperiod=
-Can't\ delete\ all\ fiscal\ period=
Confirmation=
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
Loading\ accounting...=
-TODO\ begincalendarPanel=
-TODO\ endcalendarPanel=
-\\\\u21BB=
-calendarPanel\ TODO=
lima.about.message=\u00C0 propos de Lima
lima.account=Compte
lima.account.label=
-lima.account.menu=Plan de comptes
lima.account.number=
-lima.account.parentnumber=
-lima.account.type=Type de compte
-lima.account.type1=Actif
-lima.account.type2=Passif
-lima.account.type3=Produit
-lima.account.type4=Charge
-lima.accounts=Comptes
lima.accountsreports.accountfilter=Filtrer
lima.accountsreports.begincalendar=Date d\u00E9but
lima.accountsreports.endcalendar=Date fin
-lima.actif=Actif
-lima.action.commandline.disable.main.ui=Ne pas lancer l'ui
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.financialstatement.movement.add=Mouvement
-lima.add.lettering=
lima.add.transaction=Ajouter transaction
-lima.all=Tous
-lima.all.criteria=Tous les crit\u00E8res correspondent
lima.amount=Montant
lima.amountcredit=Total Cr\u00E9dit
lima.amountdebit=Total D\u00E9bit
-lima.any.criteria=Au moins un crit\u00E8re correspond
-lima.balance.total=Total
-lima.bilan=Bilan
-lima.bilan.actif=Actif
-lima.bilan.brut=Brut
-lima.bilan.depreciation=Amort. et Prov.
-lima.bilan.net=Net
-lima.bilan.passif=Passif
-lima.bilan.total=Total
-lima.block=Bloquer
-lima.charge=Charge
lima.charts.account=Plan comptable
lima.charts.entrybook=Journaux
lima.charts.financialperiod=P\u00E9riodes comptables
lima.charts.financialstatement=Plan BCR
lima.charts.fiscalyear=Exercices
lima.close=Ferm\u00E9
-lima.closure.period.begin=P\u00E9riode de
-lima.closure.timespan.warning=Attention \: lorsque la p\u00E9riode est bloqu\u00E9e, il n'est plus possible d'ajouter, modifier et supprimer les entr\u00E9es comptables sur cette p\u00E9riode.
lima.common.add=Ajout Compte G\u00E9n\u00E9ral
lima.common.addSubLedger=Ajouter Compte Tiers
lima.common.cancel=Annuler
@@ -69,7 +34,6 @@
lima.common.quit=Quitter
lima.common.remove=Supprimer
lima.common.update=Modifier
-lima.comon.print=Imprimer
lima.config.category.directories=R\u00E9pertoires
lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
lima.config.category.other=Autre
@@ -77,27 +41,12 @@
lima.config.configFileName.description=
lima.config.locale.description=Locale utilis\u00E9e par l'application
lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen=Drapeau pour utiliser le mode plein \u00E9cran
lima.config.ui.fullscreen.description=
lima.credit=Credit
lima.daily=Quotidien
lima.date=Date
-lima.date.april=Avril
-lima.date.august=Ao\u00FBt
-lima.date.december=D\u00E9cembre
-lima.date.february=F\u00E9vrier
-lima.date.january=Janvier
-lima.date.july=Juillet
-lima.date.june=Juin
-lima.date.march=Mars
-lima.date.may=Mai
-lima.date.november=Novembre
-lima.date.october=Octobre
-lima.date.september=Septembre
lima.debit=Debit
lima.description=Description
-lima.edit=Editer
-lima.edit.transaction=Editer une transaction
lima.entries=Traitement
lima.entries.addtransaction=Saisir des \u00E9critures
lima.entries.lettering=Ajouter une lettre
@@ -112,50 +61,14 @@
lima.entrybook.type3=Tr\u00E9sorerie
lima.entrybook.type4=G\u00E9n\u00E9ral
lima.entrybook.type5=Situation
-lima.entrybooks=Journaux
lima.error=Erreur
-lima.error.account.double=Il existe un compte avec ce m\u00EAme num\u00E9ro de compte
-lima.error.account.not.exist=Ce num\u00E9ro de compte n'existe pas
-lima.error.account.not.master=Ce compte ne poss\u00E8de pas de compte principal
-lima.error.account.with.entries=Ce compte poss\u00E8de des entr\u00E9es comptables
-lima.error.entry.not.exist=
-lima.error.entry.not.remove=
lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
lima.error.errorpane.title=Lima erreur
-lima.error.journal.double=Un journal poss\u00E8de d\u00E9j\u00E0 ce nom
-lima.error.journal.not.exist=Ce journal n'existe pas
-lima.error.journal.with.transactions=Ce journal poss\u00E8de des transactions comptables
-lima.error.period.all.timespan=
-lima.error.period.create.timespan=
-lima.error.period.next.not.blocked=
-lima.error.period.not.exist=
-lima.error.period.prec.not.blocked=Il existe des p\u00E9riodes pr\u00E9c\u00E9dentes non bloqu\u00E9es
-lima.error.period.timespan.block=
-lima.error.period.timespan.not.blocked=
-lima.error.transaction.exist.not.balanced=Il existe des transactions non \u00E9quilibr\u00E9es
-lima.error.transaction.not.create=La transaction n'a pu \u00EAtre cr\u00E9\u00E9e
-lima.error.transaction.not.exist=La transaction n'existe pas
-lima.error.transaction.not.journal=La transaction doit \u00EAtre associ\u00E9e \u00E0 un journal
-lima.error.transaction.not.period=La transaction doit \u00EAtre associ\u00E9e \u00E0 une p\u00E9riode
-lima.error.transaction.not.remove=La transaction n'a pu \u00EAtre supprim\u00E9e.
-lima.error.transaction.period.not.blocked=La p\u00E9riode de la transaction est bloqu\u00E9e.
-lima.exception.number.format=Uniquement un format num\u00E9rique est accept\u00E9
lima.export=Export
-lima.export.CSV=CSV
-lima.export.PDF=PDF
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.filter.after=Apr\u00E8s
-lima.filter.before=Avant
-lima.filter.contains=Contient
-lima.filter.equals.to=Egal \u00E0
-lima.filter.greater.than=Sup\u00E9rieur \u00E0
-lima.filter.less.than=Inf\u00E9rieur \u00E0
-lima.filter.not.contains=Ne contient pas
-lima.filter.starts.with=Commence par
lima.financialperiod.block=Cloturer une p\u00E9riode
-lima.financialperiod.management=
lima.financialstatement.accounts=Liste de comptes au cr\u00E9dit et au d\u00E9bit
lima.financialstatement.creditaccounts=Liste de comptes au cr\u00E9dit
lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
@@ -165,42 +78,17 @@
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.find.transaction=Rechercher transaction
lima.fiscalperiod.addFiscalPeriod=Nouvel exercice
lima.fiscalperiod.block=Cloturer un exercice
-lima.fiscalperiod.periodFilterLabel=
-lima.fiscalyear.addperiod=Ajouter une p\u00E9riode
-lima.fiscalyear.closefiscalyear=Cl\u00F4turer l'exercice
-lima.fiscalyear.closeperiod=Cl\u00F4turer une p\u00E9riode
-lima.fiscalyear.listclosed=Voir toutes les cl\u00F4tures
-lima.fiscalyear.management=
-lima.grand.livre=Grand-Livre
-lima.home=Page d'accueil - TODO
-lima.identity.address=Adresse
-lima.identity.city=Ville
lima.identity.contact=Contact
-lima.identity.country=Pays
-lima.identity.email=eMail
-lima.identity.fax=Fax
-lima.identity.name=Nom
-lima.identity.phone=Tel
-lima.identity.siret=Siret
-lima.identity.website=Site Web
-lima.identity.zipcode=Code Postal
lima.import=Import
lima.import.account=Importer le PCG
lima.import.all=Importer une nouvelle base (XML)
lima.import.all.csv=Importer une nouvelle base (CSV)
lima.import.all.csv.ebp=Importer des donn\u00E9es de EBP
-lima.import.error=Vos donn\u00E9es n'ont pu \u00EAtre charg\u00E9es
lima.import.journal=Importer le journal
-lima.import.success=Vos donn\u00E9es ont bien \u00E9t\u00E9 charg\u00E9es
lima.init.closed=Lima ferm\u00E9 \u00E0 %1$s
-lima.init.context.done=Initialisation du context termin\u00E9 en %1$s
lima.init.errorclosing=
-lima.init.ui.done=Initialisation des interface graphiques termin\u00E9e
-lima.lettered=Lettr\u00E9
-lima.lettering=Lettrage
lima.lettering.add=Ajouter une lettre
lima.lettering.entries=Op\u00E9ration de saisie
lima.lettering.from=De
@@ -209,7 +97,6 @@
lima.lettering.notlettered=Non lettr\u00E9e
lima.lettering.remove=Supprimer
lima.lettering.to=\u00C0
-lima.loading=Chargement
lima.menu.file=Fichier
lima.menu.help=Aide
lima.menu.help.about=\u00C0 Propos
@@ -218,67 +105,23 @@
lima.menu.help.i18n.fr=Fran\u00E7ais
lima.menu.help.i18n.uk=Anglais
lima.menu.help.site=Acc\u00E9der au site de Lima
-lima.menubar.closure.addPeriod=
-lima.message.config.loaded=
-lima.message.error.empty.line=Veuillez choisir un compte
lima.message.help.usage=
lima.misc.supportemail.description=
-lima.model.account=Compte
-lima.model.balance=Balance
-lima.model.credit=Cr\u00E9dit
-lima.model.date=Date
-lima.model.debit=D\u00E9bit
-lima.model.description=Description
-lima.model.etat=Etat
-lima.model.journal=Journal
-lima.model.lettering=Lettrage
-lima.model.name=Nom
-lima.model.period=P\u00E9riode
-lima.model.prefix=Pr\u00E9fixe
-lima.model.status=Statut
-lima.model.voucher=Document
-lima.name=Nom
-lima.non.valids.transactions=Ecritures non valides
-lima.not.lettered=Non lettr\u00E9
-lima.number=Num\u00E9ro
lima.open=Ouvert
lima.openejb.remotemode.description=
-lima.passif=Passif
-lima.period=
lima.period.begindate=D\u00E9but
-lima.period.close=
lima.period.enddate=Fin
-lima.period.open=
lima.preferences=Pr\u00E9f\u00E9rences
-lima.prefix=Pr\u00E9fixe
-lima.produit=Produit
-lima.progressBar.export.etape1=Cr\u00E9ation base du fichier
-lima.progressBar.export.etape2=Cr\u00E9ation informations
-lima.progressBar.export.etape3=Cr\u00E9ation des p\u00E9riodes
-lima.progressBar.export.etape4=Cr\u00E9ation des journaux
-lima.progressBar.export.etape5=Cr\u00E9ation des comptes
-lima.progressBar.export.etape6=Cr\u00E9ation des transactions
-lima.progressBar.export.etape7=Enregistrement du fichier
-lima.progressBar.export.title=Sauvegarde
-lima.progressBar.load.etape1=Chargement des journaux
-lima.progressBar.load.etape2=Chargement des comptes
-lima.progressBar.load.etape3=Chargement des status
-lima.progressBar.load.etape4=Chargement des p\u00E9riodes
-lima.progressBar.load.etape5=Chargement des transactions
lima.question=Question
-lima.question.confirmremove.account=Ce compte poss\u00E8de des sous comptes, voulez-vous supprimer ce compte ?
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.journal=Voulez-vous supprimer ce journal?
lima.question.remove.transaction=Voulez-vous supprimer cette transaction?
lima.refresh=\u21BB
lima.remove=
-lima.remove.lettering=Supprimer la lettre
-lima.remove.transaction=Supprimer une transaction
lima.reports=Rapports
lima.reports.accounts=Edition compte
lima.reports.balance=Balance
@@ -287,34 +130,12 @@
lima.reports.ledger=Grand Livre
lima.response.no=Non
lima.response.yes=Oui
-lima.result=Compte de r\u00E9sultat
-lima.result.charge=CHARGES
-lima.result.loss=Perte
-lima.result.produit=PRODUITS
-lima.result.profit=B\u00E9n\u00E9fice
-lima.result.total.charge=TOTAL CHARGES
-lima.result.total.produit=TOTAL PRODUITS
-lima.search=Rechercher
-lima.search.items.where=Trouver les \u00E9critures o\u00F9
-lima.search.title.criteria.box=Crit\u00E8res
-lima.since=Depuis
lima.solde=Solde
lima.soldecredit=Solde Cr\u00E9diteur
lima.soldedebit=Solde D\u00E9biteur
-lima.status.tr.balanced=Equilibr\u00E9e
-lima.status.tr.finalized=Valid\u00E9e
-lima.status.tr.wip=En cours
lima.structure=Structure
-lima.style.1=
-lima.subledger.accountnumber=
lima.subledger.code=Code
-lima.subledger.label=
-lima.subledger.type=
-lima.success=Succ\u00E8s
-lima.tab.bilan=
-lima.tab.fiscalperiod=Exercice
lima.tab.home=Accueil
-lima.tab.reports=
lima.tab.result=
lima.table.account=Compte
lima.table.balance=Balance
@@ -342,21 +163,19 @@
lima.table.voucher=Pi\u00E8ce comptable
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=A propos de Lima...
-lima.to=A
lima.transaction.confirmdelete=
-lima.transaction.entrybook=Journal
lima.transaction.period=P\u00E9riode
-lima.ui.add.account=Ajouter un compte
-lima.ui.add.journal=Ajouter un journal
-lima.ui.block.timespan=Bloquer une p\u00E9riode mensuelle
-lima.ui.unblock.timespan=D\u00E9bloquer une p\u00E9riode mensuelle
-lima.ui.update.account=Mettre \u00E0 jour le compte
-lima.ui.update.journal=Mettre \u00E0 jour le journal
-lima.unblock=D\u00E9bloquer
-lima.update=
-lima.view=Vue
-lima.view.flatten=Vue aplatie
lima.voucher=Document
-lima.warning.entrybookscloded=Impossible tous les journaux de cette p\u00E9riode sont ferm\u00E9s
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
-lima.warning.no.ui=Aucun environnement graphique d\u00E9tect\u00E9.
+limahome.accountsnoopen=Aucun compte \!
+limahome.chartaccounts1=Le plan comptable possede
+limahome.chartaccounts2=comptes
+limahome.createchartaccounts=Cr\u00E9er le plan comptable
+limahome.entrybooknoopen=Aucun journal ouvert \!
+limahome.entrybooks1=Les
+limahome.entrybooks2=journaux sont \:
+limahome.fiscalperiodclosed=exercices clotur\u00E9s
+limahome.fiscalperiodnoopen=Aucun exercice ouvert \!
+limahome.fiscalperiodopened=exercices ouverts
+limahome.transactionbalanced=Toutes les entr\u00E9es sont \u00E9quilibr\u00E9es
+limahome.transactionunbalanced=ne sont pas \u00E9quilibr\u00E9e \!
Added: trunk/lima-swing/src/main/resources/images/logo-codelutin.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/images/logo-codelutin.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
Author: jpepin
Date: 2010-06-23 18:26:43 +0200 (Wed, 23 Jun 2010)
New Revision: 2946
Url: http://chorem.org/repositories/revision/lima/2946
Log:
G?\195?\169n?\195?\169ration bilan et compte de r?\195?\169sultat (suite). Ajout d'un champ de calcul ?\195?\160 partir d'une extension de compte, pour calculer le r?\195?\169sultat.
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-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/account/AccountTreeTableModel.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/BalanceTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableCellRenderer.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/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -302,20 +302,22 @@
// Check rules for account if have entries
accountingRules.removeAccountRules(account, transaction);
-
+
+ // remove account
+ Account accountToDelete = accountDAO.findByTopiaId(account.getTopiaId());
+ accountDAO.delete(accountToDelete);
+
//get all subaccounts
List<Account> accounts = getAllChildrenAccounts(account, 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(account, transaction);
- accountDAO.delete(subAccount);
+ accountingRules.removeAccountRules(subAccount, transaction);
+ Account subAccountToDelete = accountDAO.findByTopiaId(subAccount.getTopiaId());
+ accountDAO.delete(subAccountToDelete);
}
}
- // remove account
- accountDAO.delete(account);
//commit
commitTransaction(transaction);
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -21,11 +21,15 @@
import static org.nuiton.i18n.I18n._;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Date;
+import java.util.HashSet;
import java.util.List;
+import java.util.StringTokenizer;
+
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;
import org.chorem.lima.beans.FinancialStatementAmounts;
@@ -125,20 +129,24 @@
TopiaContext transaction = null;
try {
transaction = beginTransaction();
- FinancialStatementDAO financialStatementHeaderDAO =
+ FinancialStatementDAO financialStatementDAO =
LimaCallaoDAOHelper.getFinancialStatementDAO(transaction);
- //get all subFinancialStatementHeader and FinancialStatementMovement
+
+ // remove financialstatement
+ FinancialStatement financialStatementToDelete = financialStatementDAO.findByTopiaId(financialStatement.getTopiaId());
+ financialStatementDAO.delete(financialStatementToDelete);
+
+ //get all subFinancialStatement
List<FinancialStatement> financialStatements = getAllChildrenFinancialStatement(financialStatement, new ArrayList<FinancialStatement>());
- //if FinancialStatementHeader have subFinancialStatementHeader
+ //if FinancialStatement have subFinancialStatement
if (financialStatements.size() > 0){
for (FinancialStatement subFinancialStatement : financialStatements) {
- financialStatementHeaderDAO.delete(subFinancialStatement);
+ FinancialStatement subFinancialStatementToDelete = financialStatementDAO.findByTopiaId(subFinancialStatement.getTopiaId());
+ financialStatementDAO.delete(subFinancialStatementToDelete);
}
}
- // remove account
- financialStatementHeaderDAO.delete(financialStatement);
//commit
commitTransaction(transaction);
@@ -180,7 +188,8 @@
TopiaQuery query = financialStatementDAO.createQuery();
- query.addEquals("masterFinancialStatement", masterFinancialStatement);
+ query.addEquals("masterFinancialStatement", masterFinancialStatement)
+ .addOrder(FinancialStatement.LABEL);
financialStatements = financialStatementDAO.findAllByQuery(query);
}
catch (TopiaException ex) {
@@ -259,9 +268,40 @@
FinancialStatementDatas financialStatementDatas = financialStatementReport(subFinancialStatement, selectedBeginDate, selectedEndDate, result, topiaContext);
grossAmount += financialStatementDatas.getFinancialStatementAmounts().getGrossAmount();
provisionDeprecationAmount += financialStatementDatas.getFinancialStatementAmounts().getProvisionDeprecationAmount();
- subResult.add(financialStatementDatas.getFinancialStatementAmounts());
- if (financialStatementDatas.getListResult() != null){
- subResult.addAll(financialStatementDatas.getListResult());
+
+
+ FinancialStatementAmounts headerfinancialStatementAmounts = financialStatementDatas.getFinancialStatementAmounts();
+ //Si sous-total
+ if (subFinancialStatement.getSubAmount()){
+ FinancialStatementAmounts header = new FinancialStatementAmountsImpl();
+ header.setLabel(headerfinancialStatementAmounts.getLabel());
+ header.setLevel(headerfinancialStatementAmounts.getLevel());
+ header.setHeader(true);
+ //ajoute header
+ subResult.add(header);
+ //ajoute liste
+ if (financialStatementDatas.getListResult() != null){
+ subResult.addAll(financialStatementDatas.getListResult());
+ }
+ //ajoute sstotal
+ FinancialStatementAmounts subAmount = new FinancialStatementAmountsImpl();
+ subAmount.setLabel("TOTAL "+headerfinancialStatementAmounts.getLabel());
+ subAmount.setLevel(headerfinancialStatementAmounts.getLevel());
+ subAmount.setGrossAmount(headerfinancialStatementAmounts.getGrossAmount());
+ subAmount.setProvisionDeprecationAmount(headerfinancialStatementAmounts.getProvisionDeprecationAmount());
+ subAmount.setSubAmount(true);
+ subResult.add(subAmount);
+ //ajoute ligne vide
+ subResult.add(new FinancialStatementAmountsImpl());
+
+ }//sinon
+ else {
+ //ajoute head avec amount
+ subResult.add(headerfinancialStatementAmounts);
+ //ajoute liste
+ if (financialStatementDatas.getListResult() != null){
+ subResult.addAll(financialStatementDatas.getListResult());
+ }
}
}
}
@@ -290,52 +330,121 @@
new FinancialStatementAmountsImpl();
try {
+ // DEBIT & CREDIT
String accountsString = financialStatement.getAccounts();
- List<Account> accountsList = accountServiceLocal.
- stringToListAccountsWithTransaction(accountsString, topiaContext);
Double amount = 0.0;
- for (Account account : accountsList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(account,
- selectedBeginDate, selectedEndDate, topiaContext);
- amount += reportsDatas.getAmountSolde();
+ if (accountsString != null){
+ List<Account> accountsList = accountServiceLocal.
+ stringToListAccountsWithTransaction(accountsString, topiaContext);
+ for (Account account : accountsList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(account,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ amount += reportsDatas.getAmountSolde();
+ }
}
+ // CREDIT
String creditAccountsString = financialStatement.getCreditAccounts();
- List<Account> creditAccountsList = accountServiceLocal.
- stringToListAccountsWithTransaction(creditAccountsString, topiaContext);
Double creditAmount = 0.0;
- for (Account account : creditAccountsList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(account,
- selectedBeginDate, selectedEndDate, topiaContext);
- creditAmount += reportsDatas.getAmountCredit();
+ if (creditAccountsString != null){
+ List<Account> creditAccountsList = accountServiceLocal.
+ stringToListAccountsWithTransaction(creditAccountsString, topiaContext);
+ for (Account account : creditAccountsList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(account,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ creditAmount += reportsDatas.getAmountCredit();
+ }
}
+
+ // DEBIT
String debitAccountsString = financialStatement.getDebitAccounts();
- List<Account> debitAccountsList = accountServiceLocal.
- stringToListAccountsWithTransaction(debitAccountsString, topiaContext);
Double debitAmount = 0.0;
- for (Account account : debitAccountsList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(account,
- selectedBeginDate, selectedEndDate, topiaContext);
- debitAmount += reportsDatas.getAmountCredit();
+ if (debitAccountsString != null){
+ List<Account> debitAccountsList = accountServiceLocal.
+ stringToListAccountsWithTransaction(debitAccountsString, topiaContext);
+ for (Account account : debitAccountsList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(account,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ debitAmount += reportsDatas.getAmountCredit();
+ }
}
+
+ // PROVISION & DEPRECATION
String provisionDeprecationAccountsString =
financialStatement.getProvisionDeprecationAccounts();
- List<Account> provisionDeprecationAccountsList = accountServiceLocal.
+ Double provisionDeprecationAmount = 0.0;
+ if (provisionDeprecationAccountsString != null){
+ List<Account> provisionDeprecationAccountsList = accountServiceLocal.
stringToListAccountsWithTransaction(provisionDeprecationAccountsString, topiaContext);
- Double provisionDeprecationAmount = 0.0;
- for (Account account : provisionDeprecationAccountsList) {
- ReportsDatas reportsDatas = reportServiceLocal.
- generateAccountReportsWithTransaction(account,
- selectedBeginDate, selectedEndDate, topiaContext);
- provisionDeprecationAmount += reportsDatas.getAmountSolde();
+ for (Account account : provisionDeprecationAccountsList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(account,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ provisionDeprecationAmount += reportsDatas.getAmountSolde();
+ }
}
+
- financialStatementAmounts.setGrossAmount(amount+creditAmount+debitAmount);
+ // FORMULA
+ String formulaString =
+ financialStatement.getFormula();
+ Double formulaAmount = 0.0;
+ if (formulaString != null){
+ //Remove Spaces
+ formulaString = StringUtils.deleteWhitespace(formulaString);
+ log.debug(formulaString);
+ //Split simple quote
+ StringTokenizer stQuote = new StringTokenizer(formulaString, "'");
+ while (stQuote.hasMoreTokens()) {
+ String s = stQuote.nextToken();
+ log.debug(s);
+ if (s.contentEquals("-")){
+ s = stQuote.nextToken();
+ List<Account> accountsStringList = accountServiceLocal.
+ stringToListAccountsWithTransaction(s, topiaContext);
+ Double resAmount = 0.0;
+ for (Account accountString : accountsStringList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(accountString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ resAmount += reportsDatas.getAmountSolde();
+ }
+ formulaAmount-=resAmount;
+ }
+ else if (s.contains("-")){
+ List<Account> accountsStringList = accountServiceLocal.
+ stringToListAccountsWithTransaction(s, topiaContext);
+ Double resAmount = 0.0;
+ for (Account accountString : accountsStringList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(accountString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ resAmount += reportsDatas.getAmountSolde();
+ }
+ formulaAmount+=resAmount;
+ }
+ else{
+ List<Account> accountsStringList = accountServiceLocal.
+ stringToListAccountsWithTransaction(s, topiaContext);
+ Double resAmount = 0.0;
+ for (Account accountString : accountsStringList) {
+ ReportsDatas reportsDatas = reportServiceLocal.
+ generateAccountReportsWithTransaction(accountString,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ resAmount += reportsDatas.getAmountSolde();
+ }
+ formulaAmount+=resAmount;}
+ }
+ }
+
+
+ // set result
+ financialStatementAmounts.setGrossAmount(amount+creditAmount+debitAmount+formulaAmount);
financialStatementAmounts.setLabel(financialStatement.getLabel());
financialStatementAmounts.setProvisionDeprecationAmount(provisionDeprecationAmount);
financialStatementAmounts.setLevel(
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-06-23 16:26:43 UTC (rev 2946)
@@ -145,7 +145,7 @@
<JMenuItem text="lima.reports.entrybooks" onActionPerformed='getHandler().showEntryBookReports(this)'/>
<JMenuItem text="lima.reports.balance" onActionPerformed='getHandler().showBalanceView(this)'/>
<JMenuItem text="lima.reports.ledger" onActionPerformed='getHandler().showLedgerView(this)'/>
- <JMenuItem text="lima.financialstatementreports" onActionPerformed='getHandler().showFinancialStatementReportsView(this)' actionIcon='rapport'/>
+ <JMenuItem text="lima.reports.financialstatement" onActionPerformed='getHandler().showFinancialStatementReportsView(this)' actionIcon='rapport'/>
</JMenu>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -70,10 +70,10 @@
String res = null;
switch (column) {
case 0:
- res = _("lima.account.number");
+ res = _("lima.table.number");
break;
case 1:
- res = _("lima.account.label");
+ res = _("lima.table.label");
break;
}
return res;
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -103,22 +103,22 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.transaction.column.date"); //Date
+ res = _("lima.table.date"); //Date
break;
case 1:
- res = _("lima.transaction.column.entrybook"); //EntryBook
+ res = _("lima.table.entrybook"); //EntryBook
break;
case 2:
- res = _("lima.transaction.column.voucher"); // Voucher
+ res = _("lima.table.voucher"); // Voucher
break;
case 3:
- res = _("lima.transaction.column.description"); //Description
+ res = _("lima.table.description"); //Description
break;
case 4:
- res = _("lima.transaction.column.debit"); //Debit
+ res = _("lima.table.debit"); //Debit
break;
case 5:
- res = _("lima.transaction.column.credit"); //Credit
+ res = _("lima.table.credit"); //Credit
break;
}
return res;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -92,22 +92,22 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.account.number"); // Numero de compte
+ res = _("lima.table.number"); // Numero de compte
break;
case 1:
- res = _("lima.account.label"); // Label
+ res = _("lima.table.label"); // Label
break;
case 2:
- res = _("lima.balance.move.debit"); // Total Debit
+ res = _("lima.table.move.debit"); // Total Debit
break;
case 3:
- res = _("lima.balance.move.credit"); // Total Credit
+ res = _("lima.table.move.credit"); // Total Credit
break;
case 4:
- res = _("lima.balance.solde.debit"); //Solde Debit
+ res = _("lima.table.solde.debit"); //Solde Debit
break;
case 5:
- res = _("lima.balance.solde.credit"); //Solde Credit
+ res = _("lima.table.solde.credit"); //Solde Credit
break;
}
return res;
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -80,13 +80,13 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.entrybook.code");
+ res = _("lima.table.code");
break;
case 1:
- res = _("lima.entrybook.label");
+ res = _("lima.table.label");
break;
case 2:
- res = _("lima.entrybook.type");
+ res = _("lima.table.type");
break;
}
return res;
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -102,22 +102,22 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.transaction.column.date"); //Date
+ res = _("lima.table.date"); //Date
break;
case 1:
- res = _("lima.transaction.column.account"); //Account
+ res = _("lima.table.account"); //Account
break;
case 2:
- res = _("lima.transaction.column.voucher"); // Voucher
+ res = _("lima.table.voucher"); // Voucher
break;
case 3:
- res = _("lima.transaction.column.description"); //Description
+ res = _("lima.table.description"); //Description
break;
case 4:
- res = _("lima.transaction.column.debit"); //Debit
+ res = _("lima.table.debit"); //Debit
break;
case 5:
- res = _("lima.transaction.column.credit"); //Credit
+ res = _("lima.table.credit"); //Credit
break;
}
return res;
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -82,13 +82,13 @@
switch(columnIndex) {
case 0 :
- result = _("lima.model.period");
+ result = _("lima.table.period");
break;
case 1:
- result = _("lima.entrybook");
+ result = _("lima.table.entrybook");
break;
case 2:
- result = _("lima.closure");
+ result = _("lima.table.closure");
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -69,7 +69,7 @@
String res = null;
switch (column) {
case 0:
- res = _("lima.account.label");
+ res = _("lima.table.label");
break;
}
return res;
@@ -195,7 +195,7 @@
/**
- * Update financialStatementHeader.
+ * Update financialStatement
*
* @param path
* @param account
@@ -210,7 +210,7 @@
/**
- * Remove financialStatementHeader or financialStatementMovement
+ * Remove financialStatement
*
* @param path
* @param object
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -48,11 +48,7 @@
private static final Log log = LogFactory.getLog(FinancialStatementChartViewHandler.class);
protected FinancialStatementChartView view;
-
- protected JXTreeTable treeTable;
-
- protected FinancialStatementChartTreeTableModel treeTableModel;
-
+
protected FinancialStatementChartViewHandler(FinancialStatementChartView view) {
this.view = view;
}
@@ -61,10 +57,10 @@
* Add new account with account form.
*/
public void addFinancialStatementHeader() {
- treeTable = view.getTreeTable();
- treeTableModel =
- (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
+ JXTreeTable treeTable = view.getTreeTable();
+ FinancialStatementChartTreeTableModel treeTableModel = (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
+
FinancialStatement newFinancialStatementHeader = new FinancialStatementImpl();
FinancialStatementHeaderForm financialStatementHeaderForm = new FinancialStatementHeaderForm(view);
financialStatementHeaderForm.setFinancialStatement(newFinancialStatementHeader);
@@ -107,9 +103,8 @@
public void addFinancialStatementMovement(){
- treeTable = view.getTreeTable();
- treeTableModel =
- (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
+ JXTreeTable treeTable = view.getTreeTable();
+ FinancialStatementChartTreeTableModel treeTableModel = (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
FinancialStatement newFinancialStatementMovement = new FinancialStatementImpl();
FinancialStatementMovementForm financialStatementMovementForm = new FinancialStatementMovementForm(view);
@@ -151,9 +146,8 @@
*/
public void updateFinancialStatement() {
- treeTable = view.getTreeTable();
- treeTableModel =
- (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
+ JXTreeTable treeTable = view.getTreeTable();
+ FinancialStatementChartTreeTableModel treeTableModel = (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
// get selected account
int selectedRow = view.treeTable.getSelectedRow();
@@ -207,9 +201,8 @@
* Ask for user to remove for selected account, and remove it if confirmed.
*/
public void removeFinancialStatement() {
- treeTable = view.getTreeTable();
- treeTableModel =
- (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
+ JXTreeTable treeTable = view.getTreeTable();
+ FinancialStatementChartTreeTableModel treeTableModel = (FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
// Any row selected
int selectedRow = view.treeTable.getSelectedRow();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx 2010-06-23 16:26:43 UTC (rev 2946)
@@ -86,6 +86,17 @@
onRemoveUpdate='getFinancialStatement().setProvisionDeprecationAccounts(getProvisionDeprecationAccountsTextField().getText())' />
</cell>
</row>
+ <row>
+ <cell fill="horizontal">
+ <JLabel text="lima.financialstatement.formula"/>
+ </cell>
+ <cell fill="horizontal">
+ <JTextField id="formulaTextField" text="{getFinancialStatement().getFormula()}"/>
+ <javax.swing.text.Document javaBean="getFormulaTextField().getDocument()"
+ onInsertUpdate='getFinancialStatement().setFormula(getFormulaTextField().getText())'
+ onRemoveUpdate='getFinancialStatement().setFormula(getFormulaTextField().getText())' />
+ </cell>
+ </row>
<row>
<cell fill="none">
<JButton text="lima.common.ok" onActionPerformed="dispose()"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -27,6 +27,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.beans.FinancialStatementAmounts;
import org.chorem.lima.business.FinancialPeriodService;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
@@ -66,7 +67,7 @@
//highlight financial financial transactions
colorTitle1();
- // addTitle2();
+ colorTitle2();
//Renderer for font
FinancialStatementReportTableCellRenderer renderer = new FinancialStatementReportTableCellRenderer();
@@ -77,7 +78,7 @@
}
/*
- * Color the background row in grey if the month number is even (pair in french)
+ * Color the background row in grey if the level is 1
*/
protected void colorTitle1() {
@@ -87,11 +88,10 @@
public boolean isHighlighted(Component renderer,
ComponentAdapter adapter) {
Boolean result = false;
- FinancialStatement financialStatementHeader = new FinancialStatementImpl();
Object object = model.getElementAt(adapter.row);
- if (model.getElementAt(adapter.row) instanceof FinancialStatement){
- financialStatementHeader = (FinancialStatement) object;
- result = financialStatementHeader.getLevel() == 1;
+ if (model.getElementAt(adapter.row) instanceof FinancialStatementAmounts){
+ FinancialStatementAmounts financialStatementAmounts = (FinancialStatementAmounts) object;
+ result = financialStatementAmounts.getLevel() == 1;
}
return result;
}
@@ -102,32 +102,27 @@
}
/*
- * Color the font in red if period are closed
+ * Color the background in light grey if is a subamount
*/
- protected void addTitle2() {
- /* HighlightPredicate predicate = new HighlightPredicate() {
- @Override
- public boolean isHighlighted(Component renderer,
- ComponentAdapter adapter) {
- ClosedPeriodicEntryBook closedPeriodicEntryBook =
- new ClosedPeriodicEntryBookImpl();
- ClosedPeriodicEntryBook selectedClosedPeriodicEntryBook =
- (ClosedPeriodicEntryBook) model.getElementAt(adapter.row);
- // true if locked
- try {
- closedPeriodicEntryBook =
- financialPeriodService.getClosedPeriodicEntryBook(
- selectedClosedPeriodicEntryBook.getEntryBook(),
- selectedClosedPeriodicEntryBook.getFinancialPeriod());
- } catch (LimaException eee) {
- log.debug("Can't get closePeriodicEntryBook",eee);
- }
- return (closedPeriodicEntryBook.getLocked());
- }
- };
- colorTransaction =
- new ColorHighlighter(predicate, null, new Color(222,0,0));
- addHighlighter(colorTransaction);*/
- }
+ protected void colorTitle2() {
+
+
+ HighlightPredicate predicate = new HighlightPredicate() {
+ @Override
+ public boolean isHighlighted(Component renderer,
+ ComponentAdapter adapter) {
+ Boolean result = false;
+ Object object = model.getElementAt(adapter.row);
+ if (model.getElementAt(adapter.row) instanceof FinancialStatementAmounts){
+ FinancialStatementAmounts financialStatementAmounts = (FinancialStatementAmounts) object;
+ result = financialStatementAmounts.getSubAmount();
+ }
+ return result;
+ }
+ };
+ colorTransaction =
+ new ColorHighlighter(predicate, new Color(244,244,244), null);
+ addHighlighter(colorTransaction);
+ }
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableCellRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableCellRenderer.java 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableCellRenderer.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -46,32 +46,24 @@
table, value, isSelected, hasFocus, row, column);
// Si le bilan est un soustotal, alors la ligne est en gras
- if (object instanceof FinancialStatement){
- FinancialStatement financialStatementHeader = (FinancialStatement) object;
+ if (object instanceof FinancialStatementAmounts){
+ FinancialStatementAmounts financialStatementAmounts = (FinancialStatementAmounts) object;
- if (financialStatementHeader.getLevel() == 1)
+ if (financialStatementAmounts.getLevel() == 1)
{
setFont(new Font("Verdana", Font.BOLD, 14));
}
- if (financialStatementHeader.getLevel() == 2)
+ if (financialStatementAmounts.getHeader())
{
setFont(new Font("Verdana", Font.BOLD, 12));
}
- }
- else {
-
- if (column == 0){
- cell.setFont(new Font("Verdana", Font.ITALIC, 12));
- }
- if (object instanceof FinancialStatementAmounts){
- if (((FinancialStatementAmounts) object).getHeader()){
- cell.setFont(new Font("Verdana", Font.BOLD, 12));
+ if (!financialStatementAmounts.getHeader() && !financialStatementAmounts.getSubAmount()){
+ if (column == 0){
+ cell.setFont(new Font("Verdana", Font.ITALIC, 12));
}
- }
-
+ }
}
-
// Alignement des cellules
/* switch (column) {
case 0:
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -64,9 +64,6 @@
/** DatePicker EndDate. */
protected Date selectedEndDate;
- /** Text field Accounts */
- protected String selectedAccounts;
-
/** data cache */
protected List<FinancialStatementAmounts> cacheDataList;
@@ -121,48 +118,44 @@
public Object getValueAt(int row, int column) {
Object result = cacheDataList.get(row);
//get entries for the period for the current row
- if (result instanceof FinancialStatement) {
- FinancialStatement currentRow = (FinancialStatement) result;
- switch (column) {
- case 0:
- result = "";
- for (int i = 0; i < currentRow.getLevel(); i++) {
- result = result+"\t";
- }
- result = result+currentRow.getLabel();
- break;
- case 1:
- result = null;
- break;
- case 2:
- result = null;
- break;
- case 3:
- result = null;
- break;
- }
-
- }
- else {
+ if (result instanceof FinancialStatementAmounts) {
FinancialStatementAmounts currentRow = (FinancialStatementAmounts) result;
Double grossAmount = currentRow.getGrossAmount();
Double provisionDeprecationAmount = currentRow.getProvisionDeprecationAmount();
switch (column) {
- case 0:
+ case 0:
result = "";
- for (int i = 0; i <= currentRow.getLevel(); i++) {
- result = result+"\t";
- }
- result = result+currentRow.getLabel();
+ String label = currentRow.getLabel();
+ if ( label != null){
+ for (int i = 0; i <= currentRow.getLevel(); i++) {
+ result = result+"\t";
+ }
+ result = result+label;
+ }
break;
case 1:
- result = grossAmount;
+ if (grossAmount == 0){
+ result = null;
+ }
+ else {
+ result = grossAmount;
+ }
break;
case 2:
- result = provisionDeprecationAmount;
+ if (provisionDeprecationAmount == 0){
+ result = null;
+ }
+ else {
+ result = provisionDeprecationAmount;
+ }
break;
case 3:
- result = grossAmount-provisionDeprecationAmount;
+ if (grossAmount-provisionDeprecationAmount == 0){
+ result = null;
+ }
+ else {
+ result = grossAmount-provisionDeprecationAmount;
+ }
break;
}
}
@@ -185,10 +178,6 @@
selectedEndDate = date;
}
- public void setAccountFilter(String accounts) {
- selectedAccounts = accounts;
- }
-
/**
* get all account fot the selected period
* @return
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-06-23 16:26:43 UTC (rev 2946)
@@ -68,21 +68,14 @@
onActionPerformed="getModelTable().setEndDate(endDatePicker.getDate());
getHandler().refresh()"/>
</cell>
- <cell anchor="east">
- <JTextField id="accountFilter"/>
- </cell>
- <cell anchor="west">
- <JButton text="lima.accountsreports.accountfilter"
- onActionPerformed="getModelTable().setAccountFilter(accountFilter.getText());
- getHandler().refresh()"/>
- </cell>
</row>
<row>
<cell fill="both" weightx="1" weighty="1" columns="7">
<JScrollPane>
- <org.jdesktop.swingx.JXTable id="table" rowHeight="24"
- model="{getModelTable()}"
- selectionMode="{ListSelectionModel.SINGLE_SELECTION}"/>
+ <org.chorem.lima.ui.financialstatementreport.FinancialStatementReportTable id="table" rowHeight="24"
+ constructorParams="getHandler()"
+ model="{getModelTable()}"
+ selectionMode="{ListSelectionModel.SINGLE_SELECTION}"/>
<javax.swing.ListSelectionModel javaBean="getTable().getSelectionModel()"/>
</JScrollPane>
</cell>
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -186,31 +186,31 @@
switch (column) {
case 0:
- result = _("lima.transaction.column.date");
+ result = _("lima.table.date");
break;
case 1:
- result = _("lima.transaction.column.entrybook");
+ result = _("lima.table.entrybook");
break;
case 2:
- result = _("lima.transaction.column.voucher");
+ result = _("lima.table.voucher");
break;
case 3:
- result = _("lima.transaction.column.account");
+ result = _("lima.table.account");
break;
case 4:
- result = _("lima.transaction.column.description");
+ result = _("lima.table.description");
break;
case 5:
- result = _("lima.transaction.column.position");
+ result = _("lima.table.position");
break;
case 6:
- result = _("lima.transaction.column.debit");
+ result = _("lima.table.debit");
break;
case 7:
- result = _("lima.transaction.column.credit");
+ result = _("lima.table.credit");
break;
case 8:
- result = _("lima.transaction.column.balance");
+ result = _("lima.table.balance");
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -168,31 +168,31 @@
switch (column) {
case 0:
- result = _("lima.transaction.column.date");
+ result = _("lima.table.date");
break;
case 1:
- result = _("lima.transaction.column.entrybook");
+ result = _("lima.table.entrybook");
break;
case 2:
- result = _("lima.transaction.column.voucher");
+ result = _("lima.table.voucher");
break;
case 3:
- result = _("lima.transaction.column.account");
+ result = _("lima.table.account");
break;
case 4:
- result = _("lima.transaction.column.description");
+ result = _("lima.table.description");
break;
case 5:
- result = _("lima.transaction.column.position");
+ result = _("lima.table.position");
break;
case 6:
- result = _("lima.transaction.column.debit");
+ result = _("lima.table.debit");
break;
case 7:
- result = _("lima.transaction.column.credit");
+ result = _("lima.table.credit");
break;
case 8:
- result = _("lima.transaction.column.balance");
+ result = _("lima.table.balance");
break;
}
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -93,10 +93,10 @@
switch(columnIndex) {
case 0 :
- result = _("lima.tab.fiscalperiod");
+ result = _("lima.table.fiscalperiod");
break;
case 1:
- result = _("lima.closure");
+ result = _("lima.table.closure");
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2010-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2010-06-23 16:26:43 UTC (rev 2946)
@@ -107,28 +107,28 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.transaction.column.account"); //Account
+ res = _("lima.table.account"); //Account
break;
case 1:
- res = _("lima.transaction.column.date"); //Date
+ res = _("lima.table.date"); //Date
break;
case 2:
- res = _("lima.transaction.column.entrybook");
+ res = _("lima.table.entrybook");
break;
case 3:
- res = _("lima.transaction.column.voucher"); // Voucher
+ res = _("lima.table.voucher"); // Voucher
break;
case 4:
- res = _("lima.transaction.column.description"); //Description
+ res = _("lima.table.description"); //Description
break;
case 5:
- res = _("lima.transaction.column.debit"); //Debit
+ res = _("lima.table.debit"); //Debit
break;
case 6:
- res = _("lima.transaction.column.credit"); //Credit
+ res = _("lima.table.credit"); //Credit
break;
case 7:
- res = _("lima.transaction.column.solde");
+ res = _("lima.table.solde");
break;
}
return res;
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-06-23 16:26:43 UTC (rev 2946)
@@ -168,6 +168,7 @@
lima.financialstatement.accounts=
lima.financialstatement.creditaccounts=
lima.financialstatement.debitaccounts=
+lima.financialstatement.formula=
lima.financialstatement.header=
lima.financialstatement.header.add=
lima.financialstatement.label=
@@ -352,10 +353,30 @@
lima.tab.search.result=Search result
lima.tab.subledgers=
lima.tab.transaction=Transaction
+lima.table.account=
+lima.table.balance=
+lima.table.closure=
+lima.table.code=
+lima.table.credit=
+lima.table.date=
+lima.table.debit=
+lima.table.description=
+lima.table.entrybook=
+lima.table.fiscalperiod=
lima.table.grossamount=
lima.table.label=
+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.title=Lutin Invoice Monitoring and Accounting
lima.title.about=About Lima...
lima.to=To
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-06-22 11:34:43 UTC (rev 2945)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-06-23 16:26:43 UTC (rev 2946)
@@ -13,9 +13,9 @@
calendarPanel\ TODO=
lima.about.message=\u00C0 propos de Lima
lima.account=Compte
-lima.account.label=Libell\u00E9
+lima.account.label=
lima.account.menu=Plan de comptes
-lima.account.number=Num\u00E9ro du compte
+lima.account.number=
lima.account.parentnumber=
lima.account.type=Type de compte
lima.account.type1=Actif
@@ -43,12 +43,6 @@
lima.amountcredit=Total Cr\u00E9dit
lima.amountdebit=Total D\u00E9bit
lima.any.criteria=Au moins un crit\u00E8re correspond
-lima.balance.account.libelle=Libell\u00E9
-lima.balance.account.number=N\u00B0 de compte
-lima.balance.move.credit=Mouvement au cr\u00E9dit
-lima.balance.move.debit=Mouvement au d\u00E9bit
-lima.balance.solde.credit=Solde cr\u00E9dit
-lima.balance.solde.debit=Solde d\u00E9bit
lima.balance.total=Total
lima.bilan=Bilan
lima.bilan.actif=Actif
@@ -62,10 +56,9 @@
lima.charts.account=Plan comptable
lima.charts.entrybook=Journaux
lima.charts.financialperiod=P\u00E9riodes comptables
-lima.charts.financialstatement=
+lima.charts.financialstatement=Plan BCR
lima.charts.fiscalyear=Exercices
lima.close=Ferm\u00E9
-lima.closure=Cloture
lima.closure.period.begin=P\u00E9riode de
lima.closure.timespan.warning=Attention \: lorsque la p\u00E9riode est bloqu\u00E9e, il n'est plus possible d'ajouter, modifier et supprimer les entr\u00E9es comptables sur cette p\u00E9riode.
lima.common.add=Ajout Compte G\u00E9n\u00E9ral
@@ -111,9 +104,9 @@
lima.entries.searchunbalancedtransaction=Entr\u00E9es non \u00E9quilibr\u00E9es
lima.entrybook=Journal
lima.entrybook.add=Ajouter un journal
-lima.entrybook.code=Code
-lima.entrybook.label=Libelle
-lima.entrybook.type=Type
+lima.entrybook.code=
+lima.entrybook.label=
+lima.entrybook.type=
lima.entrybook.type1=Achats
lima.entrybook.type2=Ventes
lima.entrybook.type3=Tr\u00E9sorerie
@@ -163,17 +156,15 @@
lima.filter.starts.with=Commence par
lima.financialperiod.block=Cloturer une p\u00E9riode
lima.financialperiod.management=
-lima.financialstatement.accounts=
-lima.financialstatement.creditaccounts=
-lima.financialstatement.debitaccounts=
-lima.financialstatement.header=
-lima.financialstatement.header.add=Regrouprement
-lima.financialstatement.label=
-lima.financialstatement.movement.add=
-lima.financialstatement.provisiondeprecationaccounts=
-lima.financialstatement.style=
-lima.financialstatement.subamount=
-lima.financialstatementreports=
+lima.financialstatement.accounts=Liste de comptes au cr\u00E9dit et au d\u00E9bit
+lima.financialstatement.creditaccounts=Liste de comptes au cr\u00E9dit
+lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
+lima.financialstatement.formula=Formule de compte, ex \: '7'-'6'+'510-520'
+lima.financialstatement.header.add=Ajouter une cat\u00E9gorie
+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.find.transaction=Rechercher transaction
lima.fiscalperiod.addFiscalPeriod=Nouvel exercice
lima.fiscalperiod.block=Cloturer un exercice
@@ -292,7 +283,7 @@
lima.reports.accounts=Edition compte
lima.reports.balance=Balance
lima.reports.entrybooks=Edition journal
-lima.reports.financialstatement=
+lima.reports.financialstatement=Bilan et Compte de r\u00E9sultat
lima.reports.ledger=Grand Livre
lima.response.no=Non
lima.response.yes=Oui
@@ -321,28 +312,37 @@
lima.subledger.type=
lima.success=Succ\u00E8s
lima.tab.bilan=
-lima.tab.fiscalperiod=
+lima.tab.fiscalperiod=Exercice
lima.tab.home=Accueil
lima.tab.reports=
lima.tab.result=
-lima.table.grossamount=
-lima.table.label=
-lima.table.netamount=
-lima.table.provisiondeprecationamount=
+lima.table.account=Compte
+lima.table.balance=Balance
+lima.table.closure=Cloture
+lima.table.code=Code
+lima.table.credit=Cr\u00E9dit
+lima.table.date=Date
+lima.table.debit=D\u00E9bit
+lima.table.description=Description
+lima.table.entrybook=Journal
+lima.table.fiscalperiod=Exercice
+lima.table.grossamount=Brut
+lima.table.label=Libell\u00E9
+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.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.to=A
-lima.transaction.column.account=Compte
-lima.transaction.column.balance=Balance
-lima.transaction.column.credit=Cr\u00E9dit
-lima.transaction.column.date=Date
-lima.transaction.column.debit=D\u00E9bit
-lima.transaction.column.description=Description
-lima.transaction.column.entrybook=Journal
-lima.transaction.column.period=P\u00E9riode
-lima.transaction.column.position=Statut
-lima.transaction.column.solde=Solde
-lima.transaction.column.voucher=Pi\u00E8ce comptable
lima.transaction.confirmdelete=
lima.transaction.entrybook=Journal
lima.transaction.period=P\u00E9riode
1
0