Author: jpepin Date: 2010-05-21 19:13:09 +0200 (Fri, 21 May 2010) New Revision: 2904 Url: http://chorem.org/repositories/revision/lima/2904 Log: Bug sur la classe association : retour ?\195?\160 modification de mod?\195?\168le ant?\195?\169rieur. Fonction liste des sous-comptes. R?\195?\169vision clot?\195?\187re d'une p?\195?\169riode financi?\195?\168re d'un journal. Added: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ClosedPeriodicEntryBookComparator.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java trunk/lima-business/src/main/java/org/chorem/lima/business/FinancialPeriodService.java trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java trunk/lima-business/src/test/java/org/chorem/lima/business/GeneratorTest.java trunk/lima-callao/src/main/xmi/accounting.zargo trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/AccountTableCellEditor.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTable.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTableModel.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -36,6 +36,8 @@ List<Account> getAllAccounts() throws LimaException; + List<Account> getAllSubAccounts() throws LimaException; + /** * Create new account. If {@code masterAccount} is not null, {@code account} * is added in {@code masterAccount}'s subAccounts. Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/FinancialPeriodService.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/FinancialPeriodService.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/FinancialPeriodService.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -25,6 +25,7 @@ import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialPeriod; +import org.nuiton.topia.TopiaContext; /** * Financial period service. @@ -43,6 +44,9 @@ void createFinancialPeriod(FinancialPeriod financialPeriod) throws LimaException; + void createFinancialPeriodWithTransaction(FinancialPeriod financialPeriod, TopiaContext topiaContext) throws LimaException; + + FinancialPeriod getFinancialPeriodWithDate(Date date) throws LimaException; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -21,6 +21,7 @@ import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialPeriod; +import org.chorem.lima.entity.FinancialPeriodDAO; import org.chorem.lima.entity.FinancialPeriodImpl; import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.FinancialTransactionDAO; @@ -133,6 +134,10 @@ Date endDate = fiscalPeriod.getEndDate(); FinancialPeriodService financialPeriodService = (FinancialPeriodService) map.get(FinancialPeriodService.class); + if (financialPeriodService == null){ + financialPeriodService = new FinancialPeriodServiceImpl(); + } + // FinancialPeriod of 1 month are created Date loopDate = beginDate; while (loopDate.compareTo(endDate) <= 0) { @@ -143,7 +148,7 @@ financialPeriod.setEndDate(periodEndDate); fiscalPeriod.addFinancialPeriod(financialPeriod); loopDate = loopUpperDate; - financialPeriodService.createFinancialPeriod(financialPeriod); + financialPeriodService.createFinancialPeriodWithTransaction(financialPeriod, transaction); } } catch (TopiaException ex) { @@ -200,8 +205,11 @@ Date endDate = closedPeriodicEntryBook. getFinancialPeriod().getBeginDate(); endDate = DateUtils.addMonths(endDate, -1); - Date beginDate = closedPeriodicEntryBook. - getFinancialPeriod().getFiscalPeriod().getBeginDate(); + + FiscalPeriodDAO fiscalPeriodDAO = LimaCallaoDAOHelper.getFiscalPeriodDAO(topiaTransaction); + FiscalPeriod fiscalPeriod = fiscalPeriodDAO.findContainsFinancialPeriod(closedPeriodicEntryBook.getFinancialPeriod()); + Date beginDate = fiscalPeriod.getBeginDate(); + EntryBook entryBook = closedPeriodicEntryBook.getEntryBook(); ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = @@ -244,7 +252,6 @@ /** * Generic code used to rollback a transaction. * - * TODO : replace this by JTA * @throws LimaException */ protected void doCatch(TopiaContext transaction, Exception cause, Log log) throws LimaException { 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-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -75,7 +75,7 @@ log.error("Can't init topia context", ex); } } - accountingRules = config.getAccountingRules(); + accountingRules = config.getAccountingRules(); } /** @@ -210,6 +210,38 @@ return accountsList; } + + @Override + public List<Account> getAllSubAccounts() throws LimaException { + + List<Account> accountsList = new ArrayList<Account>(); + + TopiaContext transaction = null; + try { + transaction = rootContext.beginTransaction(); + + AccountDAO accountDAO = + LimaCallaoDAOHelper.getAccountDAO(transaction); + List<Account> accounts = accountDAO.findAll(); + for (Account account : accounts) { + //check if parentaccount have no subaccount + if (account.getSubAccounts().size() == 0){ + accountsList.add(account); + } + } + Collections.sort(accountsList, new AccountComparator()); + } + catch (TopiaException ex) { + doCatch(transaction, ex, log); + } + finally { + doFinally(transaction, log); + } + + return accountsList; + } + + /** * Permet de recuperer la liste des comptes fils d'un compte en particulier. * @@ -355,5 +387,4 @@ throw new LimaException("Can't update account", ex); } } - } \ No newline at end of file Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -20,15 +20,19 @@ package org.chorem.lima.business.ejb; import java.util.ArrayList; +import java.util.Collections; import java.util.Date; import java.util.List; import javax.ejb.Stateless; + +import org.apache.commons.collections.comparators.ComparatorChain; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.AccountingRules; import org.chorem.lima.business.FinancialPeriodService; import org.chorem.lima.business.LimaConfig; import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.utils.ClosedPeriodicEntryBookComparator; import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO; import org.chorem.lima.entity.ClosedPeriodicEntryBookImpl; @@ -39,6 +43,7 @@ import org.chorem.lima.entity.FinancialPeriodImpl; import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.FiscalPeriod; +import org.chorem.lima.entity.FiscalPeriodDAO; import org.chorem.lima.entity.LimaCallaoDAOHelper; import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaContextFactory; @@ -86,22 +91,40 @@ @Override public void createFinancialPeriod(FinancialPeriod financialPeriod) throws LimaException { - TopiaContext transaction = null; + TopiaContext topiaTransaction = null; try { // basic check done, make check in database // TODO move it into JTA - transaction = rootContext.beginTransaction(); + topiaTransaction = rootContext.beginTransaction(); + createFinancialPeriodWithTransaction(financialPeriod, topiaTransaction); + + } + catch (TopiaException ex) { + doCatch(topiaTransaction, ex, log); + } + } + + + /** + * Création d'une période timeSpan mensuelle avec une date de début et de fin. Une période + * peut être bloquée ou non + * @return + */ + @Override + public void createFinancialPeriodWithTransaction(FinancialPeriod financialPeriod, TopiaContext topiaContext) throws LimaException { + + try { + // basic check done, make check in database + // TODO move it into JTA FinancialPeriodDAO financialPeriodDAO = - LimaCallaoDAOHelper.getFinancialPeriodDAO(transaction); - //create financial period - financialPeriodDAO.create(financialPeriod); + LimaCallaoDAOHelper.getFinancialPeriodDAO(topiaContext); //create ClosedPeriodicEntryBook for all entrybook ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = - LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(transaction); + LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(topiaContext); EntryBookDAO entryBookDAO = - LimaCallaoDAOHelper.getEntryBookDAO(transaction); + LimaCallaoDAOHelper.getEntryBookDAO(topiaContext); for (EntryBook entryBook : entryBookDAO.findAll()) { //new closed periodic entrybook ClosedPeriodicEntryBook closedPeriodicEntryBook @@ -113,16 +136,15 @@ // create it closedPeriodicEntryBookDAO.create(closedPeriodicEntryBook); } + //create financial period + financialPeriodDAO.create(financialPeriod); // commit - transaction.commitTransaction(); + topiaContext.commitTransaction(); } catch (TopiaException ex) { - doCatch(transaction, ex, log); + doCatch(topiaContext, ex, log); } - finally { - doFinally(transaction, log); - } } /** @@ -291,18 +313,11 @@ ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(transaction); - TopiaQuery query = closedPeriodicEntryBookDAO.createQuery(); - String closedPeriodicEntryBookProperty = - TopiaQuery.getProperty(ClosedPeriodicEntryBook.FINANCIAL_PERIOD, - FinancialPeriod.FISCAL_PERIOD, FiscalPeriod.LOCKED); - query.add(closedPeriodicEntryBookProperty, Boolean.FALSE); - query.addOrder(ClosedPeriodicEntryBook.FINANCIAL_PERIOD); - result = closedPeriodicEntryBookDAO.findAllByQuery(query); - - for (ClosedPeriodicEntryBook closedPeriodicEntryBook : result) { - closedPeriodicEntryBook.getFinancialPeriod().getBeginDate(); - closedPeriodicEntryBook.getFinancialPeriod().getFiscalPeriod().getBeginDate(); - } + //TODO Get closed periodicentrybook from unlocked fiscalperiod + result = closedPeriodicEntryBookDAO.findAll(); + Collections.sort(result, new ClosedPeriodicEntryBookComparator()); + + //log.debug(transaction.find("select FinancialPeriod")); // commit transaction.commitTransaction(); Added: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ClosedPeriodicEntryBookComparator.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ClosedPeriodicEntryBookComparator.java (rev 0) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ClosedPeriodicEntryBookComparator.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -0,0 +1,34 @@ +/* *##% 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.business.utils; + +import java.util.Comparator; + +import org.chorem.lima.entity.Account; +import org.chorem.lima.entity.ClosedPeriodicEntryBook; + +public class ClosedPeriodicEntryBookComparator implements Comparator<ClosedPeriodicEntryBook>{ + + @Override + public int compare(ClosedPeriodicEntryBook o1, ClosedPeriodicEntryBook o2) { + return o1.getFinancialPeriod().getBeginDate().compareTo(o2.getFinancialPeriod().getBeginDate()); + + } + +} Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -26,7 +26,7 @@ @Override public int compare(Entry o1, Entry o2) { - return o1.getTopiaId().compareTo(o2.getTopiaId()); + return o1.getTopiaCreateDate().compareTo(o2.getTopiaCreateDate()); } } Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -1,5 +1,6 @@ package org.chorem.lima.business; +import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.ejb.EntryBookServiceImpl; import org.junit.AfterClass; @@ -18,8 +19,7 @@ public class EntryBookServiceImplTest { /** log. */ - private static final org.apache.commons.logging.Log log = LogFactory - .getLog(EntryBookServiceImplTest.class); + private static final Log log = LogFactory.getLog(EntryBookServiceImplTest.class); private static EntryBookServiceImpl instance; Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -1,6 +1,7 @@ package org.chorem.lima.business; +import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.ejb.FinancialPeriodServiceImpl; import org.junit.AfterClass; @@ -23,8 +24,7 @@ public class FinancialPeriodServiceImplTest { /** log. */ - private static final org.apache.commons.logging.Log log = LogFactory - .getLog(FinancialPeriodServiceImplTest.class); + private static final Log log = LogFactory.getLog(FinancialPeriodServiceImplTest.class); private static FinancialPeriodServiceImpl instance; Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/GeneratorTest.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/GeneratorTest.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/GeneratorTest.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -17,7 +17,7 @@ public class GeneratorTest { /** log. */ - private static final org.apache.commons.logging.Log log = LogFactory.getLog(TransactionServiceImplTest.class); + private static final org.apache.commons.logging.Log log = LogFactory.getLog(FinancialTransactionServiceImpl.class); private static FinancialTransactionServiceImpl instanceTransaction; private static FiscalPeriodServiceImpl instancePeriod; Modified: trunk/lima-callao/src/main/xmi/accounting.zargo =================================================================== (Binary files differ) Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -0,0 +1,100 @@ +/* *##% 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.ArrayList; +import java.util.Collections; +import java.util.List; + +import javax.swing.ComboBoxModel; +import javax.swing.event.ListDataListener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.AccountService; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.entity.Account; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel; + +/** + * Account combo box model. + */ + +public class SubAccountComboBoxModel implements ComboBoxModel { + + private static final Log log = LogFactory.getLog(FinancialPeriodTableModel.class); + + protected Object selectedAccount; + + protected AccountService accountService; + + public SubAccountComboBoxModel() { + accountService = LimaServiceFactory.getInstance().getAccountService(); + } + + @Override + public Object getSelectedItem() { + return selectedAccount; + } + + @Override + public void setSelectedItem(Object anItem) { + selectedAccount = anItem; + } + + @Override + public void addListDataListener(ListDataListener arg0) { + // TODO Auto-generated method stub + + } + + @Override + public Object getElementAt(int index) { + return getDataList().get(index); + } + + @Override + public int getSize() { + return getDataList().size(); + } + + @Override + public void removeListDataListener(ListDataListener arg0) { + // TODO Auto-generated method stub + + } + + public List<Account> getDataList(){ + List<Account> result = new ArrayList<Account>(); + try { + result = accountService.getAllSubAccounts(); + } + catch (LimaException eee) { + // TODO Auto-generated catch block + if (log.isDebugEnabled()){ + log.debug("Can't get list subaccounts", eee); + } + } + return result; + + } + + +} Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/AccountTableCellEditor.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/AccountTableCellEditor.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/AccountTableCellEditor.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -30,8 +30,8 @@ import org.apache.commons.logging.Log; 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.ui.combobox.SubAccountComboBoxModel; import org.chorem.lima.widgets.JWideComboBox; public class AccountTableCellEditor extends AbstractCellEditor implements TableCellEditor { @@ -46,7 +46,7 @@ */ public AccountTableCellEditor() { comboBox = new JWideComboBox(); - AccountComboBoxModel accountComboBoxModel = new AccountComboBoxModel(); + SubAccountComboBoxModel accountComboBoxModel = new SubAccountComboBoxModel(); comboBox.setModel(accountComboBoxModel); AccountRenderer accountRenderer = new AccountRenderer(); comboBox.setRenderer(accountRenderer); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTable.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTable.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTable.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -139,6 +139,8 @@ @Override public void keyPressed(KeyEvent e) { + //TODO combinaison de touches dans la config + // delete selected row with the key : delete or ctrl clear // ou de l'entree if ((e.getKeyCode() == KeyEvent.VK_DELETE ) Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTableModel.java 2010-05-20 15:12:37 UTC (rev 2903) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/table/FinancialTransactionTableModel.java 2010-05-21 17:13:09 UTC (rev 2904) @@ -417,7 +417,7 @@ */ @Override public void setValueAt(Object value, int row, int column) { - + int financialTransactionRow=0; // just prevent too much result if (selectedFinancialPeriod != null) { Object currentRow = cacheDataList.get(row); @@ -478,6 +478,9 @@ log.debug("Can't update financial transaction", e); } } + //update the financial transaction in entire + financialTransactionRow = + getDataList().indexOf(((FinancialTransaction) currentRow)); } else if (currentRow instanceof Entry) { Entry currentEntry = (Entry)currentRow; @@ -513,11 +516,11 @@ log.debug("Can't update entry", e); } } + //update the financial transaction in entire + financialTransactionRow = + getDataList().indexOf(((Entry) currentRow). + getFinancialTransaction()); } - //update the financial transaction in entire - int financialTransactionRow = - getDataList().indexOf(((Entry) currentRow). - getFinancialTransaction()); //on recharge la liste cacheDataList = getDataList(); fireTableRowsUpdated(financialTransactionRow, getRowCount()-1);