Author: jpepin Date: 2010-04-19 15:19:30 +0200 (Mon, 19 Apr 2010) New Revision: 2865 Log: Ajout creation/affichage de comptes tiers Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/subledger/ trunk/lima-swing/src/main/java/org/chorem/lima/ui/subledger/model/ trunk/lima-swing/src/main/java/org/chorem/lima/ui/subledger/model/SubLedgerTableModel.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java trunk/lima-callao/src/main/xmi/accounting.properties trunk/lima-callao/src/main/xmi/accounting.zargo trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/model/AccountTreeTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/model/EntryBookTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/transaction/TransactionView.jaxx trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java 2010-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/AccountService.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -46,9 +46,13 @@ */ void createAccount(Account masterAccount, Account account) throws LimaException; + void createSubLedger(Account masterAccount, Account account) throws LimaException; + void updateAccount(Account account) throws LimaException; void removeAccount(Account account) throws LimaException; + Account getAccountNumber(String numAccount) throws LimaException; + List<Account> getChildrenAccounts(Account masterAccount) 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-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -125,7 +125,8 @@ // test si le numero de compte existe deja AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction); - List<Account> existingAccounts = accountDAO.findAllByAccountNumber(account.getAccountNumber()); + List<Account> existingAccounts = + accountDAO.findAllByAccountNumber(account.getAccountNumber()); if (CollectionUtils.isNotEmpty(existingAccounts)) { throw new LimaBusinessException(_( "An account already exists with this number : %s", account.getAccountNumber())); @@ -150,6 +151,61 @@ } } + + @Override + public void createSubLedger(Account masterAccount, Account account) + throws LimaException { + // TODO Auto-generated method stub + // test la validite du numero de compte + if (StringUtils.isBlank(account.getAccountNumber())) { + throw new LimaBusinessException("Invalid AccountNumber : " + + account.getAccountNumber()); + } + + TopiaContext transaction = null; + try { + // basic check done, make check in database + // TODO move it into JTA + transaction = rootContext.beginTransaction(); + + // test si le numero de compte existe deja + AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction); + List<Account> existingAccounts = + accountDAO.findAllByAccountNumber(account.getAccountNumber()); + if (CollectionUtils.isNotEmpty(existingAccounts)) { + throw new LimaBusinessException(_( + "An account already exists with this number : %s", + account.getAccountNumber())); + } + + //test si le parent ne contient pas de subaccount + List<Account> existingSubAccounts = masterAccount.getSubAccounts(); + if (CollectionUtils.isNotEmpty(existingSubAccounts)){ + throw new LimaBusinessException( + "Subledger must create on a account whithout subaccount : "); + + } + + accountDAO.create(account); + + // test si le compte parent existe; + if (masterAccount != null) { + masterAccount.addSubLedgers(account); + accountDAO.update(masterAccount); + } + + // commit + transaction.commitTransaction(); + } + catch (TopiaException ex) { + doCatch(transaction, ex, log); + } + finally { + doFinally(transaction, log); + } + + } + /*public String createAccount (String accountNumber, String label,Account masterAccount,String type) { String result = ServiceHelper.RESPOND_ERROR; @@ -482,14 +538,19 @@ AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction); TopiaQuery query = accountDAO.createQuery(); - // masterAccount is not visible, but column "masterAccount" - // exist in Account table - query.add("masterAccount", masterAccount); - if (log.isDebugEnabled()) { + if (masterAccount == null){ + query.add("masterAccount", masterAccount); + query.add("generalLedger", TopiaQuery.Op.EQ, null); + } + else { + query.add("masterAccount = :value or generalLedger = :value").addParam("value", masterAccount); + } + // TODO Erreur Lazy TopiaQuery + /*if (log.isDebugEnabled()) { log.debug("getChildrenAccounts query : " + query); - } - + }*/ + accountsList.addAll(accountDAO.findAllByQuery(query)); } catch (TopiaException ex) { @@ -740,6 +801,47 @@ } } + @Override + public Account getAccountNumber(String numAccount) throws LimaException { + Account account = null; + TopiaContext transaction = null; + try { + transaction = rootContext.beginTransaction(); + + // get account from his number + AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction); + account = accountDAO.findByAccountNumber(numAccount); + } + catch (TopiaException ex) { + if (transaction != null) { + try { + transaction.rollbackTransaction(); + } catch (TopiaException e) { + if (log.isErrorEnabled()) { + log.error("Error during rollback context", ex); + } + } + } + if (log.isErrorEnabled()) { + log.error("Error during get account from his number", ex); + } + throw new LimaException("Can't get account from his number", ex); + } + finally { + if (transaction != null) { + try { + transaction.closeContext(); + } catch (TopiaException ex) { + if (log.isErrorEnabled()) { + log.error("Error during rollback context", ex); + } + throw new LimaException("Can't get account from his number", ex); + } + } + } + return account; + } + /* * Permet de modifier un compte sur son label et son compte père. * Il recherche le compte père avec le numéro de compte fourni. Appel ensuite Modified: trunk/lima-callao/src/main/xmi/accounting.properties =================================================================== --- trunk/lima-callao/src/main/xmi/accounting.properties 2010-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-callao/src/main/xmi/accounting.properties 2010-04-19 13:19:30 UTC (rev 2865) @@ -1,6 +1,7 @@ # Precise l'entete de l'ensemble des fichiers generes model.tagvalue.copyright=/*\n Copyright (C) 2009-2010 Lima Callao\n */ -#org.chorem.lima.entity.Account.attribute.subAccounts.tagvalue.lazy=false +org.chorem.lima.entity.Account.attribute.subAccounts.tagvalue.lazy=false +org.chorem.lima.entity.Account.attribute.subLedgers.tagvalue.lazy=false org.chorem.lima.entity.FinancialTransaction.attribute.entry.tagvalue.lazy=false #model.tagvalue.dbSchema=Callao model.tagvalue.String=text \ No newline at end of file Modified: trunk/lima-callao/src/main/xmi/accounting.zargo =================================================================== (Binary files differ) 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-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -336,6 +336,7 @@ AccountView accountView = new AccountView(mainView); mainView.showTab(_("lima.tab.account"), accountView); } + public void showTransactionView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); 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-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2010-04-19 13:19:30 UTC (rev 2865) @@ -27,7 +27,7 @@ </script> <row> - <cell fill="both" weightx="1" weighty="1" rows='3'> + <cell fill="both" weightx="1" weighty="1" rows='4'> <JScrollPane> <org.jdesktop.swingx.JXTreeTable id="accountsTreeTable" selectionMode="{ListSelectionModel.SINGLE_SELECTION}" treeTableModel="{new org.chorem.lima.ui.account.model.AccountTreeTableModel()}" @@ -40,6 +40,12 @@ <JButton id="addButton" text="lima.common.add" onActionPerformed="getHandler().addAccount()"/> </cell> </row> + <row> + <cell fill="horizontal"> + <JButton id="addSubLedger" text="lima.common.addSubLedger" onActionPerformed="getHandler().addSubLedger()" + enabled="{isSelectedRow()}"/> + </cell> + </row> <row> <cell fill="horizontal"> <JButton id="updateButton" text="lima.common.update" onActionPerformed="getHandler().updateAccount()" 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-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -32,6 +32,7 @@ import org.chorem.lima.ui.account.model.AccountTreeTableModel; import org.chorem.lima.ui.account.AccountForm; import org.chorem.lima.ui.account.AccountView; +import org.chorem.lima.ui.account.SubLedgerForm; import org.chorem.lima.util.ErrorHelper; import org.jdesktop.swingx.JXTreeTable; @@ -100,7 +101,44 @@ } } }; + + public void addSubLedger(){ + JXTreeTable accountsTreeTable = view.getAccountsTreeTable(); + AccountTreeTableModel accountsTreeTableModel = (AccountTreeTableModel)accountsTreeTable.getTreeTableModel(); + Account newAccount = new AccountImpl(); + SubLedgerForm subledgerForm = new SubLedgerForm(view); + subledgerForm.setAccount(newAccount); + // jaxx constructor don't call super() ? + subledgerForm.setLocationRelativeTo(view); + subledgerForm.setVisible(true); + newAccount=subledgerForm.getAccount(); + + // null == cancel action + if (newAccount != null) { + // get current selection path + TreePath treePath = null; + int selectedRow = view.getAccountsTreeTable().getSelectedRow(); + treePath = view.getAccountsTreeTable().getPathForRow(selectedRow); + // add it + try { + accountsTreeTableModel.addSubLedger(treePath, newAccount); + } catch (LimaBusinessException ex) { + if (log.isErrorEnabled()) { + log.error("Can't add subledger", ex); + } + ErrorHelper.showErrorDialog(ex.getMessage(), ex); + } + + catch (LimaException ex) { + if (log.isErrorEnabled()) { + log.error("Can't add subledger", ex); + } + ErrorHelper.showErrorDialog("Can't add subledger", ex); + } + } + } + /** * Open account form with selected account. */ Added: 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 (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2010-04-19 13:19:30 UTC (rev 2865) @@ -0,0 +1,74 @@ +<!-- ##% 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 defaultCloseOperation="dispose_on_close" modal="true"> + + <org.chorem.lima.entity.Account id="account" javaBean='null'/> + <Boolean id="addState" javaBean='true'/> + + <script> + <![CDATA[ + protected void performCancel() { + setAccount(null); + dispose(); + } + ]]> + </script> + + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="lima.subledger.code"/> + </cell> + <cell fill="horizontal"> + <JTextField id="numberTextField" editable='{isAddState()}' text="{getAccount().getAccountNumber()}"/> + <javax.swing.text.Document javaBean="getNumberTextField().getDocument()" + onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' + onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.account.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> + <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())' /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.account.type"/> + </cell> + <cell fill="horizontal"> + <JComboBox id="typeComboBox" model='{new org.chorem.lima.ui.account.model.AccountTypeListModel()}' + selectedItem="{getAccount().getType()}" + onActionPerformed="getAccount().setType((String)getTypeComboBox().getSelectedItem())"/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + </row> + </Table> +</JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/model/AccountTreeTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/model/AccountTreeTableModel.java 2010-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/model/AccountTreeTableModel.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -97,7 +97,8 @@ else { Account parentAccount = (Account) node; try { - List<Account> subaccounts = accountService.getChildrenAccounts(parentAccount); + List<Account> subaccounts = + accountService.getChildrenAccounts(parentAccount); result = subaccounts.size(); } catch (LimaException e) { //FIXME @@ -113,7 +114,8 @@ Object result = null; if (parent == getRoot()) { try { - List<Account> allAccounts = accountService.getChildrenAccounts(null); + List<Account> allAccounts = + accountService.getChildrenAccounts(null); result = allAccounts.get(index); } catch (LimaException e) { //FIXME @@ -125,7 +127,8 @@ // FIXME sub account is a collection ? try { - List<Account> subaccounts = accountService.getChildrenAccounts(parentAccount); + List<Account> subaccounts = + accountService.getChildrenAccounts(parentAccount); result = subaccounts.get(index); } catch (LimaException e) { //FIXME @@ -143,7 +146,8 @@ if (parent == getRoot()) { try { - List<Account> allAccounts = accountService.getChildrenAccounts(null); + List<Account> allAccounts = + accountService.getChildrenAccounts(null); result = allAccounts.indexOf(child); } catch (LimaException e) { //FIXME @@ -153,7 +157,8 @@ else { // FIXME sub account is a collection ? try { - List<Account> subaccounts = accountService.getChildrenAccounts(parentAccount); + List<Account> subaccounts = + accountService.getChildrenAccounts(parentAccount); result = subaccounts.indexOf(childAccount); } catch (LimaException e) { //FIXME @@ -210,6 +215,24 @@ } /** + * Add account (path can be null). + * + * @param path + * @param account + * @throws LimaException + */ + public void addSubLedger(TreePath path, Account account) throws LimaException { + // Calling account service + Account parentAccount = (Account)path.getLastPathComponent(); + if (parentAccount == getRoot()) { + parentAccount = null; + } + accountService.createSubLedger(parentAccount, account); + int index = getIndexOfChild(path.getLastPathComponent(), account); + modelSupport.fireChildAdded(path, index, account); + } + + /** * Update account. * * @param path @@ -232,7 +255,8 @@ */ public void removeAccount(TreePath path, Account account) throws LimaException { // Calling account service - int index = getIndexOfChild(path.getParentPath().getLastPathComponent(), account); + int index = getIndexOfChild( + path.getParentPath().getLastPathComponent(), account); accountService.removeAccount(account); modelSupport.fireChildRemoved(path.getParentPath(), index, account); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/model/EntryBookTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/model/EntryBookTableModel.java 2010-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/model/EntryBookTableModel.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -89,13 +89,13 @@ String res = "n/a"; switch (column) { case 0: - res = _("lima.entrybook.label"); + res = _("lima.entrybook.code"); break; case 1: - res = _("lima.entrybook.description"); + res = _("lima.entrybook.label"); break; case 2: - res = _("lima.entrybook.prefix"); + res = _("lima.entrybook.type"); break; } return res; Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/subledger/model/SubLedgerTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/subledger/model/SubLedgerTableModel.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/subledger/model/SubLedgerTableModel.java 2010-04-19 13:19:30 UTC (rev 2865) @@ -0,0 +1,196 @@ +package org.chorem.lima.ui.subledger.model; + +import static org.nuiton.i18n.I18n._; + +import javax.swing.table.AbstractTableModel; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.AccountService; +import org.chorem.lima.business.EntryBookService; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.entity.Account; +import org.chorem.lima.service.LimaServiceFactory; + +/** + * Entry book table model. + * + * @author ore + * @author chatellier + * @version $Revision: 2864 $ + * + * Last update : $Date: 2010-04-16 12:26:55 +0200 (ven. 16 avril 2010) $ + * By : $Author: jpepin $ + */ +public class SubLedgerTableModel extends AbstractTableModel { + + /** serialVersionUID. */ + private static final long serialVersionUID = 7578692417919755647L; + + /** log. */ + private static final Log log = LogFactory.getLog(SubLedgerTableModel.class); + + /** Services. */ + protected AccountService subledgerService; + + /** + * Constructor. + */ + public SubLedgerTableModel() { + subledgerService = LimaServiceFactory.getInstance().getAccountService(); + } + + /* + * @return + * + public List<JournalDTO> getData() { + return data; + }*/ + + @Override + public int getRowCount() { + int result = 0; + + try { + result = subledgerService.getAllAccounts().size(); + } catch (LimaException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return result; + } + + @Override + public int getColumnCount() { + return 3; + } + + @Override + public String getColumnName(int column) { + String res = "n/a"; + switch (column) { + case 0: + res = _("lima.subledger.accountnumber"); + break; + case 1: + res = _("lima.subledger.label"); + break; + case 2: + res = _("lima.subledger.type"); + break; + } + return res; + } + + public Account getSubLedgerAtRow(int row) throws LimaException { + Account subledger = null; + subledger = subledgerService.getAllAccounts().get(row); + return subledger; + } + + /* + * @param row + * @return + * + @Override + public Object getRow(int row) { + return data.get(row); + }*/ + + @Override + public Object getValueAt(int row, int column) { + + Object result = null; + try { + Account subledger = getSubLedgerAtRow(row); + + switch (column) { + case 0: + result = subledger.getAccountNumber(); + break; + case 1: + result = subledger.getLabel(); + break; + case 2: + result = subledger.getType(); + break; + } + } catch (LimaException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return result; + } + + + + @Override + public void setValueAt(Object value, int row, int column) { + + try { + Account subledger = getSubLedgerAtRow(row); + + switch (column) { + case 0: + subledger.setAccountNumber((String)value); + break; + case 1: + subledger.setLabel((String)value); + break; + case 2: + subledger.setType((String)value); + break; + } + + // update on remote service + subledgerService.updateAccount(subledger); + } catch (LimaException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + // TODO why false ? + return false; + } + + /** + * @param subledger + * @throws LimaException + */ + public void addSubLedger(Account subledger, String numMasterAccount) throws LimaException { + /* Calling journal service */ + Account masterAccount = subledgerService.getAccountNumber(numMasterAccount); + subledgerService.createAccount(masterAccount, subledger); + int row = subledgerService.getAllAccounts().indexOf(subledger); + fireTableRowsInserted(row, row); + } + + /** + * + * @param subledger + * @throws LimaException + */ + public void updateSubLedger(Account subledger) throws LimaException { + /* Calling journal service */ + subledgerService.updateAccount(subledger); + int row = subledgerService.getAllAccounts().indexOf(subledger); + fireTableRowsUpdated(row, row); + } + + /** + * + * @param subledger + * @throws LimaException + */ + public void removeSubLedger(Account subledger) throws LimaException { + /* Calling journal service */ + int row = subledgerService.getAllAccounts().indexOf(subledger); + subledgerService.removeAccount(subledger); + fireTableRowsDeleted(row, row); + } +} Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/transaction/TransactionView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/transaction/TransactionView.jaxx 2010-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/transaction/TransactionView.jaxx 2010-04-19 13:19:30 UTC (rev 2865) @@ -16,7 +16,7 @@ ##% --> <Table> - <TransactionViewHandler id="handler" javaBean="new TransactionViewHandler(this)" /> + <FinancialTransactionViewHandler id="handler" javaBean="new FinancialTransactionViewHandler(this)" /> <Boolean id="selectedRow" javaBean="false" /> <script> @@ -62,15 +62,15 @@ <row> <cell fill="both" weightx="1" weighty="1" rows="3" columns="4"> <JScrollPane> - <org.chorem.lima.ui.transaction.table.TransactionTableModel - id="transactionTableModel" /> - <org.chorem.lima.ui.transaction.table.TransactionTable - id="transactionTable" sortable="false" rowHeight="22" - constructorParams="getHandler()" model="{getTransactionTableModel()}" + <org.chorem.lima.ui.transaction.table.FinancialTransactionTableModel + id="financialTransactionTableModel" /> + <org.chorem.lima.ui.transaction.table.FinancialTransactionTable + id="financialTransactionTable" sortable="false" rowHeight="22" + constructorParams="getHandler()" model="{getFinancialTransactionTableModel()}" selectionMode="{ListSelectionModel.SINGLE_SELECTION}" highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createAlternateStriping(Color.WHITE,new Color(250,250,250))}" /> - <javax.swing.ListSelectionModel javaBean="getTransactionTable().getSelectionModel()" - onValueChanged="setSelectedRow(transactionTable.getSelectedRow() != -1)"/> + <javax.swing.ListSelectionModel javaBean="getFinancialTransactionTable().getSelectionModel()" + onValueChanged="setSelectedRow(financialTransactionTable.getSelectedRow() != -1)"/> </JScrollPane> </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-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing-en_GB.properties 2010-04-19 13:19:30 UTC (rev 2865) @@ -7,8 +7,8 @@ Loading\ accounting...= lima.about.message= lima.account=Account -lima.account.label= -lima.account.number= +lima.account.label=Label +lima.account.number=Number lima.account.type=Account type lima.accountplan=Plan de comptes lima.actif=Asset @@ -47,9 +47,11 @@ lima.chartofaccounts= lima.chartofaccounts.journal= lima.chartofaccounts.management= +lima.chartofaccounts.subledgers= lima.closure.period.begin=Period from lima.closure.timespan.warning=Warning\: when the period is blocked, it is possible to add, edit and delete entries on the accounting period. lima.common.add= +lima.common.addSubLedger= lima.common.all= lima.common.cancel= lima.common.ok= @@ -257,6 +259,8 @@ lima.status.tr.balanced=Balanced lima.status.tr.finalized=Finalized lima.status.tr.wip=Work in progress +lima.subledger.accountnumber= +lima.subledger.code=Code lima.success=Success lima.tab.account=Account lima.tab.balance=Balance @@ -269,6 +273,7 @@ lima.tab.reports=Reports lima.tab.result=Result lima.tab.search.result=Search result +lima.tab.subledgers= lima.tab.transaction=Transaction lima.title=Lutin Invoice Monitoring and Accounting lima.title.about=About Lima... 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-04-16 10:26:55 UTC (rev 2864) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing-fr_FR.properties 2010-04-19 13:19:30 UTC (rev 2865) @@ -10,6 +10,7 @@ lima.account.label=Libell\u00E9 lima.account.menu=Plan de comptes lima.account.number=Num\u00E9ro du compte +lima.account.parentnumber= lima.account.type=Type de compte lima.actif=Actif lima.action.commandline.disable.main.ui=Ne pas lancer l'ui @@ -42,12 +43,14 @@ lima.bilan.total=Total lima.block=Bloquer lima.charge=Charge -lima.chartofaccounts=Plan des comptes -lima.chartofaccounts.journal=Journal -lima.chartofaccounts.management=Gestion du plan +lima.chartofaccounts=Structure +lima.chartofaccounts.journal=Journaux +lima.chartofaccounts.management=Plan comptable +lima.chartofaccounts.subledgers=Plan tiers lima.closure.period.begin=P\u00E9riode de lima.closure.timespan.warning=Attention \: lorsque la p\u00E9riode est bloqu\u00E9e, il n'est plus possible d'ajouter, modifier et supprimer les entr\u00E9es comptables sur cette p\u00E9riode. -lima.common.add=Ajout +lima.common.add=Ajout Compte G\u00E9n\u00E9ral +lima.common.addSubLedger=Ajouter Compte Tiers lima.common.cancel=Annuler lima.common.ok=OK lima.common.print= @@ -248,8 +251,9 @@ lima.status.tr.balanced=Equilibr\u00E9e lima.status.tr.finalized=Valid\u00E9e lima.status.tr.wip=En cours +lima.subledger.code=Code lima.success=Succ\u00E8s -lima.tab.account=Compte +lima.tab.account=Plan Comptable lima.tab.balance=Balance lima.tab.bilan=Bilan lima.tab.home=Accueil @@ -259,6 +263,7 @@ lima.tab.reports=Rapports lima.tab.result=Compte de r\u00E9sultat lima.tab.search.result=Recherche +lima.tab.subledgers=Plan Tiers lima.tab.transaction=Ecriture lima.title=Lutin Invoice Monitoring and Accounting lima.title.about=A propos de Lima...