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
August 2010
- 3 participants
- 42 discussions
Author: echatellier
Date: 2010-08-27 16:05:13 +0200 (Fri, 27 Aug 2010)
New Revision: 3021
Url: http://chorem.org/repositories/revision/lima/3021
Log:
Add third party file
Added:
trunk/lima-swing/src/license/
trunk/lima-swing/src/license/THIRD-PARTY.properties
Added: trunk/lima-swing/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-swing/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/lima-swing/src/license/THIRD-PARTY.properties 2010-08-27 14:05:13 UTC (rev 3021)
@@ -0,0 +1,48 @@
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache 2
+# - Apache License Version 2.0
+# - Apache License, Version 2.0
+# - Apache Software License - Version 2.0
+# - Apache Software License 2.0
+# - BSD
+# - Bouncy Castle Licence
+# - Bouncy Castle License
+# - CPL
+# - Common Development and Distribution License (CDDL) v1.0
+# - Common Public License Version 1.0
+# - Eclipse Public License - Version 1.0
+# - GNU Lesser General Public License
+# - General Public License (GPL)
+# - HSQLDB License
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - MIT License
+# - Mozilla Public License
+# - Public Domain
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - The OpenSymphony Software License 1.1
+# - dom4j
+# - http://asm.ow2.org/license.html
+# - http://www.apache.org/licenses/LICENSE-2.0.txt
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Aug 27 15:06:50 CEST 2010
+antlr--antlr--2.7.6=ANTLR 2 License
+com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
+commons-jxpath--commons-jxpath--1.3=Apache Software License, Version 2.0
+commons-net--commons-net--2.0=Apache Software License, Version 2.0
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+javassist--javassist--3.8.0.GA=GNU Lesser General Public License
+javax.mail--mail--1.4.1=License Agreement for JavaMail(TM) API
+javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
+opensymphony--ognl--2.6.11=OpenSymphony Software License, Version 1.1
+org.apache.commons--commons-email--1.2=Apache Software License, Version 2.0
+org.codehaus.swizzle--swizzle-stream--1.0.1=Apache Software License, Version 2.0
+org.jdom--jdom--1.1=JDom license
+org.osgi--org.osgi.core--4.1.0=Apache Software License, Version 2.0
+quartz--quartz--1.5.2=Apache Software License, Version 2.0
1
0
Author: jpepin
Date: 2010-08-26 00:04:25 +0200 (Thu, 26 Aug 2010)
New Revision: 3020
Url: http://chorem.org/repositories/revision/lima/3020
Log:
Ajout fonction de lettrage.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -513,7 +513,7 @@
nextLine[2] = entry.getDescription();
nextLine[3] = entry.getAmount().toString();
nextLine[4] = Boolean.toString(entry.getDebit());
- nextLine[5] = entry.getLettering();
+ nextLine[5] = entry.getLetter().getCode();
nextLine[6] = entry.getDetail();
nextLine[7] = entry.getVoucher();
nextLine[8] = entry.getPosition();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -41,6 +41,9 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialPeriodDAO;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.entity.LetterDAO;
+import org.chorem.lima.entity.LetterImpl;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionDAO;
@@ -86,7 +89,6 @@
public void createFinancialTransactionWithTransaction(
FinancialTransaction financialtransaction, TopiaContext topiaContext)
throws LimaException {
- log.debug(financialtransaction);
try {
//check if the financial period is blocked
accountingRules.checkFinancialPeriodBlockedWithFinancialTransaction(
@@ -149,7 +151,6 @@
String financialPeriodProperty = TopiaQuery.getProperty(FinancialTransaction.FINANCIAL_PERIOD);
String entryBookLabelProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY_BOOK);
- String accountProperty = TopiaQuery.getProperty(FinancialTransaction.ENTRY, Entry.ACCOUNT);
// filter with topia query
TopiaQuery query = transactionDAO.createQuery("T");
@@ -166,7 +167,9 @@
//load for lazy
.addLoad(financialPeriodProperty)
.addLoad(entryBookLabelProperty)
- .addFetch("T."+accountProperty);
+ .addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true)
+ .addFetch("E."+Entry.ACCOUNT)
+ .addFetch("E."+Entry.LETTER);
financialTransactions = transactionDAO.findAllByQuery(query);
}
catch (TopiaException ex) {
@@ -501,7 +504,7 @@
entryOld.setVoucher(entry.getVoucher());
entryOld.setFinancialTransaction(entry.getFinancialTransaction());
entryOld.setPosition(entry.getPosition());
- entryOld.setLettering(entry.getLettering());
+ entryOld.setLetter(entry.getLetter());
//calculate financial transaction amounts
FinancialTransaction financialTransaction =
@@ -589,9 +592,158 @@
}
+ /**
+ * Get letter from count of existing letter
+ * 1 -> A, 2 -> B, 26 -> Z, 27 -> AA, 28 -> AB, ...
+ */
+ @Override
+ public Letter getNewLetter() throws LimaException {
+ Letter letter = new LetterImpl();
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ int n = letterDAO.count()+1;
+ String res = numberToString(n, null);
+
+ //if already exist
+ while (letterDAO.findByCode(res) != null){
+ res = numberToString(n++, null);
+ }
+ letter.setCode(res);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ return letter;
+ }
+ public static String numberToString(int n, StringBuffer result){
+ if (result == null){
+ result = new StringBuffer();
+ }
+ int mod = (n-1) % 26;
+ int div = (n-1) / 26;
+ if (div > 0){
+ result.append(numberToString(div, result));
+ }
+ return (result.append((char) (mod+65))).toString();
+ }
+
+ @Override
+ public void createLetter(Letter letter) throws LimaException {
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ createLetterWithTransaction(letter, topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+ public void createLetterWithTransaction(Letter letter, TopiaContext topiaContext) throws LimaException {
+ try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letterDAO.create(letter);
+ commitTransaction(topiaContext);
+ } catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ }
- @Override
+ @Override
+ public void removeLetter(Letter letter) throws LimaException {
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letterDAO.delete(letter);
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+
+ @Override
+ public List<Letter> getAllLetters() throws LimaException {
+ List<Letter> letters = null;
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letters = letterDAO.findAll();
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ return letters;
+ }
+
+
+
+ @Override
+ public void setEntryLetter(Entry entry, Letter letter) throws LimaException {
+
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ Letter letterOld = letterDAO.findByCode(letter.getCode());
+ if (letterOld == null){
+ createLetterWithTransaction(letter, topiaContext);
+ letterOld = letter;
+ }
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ Entry entryOld = entryDAO.findByTopiaId(entry.getTopiaId());
+ entryOld.setLetter(letterOld);
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+
+
+ @Override
+ public void removeEntryLetter(Entry entry) throws LimaException {
+
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ Entry entryOld = entryDAO.findByTopiaId(entry.getTopiaId());
+ entryOld.setLetter(null);
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ }
+
+ @Override
public List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException {
List<Object> result = new ArrayList<Object>();
List<FinancialTransaction> financialTransactions = null;
@@ -627,9 +779,9 @@
if (description != null){
query.addWhere("E.description", Op.LIKE, "%"+description+"%");
}
- String letter = financialTransactionSearch.getLetter();
+ Letter letter = financialTransactionSearch.getLetter();
if (letter != null){
- query.addWhere("E.lettering", Op.LIKE, "%"+letter+"%");
+ query.addEquals("E.letter", letter);
}
Account account = financialTransactionSearch.getAccount();
String accountsList = financialTransactionSearch.getAccountList();
@@ -688,7 +840,7 @@
TopiaQuery query2 = entryDAO.createQuery();
query2.addEquals(Entry.FINANCIAL_TRANSACTION, financialTransaction);
//Load for lazy
- query2.addLoad(Entry.ACCOUNT);
+ query2.addLoad(Entry.ACCOUNT, Entry.LETTER);
List<Entry> entries = entryDAO.findAllByQuery(query2);
result.addAll(entries);
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -95,6 +95,9 @@
import org.chorem.lima.entity.FiscalPeriodImpl;
import org.chorem.lima.entity.Identity;
import org.chorem.lima.entity.IdentityImpl;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.entity.LetterDAO;
+import org.chorem.lima.entity.LetterImpl;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
@@ -175,17 +178,17 @@
strat.setColumnMapping(csvReader.readNext());
// check if file have a good header
- List<String> headAccount = new ArrayList<String>();
- headAccount.add("Journal");
- headAccount.add("Compte");
- headAccount.add("DatEcr");
- headAccount.add("Piece");
- headAccount.add("Libelle");
- headAccount.add("Debit");
- headAccount.add("Credit");
- headAccount.add("Lettre");
+ List<String> headEntry = new ArrayList<String>();
+ headEntry.add("Journal");
+ headEntry.add("Compte");
+ headEntry.add("DatEcr");
+ headEntry.add("Piece");
+ headEntry.add("Libelle");
+ headEntry.add("Debit");
+ headEntry.add("Credit");
+ headEntry.add("Lettre");
if (!Arrays.asList(strat.getColumnMapping()).containsAll(
- headAccount)) {
+ headEntry)) {
throw new LimaBusinessException(
_("lima-business.import.ebpnoentry"));
}
@@ -197,6 +200,7 @@
// DAOs
AccountDAO accountDAO = LimaCallaoDAOHelper
.getAccountDAO(topiaContext);
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllUnblockedFiscalPeriods();
@@ -244,12 +248,15 @@
entry.setAmount(debit);
}
entry.setDescription(entryEBP.getLibelle());
- entry.setLettering(entryEBP.getLettre());
entry.setVoucher(entryEBP.getPiece());
+
+ Letter letter = createLetter(
+ entryEBP.getLettre(), topiaContext);
+ entry.setLetter(letter);
+
String entryBookCode = entryEBP.getJournal();
EntryBook entryBook = entryBookDAO
.findByCode(entryBookCode);
-
// if entrybook not exist create it !
if (entryBook == null) {
entryBook = new EntryBookImpl();
@@ -685,7 +692,36 @@
}
return result.toString();
}
+
+
+ /**
+ * Import and create Letter : TYPE | Code
+ */
+ public String importLetterCSV(String[] nextLine,
+ TopiaContext topiaContext) throws LimaException {
+ StringBuffer result = new StringBuffer();
+ try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+
+ Letter letter = new LetterImpl();
+ String code = nextLine[1];
+ letter.setCode(code);
+
+ // if exist, skip
+ if (letterDAO.findByCode(code) != null) {
+ result.append(_("lima-business.import.letteralreadyexist", code));
+ } else {
+ // create it
+ financialTransactionService.createLetter(letter);
+ result.append(_("lima-business.import.letteradded",code));
+ }
+ } catch (TopiaException eeeTE) {
+ doCatch(topiaContext, eeeTE, log);
+ }
+ return result.toString();
+ }
+
/**
* Import and create closedperiodicentrybook import Structure : TYPE |
* BeginDate | EndDate | Locked
@@ -927,6 +963,26 @@
return result.toString();
}
+
+ /**
+ * Dynamic letter creation used by CSV and EBP Import
+ */
+ public Letter createLetter(String letterCode, TopiaContext topiaContext) throws LimaException{
+ Letter letter = null;
+ try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
+ letter = letterDAO.findByCode(letterCode);
+ // if letter not exist create it !
+ if (letter == null) {
+ letter = new LetterImpl();
+ letter.setCode(letterCode);
+ }
+ } catch (TopiaException eeeTE) {
+ doCatch(topiaContext, eeeTE, log);
+ }
+ return letter;
+ }
+
public String createAccounts(Map<String, AccountImport> accounts,
TopiaContext topiaContext) throws LimaException {
StringBuffer result = new StringBuffer();
@@ -1037,6 +1093,7 @@
throws LimaException {
StringBuffer result = new StringBuffer();
try {
+ LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
EntryBookDAO entryBookDAO = LimaCallaoDAOHelper
.getEntryBookDAO(topiaContext);
EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
@@ -1080,7 +1137,11 @@
entry.setDescription(entryImport.getDescription());
entry.setAmount(new BigDecimal(entryImport.getAmount()));
entry.setDebit(Boolean.parseBoolean(entryImport.getDebit()));
- entry.setLettering(entryImport.getLettering());
+
+ Letter letter = createLetter(
+ entryImport.getLettering(), topiaContext);
+ entry.setLetter(letter);
+
entry.setDetail(entryImport.getDetail());
entry.setVoucher(entryImport.getVoucher());
entry.setPosition(entryImport.getPosition());
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -198,12 +198,11 @@
TopiaQuery entriesQuery =
createEntryQuery(account, beginDate, endDate, entryDAO, queryAlias);
//IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- entriesQuery.addLoad(Entry.FINANCIAL_TRANSACTION);
- entriesQuery.addLoad(Entry.ACCOUNT);
String loadEntryBookProperty =
TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION,
FinancialTransaction.ENTRY_BOOK);
- entriesQuery.addLoad(loadEntryBookProperty);
+ entriesQuery.addLoad(Entry.ACCOUNT, Entry.FINANCIAL_TRANSACTION, Entry.LETTER)
+ .addLoad(loadEntryBookProperty);
reportsDatas.setListEntry(entryDAO.findAllByQuery(entriesQuery));
TopiaQuery amountsQuery =
@@ -348,7 +347,7 @@
TopiaQuery entriesQuery = createEntryBookReportsQuery(
entryBook, beginDate, endDate, entryDAO, "E");
//IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- entriesQuery.addLoad(Entry.ACCOUNT, Entry.FINANCIAL_TRANSACTION);
+ entriesQuery.addLoad(Entry.ACCOUNT, Entry.FINANCIAL_TRANSACTION, Entry.LETTER);
String orderDateProperty =
TopiaQuery.getProperty("E", Entry.FINANCIAL_TRANSACTION, FinancialTransaction.TRANSACTION_DATE);
String orderIdProperty =
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -28,6 +28,7 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
/**
* Transaction service.
@@ -51,6 +52,13 @@
* @return all transaction for entry book and period
* @throws LimaException
*/
+
+ void createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
List<FinancialTransaction> getAllFinancialTransactionsForFinancialPeriod(
FinancialPeriod period) throws LimaException;
@@ -60,13 +68,9 @@
List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod) throws LimaException;
+ List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
- void createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
- void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
- void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
/**
* Methodes for create, update and remove the entry
* @param entry
@@ -79,5 +83,23 @@
void removeEntry(Entry entry) throws LimaException;
- List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
+
+ /**
+ * Methodes for create, update and remove the letter
+ * @param entry
+ * @throws LimaException
+ */
+
+ Letter getNewLetter() throws LimaException;
+
+ void createLetter(Letter letter) throws LimaException;
+
+ void removeLetter(Letter letter) throws LimaException;
+
+ List<Letter> getAllLetters() throws LimaException;
+
+ void setEntryLetter(Entry entry, Letter letter) throws LimaException;
+
+ void removeEntryLetter(Entry entry) throws LimaException;
+
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -52,6 +52,8 @@
lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
+lima-business.import.letteradded=SUCCESS \: The letter %s - %s is created \! \n
+lima-business.import.letteralreadyexist=FAILED \: The letter %s already exists \!\n
lima-business.import.noaccount=ERROR \: This file contains no account
lima-business.import.nofiscalperiodopen=FAILED \: No Fiscal period open \! \n
lima-business.import.transactionadded=SUCCES \: FinancialTransaction, %s - %s, added\n
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -52,6 +52,8 @@
lima-business.import.fiscalperiodadded=Succ\u00E8s \: Exercice %s - %s ajout\u00E9e \! \n
lima-business.import.fiscalperiodalreadyexist=u00C9chec \: L'exerice %s - %s existe d\u00E9j\u00E0 \!\n
lima-business.import.identityadded=Succ\u00E8s \: Identit\u00E9 %s ajout\u00E9e \! \n
+lima-business.import.letteradded=Succ\u00E8s \: ajout\u00E9e \! \n
+lima-business.import.letteralreadyexist=u00C9chec \: La lettre %s existe d\u00E9j\u00E0 \!\n
lima-business.import.noaccount=Erreur \: Ce fichier ne contient aucun compte.
lima-business.import.nofiscalperiodopen=u00C9chec \: Aucun exercice ouvert \! \n
lima-business.import.transactionadded=Succ\u00E8s \: Transaction, %s, %s, ajout\u00E9e\n
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Added: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxLetterEnum.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,60 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.enums;
+
+import static org.nuiton.i18n.I18n._;
+
+
+public enum ComboBoxLetterEnum {
+
+ ALL(_("lima.enum.comboboxletter.all")),
+ SELECT_ONE(_("lima.enum.comboboxletter.selectone"));
+
+ private final String description;
+
+ private ComboBoxLetterEnum(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public static String[] descriptions(){
+ int nbElts = ComboBoxLetterEnum.values().length;
+ String[] descriptions = new String[nbElts];
+ ComboBoxLetterEnum[] enums = ComboBoxLetterEnum.values();
+ for (int i = 0; i < nbElts; i++) {
+ descriptions[i] = enums[i].getDescription();
+ }
+ return descriptions;
+ }
+
+ public static ComboBoxLetterEnum valueOfDescription(String description){
+ ComboBoxLetterEnum value = null;
+
+ for (ComboBoxLetterEnum enums : ComboBoxLetterEnum.values()) {
+ if (description.equals(enums.description)){
+ value = enums;
+ break;
+ }
+ }
+ return value;
+ }
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -160,10 +160,8 @@
actionIcon='entries-unbalanced'/>
<JMenuItem text="lima.entries.searchtransaction" onActionPerformed='getHandler().showTransactionSearchView(this)'
actionIcon='entries-search'/>
- <!-- Menu prévu pour le lettrage automatique
<JMenuItem text="lima.entries.lettering" onActionPerformed='getHandler().showLetteringView(this)'
actionIcon='lettering'/>
- -->
</JMenu>
<JMenu text="lima.reports" mnemonic="{'R'}">
<JMenuItem text="lima.reports.accounts" onActionPerformed='getHandler().showAccountReports(this)'
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -46,6 +46,7 @@
import org.chorem.lima.ui.identity.IdentityForm;
import org.chorem.lima.ui.importexport.ImportExport;
import org.chorem.lima.ui.ledger.LedgerView;
+import org.chorem.lima.ui.lettering.LetteringView;
import org.chorem.lima.util.ErrorHelper;
/**
@@ -377,6 +378,12 @@
mainView.showTab(_("lima.entries.searchtransaction"), searchView);
}
+ public void showLetteringView(JAXXContext rootContext){
+ MainView mainView = getUI(rootContext);
+ LetteringView letteringView = new LetteringView(mainView);
+ mainView.showTab(_("lima.entries.lettering"), letteringView);
+ }
+
public void showBalanceView(JAXXContext rootContext) {
MainView mainView = getUI(rootContext);
BalanceView balanceView = new BalanceView(mainView);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -27,6 +27,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
import org.chorem.lima.ui.combobox.AccountComboBoxModel;
+import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -1,49 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.ui.accountsreports;
-
-import java.awt.Component;
-
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JLabel;
-import javax.swing.JList;
-
-import org.chorem.lima.entity.Account;
-
-public class AccountRenderer extends DefaultListCellRenderer {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
-
- JLabel label = new JLabel();
- Account account = (Account) value;
- if (account != null){
- String accountLabel = account.getLabel();
- int nbChars = 30;
- if (accountLabel.length()>nbChars){
- accountLabel = accountLabel.substring(0, nbChars)+"…";
- }
- label.setText(account.getAccountNumber() +" - " + accountLabel);
- }
- return label;
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -82,9 +82,12 @@
res = _("lima.table.description"); //Description
break;
case 5:
+ res = _("lima.table.letter"); //Letter
+ break;
+ case 6:
res = _("lima.table.debit"); //Debit
break;
- case 6:
+ case 7:
res = _("lima.table.credit"); //Credit
break;
}
@@ -122,9 +125,17 @@
result = currentRow.getDescription();
break;
case 5:
+ if (currentRow.getLetter() != null){
+ result = currentRow.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 6:
result = currentRow.getDebit() ? currentRow.getAmount() : 0;
break;
- case 6:
+ case 7:
result = currentRow.getDebit() ? 0 : currentRow.getAmount();
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -42,7 +42,7 @@
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <JTextField id='balanceFilter' toolTipText="lima.tooltip.filter" minimumSize='{balanceFilter.getPreferredSize()}'/>
<javax.swing.text.Document javaBean="balanceFilter.getDocument()"
onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -34,7 +34,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.ui.accountsreports.AccountRenderer;
+import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.ui.combobox.SubAccountComboBoxModel;
import org.chorem.lima.util.AccountToString;
import org.chorem.lima.widgets.JWideComboBox;
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,146 @@
+/*
+ * *##% Lima Main
+ * Copyright (C) 2008 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*
+ */
+
+package org.chorem.lima.ui.celleditor;
+
+import java.awt.Component;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.SwingUtilities;
+import javax.swing.table.TableCellEditor;
+import javax.swing.text.JTextComponent;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.ui.combobox.LetterComboBoxModel;
+import org.chorem.lima.ui.combobox.LetterRenderer;
+import org.chorem.lima.util.LetterToString;
+import org.chorem.lima.widgets.JWideComboBox;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class LetterTableCellEditor extends AbstractCellEditor implements TableCellEditor, KeyListener {
+
+ protected static final Log log = LogFactory.getLog(EntryBookTableCellEditor.class);
+ private final JWideComboBox comboBox;
+ private static final long serialVersionUID = 1L;
+ private static LetterTableCellEditor editor;
+ private static LetterComboBoxModel comboBoxModel;
+ private static boolean keyPressed = false;
+
+ /**
+ * constructor
+ */
+ public LetterTableCellEditor() {
+ super();
+ comboBox = new JWideComboBox();
+ comboBoxModel = new LetterComboBoxModel();
+ comboBox.setModel(comboBoxModel);
+ LetterRenderer renderer = new LetterRenderer();
+ comboBox.setRenderer(renderer);
+ AutoCompleteDecorator.decorate(comboBox, LetterToString.getInstance());
+ comboBox.getEditor().getEditorComponent().addKeyListener(this);
+ }
+
+ @Override
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
+ if (value instanceof Account){
+ comboBox.setSelectedItem((Account) value);
+ }
+ return comboBox;
+ }
+
+ @Override
+ public Object getCellEditorValue() {
+ return comboBox.getSelectedItem();
+ }
+
+ /**
+ * Vérifie si la cellule peut être éditable :
+ * seulement si il y a une frappe au clavier ou un double clic.
+ * @param evt
+ * @return
+ */
+ @Override
+ public boolean isCellEditable(EventObject evt) {
+ // Si il y a une frappe au clavier
+ if (evt instanceof KeyEvent) {
+ final KeyEvent keyEvent = (KeyEvent) evt;
+ // Empèche la touche echap
+ if ( keyEvent.getKeyChar() != KeyEvent.VK_ESCAPE){
+ // Permet de placer le focus sur l'editor de la comboBox
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ comboBox.getEditor().getEditorComponent().requestFocus();
+ JTextComponent edit = (JTextComponent) comboBox.getEditor().getEditorComponent();
+ if (!Character.isIdentifierIgnorable(keyEvent.getKeyChar()))
+ {
+ edit.setText(Character.toString(keyEvent.getKeyChar()));
+ }
+ }
+ });
+ }
+ }
+ keyPressed = false;
+ return ( !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2 );
+ }
+
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+
+ // Vérifie si c'est la première frappe au clavier
+ if ( keyPressed == false )
+ {
+ // Récupère l'editor de la comboBox
+ JTextComponent edit = (JTextComponent) comboBox.getEditor().getEditorComponent();
+ // Met en place le curseur et la selection après la première lettre
+ edit.select(1, edit.getText().length());
+ keyPressed = true;
+ }
+
+ // delegate popup list menu
+ if ( e.getKeyChar() == KeyEvent.VK_ENTER )
+ {
+ fireEditingStopped();
+ }
+ }
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+
+ }
+
+ public static LetterTableCellEditor getInstance() {
+ if (editor == null) {
+ editor = new LetterTableCellEditor();
+ }
+ return editor;
+ }
+
+}
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java (from rev 2999, trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountRenderer.java)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,49 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.combobox;
+
+import java.awt.Component;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JLabel;
+import javax.swing.JList;
+
+import org.chorem.lima.entity.Account;
+
+public class AccountRenderer extends DefaultListCellRenderer {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+
+ JLabel label = new JLabel();
+ Account account = (Account) value;
+ if (account != null){
+ String accountLabel = account.getLabel();
+ int nbChars = 30;
+ if (accountLabel.length()>nbChars){
+ accountLabel = accountLabel.substring(0, nbChars)+"…";
+ }
+ label.setText(account.getAccountNumber() +" - " + accountLabel);
+ }
+ return label;
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,110 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.combobox;
+
+import java.util.List;
+import javax.swing.AbstractListModel;
+import javax.swing.ComboBoxModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.ImportServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel;
+
+/**
+ * Account combo box model.
+ */
+
+public class LetterComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(FinancialPeriodTableModel.class);
+
+ protected Object selectedAccount;
+
+ protected List<Letter> datasCache;
+
+ protected FinancialTransactionServiceMonitorable service;
+
+ public LetterComboBoxModel () {
+ service =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ service.addListener(this);
+ LimaServiceFactory.getInstance().getService(
+ ImportServiceMonitorable.class).addListener(this);
+ datasCache = getDataList();
+ }
+
+ @Override
+ public Object getSelectedItem() {
+ return selectedAccount;
+ }
+
+ @Override
+ public void setSelectedItem(Object anItem) {
+ selectedAccount = anItem;
+ fireContentsChanged(this, -1, -1);
+ }
+
+
+ @Override
+ public Object getElementAt(int index) {
+ return datasCache.get(index);
+ }
+
+ @Override
+ public int getSize() {
+ return datasCache.size();
+ }
+
+ public List<Letter> getDataList(){
+ List<Letter> result = null;
+ try {
+ result = service.getAllLetters();
+ }
+ catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't get list letters", eee);
+ }
+ }
+ return result;
+
+ }
+
+ public void refresh(){
+ datasCache = getDataList();
+ fireContentsChanged(this, 0, datasCache.size());
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if (methodeName.contains("Letter") || methodeName.contains("importAll")){
+ refresh();
+ }
+ }
+
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterRenderer.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,42 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.combobox;
+
+import java.awt.Component;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import org.chorem.lima.entity.Letter;
+
+public class LetterRenderer extends DefaultListCellRenderer {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+
+ JLabel label = new JLabel();
+ Letter letter = (Letter) value;
+ if (letter != null){
+ label.setText(letter.getCode());
+ }
+ return label;
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -65,23 +65,26 @@
String res = "n/a";
switch (column) {
case 0:
- res = _("lima.table.date"); //Date
+ res = _("lima.table.date");
break;
case 1:
- res = _("lima.table.account"); //Account
+ res = _("lima.table.account");
break;
case 2:
- res = _("lima.table.voucher"); // Voucher
+ res = _("lima.table.voucher");
break;
case 3:
- res = _("lima.table.description"); //Description
+ res = _("lima.table.description");
break;
case 4:
- res = _("lima.table.debit"); //Debit
- break;
+ res = _("lima.table.letter");
+ break;
case 5:
- res = _("lima.table.credit"); //Credit
+ res = _("lima.table.debit");
break;
+ case 6:
+ res = _("lima.table.credit");
+ break;
}
return res;
}
@@ -114,9 +117,17 @@
result = currentRow.getDescription();
break;
case 4:
+ if (currentRow.getLetter() != null){
+ result = currentRow.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 5:
result = currentRow.getDebit() ? currentRow.getAmount() : 0;
break;
- case 5:
+ case 6:
result = currentRow.getDebit() ? 0 : currentRow.getAmount();
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -20,22 +20,14 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import javax.swing.JComboBox;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.ui.combobox.EntryBookComboBoxModel;
-import org.chorem.lima.ui.combobox.EntryBookRenderer;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.util.EntryBookToString;
-import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
public class FinancialPeriodComboBox extends JComboBox implements ActionListener {
private static final long serialVersionUID = 1L;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -43,6 +43,7 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -159,7 +160,7 @@
result = String.class;
break;
case 5:
- result = String.class;
+ result = Letter.class;
break;
case 6:
result = BigDecimal.class;
@@ -297,8 +298,13 @@
result = currentEntry.getDescription();
break;
case 5 :
- result = currentEntry.getLettering();
- break;
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
case 6:
result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
@@ -495,7 +501,7 @@
currentEntry.setDescription((String)value);
break;
case 5 :
- currentEntry.setLettering((String)value);
+ currentEntry.setLetter((Letter)value);
break;
case 6:
currentEntry.setAmount((BigDecimal)value);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -26,8 +26,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.ui.accountsreports.AccountRenderer;
import org.chorem.lima.ui.combobox.AccountComboBoxModel;
+import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -18,6 +18,7 @@
package org.chorem.lima.ui.financialtransactionsearch;
+import static org.nuiton.i18n.I18n._;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JPanel;
@@ -55,6 +56,7 @@
case ACCOUNT_LIST:
final JTextField accountsList = new JTextField(16);
accountsList.setMinimumSize(accountsList.getPreferredSize());
+ accountsList.setToolTipText(_("lima.tooltip.filter"));
KeyListener accountsListKeyListener = new KeyListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -35,6 +35,7 @@
import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -158,7 +159,7 @@
result = BigDecimal.class;
break;
case 8:
- result = String.class;
+ result = Letter.class;
break;
}
@@ -295,8 +296,13 @@
result = null;
break;
case 8:
- result = currentEntry.getLettering();
- break;
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
}
}
@@ -409,7 +415,7 @@
currentEntry.setDebit(false);
break;
case 8:
- currentEntry.setLettering((String)value);
+ currentEntry.setLetter((Letter)value);
break;
}
try {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -24,12 +24,14 @@
import org.chorem.lima.enums.ComboBoxPeriodEnum;
import org.chorem.lima.enums.ComboBoxAccountsEnum;
import org.chorem.lima.enums.ComboBoxEntryBooksEnum;
+ import org.chorem.lima.enums.ComboBoxLetterEnum;
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.enums.ComboBoxOperatorsEnum;
AccountSearchPanel accountSearchPanel = new AccountSearchPanel(handler);
AmountSearchPanel amountSearchPanel = new AmountSearchPanel(handler);
EntryBookSearchPanel entryBookSearchPanel = new EntryBookSearchPanel(handler);
+ LetterSearchPanel letterSearchPanel = new LetterSearchPanel(handler);
FinancialTransactionPeriodSearchPanel periodSearchPanel = new FinancialTransactionPeriodSearchPanel(handler);
void $afterCompleteSetup() {
@@ -64,12 +66,10 @@
onInsertUpdate='handler.setDescription(description.getText())'
onRemoveUpdate='handler.setDescription(description.getText())' />
</cell>
- <cell><JLabel text="lima.table.letter"/></cell>
- <cell><JTextField id='letter' minimumSize='{letter.getPreferredSize()}'/>
- <javax.swing.text.Document javaBean="letter.getDocument()"
- onInsertUpdate='handler.setLetter(letter.getText())'
- onRemoveUpdate='handler.setLetter(letter.getText())' />
- </cell>
+ <cell><JComboBox id="letterComboBox" javaBean="new JComboBox(ComboBoxLetterEnum.descriptions())"
+ onActionPerformed="letterSearchPanel.refresh(ComboBoxLetterEnum.valueOfDescription((String) letterComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><LetterSearchPanel javaBean="letterSearchPanel"/></cell>
</row></Table></cell>
</row>
<row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -28,6 +28,7 @@
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
@@ -97,12 +98,8 @@
financialTransactionSearch.setDescription(result);
}
- public void setLetter(String letter){
- String result = null;
- if (!letter.equals("")){
- result = letter;
- }
- financialTransactionSearch.setLetter(result);
+ public void setLetter(Letter letter){
+ financialTransactionSearch.setLetter(letter);
}
public String getAccountsList(){
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,87 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.ui.combobox.LetterComboBoxModel;
+import org.chorem.lima.ui.combobox.LetterRenderer;
+import org.chorem.lima.util.LetterToString;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class LetterSearchComboBox extends JComboBox implements KeyListener, ActionListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(LetterSearchComboBox.class);
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public LetterSearchComboBox(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+ LetterComboBoxModel letterComboBoxModel = new LetterComboBoxModel();
+ LetterRenderer letterRenderer = new LetterRenderer();
+ setModel(letterComboBoxModel);
+ setRenderer(letterRenderer);
+ setEditable(true);
+ AutoCompleteDecorator.decorate(this, LetterToString.getInstance());
+ this.getEditor().getEditorComponent().addKeyListener(this);
+ this.addActionListener(this);
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof Letter){
+ handler.setLetter((Letter) this.getSelectedItem());
+ }
+ }
+
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof Letter){
+ handler.setLetter((Letter) this.getSelectedItem());
+ }
+ // delegate popup list menu
+ if ( e.getKeyChar() == KeyEvent.VK_ENTER )
+ {
+ firePopupMenuCanceled();
+ }
+ }
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,53 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import javax.swing.JPanel;
+import org.chorem.lima.enums.ComboBoxLetterEnum;
+
+public class LetterSearchPanel extends JPanel {
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public LetterSearchPanel(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxLetterEnum comboBoxEnum){
+
+ switch (comboBoxEnum) {
+ case ALL:
+ handler.setLetter(null);
+ handler.refresh();
+ this.removeAll();
+ break;
+
+ case SELECT_ONE:
+ LetterSearchComboBox comboBox = new LetterSearchComboBox(handler);
+ this.removeAll();
+ this.add(comboBox);
+ break;
+
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -37,6 +37,7 @@
import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -160,7 +161,7 @@
result = BigDecimal.class;
break;
case 8:
- result = String.class;
+ result = Letter.class;
break;
}
@@ -297,8 +298,13 @@
result = null;
break;
case 8:
- result = currentEntry.getLettering();
- break;
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
}
}
@@ -411,7 +417,7 @@
currentEntry.setDebit(false);
break;
case 8:
- currentEntry.setLettering((String)value);
+ currentEntry.setLetter((Letter)value);
break;
}
try {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -41,7 +41,7 @@
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <JTextField id='balanceFilter' toolTipText="lima.tooltip.filter" minimumSize='{balanceFilter.getPreferredSize()}'/>
<javax.swing.text.Document javaBean="balanceFilter.getDocument()"
onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,57 @@
+<!-- ##% Lima Swing
+ Copyright (C) 2008 - 2010 CodeLutin
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ##% -->
+
+<JDialog modal="true">
+ <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/>
+ <Boolean id="validOk" javaBean='true'/>
+
+ <script>
+ <![CDATA[
+
+ getRootPane().setDefaultButton(ok);
+ protected void performCancel() {
+ setValidOk(false);
+ dispose();
+ }
+ ]]>
+ </script>
+
+ <Table>
+ <row fill="horizontal">
+ <cell>
+ <JRadioButton id="newLetter" text='lima.entries.lettering.radiobutton.new' value='{true}' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+ <cell><JTextField editable="false" visible="{newLetter.isSelected()}" id='newLetterTextField' /></cell>
+ </row>
+ <row>
+ <cell>
+ <JRadioButton id="listLetter" text='lima.entries.lettering.radiobutton.list' value='{false}' buttonGroup="{getRadioButtons()}"
+ selected='true'/>
+ </cell>
+ <cell><JComboBox id='LetterListComboBox' visible="{listLetter.isSelected()}" javaBean="new LetterComboBox()"/></cell>
+ </row>
+ <row>
+ <cell fill="none">
+ <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/>
+ </cell>
+ <cell fill="none">
+ <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/>
+ </cell>
+ </row>
+ </Table>
+</JDialog>
\ No newline at end of file
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,47 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.ui.combobox.LetterComboBoxModel;
+import org.chorem.lima.ui.combobox.LetterRenderer;
+import org.chorem.lima.util.LetterToString;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class LetterComboBox extends JComboBox {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(LetterComboBox.class);
+
+
+ public LetterComboBox() {
+
+ LetterComboBoxModel letterComboBoxModel = new LetterComboBoxModel();
+ LetterRenderer letterRenderer = new LetterRenderer();
+ setModel(letterComboBoxModel);
+ setRenderer(letterRenderer);
+ setEditable(true);
+ AutoCompleteDecorator.decorate(this, LetterToString.getInstance());
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringFinancialPeriodComboBox.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,82 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+
+
+public class LetteringFinancialPeriodComboBox extends JComboBox implements ActionListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(LetteringFinancialPeriodComboBox.class);
+
+ protected LetteringViewHandler handler;
+
+ public LetteringFinancialPeriodComboBox(LetteringViewHandler handler) {
+ this.handler = handler;
+
+ FinancialPeriodComboBoxModel comboBoxModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer comboBoxRenderer = new FinancialPeriodComboBoxRenderer();
+
+ setModel(comboBoxModel);
+ setRenderer(comboBoxRenderer);
+ addActionListener(this);
+
+ }
+
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.setSelectedItem(this.getItemAt(row-1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.setSelectedItem(this.getItemAt(row+1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof FinancialPeriod){
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,174 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import static org.nuiton.i18n.I18n._;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
+import org.chorem.lima.ui.celleditor.DateTableCellEditor;
+import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
+import org.chorem.lima.ui.celleditor.LetterTableCellEditor;
+import org.jdesktop.swingx.JXTable;
+import org.jdesktop.swingx.decorator.ColorHighlighter;
+import org.jdesktop.swingx.decorator.ComponentAdapter;
+import org.jdesktop.swingx.decorator.HighlightPredicate;
+import org.jdesktop.swingx.decorator.Highlighter;
+
+
+/**
+ * Table des transaction qui ajoute des comportement (keys).
+ *
+ * @author jpepin
+ */
+public class LetteringTable extends JXTable implements KeyListener {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3133690382049594727L;
+
+ /** log. */
+ private static final Log log = LogFactory
+ .getLog(LetteringTable.class);
+
+ protected LetteringViewHandler handler;
+
+ private Highlighter colorTransaction;
+
+ private ColorHighlighter colorBalance;
+
+ public LetteringTable(LetteringViewHandler handler) {
+
+ this.handler = handler;
+
+ addKeyListener(this);
+
+ //Get new date editor
+ setDefaultEditor(Date.class, new DateTableCellEditor());
+ //Get new entry book editor
+ setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor());
+ //Get new account editor
+ setDefaultEditor(Account.class, new AccountTableCellEditor());
+ //Get new letter editor
+ setDefaultEditor(Letter.class, new LetterTableCellEditor());
+
+ //highlight financial financial transactions
+ addColorTransaction();
+ // highlight unbalanced financial transactions
+ addColorNonBalancedTransaction();
+
+
+ }
+
+ /**
+ * Cette méthode permet de colorer toutes les transactions dans le tableau
+ * afin de bien distinguer les transactions et entrées comptables.
+ * On récupère la première cellule, on vérifie que c'est une date
+ */
+ protected void addColorTransaction() {
+ if (colorTransaction != null) {
+ removeHighlighter(colorTransaction);
+ }
+ HighlightPredicate predicate = new HighlightPredicate() {
+ @Override
+ public boolean isHighlighted(Component renderer,
+ ComponentAdapter adapter) {
+ return adapter.getValueAt(adapter.row, 0) instanceof Date;
+ }
+ };
+ colorTransaction =
+ new ColorHighlighter(predicate, new Color(222,222,222), null);
+ addHighlighter(colorTransaction);
+ }
+
+
+
+ /**
+ * Permet de surligner une transaction dans le tableau lorsque
+ * cette dernière n'est pas équilibrée.
+ * On récupère la dernière cellule de la ligne
+ * et on vérifie si la valeur est différente de 0
+ */
+ protected void addColorNonBalancedTransaction() {
+ if (colorBalance != null) {
+ removeHighlighter(colorBalance);
+ }
+ HighlightPredicate predicate = new HighlightPredicate() {
+ @Override
+ public boolean isHighlighted(Component renderer,
+ ComponentAdapter adapter) {
+ boolean isHighlighted = false;
+ Object value = adapter.getValueAt(adapter.row, 8);
+ if (value instanceof BigDecimal) {
+ BigDecimal currentBalance = (BigDecimal) value;
+ if (currentBalance.doubleValue() != 0) {
+ isHighlighted = true;
+ }
+ }
+ return isHighlighted;
+ }
+ };
+ colorTransaction =
+ new ColorHighlighter(predicate, new Color(255, 198, 209), null);
+ addHighlighter(colorTransaction);
+ }
+
+ /**
+ * for each action combination key are think
+ * for extend keyboard and laptop keyboard
+ */
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+
+ // add letter with the key combination : ctrl + L
+ if (e.getKeyCode() == KeyEvent.VK_L
+ && e.getModifiers() == KeyEvent.CTRL_MASK) {
+ handler.addLetter();
+ }
+
+ }
+
+
+ @Override
+ public void keyTyped(KeyEvent e) {
+
+ }
+
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+
+ }
+
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,415 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import static org.nuiton.i18n.I18n._;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import javax.swing.table.AbstractTableModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.ImportServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.business.utils.EntryComparator;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.Entry;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.util.DialogHelper;
+import org.chorem.lima.util.ErrorHelper;
+
+
+/**
+ * Basic transaction table model.
+ *
+ * Le modele est filtré sur {@link #selectedEntryBook} et
+ * {@link #selectedFinancialPeriod} (montée en charge !).
+ *
+ * @author ore
+ * @author chatellier
+ * @version $Revision: 2897 $
+ *
+ * Last update : $Date: 2010-05-14 13:22:26 +0200 (ven. 14 mai 2010) $
+ * By : $Author: jpepin $
+ */
+public class LetteringTableModel extends AbstractTableModel implements ServiceListener{
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 1L;
+
+ /** log. */
+ private static final Log log = LogFactory
+ .getLog(LetteringTableModel.class);
+
+ /** Transaction service. */
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
+
+ /** selected financial period */
+ protected FinancialPeriod selectedFinancialPeriod;
+
+ /** data cache */
+ protected List<Object> cacheDataList;
+
+ /** collection
+
+
+ /**
+ * Model constructor.
+ *
+ * Just init service proxies.
+ */
+ public LetteringTableModel() {
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
+ LimaServiceFactory.getInstance().getService(
+ ImportServiceMonitorable.class).addListener(this);
+ }
+
+ /**
+ * Le model est une combinaison de Transaction/Entries.
+ *
+ *
+ * @return
+ */
+ protected List<Object> getDataList() {
+ List<Object> results = new ArrayList<Object>();
+ if (selectedFinancialPeriod != null){
+ try {
+ List<FinancialTransaction> financialtransactions =
+ financialTransactionService.getAllFinancialTransactionsForFinancialPeriod(
+ selectedFinancialPeriod);
+ for (FinancialTransaction financialtransaction : financialtransactions) {
+ results.add(financialtransaction);
+ List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
+ Collections.sort(entries, new EntryComparator());
+ results.addAll(entries);
+ }
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't update model", eee);
+ }
+ ErrorHelper.showErrorDialog("Can't get transaction list", eee);
+ }
+ }
+ return results;
+ }
+
+ public void setLetter(int row, Letter letter){
+ try {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof Entry){
+ Entry entry = (Entry) currentRow;
+ financialTransactionService.setEntryLetter(entry, letter);
+ }
+ } catch (LimaException eee) {
+ log.error("Can't set letter", eee);
+ }
+ }
+
+ public void removeLetter(int row){
+ try {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof Entry){
+ Entry entry = (Entry) currentRow;
+ financialTransactionService.removeEntryLetter(entry);
+ }
+ } catch (LimaException eee) {
+ log.error("Can't remove letter", eee);
+ }
+ }
+
+ public void refresh(){
+ cacheDataList = getDataList();
+ fireTableDataChanged();
+ }
+
+ @Override
+ public int getColumnCount() {
+ return 9;
+ }
+
+ @Override
+ public Class<?> getColumnClass(int column) {
+
+ Class<?> result = null;
+
+ switch (column) {
+ case 0:
+ result = Date.class;
+ break;
+ case 1:
+ result = EntryBook.class;
+ break;
+ case 2:
+ result = String.class;
+ break;
+ case 3:
+ result = Account.class;
+ break;
+ case 4:
+ result = String.class;
+ break;
+ case 5:
+ result = Letter.class;
+ break;
+ case 6:
+ result = BigDecimal.class;
+ break;
+ case 7:
+ result = BigDecimal.class;
+ break;
+ case 8:
+ result = BigDecimal.class;
+ break;
+ }
+
+ return result;
+ }
+
+
+
+ @Override
+ public String getColumnName(int column) {
+ String result = "n/a";
+
+ switch (column) {
+ case 0:
+ result = _("lima.table.date");
+ break;
+ case 1:
+ result = _("lima.table.entrybook");
+ break;
+ case 2:
+ result = _("lima.table.voucher");
+ break;
+ case 3:
+ result = _("lima.table.account");
+ break;
+ case 4:
+ result = _("lima.table.description");
+ break;
+ case 5:
+ result = _("lima.table.letter");
+ break;
+ case 6:
+ result = _("lima.table.debit");
+ break;
+ case 7:
+ result = _("lima.table.credit");
+ break;
+ case 8:
+ result = _("lima.table.balance");
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public int getRowCount() {
+ int result = 0;
+
+ if (cacheDataList != null) {
+ result = cacheDataList.size();
+ }
+
+ return result;
+ }
+
+ @Override
+ public Object getValueAt(int row, int column) {
+ Object result = null;
+
+ // just prevent too much result
+ if (cacheDataList != null) {
+ result = cacheDataList.get(row);
+
+ if (result instanceof FinancialTransaction) {
+ FinancialTransaction currentRow = (FinancialTransaction)result;
+ BigDecimal amountDebit = currentRow.getAmountDebit();
+ BigDecimal amountCredit = currentRow.getAmountCredit();
+
+ switch (column) {
+ case 0:
+ result = currentRow.getTransactionDate();
+ break;
+ case 1:
+ if (currentRow.getEntryBook() != null){
+ result = currentRow.getEntryBook().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 2:
+ result = null; //voucher
+ break;
+ case 3:
+ result = null; // account
+ break;
+ case 4:
+ result = null; // description
+ break;
+ case 5 :
+ result = null; // letter
+ break;
+ case 6:
+ result = amountDebit;
+ break;
+ case 7:
+ result = amountCredit;
+ break;
+ case 8:
+ result = amountDebit.subtract(amountCredit);
+ break;
+ }
+ }
+ else if (result instanceof Entry) {
+ Entry currentEntry = (Entry)result;
+ switch (column) {
+ case 0:
+ result = null; // date
+ break;
+ case 1 : // entry book
+ result = null;
+ break;
+ case 2:
+ result = currentEntry.getVoucher();
+ break;
+ case 3: // account
+ if (currentEntry.getAccount() != null){
+ result = currentEntry.getAccount().getAccountNumber();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 4:
+ result = currentEntry.getDescription();
+ break;
+ case 5 :
+ if (currentEntry.getLetter() != null){
+ result = currentEntry.getLetter().getCode();
+ }
+ else {
+ result = null;
+ }
+ break;
+ case 6:
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
+ break;
+ case 7:
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
+ break;
+ case 8:
+ result = null;
+ break;
+ }
+
+ }
+ }
+ return result;
+ }
+
+
+ public void setFinancialPeriod(FinancialPeriod financialPeriod){
+ selectedFinancialPeriod = financialPeriod;
+ refresh();
+ }
+
+ /**
+ * To set cells editable or not
+ * different condition for entry or financial transaction
+ */
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex) {
+ boolean editableCell=false;
+ Object currentRow = cacheDataList.get(rowIndex);
+ // cells editable for the entry row, all cells exclude the date
+ if ((currentRow instanceof Entry) && ((columnIndex==5))) {
+ editableCell=true;
+ }
+ return editableCell; }
+
+
+
+ public Object getElementAt(int row){
+ Object result = null;
+ if (cacheDataList != null){
+ result = cacheDataList.get(row);
+ }
+ return result;
+ }
+
+
+ /**
+ * to modifiy letter entry
+ */
+ @Override
+ public void setValueAt(Object value, int row, int column) {
+ int financialTransactionRow = 0;
+ if (cacheDataList != null) {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ switch (column) {
+ case 5 :
+ currentEntry.setLetter((Letter)value);
+ break;
+ }
+ try {
+ financialTransactionService.updateEntry(currentEntry);
+
+ } catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.error("Can't update entry", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ //update the financial transaction in entire
+ financialTransactionRow =
+ getDataList().indexOf(((Entry) currentRow).
+ getFinancialTransaction());
+ }
+ //on recharge la liste
+ cacheDataList = getDataList();
+ fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);
+ }
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if (serviceName.contains("FinancialTransaction") || methodeName.contains("importEntries") || methodeName.contains("importAll")){
+ refresh();
+ }
+ }
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,90 @@
+<!-- ##% Lima Swing
+ Copyright (C) 2008 - 2010 CodeLutin
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ##% -->
+
+<Table>
+ <LetteringViewHandler id="handler" javaBean="new LetteringViewHandler(this)" />
+ <Boolean id="selectedRow" javaBean="false" />
+ <org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel id="modelFinancialPeriod"/>
+ <org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel id="modelFiscalPeriod"/>
+ <script>
+ <![CDATA[
+ import org.chorem.lima.entity.FiscalPeriod;
+ import org.chorem.lima.entity.FinancialPeriod;
+ import org.chorem.lima.ui.lettering.LetteringFinancialPeriodComboBox;
+
+ LetteringFinancialPeriodComboBox financialPeriodComboBox = new LetteringFinancialPeriodComboBox(handler);
+
+
+ void $afterCompleteSetup() {
+ getHandler().refresh();
+ }
+
+ ]]>
+ </script>
+
+ <row weightx="1" weighty="0" anchor="center">
+ <cell anchor="east">
+ <JLabel id="fiscalPeriodLabel" text="lima.charts.fiscalyear"/>
+ </cell>
+ <cell anchor="west">
+ <JComboBox id="fiscalPeriodComboBox"
+ model="{getModelFiscalPeriod()}"
+ renderer="{new org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer()}"
+ onActionPerformed="getModelFinancialPeriod().setFiscalPeriod( (FiscalPeriod) fiscalPeriodComboBox.getSelectedItem());
+ getHandler().refresh()"
+ editable="false"/>
+ </cell>
+ <cell anchor="east">
+ <JLabel id="financialPeriodLabel" text="lima.common.period"
+ />
+ </cell>
+ <cell anchor="west">
+ <JComboBox javaBean="financialPeriodComboBox"/>
+ </cell>
+ <cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="financialPeriodComboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="financialPeriodComboBox.next()"/>
+ </cell>
+ <cell>
+ <JButton text="lima.entries.lettering.add"
+ onActionPerformed="handler.addLetter()" toolTipText="lima.tooltip.lettering" enabled="{isSelectedRow()}"/>
+ </cell>
+ <cell>
+ <JButton text="lima.entries.lettering.remove"
+ onActionPerformed="handler.removeLetter()" enabled="{isSelectedRow()}"/>
+ </cell>
+
+ </row>
+ <row>
+ <cell fill="both" weightx="1" weighty="1" rows="3" columns="11">
+ <JScrollPane>
+ <org.chorem.lima.ui.lettering.LetteringTableModel
+ id="tableModel"/>
+ <org.chorem.lima.ui.lettering.LetteringTable
+ id="table" sortable="false" rowHeight="22"
+ constructorParams="getHandler()" model="{getTableModel()}"
+ selectionMode="{ListSelectionModel.MULTIPLE_INTERVAL_SELECTION }" />
+ <javax.swing.ListSelectionModel javaBean="getTable().getSelectionModel()"
+ onValueChanged="setSelectedRow(table.getSelectedRow() != -1)"/>
+ </JScrollPane>
+ </cell>
+ </row>
+</Table>
\ No newline at end of file
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,138 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.lettering;
+
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Letter;
+import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.util.DialogHelper;
+
+
+/**
+ * Handler associated with financial transaction view.
+ *
+ * @author chatellier
+ * @version $Revision: 3015 $
+ *
+ * Last update : $Date: 2010-08-23 18:38:53 +0200 (lun., 23 août 2010) $
+ * By : $Author: jpepin $
+ */
+public class LetteringViewHandler {
+
+ /** log. */
+ private static final Log log =
+ LogFactory.getLog(LetteringViewHandler.class);
+
+ protected LetteringView view;
+
+ protected LetteringTable table;
+
+ protected LetteringTableModel tableModel;
+
+ protected FiscalPeriodComboBoxModel fiscalPeriodComboBoxModel;
+
+ protected FinancialPeriodComboBoxModel financialPeriodComboBoxModel;
+
+ /** Transaction service. */
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
+
+ protected Object clipBoard;
+
+ protected LetteringViewHandler(LetteringView view) {
+ this.view = view;
+
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ }
+
+
+
+ public void addLetter(){
+ Letter letter = null;
+ Boolean valid = true;
+
+ table = view.getTable();
+ tableModel = view.getTableModel();
+
+ AddLetterForm addLetterForm = new AddLetterForm();
+ JTextField newLetterTextField = addLetterForm.getNewLetterTextField();
+
+ try {
+ letter = financialTransactionService.getNewLetter();
+ newLetterTextField.setText(letter.getCode());
+ } catch (LimaException eee) {
+ log.error("Can't get new letter", eee);
+ }
+
+ addLetterForm.setLocationRelativeTo(view);
+ addLetterForm.setVisible(true);
+
+ //false = cancel Action
+ if (addLetterForm.validOk){
+ Object object = addLetterForm.getRadioButtons().getSelectedValue();
+ if (!(Boolean) object){
+ JComboBox comboBox = addLetterForm.getLetterListComboBox();
+ Object selectedObject = comboBox.getSelectedItem();
+ if (selectedObject instanceof Letter){
+ letter = (Letter) selectedObject;
+ }
+ else {
+ DialogHelper.showMessageDialog(_("lima.entries.lettering.noletterselected"));
+ valid = false;
+ }
+ }
+ if (valid){
+ //addLetters
+ int[] rows = table.getSelectedRows();
+ for (int i : rows) {
+ tableModel.setLetter(i, letter);
+ }
+ tableModel.refresh();
+ }
+ }
+ }
+
+ public void removeLetter(){
+
+ table = view.getTable();
+ tableModel = view.getTableModel();
+
+ //removeLetters
+ int[] rows = table.getSelectedRows();
+ for (int i : rows) {
+ tableModel.removeLetter(i);
+ }
+ tableModel.refresh();
+ }
+
+ public void refresh(){
+ tableModel = view.getTableModel();
+ tableModel.refresh();
+ }
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -18,7 +18,6 @@
* ##%*/
import static org.nuiton.i18n.I18n._;
-
import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToString.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -1,3 +1,21 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
package org.chorem.lima.util;
import org.chorem.lima.entity.Account;
Added: trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java 2010-08-25 22:04:25 UTC (rev 3020)
@@ -0,0 +1,47 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.util;
+
+import org.chorem.lima.entity.Letter;
+import org.jdesktop.swingx.autocomplete.ObjectToStringConverter;
+
+public class LetterToString extends ObjectToStringConverter {
+
+ private static LetterToString converter;
+
+ @Override
+ public String getPreferredStringForItem(Object item) {
+ String result = null;
+ if (item != null){
+ if (item instanceof Letter){
+ Letter letter = (Letter) item;
+ result = letter.getCode();
+ }
+ }
+ return result;
+ }
+
+ public static LetterToString getInstance() {
+ if (converter == null) {
+ converter = new LetterToString();
+ }
+ return converter;
+ }
+
+}
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -80,14 +80,25 @@
lima.entries=Entries
lima.entries.addEntry=Add entry
lima.entries.addTransaction=Add transaction
+lima.entries.lettering=Lettering
+lima.entries.lettering.add=Add letter
+lima.entries.lettering.noletterselected=Error \: No selected letter
+lima.entries.lettering.radiobutton.list=Existing letters
+lima.entries.lettering.radiobutton.new=New letter
+lima.entries.lettering.remove=Remove letter
lima.entries.searchtransaction=Search transaction
lima.entries.searchunbalancedtransaction=Incorrect transactions
lima.entries.writetransaction=Write entries
lima.enum.comboboxaccount.account=Account
lima.enum.comboboxaccount.accountlist=Account list
lima.enum.comboboxaccount.allaccount=All accounts
+lima.enum.comboboxamount.both=Both
+lima.enum.comboboxamount.credit=Credit
+lima.enum.comboboxamount.debit=Debit
lima.enum.comboboxentrybook.all=All entrybooks
lima.enum.comboboxentrybook.select_one=EntryBook
+lima.enum.comboboxletter.all=All letters
+lima.enum.comboboxletter.selectone=Letter
lima.enum.comboboxoperator.equal=Equal
lima.enum.comboboxoperator.inferior=Inferior
lima.enum.comboboxoperator.inferiororequal=Inferior or equal
@@ -220,4 +231,6 @@
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=About Lima...
lima.title.about.description=Open sources accounting software
+lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html>
+lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html>
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 16:54:17 UTC (rev 3019)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-25 22:04:25 UTC (rev 3020)
@@ -80,6 +80,12 @@
lima.entries=Traitement
lima.entries.addEntry=Ajouter entr\u00E9e
lima.entries.addTransaction=Ajouter transaction
+lima.entries.lettering=Lettrage
+lima.entries.lettering.add=Ajouter une lettre
+lima.entries.lettering.noletterselected=Erreur \: Aucune lettre s\u00E9lectionn\u00E9e.
+lima.entries.lettering.radiobutton.list=Lettres existantes
+lima.entries.lettering.radiobutton.new=Nouvelle lettre
+lima.entries.lettering.remove=Supprimer une lettre
lima.entries.searchtransaction=Rechercher des \u00E9critures
lima.entries.searchunbalancedtransaction=Entr\u00E9es incorrect
lima.entries.writetransaction=Saisir des \u00E9critures
@@ -91,6 +97,8 @@
lima.enum.comboboxamount.debit=D\u00E9bit
lima.enum.comboboxentrybook.all=Tous les journaux
lima.enum.comboboxentrybook.select_one=Journal
+lima.enum.comboboxletter.all=Toutes les lettres
+lima.enum.comboboxletter.selectone=Lettre
lima.enum.comboboxoperator.equal=\u00C9gal
lima.enum.comboboxoperator.inferior=Inf\u00E9rieur
lima.enum.comboboxoperator.inferiororequal=Inf\u00E9rieur ou \u00E9gal
@@ -223,4 +231,6 @@
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=\u00C0 propos de Lima...
lima.title.about.description=Logiciel de comptabilit\u00E9 Libre
+lima.tooltip.filter=<html>Expression r\u00E9guli\u00E8re \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
+lima.tooltip.lettering=<html>Pour ajouter une lettre \u00E0 plusieurs \u00E9critures <br/>S\u00E9lectionner plusieurs lignes avec la combinaison ctrl + click</html>
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
1
0
Author: jpepin
Date: 2010-08-24 18:54:17 +0200 (Tue, 24 Aug 2010)
New Revision: 3019
Url: http://chorem.org/repositories/revision/lima/3019
Log:
Ajout bouton next back pour rapports journaux, comptes, et la saisie d'?\195?\169criture.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
trunk/src/site/resources/screens/
trunk/src/site/resources/screens/lima_charts_accounts.png
trunk/src/site/resources/screens/lima_charts_entrybooks.png
trunk/src/site/resources/screens/lima_charts_financialperiod.png
trunk/src/site/resources/screens/lima_charts_financialstatement.png
trunk/src/site/resources/screens/lima_charts_fiscalperiod.png
trunk/src/site/resources/screens/lima_entries.png
trunk/src/site/resources/screens/lima_financialstatement.png
trunk/src/site/resources/screens/lima_home.png
trunk/src/site/resources/screens/lima_reports_accounts.png
trunk/src/site/resources/screens/lima_reports_balance.png
trunk/src/site/resources/screens/lima_reports_entrybooks.png
trunk/src/site/resources/screens/lima_reports_financialstatement.png
trunk/src/site/resources/screens/lima_reports_ledger.png
trunk/src/site/resources/screens/lima_searchtransaction.png
trunk/src/site/resources/screens/lima_webreports.png
Removed:
trunk/src/site/rst/screenshots.rst
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
trunk/src/site/rst/features.rst
trunk/src/site/rst/index.rst
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -912,7 +912,11 @@
t.addCell(new Phrase(dateFormat.format(
entry.getFinancialTransaction().getTransactionDate()),
normalFont));
- t.addCell(new Phrase(entry.getAccount().getAccountNumber(), normalFont));
+ String account = "";
+ if (entry.getAccount() != null){
+ account = entry.getAccount().getAccountNumber();
+ }
+ t.addCell(new Phrase(account, normalFont));
t.addCell(new Phrase(entry.getVoucher(), normalFont));
t.addCell(new Phrase(entry.getDescription(), normalFont));
t.addCell(new Phrase(String.valueOf(
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -48,6 +48,7 @@
import org.chorem.lima.business.ejbinterface.HttpServerServiceLocal;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.FormatsEnum;
+import org.hibernate.exception.GenericJDBCException;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
@@ -113,6 +114,7 @@
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ try {
//get all params
String imageParam = req.getParameter("img");
String model = req.getParameter("model");
@@ -251,6 +253,9 @@
resp.getWriter().write(pageContent.toString());
}
+ }catch (GenericJDBCException eee) {
+ log.error("Can't read db", eee);
+ }
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -51,7 +51,25 @@
this.addActionListener(this);
}
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.getEditor().setItem(this.getItemAt(row-1));
+ handler.setAccount((Account) this.getSelectedItem());
+ }
+ }
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.getEditor().setItem(this.getItemAt(row+1));
+ handler.setAccount((Account) this.getSelectedItem());
+ }
+ }
@Override
public void actionPerformed(ActionEvent e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -23,7 +23,9 @@
<![CDATA[
import org.chorem.lima.enums.ComboBoxDatesEnum;
+ import org.chorem.lima.ui.accountsreports.AccountComboBox;
AccountsReportsPeriodSearchPanel periodSearchPanel = new AccountsReportsPeriodSearchPanel(handler);
+ AccountComboBox comboBox = new AccountComboBox(handler);
void $afterCompleteSetup() {
}
@@ -41,8 +43,16 @@
<JLabel id="accountSelectorLabel" text="lima.common.account"/>
</cell>
<cell anchor="west">
- <JComboBox javaBean='new org.chorem.lima.ui.accountsreports.AccountComboBox(getHandler())' />
+ <JComboBox javaBean='comboBox' />
</cell>
+ <cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="comboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="comboBox.next()"/>
+ </cell>
</row>
<row>
<cell fill="both" weightx="1" weighty="1" columns="6">
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -162,21 +162,23 @@
public void createDocument() {
- FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="
- +selectedEnum.getExtension()+"&model="
- + DocumentsEnum.BALANCE.getFileName();
- Desktop.getDesktop().browse(new URI(url));
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null & selectedEndDate != null){
+ FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
+ String address = LimaConfig.getInstance().getHostAdress();
+
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)+"&format="
+ +selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.BALANCE.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -52,7 +52,25 @@
this.addActionListener(this);
}
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.getEditor().setItem(this.getItemAt(row-1));
+ handler.setEntryBook((EntryBook) this.getSelectedItem());
+ }
+ }
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.getEditor().setItem(this.getItemAt(row+1));
+ handler.setEntryBook((EntryBook) this.getSelectedItem());
+ }
+ }
@Override
public void actionPerformed(ActionEvent e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -24,7 +24,9 @@
<![CDATA[
import org.chorem.lima.enums.ComboBoxDatesEnum;
+ import org.chorem.lima.ui.entrybooksreports.EntryBookComboBox;
EntryBooksReportsPeriodSearchPanel periodSearchPanel = new EntryBooksReportsPeriodSearchPanel(handler);
+ EntryBookComboBox comboBox = new EntryBookComboBox(handler);
void $afterCompleteSetup() {
}
@@ -42,9 +44,17 @@
<JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/>
</cell>
<cell anchor="west">
- <JComboBox javaBean='new org.chorem.lima.ui.entrybooksreports.EntryBookComboBox(getHandler())' />
+ <JComboBox javaBean='comboBox' />
</cell>
<cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="comboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="comboBox.next()"/>
+ </cell>
+ <cell>
<EnumEditor id='DocumentEditor'
constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'
onActionPerformed="getHandler().createDocument()"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -170,29 +170,31 @@
public void createDocument() {
- FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+selectedEnum.getExtension()+"&model="
- + DocumentsEnum.ENTRYBOOKS.getFileName();
- Desktop.getDesktop().browse(new URI(url));
-
- String url2 = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+selectedEnum.getExtension()+"&model="
- + DocumentsEnum.GENERAL_ENTRYBOOK.getFileName();
- Desktop.getDesktop().browse(new URI(url2));
-
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
+ String address = LimaConfig.getInstance().getHostAdress();
+
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.ENTRYBOOKS.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+
+ String url2 = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.GENERAL_ENTRYBOOK.getFileName();
+ Desktop.getDesktop().browse(new URI(url2));
+
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -43,10 +43,10 @@
private static final Log log =
LogFactory.getLog(FinancialStatementReportPeriodSearchPanel.class);
- protected FinancialStatementReportViewHandler handler;
+ protected FinancialStatementReportTableModel model;
- public FinancialStatementReportPeriodSearchPanel(FinancialStatementReportViewHandler handler) {
- this.handler = handler;
+ public FinancialStatementReportPeriodSearchPanel(FinancialStatementReportTableModel model) {
+ this.model = model;
//init date
refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
@@ -55,7 +55,7 @@
static final long serialVersionUID = 1L;
public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
-
+
switch (comboBoxPeriodEnum) {
case PERIOD:
// get begin date
@@ -74,11 +74,11 @@
ActionListener beginDateActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- handler.model.setBeginDate(beginDatePicker.getDate());
- handler.refresh();
+ model.setBeginDate(beginDatePicker.getDate());
+ model.refresh();
}
};
- handler.model.setBeginDate(beginDatePicker.getDate());
+ model.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
@@ -86,13 +86,13 @@
ActionListener endDateActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- handler.model.setEndDate(endDatePicker.getDate());
- handler.refresh();
+ model.setEndDate(endDatePicker.getDate());
+ model.refresh();
}
};
- handler.model.setEndDate(endDatePicker.getDate());
+ model.setEndDate(endDatePicker.getDate());
endDatePicker.addActionListener(endDateActionListener);
- handler.refresh();
+ model.refresh();
this.removeAll();
this.add(beginDateLabel);
@@ -112,9 +112,9 @@
public void actionPerformed(ActionEvent e) {
FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
if (fPeriod != null){
- handler.model.setBeginDate(fPeriod.getBeginDate());
- handler.model.setEndDate(fPeriod.getEndDate());
- handler.refresh();
+ model.setBeginDate(fPeriod.getBeginDate());
+ model.setEndDate(fPeriod.getEndDate());
+ model.refresh();
}
}
};
@@ -135,9 +135,9 @@
public void actionPerformed(ActionEvent e) {
FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
if (fPeriod !=null){
- handler.model.setBeginDate(fPeriod.getBeginDate());
- handler.model.setEndDate(fPeriod.getEndDate());
- handler.refresh();
+ model.setBeginDate(fPeriod.getBeginDate());
+ model.setEndDate(fPeriod.getEndDate());
+ model.refresh();
}
}
};
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -240,20 +240,21 @@
public void createDocument(FormatsEnum formatsEnum) {
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+formatsEnum.getExtension()+"&model="
- + DocumentsEnum.FINANCIALSTATEMENT.getFileName();
- Desktop.getDesktop().browse(new URI(url));
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ String address = LimaConfig.getInstance().getHostAdress();
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+formatsEnum.getExtension()+"&model="
+ + DocumentsEnum.FINANCIALSTATEMENT.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -22,49 +22,23 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.Account;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ FinancialStatementReportPeriodSearchPanel periodSearchPanel =
+ new FinancialStatementReportPeriodSearchPanel(modelTable);
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
- getModelTable().setBeginDate(beginDate);
- getModelTable().setEndDate(endDate);
-
void $afterCompleteSetup() {
- getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
- <cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.common.begindate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getModelTable().setBeginDate(beginDatePicker.getDate());
- getHandler().refresh()" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.common.enddate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getModelTable().setEndDate(endDatePicker.getDate());
- getHandler().refresh()"/>
- </cell>
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><FinancialStatementReportPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell>
<EnumEditor id='DocumentEditor'
constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -52,6 +52,7 @@
public void createDocument() {
+ model = view.getModelTable();
FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
model.createDocument(selectedEnum);
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialPeriodComboBox.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -0,0 +1,90 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransaction;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import javax.swing.JComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.ui.combobox.EntryBookComboBoxModel;
+import org.chorem.lima.ui.combobox.EntryBookRenderer;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.util.EntryBookToString;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+public class FinancialPeriodComboBox extends JComboBox implements ActionListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log =
+ LogFactory.getLog(FinancialPeriodComboBox.class);
+
+ protected FinancialTransactionViewHandler handler;
+
+ public FinancialPeriodComboBox(FinancialTransactionViewHandler handler) {
+ this.handler = handler;
+
+ FinancialPeriodComboBoxModel comboBoxModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer comboBoxRenderer = new FinancialPeriodComboBoxRenderer();
+
+ setModel(comboBoxModel);
+ setRenderer(comboBoxRenderer);
+ addActionListener(this);
+
+ }
+
+ public void back(){
+ int row = this.getSelectedIndex();
+ log.debug(row);
+ if (row > 0){
+ this.setSelectedItem(this.getItemAt(row-1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ public void next(){
+ int size = this.getModel().getSize();
+ int row = this.getSelectedIndex();
+ log.debug(row);
+
+ if (row < size-1){
+ this.setSelectedItem(this.getItemAt(row+1));
+ repaint();
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Object object = this.getSelectedItem();
+ if (object instanceof FinancialPeriod){
+ handler.tableModel.setFinancialPeriod( (FinancialPeriod) this.getSelectedItem());
+ }
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -318,6 +318,7 @@
public void setFinancialPeriod(FinancialPeriod financialPeriod){
selectedFinancialPeriod = financialPeriod;
+ refresh();
}
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-24 16:54:17 UTC (rev 3019)
@@ -24,22 +24,17 @@
<![CDATA[
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FinancialPeriod;
+ import org.chorem.lima.ui.financialtransaction.FinancialPeriodComboBox;
+ FinancialPeriodComboBox financialPeriodComboBox = new FinancialPeriodComboBox(handler);
+
+
void $afterCompleteSetup() {
getHandler().refresh();
}
]]>
</script>
-
- <!-- <JPopupMenu id="MenuRightPanel">
- <JMenuItem text="lima.add.transaction" onActionPerformed='addEmptyTransaction()'/>
- <JMenuItem text="lima.print"/>
- </JPopupMenu>
- <JPopupMenu id="MenuRightTransaction">
- <JMenuItem text="lima.add" onActionPerformed='addEmptyTransaction()'/>
- <JMenuItem text="lima.print"/>
- </JPopupMenu> -->
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
@@ -58,19 +53,21 @@
/>
</cell>
<cell anchor="west">
- <JComboBox id="financialPeriodComboBox"
- model="{getModelFinancialPeriod()}"
- renderer="{new org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer()}"
- onActionPerformed="getFinancialTransactionTableModel().setFinancialPeriod( (FinancialPeriod) financialPeriodComboBox.getSelectedItem());
- getHandler().refresh()"
- editable="false"
- />
+ <JComboBox javaBean="financialPeriodComboBox"/>
</cell>
<cell>
+ <JButton id="back" text="lima.common.buttonback"
+ onActionPerformed="financialPeriodComboBox.back()"/>
+ </cell>
+ <cell>
+ <JButton id="next" text="lima.common.buttonnext"
+ onActionPerformed="financialPeriodComboBox.next()"/>
+ </cell>
+ <cell>
<JButton text="lima.common.copy"
onActionPerformed="getHandler().copyRow()" enabled="{isSelectedRow()}"/>
</cell>
- <cell>
+ <cell>
<JButton text="lima.common.paste"
onActionPerformed="getHandler().pasteRow()" enabled="{isSelectedRow()}"/>
</cell>
@@ -88,7 +85,7 @@
</cell>
</row>
<row>
- <cell fill="both" weightx="1" weighty="1" rows="3" columns="9">
+ <cell fill="both" weightx="1" weighty="1" rows="3" columns="11">
<JScrollPane>
<org.chorem.lima.ui.financialtransaction.FinancialTransactionTableModel
id="financialTransactionTableModel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-24 16:54:17 UTC (rev 3019)
@@ -183,21 +183,23 @@
public void createDocument() {
- FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
- String address = LimaConfig.getInstance().getHostAdress();
-
- try {
- String url = "http://"+address+":"+port+"/?beginDate="
- +dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)
- +"&format="+selectedEnum.getExtension()+"&model="
- + DocumentsEnum.LEDGER.getFileName();
- Desktop.getDesktop().browse(new URI(url));
- } catch (IOException e) {
- log.error("Can't open browser", e);
- } catch (URISyntaxException e) {
- log.error("Can't create news URI", e);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ FormatsEnum selectedEnum = (FormatsEnum) view.getDocumentEditor().getSelectedItem();
+ String address = LimaConfig.getInstance().getHostAdress();
+
+ try {
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ + DocumentsEnum.LEDGER.getFileName();
+ Desktop.getDesktop().browse(new URI(url));
+ } catch (IOException e) {
+ log.error("Can't open browser", e);
+ } catch (URISyntaxException e) {
+ log.error("Can't create news URI", e);
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-24 16:54:17 UTC (rev 3019)
@@ -36,6 +36,8 @@
lima.common.amountcredit=Credit amount
lima.common.amountdebit=Debit amount
lima.common.begindate=Begin
+lima.common.buttonback=\u276E
+lima.common.buttonnext=\u276F
lima.common.cancel=Cancel
lima.common.close=Close
lima.common.closed=Closed
@@ -172,7 +174,7 @@
lima.message.help.usage=Options (set with --option <key> <value>\:
lima.misc.supportemail.description=Support email
lima.openejb.remotemode.description=
-lima.opening.accounts=<html><center>No account chart is load<br/>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html>
+lima.opening.accounts=<html><center>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html>
lima.opening.entrybook=<html>Tick box to import default accounts chart\:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
lima.opening.import=Import a CSV Save
lima.opening.welcome=<html><center>Welcome to Lima<br/>this assistant help you to start your business accounting in the blink of an eye<br/>OR import instantanly your already existing save in CSV format<br/><br/><br/><br/></center></html>
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 16:54:17 UTC (rev 3019)
@@ -36,6 +36,8 @@
lima.common.amountcredit=Total Cr\u00E9dit
lima.common.amountdebit=Total D\u00E9bit
lima.common.begindate=D\u00E9but
+lima.common.buttonback=\u276E
+lima.common.buttonnext=\u276F
lima.common.cancel=Annuler
lima.common.close=Fermer
lima.common.closed=Ferm\u00E9
@@ -175,7 +177,7 @@
lima.message.help.usage=Options (set with --option <key> <value>\:
lima.misc.supportemail.description=Adresse email de support
lima.openejb.remotemode.description=
-lima.opening.accounts=<html><center>Aucun plan comptable charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
+lima.opening.accounts=<html><center>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.opening.entrybook=<html>Cochez la case pour importer les journaux par d\u00E9faut \:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
lima.opening.import=Importer une sauvegarde CSV
lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour d\u00E9marrer votre comptabilit\u00E9 en quelques instants\u0085<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
Added: trunk/src/site/resources/screens/lima_charts_accounts.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_accounts.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_entrybooks.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_entrybooks.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_financialperiod.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_financialperiod.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_financialstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_financialstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_charts_fiscalperiod.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_charts_fiscalperiod.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_entries.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_entries.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_financialstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_financialstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_home.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_home.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_accounts.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_accounts.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_balance.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_balance.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_entrybooks.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_entrybooks.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_financialstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_financialstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_reports_ledger.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_reports_ledger.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_searchtransaction.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_searchtransaction.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/resources/screens/lima_webreports.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/screens/lima_webreports.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/site/rst/features.rst
===================================================================
--- trunk/src/site/rst/features.rst 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/src/site/rst/features.rst 2010-08-24 16:54:17 UTC (rev 3019)
@@ -8,29 +8,66 @@
Cette section permet de définir le cadre de la comptabilité :
- plan comptable
+
+.. image:: screens/lima_charts_accountschart.png
+
- journaux
+
+.. image:: screens/lima_charts_entrybooks.png
+
- exercices
+
+.. image:: screens/lima_charts_fiscalperiod.png
+
- période comptable
+
+.. image:: screens/lima_charts_financialperiod.png
+
- plan bilan / compte de résultat
+.. image:: screens/lima_charts_financialstatement.png
+
Traitement
-----------
La partie traitement regroupe les fonctions utiles au quotidien :
-Saisie et recherche
+- saisie
+.. image:: screenshots/lima_entries.png
+
+- recherche
+
+.. image:: screenshots/lima_searchtransaction.png
+
+
Rapports
-----------
Permet de visualiser les documents usuelles de la comptabilité :
+
- journal
+
+.. image:: screenshots/lima_reports_entrybooks.png
+
- comptes
+
+.. image:: screenshots/lima_reports_accounts.png
+
- balance
+
+.. image:: screenshots/lima_reports_balance.png
+
- grand-livre
+
+.. image:: screenshots/lima_reports_ledger.png
+
- Bilan et compte de résultat
+.. image:: screenshots/lima_reports_financialstatement.png
+
+
Les documents sont atteignables par les menu de LIMA et via un site internet embarqué.
@@ -42,5 +79,5 @@
-Actuellement LIMA permet l'import et l'export pour EBP. Il serait envisageable d'ajouté
-l'import / export pour d'autre logiciel à la demande.
+Actuellement LIMA permet l'import et l'export pour EBP. Il est possible d'ajouté
+à la demande l'import / export pour des formats de fichiers d'autres logiciels.
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/src/site/rst/index.rst 2010-08-24 16:54:17 UTC (rev 3019)
@@ -2,13 +2,11 @@
Introduction
==================
-Issu du projet Chorem_, et créé pour fonctionner en collaboration avec CALLAO_,
-LIMA_ est une interface graphique capable d'utiliser différents moteurs de
-comptabilité générale respectant les conventions ainsi que normes imposées par
-la législation française aux entreprises.
-Initialement, LIMA utilisait le moteur de comptabilité d'OfBiz-Neogia, CALLAO_
-est maintenant utilisé comme moteur de comptabilité par défaut.
-.. _ChoreM: http://chorem.org/
-.. _LIMA: http://chorem.org/projects/show/lima
-.. _CALLAO: http://chorem.org/projects/show/callao
\ No newline at end of file
+Acronyme de Lutin Invoice Monitoring and Accounting, l’application de comptabilité
+LIMA est un logiciel libre pensé pour être la plus ergonomique possible et facile
+d’accès à tout utilisateur quelque soit leur niveau en comptabilité : débutant
+comme confirmé.
+La particularité de LIMA est qu’il s’agit d’un produit évolutif permettant de
+répondre aux besoins spécifiques de toute entreprise ou organisation, tout en
+garantissant le maintien des données comptables.
\ No newline at end of file
Deleted: trunk/src/site/rst/screenshots.rst
===================================================================
--- trunk/src/site/rst/screenshots.rst 2010-08-24 12:31:17 UTC (rev 3018)
+++ trunk/src/site/rst/screenshots.rst 2010-08-24 16:54:17 UTC (rev 3019)
@@ -1,71 +0,0 @@
-====================
-Présentation de LIMA
-====================
-
-Présentation imagée
--------------------
-
-L'interface de Lima intègre les fonctionalités suivantes
-
-
-Interface multi utilisateurs avec authentification :
-
-.. image:: screenshots/lima-capture4-mini.png
-
-Connexion_
-
-.. _Connexion: screenshots/lima-capture4.png
-
-
-Gestion des écritures dans le journal :
-
-.. image:: screenshots/lima-capture-mini.png
-
-Ecritures_
-
-.. _Ecritures: screenshots/lima-capture.png
-
-
-Gestion des comptes du plan comptable général :
-
-.. image:: screenshots/lima-capture2-mini.png
-
-PCG_
-
-.. _PCG: screenshots/lima-capture2.png
-
-
-Edition des états comptables :
-
-.. image:: screenshots/etat-mini.png
-
-Etat_
-
-.. _Etat: screenshots/etat.png
-
-
-Recherches :
-
-.. image:: screenshots/recherche-mini.png
-
-Recherche_
-
-.. _Recherche: screenshots/recherche.png
-
-
-Les journaux :
-
-.. image:: screenshots/journaux-mini.png
-
-Journaux_
-
-.. _Journaux: screenshots/journaux.png
-
-
-Le lettrage :
-
-.. image:: screenshots/lettrage-mini.png
-
-Lettrage_
-
-.. _Lettrage: screenshots/lettrage.png
1
0
Author: jpepin
Date: 2010-08-24 14:31:17 +0200 (Tue, 24 Aug 2010)
New Revision: 3018
Url: http://chorem.org/repositories/revision/lima/3018
Log:
D?\195?\169bogue UI des rapports.
Removed:
trunk/doc/
trunk/src/referencement.txt
trunk/src/site/resources/callao/
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
trunk/src/site/rst/features.rst
trunk/src/site/rst/presentation.rst
trunk/src/site/site_fr.xml
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -608,7 +608,8 @@
query.addDistinct();
query.addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true);
//Load for lazy
- query.addLoad(FinancialTransaction.FINANCIAL_PERIOD);
+ query.addLoad(FinancialTransaction.ENTRY_BOOK)
+ .addLoad(FinancialTransaction.FINANCIAL_PERIOD);
Date beginDate = financialTransactionSearch.getBeginDate();
Date endDate = financialTransactionSearch.getEndDate();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -56,24 +56,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -111,36 +111,40 @@
public void refresh(){
- ReportsDatas datasList = getDataList();
-
- tableModel = view.getModelAccountsReportsTable();
- tableModel.refresh(datasList);
-
- /**
- * set text and amounts of labels credit, debit, solde
- */
-
- if (datasList != null){
- // set amounts credit and debit and solde
- view.amountCreditLabel.setText(datasList.getAmountCredit().toString());
- view.amountDebitLabel.setText(datasList.getAmountDebit().toString());
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(amountSolde.toString());
-
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+ if (selectedBeginDate != null && selectedEndDate != null && selectedAccount != null){
+ ReportsDatas datasList = getDataList();
+
+ tableModel = view.getModelAccountsReportsTable();
+ tableModel.refresh(datasList);
+
+ /**
+ * set text and amounts of labels credit, debit, solde
+ */
+
+ if (datasList != null){
+ // set amounts credit and debit and solde
+ view.amountCreditLabel.setText(
+ datasList.getAmountCredit().toString());
+ view.amountDebitLabel.setText(
+ datasList.getAmountDebit().toString());
+ BigDecimal amountSolde = datasList.getAmountSolde();
+ view.amountSoldeLabel.setText(amountSolde.toString());
+
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (datasList.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -69,24 +69,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -122,36 +122,42 @@
}
public void refresh(){
- model = view.getModelBalanceTable();
- BalanceTrial datasList = getDataList();
- model.refresh(datasList);
-
- /**
- * update the labels credit, debit, solde on the footer
- * get all entries for all accounts on the selected period
- */
-
- if (datasList != null){
- // set amounts credit, debit and solde
- view.amountCreditLabel.setText(String.valueOf(datasList.getAmountCredit()));
- view.amountDebitLabel.setText(String.valueOf(datasList.getAmountDebit()));
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(String.valueOf(amountSolde));
-
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+
+ if (selectedBeginDate != null && selectedEndDate != null){
+ model = view.getModelBalanceTable();
+ BalanceTrial datasList = getDataList();
+ model.refresh(datasList);
+
+ /**
+ * update the labels credit, debit, solde on the footer
+ * get all entries for all accounts on the selected period
+ */
+
+ if (datasList != null){
+ // set amounts credit, debit and solde
+ view.amountCreditLabel.setText(
+ String.valueOf(datasList.getAmountCredit()));
+ view.amountDebitLabel.setText(
+ String.valueOf(datasList.getAmountDebit()));
+ BigDecimal amountSolde = datasList.getAmountSolde();
+ view.amountSoldeLabel.setText(
+ String.valueOf(amountSolde));
+
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (datasList.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
public void createDocument() {
@@ -160,8 +166,10 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)+"&format="
+ +selectedEnum.getExtension()+"&model="
+ DocumentsEnum.BALANCE.getFileName();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -61,24 +61,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -19,7 +19,6 @@
package org.chorem.lima.ui.entrybooksreports;
import static org.nuiton.i18n.I18n._;
-
import java.awt.Desktop;
import java.io.IOException;
import java.math.BigDecimal;
@@ -27,12 +26,10 @@
import java.net.URISyntaxException;
import java.text.SimpleDateFormat;
import java.util.Date;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.beans.ReportsDatasImpl;
import org.chorem.lima.business.DocumentServiceMonitorable;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.HttpServerServiceMonitorable;
@@ -118,7 +115,8 @@
if (selectedEntryBook != null){
try {
results =
- reportService.generateEntryBooksReports(selectedEntryBook, selectedBeginDate, selectedEndDate);
+ reportService.generateEntryBooksReports(
+ selectedEntryBook, selectedBeginDate, selectedEndDate);
}
catch (LimaException eee) {
if (log.isErrorEnabled()) {
@@ -131,36 +129,41 @@
}
public void refresh(){
- tableModel = view.getModelTable();
-
- ReportsDatas datasList = getDataList();
-
- tableModel.refresh(datasList);
-
- /**
- * set text and amounts of labels credit, debit, solde
- */
-
- if (datasList != null){
- // set amounts credit, debit and solde
- view.amountCreditLabel.setText(String.valueOf(datasList.getAmountCredit()));
- view.amountDebitLabel.setText(String.valueOf(datasList.getAmountDebit()));
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(String.valueOf(amountSolde));
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+
+ if (selectedBeginDate != null && selectedEndDate != null && selectedEntryBook != null){
+ tableModel = view.getModelTable();
+
+ ReportsDatas datasList = getDataList();
+
+ tableModel.refresh(datasList);
+
+ /**
+ * set text and amounts of labels credit, debit, solde
+ */
+
+ if (datasList != null){
+ // set amounts credit, debit and solde
+ view.amountCreditLabel.setText(
+ String.valueOf(datasList.getAmountCredit()));
+ view.amountDebitLabel.setText(
+ String.valueOf(datasList.getAmountDebit()));
+ BigDecimal amountSolde = datasList.getAmountSolde();
+ view.amountSoldeLabel.setText(String.valueOf(amountSolde));
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (datasList.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
@@ -171,13 +174,17 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ DocumentsEnum.ENTRYBOOKS.getFileName();
Desktop.getDesktop().browse(new URI(url));
- String url2 = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url2 = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ DocumentsEnum.GENERAL_ENTRYBOOK.getFileName();
Desktop.getDesktop().browse(new URI(url2));
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -218,15 +218,17 @@
*/
public List<FinancialStatementAmounts> getDataList(){
List<FinancialStatementAmounts> results = null;
- try {
- results = financialStatementService.financialStatementReport(selectedBeginDate, selectedEndDate);
- }
- catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.debug("Can't update model", eee);
- }
- ErrorHelper.showErrorDialog("Can't get entries list", eee);
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ try {
+ results = financialStatementService.financialStatementReport(selectedBeginDate, selectedEndDate);
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.debug("Can't update model", eee);
+ }
+ ErrorHelper.showErrorDialog("Can't get entries list", eee);
+ }
+ }
return results;
}
@@ -241,8 +243,10 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+formatsEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+formatsEnum.getExtension()+"&model="
+ DocumentsEnum.FINANCIALSTATEMENT.getFileName();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -18,13 +18,6 @@
package org.chorem.lima.ui.financialstatementreport;
-import java.awt.Desktop;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.chorem.lima.LimaConfig;
-import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.FormatsEnum;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-24 12:31:17 UTC (rev 3018)
@@ -67,24 +67,30 @@
</JScrollPane>
</cell>
</row>
- <row fill="horizontal" anchor="center">
- <cell>
- <JLabel text="lima.common.amountdebit" />
+ <row>
+ <cell fill="horizontal" weightx="1" columns="7">
+ <Table>
+ <row fill="horizontal" weightx="1">
+ <cell>
+ <JLabel text="lima.common.amountdebit" />
+ </cell>
+ <cell>
+ <JLabel id="amountDebitLabel" />
+ </cell>
+ <cell>
+ <JLabel text="lima.common.amountcredit"/>
+ </cell>
+ <cell>
+ <JLabel id="amountCreditLabel" />
+ </cell>
+ <cell>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
+ </cell>
+ <cell>
+ <JLabel id="amountSoldeLabel"/>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell>
- <JLabel id="amountDebitLabel" />
- </cell>
- <cell>
- <JLabel text="lima.common.amountcredit"/>
- </cell>
- <cell>
- <JLabel id="amountCreditLabel" />
- </cell>
- <cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
- </cell>
- <cell>
- <JLabel id="amountSoldeLabel"/>
- </cell>
</row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-24 12:31:17 UTC (rev 3018)
@@ -19,7 +19,6 @@
package org.chorem.lima.ui.ledger;
import static org.nuiton.i18n.I18n._;
-
import java.awt.Desktop;
import java.io.IOException;
import java.math.BigDecimal;
@@ -30,7 +29,6 @@
import java.util.Collections;
import java.util.Date;
import java.util.List;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
@@ -47,7 +45,6 @@
import org.chorem.lima.business.utils.EntryComparator;
import org.chorem.lima.business.utils.FormatsEnum;
import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.ErrorHelper;
@@ -69,9 +66,6 @@
protected ReportServiceMonitorable reportService;
protected DocumentServiceMonitorable documentService;
- /** Account. */
- protected EntryBook selectedEntryBook;
-
/** Begin Date. */
protected Date selectedBeginDate;
@@ -129,7 +123,8 @@
List<Object> results = new ArrayList<Object>();
try {
balanceTrialCache = reportService.generateLedger(selectedBeginDate,
- selectedEndDate, selectedAccounts, view.getMovmentedFilter().isSelected());
+ selectedEndDate, selectedAccounts,
+ view.getMovmentedFilter().isSelected());
if (balanceTrialCache.getReportsDatas() != null){
for (ReportsDatas reportsDatas : balanceTrialCache.getReportsDatas()) {
results.add(reportsDatas);
@@ -151,37 +146,39 @@
}
public void refresh(){
- model = view.getModelTable();
- cachedatasList = getDataList();
- model.refresh(cachedatasList);
-
- /**
- * set text and amounts of labels credit, debit, solde
- */
-
- if (balanceTrialCache != null){
- // set amounts credit, debit and solde
- view.amountCreditLabel.setText(
- String.valueOf(balanceTrialCache.getAmountCredit()));
- view.amountDebitLabel.setText(
- String.valueOf(balanceTrialCache.getAmountDebit()));
- BigDecimal amountSolde = balanceTrialCache.getAmountSolde();
- view.amountSoldeLabel.setText(
- String.valueOf(amountSolde));
-
- if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.common.solde"));
- }
- else {
- // set label solde: credit or debit
- if (balanceTrialCache.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- }
- else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
- }
+ if (selectedBeginDate != null && selectedEndDate != null){
+ model = view.getModelTable();
+ cachedatasList = getDataList();
+ model.refresh(cachedatasList);
+
+ /**
+ * set text and amounts of labels credit, debit, solde
+ */
+
+ if (balanceTrialCache != null){
+ // set amounts credit, debit and solde
+ view.amountCreditLabel.setText(
+ String.valueOf(balanceTrialCache.getAmountCredit()));
+ view.amountDebitLabel.setText(
+ String.valueOf(balanceTrialCache.getAmountDebit()));
+ BigDecimal amountSolde = balanceTrialCache.getAmountSolde();
+ view.amountSoldeLabel.setText(
+ String.valueOf(amountSolde));
+
+ if (amountSolde.doubleValue() == 0){
+ view.soldeLabel.setText(_("lima.common.solde"));
+ }
+ else {
+ // set label solde: credit or debit
+ if (balanceTrialCache.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ }
+ else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
+ }
+ }
+ }
+ }
}
public void createDocument() {
@@ -190,8 +187,10 @@
String address = LimaConfig.getInstance().getHostAdress();
try {
- String url = "http://"+address+":"+port+"/?beginDate="+dateFormat.format(selectedBeginDate)
- +"&endDate="+dateFormat.format(selectedEndDate)+"&format="+selectedEnum.getExtension()+"&model="
+ String url = "http://"+address+":"+port+"/?beginDate="
+ +dateFormat.format(selectedBeginDate)
+ +"&endDate="+dateFormat.format(selectedEndDate)
+ +"&format="+selectedEnum.getExtension()+"&model="
+ DocumentsEnum.LEDGER.getFileName();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-24 12:31:17 UTC (rev 3018)
@@ -84,6 +84,9 @@
lima.enum.comboboxaccount.account=Compte
lima.enum.comboboxaccount.accountlist=Liste de comptes
lima.enum.comboboxaccount.allaccount=Tous les comptes
+lima.enum.comboboxamount.both=Les deux
+lima.enum.comboboxamount.credit=Cr\u00E9dit
+lima.enum.comboboxamount.debit=D\u00E9bit
lima.enum.comboboxentrybook.all=Tous les journaux
lima.enum.comboboxentrybook.select_one=Journal
lima.enum.comboboxoperator.equal=\u00C9gal
Deleted: trunk/src/referencement.txt
===================================================================
--- trunk/src/referencement.txt 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/referencement.txt 2010-08-24 12:31:17 UTC (rev 3018)
@@ -1,4 +0,0 @@
-Voici les adresses où la promotion du logiciel a été assurée :
-- http://forum.framasoft.org/viewtopic.php?f=99&t=30743
-- http://freshmeat.net/projects/limacallao/
-- http://linuxfr.org/forums/12/26311.html
Modified: trunk/src/site/rst/features.rst
===================================================================
--- trunk/src/site/rst/features.rst 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/site/rst/features.rst 2010-08-24 12:31:17 UTC (rev 3018)
@@ -1,51 +1,46 @@
========
-Features
+Fonctionnalités
========
-Description
+
+Structure
-----------
-Le moteur de comptabilité CALLAO, couplé à l'interface graphique LIMA,
-propose toutes les fonctionnalités indispensables et légales à la tenue de la
-comptabilité générale d'une entreprise. Il peut communiquer avec l'ERP Chorem,
-pour effectuer de la comptabilité analytique.
+Cette section permet de définir le cadre de la comptabilité :
+- plan comptable
+- journaux
+- exercices
+- période comptable
+- plan bilan / compte de résultat
-Le tout proposera à terme un maximum de flexibilité avec des possibilités de
-stockage des données autonomes sur un seul poste, ou centralisées et accessibles
-à plusieurs personnes sur un serveur. On notera aussi que chacune des composantes
-se veut indépendante : LIMA pourra fonctionner sur CALLAO, OFBiz Neogia ou tout
-autre moteur de comptabilité conçu de manière à être compatible. Il en va de
-même pour Callao, qui pourra fonctionner avec d'autres interfaces conçues pour,
-et qui pourra donc être intégré dans un autre logiciel (ERP ou autre).
+Traitement
+-----------
-Liste de fonctionnalités
-------------------------
+La partie traitement regroupe les fonctions utiles au quotidien :
+Saisie et recherche
-Voici la liste de fonctionnalités de LIMA :
-- Saisie des écritures comptables multi-journal
-- Affichage des transactions des différents journaux et des comptes du grand livre
-- Clôture d'une période
-- Possibilité de modifier/supprimer les écritures d'une période non-clôturée
-- Fonctionnalité de semi-clôture pour éviter les saisies accidentelles sur un
- intervalle de temps donné.
-- Lettrage
-- Import/export des données depuis/vers un fichier.
-- Génération et publication des états comptables définitifs pour les périodes
- clôturés
-- Génération et publication d'états comptables provisoires pour les périodes
- non-clôturées
-- Conformité au cadre légal de la comptabilité informatisée en France
-- Labellisation des opérations suivant différentes informations (clients,
- projets, catégorie) afin de rendre possibles des échanges avec le projet
- Chorem_
+Rapports
+-----------
+Permet de visualiser les documents usuelles de la comptabilité :
+- journal
+- comptes
+- balance
+- grand-livre
+- Bilan et compte de résultat
-``Solutions``
-=============
+Les documents sont atteignables par les menu de LIMA et via un site internet embarqué.
-.. image:: schemas/schema-solutions.png
+Import / Export
+-----------
-.. _Chorem: http://chorem.org/
+Toutes les données de LIMA sont exportables et importables à volontés au format CSV.
+L'utilisation de ce format permet d'être exploité par un tableur.
+
+
+
+Actuellement LIMA permet l'import et l'export pour EBP. Il serait envisageable d'ajouté
+l'import / export pour d'autre logiciel à la demande.
Modified: trunk/src/site/rst/presentation.rst
===================================================================
--- trunk/src/site/rst/presentation.rst 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/site/rst/presentation.rst 2010-08-24 12:31:17 UTC (rev 3018)
@@ -5,114 +5,102 @@
Introduction
------------
-LIMA_ est un logiciel libre de gestion de comptabilité pensé pour être le
-plus ergonomique possible.
+Acronyme de Lutin Invoice Monitoring and Accounting, l’application de comptabilité
+LIMA est un logiciel libre pensé pour être la plus ergonomique possible et facile
+d’accès à tout utilisateur quelque soit leur niveau en comptabilité : débutant
+comme confirmé.
+La particularité de LIMA est qu’il s’agit d’un produit évolutif permettant de
+répondre aux besoins spécifiques de toute entreprise ou organisation, tout en
+garantissant le maintien des données comptables.
-Ayant comme particularité d'être évolutif au fil des besoins de votre entreprise.
-LIMA_ n'est pas figé et doit vous garantir un maintien de vos données comptable
-ainsi que de vos habitudes de travail.
-Ce logiciel est multiplatforme, développé en JAVA, il peut s'adapter aux
-environnement Windows,UNIX: MacOs ou linux. Il peut être implanté avec un système
-de base de données embarqué ou sur un serveur.
+Le logiciel est écrit en Java ce qui assure une compatibilité multiplateforme :
+Windows, Mac OS X, Linux. Il peut-être installé en fonctionnement client monoposte,
+ou en configuration client <–> serveur.
+Lors d'une installation en client serveur, le moteur de persistence de donnée est
+installé coté serveur, et l'interface est installée sur autant de poste client que
+désiré.
-Cela permet de se conformer aux besoins de sociétés de taille diverse. Il n'est
-pas indispensable de disposer d'un serveur de base de données pour tenir sa
-comptabilité avec LIMA_.
+Historique
+------------
Ce projet est né d'un besoin d'adapter l'ergonomie d'OFBiz Neogia qui
proposait un système de comptabilité générale.
-OFBiz Neogia n'étant pas un système de comptablitié a part entière son interface
-n'est pas adaptée à la gestion de la comptabilité. Code Lutin à donc décidé de
-remplacer cette interface tout en gardant la possibilité d'utiliser le moteur
-d'OFBiz Neogia.
+OFBiz Neogia n'étant pas un simple système de comptablitié a part entière, mais
+un ERP complet.
+Son interface n'était pas adaptée au besoin d'un logiciel de comptabilité indépendant.
+Code Lutin à donc décidé de remplacer cette interface tout en gardant la possibilité
+d'utiliser le moteur d'OFBiz Neogia. La première étape a donc été d’adapter une
+interface autonome avec la technologie de bibliothèque graphique Java Swing.
-LIMA_ est indépendant du système gérant la comptabilité. Il a donc été décidé de
-développer un moteur propre à Code lutin: CALLAO_.
+L'interface de LIMA_ est indépendant du moteur gérant la comptabilité. Il a donc
+été décidé de développer un moteur propre à Code lutin: CALLAO_.
-.. _CALLAO: callao.html
-.. _LIMA: presentation.html
+En 2010, l'application a été réécrite en majeur partie pour d'une part répondre le
+plus fidèlement aux normes comptables, et d'autre part correspondre aux normes de
+programmation de Code Lutin. LIMA s'appuie notamment sur les projets internes Topia,
+ EuGene et JAXX.
-
Architecture
------------
+LIMA est un projet MAVEN multi-module, il est en réalité composé de trois projets Java :
+lima-business, lima-callao, lima-swing.
+
.. image:: resources/schemas/lima-callao-architecture.png
+Lima-callao
+~~~~~~~~~~~~~
-Présentation
-------------
+Ce projet permet de définir les entités appelées objets (données informatiques
+regroupant les principales caractéristiques des éléments du monde réel) nécessaires
+au métier du logiciel de comptabilité. Toutes les classes java correspondantes
+sont générées à l’aide d’un modèle UML (langage de modélisation unifié). Ce modèle
+est contenu dans un seul fichier au format zargo éditable avec le logiciel Argouml.
+Ce principe permet d’utiliser avantageusement la langue UML et ces normes. L’ensemble
+du schéma est ensuite généré via les projets internes à Code Lutin :
+EUGene et ToPIA grâce à Maven.
+Outre la définition des entités, le projet lima-callao permet via ToPIA- persistence
+de définir les méthodes associées à la base de données pour le stockage de ces
+entités : ajout, modification, suppression.
-L'interface de Lima se intègre les fonctionnalités suivantes
-
-Interface multi utilisateurs avec authentification :
+lima-business
+~~~~~~~~~~~~~
-.. image:: screenshots/lima-capture4-mini.png
+Ce projet permet d’implémenter/de définir le métier en utilisant des entités issues
+du projet lima-callao. Des services EJB qui ont un rôle précis y sont programmés.
+Ce sont ces services qui sont appelés par l’utilisateur lorsqu’il appelle des
+fonctions. Les services sont programmés avec un système de session afin de pouvoir
+être exécuté en mode client serveur. En effet, les services sont exécutés côté
+serveur et ainsi le client appelle les services en ouvrant une transaction.
+Il existe une multitude de services relatifs aux besoins du métier :
+service des comptes, service des journaux, service des périodes fiscales,
+service des périodes financières, service des entrées, services des rapports, etc...
+On peut ajouter, modifier et supprimer des services selon les besoins de l'activité.
-Connexion_
-.. _Connexion: screenshots/lima-capture4.png
+lima-swing
+~~~~~~~~~~~~~
+Il s’agit du projet qui permet d’exécuter l’UI (interface utilisateur) de LIMA.
+Le design de l’application y est défini : fenêtres, boutons, tableaux,...
+L’interface est programmée selon la méthode de conception MVC (modèle-vue-
+contrôleur). Le modèle est le couple lima-callao - lima-business. La partie
+vue-contrôleur se trouve donc dans lima-swing. La partie vue, ce qui s’affiche à
+l’utilisateur, est programmée en JAXX. Toutes les actions des éléments de la vue
+(fenêtres, boutons, menus, tableaux) sont définies dans le contrôleur. Le
+contrôleur est implémenté sous forme de classes Java qui s’occupent d’afficher
+les bons messages, d’appeler les services correspondants, et de retourner les
+données, par exemple : le remplissage d’un tableau.
-Gestion des écritures dans le journal :
-.. image:: screenshots/lima-capture-mini.png
-
-Ecritures_
-
-.. _Ecritures: screenshots/lima-capture.png
-
-
-Gestion des comptes du plan comptable général :
-
-.. image:: screenshots/lima-capture2-mini.png
-
-PCG_
-
-.. _PCG: screenshots/lima-capture2.png
-
-
-Edition des états comptables :
-
-.. image:: screenshots/etat-mini.png
-
-Etat_
-
-.. _Etat: screenshots/etat.png
-
-
-Recherches :
-
-.. image:: screenshots/recherche-mini.png
-
-Recherche_
-
-.. _Recherche: screenshots/recherche.png
-
-
-Les journaux :
-
-.. image:: screenshots/journaux-mini.png
-
-Journaux_
-
-.. _Journaux: screenshots/journaux.png
-
-
-Le lettrage :
-
-.. image:: screenshots/lettrage-mini.png
-
-Lettrage_
-
-.. _Lettrage: screenshots/lettrage.png
-
Licence
-------
-Lima est développé sous licence GPL.
+Lima est développé sous licence GPL :
+GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007
\ No newline at end of file
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-08-23 20:01:24 UTC (rev 3017)
+++ trunk/src/site/site_fr.xml 2010-08-24 12:31:17 UTC (rev 3018)
@@ -13,20 +13,21 @@
</poweredBy>
<body>
- <menu name="Lima" inherit="top">
+ <menu name="Le projet" inherit="top">
<item name="Présentation" href="presentation.html"/>
- <item name="ScreenShots" href="screenshots.html"/>
- <item name="Features" href="features.html"/>
+ <item name="Fonctionnalités" href="features.html"/>
<item name="Lancer Lima en ligne" href="lima-main/jnlp/launch.jnlp" />
<item name="Téléchargements" href="http://chorem.org/projects/list_files/lima" />
- <item name="Lexique comptable" href="lexique.html" />
<item name="Contacts" href="contact.html" />
<item name="Dépôt SVN" href="http://svn.chorem.org/svn/lima/"/>
</menu>
- <menu name="Utilisateur" inherit="top" >
+ <menu name="Mode d'emploi" inherit="top" >
<item name="Installer et lancer" href="install.html" />
- <item name="Créer les journaux" href="journal.html" />
- <item name="Créer le plan comptable général" href="planComptable.html" />
+ <item name="Création de sa comptabilité" href="assistant.html" />
+ <item name="Saisie d'écritures" href="saisie.html" />
+ <item name="Rapports" href="rapports.html" />
+ <item name="Import / Export" href="importexport.html" />
+ <item name="Lexique comptable" href="lexique.html" />
</menu>
<menu ref="reports"/>
</body>
1
0
r3017 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/resources/images lima-swing/src/main/java/org/chorem/lima lima-swing/src/main/resources/images
by jpepin@users.chorem.org 23 Aug '10
by jpepin@users.chorem.org 23 Aug '10
23 Aug '10
Author: jpepin
Date: 2010-08-23 22:01:24 +0200 (Mon, 23 Aug 2010)
New Revision: 3017
Url: http://chorem.org/repositories/revision/lima/3017
Log:
Ajout icone LIMA sur la page web.
Slpash screen puzzle v2.
Added:
trunk/lima-business/src/main/resources/images/puzzle_icon_mini.png
Removed:
trunk/lima-business/src/main/resources/images/logo-codelutin.png
trunk/lima-business/src/main/resources/images/splash.png
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
trunk/lima-swing/src/main/resources/images/puzzle_splash.png
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-23 16:49:11 UTC (rev 3016)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-23 20:01:24 UTC (rev 3017)
@@ -203,14 +203,15 @@
+ "<style type=\"text/css\">"
+ "body { font: 14px sans-serif; }"
+ "h1 { font: 20px sans-serif; text-align: center; }"
- + "table.paddingleft td {padding-left:100px;}"
+ + "table.padding td {padding-right:20px;}"
+ ".tdright {text-align: right;}"
+ "</style>"
+ "</head>\n"
+ "<body>\n"
- + "<table class=\"paddingleft\">\n"
- + "<tr><td colspan=2><h1>LIMA Documents Report</h1></td></tr>\n"
- + "<tr><td><img src=\"?img=identity.png\"/></td>\n"
+ + "<table class=\"padding\">\n"
+ + "<tr><td><img src=\"?img=puzzle_icon_mini.png\"/></td>\n"
+ + "<td><h1>LIMA Documents Report</h1></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=identity.png\"/></td>\n"
+ "<td rowspan=3><form method=GET action="
+ serverAdress + ">\n"
+ _("lima-business.document.date.begin")
@@ -237,12 +238,12 @@
}
pageContent.append("</select>\n"
- + "<tr><td><img src=\"?img=entries.png\"/></td></tr>\n"
- + "<tr><td><img src=\"?img=accounts.png\"/></td></tr>\n"
- + "<tr><td><img src=\"?img=entrybooks.png\"/></td>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=entries.png\"/></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=accounts.png\"/></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=entrybooks.png\"/></td>\n"
+ "<td class=\"tdright\"><input type=\"submit\"></td></tr>"
+ "</form>\n"
- + "<tr><td><img src=\"?img=fiscalperiods.png\"/></td></tr>\n"
+ + "<tr><td class=\"tdright\"><img src=\"?img=fiscalperiods.png\"/></td></tr>\n"
+ "</table>\n"
+ "</body>\n"
+ "</html>");
Deleted: trunk/lima-business/src/main/resources/images/logo-codelutin.png
===================================================================
(Binary files differ)
Added: trunk/lima-business/src/main/resources/images/puzzle_icon_mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-business/src/main/resources/images/puzzle_icon_mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/lima-business/src/main/resources/images/splash.png
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 16:49:11 UTC (rev 3016)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 20:01:24 UTC (rev 3017)
@@ -54,6 +54,9 @@
/** Lima configuration. */
public static LimaConfig config;
+ /** splash */
+ private static LimaSplash splash;
+
/**
* Lima main method.
*
@@ -67,6 +70,7 @@
}
try {
+
// init root context
final LimaContext context = init(args);
@@ -98,6 +102,10 @@
*/
public static synchronized LimaContext init(String... args) throws Exception {
+ // update splash
+ splash = new LimaSplash();
+ splash.initSplash();
+
// to enable javassist on webstart, must remove any securityManager,
// see if this can be dangerous (should not be since jnlp is signed ?)
// moreover it speeds up the loading :)
@@ -114,6 +122,7 @@
log.debug("i18n loading time : " + (StringUtil.convertTime(t0, System.nanoTime())));
}
+
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
// init root context
@@ -150,12 +159,10 @@
protected static void launch(LimaContext context) throws Exception {
+
+ splash.drawVersion(config.getVersion());
+ splash.updateProgression(0.1, _("lima.splash.1"));
- // update splash
- LimaSplash splash = new LimaSplash();
- splash.initSplash(config.getVersion());
- splash.updateProgression(0.1, _("lima.splash.1"));
-
// do init ui
MainViewHandler uiHandler = context.getContextValue(MainViewHandler.class);
final MainView ui = uiHandler.initUI(context, context.getConfig().isFullScreen());
@@ -166,7 +173,7 @@
// load accounts and test if there is an account plan defined
// if not, call #loadDefaultAccount()
- splash.updateProgression(0.5, _("lima.splash.2"));
+ splash.updateProgression(0.7, _("lima.splash.2"));
//start http server
LimaServiceFactory.getInstance().getService(HttpServerServiceMonitorable.class).start();
@@ -185,7 +192,7 @@
openingView.setLocationRelativeTo(null);
openingView.setVisible(true);
}
- splash.updateProgression(0.5, _("lima.splash.3"));
+ splash.updateProgression(1, _("lima.splash.3"));
// show ui
SwingUtilities.invokeLater(new Runnable() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 16:49:11 UTC (rev 3016)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 20:01:24 UTC (rev 3017)
@@ -67,10 +67,18 @@
*
* @param version version to display on splash screen
*/
- public void initSplash(String version) {
+ public void initSplash() {
if (splashGraphics != null) {
- splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawString("Version : " + version, 394, 42);
+ splashGraphics.setColor(Color.GRAY);
+ splashGraphics.drawRect(65, 253, 300, 10);
+ splashGraphics.fillRect(65, 253, 0, 10);
+
+ splashGraphics.setColor(Color.DARK_GRAY);
+ Font font = new Font("Lucida Sans", Font.BOLD, 14);
+ splashGraphics.setFont(font);
+ splashGraphics.drawString("Lutin Invoice Monitoring and Accounting", 65, 249);
+
+ splash.update();
}
else {
if (log.isWarnEnabled()) {
@@ -81,6 +89,17 @@
}
}
+ public void drawVersion(String version){
+ if (splashGraphics != null) {
+ splashGraphics.setColor(Color.DARK_GRAY);
+ Font font = new Font("Lucida Sans", Font.PLAIN, 12);
+ splashGraphics.setFont(font);
+ splashGraphics.setColor(Color.BLACK);
+ splashGraphics.drawString("Version : " + version, 394, 42);
+ splash.update();
+ }
+ }
+
/**
* Update progression.
*
Modified: trunk/lima-swing/src/main/resources/images/puzzle_splash.png
===================================================================
(Binary files differ)
1
0
r3016 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui resources/import
by jpepin@users.chorem.org 23 Aug '10
by jpepin@users.chorem.org 23 Aug '10
23 Aug '10
Author: jpepin
Date: 2010-08-23 18:49:11 +0200 (Mon, 23 Aug 2010)
New Revision: 3016
Url: http://chorem.org/repositories/revision/lima/3016
Log:
Ajout ic?\195?\180ne ?\195?\160 la fen?\195?\170tre principale.
Mis ?\195?\160 jour fichier journaux par d?\195?\169faut.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/resources/import/eb_default.csv
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 16:49:11 UTC (rev 3016)
@@ -19,7 +19,8 @@
defaultCloseOperation="do_nothing_on_close"
undecorated='{getConfig().isFullScreen()}'
resizable="true" width="800" height="600"
- extendedState='{this.MAXIMIZED_BOTH}'>
+ extendedState='{this.MAXIMIZED_BOTH}'
+ iconImage='{new ImageIcon(getClass().getResource("/images/puzzle_icon.png")).getImage()}'>
<java.awt.Desktop id='desktop' javaBean='java.awt.Desktop.getDesktop()'/>
Modified: trunk/lima-swing/src/main/resources/import/eb_default.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/eb_default.csv 2010-08-23 16:38:53 UTC (rev 3015)
+++ trunk/lima-swing/src/main/resources/import/eb_default.csv 2010-08-23 16:49:11 UTC (rev 3016)
@@ -1,4 +1,4 @@
-"ENBK";"ACH";"Journal des achats";"Achats"
-"ENBK";"VTE";"Journal des ventes";"Ventes"
-"ENBK";"ODT";"Journal des opérations diverses";"Général"
-"ENBK";"BQE";"Journal de trésorerie";"Trésorerie"
+"ENBK";"ACH";"Journal des achats"
+"ENBK";"VTE";"Journal des ventes"
+"ENBK";"ODT";"Journal des opérations diverses"
+"ENBK";"BQE";"Journal de trésorerie"
1
0
Author: jpepin
Date: 2010-08-23 18:38:53 +0200 (Mon, 23 Aug 2010)
New Revision: 3015
Url: http://chorem.org/repositories/revision/lima/3015
Log:
Suppression de code inutile.
Nettoyage des cl?\195?\169s i18n et traduction.
Added:
trunk/lima-swing/src/main/resources/images/puzzle_icon.png
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx
trunk/lima-swing/src/main/resources/images/logo-codelutin.png
trunk/lima-swing/src/main/resources/images/splash.png
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java
trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -85,7 +85,7 @@
accountDAO.findByAccountNumber(account.getAccountNumber());
if (existAccount != null) {
throw new LimaBusinessException(_(
- "An account already exists with this number : %s",
+ "lima-business.account.accountalreardyexist",
account.getAccountNumber()));
}
@@ -153,7 +153,7 @@
accountDAO.findByAccountNumber(account.getAccountNumber());
if (existAccount != null) {
throw new LimaBusinessException(_(
- "An account already exists with this number : %s",
+ "lima-business.account.accountalreardyexist",
account.getAccountNumber()));
}
@@ -432,109 +432,6 @@
}
- /*
- * Convert string of extends number to list of accounts
- * Example '22, 45..48, 67' -> [22, 45, 46, 47, 48, 67]
- * SubAccountsMode return list of existing subaccounts ex 6 return : 61, 62, .., 69, 610, .., 619 etc
- *
- @Override
- public List<Account> stringToListAccountsWithTransaction(String selectedAccounts, Boolean subAccountsMode, TopiaContext topiaContext) throws LimaException{
- List<Account> accounts = new ArrayList<Account>();
- if (selectedAccounts != null){
- try {
- AccountDAO accountDAO =
- LimaCallaoDAOHelper.getAccountDAO(topiaContext);
- //Remove Spaces
- selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts);
- //use hashset for delete duplicate numbers
- HashSet<String> accountNumbers = new HashSet<String>();
- HashSet<String> accountNumbersToRemove = new HashSet<String>();
- Boolean first = true;
- StringTokenizer stStar = new StringTokenizer(selectedAccounts, "-");
- while (stStar.hasMoreTokens()) {
- String subString = stStar.nextToken();
-
- //Split comma
- StringTokenizer stComma = new StringTokenizer(subString, ",");
- while (stComma.hasMoreTokens()) {
- String s = stComma.nextToken();
- if (s.contains("..")){
- //Split ..
- String stringDoubleDot[] = s.split("\\.\\.");
- int lowAccount=Integer.parseInt(stringDoubleDot[0]);
- int highAccount=Integer.parseInt(stringDoubleDot[1]);
- for (int i=lowAccount; i <= highAccount; i++) {
- //if first add accounts, else remove
- if (first){
- accountNumbers.add(String.valueOf(i));
- }
- else {
- accountNumbersToRemove.add(String.valueOf(i));
- }
- }
- }
- else{
- //if first
- if (first){
- accountNumbers.add(s);
- }
- else {
- accountNumbersToRemove.add(s);
- }
- }
- }
- first=false;
- }
- //add all accounts
- for (String accountNumber : accountNumbers) {
- Account account = null;
- if (subAccountsMode){
- account = accountDAO.findSubAccountByNumber(accountNumber);
- }
- else {
- account = accountDAO.findByAccountNumber(accountNumber);
-
- }
- //add account if exist
- if (account != null){
- accounts.add(account);
- }
- //search all account start with accountnumber
- else {
- TopiaQuery query = accountDAO.createQuery();
- String subAccountsProperty = TopiaQuery.getProperty(Account.SUB_ACCOUNTS);
- //String subLedgersProperty = TopiaQuery.getProperty(Account.SUB_LEDGERS);
- query.addWhere("not exists elements ("+subAccountsProperty+")")
- //.addWhere("not exists elements ("+subLedgersProperty+")")
- .addWhere(Account.ACCOUNT_NUMBER, Op.LIKE, accountNumber+"%");
- List<Account> accountsResult = accountDAO.findAllByQuery(query);
- if (accountsResult != null){
- accounts.addAll(accountsResult);
- }
- }
- }
- //remove all accounts
- for (String accountNumber : accountNumbersToRemove) {
- Account account = null;
- if (subAccountsMode){
- account = accountDAO.findSubAccountByNumber(accountNumber);
- }
- else {
- account = accountDAO.findByAccountNumber(accountNumber);
- }
- if (account != null) {
- accounts.remove(account);
- }
- }
- }
- catch (TopiaException ex) {
- doCatch(topiaContext, ex, log);
- }
- }
-
- return accounts;
- }*/
-
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
// TODO move it into JTA
@@ -554,6 +451,5 @@
throw eee;
}
}
-
}
\ No newline at end of file
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -272,7 +272,6 @@
//create pages
for (List<FinancialStatementAmounts> list : listList) {
String title = list.get(0).getLabel();
- //list = list.subList(1, list.size());
int i = 0;
int n = list.size();
int max = n;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -85,7 +85,7 @@
entryBookDAO.findByLabel(entryBook.getCode());
if (existingEntryBook != null) {
throw new LimaBusinessException(
- _("An EntryBook already exists with this label : %s",
+ _("lima-business.entrybook.entrybookalreadyexist",
entryBook.getLabel()));
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -209,7 +209,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -249,7 +249,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -279,7 +279,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -366,7 +366,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
@@ -381,7 +381,7 @@
*/
public void exportEntryBookChartAsCSV(CSVWriter csvWriter, TopiaContext topiaContext) throws LimaException {
try {
- String[] nextLine = new String[4];
+ String[] nextLine = new String[3];
// Get all entrybook
EntryBookDAO entryBookDAO =
LimaCallaoDAOHelper.getEntryBookDAO(topiaContext);
@@ -391,7 +391,6 @@
nextLine[0] = ImportExportEntityEnum.ENTRYBOOK.getLabel();
nextLine[1] = entryBook.getCode();
nextLine[2] = entryBook.getLabel();
- nextLine[3] = entryBook.getType();
// Ajoute la ligne au fichier
csvWriter.writeNext(nextLine);
}
@@ -423,7 +422,7 @@
doCatch(topiaContext, eeeTE, log);
}
catch (IOException eeeIO) {
- log.debug("Can't create new CSV Writer",eeeIO);
+ log.error("Can't create new CSV Writer",eeeIO);
}
finally {
doFinally(topiaContext, log);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -90,19 +90,6 @@
FinancialStatementDAO financialStatementDAO =
LimaCallaoDAOHelper.getFinancialStatementDAO(topiaContext);
- /* check if FinancialStatementHeader label already exist
- * too much strict check, many financialstatement can have the same name
- *
- * FinancialStatement existFinancialStatementHeader =
- financialStatementDAO.findByLabel(financialStatement.getLabel());
-
-
- if (existFinancialStatementHeader != null) {
- throw new LimaBusinessException(_(
- "An financialStatement already exists with this label : %s",
- financialStatement.getLabel()));
- }*/
-
financialStatementDAO.create(financialStatement);
FinancialStatement masterfinancialStatementUpdate = null;
@@ -560,8 +547,8 @@
for (Account account : accountsList) {
- result.append(_("lima-business.financialstatement.check.nothing")
- + " : "+account.getAccountNumber()+" - "+account.getLabel()+"\n");
+ result.append(_("lima-business.financialstatement.check.nothing",
+ account.getAccountNumber(), account.getLabel()));
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -678,9 +678,7 @@
break;
}
}
- log.debug(query);
financialTransactions = financialTransactionDAO.findAllByQuery(query);
- log.debug(financialTransactions);
EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
for (FinancialTransaction financialTransaction : financialTransactions) {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -35,7 +35,6 @@
import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
import org.chorem.lima.business.ejbinterface.FiscalPeriodServiceLocal;
import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FinancialPeriodDAO;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FiscalPeriodDAO;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
@@ -253,35 +252,6 @@
}
}
- /**
- * just for debug, this method must delete
- * Unauthorized action for user !!!
- */
- public void removeAllFiscalPeriods() throws LimaException{
- TopiaContext transaction = null;
- try {
- transaction = beginTransaction();
-
- FiscalPeriodDAO fiscalPeriodDAO =
- LimaCallaoDAOHelper.getFiscalPeriodDAO(transaction);
- FinancialPeriodDAO financialPeriodDAO =
- LimaCallaoDAOHelper.getFinancialPeriodDAO(transaction);
- for (FiscalPeriod fiscalPeriod : fiscalPeriodDAO.findAll()) {
- for (FinancialPeriod financialPeriod : fiscalPeriod.getFinancialPeriod()){
- financialPeriodDAO.delete(financialPeriod);
- }
- fiscalPeriodDAO.delete(fiscalPeriod);
- }
-
- commitTransaction(transaction);
-
- } catch (TopiaException ex) {
- doCatch(transaction, ex, log);
- }
- finally {
- doFinally(transaction, log);
- }
- }
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -19,6 +19,7 @@
package org.chorem.lima.business.ejb;
+import static org.nuiton.i18n.I18n._;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
@@ -36,7 +37,6 @@
import java.util.TreeMap;
import javax.ejb.EJB;
import javax.ejb.Stateless;
-
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -187,7 +187,7 @@
if (!Arrays.asList(strat.getColumnMapping()).containsAll(
headAccount)) {
throw new LimaBusinessException(
- "ERROR : This file contains no entries");
+ _("lima-business.import.ebpnoentry"));
}
CsvToBean<EntryEBPImpl> csv = new CsvToBean<EntryEBPImpl>();
@@ -207,7 +207,7 @@
if (nbFiscalPeriods == 0) {
throw new LimaBusinessException(
- "Can't import entries, no fiscalperiod is open");
+ _("lima-business.import.nofiscalperiodopen"));
}
FinancialTransaction financialTransaction = null;
@@ -224,17 +224,13 @@
// if account not exist not export
if (account == null) {
throw new LimaBusinessException(
- "FAILED : Account "
- + entryEBP.getCompte()
- + " not exist !\n"
- + "Import aborted ! Create all accounts before import entries");
+ _("lima-business.import.ebpmissingaccount",
+ entryEBP.getCompte()));
}
else if (date.compareTo(beginDate) < 0 || date.compareTo(endDate) > 0){
- result.append("WARNING : " + date + " entries is out of range of" +
- " opened fiscal periods. "
- + "Entry was skip !\n");
+ result.append(_("lima-business.import.entriesoutofdatesrange",date));
}
else {
entry.setAccount(account);
@@ -260,8 +256,7 @@
entryBook.setCode(entryBookCode);
// create it
entryBookService.createEntryBook(entryBook);
- result.append("WARNING : Entrybook " + entryBook
- + "not exist was created !\n");
+ result.append(_("lima-business.import.entrybooknotexist",entryBook));
}
if (financialTransaction == null
@@ -287,15 +282,13 @@
financialTransactionService
.createFinancialTransactionWithTransaction(
financialTransaction, topiaContext);
- result.append("SUCCES : FinancialTransaction" + date + " "
- + entryBook.getCode() + " added\n");
+ result.append(_("lima-business.import.transactionadded", date, entryBook.getCode()));
}
financialTransaction.addEntry(entry);
financialTransactionService.createEntryWithTransaction(
entry, topiaContext);
- result.append("SUCCES : Entry" + entry.getDescription() + " "
- + entry.getAmount() + " added\n");
+ result.append(_("lima-business.import.entryadded", entry.getDescription(), entry.getAmount()));
}
}
// update last financial transaction
@@ -310,13 +303,9 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- if (log.isDebugEnabled()) {
- log.debug("Can't read string", eeeIO);
- }
+ log.error("Can't read string", eeeIO);
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
} finally {
doFinally(topiaContext, log);
}
@@ -343,7 +332,7 @@
if (!Arrays.asList(strat.getColumnMapping()).containsAll(
headAccount)) {
throw new LimaBusinessException(
- "ERROR : This file contains no account");
+ _("lima-business.import.noaccount"));
}
CsvToBean<AccountEBPImpl> csv = new CsvToBean<AccountEBPImpl>();
@@ -355,8 +344,7 @@
for (AccountEBP accountEBP : list) {
String accountNumber = accountEBP.getNumero();
if (accountDAO.findByAccountNumber(accountNumber) != null) {
- result.append("FAILED : Account" + accountNumber
- + " already exist \n");
+ result.append(_("lima-business.import.accountalreadyexist", accountNumber));
} else {
String label = accountEBP.getIntitule();
Account account = new AccountImpl();
@@ -376,8 +364,7 @@
}
accountService.createSubLedgerWithTransaction(
masterAccount, account, topiaContext);
- result.append("SUCCES : Account" + accountNumber + " "
- + label + " added\n");
+ result.append(_("lima-business.import.accountadded", accountNumber, label));
}
// else is account
else {
@@ -386,8 +373,7 @@
if (nbCharAccountNumber == 1) {
accountService.createAccountWithTransaction(null,
account, topiaContext);
- result.append("SUCCES : Account" + accountNumber + " "
- + label + " added\n");
+ result.append(_("lima-business.import.accountadded", accountNumber, label));
}
else {
Account masterAccount = null;
@@ -401,8 +387,7 @@
}
accountService.createAccountWithTransaction(
masterAccount, account, topiaContext);
- result.append("SUCCES : Account" + accountNumber + " "
- + label + " added\n");
+ result.append(_("lima-business.import.accountadded", accountNumber, label));
}
}
}
@@ -410,9 +395,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- if (log.isDebugEnabled()) {
- log.debug("Can't read string", eeeIO);
- }
+ log.error("Can't read string", eeeIO);
} finally {
doFinally(topiaContext, log);
}
@@ -523,7 +506,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- log.debug("Can't create new CSV Reader", eeeIO);
+ log.error("Can't create new CSV Reader", eeeIO);
} finally {
doFinally(topiaContext, log);
}
@@ -593,7 +576,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (IOException eeeIO) {
- log.debug("Can't create new CSV Reader", eeeIO);
+ log.error("Can't create new CSV Reader", eeeIO);
} finally {
doFinally(topiaContext, log);
}
@@ -633,8 +616,7 @@
// put it in hashset
accounts.put(accountNumber, accountImport);
} else {
- result.append("FAILED : The account " + accountNumber
- + " already exists !\n");
+ result.append(_("lima-business.import.accountalreadyexist", accountNumber));
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -665,13 +647,10 @@
if (fiscalPeriodDAO.findByNaturalId(beginDate, endDate) == null) {
fiscalPeriods.add(fiscalPeriod);
} else {
- result.append("FAILED : The fiscalperiod " + beginDate + "-"
- + endDate + " already exists !\n");
+ result.append(_("lima-business.import.fiscalperiodalreadyexist", beginDate , endDate));
}
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
}
@@ -692,17 +671,14 @@
EntryBook entryBook = new EntryBookImpl();
entryBook.setCode(nextLine[1]);
entryBook.setLabel(nextLine[2]);
- entryBook.setType(nextLine[3]);
// if exist, skip
if (entryBookDAO.findByCode(entryBook.getCode()) != null) {
- result.append("FAILED : The entrybook " + entryBook.getLabel()
- + " already exists !\n");
+ result.append(_("lima-business.import.entrybookalreadyexist", entryBook.getLabel()));
} else {
// create it
entryBookService.createEntryBook(entryBook);
- result.append("SUCCESS : The financialStatement "
- + entryBook.getLabel() + " is created ! \n");
+ result.append(_("lima-business.import.financialstatementadded", entryBook.getLabel()));
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -788,8 +764,7 @@
financialStatements.put(label, (ArrayList<FinancialStatementImport>) list);
}
} else {
- result.append("FAILED : The financialstatement " + label
- + " already exists !\n");
+ result.append(_("lima-business.import.financialstatementalreadyexist", label));
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
@@ -911,18 +886,15 @@
masterFinancialStatement,
financialStatement, topiaContext);
- result.append("SUCCESS : The financialStatement "
- + financialStatementImport.getLabel()
- + " is created ! \n");
+ result.append(_("lima-business.import.financialstatementadded",
+ financialStatementImport.getLabel()));
itr2.remove();
} else if (!financialStatements
.containsKey(masterFinancialStatementLabel)) {
- result.append("FAILED : The financialStatement "
- + financialStatementImport.getLabel()
- + " have masterFinancialStatement : "
- + masterFinancialStatementLabel
- + "which not exist \n");
+ result.append(_("lima-business.import.financialstatementalnomaster",
+ financialStatementImport.getLabel(),
+ masterFinancialStatementLabel));
itr2.remove();
}
}
@@ -945,11 +917,11 @@
try {
fiscalPeriodService.createFiscalPeriodWithTransaction(
fiscalPeriod, topiaContext);
- result.append("SUCCESS : The fiscalPeriod "
- + fiscalPeriod.getBeginDate() + "-"
- + fiscalPeriod.getEndDate() + " is created ! \n");
+ result.append(_("lima-business.import.fiscalperiodadded",
+ fiscalPeriod.getBeginDate(),
+ fiscalPeriod.getEndDate()));
} catch (LimaException eee) {
- result.append("FAILED : " + eee + " \n");
+ result.append(_("lima-business.common.failed", eee.getMessage()));
}
}
return result.toString();
@@ -993,16 +965,15 @@
accountService.createAccountWithTransaction(
masterAccount, account, topiaContext);
}
- result.append("SUCCESS : The account "
- + accountImport.getAccountNumber()
- + " is created ! \n");
+ result.append(_("lima-business.import.accountadded",
+ accountImport.getAccountNumber(),
+ accountImport.getLabel()));
itr.remove();
} else if (!accounts.containsKey(masterAccountNumber)
&& !accounts.containsKey(generalLedgerNumber)) {
- result.append("FAILED : The account "
- + accountImport.getAccountNumber()
- + " have masterAccount : "
- + masterAccountNumber + "which not exist \n");
+ result.append(_("lima-business.import.accountnomaster",
+ accountImport.getAccountNumber(),
+ masterAccountNumber));
itr.remove();
}
}
@@ -1046,20 +1017,16 @@
financialPeriodService
.blockClosedPeriodicEntryBookWithTransaction(
closedPeriodicEntryBook, topiaContext);
- result.append("SUCCESS : The blockClosedPeriodicEntryBook "
- + beginDateFinancialPeriod + "-"
- + endDateFinancialPeriod + ", " + codeEntryBook
- + " is updated ! \n");
+ result.append(_("lima-business.import.closedperiodicentrybookupdated",
+ beginDateFinancialPeriod, endDateFinancialPeriod, codeEntryBook));
} catch (LimaException eee) {
- result.append("FAILED : " + eee + " \n");
+ result.append(_("lima-business.common.failed", eee));
}
}
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
}
return result.toString();
}
@@ -1124,9 +1091,7 @@
} catch (TopiaException eeeTE) {
doCatch(topiaContext, eeeTE, log);
} catch (ParseException eeePE) {
- if (log.isDebugEnabled()) {
- log.debug("Can't parse date", eeePE);
- }
+ log.error("Can't parse date", eeePE);
}
return result.toString();
}
@@ -1151,8 +1116,7 @@
identityService.updateIdentityWithTransaction(identity, topiaContext);
// create it
- result.append("SUCCESS : The identity " + identity.getName()
- + " is created ! \n");
+ result.append(_("lima-business.import.identityadded", identity.getName()));
return result.toString();
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -44,7 +44,5 @@
void createFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
- void blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-
- void removeAllFiscalPeriods() throws LimaException;
+ void blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-en_GB.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,56 +1,62 @@
-An\ EntryBook\ already\ exists\ with\ this\ label\ \:\ %s=
-An\ account\ already\ exists\ with\ this\ number\ \:\ %s=
-An\ financialStatement\ already\ exists\ with\ this\ label\ \:\ %s=
-business.document.financialstatement=
-lima-business.config.configFileName.description=
-lima-business.config.rulesnationality=
-lima-business.document.accountnubmer=
-lima-business.document.accountnumber=
-lima-business.document.amount=Amout
-lima-business.document.amounts=
-lima-business.document.balance=
-lima-business.document.businessnumber=
+lima-business.account.accountalreardyexist=An account already exists with this number \: %s
+lima-business.common.failed=FAILED \: %s \n
+lima-business.document.accountnumber=Account N\u00B0
+lima-business.document.amounts=Amounts
+lima-business.document.balance=Balance
+lima-business.document.businessnumber=Business N\u00B0
lima-business.document.carryback=Carry Back
lima-business.document.carryforward=reporter\u00C0
-lima-business.document.classificationcode=
-lima-business.document.classificationcode\ \:=
-lima-business.document.createdate1=
-lima-business.document.createdate2=
+lima-business.document.classificationcode=Classification Code
+lima-business.document.createdate1=Editing Date
+lima-business.document.createdate2=to
lima-business.document.credit=Credit
lima-business.document.date=Date
-lima-business.document.date.begin=
-lima-business.document.date.end=
+lima-business.document.date.begin=Begin date
+lima-business.document.date.end=End date
lima-business.document.debit=Debit
lima-business.document.description=Description
lima-business.document.entrybook=EntryBook
-lima-business.document.financialstatement=
-lima-business.document.generalentrybook=
+lima-business.document.financialstatement=FinancialStatement
+lima-business.document.generalentrybook=General EntryBook
lima-business.document.grossamount=Gross Amount
lima-business.document.label=Label
-lima-business.document.ledger=
-lima-business.document.movementcredit=
-lima-business.document.movementdebit=
+lima-business.document.ledger=Ledger
+lima-business.document.movementcredit=Credit movement
+lima-business.document.movementdebit=Debit movement
lima-business.document.netamount=Net Amount
-lima-business.document.pagenumber=
-lima-business.document.period1=
-lima-business.document.period2=
+lima-business.document.pagenumber=Page N\u00B0
+lima-business.document.period1=Periode from
+lima-business.document.period2=to
lima-business.document.provisiondeprecationamount=Provision Deprecation Amount
lima-business.document.solde=Solde
-lima-business.document.soldecredit=
-lima-business.document.soldedebit=
-lima-business.document.vatnumber=
+lima-business.document.soldecredit=Credit solde
+lima-business.document.soldedebit=Debit solde
+lima-business.document.vatnumber=VAT N\u00B0
lima-business.document.voucher=Voucher
-lima-business.financialstatement.check.nothing=
-lima-business.financialstatement.check.warn=
-lima.business.document.date=Date
+lima-business.entrybook.entrybookalreadyexist=An EntryBook already exists with this label \: %s
+lima-business.financialstatement.check.nothing=Not found \: %s - %s \n
+lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financialstatement.\n Some account marked not found is normally.\n\n
+lima-business.import.accountadded=SUCCES \: Account %s - %s added\n
+lima-business.import.accountalreadyexist=FAILED \: Account %s already exist \n
+lima-business.import.accountnomaster=FAILED \: The account %s have master \: %s which not exist \n
+lima-business.import.closedperiodicentrybookupdated=SUCCESS \: The blockClosedPeriodicEntryBook %s - %s - %s is updated \! \n
+lima-business.import.ebpmissingaccount=FAILED \: Account %s already exist, import aborted. \nCreate all accounts before import entries.
+lima-business.import.ebpnoentry=FAILED \: This file contains no entries.
+lima-business.import.entriesoutofdatesrange=WARNING \: %s entries is out of range of opened fiscal periods. Entry was skip \!\n
+lima-business.import.entryadded=SUCCES \: Entry %s %s added\n"
+lima-business.import.entrybookalreadyexist=FAILED \: The entrybook %s already exists \!\n
+lima-business.import.entrybooknotexist=WARNING \: Entrybook %s not exist was created \!\n
+lima-business.import.financialstatementadded=SUCCESS \: The financialStatement %s is created \n
+lima-business.import.financialstatementalnomaster=FAILED \: The financialStatement %s have master \: %s which not exist \n
+lima-business.import.financialstatementalreadyexist=FAILED \: The financialstatement %s already exists \!\n
+lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
+lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
+lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
+lima-business.import.noaccount=ERROR \: This file contains no account
+lima-business.import.nofiscalperiodopen=FAILED \: No Fiscal period open \! \n
+lima-business.import.transactionadded=SUCCES \: FinancialTransaction, %s - %s, added\n
lima.config.configFileName.description=
-lima.config.http-port=
-lima.config.httpport=
-lima.config.reports-dir=
-lima.config.reportsdir=
-lima.config.rulesnationality=
-lima.config.serveraddress=
-lima.table.grossamount=
-lima.table.label=Test
-lima.table.netamount=
-lima.table.provisiondeprecationamount=
+lima.config.httpport=HTTP Port
+lima.config.reportsdir=Reports directories
+lima.config.rulesnationality=Rules Nationality
+lima.config.serveraddress=Server Address
Modified: trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-business/src/main/resources/i18n/lima-business-fr_FR.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,11 +1,8 @@
-An\ EntryBook\ already\ exists\ with\ this\ label\ \:\ %s=
-An\ account\ already\ exists\ with\ this\ number\ \:\ %s=
-An\ financialStatement\ already\ exists\ with\ this\ label\ \:\ %s=
-business.document.financialstatement=
+lima-business.account.accountalreardyexist=Un compte existe d\u00E9j\u00E0 avec ce num\u00E9ro \: %s
+lima-business.common.failed=\u00C9chec \: %s \n
lima-business.document.accountnumber=N\u00B0 Compte
lima-business.document.amounts=Totaux
lima-business.document.balance=Balance
-lima-business.document.beginDate=Date de d\u00E9but \:
lima-business.document.businessnumber=N\u00B0 Siret
lima-business.document.carryback=Report
lima-business.document.carryforward=\u00C0 reporter
@@ -18,7 +15,6 @@
lima-business.document.date.end=Date de fin \:
lima-business.document.debit=D\u00E9bit
lima-business.document.description=Description
-lima-business.document.endDate=Date de fin \:
lima-business.document.entrybook=Journal
lima-business.document.financialstatement=Bilan et compte de r\u00E9sultat
lima-business.document.generalentrybook=Journal G\u00E9n\u00E9ral
@@ -37,12 +33,30 @@
lima-business.document.soldedebit=Solde D\u00E9biteur
lima-business.document.vatnumber=N\u00B0 TVA
lima-business.document.voucher=Pi\u00E8ce comptable
-lima-business.financialstatement.check.nothing=Introuvable
+lima-business.entrybook.entrybookalreadyexist=Un journal existe d\u00E9j\u00E0 avec ce libell\u00E9 \: %s
+lima-business.financialstatement.check.nothing=Introuvable \: %s - %s \n
lima-business.financialstatement.check.warn=Attention cette fonctionnalit\u00E9 n'est qu'une aide utilisateur.\n Certains comptes ne doivent pas \u00EAtre pr\u00E9sent au bilan et compte de r\u00E9sultat.\n Il est donc normal que des comptes sont marqu\u00E9s comme introuvable.\n\n
+lima-business.import.accountadded=Succ\u00E8s \: Compte %s - %s ajout\u00E9\n
+lima-business.import.accountalreadyexist=\u00C9chec \: Le compte %s existe d\u00E9j\u00E0 \n
+lima-business.import.accountnomaster=\u00C9chec \: Le compte %s poss\u00E8de le master \: %s inexistant \n
+lima-business.import.closedperiodicentrybookupdated=Succ\u00E8s \: La p\u00E9riode financi\u00E8re %s - %s - %s est ajout\u00E9e \! \n
+lima-business.import.ebpmissingaccount=\u00C9chec \: Compte %s inexistant. \nImportation annul\u00E9e. \nCr\u00E9er tous les comptes avant d'importer les \u00E9critures.
+lima-business.import.ebpnoentry=\u00C9chec \: Ce fichier ne contient aucune entr\u00E9e.
+lima-business.import.entriesoutofdatesrange=Attention \: Cette entr\u00E9e %s ne fait partie d'aucune p\u00E9riode ouverte. Entr\u00E9e non import\u00E9e \!\n
+lima-business.import.entryadded=Succ\u00E8s \: Entr\u00E9e %s %s ajout\u00E9e \n
+lima-business.import.entrybookalreadyexist=\u00C9chec \: Le journal %s exist d\u00E9j\u00E0 \!\n
+lima-business.import.entrybooknotexist=Attention \: Le journal %s inexistant a \u00E9t\u00E9 cr\u00E9\u00E9 \!\n
+lima-business.import.financialstatementadded=Succ\u00E8s \: Mouvement %s ajout\u00E9e \n
+lima-business.import.financialstatementalnomaster=u00C9chec \: Le mouvement %s poss\u00E8de le master \: %s inexistant \n
+lima-business.import.financialstatementalreadyexist=u00C9chec \: Le mouvement %s exist d\u00E9j\u00E0 \!\n
+lima-business.import.fiscalperiodadded=Succ\u00E8s \: Exercice %s - %s ajout\u00E9e \! \n
+lima-business.import.fiscalperiodalreadyexist=u00C9chec \: L'exerice %s - %s existe d\u00E9j\u00E0 \!\n
+lima-business.import.identityadded=Succ\u00E8s \: Identit\u00E9 %s ajout\u00E9e \! \n
+lima-business.import.noaccount=Erreur \: Ce fichier ne contient aucun compte.
+lima-business.import.nofiscalperiodopen=u00C9chec \: Aucun exercice ouvert \! \n
+lima-business.import.transactionadded=Succ\u00E8s \: Transaction, %s, %s, ajout\u00E9e\n
lima.config.configFileName.description=
-lima.config.http-port=
-lima.config.httpport=
-lima.config.reports-dir=
-lima.config.reportsdir=
-lima.config.rulesnationality=
-lima.config.serveraddress=
+lima.config.httpport=Port HTTP
+lima.config.reportsdir=Dossier des rapports
+lima.config.rulesnationality=R\u00E8gles nationales
+lima.config.serveraddress=Addresse serveur
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -75,7 +75,6 @@
StringTokenizer stStar = new StringTokenizer(result, "-");
while (stStar.hasMoreTokens()) {
String subString = stStar.nextToken();
- log.debug(subString);
//Split comma
StringTokenizer stComma = new StringTokenizer(subString, ",");
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -80,9 +80,9 @@
}
} catch (Exception ex) {
if (log.isErrorEnabled()) {
- log.error(_("Global lima exception"), ex);
+ log.error(_("lima.common.globalexception"), ex);
}
- ErrorHelper.showErrorDialog(_("Global lima exception"), ex);
+ ErrorHelper.showErrorDialog(_("lima.common.globalexception"), ex);
System.exit(1);
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -98,10 +98,10 @@
splashGraphics.setComposite(AlphaComposite.Clear);
splashGraphics.fillRect(65, 238, 300, 15);
splashGraphics.setPaintMode();
- splashGraphics.setColor(new Color(255, 210, 55));
+ splashGraphics.setColor(Color.DARK_GRAY);
Font font = new Font("Lucida Sans", Font.BOLD, 14);
splashGraphics.setFont(font);
- splashGraphics.drawString(message + "...", 65, 248);
+ splashGraphics.drawString(message + "...", 65, 249);
}
splash.update();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/actions/MiscAction.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -43,7 +43,6 @@
public void help() {
System.out.println(_("lima.message.help.usage"));
- System.out.println("Options (set with --option <key> <value>:");
for (LimaConfig.Option o : LimaConfig.Option.values()) {
System.out.println("\t" + o.key + "(" + o.defaultValue + "):" + o.description);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -105,13 +105,13 @@
<JMenu text="lima.importexport.import" actionIcon='import-element'>
<JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_IMPORT)'/>
<JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT)'/>
- <JMenuItem text="lima.importexport.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/>
+ <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/>
<JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT)'/>
</JMenu>
<JMenu text="lima.importexport.export" actionIcon='export-element'>
<JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_EXPORT)'/>
<JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_EXPORT)'/>
- <JMenuItem text="lima.importexport.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/>
+ <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/>
<JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_EXPORT)'/>
</JMenu>
</JMenu>
@@ -142,7 +142,7 @@
<JMenu text="lima.structure" mnemonic="{'S'}">
<JMenuItem text="lima.charts.account" onActionPerformed='getHandler().showAccountView(this)'
actionIcon='charts-accounts'/>
- <JMenuItem text="lima.charts.entrybook" onActionPerformed='getHandler().showEntryBookView(this)'
+ <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showEntryBookView(this)'
actionIcon='charts-entrybooks'/>
<JMenuItem text="lima.charts.fiscalyear" onActionPerformed='getHandler().showFiscalPeriodView(this)'
actionIcon='charts-fiscalperiod'/>
@@ -153,7 +153,7 @@
</JMenu>
<JMenu text="lima.entries" mnemonic="{'E'}">
- <JMenuItem text="lima.entries.addtransaction" onActionPerformed='getHandler().showTransactionView(this)'
+ <JMenuItem text="lima.entries.writetransaction" onActionPerformed='getHandler().showTransactionView(this)'
actionIcon='entries-balanced'/>
<JMenuItem text="lima.entries.searchunbalancedtransaction" onActionPerformed='getHandler().showTransactionUnbalancedView(this)'
actionIcon='entries-unbalanced'/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -201,7 +201,7 @@
}
}*/;
about.setTitle(_("lima.title.about"));
- about.setAboutText(_("lima.about.message"));
+ about.setAboutText(_("lima.title.about.description"));
about.setBottomText(ui.getConfig().getCopyrightText());
about.setIconPath("/icons/lima.png");
about.setLicenseFile("META-INF/lima-main-LICENSE.txt");
@@ -298,7 +298,7 @@
public void showEntryBookView(JAXXContext rootContext) {
MainView mainView = getUI(rootContext);
EntryBookView entryBookView= new EntryBookView(mainView);
- mainView.showTab(_("lima.charts.entrybook"), entryBookView);
+ mainView.showTab(_("lima.common.entrybooks"), entryBookView);
}
/**
@@ -362,7 +362,7 @@
public void showTransactionView(JAXXContext rootContext) {
MainView mainView = getUI(rootContext);
FinancialTransactionView transactionView = new FinancialTransactionView(mainView);
- mainView.showTab(_("lima.entries.addtransaction"), transactionView);
+ mainView.showTab(_("lima.entries.writetransaction"), transactionView);
}
public void showTransactionUnbalancedView(JAXXContext rootContext) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -33,7 +33,7 @@
<Table>
<row>
<cell fill="horizontal">
- <JLabel text="lima.account.number"/>
+ <JLabel text="lima.charts.account.number"/>
</cell>
<cell fill="horizontal">
<JTextField id="numberTextField" editable='{isAddState()}' text="{getAccount().getAccountNumber()}"/>
@@ -44,7 +44,7 @@
</row>
<row>
<cell fill="horizontal">
- <JLabel text="lima.account.label"/>
+ <JLabel text="lima.common.label"/>
</cell>
<cell fill="horizontal">
<JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -39,13 +39,13 @@
</JScrollPane>
</cell>
<cell fill="horizontal">
- <JButton id="addButton" text="lima.common.add"
+ <JButton id="addButton" text="lima.charts.account.addAccount"
onActionPerformed="getHandler().addAccount()"/>
</cell>
</row>
<row>
<cell fill="horizontal">
- <JButton id="addSubLedger" text="lima.common.addSubLedger"
+ <JButton id="addSubLedger" text="lima.charts.account.addSubLedger"
onActionPerformed="getHandler().addSubLedger()"
enabled="{isSelectedRow()}"/>
</cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -226,8 +226,8 @@
int selectedRow = view.getAccountsTreeTable().getSelectedRow();
if ( selectedRow != -1) {
int n = JOptionPane.showConfirmDialog(view,
- _("lima.question.remove.account"),
- _("lima.question"),
+ _("lima.charts.account.question.remove"),
+ _("lima.common.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (n == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -34,7 +34,7 @@
<Table>
<row>
<cell fill="horizontal">
- <JLabel text="lima.subledger.code"/>
+ <JLabel text="lima.common.code"/>
</cell>
<cell fill="horizontal">
<JTextField id="numberTextField" editable='{isAddState()}'
@@ -46,7 +46,7 @@
</row>
<row>
<cell fill="horizontal">
- <JLabel text="lima.account.label"/>
+ <JLabel text="lima.common.label"/>
</cell>
<cell fill="horizontal">
<JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -38,7 +38,7 @@
<cell><AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
</row></Table></cell>
<cell anchor="east">
- <JLabel id="accountSelectorLabel" text="lima.account"/>
+ <JLabel id="accountSelectorLabel" text="lima.common.account"/>
</cell>
<cell anchor="west">
<JComboBox javaBean='new org.chorem.lima.ui.accountsreports.AccountComboBox(getHandler())' />
@@ -58,19 +58,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -129,15 +129,15 @@
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -70,7 +70,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -82,7 +82,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -71,19 +71,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -140,15 +140,15 @@
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookTypeListModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,76 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.ui.combobox;
-
-import static org.nuiton.i18n.I18n._;
-import javax.swing.AbstractListModel;
-import javax.swing.ComboBoxModel;
-
-/**
- * Combo box model with entrybook types.
- * (achats, ventes, trésorerie, général, situation).
- *
- */
-public class EntryBookTypeListModel extends AbstractListModel implements ComboBoxModel {
-
- private static final long serialVersionUID = 1L;
-
- protected Object selectedObject;
-
- /** Data. TODO put string in another place, don't use hard coded string. */
- protected Object[] data = new Object[]{ _("lima.entrybook.type1"),
- _("lima.entrybook.type2"), _("lima.entrybook.type3"),
- _("lima.entrybook.type4"), _("lima.entrybook.type5")};
-
- public EntryBookTypeListModel() {
- super();
- }
-
- /*
- * @see javax.swing.ComboBoxModel#setSelectedItem(java.lang.Object)
- */
- @Override
- public void setSelectedItem(Object anItem) {
- selectedObject = anItem;
- }
-
- /*
- * @see javax.swing.ComboBoxModel#getSelectedItem()
- */
- @Override
- public Object getSelectedItem() {
- return selectedObject;
- }
-
- /*
- * @see javax.swing.ListModel#getSize()
- */
- @Override
- public int getSize() {
- return data.length;
- }
-
- /*
- * @see javax.swing.ListModel#getElementAt(int)
- */
- @Override
- public Object getElementAt(int index) {
- return data[index];
- }
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -33,7 +33,7 @@
<Table>
<row>
<cell>
- <JLabel text="lima.entrybook.code"/>
+ <JLabel text="lima.common.code"/>
</cell>
<cell>
<JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/>
@@ -44,7 +44,7 @@
</row>
<row>
<cell>
- <JLabel text="lima.entrybook.label"/>
+ <JLabel text="lima.common.label"/>
</cell>
<cell>
<JTextField id="entryBookLabelField" editable='{isAddState()}' text="{getEntryBook().getLabel()}"/>
@@ -55,16 +55,6 @@
</row>
<row>
<cell>
- <JLabel text="lima.entrybook.type"/>
- </cell>
- <cell>
- <JComboBox id="typeComboBox" model='{new org.chorem.lima.ui.combobox.EntryBookTypeListModel()}'
- selectedItem="{getEntryBook().getType()}"
- onActionPerformed="getEntryBook().setType((String)getTypeComboBox().getSelectedItem())"/>
- </cell>
- </row>
- <row>
- <cell>
<JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/>
</cell>
<cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTableModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -68,8 +68,9 @@
try {
result = entryBookService.getAllEntryBooks().size();
} catch (LimaException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ if (log.isDebugEnabled()){
+ log.debug("Can't get all entrybooks",e);
+ }
}
return result;
@@ -77,7 +78,7 @@
@Override
public int getColumnCount() {
- return 3;
+ return 2;
}
@Override
@@ -90,9 +91,6 @@
case 1:
res = _("lima.table.label");
break;
- case 2:
- res = _("lima.table.type");
- break;
}
return res;
}
@@ -118,9 +116,6 @@
case 1:
result = entryBook.getLabel();
break;
- case 2:
- result = entryBook.getType();
- break;
}
} catch (LimaException eee) {
if (log.isDebugEnabled()){
@@ -176,7 +171,9 @@
public void notifyMethod(String serviceName, String methodeName) {
//refresh on import datas
- if (methodeName.contains("importEntryBooks") || methodeName.contains("importAll") || methodeName.contains("importAs")){
+ if (methodeName.contains("importEntryBooks")
+ || methodeName.contains("importAll")
+ || methodeName.contains("importAs")){
fireTableDataChanged();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -42,7 +42,7 @@
</row>
<row>
<cell fill="horizontal">
- <JButton id="addButton" text="lima.entrybook.add"
+ <JButton id="addButton" text="lima.charts.entrybook.add"
onActionPerformed="getHandler().addEntryBook()"/>
</cell>
</row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -130,9 +130,9 @@
int response =
JOptionPane.showConfirmDialog(view,
- _("Do you really want to delete entry book %s ?",
+ _("lima.charts.entrybook.confirmation",
selectedEntryBook.getLabel()),
- _("Confirmation"), JOptionPane.YES_NO_OPTION,
+ _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -39,7 +39,7 @@
<cell><EntryBooksReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
</row></Table></cell>
<cell anchor="east">
- <JLabel id="entryBookSelectorLabel" text="lima.entrybook"/>
+ <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/>
</cell>
<cell anchor="west">
<JComboBox javaBean='new org.chorem.lima.ui.entrybooksreports.EntryBookComboBox(getHandler())' />
@@ -63,19 +63,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -149,15 +149,15 @@
view.amountSoldeLabel.setText(String.valueOf(amountSolde));
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -151,10 +151,10 @@
break;
case 2:
if(closedPeriodicEntryBook.getLocked()){
- result = _("lima.close");
+ result = _("lima.common.closed");
}
else{
- result = _("lima.open");
+ result = _("lima.common.open");
}
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -42,7 +42,7 @@
<Table>
<row>
<cell>
- <JButton id="blockButton" text="lima.financialperiod.block" enabled="{isSelectedPeriod()}"
+ <JButton id="blockButton" text="lima.charts.financialperiod.block" enabled="{isSelectedPeriod()}"
onActionPerformed="getHandler().blockFinancialPeriod();" />
</cell>
</row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -56,8 +56,8 @@
// blocked it
try {
ClosedPeriodicEntryBook closedPeriodicEntryBook = model.getFinancialPeriodAtRow(selectedRow);
- int response = JOptionPane.showConfirmDialog(view, _("lima.question.financialperiod.blocked"),
- _("lima.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int response = JOptionPane.showConfirmDialog(view, _("lima.charts.financialperiod.question.blocked"),
+ _("lima.common.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
model.blockFinancialPeriod(closedPeriodicEntryBook);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -236,8 +236,8 @@
int selectedRow = view.treeTable.getSelectedRow();
if ( selectedRow != -1) {
int n = JOptionPane.showConfirmDialog(view,
- _("lima.question.remove.account"),
- _("lima.question"),
+ _("lima.charts.account.question.remove"),
+ _("lima.common.confirmation"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (n == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.model.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -50,7 +50,7 @@
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
+ <JLabel id="beginCalendarPanelLabel" text="lima.common.begindate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
@@ -58,7 +58,7 @@
getHandler().refresh()" />
</cell>
<cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
+ <JLabel id="endCalendarPanelLabel" text="lima.common.enddate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CriteriaWidget.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,41 +0,0 @@
-<!-- ##% Lima Swing
- Copyright (C) 2008 - 2010 CodeLutin
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ##% -->
-
-<Table insets='5,5,5,5'>
- <script>
- protected void removeCriteriaWidget(){}
- </script>
- <row>
- <cell>
- <JAXXComboBox id="criteriaComboBox" width="200">
- <item value='date' label='{_("lima.date")}' selected="true"/>
- <item value='voucher' label='{_("lima.voucher")}'/>
- <item value='account' label='{_("lima.account")}'/>
- <item value='description' label='{_("lima.description")}'/>
- <item value='debit' label='{_("lima.debit")}'/>
- <item value='credit' label='{_("lima.credit")}'/>
- <item value='amount' label='{_("lima.amount")}'/>
- </JAXXComboBox>
- </cell>
- <cell weightx="0">
- <JPanel id="criteriaPanel"/>
- </cell>
- <cell>
- <JButton id="removeButton" text="lima.remove" onActionPerformed="removeCriteriaWidget()"/>
- </cell>
- </row>
-</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -54,7 +54,7 @@
editable="false"/>
</cell>
<cell anchor="east">
- <JLabel id="financialPeriodLabel" text="lima.transaction.period"
+ <JLabel id="financialPeriodLabel" text="lima.common.period"
/>
</cell>
<cell anchor="west">
@@ -75,11 +75,11 @@
onActionPerformed="getHandler().pasteRow()" enabled="{isSelectedRow()}"/>
</cell>
<cell>
- <JButton text="lima.add.transaction"
+ <JButton text="lima.entries.addTransaction"
onActionPerformed="getHandler().addFinancialTransaction()"/>
</cell>
<cell>
- <JButton text="lima.add.entry" onActionPerformed="getHandler().addEmptyEntry()" enabled="{isSelectedRow()}"/>
+ <JButton text="lima.entries.addEntry" onActionPerformed="getHandler().addEmptyEntry()" enabled="{isSelectedRow()}"/>
</cell>
<cell>
<JButton text="lima.common.remove"
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -179,14 +179,14 @@
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
String message = null;
if (selectedValue instanceof FinancialTransaction) {
- message = _("lima.question.remove.transaction");
+ message = _("lima.charts.financialtransaction.question.removetransaction");
}
else {
- message = _("lima.question.remove.entry");
+ message = _("lima.charts.financialtransaction.question.removeentry");
}
int response = JOptionPane.showConfirmDialog(view, message,
- _("lima.transaction.confirmdelete"), JOptionPane.YES_NO_OPTION);
+ _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -90,7 +90,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -102,7 +102,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -86,7 +86,7 @@
</row>
<row>
<cell fill='both'><Table><row>
- <cell><JLabel text="lima.amount"/></cell>
+ <cell><JLabel text="lima.common.amount"/></cell>
<cell><JComboBox id="amountComboBox" javaBean="new JComboBox(FinancialStatementWayEnum.descriptions())"
onActionPerformed="handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription((String)amountComboBox.getSelectedItem()));
handler.refresh()"/></cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -56,7 +56,7 @@
editable="false"/>
</cell>
<cell>
- <JButton text="lima.add.entry"
+ <JButton text="lima.entries.addEntry"
onActionPerformed="getHandler().addEmptyEntry()"
enabled="{isSelectedRow()}"/>
</cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -109,14 +109,14 @@
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
String message = null;
if (selectedValue instanceof FinancialTransaction) {
- message = _("lima.question.remove.transaction");
+ message = _("lima.charts.financialtransaction.question.removetransaction");
}
else {
- message = _("lima.question.remove.entry");
+ message = _("lima.charts.financialtransaction.question.removeentry");
}
int response = JOptionPane.showConfirmDialog(view, message,
- _("lima.transaction.confirmdelete"), JOptionPane.YES_NO_OPTION);
+ _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.YES_OPTION) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -80,7 +80,7 @@
<Table fill="both">
<row>
<cell>
- <JLabel text="lima.period.begindate"/>
+ <JLabel text="lima.common.begindate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/>
@@ -88,7 +88,7 @@
</row>
<row>
<cell>
- <JLabel text="lima.period.enddate"/>
+ <JLabel text="lima.common.enddate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -143,10 +143,10 @@
break;
case 1:
if(fiscalPeriod.getLocked()){
- result = _("lima.close");
+ result = _("lima.common.closed");
}
else{
- result = _("lima.open");
+ result = _("lima.common.open");
}
break;
}
@@ -181,11 +181,6 @@
fireTableRowsInserted(currentRowCount, currentRowCount);
}
- public void removeAllFiscalPeriods() throws LimaException {
- fiscalPeriodService.removeAllFiscalPeriods();
- fireTableDataChanged();
- }
-
public void blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException {
fiscalPeriodService.blockFiscalPeriod(fiscalPeriod);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -41,20 +41,14 @@
</row>
<row>
<cell fill="horizontal">
- <JButton id="addButton" text="lima.fiscalperiod.addFiscalPeriod"
+ <JButton id="addButton" text="lima.charts.fiscalperiod.add"
onActionPerformed="getHandler().addFiscalPeriod()"/>
</cell>
</row>
<row>
<cell>
- <JButton id="blockButton" text="lima.fiscalperiod.block" enabled="{isSelectedPeriod()}"
+ <JButton id="blockButton" text="lima.charts.fiscalperiod.block" enabled="{isSelectedPeriod()}"
onActionPerformed="getHandler().blockFiscalPeriod()" />
</cell>
</row>
- <row>
- <cell>
- <JButton id="deleteButton" text="DEBUG delete all"
- onActionPerformed="getHandler().removeAllFiscalPeriods()" />
- </cell>
- </row>
</Table>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,8 +69,8 @@
int n = 0;
if(nbMonth !=12){
n = JOptionPane.showConfirmDialog(getView(),
- _("lima.question.fiscalperiod.morethan12"),
- _("lima.question"),
+ _("lima.charts.fiscalperiod.question.morethan12"),
+ _("lima.common.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
}
@@ -99,8 +99,8 @@
model.getFiscalPeriodAtRow(selectedRow);
int response =
JOptionPane.showConfirmDialog(getView(),
- _("lima.question.fiscalperiod.blocked"),
- _("lima.question"), JOptionPane.YES_NO_OPTION,
+ _("lima.charts.fiscalperiod.question.blocked"),
+ _("lima.common.question"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
@@ -114,20 +114,6 @@
}
}
- /** just for debug, no release version */
- public void removeAllFiscalPeriods(){
- FiscalPeriodTableModel model =
- (FiscalPeriodTableModel)getView().getFiscalPeriodTable().getModel();
- try {
- model.removeAllFiscalPeriods();
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't delete all fiscal period", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
- }
-
public FiscalPeriodView getView() {
return view;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -92,18 +92,18 @@
List<Account> accounts = accountService.getAllAccounts();
if (accounts.size()>0){
setBackground(greenBackground);
- String accountsString = _("limahome.chartaccounts.state1_2") + " "
- + accounts.size() + " " + _("limahome.chartaccounts.state2_2")
+ String accountsString = _("lima.home.chartaccounts.state1_2") + " "
+ + accounts.size() + " " + _("lima.home.chartaccounts.state2_2")
+ "<br/><br/><a href='#accountschart'>"
- + _("limahome.chartaccounts.modify") + "</a>";
+ + _("lima.home.chartaccounts.modify") + "</a>";
//set Text
setText(htmlBegin + accountsString + htmlEnd);
}
else {
setBackground(redBackground);
- String accountsString = _("limahome.chartaccounts.nothing")
+ String accountsString = _("lima.home.chartaccounts.nothing")
+ "<br/><br/><a href='#accountschart'>"
- + _("limahome.chartaccounts.create") + "</a>";
+ + _("lima.home.chartaccounts.create") + "</a>";
//set Text
setText(htmlBegin + accountsString + htmlEnd);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -94,23 +94,23 @@
setBackground(greenBackground);
String entryBooksString="";
if (ebSize == 1){
- entryBooksString = _("limahome.entrybooks.state.single")
+ entryBooksString = _("lima.home.entrybooks.state.single")
+ "<br/>" + entryBooks.get(0)
+ "<br/><br/><a href='#entrybookschart'>"
- + _("limahome.entrybooks.modify") + "</a>";
+ + _("lima.home.entrybooks.modify") + "</a>";
}
else {
- entryBooksString = _("limahome.entrybooks.state1_2.plural")
+ entryBooksString = _("lima.home.entrybooks.state1_2.plural")
+ " " + entryBooks.size() + " "
- + _("limahome.entrybooks.state2_2.plural") + "<ul>";
+ + _("lima.home.entrybooks.state2_2.plural") + "<ul>";
for (EntryBook entryBook : entryBooks) {
entryBooksString += "<li>"+entryBook.getCode() +
" - "+entryBook.getLabel()+"</li>";
}
entryBooksString += "</ul></p><p horizontal-align:'center'>"
+ "<a href='#entrybookschart'>"
- + _("limahome.entrybooks.modify") + "</a>";
+ + _("lima.home.entrybooks.modify") + "</a>";
}
//set Text
setText(htmlBegin + entryBooksString + htmlEnd);
@@ -119,9 +119,9 @@
setBackground(redBackground);
//set Text
setText(htmlBegin
- + _("limahome.entrybooks.nothing")
+ + _("lima.home.entrybooks.nothing")
+ "<br/><br/><a href='#entrybookschart'>"
- + _("limahome.entrybooks.create") +"</a>" + htmlEnd);
+ + _("lima.home.entrybooks.create") +"</a>" + htmlEnd);
}
} catch (LimaException eee) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -105,9 +105,9 @@
if (financialTransactionsUnbal.size()>0){
setBackground(redBackground);
String transactionsString = financialTransactionsUnbal.size()
- + " " + _("limahome.transaction.unbalanced")
+ + " " + _("lima.home.transaction.unbalanced")
+ "<br/><br/><a href='#financialtransactionunbalanced'>"
- + _("limahome.transaction.modifiy.unbalanced") + "</a>";
+ + _("lima.home.transaction.modifiy.unbalanced") + "</a>";
//set Text
setText(htmlBegin + transactionsString + htmlEnd);
}
@@ -118,17 +118,17 @@
if (financialTransactionsBal.size()>0){
setBackground(greenBackground);
String transactionsString = financialTransactionsBal.size()
- + " " + _("limahome.transaction.balanced")
+ + " " + _("lima.home.transaction.balanced")
+ "<br/><br/><a href='#financialtransactionbalanced'>"
- + _("limahome.transaction.modifiy.balanced") + "</a>";
+ + _("lima.home.transaction.modifiy.balanced") + "</a>";
//set Text
setText(htmlBegin + transactionsString + htmlEnd);
}
else {
setBackground(redBackground);
- String transactionsString = _("limahome.transaction.nothing")
+ String transactionsString = _("lima.home.transaction.nothing")
+ "<br/><br/><a href='#financialtransactionbalanced'>"
- + _("limahome.transaction.create") + "</a>";
+ + _("lima.home.transaction.create") + "</a>";
//set Text
setText(htmlBegin + transactionsString + htmlEnd);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -93,11 +93,11 @@
if (unblockedFiscalPeriods.size()>0){
setBackground(greenBackground);
String fiscalString = unblockedFiscalPeriods.size() + " "
- + _("limahome.fiscalperiod.opened") + "<br/>"
+ + _("lima.home.fiscalperiod.opened") + "<br/>"
+ (fiscalPeriods.size()-unblockedFiscalPeriods.size())
- + " " + _("limahome.fiscalperiod.closed")
+ + " " + _("lima.home.fiscalperiod.closed")
+ "<br/><br/><a href='#fiscalperiodschart'>"
- + _("limahome.fiscalperiod.modify") + "</a>";
+ + _("lima.home.fiscalperiod.modify") + "</a>";
//set Text
setText(htmlBegin + fiscalString + htmlEnd);
@@ -105,13 +105,13 @@
}
else {
setBackground(redBackground);
- String fiscalString = _("limahome.fiscalperiod.noopen");
+ String fiscalString = _("lima.home.fiscalperiod.noopen");
if (fiscalPeriods.size()>0){
fiscalString += "<br/>" + fiscalPeriods.size() + " "
- + _("limahome.fiscalperiod.closed");
+ + _("lima.home.fiscalperiod.closed");
}
fiscalString += "<br/><br/><a href='#fiscalperiodschart'>"
- + _("limahome.fiscalperiod.create") + "</a>";
+ + _("lima.home.fiscalperiod.create") + "</a>";
//set Text
setText(htmlBegin + fiscalString + htmlEnd);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -32,7 +32,7 @@
<row>
<cell anchor="southeast">
<JPanel
- id = 'accountPanel'
+ id='accountPanel'
border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}'
minimumSize='{getMiniSize()}'
preferredSize='{getFixedSize()}'
@@ -60,7 +60,7 @@
<Table>
<row>
<cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/></cell>
- <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.charts.entrybook'/></cell>
+ <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.common.entrybooks'/></cell>
</row>
<row fill="both">
<cell columns="2" weightx="1" weighty="0.9">
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -49,7 +49,6 @@
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.account.AccountViewHandler;
import org.chorem.lima.util.DialogHelper;
-import org.chorem.lima.util.FileChooseView;
import org.jdesktop.swingx.painter.BusyPainter;
public class ImportExport {
@@ -97,95 +96,97 @@
encodingEnum = EncodingEnum.UTF8;
if (file.equals("")){
file = chooseFile(importExportMethode.getImportMode(), importExportMethode);
- log.debug(encodingEnum.getEncoding());
}
- final EncodingEnum charset = encodingEnum;
- final String filePath = file;
- final Boolean verboseMode = verbose;
- new SwingWorker<String,Void>() {
- @Override protected String doInBackground() throws LimaException {
- String datas = "";
- String result = "";
- switch (importExportMethodeF) {
- case CSV_ALL_EXPORT:
- datas = exportService.exportAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case CSV_ACCOUNTCHARTS_EXPORT:
- datas = exportService.exportAccountsChartAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case CSV_ENTRYBOOKS_EXPORT:
- datas = exportService.exportEntryBookChartAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case CSV_FINANCIALSTATEMENTS_EXPORT:
- datas = exportService.exportFinancialStatementChartAsCSV();
- createFile(filePath, charset.getEncoding(), datas);
- break;
- case EBP_ACCOUNTCHARTS_EXPORT:
- //For windows ebp
- datas = exportService.exportAccountsAsEBP();
- createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
- break;
- case EBP_ENTRIES_EXPORT:
- //For windows ebp
- datas = exportService.exportEntriesAsEBP();
- createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
- break;
- case CSV_ALL_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAllAsCSV(datas);
- break;
- case CSV_ACCOUNTCHARTS_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.ACCOUNT);
- break;
- case CSV_ENTRYBOOKS_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.ENTRYBOOK);
- break;
- case CSV_FINANCIALSTATEMENTS_IMPORT:
- datas = extractFile(filePath, charset.getEncoding());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.FINANCIALSTATEMENT);
- break;
- case EBP_ACCOUNTCHARTS_IMPORT:
- //For windows ebp
- datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
- result = importService.importAccountsChartFromEbp(datas);
- break;
- case EBP_ENTRIES_IMPORT:
- //For windows ebp
- datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
- result = importService.importEntriesFromEbp(datas);
- break;
+ //if export cancel
+ if (!file.equals("")){
+ final EncodingEnum charset = encodingEnum;
+ final String filePath = file;
+ final Boolean verboseMode = verbose;
+ new SwingWorker<String,Void>() {
+ @Override protected String doInBackground() throws LimaException {
+ String datas = "";
+ String result = "";
+ switch (importExportMethodeF) {
+ case CSV_ALL_EXPORT:
+ datas = exportService.exportAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case CSV_ACCOUNTCHARTS_EXPORT:
+ datas = exportService.exportAccountsChartAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case CSV_ENTRYBOOKS_EXPORT:
+ datas = exportService.exportEntryBookChartAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case CSV_FINANCIALSTATEMENTS_EXPORT:
+ datas = exportService.exportFinancialStatementChartAsCSV();
+ createFile(filePath, charset.getEncoding(), datas);
+ break;
+ case EBP_ACCOUNTCHARTS_EXPORT:
+ //For windows ebp
+ datas = exportService.exportAccountsAsEBP();
+ createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
+ break;
+ case EBP_ENTRIES_EXPORT:
+ //For windows ebp
+ datas = exportService.exportEntriesAsEBP();
+ createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
+ break;
+ case CSV_ALL_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAllAsCSV(datas);
+ break;
+ case CSV_ACCOUNTCHARTS_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAsCSV(datas, ImportExportEntityEnum.ACCOUNT);
+ break;
+ case CSV_ENTRYBOOKS_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAsCSV(datas, ImportExportEntityEnum.ENTRYBOOK);
+ break;
+ case CSV_FINANCIALSTATEMENTS_IMPORT:
+ datas = extractFile(filePath, charset.getEncoding());
+ result = importService.importAsCSV(datas, ImportExportEntityEnum.FINANCIALSTATEMENT);
+ break;
+ case EBP_ACCOUNTCHARTS_IMPORT:
+ //For windows ebp
+ datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
+ result = importService.importAccountsChartFromEbp(datas);
+ break;
+ case EBP_ENTRIES_IMPORT:
+ //For windows ebp
+ datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding());
+ result = importService.importEntriesFromEbp(datas);
+ break;
+ }
+ return result;
+ }
+ @Override protected void done() {
+ try {
+ //hidde wait dialog panel
+ waitView.setVisible(false);
+ // display result dialog
+ if (verboseMode){
+ String result = get();
+ if (!result.equals("")){
+ DialogHelper.showReportDialog(result, _("lima.importexport.import"), viewComponent);
+ }
+ else {
+ DialogHelper.showMessageDialog(_("lima.importexport.import.terminated"));
+ }
+ }
+ } catch (InterruptedException eeeIE) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't get result message", eeeIE);
+ }
+ } catch (ExecutionException eeeEE) {
+ DialogHelper.showMessageDialog(eeeEE.getMessage());
}
- return result;
- }
- @Override protected void done() {
- try {
- //hidde wait dialog panel
- waitView.setVisible(false);
- // display result dialog
- if (verboseMode){
- String result = get();
- if (!result.equals("")){
- DialogHelper.showReportDialog(result, _("lima.importexport.import"), viewComponent);
- }
- else {
- DialogHelper.showMessageDialog(_("lima.importexport.import.terminated"));
- }
- }
- } catch (InterruptedException eeeIE) {
- if (log.isDebugEnabled()){
- log.debug("Can't get result message", eeeIE);
- }
- } catch (ExecutionException eeeEE) {
- DialogHelper.showMessageDialog(eeeEE.getMessage());
- }
- }
- }.execute();
- waitView.setVisible(true);
+ }
+ }.execute();
+ waitView.setVisible(true);
+ }
}
@@ -197,8 +198,7 @@
*/
public String chooseFile(Boolean importMode, ImportExportEnum importExportMethode){
String filePath = "";
- FileChooseView fileChooseView = new FileChooseView();
- JFileChooser chooser = fileChooseView.getChooser();
+ JFileChooser chooser = new JFileChooser();
//Encoding option
JComboBox comboBox = new JComboBox(EncodingEnum.descriptions());
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,7 +69,7 @@
Calendar calendarEnd = Calendar.getInstance();
Date endDate = calendarEnd.getTime();
//handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
ActionListener beginDateActionListener = new ActionListener() {
@Override
@@ -81,7 +81,7 @@
handler.setBeginDate(beginDatePicker.getDate());
beginDatePicker.addActionListener(beginDateActionListener);
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
final JXDatePicker endDatePicker = new JXDatePicker(endDate);
ActionListener endDateActionListener = new ActionListener() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -69,19 +69,19 @@
</row>
<row fill="horizontal" anchor="center">
<cell>
- <JLabel text="lima.amountdebit" />
+ <JLabel text="lima.common.amountdebit" />
</cell>
<cell>
<JLabel id="amountDebitLabel" />
</cell>
<cell>
- <JLabel text="lima.amountcredit"/>
+ <JLabel text="lima.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel" />
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.solde"/>
+ <JLabel id="soldeLabel" text="lima.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -170,15 +170,15 @@
String.valueOf(amountSolde));
if (amountSolde.doubleValue() == 0){
- view.soldeLabel.setText(_("lima.solde"));
+ view.soldeLabel.setText(_("lima.common.solde"));
}
else {
// set label solde: credit or debit
if (balanceTrialCache.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.soldedebit"));
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
}
else {
- view.soldeLabel.setText(_("lima.soldecredit"));
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -26,7 +26,7 @@
</row>
<row>
<cell>
- <JCheckBox id='importEntryBook' text='lima.import.journal' selected='false'/>
+ <JCheckBox id='importEntryBook' text='lima.importexport.defaultentrybooks' selected='false'/>
</cell>
</row>
</Table>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -59,18 +59,18 @@
<Table fill="both">
<row>
<cell columns ="3">
- <JLabel text="lima.period.create"/>
+ <JLabel text="lima.charts.fiscalperiod.create"/>
</cell>
</row>
<row>
<cell>
- <JLabel text="lima.period.begindate"/>
+ <JLabel text="lima.common.begindate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/>
</cell>
<cell>
- <JLabel text="lima.period.enddate"/>
+ <JLabel text="lima.common.enddate"/>
</cell>
<cell>
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -35,7 +35,7 @@
String[] response = {_("lima.response.yes"), _("lima.response.no")};
return JOptionPane.showOptionDialog(null,
message,
- _("lima.question"),
+ _("lima.common.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, //do not use a custom Icon
@@ -49,7 +49,7 @@
JOptionPane.showMessageDialog(
f,
message,
- _("lima.error"),
+ _("lima.common.error"),
JOptionPane.ERROR_MESSAGE);
f.dispose();
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java 2010-08-23 16:38:53 UTC (rev 3015)
@@ -67,7 +67,7 @@
public static void showErrorDialog(Component parent, String message,
Throwable cause) {
JXErrorPane pane = new JXErrorPane();
- ErrorInfo info = new ErrorInfo(_("lima.error.errorpane.title"),
+ ErrorInfo info = new ErrorInfo(_("lima.common.error"),
_("lima.error.errorpane.htmlmessage", message), null, null,
cause, null, null);
pane.setErrorInfo(info);
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/FileChooseView.jaxx 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,3 +0,0 @@
-<JFrame title="lima.export">
- <JFileChooser id="chooser" width="620" height="400"/>
-</JFrame>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,182 +1,165 @@
-Confirmation=
-DEBUG\ delete\ all=
-Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
-Global\ lima\ exception=
-lima.about.message=
-lima.account=Account
-lima.account.label=Label
-lima.account.number=Number
-lima.accountsreports.accountfilter=Filter
-lima.accountsreports.begincalendar=
-lima.accountsreports.endcalendar=
-lima.accountsreports.movmentedfilter=
lima.action.commandline.help=Show help in console
lima.action.fullscreen=Full screen
lima.action.fullscreen.tip=Open ui in full screen
lima.action.normalscreen=Normal screen
lima.action.normalscreen.tip=Open ui in normal screen
-lima.add.entry=Add an entry
-lima.add.transaction=Add a transaction
-lima.amount=Amount
-lima.amountcredit=
-lima.amountdebit=
lima.charts.account=Accounts chart
-lima.charts.account.base=
-lima.charts.account.developed=
-lima.charts.account.nothing=
-lima.charts.account.shortened=
-lima.charts.entrybook=EntryBooks chart
-lima.charts.entrybook.default=
-lima.charts.entrybook.import=
+lima.charts.account.addAccount=Add account
+lima.charts.account.addSubLedger=Add thirdpart account
+lima.charts.account.base=Base accountchart
+lima.charts.account.developed=Developped accountchart
+lima.charts.account.number=Account Number
+lima.charts.account.question.remove=Do you really remove this account ?
+lima.charts.account.shortened=Shorthened accountchart
+lima.charts.entrybook.add=Add entrybook
+lima.charts.entrybook.confirmation=Do you really remove this entrybook ?
+lima.charts.entrybook.default=Defaults entrybooks
+lima.charts.entrybook.import=Import entrybooks
lima.charts.financialperiod=Financial Periods
-lima.charts.financialstatement=
-lima.charts.financialstatement.base=
-lima.charts.financialstatement.developed=
-lima.charts.financialstatement.nothing=
-lima.charts.financialstatement.shortened=
+lima.charts.financialperiod.block=Block financialperiod
+lima.charts.financialperiod.question.blocked=Do you really block this financialperiod ? This action is irreversible \!
+lima.charts.financialstatement=Financialstatement chart
+lima.charts.financialstatement.base=Base financialstatement chart
+lima.charts.financialstatement.developed=Developped financialstatement chart
+lima.charts.financialstatement.nothing=NO financialstatement chart
+lima.charts.financialstatement.shortened=Shortened financialstatement chart
+lima.charts.financialtransaction.question.removeentry=Do you really remove this entry ?
+lima.charts.financialtransaction.question.removetransaction=Do you really remove this transaction ?
+lima.charts.fiscalperiod.add=Add fiscalperiod
+lima.charts.fiscalperiod.block=Block fiscalperiod
+lima.charts.fiscalperiod.create=Create fiscalperiod
+lima.charts.fiscalperiod.question.blocked=Block financialperiod
+lima.charts.fiscalperiod.question.morethan12=This period is longer than 12 months. Do you really create this ?
lima.charts.fiscalyear=Fiscal Years
-lima.close=Closed
-lima.common.add=
-lima.common.addSubLedger=
-lima.common.cancel=
-lima.common.close=
-lima.common.copy=
-lima.common.filter=
-lima.common.fin=
-lima.common.import=
-lima.common.importexport=Import/Export
-lima.common.movmentedfilter=
-lima.common.next=
-lima.common.ok=
-lima.common.paste=
-lima.common.print=
-lima.common.quit=
-lima.common.remove=
-lima.common.search=
-lima.common.update=
-lima.config.category.directories=
-lima.config.category.directories.description=
-lima.config.category.other=
-lima.config.category.other.description=
+lima.common.account=Account
+lima.common.amount=Amount
+lima.common.amountcredit=Credit amount
+lima.common.amountdebit=Debit amount
+lima.common.begindate=Begin
+lima.common.cancel=Cancel
+lima.common.close=Close
+lima.common.closed=Closed
+lima.common.code=Code
+lima.common.confirmation=Confirmation
+lima.common.copy=Copy
+lima.common.enddate=End
+lima.common.entrybook=EntryBook
+lima.common.entrybooks=EntryBooks
+lima.common.error=Error
+lima.common.filter=Filter
+lima.common.fin=Terminated
+lima.common.globalexception=Global lima exception
+lima.common.label=Label
+lima.common.movmentedfilter=Accounts filtered
+lima.common.next=Next
+lima.common.ok=OK
+lima.common.open=Open
+lima.common.paste=Paste
+lima.common.period=Period
+lima.common.question=Question
+lima.common.quit=Exit
+lima.common.remove=Remove
+lima.common.search=Search
+lima.common.solde=Solde
+lima.common.soldecredit=Credit solde
+lima.common.soldedebit=Debit solde
+lima.common.update=Modify
+lima.config.category.directories=Directories
+lima.config.category.directories.description=Directories used by LIMA
+lima.config.category.other=Other
+lima.config.category.other.description=Other configuration properties
lima.config.configFileName.description=
-lima.config.host.adress=
-lima.config.host.httpport=
-lima.config.locale.description=
+lima.config.host.adress=Host adress
+lima.config.locale.description=Localization used by LIMA
lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=
-lima.createPDF=
-lima.credit=Credit
+lima.config.ui.fullscreen.description=FullScreen
lima.daily=Daily
-lima.date=Date
-lima.debit=Debit
-lima.description=Description
-lima.dialogreport=
-lima.documents=
-lima.documents.html=
+lima.documents=Documents...
lima.entries=Entries
-lima.entries.addtransaction=
-lima.entries.lettering=
-lima.entries.searchtransaction=
-lima.entries.searchunbalancedtransaction=
-lima.entrybook=Entry Book
-lima.entrybook.add=Add Entry Book
-lima.entrybook.code=
-lima.entrybook.label=
-lima.entrybook.type=
-lima.entrybook.type1=
-lima.entrybook.type2=
-lima.entrybook.type3=
-lima.entrybook.type4=
-lima.entrybook.type5=
-lima.enum.comboboxaccount.account=
-lima.enum.comboboxaccount.accountlist=
-lima.enum.comboboxaccount.allaccount=
-lima.enum.comboboxamount.both=
-lima.enum.comboboxamount.credit=
-lima.enum.comboboxamount.debit=
-lima.enum.comboboxentrybook.all=
-lima.enum.comboboxentrybook.select_one=
-lima.enum.comboboxoperator.equal=
-lima.enum.comboboxoperator.inferior=
-lima.enum.comboboxoperator.inferiororequal=
-lima.enum.comboboxoperator.interval=
-lima.enum.comboboxoperator.intervalle=
-lima.enum.comboboxoperator.notequal=
-lima.enum.comboboxoperator.superior=
-lima.enum.comboboxoperator.superiororequal=
-lima.enum.comboboxperiod.date=
-lima.enum.comboboxperiod.financialperiod=
-lima.enum.comboboxperiod.fiscalperiod=
-lima.enum.comboboxperiod.period=
-lima.error=Error
+lima.entries.addEntry=Add entry
+lima.entries.addTransaction=Add transaction
+lima.entries.searchtransaction=Search transaction
+lima.entries.searchunbalancedtransaction=Incorrect transactions
+lima.entries.writetransaction=Write entries
+lima.enum.comboboxaccount.account=Account
+lima.enum.comboboxaccount.accountlist=Account list
+lima.enum.comboboxaccount.allaccount=All accounts
+lima.enum.comboboxentrybook.all=All entrybooks
+lima.enum.comboboxentrybook.select_one=EntryBook
+lima.enum.comboboxoperator.equal=Equal
+lima.enum.comboboxoperator.inferior=Inferior
+lima.enum.comboboxoperator.inferiororequal=Inferior or equal
+lima.enum.comboboxoperator.interval=Inteval
+lima.enum.comboboxoperator.notequal=Not equal
+lima.enum.comboboxoperator.superior=Superior
+lima.enum.comboboxoperator.superiororequal=Superior or equal
+lima.enum.comboboxperiod.date=Date
+lima.enum.comboboxperiod.financialperiod=Financial period
+lima.enum.comboboxperiod.fiscalperiod=Fiscal period
+lima.enum.comboboxperiod.period=Period
lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html>
-lima.error.errorpane.title=Lima error
-lima.export=Export
-lima.export.account=Export PCG
-lima.export.all=Export all datas (XML)
-lima.export.all.csv=Exporter all datas (CSV)
-lima.financialperiod.block=
-lima.financialstament.check=
-lima.financialstatement.accounts=
-lima.financialstatement.check=
-lima.financialstatement.credit=
-lima.financialstatement.creditaccounts=
-lima.financialstatement.debit=
-lima.financialstatement.debitaccounts=
-lima.financialstatement.delete=
-lima.financialstatement.formula=
-lima.financialstatement.header.add=
-lima.financialstatement.headeramount=
-lima.financialstatement.label=
-lima.financialstatement.movement.add=
-lima.financialstatement.provisiondeprecationaccounts=
-lima.financialstatement.subamount=
-lima.fiscalperiod.addFiscalPeriod=
-lima.fiscalperiod.block=
-lima.identity=
-lima.identity.address=
-lima.identity.address2=
-lima.identity.businessNumber=
-lima.identity.city=
-lima.identity.classificationCode=
-lima.identity.contact=
-lima.identity.description=
-lima.identity.email=
-lima.identity.name=
-lima.identity.phoneNumber=
-lima.identity.vatNumber=
-lima.identity.zipCode=
-lima.import=Import
-lima.import.account=Import PCG
-lima.import.all=Import all datas
-lima.import.all.csv=Import all datas (CSV)
-lima.import.all.csv.ebp=Import all datas (EBP)
-lima.import.journal=Import journal
-lima.importexport.accountcharts=
-lima.importexport.all=
-lima.importexport.choiceencoding=
-lima.importexport.csv=
-lima.importexport.ebp=
-lima.importexport.entries=
-lima.importexport.entrybooks=
+lima.financialstatement.accounts=Account list on debit and on credit
+lima.financialstatement.check=Check accounts passing to movement
+lima.financialstatement.creditaccounts=Account credit list
+lima.financialstatement.debitaccounts=Account debit list
+lima.financialstatement.delete=Delete actual financialstatement chart before import new
+lima.financialstatement.header.add=Add category
+lima.financialstatement.headeramount=Calculate amount on header
+lima.financialstatement.label=Label
+lima.financialstatement.movement.add=Add movement
+lima.financialstatement.provisiondeprecationaccounts=Provisions and deprecations accounts list
+lima.financialstatement.subamount=Calculate a subamount
+lima.home.chartaccounts.create=Create accountschart
+lima.home.chartaccounts.modify=Modify accountschart
+lima.home.chartaccounts.nothing=No accountschart
+lima.home.chartaccounts.state1_2=The chart have
+lima.home.chartaccounts.state2_2=accounts
+lima.home.entrybooks.create=Create entrybook
+lima.home.entrybooks.modify=Modifiy entrybook
+lima.home.entrybooks.nothing=No entrybook
+lima.home.entrybooks.state.single=Entrybook is
+lima.home.entrybooks.state1_2.plural=The
+lima.home.entrybooks.state2_2.plural=entrybooks are
+lima.home.fiscalperiod.closed=fiscalperiods closed
+lima.home.fiscalperiod.create=Create fiscalperiod
+lima.home.fiscalperiod.modify=Modify fiscalperiod
+lima.home.fiscalperiod.noopen=No fiscalperiod
+lima.home.fiscalperiod.opened=fiscalperiods open
+lima.home.transaction.balanced=transactions are balanced
+lima.home.transaction.create=Create entries
+lima.home.transaction.modifiy.balanced=Modify entries
+lima.home.transaction.modifiy.unbalanced=Modify incorrect entries
+lima.home.transaction.nothing=No transaction
+lima.home.transaction.unbalanced=transactions are not balanced
+lima.identity=Identity
+lima.identity.address=Address
+lima.identity.address2=Address (next)
+lima.identity.businessNumber=Business number
+lima.identity.city=City
+lima.identity.classificationCode=Classification code
+lima.identity.contact=Contact
+lima.identity.description=Description
+lima.identity.email=Email
+lima.identity.name=Name
+lima.identity.phoneNumber=Phone number
+lima.identity.vatNumber=VAT number
+lima.identity.zipCode=Zip code
+lima.importexport.accountcharts=Accounts chart
+lima.importexport.all=All
+lima.importexport.choiceencoding=Choice encoding
+lima.importexport.csv=Import/Export CSV
+lima.importexport.defaultentrybooks=Defaults entrybooks
+lima.importexport.ebp=Import/Export EBP
+lima.importexport.entries=Entries
lima.importexport.export=Export
-lima.importexport.financialstatements=
+lima.importexport.financialstatements=FinancialStatements chart
lima.importexport.import=Import
-lima.importexport.import.terminated=
-lima.importexport.importcsv=
-lima.importexport.importebp=
-lima.importexport.lima=
-lima.importexport.wait=
+lima.importexport.import.terminated=Import terminated
+lima.importexport.importcsv=Import CSV
+lima.importexport.importebp=Import EBP
+lima.importexport.wait=Job in progress\u2026
lima.init.closed=Lima closed at %1$s
-lima.init.errorclosing=
-lima.lettering.add=
-lima.lettering.entries=
-lima.lettering.from=
-lima.lettering.lettered=
-lima.lettering.letteredall=
-lima.lettering.notlettered=
-lima.lettering.remove=
-lima.lettering.to=
+lima.init.errorclosing=Error during Lima close
lima.menu.file=File
lima.menu.help=Help
lima.menu.help.about=About
@@ -185,115 +168,54 @@
lima.menu.help.i18n.fr=French
lima.menu.help.i18n.uk=English
lima.menu.help.site=WebSite
-lima.menu.window=
-lima.message.help.usage=
-lima.misc.supportemail.description=
-lima.open=Open
+lima.menu.window=Window
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Support email
lima.openejb.remotemode.description=
-lima.opening.accounts=
-lima.opening.entrybook=
-lima.opening.import=
-lima.opening.welcome=
-lima.pdf=
-lima.period.begindate=
-lima.period.create=
-lima.period.enddate=
+lima.opening.accounts=<html><center>No account chart is load<br/>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html>
+lima.opening.entrybook=<html>Tick box to import default accounts chart\:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
+lima.opening.import=Import a CSV Save
+lima.opening.welcome=<html><center>Welcome to Lima<br/>this assistant help you to start your business accounting in the blink of an eye<br/>OR import instantanly your already existing save in CSV format<br/><br/><br/><br/></center></html>
lima.preferences=Preferences
-lima.question=Question
-lima.question.financialperiod.blocked=
-lima.question.fiscalperiod.blocked=
-lima.question.fiscalperiod.morethan12=
-lima.question.load.accounts=There is no existing accounts in Lima. Do you want to load default accounts ?
-lima.question.remove.account=Do you want to remove this account ?
-lima.question.remove.entry=Do you want to remove this entry ?
-lima.question.remove.transaction=Do you want to remove this transaction ?
lima.refresh=\u21BB
-lima.remove=Remove
lima.reports=Reports
lima.reports.accounts=Edit account
lima.reports.balance=Balance
lima.reports.entrybooks=Edit entrybook
-lima.reports.financialstatement=
+lima.reports.financialstatement=Financialstatements
lima.reports.ledger=Ledger
lima.response.no=No
lima.response.yes=Yes
-lima.solde=
-lima.soldecredit=
-lima.soldedebit=
lima.splash.1=Loading services...
lima.splash.2="Loading accounting...
lima.splash.3=Ready \!
lima.structure=Structure
-lima.subledger.code=Code
lima.tab.home=Home
-lima.tab.result=Result
-lima.table.account=
-lima.table.balance=
-lima.table.closure=
-lima.table.code=
-lima.table.credit=
-lima.table.date=
-lima.table.debit=
-lima.table.debitcredit=
-lima.table.description=
-lima.table.entrybook=
-lima.table.fiscalperiod=
-lima.table.grossamount=
-lima.table.label=
-lima.table.letter=
-lima.table.lettering=
-lima.table.move.credit=
-lima.table.move.debit=
-lima.table.netamount=
-lima.table.number=
-lima.table.period=
-lima.table.position=
-lima.table.provisiondeprecationamount=
-lima.table.solde=
-lima.table.solde.credit=
-lima.table.solde.debit=
-lima.table.type=
-lima.table.voucher=
+lima.table.account=Account
+lima.table.balance=Balance
+lima.table.closure=Closed
+lima.table.code=Code
+lima.table.credit=Credit
+lima.table.date=Date
+lima.table.debit=Debit
+lima.table.debitcredit=Debit and credit
+lima.table.description=Description
+lima.table.entrybook=EntryBook
+lima.table.fiscalperiod=Fiscalperiod
+lima.table.grossamount=Gross amount
+lima.table.label=Label
+lima.table.letter=Letter
+lima.table.move.credit=Movmented Credit
+lima.table.move.debit=Movemented Debit
+lima.table.netamount=Net amount
+lima.table.number=Account Number
+lima.table.period=Period
+lima.table.provisiondeprecationamount=Provision & Deprecation
+lima.table.solde=Solder
+lima.table.solde.credit=Credit solde
+lima.table.solde.debit=Debit solde
+lima.table.voucher=Voucher
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=About Lima...
-lima.transaction.confirmdelete=
-lima.transaction.period=Period
-lima.voucher=Voucher
+lima.title.about.description=Open sources accounting software
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
-lima.welcome=
-limahome.chartaccounts.create=
-limahome.chartaccounts.modify=
-limahome.chartaccounts.nothing=
-limahome.chartaccounts.state1_2=
-limahome.chartaccounts.state2_2=
-limahome.chartaccounts1=
-limahome.chartaccounts2=
-limahome.createchartaccounts=
-limahome.createchartaccounts1=
-limahome.createchartaccounts2=
-limahome.entrybooknoopen=
-limahome.entrybooks.create=
-limahome.entrybooks.modify=
-limahome.entrybooks.nothing=
-limahome.entrybooks.state.single=
-limahome.entrybooks.state1_2.plural=
-limahome.entrybooks.state2_2.plural=
-limahome.entrybooks1=
-limahome.entrybooks2=
-limahome.fiscalperiod.closed=
-limahome.fiscalperiod.create=
-limahome.fiscalperiod.modify=
-limahome.fiscalperiod.noopen=
-limahome.fiscalperiod.opened=
-limahome.fiscalperiodclosed=
-limahome.fiscalperiodnoopen=
-limahome.fiscalperiodopened=
-limahome.transaction.balanced=
-limahome.transaction.create=
-limahome.transaction.modifiy=
-limahome.transaction.modifiy.balanced=
-limahome.transaction.modifiy.unbalanced=
-limahome.transaction.nothing=
-limahome.transaction.unbalanced=
-limahome.transactionbalanced=
-limahome.transactionunbalanced=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 09:35:53 UTC (rev 3014)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 16:38:53 UTC (rev 3015)
@@ -1,94 +1,89 @@
-Confirmation=
-DEBUG\ delete\ all=
-Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
-Global\ lima\ exception=
-lima.about.message=\u00C0 propos de Lima
-lima.account=Compte
-lima.account.label=
-lima.account.number=
-lima.accountsreports.begincalendar=
-lima.accountsreports.endcalendar=
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
lima.action.normalscreen=Ecran normal
lima.action.normalscreen.tip=Revenir en \u00E9cran normal
-lima.add.entry=Ajouter entr\u00E9e
-lima.add.transaction=Ajouter transaction
-lima.amount=Montant
-lima.amountcredit=Total Cr\u00E9dit
-lima.amountdebit=Total D\u00E9bit
lima.charts.account=Plan comptable
+lima.charts.account.addAccount=Ajout Compte G\u00E9n\u00E9ral
+lima.charts.account.addSubLedger=Ajouter Compte Tiers
lima.charts.account.base=Plan comptable de base
lima.charts.account.developed=Plan comptable d\u00E9velopp\u00E9
+lima.charts.account.number=Num\u00E9ro de compte
+lima.charts.account.question.remove=Voulez-vous supprimer ce compte?
lima.charts.account.shortened=Plan comptable abr\u00E9g\u00E9
-lima.charts.entrybook=Journaux
+lima.charts.entrybook.add=Ajouter un journal
+lima.charts.entrybook.confirmation=Do you really want to delete entry book %s ?
lima.charts.entrybook.default=Journaux par d\u00E9fault
lima.charts.entrybook.import=Importer des journaux
lima.charts.financialperiod=P\u00E9riodes comptables
+lima.charts.financialperiod.block=Cloturer une p\u00E9riode
+lima.charts.financialperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette p\u00E9riode ? Cette action est irr\u00E9versible \!
lima.charts.financialstatement=Plan BCR
lima.charts.financialstatement.base=Plan BCR de base
lima.charts.financialstatement.developed=Plan BCR d\u00E9velopp\u00E9
lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.charts.financialstatement.shortened=Plan BCR abr\u00E9g\u00E9
+lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction?
+lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction?
+lima.charts.fiscalperiod.add=Nouvel exercice
+lima.charts.fiscalperiod.block=Cloturer un exercice
+lima.charts.fiscalperiod.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
+lima.charts.fiscalperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette exercice ? Cette action est irr\u00E9versible \!
+lima.charts.fiscalperiod.question.morethan12=La p\u00E9riode s\u00E9lectionn\u00E9e n'est pas de 12 mois, voulez-vous continuer ?
lima.charts.fiscalyear=Exercices
-lima.close=Ferm\u00E9
-lima.common.add=Ajout Compte G\u00E9n\u00E9ral
-lima.common.addSubLedger=Ajouter Compte Tiers
+lima.common.account=Compte
+lima.common.amount=Montant
+lima.common.amountcredit=Total Cr\u00E9dit
+lima.common.amountdebit=Total D\u00E9bit
+lima.common.begindate=D\u00E9but
lima.common.cancel=Annuler
lima.common.close=Fermer
+lima.common.closed=Ferm\u00E9
+lima.common.code=Code
+lima.common.confirmation=Confirmation
lima.common.copy=Copier
+lima.common.enddate=Fin
+lima.common.entrybook=Journal
+lima.common.entrybooks=Journaux
+lima.common.error=Erreur
lima.common.filter=Filtrer
lima.common.fin=Termin\u00E9
-lima.common.importexport=Importer/Exporter
+lima.common.globalexception=Global lima exception
+lima.common.label=Libell\u00E9
lima.common.movmentedfilter=Comptes mouvement\u00E9s
lima.common.next=Suivant
lima.common.ok=OK
+lima.common.open=Ouvert
lima.common.paste=Coller
-lima.common.print=
+lima.common.period=P\u00E9riode
+lima.common.question=Question
lima.common.quit=Quitter
lima.common.remove=Supprimer
lima.common.search=Rechercher
+lima.common.solde=Solde
+lima.common.soldecredit=Solde Cr\u00E9diteur
+lima.common.soldedebit=Solde D\u00E9biteur
lima.common.update=Modifier
lima.config.category.directories=R\u00E9pertoires
lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
lima.config.category.other=Autre
lima.config.category.other.description=Autre propri\u00E9t\u00E9s de configuration
lima.config.configFileName.description=
-lima.config.host.adress=
-lima.config.host.httpport=
+lima.config.host.adress=Adresse du serveur distant
lima.config.locale.description=Locale utilis\u00E9e par l'application
lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=
-lima.createPDF=
-lima.credit=Credit
+lima.config.ui.fullscreen.description=Plein \u00E9cran
lima.daily=Quotidien
-lima.date=Date
-lima.debit=Debit
-lima.description=Description
-lima.dialogreport=
lima.documents=Documents\u0085
lima.entries=Traitement
-lima.entries.addtransaction=Saisir des \u00E9critures
-lima.entries.lettering=Ajouter une lettre
+lima.entries.addEntry=Ajouter entr\u00E9e
+lima.entries.addTransaction=Ajouter transaction
lima.entries.searchtransaction=Rechercher des \u00E9critures
lima.entries.searchunbalancedtransaction=Entr\u00E9es incorrect
-lima.entrybook=Journal
-lima.entrybook.add=Ajouter un journal
-lima.entrybook.code=
-lima.entrybook.label=
-lima.entrybook.type=
-lima.entrybook.type1=Achats
-lima.entrybook.type2=Ventes
-lima.entrybook.type3=Tr\u00E9sorerie
-lima.entrybook.type4=G\u00E9n\u00E9ral
-lima.entrybook.type5=Situation
+lima.entries.writetransaction=Saisir des \u00E9critures
lima.enum.comboboxaccount.account=Compte
lima.enum.comboboxaccount.accountlist=Liste de comptes
lima.enum.comboboxaccount.allaccount=Tous les comptes
-lima.enum.comboboxamount.both=Les deux
-lima.enum.comboboxamount.credit=Cr\u00E9dit
-lima.enum.comboboxamount.debit=D\u00E9bit
lima.enum.comboboxentrybook.all=Tous les journaux
lima.enum.comboboxentrybook.select_one=Journal
lima.enum.comboboxoperator.equal=\u00C9gal
@@ -102,29 +97,40 @@
lima.enum.comboboxperiod.financialperiod=P\u00E9riode Financi\u00E8re
lima.enum.comboboxperiod.fiscalperiod=Exercice
lima.enum.comboboxperiod.period=P\u00E9riode
-lima.error=Erreur
lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
-lima.error.errorpane.title=Lima erreur
-lima.export=Export
-lima.export.account=Exporter le PCG
-lima.export.all=Exporter toutes les donn\u00E9es (XML)
-lima.export.all.csv=Exporter toutes les donn\u00E9es (CSV)
-lima.financialperiod.block=Cloturer une p\u00E9riode
lima.financialstatement.accounts=Liste de comptes au cr\u00E9dit et au d\u00E9bit
lima.financialstatement.check=V\u00E9rification des comptes aux postes
-lima.financialstatement.credit=Sens du poste \: d\u00E9bit
lima.financialstatement.creditaccounts=Liste de comptes au cr\u00E9dit
lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
lima.financialstatement.delete=Supprimer le plan BCR actuel avant d'importer
-lima.financialstatement.formula=Formule de compte, ex \: '7'-'6'+'510-520'
lima.financialstatement.header.add=Ajouter une cat\u00E9gorie
lima.financialstatement.headeramount=Calculer le total en en-tete
lima.financialstatement.label=Libell\u00E9
lima.financialstatement.movement.add=Ajouter un regrouprement
lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
lima.financialstatement.subamount=Calculer un sous-total
-lima.fiscalperiod.addFiscalPeriod=Nouvel exercice
-lima.fiscalperiod.block=Cloturer un exercice
+lima.home.chartaccounts.create=Cr\u00E9er le plan des comptes
+lima.home.chartaccounts.modify=Modifier le plan des comptes
+lima.home.chartaccounts.nothing=Aucun compte \!
+lima.home.chartaccounts.state1_2=Le plan comptable possede
+lima.home.chartaccounts.state2_2=comptes
+lima.home.entrybooks.create=Cr\u00E9er les journaux
+lima.home.entrybooks.modify=Modifier les journaux
+lima.home.entrybooks.nothing=Aucun journal ouvert \!
+lima.home.entrybooks.state.single=Le journal est \:
+lima.home.entrybooks.state1_2.plural=Les
+lima.home.entrybooks.state2_2.plural=journaux sont \:
+lima.home.fiscalperiod.closed=exercices clotur\u00E9s
+lima.home.fiscalperiod.create=Cr\u00E9er un exercice
+lima.home.fiscalperiod.modify=Modifier les exercices
+lima.home.fiscalperiod.noopen=Aucun exercice ouvert \!
+lima.home.fiscalperiod.opened=exercices ouverts
+lima.home.transaction.balanced=transactions, toutes sont \u00E9quilibr\u00E9es
+lima.home.transaction.create=Ajouter des \u00E9critures
+lima.home.transaction.modifiy.balanced=Modifier les \u00E9critures
+lima.home.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrect
+lima.home.transaction.nothing=Aucune \u00E9criture
+lima.home.transaction.unbalanced=transactions ne sont pas \u00E9quilibr\u00E9es \!
lima.identity=Identit\u00E9
lima.identity.address=Adresse
lima.identity.address2=Adresse (suite)
@@ -138,14 +144,13 @@
lima.identity.phoneNumber=n\u00B0 Tel
lima.identity.vatNumber=n\u00B0 TVA
lima.identity.zipCode=Code Postal
-lima.import.journal=Journaux par d\u00E9faut
lima.importexport.accountcharts=Plan des comptes
lima.importexport.all=Tout
lima.importexport.choiceencoding=Choisir encodage \:
lima.importexport.csv=Import/Export CSV
+lima.importexport.defaultentrybooks=Journaux par d\u00E9faut
lima.importexport.ebp=Import/Export EBP
lima.importexport.entries=\u00C9critures
-lima.importexport.entrybooks=Journaux
lima.importexport.export=Export
lima.importexport.financialstatements=Plan BCR
lima.importexport.import=Import
@@ -154,15 +159,7 @@
lima.importexport.importebp=Import EBP
lima.importexport.wait=Traitement en cours \u2026
lima.init.closed=Lima ferm\u00E9 \u00E0 %1$s
-lima.init.errorclosing=
-lima.lettering.add=Ajouter une lettre
-lima.lettering.entries=Op\u00E9ration de saisie
-lima.lettering.from=De
-lima.lettering.lettered=Lettr\u00E9e
-lima.lettering.letteredall=Toutes
-lima.lettering.notlettered=Non lettr\u00E9e
-lima.lettering.remove=Supprimer
-lima.lettering.to=\u00C0
+lima.init.errorclosing=Erreur lors de la fermeture
lima.menu.file=Fichier
lima.menu.help=Aide
lima.menu.help.about=\u00C0 Propos
@@ -172,29 +169,15 @@
lima.menu.help.i18n.uk=Anglais
lima.menu.help.site=Acc\u00E9der au site de Lima
lima.menu.window=Fen\u00EAtre
-lima.message.help.usage=
-lima.misc.supportemail.description=
-lima.open=Ouvert
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Adresse email de support
lima.openejb.remotemode.description=
lima.opening.accounts=<html><center>Aucun plan comptable charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
lima.opening.entrybook=<html>Cochez la case pour importer les journaux par d\u00E9faut \:<br/> Achats, Ventes, Tr\u00E9sorerie, Op\u00E9ration diverses</html>
lima.opening.import=Importer une sauvegarde CSV
lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour d\u00E9marrer votre comptabilit\u00E9 en quelques instants\u0085<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
-lima.pdf=
-lima.period.begindate=D\u00E9but
-lima.period.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
-lima.period.enddate=Fin
lima.preferences=Pr\u00E9f\u00E9rences
-lima.question=Question
-lima.question.financialperiod.blocked=
-lima.question.fiscalperiod.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette exercice ? Cette action est irr\u00E9versible \!
-lima.question.fiscalperiod.morethan12=La p\u00E9riode s\u00E9lectionner n'est pas de 12 mois, voulez-vous continuer ?
-lima.question.load.accounts=Il n'y a aucun plan comptable existant dans Lima. Voulez-vous en charger un par d\u00E9faut ?
-lima.question.remove.account=Voulez-vous supprimer ce compte?
-lima.question.remove.entry=Voulez-vous supprimer cette ligne de transaction?
-lima.question.remove.transaction=Voulez-vous supprimer cette transaction?
lima.refresh=\u21BB
-lima.remove=
lima.reports=Rapports
lima.reports.accounts=Edition compte
lima.reports.balance=Balance
@@ -203,16 +186,11 @@
lima.reports.ledger=Grand Livre
lima.response.no=Non
lima.response.yes=Oui
-lima.solde=Solde
-lima.soldecredit=Solde Cr\u00E9diteur
-lima.soldedebit=Solde D\u00E9biteur
lima.splash.1=Chargement des services...
lima.splash.2=Chargement de la comptabilit\u00E9
lima.splash.3=Application pr\u00EAte \!
lima.structure=Structure
-lima.subledger.code=Code
lima.tab.home=Accueil
-lima.tab.result=
lima.table.account=Compte
lima.table.balance=Balance
lima.table.closure=Cloture
@@ -227,44 +205,17 @@
lima.table.grossamount=Brut
lima.table.label=Libell\u00E9
lima.table.letter=Lettre
-lima.table.lettering=
lima.table.move.credit=Mouvement au cr\u00E9dit
lima.table.move.debit=Mouvement au d\u00E9bit
lima.table.netamount=Net
-lima.table.number=Num\u00E9ro du compte
+lima.table.number=Num\u00E9ro de compte
lima.table.period=P\u00E9riode
-lima.table.position=Statut
lima.table.provisiondeprecationamount=Amortissements et provisions
lima.table.solde=Solde
lima.table.solde.credit=Solde cr\u00E9dit
lima.table.solde.debit=Solde d\u00E9bit
-lima.table.type=Type
lima.table.voucher=Pi\u00E8ce comptable
lima.title=Lutin Invoice Monitoring and Accounting
-lima.title.about=A propos de Lima...
-lima.transaction.confirmdelete=
-lima.transaction.period=P\u00E9riode
-lima.voucher=Document
+lima.title.about=\u00C0 propos de Lima...
+lima.title.about.description=Logiciel de comptabilit\u00E9 Libre
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
-limahome.chartaccounts.create=Cr\u00E9er le plan des comptes
-limahome.chartaccounts.modify=Modifier le plan des comptes
-limahome.chartaccounts.nothing=Aucun compte \!
-limahome.chartaccounts.state1_2=Le plan comptable possede
-limahome.chartaccounts.state2_2=comptes
-limahome.entrybooks.create=Cr\u00E9er les journaux
-limahome.entrybooks.modify=Modifier les journaux
-limahome.entrybooks.nothing=Aucun journal ouvert \!
-limahome.entrybooks.state.single=Le journal est \:
-limahome.entrybooks.state1_2.plural=Les
-limahome.entrybooks.state2_2.plural=journaux sont \:
-limahome.fiscalperiod.closed=exercices clotur\u00E9s
-limahome.fiscalperiod.create=Cr\u00E9er un exercice
-limahome.fiscalperiod.modify=Modifier les exercices
-limahome.fiscalperiod.noopen=Aucun exercice ouvert \!
-limahome.fiscalperiod.opened=exercices ouverts
-limahome.transaction.balanced=transactions, toutes sont \u00E9quilibr\u00E9es
-limahome.transaction.create=Ajouter des \u00E9critures
-limahome.transaction.modifiy.balanced=Modifier les \u00E9critures
-limahome.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrect
-limahome.transaction.nothing=Aucune \u00E9criture
-limahome.transaction.unbalanced=\u00E9critures ne sont pas \u00E9quilibr\u00E9es \!
Deleted: trunk/lima-swing/src/main/resources/images/logo-codelutin.png
===================================================================
(Binary files differ)
Added: trunk/lima-swing/src/main/resources/images/puzzle_icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/images/puzzle_icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/lima-swing/src/main/resources/images/splash.png
===================================================================
(Binary files differ)
1
0
23 Aug '10
Author: jpepin
Date: 2010-08-23 11:35:53 +0200 (Mon, 23 Aug 2010)
New Revision: 3014
Url: http://chorem.org/repositories/revision/lima/3014
Log:
Ajout dans les rapports choix de s?\195?\169lection de la p?\195?\169riod.
Ajout nouveau splash-screen puzzle.
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
trunk/lima-swing/src/main/resources/images/puzzle_splash.png
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -154,6 +154,7 @@
// update splash
LimaSplash splash = new LimaSplash();
splash.initSplash(config.getVersion());
+ splash.updateProgression(0.1, _("lima.splash.1"));
// do init ui
MainViewHandler uiHandler = context.getContextValue(MainViewHandler.class);
@@ -165,7 +166,7 @@
// load accounts and test if there is an account plan defined
// if not, call #loadDefaultAccount()
- splash.updateProgression(0.5, _("Loading accounting..."));
+ splash.updateProgression(0.5, _("lima.splash.2"));
//start http server
LimaServiceFactory.getInstance().getService(HttpServerServiceMonitorable.class).start();
@@ -184,7 +185,7 @@
openingView.setLocationRelativeTo(null);
openingView.setVisible(true);
}
-
+ splash.updateProgression(0.5, _("lima.splash.3"));
// show ui
SwingUtilities.invokeLater(new Runnable() {
@Override
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaSplash.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -20,6 +20,7 @@
import java.awt.AlphaComposite;
import java.awt.Color;
+import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.SplashScreen;
@@ -69,7 +70,7 @@
public void initSplash(String version) {
if (splashGraphics != null) {
splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawString("Version : " + version, 300, 90);
+ splashGraphics.drawString("Version : " + version, 394, 42);
}
else {
if (log.isWarnEnabled()) {
@@ -89,16 +90,18 @@
public void updateProgression(double progress, String message) {
if (splashGraphics != null) {
- splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawRect(50, 130, 300, 10);
- splashGraphics.fillRect(50, 130, (int)(300.0 * progress), 10);
+ splashGraphics.setColor(Color.GRAY);
+ splashGraphics.drawRect(65, 253, 300, 10);
+ splashGraphics.fillRect(65, 253, (int)(300.0 * progress), 10);
if (message != null) {
splashGraphics.setComposite(AlphaComposite.Clear);
- splashGraphics.fillRect(50,150, 200, 40);
+ splashGraphics.fillRect(65, 238, 300, 15);
splashGraphics.setPaintMode();
- splashGraphics.setColor(Color.BLACK);
- splashGraphics.drawString(message + "...", 50, 160);
+ splashGraphics.setColor(new Color(255, 210, 55));
+ Font font = new Font("Lucida Sans", Font.BOLD, 14);
+ splashGraphics.setFont(font);
+ splashGraphics.drawString(message + "...", 65, 248);
}
splash.update();
Added: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,61 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.enums;
+
+import static org.nuiton.i18n.I18n._;
+
+
+public enum ComboBoxDatesEnum {
+
+ FISCAL_PERIOD(_("lima.enum.comboboxperiod.fiscalperiod")),
+ FINANCIAL_PERIOD(_("lima.enum.comboboxperiod.financialperiod")),
+ PERIOD(_("lima.enum.comboboxperiod.period"));
+
+ private final String description;
+
+ private ComboBoxDatesEnum(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public static String[] descriptions(){
+ int nbElts = ComboBoxDatesEnum.values().length;
+ String[] descriptions = new String[nbElts];
+ ComboBoxDatesEnum[] enums = ComboBoxDatesEnum.values();
+ for (int i = 0; i < nbElts; i++) {
+ descriptions[i] = enums[i].getDescription();
+ }
+ return descriptions;
+ }
+
+ public static ComboBoxDatesEnum valueOfDescription(String description){
+ ComboBoxDatesEnum value = null;
+
+ for (ComboBoxDatesEnum enums : ComboBoxDatesEnum.values()) {
+ if (description.equals(enums.description)){
+ value = enums;
+ break;
+ }
+ }
+ return value;
+ }
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.accountsreports;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class AccountsReportsPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(AccountsReportsPeriodSearchPanel.class);
+
+ protected AccountsReportsViewHandler handler;
+
+ public AccountsReportsPeriodSearchPanel(AccountsReportsViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -22,47 +22,22 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.Account;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ AccountsReportsPeriodSearchPanel periodSearchPanel = new AccountsReportsPeriodSearchPanel(handler);
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- getHandler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- getHandler().setEndDate(endDate);
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
-
void $afterCompleteSetup() {
- //getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel id="accountSelectorLabel" text="lima.account"/>
</cell>
<cell anchor="west">
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalancePeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,153 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.balance;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class BalancePeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(BalancePeriodSearchPanel.class);
+
+ protected BalanceViewHandler handler;
+
+ public BalancePeriodSearchPanel(BalanceViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -22,48 +22,23 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.Account;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
-
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ BalancePeriodSearchPanel periodSearchPanel = new BalancePeriodSearchPanel(handler);
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
- getHandler().setBeginDate(beginDate);
- getHandler().setEndDate(endDate);
-
void $afterCompleteSetup() {
- getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><BalancePeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.entrybooksreports;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class EntryBooksReportsPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(EntryBooksReportsPeriodSearchPanel.class);
+
+ protected EntryBooksReportsViewHandler handler;
+
+ public EntryBooksReportsPeriodSearchPanel(EntryBooksReportsViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -23,47 +23,22 @@
<script>
<![CDATA[
- import org.chorem.lima.entity.EntryBook;
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ EntryBooksReportsPeriodSearchPanel periodSearchPanel = new EntryBooksReportsPeriodSearchPanel(handler);
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- getHandler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- getHandler().setEndDate(endDate);
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
-
void $afterCompleteSetup() {
- //getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><EntryBooksReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel id="entryBookSelectorLabel" text="lima.entrybook"/>
</cell>
<cell anchor="west">
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialstatementreport;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class FinancialStatementReportPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(FinancialStatementReportPeriodSearchPanel.class);
+
+ protected FinancialStatementReportViewHandler handler;
+
+ public FinancialStatementReportPeriodSearchPanel(FinancialStatementReportViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.model.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.model.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.model.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.model.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.model.setBeginDate(fPeriod.getBeginDate());
+ handler.model.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod !=null){
+ handler.model.setBeginDate(fPeriod.getBeginDate());
+ handler.model.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -19,25 +19,15 @@
package org.chorem.lima.ui.financialtransaction;
import static org.nuiton.i18n.I18n._;
-
import java.awt.Color;
import java.awt.Component;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.util.Date;
-import java.util.concurrent.ExecutionException;
-
import javax.swing.SwingWorker;
-import javax.swing.table.TableColumn;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
@@ -45,7 +35,6 @@
import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
import org.chorem.lima.ui.celleditor.DateTableCellEditor;
import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
-import org.chorem.lima.util.DialogHelper;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
import org.jdesktop.swingx.decorator.ComponentAdapter;
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java (from rev 3007, trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,169 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.financialtransactionsearch;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxPeriodEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class FinancialTransactionPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(FinancialTransactionPeriodSearchPanel.class);
+
+ protected FinancialTransactionSearchViewHandler handler;
+
+ public FinancialTransactionPeriodSearchPanel(FinancialTransactionSearchViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxPeriodEnum.PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxPeriodEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case DATE:
+ Calendar calendar = Calendar.getInstance();
+ Date date = calendar.getTime();
+ date = DateUtils.truncate(date, Calendar.DATE);
+ final JXDatePicker datePicker = new JXDatePicker(date);
+ ActionListener dateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(datePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(datePicker.getDate());
+ handler.setEndDate(null);
+ handler.refresh();
+ datePicker.addActionListener(dateActionListener);
+ this.removeAll();
+ this.add(datePicker);
+ break;
+
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -20,8 +20,6 @@
import java.awt.Color;
import java.awt.Component;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import java.math.BigDecimal;
import java.util.Date;
import org.chorem.lima.entity.Account;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -30,7 +30,7 @@
AccountSearchPanel accountSearchPanel = new AccountSearchPanel(handler);
AmountSearchPanel amountSearchPanel = new AmountSearchPanel(handler);
EntryBookSearchPanel entryBookSearchPanel = new EntryBookSearchPanel(handler);
- PeriodSearchPanel periodSearchPanel = new PeriodSearchPanel(handler);
+ FinancialTransactionPeriodSearchPanel periodSearchPanel = new FinancialTransactionPeriodSearchPanel(handler);
void $afterCompleteSetup() {
handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription(
@@ -47,7 +47,7 @@
<cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxPeriodEnum.descriptions())"
onActionPerformed="periodSearchPanel.refresh(ComboBoxPeriodEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
- <cell><PeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ <cell><FinancialTransactionPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
</row></Table></cell>
</row>
<row>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -18,23 +18,18 @@
package org.chorem.lima.ui.financialtransactionsearch;
-import java.util.ArrayList;
import java.util.Date;
-import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.beans.FinancialTransactionSearchImpl;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
-import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.util.ErrorHelper;
/**
* Handler associated with financial transaction view.
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/PeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -1,169 +0,0 @@
-/* *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ##%*/
-
-package org.chorem.lima.ui.financialtransactionsearch;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Calendar;
-import java.util.Date;
-import static org.nuiton.i18n.I18n._;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.enums.ComboBoxPeriodEnum;
-import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
-import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
-import org.jdesktop.swingx.JXDatePicker;
-
-public class PeriodSearchPanel extends JPanel {
-
- private static final Log log =
- LogFactory.getLog(PeriodSearchPanel.class);
-
- protected FinancialTransactionSearchViewHandler handler;
-
- public PeriodSearchPanel(FinancialTransactionSearchViewHandler handler) {
- this.handler = handler;
-
- //init date
- refresh(ComboBoxPeriodEnum.PERIOD);
- }
-
- static final long serialVersionUID = 1L;
-
- public void refresh(ComboBoxPeriodEnum comboBoxPeriodEnum){
-
- switch (comboBoxPeriodEnum) {
- case DATE:
- Calendar calendar = Calendar.getInstance();
- Date date = calendar.getTime();
- date = DateUtils.truncate(date, Calendar.DATE);
- final JXDatePicker datePicker = new JXDatePicker(date);
- ActionListener dateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setBeginDate(datePicker.getDate());
- handler.refresh();
- }
- };
- handler.setBeginDate(datePicker.getDate());
- handler.setEndDate(null);
- handler.refresh();
- datePicker.addActionListener(dateActionListener);
- this.removeAll();
- this.add(datePicker);
- break;
-
- case PERIOD:
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- //handler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- //handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
- final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
- ActionListener beginDateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setBeginDate(beginDatePicker.getDate());
- handler.refresh();
- }
- };
- handler.setBeginDate(beginDatePicker.getDate());
- beginDatePicker.addActionListener(beginDateActionListener);
-
- JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
- final JXDatePicker endDatePicker = new JXDatePicker(endDate);
- ActionListener endDateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setEndDate(endDatePicker.getDate());
- handler.refresh();
- }
- };
- handler.setEndDate(endDatePicker.getDate());
- endDatePicker.addActionListener(endDateActionListener);
- handler.refresh();
-
- this.removeAll();
- this.add(beginDateLabel);
- this.add(beginDatePicker);
- this.add(endDateLabel);
- this.add(endDatePicker);
- break;
-
- case FISCAL_PERIOD:
- FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
- FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
- final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
- fiscalPeriod.setRenderer(fiscalRenderer);
- fiscalPeriod.setEditable(false);
- ActionListener fiscalPeriodActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
- handler.setBeginDate(fPeriod.getBeginDate());
- handler.setEndDate(fPeriod.getEndDate());
- handler.refresh();
- }
- };
- fiscalPeriod.addActionListener(fiscalPeriodActionListener);
-
- this.removeAll();
- this.add(fiscalPeriod);
- break;
-
- case FINANCIAL_PERIOD:
- FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
- FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
- final JComboBox financialPeriod = new JComboBox(financialModel);
- financialPeriod.setRenderer(financialRenderer);
- financialPeriod.setEditable(false);
- ActionListener financialPeriodActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
- handler.setBeginDate(fPeriod.getBeginDate());
- handler.setEndDate(fPeriod.getEndDate());
- handler.refresh();
- }
- };
- financialPeriod.addActionListener(financialPeriodActionListener);
- this.removeAll();
- this.add(financialPeriod);
- break;
- }
-
- }
-
-}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerPeriodSearchPanel.java 2010-08-23 09:35:53 UTC (rev 3014)
@@ -0,0 +1,152 @@
+/* *##% Lima Swing
+ * Copyright (C) 2008 - 2010 CodeLutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * ##%*/
+
+package org.chorem.lima.ui.ledger;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Calendar;
+import java.util.Date;
+import static org.nuiton.i18n.I18n._;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+import org.jdesktop.swingx.JXDatePicker;
+
+public class LedgerPeriodSearchPanel extends JPanel {
+
+ private static final Log log =
+ LogFactory.getLog(LedgerPeriodSearchPanel.class);
+
+ protected LedgerViewHandler handler;
+
+ public LedgerPeriodSearchPanel(LedgerViewHandler handler) {
+ this.handler = handler;
+
+ //init date
+ refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
+ }
+
+ static final long serialVersionUID = 1L;
+
+ public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum){
+
+ switch (comboBoxPeriodEnum) {
+ case PERIOD:
+ // get begin date
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
+ //handler().setBeginDate(beginDate);
+
+ // get end date
+ Calendar calendarEnd = Calendar.getInstance();
+ Date endDate = calendarEnd.getTime();
+ //handler().setEndDate(endDate);
+ JLabel beginDateLabel = new JLabel(_("lima.period.begindate"));
+ final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
+ ActionListener beginDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setBeginDate(beginDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setBeginDate(beginDatePicker.getDate());
+ beginDatePicker.addActionListener(beginDateActionListener);
+
+ JLabel endDateLabel = new JLabel(_("lima.period.enddate"));
+ final JXDatePicker endDatePicker = new JXDatePicker(endDate);
+ ActionListener endDateActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handler.setEndDate(endDatePicker.getDate());
+ handler.refresh();
+ }
+ };
+ handler.setEndDate(endDatePicker.getDate());
+ endDatePicker.addActionListener(endDateActionListener);
+ handler.refresh();
+
+ this.removeAll();
+ this.add(beginDateLabel);
+ this.add(beginDatePicker);
+ this.add(endDateLabel);
+ this.add(endDatePicker);
+ break;
+
+ case FISCAL_PERIOD:
+ FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel();
+ FiscalPeriodComboBoxRenderer fiscalRenderer = new FiscalPeriodComboBoxRenderer();
+ final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
+ fiscalPeriod.setRenderer(fiscalRenderer);
+ fiscalPeriod.setEditable(false);
+ ActionListener fiscalPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ fiscalPeriod.addActionListener(fiscalPeriodActionListener);
+
+ this.removeAll();
+ this.add(fiscalPeriod);
+ break;
+
+ case FINANCIAL_PERIOD:
+ FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel();
+ FinancialPeriodComboBoxRenderer financialRenderer = new FinancialPeriodComboBoxRenderer();
+ final JComboBox financialPeriod = new JComboBox(financialModel);
+ financialPeriod.setRenderer(financialRenderer);
+ financialPeriod.setEditable(false);
+ ActionListener financialPeriodActionListener = new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
+ if (fPeriod != null){
+ handler.setBeginDate(fPeriod.getBeginDate());
+ handler.setEndDate(fPeriod.getEndDate());
+ handler.refresh();
+ }
+ }
+ };
+ financialPeriod.addActionListener(financialPeriodActionListener);
+ this.removeAll();
+ this.add(financialPeriod);
+ break;
+ }
+
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-23 09:35:53 UTC (rev 3014)
@@ -22,47 +22,22 @@
<org.chorem.lima.ui.ledger.LedgerTableModel id="modelTable"/>
<script>
<![CDATA[
+ import org.chorem.lima.enums.ComboBoxDatesEnum;
+ LedgerPeriodSearchPanel periodSearchPanel = new LedgerPeriodSearchPanel(handler);
- import org.apache.commons.lang.time.DateUtils;
- import java.util.Calendar;
-
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- getHandler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- getHandler().setEndDate(endDate);
-
- getBeginDatePicker().setDate(beginDate);
- getEndDatePicker().setDate(endDate);
-
void $afterCompleteSetup() {
- getHandler().refresh();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
+ <cell fill='both'><Table><row>
+ <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
+ validate(); repaint()"/></cell>
+ <cell><LedgerPeriodSearchPanel javaBean="periodSearchPanel"/></cell>
+ </row></Table></cell>
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
- onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
- </cell>
- <cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
- </cell>
- <cell anchor="west">
- <org.jdesktop.swingx.JXDatePicker id="endDatePicker"
- onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
- </cell>
- <cell anchor="east">
<JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-23 09:35:53 UTC (rev 3014)
@@ -2,12 +2,6 @@
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
-LIMA=
-Loading\ accounting...=
-blabla=
-export=
-hello\ world=
-import=
lima.about.message=
lima.account=Account
lima.account.label=Label
@@ -226,6 +220,9 @@
lima.solde=
lima.soldecredit=
lima.soldedebit=
+lima.splash.1=Loading services...
+lima.splash.2="Loading accounting...
+lima.splash.3=Ready \!
lima.structure=Structure
lima.subledger.code=Code
lima.tab.home=Home
@@ -300,4 +297,3 @@
limahome.transaction.unbalanced=
limahome.transactionbalanced=
limahome.transactionunbalanced=
-update=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-22 19:14:52 UTC (rev 3013)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-23 09:35:53 UTC (rev 3014)
@@ -2,10 +2,6 @@
DEBUG\ delete\ all=
Do\ you\ really\ want\ to\ delete\ entry\ book\ %s\ ?=
Global\ lima\ exception=
-LIMA=
-Loading\ accounting...=
-export=
-hello\ world=
lima.about.message=\u00C0 propos de Lima
lima.account=Compte
lima.account.label=
@@ -210,6 +206,9 @@
lima.solde=Solde
lima.soldecredit=Solde Cr\u00E9diteur
lima.soldedebit=Solde D\u00E9biteur
+lima.splash.1=Chargement des services...
+lima.splash.2=Chargement de la comptabilit\u00E9
+lima.splash.3=Application pr\u00EAte \!
lima.structure=Structure
lima.subledger.code=Code
lima.tab.home=Accueil
@@ -269,4 +268,3 @@
limahome.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrect
limahome.transaction.nothing=Aucune \u00E9criture
limahome.transaction.unbalanced=\u00E9critures ne sont pas \u00E9quilibr\u00E9es \!
-update=
Added: trunk/lima-swing/src/main/resources/images/puzzle_splash.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/images/puzzle_splash.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
22 Aug '10
Author: jpepin
Date: 2010-08-22 21:14:52 +0200 (Sun, 22 Aug 2010)
New Revision: 3013
Url: http://chorem.org/repositories/revision/lima/3013
Log:
Fonction recherche des ?\195?\169critures : affichage couple entr?\195?\169es/transactions ?\195?\169ditables
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/assembly/bin.xml
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -20,12 +20,14 @@
package org.chorem.lima.business.ejb;
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
@@ -590,44 +592,48 @@
@Override
- public List<Entry> searchEntry(Date beginDate, Date endDate, String voucher,
- String description, String letter, String accountsList,
- Account account, EntryBook entryBook,
- FinancialStatementWayEnum fStWayEnum, String operator,
- String amount, String amount2) throws LimaException {
- List<Entry> entries = null;
+ public List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException {
+ List<Object> result = new ArrayList<Object>();
+ List<FinancialTransaction> financialTransactions = null;
TopiaContext topiaContext = null;
try {
topiaContext = beginTransaction();
- EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
- TopiaQuery query = entryDAO.createQuery();
- String dateProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.TRANSACTION_DATE);
- String entryBookProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK);
- String entryBookLabelProperty = TopiaQuery.getProperty(Entry.FINANCIAL_TRANSACTION, FinancialTransaction.ENTRY_BOOK, EntryBook.LABEL);
- String accountProperty = TopiaQuery.getProperty(Entry.ACCOUNT, Account.ACCOUNT_NUMBER);
+ FinancialTransactionDAO financialTransactionDAO =
+ LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaContext);
+ TopiaQuery query = financialTransactionDAO.createQuery("T");
+
+ String dateProperty = TopiaQuery.getProperty(FinancialTransaction.TRANSACTION_DATE);
+ String accountNumberProperty = TopiaQuery.getProperty(Entry.ACCOUNT, Account.ACCOUNT_NUMBER);
+ query.addDistinct();
+ query.addLeftJoin("T."+FinancialTransaction.ENTRY, "E", true);
//Load for lazy
- query.addLoad(dateProperty)
- .addLoad(entryBookLabelProperty)
- .addLoad(accountProperty);
+ query.addLoad(FinancialTransaction.FINANCIAL_PERIOD);
+ Date beginDate = financialTransactionSearch.getBeginDate();
+ Date endDate = financialTransactionSearch.getEndDate();
if (beginDate != null && endDate != null){
query.addBetween(dateProperty, beginDate, endDate);
}
else if (beginDate != null){
query.addEquals(dateProperty, beginDate);
}
+ String voucher = financialTransactionSearch.getVoucher();
if (voucher != null){
- query.addWhere(Entry.VOUCHER, Op.LIKE, "%"+voucher+"%");
+ query.addWhere("E.voucher", Op.LIKE, "%"+voucher+"%");
}
+ String description = financialTransactionSearch.getDescription();
if (description != null){
- query.addWhere(Entry.DESCRIPTION, Op.LIKE, "%"+description+"%");
+ query.addWhere("E.description", Op.LIKE, "%"+description+"%");
}
+ String letter = financialTransactionSearch.getLetter();
if (letter != null){
- query.addWhere(Entry.LETTERING, Op.LIKE, "%"+letter+"%");
+ query.addWhere("E.lettering", Op.LIKE, "%"+letter+"%");
}
+ Account account = financialTransactionSearch.getAccount();
+ String accountsList = financialTransactionSearch.getAccountList();
if (account != null){
- query.addEquals(Entry.ACCOUNT, account);
+ query.addEquals("E.account", account);
}
else if (accountsList != null){
AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiaContext);
@@ -642,33 +648,51 @@
}
}
if (accounts.size() > 0){
- query.addWhere(accountProperty + " in (" + accountNumbers + ")");
+ query.addWhere("E."+accountNumberProperty + " in (" + accountNumbers + ")");
}
}
+ EntryBook entryBook = financialTransactionSearch.getEntryBook();
+ String amount = financialTransactionSearch.getAmount();
+ String amount2 = financialTransactionSearch.getAmount2();
+ String operator = financialTransactionSearch.getOperator();
+ FinancialStatementWayEnum fStWayEnum = financialTransactionSearch.getAmountWayEnum();
if (entryBook != null){
- query.addEquals(entryBookProperty, entryBook);
+ query.addEquals("T."+FinancialTransaction.ENTRY_BOOK, entryBook);
}
- else if (amount != null){
+ if (amount != null){
if (amount2 != null){
BigDecimal value1 = new BigDecimal(amount);
BigDecimal value2 = new BigDecimal(amount2);
- query.addBetween(Entry.AMOUNT, value1, value2);
+ query.addBetween("E.amount", value1, value2);
}
else if (operator != null) {
- query.addWhere(Entry.AMOUNT+" "+operator+" "+amount);
+ query.addWhere("E.amount"+" "+operator+" "+amount);
}
switch (fStWayEnum) {
case CREDIT:
- query.addEquals(Entry.DEBIT, false);
+ query.addEquals("E.debit", false);
break;
case DEBIT:
- query.addEquals(Entry.DEBIT, true);
+ query.addEquals("E.debit", true);
break;
}
}
log.debug(query);
- entries = entryDAO.findAllByQuery(query);
+ financialTransactions = financialTransactionDAO.findAllByQuery(query);
+ log.debug(financialTransactions);
+
+ EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
+ for (FinancialTransaction financialTransaction : financialTransactions) {
+ result.add(financialTransaction);
+
+ TopiaQuery query2 = entryDAO.createQuery();
+ query2.addEquals(Entry.FINANCIAL_TRANSACTION, financialTransaction);
+ //Load for lazy
+ query2.addLoad(Entry.ACCOUNT);
+ List<Entry> entries = entryDAO.findAllByQuery(query2);
+ result.addAll(entries);
+ }
}
catch (TopiaException ex) {
doCatch(topiaContext, ex, log);
@@ -676,7 +700,7 @@
finally {
doFinally(topiaContext, log);
}
- return entries;
+ return result;
}
protected TopiaContext beginTransaction() throws TopiaException {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -68,7 +68,7 @@
protected int port;
- private static SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd");
+ private static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd");
public HttpServerServiceImpl() {
path = LimaConfig.getInstance().getReportsDir();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -41,7 +41,7 @@
public interface FinancialPeriodServiceLocal extends FinancialPeriodService {
void createFinancialPeriodsWithTransaction(List<FinancialPeriod> financialPeriods, TopiaContext topiaContext) throws LimaException;
- public void blockClosedPeriodicEntryBookWithTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException;
+ void blockClosedPeriodicEntryBookWithTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -19,13 +19,10 @@
package org.chorem.lima.business.ejbinterface;
-import java.util.Date;
import java.util.List;
-import java.util.Set;
import javax.ejb.Remote;
-import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
@@ -82,5 +79,5 @@
void removeEntry(Entry entry) throws LimaException;
- List<Entry> searchEntry(Date beginDate, Date endDate, String voucher, String description, String letter, String accountsList, Account account, EntryBook entryBook, FinancialStatementWayEnum fStWayEnum, String operator, String amount, String amount2) throws LimaException;
+ List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
}
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/assembly/bin.xml
===================================================================
--- trunk/lima-swing/src/main/assembly/bin.xml 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/assembly/bin.xml 2010-08-22 19:14:52 UTC (rev 3013)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
<id>bin</id>
<formats>
<format>zip</format>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -19,21 +19,16 @@
package org.chorem.lima.ui.financialtransactionsearch;
import static org.nuiton.i18n.I18n._;
-
import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.Date;
import java.util.List;
-import java.util.Set;
-
import javax.swing.table.AbstractTableModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
-import org.chorem.lima.business.utils.EntryComparator;
+import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
@@ -57,8 +52,7 @@
* Last update : $Date: 2010-05-14 13:22:26 +0200 (ven. 14 mai 2010) $
* By : $Author: jpepin $
*/
-public class FinancialTransactionSearchTableModel extends AbstractTableModel {
-
+public class FinancialTransactionSearchTableModel extends AbstractTableModel implements ServiceListener{
/** serialVersionUID. */
private static final long serialVersionUID = 3914954536809622358L;
@@ -67,15 +61,67 @@
private static final Log log = LogFactory
.getLog(FinancialTransactionSearchTableModel.class);
+ /** Transaction service. */
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
+ /** selected financial period */
+ protected FiscalPeriod selectedFiscalPeriod;
+
/** data cache */
- protected List<Entry> cacheDataList;
+ protected FinancialTransactionSearch financialTransactionSearch;
+ protected List<Object> cacheDataList;
+
- public void refresh(List<Entry> objects){
- cacheDataList = objects;
+ /**
+ * Model constructor.
+ *
+ * Just init service proxies.
+ */
+ public FinancialTransactionSearchTableModel() {
+ /* Services */
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
+ }
+
+ /**
+ * Le model est une combinaison de Transaction/Entries.
+ *
+ *
+ * @return
+ */
+ protected List<Object> getDataList(FinancialTransactionSearch financialTransactionSearch) {
+ List<Object> results = null;
+ //prevent to much result
+ if (financialTransactionSearch != null && (financialTransactionSearch.getVoucher() != null || financialTransactionSearch.getDescription() != null
+ || financialTransactionSearch.getLetter() != null || financialTransactionSearch.getAccountList() != null
+ || financialTransactionSearch.getAccount() != null || financialTransactionSearch.getEntryBook() != null
+ || (financialTransactionSearch.getAmount() != null && financialTransactionSearch.getOperator() != null)
+ || (financialTransactionSearch.getAmount() != null && financialTransactionSearch.getAmount2() != null))){
+ try {
+ results = financialTransactionService.searchFinancialTransaction(financialTransactionSearch);
+ }
+ catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.debug("Can't update model", eee);
+ }
+
+ ErrorHelper.showErrorDialog("Can't get transaction list", eee);
+ }
+ }
+
+ return results;
+ }
+
+
+ protected void refresh(FinancialTransactionSearch financialTransactionSearch) {
+ this.financialTransactionSearch = financialTransactionSearch;
+ cacheDataList = getDataList(financialTransactionSearch);
fireTableDataChanged();
}
+
@Override
public int getColumnCount() {
return 9;
@@ -174,67 +220,253 @@
// just prevent too much result
if (cacheDataList != null) {
- Entry currentRow = cacheDataList.get(row);
-
+ result = cacheDataList.get(row);
+
+ if (result instanceof FinancialTransaction) {
+ FinancialTransaction currentRow = (FinancialTransaction)result;
+ BigDecimal amountDebit = currentRow.getAmountDebit();
+ BigDecimal amountCredit = currentRow.getAmountCredit();
+
switch (column) {
case 0:
- result = currentRow.getFinancialTransaction().getTransactionDate();
+ result = currentRow.getTransactionDate();
break;
case 1:
- EntryBook entryBook =
- currentRow.getFinancialTransaction().getEntryBook();
- if (entryBook != null){
- result = entryBook.getCode();
+ if (currentRow.getEntryBook() != null){
+ result = currentRow.getEntryBook().getCode();
}
else {
result = null;
}
break;
case 2:
- result = currentRow.getVoucher();
+ result = null; //entrybook
break;
+ case 3:
+ result = null; // account
+ break;
+ case 4:
+ result = null; // description
+ break;
+ case 5 :
+ result = amountDebit;
+ break;
+ case 6:
+ result = amountCredit;
+ break;
+ case 7:
+ result = amountDebit.subtract(amountCredit);
+ break;
+ case 8:
+ result = null;
+ break;
+ }
+ }
+ else if (result instanceof Entry) {
+ Entry currentEntry = (Entry)result;
+ switch (column) {
+ case 0:
+ result = null; // date
+ break;
+ case 1 : // entry book
+ result = null;
+ break;
+ case 2:
+ result = currentEntry.getVoucher();
+ break;
case 3: // account
- Account account = currentRow.getAccount();
- if (account != null){
- result = account.getAccountNumber();
+ if (currentEntry.getAccount() != null){
+ result = currentEntry.getAccount().getAccountNumber();
}
else {
result = null;
}
break;
case 4:
- result = currentRow.getDescription();
+ result = currentEntry.getDescription();
break;
case 5 :
- result = currentRow.getDebit() ? currentRow.getAmount() : 0;
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : 0;
break;
case 6:
- result = currentRow.getDebit() ? 0 : currentRow.getAmount();
+ result = currentEntry.getDebit() ? 0 : currentEntry.getAmount();
break;
case 7:
- result = null; // balance
+ result = null;
break;
case 8:
- result = currentRow.getLettering();
+ result = currentEntry.getLettering();
break;
}
}
+ }
return result;
}
+ public void setFiscalPeriod(FiscalPeriod fiscalPeriod){
+ selectedFiscalPeriod = fiscalPeriod;
+ }
+ /**
+ * To set cells editable or not
+ * different condition for entry or financial transaction
+ */
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
-
- return false;
+ boolean editableCell=false;
+ Object currentRow = cacheDataList.get(rowIndex);
+ // cells editable for the entry row, all cells exclude the date
+ if ((currentRow instanceof Entry) && !((columnIndex==0) || (columnIndex==1))) {
+ editableCell=true;
+ }
+ // cells editable for the financialtransaction row, no cells exclude the date
+ if ((currentRow instanceof FinancialTransaction) && ((columnIndex==0) || (columnIndex==1))){
+ editableCell=true;
+ }
+ return editableCell;
}
+
+ /**
+ * @throws LimaException
+ */
+ public void addEmptyEntry(Object value, int row) throws LimaException {
+ FinancialTransaction currentTransaction = null;
+ Object currentRow = cacheDataList.get(row);
+ Entry entry = new EntryImpl();
+ entry.setAmount(new BigDecimal(0));
+ //check if current row is a transaction or an entry
+ if (currentRow instanceof FinancialTransaction) {
+ currentTransaction = (FinancialTransaction)currentRow;
+ }
+ else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ //get back the parent transaction of the entry
+ currentTransaction = currentEntry.getFinancialTransaction();
+ }
+ //create it
+ entry.setFinancialTransaction(currentTransaction);
+ financialTransactionService.createEntry(entry);
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+
+ /**
+ * to modifiy financialtransaction or entry
+ */
+ @Override
+ public void setValueAt(Object value, int row, int column) {
+ int financialTransactionRow = 0;
+ // just prevent too much result
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof FinancialTransaction) {
+ FinancialTransaction currentFinancialTransaction =
+ (FinancialTransaction)currentRow;
+ switch (column) {
+ case 0:
+ //update
+ currentFinancialTransaction.setTransactionDate((Date)value);
+ break;
+ case 1 :
+ currentFinancialTransaction.setEntryBook((EntryBook)value);
+ break;
+ }
+ // notify service for modification
+ try {
+ financialTransactionService.
+ updateFinancialTransaction(currentFinancialTransaction);
+ } catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't update financial transaction", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ //update the financial transaction in entire
+ financialTransactionRow =
+ cacheDataList.indexOf(((FinancialTransaction) currentRow));
+ }
+ else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ switch (column) {
+ case 2 :
+ currentEntry.setVoucher((String)value);
+ break;
+ case 3:
+ currentEntry.setAccount((Account)value);
+ break;
+ case 4:
+ currentEntry.setDescription((String)value);
+ break;
+ case 5 :
+ currentEntry.setAmount((BigDecimal)value);
+ currentEntry.setDebit(true);
+ break;
+ case 6:
+ currentEntry.setAmount((BigDecimal)value);
+ currentEntry.setDebit(false);
+ break;
+ case 8:
+ currentEntry.setLettering((String)value);
+ break;
+ }
+ try {
+ financialTransactionService.updateEntry(currentEntry);
+ } catch (LimaException eee) {
+ if (log.isDebugEnabled()){
+ log.debug("Can't update entry", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+ }
+ //update the financial transaction in entire
+ financialTransactionRow =
+ cacheDataList.indexOf(((Entry) currentRow).
+ getFinancialTransaction());
+ }
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+
public Object getElementAt(int row){
-
Object currentRow = cacheDataList.get(row);
return currentRow;
}
-
+
+
+ /**
+ * Delete selected row in table (could be transaction or entry).
+ *
+ * Called by model.
+ * @param Object, int
+ * @throws LimaException
+ */
+ public void removeObject(Object object, int row) throws LimaException {
+ Object currentRow = cacheDataList.get(row);
+ if (currentRow instanceof FinancialTransaction) {
+ FinancialTransaction currentTransaction =
+ (FinancialTransaction)currentRow;
+ financialTransactionService.removeFinancialTransaction(currentTransaction);
+ }
+ else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry)currentRow;
+ financialTransactionService.removeEntry(currentEntry);
+ }
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if ((serviceName.contains("FinancialTransaction") || methodeName.contains("importEntries")
+ || methodeName.contains("importAll")) && !methodeName.contains("search")){
+ //on recharge la liste
+ cacheDataList = getDataList(financialTransactionSearch);
+ fireTableDataChanged();
+ }
+ }
+
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -18,11 +18,14 @@
package org.chorem.lima.ui.financialtransactionsearch;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
+import org.chorem.lima.beans.FinancialTransactionSearchImpl;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
@@ -59,19 +62,8 @@
/** Transaction service. */
protected final FinancialTransactionService financialTransactionService;
- protected Date beginDate;
- protected Date endDate;
- protected String voucher;
- protected String description;
- protected String letter;
- protected String accountsList;
- protected Account account;
- protected EntryBook entryBook;
- protected FinancialStatementWayEnum amountWayEnum;
- protected String operator;
- protected String amount;
- protected String amount2;
-
+ /** data cache */
+ protected FinancialTransactionSearch financialTransactionSearch;
protected FinancialTransactionSearchViewHandler(FinancialTransactionSearchView view) {
this.view = view;
@@ -80,14 +72,17 @@
financialTransactionService =
LimaServiceFactory.getInstance().getService(
FinancialTransactionServiceMonitorable.class);
+
+ financialTransactionSearch = new FinancialTransactionSearchImpl();
+
}
public void setBeginDate(Date beginDate){
- this.beginDate = beginDate;
+ financialTransactionSearch.setBeginDate(beginDate);
}
public void setEndDate(Date endDate){
- this.endDate = endDate;
+ financialTransactionSearch.setEndDate(endDate);
}
public void setVoucher(String voucher){
@@ -96,7 +91,7 @@
if (!voucher.equals("")){
result = voucher;
}
- this.voucher=result;
+ financialTransactionSearch.setVoucher(result);
}
public void setDescription(String description){
@@ -104,7 +99,7 @@
if (!description.equals("")){
result = description;
}
- this.description=result;
+ financialTransactionSearch.setDescription(result);
}
public void setLetter(String letter){
@@ -112,11 +107,11 @@
if (!letter.equals("")){
result = letter;
}
- this.letter=result;
+ financialTransactionSearch.setLetter(result);
}
public String getAccountsList(){
- return this.accountsList;
+ return financialTransactionSearch.getAccountList();
}
public void setAccountsList(String accountsList){
@@ -124,24 +119,24 @@
if (!accountsList.equals("")){
result = accountsList;
}
- this.accountsList=result;
+ financialTransactionSearch.setAccountList(result);
}
public Account getAccount(){
- return this.account;
+ return financialTransactionSearch.getAccount();
}
public void setAccount(Account account){
- this.account=account;
+ financialTransactionSearch.setAccount(account);
}
public void setEntryBook(EntryBook entryBook){
- this.entryBook=entryBook;
+ financialTransactionSearch.setEntryBook(entryBook);
}
public String getAmount(){
- return this.amount;
+ return financialTransactionSearch.getAmount();
}
public void setAmount(String amount){
@@ -149,11 +144,11 @@
if (!amount.equals("")){
result = amount;
}
- this.amount=result;
+ financialTransactionSearch.setAmount(result);
}
public String getAmount2(){
- return this.amount2;
+ return financialTransactionSearch.getAmount2();
}
public void setAmount2(String amount2){
@@ -161,11 +156,11 @@
if (!amount2.equals("")){
result = amount2;
}
- this.amount2=result;
+ financialTransactionSearch.setAmount2(result);
}
public void setAmountWayEnum(FinancialStatementWayEnum amountWayEnum){
- this.amountWayEnum=amountWayEnum;
+ financialTransactionSearch.setAmountWayEnum(amountWayEnum);
}
public void setOperator(String operator){
@@ -173,39 +168,15 @@
if (!operator.equals("")){
result = operator;
}
- this.operator=result;
+ financialTransactionSearch.setOperator(result);
}
-
+
+
public void refresh(){
tableModel = view.getFinancialTransactionSearchTableModel();
if (tableModel != null){
- log.debug(voucher+" "
- +description+" "+letter+" "+accountsList+" "
- +account+" "+entryBook+" "+amount);
- tableModel.refresh(getDataList());
+ tableModel.refresh(financialTransactionSearch);
}
}
- protected List<Entry> getDataList() {
- List<Entry> results = null;
- //prevent to much result
- if (voucher != null || description != null || letter != null ||
- accountsList != null || account != null || entryBook != null ||
- (amount != null && operator != null) || (amount != null && amount2 != null)){
- try {
- results = financialTransactionService.searchEntry(beginDate, endDate,
- voucher, description, letter, accountsList, account,
- entryBook, amountWayEnum, operator, amount, amount2);
-
- }
- catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.debug("Can't update model", eee);
- }
- ErrorHelper.showErrorDialog("Can't get transaction list", eee);
- }
- }
- return results;
- }
-
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-08-22 19:14:52 UTC (rev 3013)
@@ -19,20 +19,17 @@
package org.chorem.lima.ui.financialtransactionunbalanced;
import static org.nuiton.i18n.I18n._;
-
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
-import java.util.Set;
-
import javax.swing.table.AbstractTableModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.utils.EntryComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
@@ -57,7 +54,7 @@
* Last update : $Date: 2010-05-14 13:22:26 +0200 (ven. 14 mai 2010) $
* By : $Author: jpepin $
*/
-public class FinancialTransactionUnbalancedTableModel extends AbstractTableModel {
+public class FinancialTransactionUnbalancedTableModel extends AbstractTableModel implements ServiceListener{
/** serialVersionUID. */
private static final long serialVersionUID = 3914954536809622358L;
@@ -67,7 +64,7 @@
.getLog(FinancialTransactionUnbalancedTableModel.class);
/** Transaction service. */
- protected final FinancialTransactionService financialTransactionService;
+ protected final FinancialTransactionServiceMonitorable financialTransactionService;
/** selected financial period */
protected FiscalPeriod selectedFiscalPeriod;
@@ -88,6 +85,7 @@
financialTransactionService =
LimaServiceFactory.getInstance().getService(
FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
}
/**
@@ -430,8 +428,8 @@
getFinancialTransaction());
}
//on recharge la liste
- //TODO PEPIN 20100607 Get financial transaction of cachedatelist on replace it
- fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);
+ cacheDataList = getDataList();
+ fireTableDataChanged();
}
}
@@ -464,4 +462,10 @@
refresh();
}
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ if (serviceName.contains("FinancialTransaction") || methodeName.contains("importEntries") || methodeName.contains("importAll")){
+ refresh();
+ }
+ }
}
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-21 13:01:48 UTC (rev 3012)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-22 19:14:52 UTC (rev 3013)
@@ -10,6 +10,8 @@
lima.account=Compte
lima.account.label=
lima.account.number=
+lima.accountsreports.begincalendar=
+lima.accountsreports.endcalendar=
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
1
0
r3012 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui/balance java/org/chorem/lima/ui/financialtransactionsearch java/org/chorem/lima/ui/ledger resources/i18n
by jpepin@users.chorem.org 21 Aug '10
by jpepin@users.chorem.org 21 Aug '10
21 Aug '10
Author: jpepin
Date: 2010-08-21 15:01:48 +0200 (Sat, 21 Aug 2010)
New Revision: 3012
Url: http://chorem.org/repositories/revision/lima/3012
Log:
Modification UI recherche d'?\195?\169criture.
Retouche UI balance et grand-journal.
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceFilterTextField.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -1,56 +0,0 @@
-/*
- * *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*
- */
-
-package org.chorem.lima.ui.balance;
-
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import javax.swing.JTextField;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class BalanceFilterTextField extends JTextField implements KeyListener {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(BalanceFilterTextField.class);
-
- protected BalanceViewHandler handler;
-
- public BalanceFilterTextField(BalanceViewHandler handler) {
- this.handler = handler;
- addKeyListener(this);
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- handler.setAccountFilter(getText());
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2010-08-21 13:01:48 UTC (rev 3012)
@@ -50,27 +50,30 @@
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
+ <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())"/>
</cell>
<cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
+ <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"
onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
</cell>
<cell anchor="east">
- <JLabel text="lima.accountsreports.accountfilter"/>
+ <JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField javaBean="new org.chorem.lima.ui.balance.BalanceFilterTextField(getHandler())"/>
+ <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="balanceFilter.getDocument()"
+ onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
+ onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
</cell>
<cell anchor="center">
- <JCheckBox id='movmentedFilter' text='lima.accountsreports.movmentedfilter' selected='false'
+ <JCheckBox id='movmentedFilter' text='lima.common.movmentedfilter' selected='false'
onActionPerformed="getHandler().refresh()"/>
</cell>
<cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -59,7 +59,6 @@
Object object = this.getSelectedItem();
if (object instanceof Account){
handler.setAccount((Account) this.getSelectedItem());
- handler.refresh();
}
}
@@ -77,7 +76,6 @@
//to prevent useless call to service
if (!account.equals(handler.getAccount())){
handler.setAccount(account);
- handler.refresh();
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchPanel.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -54,6 +54,7 @@
case ACCOUNT_LIST:
final JTextField accountsList = new JTextField(16);
+ accountsList.setMinimumSize(accountsList.getPreferredSize());
KeyListener accountsListKeyListener = new KeyListener() {
@Override
@@ -66,7 +67,6 @@
//to prevent useless call to service
if (!accounts.equals(handler.getAccountsList())){
handler.setAccountsList(accounts);
- handler.refresh();
}
}
@@ -77,7 +77,6 @@
accountsList.addKeyListener(accountsListKeyListener);
handler.setAccountsList(accountsList.getText());
handler.setAccount(null);
- handler.refresh();
this.removeAll();
this.add(accountsList);
break;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AmountSearchPanel.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -38,6 +38,7 @@
public void refresh(ComboBoxOperatorsEnum enums){
final JTextField amountTextField = new JTextField(16);
+ amountTextField.setMinimumSize(amountTextField.getPreferredSize());
KeyListener amountKeyListener = new KeyListener() {
@Override
@@ -50,7 +51,6 @@
//to prevent useless call to service
if (!amount.equals(handler.getAmount())){
handler.setAmount(amount);
- handler.refresh();
}
}
@@ -61,12 +61,14 @@
amountTextField.addKeyListener(amountKeyListener);
handler.setAmount2("");
handler.setOperator(enums.getSymbol());
+ handler.refresh();
this.removeAll();
this.add(amountTextField);
switch (enums) {
case INTERVAL:
final JTextField amount2TextField = new JTextField(16);
+ amount2TextField.setMinimumSize(amount2TextField.getPreferredSize());
KeyListener amount2KeyListener = new KeyListener() {
@Override
@@ -80,7 +82,6 @@
//to prevent useless call to service
if (!amount2.equals(handler.getAmount2())){
handler.setAmount2(amount2);
- handler.refresh();
}
}
@@ -93,9 +94,7 @@
this.add(amount2TextField);
break;
}
- amountTextField.setText(handler.getAmount());
- handler.refresh();
-
+ amountTextField.setText(handler.getAmount());
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -59,7 +59,6 @@
Object object = this.getSelectedItem();
if (object instanceof EntryBook){
handler.setEntryBook((EntryBook) this.getSelectedItem());
- handler.refresh();
}
}
@@ -74,7 +73,6 @@
Object object = this.getSelectedItem();
if (object instanceof EntryBook){
handler.setEntryBook((EntryBook) this.getSelectedItem());
- handler.refresh();
}
// delegate popup list menu
if ( e.getKeyChar() == KeyEvent.VK_ENTER )
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchPanel.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -37,14 +37,12 @@
case SELECT_ONE:
EntryBookSearchComboBox entryBookSearchComboBox = new EntryBookSearchComboBox(handler);
handler.setEntryBook(null);
- handler.refresh();
this.removeAll();
this.add(entryBookSearchComboBox);
break;
case ALL:
handler.setEntryBook(null);
- handler.refresh();
this.removeAll();
break;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2010-08-21 13:01:48 UTC (rev 3012)
@@ -18,6 +18,7 @@
<Table>
<FinancialTransactionSearchViewHandler id="handler" javaBean="new FinancialTransactionSearchViewHandler(this)" />
<Boolean id="selectedRow" javaBean="false" />
+ <java.awt.Dimension id="fieldSize" javaBean="new java.awt.Dimension()" />
<script>
<![CDATA[
import org.chorem.lima.enums.ComboBoxPeriodEnum;
@@ -32,7 +33,6 @@
PeriodSearchPanel periodSearchPanel = new PeriodSearchPanel(handler);
void $afterCompleteSetup() {
- handler.init();
handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription(
(String) getAmountComboBox().getSelectedItem()));
handler.setOperator(ComboBoxOperatorsEnum.valueOfDescription(
@@ -43,7 +43,7 @@
</script>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxPeriodEnum.descriptions())"
onActionPerformed="periodSearchPanel.refresh(ComboBoxPeriodEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
@@ -51,17 +51,29 @@
</row></Table></cell>
</row>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell><JLabel text="lima.table.voucher"/></cell>
- <cell><JTextField id='voucher'/></cell>
+ <cell><JTextField id='voucher' minimumSize="{voucher.getPreferredSize()}"/>
+ <javax.swing.text.Document javaBean="voucher.getDocument()"
+ onInsertUpdate='handler.setVoucher(voucher.getText())'
+ onRemoveUpdate='handler.setVoucher(voucher.getText())' />
+ </cell>
<cell><JLabel text="lima.table.description"/></cell>
- <cell><JTextField id='description'/></cell>
+ <cell><JTextField id='description' minimumSize='{description.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="description.getDocument()"
+ onInsertUpdate='handler.setDescription(description.getText())'
+ onRemoveUpdate='handler.setDescription(description.getText())' />
+ </cell>
<cell><JLabel text="lima.table.letter"/></cell>
- <cell><JTextField id='letter'/></cell>
+ <cell><JTextField id='letter' minimumSize='{letter.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="letter.getDocument()"
+ onInsertUpdate='handler.setLetter(letter.getText())'
+ onRemoveUpdate='handler.setLetter(letter.getText())' />
+ </cell>
</row></Table></cell>
</row>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell><JComboBox id="accountComboBox" javaBean="new JComboBox(ComboBoxAccountsEnum.descriptions())"
onActionPerformed="accountSearchPanel.refresh(ComboBoxAccountsEnum.valueOfDescription((String) accountComboBox.getSelectedItem()));
validate(); repaint()"/></cell>
@@ -73,7 +85,7 @@
</row></Table></cell>
</row>
<row>
- <cell><Table><row>
+ <cell fill='both'><Table><row>
<cell><JLabel text="lima.amount"/></cell>
<cell><JComboBox id="amountComboBox" javaBean="new JComboBox(FinancialStatementWayEnum.descriptions())"
onActionPerformed="handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription((String)amountComboBox.getSelectedItem()));
@@ -85,6 +97,9 @@
</row></Table></cell>
</row>
<row>
+ <cell><JButton id="validSearch" text='lima.common.search' onActionPerformed="handler.refresh()"/></cell>
+ </row>
+ <row>
<cell fill="both" weightx="1" weighty="1">
<JScrollPane>
<org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchTableModel
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -1,4 +1,4 @@
-/* *##% Lima Swing
+ /* *##% Lima Swing
* Copyright (C) 2008 - 2010 CodeLutin
*
* This program is free software; you can redistribute it and/or
@@ -18,12 +18,8 @@
package org.chorem.lima.ui.financialtransactionsearch;
-import static org.nuiton.i18n.I18n._;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import java.util.Date;
import java.util.List;
-import javax.swing.JTextField;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
@@ -86,85 +82,16 @@
FinancialTransactionServiceMonitorable.class);
}
- public void init(){
-
- final JTextField descriptionTextField = view.getDescription();
- KeyListener descriptionKeyListener = new KeyListener() {
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- setDescription(descriptionTextField.getText());
- refresh();
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
- };
- descriptionTextField.addKeyListener(descriptionKeyListener);
-
- final JTextField letterTextField = view.getLetter();
- KeyListener letterKeyListener = new KeyListener() {
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- //to prevent useless call to service
- String letterNew = letterTextField.getText();
- if (!letterNew.equals(letter)){
- setLetter(letterNew);
- refresh();
- }
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
- };
- letterTextField.addKeyListener(letterKeyListener);
-
- final JTextField voucherTextField = view.getVoucher();
- KeyListener voucherKeyListener = new KeyListener() {
-
- @Override
- public void keyTyped(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- //to prevent useless call to service
- String voucherNew = voucherTextField.getText();
- if (!voucherNew.equals(voucher)){
- setVoucher(voucherNew);
- refresh();
- }
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
- }
- };
- voucherTextField.addKeyListener(voucherKeyListener);
- }
-
public void setBeginDate(Date beginDate){
this.beginDate = beginDate;
- log.debug(beginDate);
}
public void setEndDate(Date endDate){
this.endDate = endDate;
- log.debug(endDate);
}
public void setVoucher(String voucher){
+
String result = null;
if (!voucher.equals("")){
result = voucher;
@@ -255,13 +182,13 @@
log.debug(voucher+" "
+description+" "+letter+" "+accountsList+" "
+account+" "+entryBook+" "+amount);
- //prevent to much result
tableModel.refresh(getDataList());
}
}
protected List<Entry> getDataList() {
List<Entry> results = null;
+ //prevent to much result
if (voucher != null || description != null || letter != null ||
accountsList != null || account != null || entryBook != null ||
(amount != null && operator != null) || (amount != null && amount2 != null)){
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerFilterTextField.java 2010-08-21 13:01:48 UTC (rev 3012)
@@ -1,58 +0,0 @@
-/*
- * *##% Lima Swing
- * Copyright (C) 2008 - 2010 CodeLutin
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*
- */
-
-package org.chorem.lima.ui.ledger;
-
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import javax.swing.JTextField;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class LedgerFilterTextField extends JTextField implements KeyListener {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(LedgerFilterTextField.class);
-
- protected LedgerViewHandler handler;
-
- public LedgerFilterTextField(LedgerViewHandler handler) {
- this.handler = handler;
- addKeyListener(this);
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
-
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- handler.setAccountFilter(getText());
-
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerView.jaxx 2010-08-21 13:01:48 UTC (rev 3012)
@@ -49,27 +49,30 @@
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="beginCalendarPanelLabel" text="lima.accountsreports.begincalendar"/>
+ <JLabel id="beginCalendarPanelLabel" text="lima.period.begindate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="beginDatePicker"
onActionPerformed="getHandler().setBeginDate(beginDatePicker.getDate())" />
</cell>
<cell anchor="east">
- <JLabel id="endCalendarPanelLabel" text="lima.accountsreports.endcalendar"/>
+ <JLabel id="endCalendarPanelLabel" text="lima.period.enddate"/>
</cell>
<cell anchor="west">
<org.jdesktop.swingx.JXDatePicker id="endDatePicker"
onActionPerformed="getHandler().setEndDate(endDatePicker.getDate())"/>
</cell>
<cell anchor="east">
- <JLabel text="lima.accountsreports.accountfilter"/>
+ <JLabel text="lima.common.filter"/>
</cell>
<cell anchor="west">
- <JTextField javaBean="new org.chorem.lima.ui.ledger.LedgerFilterTextField(getHandler())"/>
+ <JTextField id='balanceFilter' minimumSize='{balanceFilter.getPreferredSize()}'/>
+ <javax.swing.text.Document javaBean="balanceFilter.getDocument()"
+ onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())'
+ onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' />
</cell>
<cell anchor="center">
- <JCheckBox id='movmentedFilter' text='lima.accountsreports.movmentedfilter' selected='false'
+ <JCheckBox id='movmentedFilter' text='lima.common.movmentedfilter' selected='false'
onActionPerformed="getHandler().refresh()"/>
</cell>
<cell>
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-08-21 13:01:48 UTC (rev 3012)
@@ -47,15 +47,18 @@
lima.common.cancel=
lima.common.close=
lima.common.copy=
+lima.common.filter=
lima.common.fin=
lima.common.import=
lima.common.importexport=Import/Export
+lima.common.movmentedfilter=
lima.common.next=
lima.common.ok=
lima.common.paste=
lima.common.print=
lima.common.quit=
lima.common.remove=
+lima.common.search=
lima.common.update=
lima.config.category.directories=
lima.config.category.directories.description=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-21 11:51:36 UTC (rev 3011)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-08-21 13:01:48 UTC (rev 3012)
@@ -10,10 +10,6 @@
lima.account=Compte
lima.account.label=
lima.account.number=
-lima.accountsreports.accountfilter=Filtrer
-lima.accountsreports.begincalendar=Date d\u00E9but
-lima.accountsreports.endcalendar=Date fin
-lima.accountsreports.movmentedfilter=Afficher que les comptes mouvement\u00E9s
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
@@ -44,14 +40,17 @@
lima.common.cancel=Annuler
lima.common.close=Fermer
lima.common.copy=Copier
+lima.common.filter=Filtrer
lima.common.fin=Termin\u00E9
lima.common.importexport=Importer/Exporter
+lima.common.movmentedfilter=Comptes mouvement\u00E9s
lima.common.next=Suivant
lima.common.ok=OK
lima.common.paste=Coller
lima.common.print=
lima.common.quit=Quitter
lima.common.remove=Supprimer
+lima.common.search=Rechercher
lima.common.update=Modifier
lima.config.category.directories=R\u00E9pertoires
lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
1
0