r2921 - in trunk: lima-business/src/main/java/org/chorem/lima/business lima-business/src/main/java/org/chorem/lima/business/accountingrules lima-business/src/main/java/org/chorem/lima/business/ejb lima-callao lima-callao/src/main lima-callao/src/main/java lima-callao/src/main/java/org lima-callao/src/main/java/org/chorem lima-callao/src/main/java/org/chorem/lima lima-callao/src/main/java/org/chorem/lima/entity lima-callao/src/main/xmi lima-swing/src/main/java/org/chorem/lima/ui/accountsreport
Author: jpepin Date: 2010-06-01 12:37:35 +0200 (Tue, 01 Jun 2010) New Revision: 2921 Url: http://chorem.org/repositories/revision/lima/2921 Log: Ajout m?\195?\169thode dans le DAO de ClosedPeriodicEntryBook Added: trunk/lima-callao/src/main/java/ trunk/lima-callao/src/main/java/org/ trunk/lima-callao/src/main/java/org/chorem/ trunk/lima-callao/src/main/java/org/chorem/lima/ trunk/lima-callao/src/main/java/org/chorem/lima/entity/ trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java Removed: trunk/lima-swing/src/main/java/org/chorem/lima/ui/transaction/table/ Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/FinancialPeriodService.java trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java trunk/lima-callao/pom.xml trunk/lima-callao/src/main/xmi/accounting.zargo trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 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-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/FinancialPeriodService.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -53,13 +53,12 @@ FinancialPeriod getFinancialPeriodWithDate(Date date) throws LimaException; /** Methodes for closedperiodicentrybook */ + + ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook, FinancialPeriod financialPeriod) throws LimaException; List<ClosedPeriodicEntryBook> getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod() throws LimaException; List<ClosedPeriodicEntryBook> getAllClosedPeriodicEntryBooks() throws LimaException; - ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook, - FinancialPeriod financialPeriod) throws LimaException; - void blockClosedPeriodicEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException; } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2010-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -26,12 +26,12 @@ 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.LimaBusinessException; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ejb.AccountServiceImpl; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.ClosedPeriodicEntryBook; +import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.EntryBookDAO; @@ -53,9 +53,6 @@ protected static final Log log = LogFactory.getLog(DefaultAccountingRules.class); - - //TODO make methode getClosedPeriodicEntryBook from financialperiodservice to DAO - FinancialPeriodService financialPeriodService; /** * Rules to check before create accounts @@ -119,16 +116,21 @@ FinancialPeriod financialPeriod = entry.getFinancialTransaction().getFinancialPeriod(); + ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = + LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(topiaTransaction); + //second case ClosedPeriodicEntryBook closedPeriodicEntryBook = - financialPeriodService.getClosedPeriodicEntryBook(entryOld.getEntryBook(), financialPeriod); + closedPeriodicEntryBookDAO.findbyEntryBookAndFinancialPeriod( + entryOld.getEntryBook(), financialPeriod); if (closedPeriodicEntryBook.getLocked()){ throw new LimaBusinessException("2 - Can't update entry : financialperiod of this entrybook is closed"); } //third case ClosedPeriodicEntryBook closedPeriodicEntryBook2 = - financialPeriodService.getClosedPeriodicEntryBook(entry.getEntryBook(), financialPeriod); + closedPeriodicEntryBookDAO.findbyEntryBookAndFinancialPeriod( + entry.getEntryBook(), financialPeriod); // Check 2 & 3 cases if (closedPeriodicEntryBook2.getLocked()){ @@ -136,7 +138,7 @@ } } - catch (LimaException eee) { + catch (TopiaException eee) { doCatch(topiaTransaction, eee, log); } } @@ -206,11 +208,19 @@ List<EntryBook> entryBooks = new ArrayList<EntryBook>(); List<EntryBook> closedEntryBooks = new ArrayList<EntryBook>(); try { - EntryBookDAO entryBookDAO = LimaCallaoDAOHelper.getEntryBookDAO(topiaContext); - FinancialPeriod financialPeriod = financialTransaction.getFinancialPeriod(); + EntryBookDAO entryBookDAO = + LimaCallaoDAOHelper.getEntryBookDAO(topiaContext); + ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = + LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(topiaContext); + FinancialPeriod financialPeriod = + financialTransaction.getFinancialPeriod(); entryBooks = entryBookDAO.findAll(); + for (EntryBook entryBook : entryBooks) { - if(financialPeriodService.getClosedPeriodicEntryBook(entryBook, financialPeriod).getLocked()){ + ClosedPeriodicEntryBook closedPeriodicEntryBook = + closedPeriodicEntryBookDAO.findbyEntryBookAndFinancialPeriod( + entryBook, financialPeriod); + if(closedPeriodicEntryBook.getLocked()){ closedEntryBooks.add(entryBook); } } @@ -223,28 +233,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 { - if (transaction != null) { - try { - transaction.rollbackTransaction(); - } catch (TopiaException eee) { - if (log.isErrorEnabled()) { - log.error("Error during rollback context", eee); - } - } - } - if (log.isErrorEnabled()) { - log.error("Exception during query", cause); - } - throw new LimaException("Exception during query", cause); - } - @Override public void blockClosedPeriodicEntryBookRules(ClosedPeriodicEntryBook closedPeriodicEntryBook, TopiaContext topiaContext) throws LimaException { @@ -276,11 +264,15 @@ try { //check if date are on fiscal period - FiscalPeriodDAO fiscalPeriodDAO = LimaCallaoDAOHelper.getFiscalPeriodDAO(topiaContext); - FiscalPeriod fiscalPeriod = fiscalPeriodDAO.findContainsFinancialPeriod(financialTransaction.getFinancialPeriod()); + FiscalPeriodDAO fiscalPeriodDAO = + LimaCallaoDAOHelper.getFiscalPeriodDAO(topiaContext); + FiscalPeriod fiscalPeriod = + fiscalPeriodDAO.findContainsFinancialPeriod( + financialTransaction.getFinancialPeriod()); Date beginDateFiscalPeriod = fiscalPeriod.getBeginDate(); Date endDateFiscalPeriod = fiscalPeriod.getEndDate(); - Date financialTransactionDate = financialTransaction.getTransactionDate(); + Date financialTransactionDate = + financialTransaction.getTransactionDate(); if (financialTransactionDate.before(beginDateFiscalPeriod)){ throw new LimaBusinessException("The date is before the fiscal period"); } @@ -293,15 +285,29 @@ List<EntryBook> entryBooks = new ArrayList<EntryBook>(); List<EntryBook> closedEntryBooks = new ArrayList<EntryBook>(); List<EntryBook> oldClosedEntryBooks = new ArrayList<EntryBook>(); - EntryBookDAO entryBookDAO = LimaCallaoDAOHelper.getEntryBookDAO(topiaContext); - FinancialPeriod financialPeriod = financialTransaction.getFinancialPeriod(); - FinancialPeriod oldFinancialPeriod = financialTransactionOld.getFinancialPeriod(); + + EntryBookDAO entryBookDAO = + LimaCallaoDAOHelper.getEntryBookDAO(topiaContext); + ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = + LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(topiaContext); + + FinancialPeriod financialPeriod = + financialTransaction.getFinancialPeriod(); + FinancialPeriod oldFinancialPeriod = + financialTransactionOld.getFinancialPeriod(); entryBooks = entryBookDAO.findAll(); + for (EntryBook entryBook : entryBooks) { - if(financialPeriodService.getClosedPeriodicEntryBook(entryBook, financialPeriod).getLocked()){ + ClosedPeriodicEntryBook closedPeriodicEntryBook = + closedPeriodicEntryBookDAO.findbyEntryBookAndFinancialPeriod( + entryBook, financialPeriod); + ClosedPeriodicEntryBook oldClosedPeriodicEntryBook = + closedPeriodicEntryBookDAO.findbyEntryBookAndFinancialPeriod( + entryBook, oldFinancialPeriod); + if(closedPeriodicEntryBook.getLocked()){ closedEntryBooks.add(entryBook); } - if(financialPeriodService.getClosedPeriodicEntryBook(entryBook, oldFinancialPeriod).getLocked()){ + if(oldClosedPeriodicEntryBook.getLocked()){ oldClosedEntryBooks.add(entryBook); } } @@ -320,4 +326,28 @@ } } + + + /** + * 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 { + if (transaction != null) { + try { + transaction.rollbackTransaction(); + } catch (TopiaException eee) { + if (log.isErrorEnabled()) { + log.error("Error during rollback context", eee); + } + } + } + if (log.isErrorEnabled()) { + log.error("Exception during query", cause); + } + throw new LimaException("Exception during query", cause); + } + } 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-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -87,7 +87,8 @@ TopiaContext topiaTransaction = null; try { topiaTransaction = beginTransaction(); - createFinancialPeriodsWithTransaction(financialPeriods, topiaTransaction); + createFinancialPeriodsWithTransaction( + financialPeriods, topiaTransaction); } catch (TopiaException ex) { @@ -226,26 +227,27 @@ } @Override - public ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook, FinancialPeriod financialPeriod) throws LimaException { - ClosedPeriodicEntryBook closedPeriodicEntryBook = - new ClosedPeriodicEntryBookImpl(); + public void blockClosedPeriodicEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException { TopiaContext topiaContext = null; try { topiaContext = beginTransaction(); + //check rules before create the account + accountingRules.blockClosedPeriodicEntryBookRules( + closedPeriodicEntryBook, topiaContext); + ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(topiaContext); - TopiaQuery query = closedPeriodicEntryBookDAO.createQuery(); - if (entryBook != null){ - query.add(ClosedPeriodicEntryBook.ENTRY_BOOK, entryBook); - } - if (financialPeriod != null){ - query.add(ClosedPeriodicEntryBook.FINANCIAL_PERIOD, financialPeriod); - } - closedPeriodicEntryBook=closedPeriodicEntryBookDAO.findByQuery(query); + ClosedPeriodicEntryBook closedPeriodicEntryBook2 = + closedPeriodicEntryBookDAO.findByTopiaId( + closedPeriodicEntryBook.getTopiaId()); + closedPeriodicEntryBook2.setLocked(true); + closedPeriodicEntryBookDAO.update(closedPeriodicEntryBook2); + + commitTransaction(topiaContext); } catch (TopiaException ex) { doCatch(topiaContext, ex, log); @@ -253,30 +255,23 @@ finally { doFinally(topiaContext, log); } - - return closedPeriodicEntryBook; + } @Override - public void blockClosedPeriodicEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException { + public ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook, FinancialPeriod financialPeriod) throws LimaException { + ClosedPeriodicEntryBook closedPeriodicEntryBook = null; + TopiaContext topiaContext = null; try { topiaContext = beginTransaction(); - //check rules before create the account - accountingRules.blockClosedPeriodicEntryBookRules(closedPeriodicEntryBook, topiaContext); - ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(topiaContext); - ClosedPeriodicEntryBook closedPeriodicEntryBook2 = - closedPeriodicEntryBookDAO.findByTopiaId(closedPeriodicEntryBook.getTopiaId()); + closedPeriodicEntryBook = closedPeriodicEntryBookDAO.findbyEntryBookAndFinancialPeriod(entryBook, financialPeriod); - closedPeriodicEntryBook2.setLocked(true); - closedPeriodicEntryBookDAO.update(closedPeriodicEntryBook2); - - commitTransaction(topiaContext); } catch (TopiaException ex) { doCatch(topiaContext, ex, log); @@ -284,9 +279,10 @@ finally { doFinally(topiaContext, log); } - + + return closedPeriodicEntryBook; } - + @Override public List<ClosedPeriodicEntryBook> getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod() throws LimaException { 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-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -100,7 +100,7 @@ * - for subaccount * - for a foldaccounts, contains many accounts */ - public ReportsDatas generateAccountReportsWithTransaction (Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException{ + protected ReportsDatas generateAccountReportsWithTransaction (Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException{ ReportsDatas reportsDatas = new ReportsDatasImpl(); double credit = 0, debit = 0, solde = 0; List<Object[]> results = new ArrayList<Object[]>(); @@ -158,7 +158,7 @@ * Get list entries * Calculate all credit, debit and solde amounts for the accounts reports */ - public ReportsDatas generateSubAccountReportsWithTransaction(Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException { + protected ReportsDatas generateSubAccountReportsWithTransaction(Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException { ReportsDatas reportsDatas = new ReportsDatasImpl(); double credit = 0, debit = 0, solde = 0; List<Object[]> results = new ArrayList<Object[]>(); @@ -215,7 +215,7 @@ /** * Calculate all credit, debit and solde amounts for the balance */ - public ReportsDatas generateSubAccountBalanceWithTransaction(Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException { + protected ReportsDatas generateSubAccountBalanceWithTransaction(Account account, Date beginDate, Date endDate, TopiaContext topiaContext) throws LimaException { ReportsDatas reportsDatas = new ReportsDatasImpl(); double credit = 0, debit = 0, solde = 0; List<Object[]> results = new ArrayList<Object[]>(); Modified: trunk/lima-callao/pom.xml =================================================================== --- trunk/lima-callao/pom.xml 2010-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-callao/pom.xml 2010-06-01 10:37:35 UTC (rev 2921) @@ -65,7 +65,7 @@ <phase>generate-sources</phase> <configuration> <inputs>zargo</inputs> - <templates>org.nuiton.topia.generator.TopiaMetaTransformer, org.nuiton.topia.generator.BeanTransformer</templates> + <templates>org.nuiton.topia.generator.TopiaMetaTransformer, org.nuiton.eugene.java.JavaBeanTransformer</templates> <defaultPackage>org.chorem.lima.entity</defaultPackage> <fullPackagePath>org.chorem.lima</fullPackagePath> </configuration> Added: trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java (rev 0) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -0,0 +1,28 @@ +package org.chorem.lima.entity; + +import org.chorem.lima.entity.ClosedPeriodicEntryBook; +import org.chorem.lima.entity.ClosedPeriodicEntryBookDAOAbstract; +import org.chorem.lima.entity.EntryBook; +import org.chorem.lima.entity.FinancialPeriod; +import org.nuiton.topia.TopiaException; +import org.nuiton.topia.framework.TopiaQuery; + +public class ClosedPeriodicEntryBookDAOImpl <E extends ClosedPeriodicEntryBook> extends ClosedPeriodicEntryBookDAOAbstract<E>{ + + @Override + public ClosedPeriodicEntryBook findbyEntryBookAndFinancialPeriod( + EntryBook entryBook, FinancialPeriod financialPeriod) + throws TopiaException { + + TopiaQuery query = createQuery(); + if (entryBook != null){ + query.add(ClosedPeriodicEntryBook.ENTRY_BOOK, entryBook); + } + if (financialPeriod != null){ + query.add(ClosedPeriodicEntryBook.FINANCIAL_PERIOD, financialPeriod); + } + return findByQuery(query); + + } + +} Modified: trunk/lima-callao/src/main/xmi/accounting.zargo =================================================================== (Binary files differ) 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-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -61,9 +61,9 @@ if (cacheDataList != null){ // set amounts credit and debit and solde - view.amountCreditLabel.setText(String.valueOf(cacheDataList.amountCredit)); - view.amountDebitLabel.setText(String.valueOf(cacheDataList.amountDebit)); - Double amountSolde = cacheDataList.amountSolde; + view.amountCreditLabel.setText(String.valueOf(cacheDataList.getAmountCredit())); + view.amountDebitLabel.setText(String.valueOf(cacheDataList.getAmountDebit())); + Double amountSolde = cacheDataList.getAmountSolde(); view.amountSoldeLabel.setText(String.valueOf(amountSolde)); @@ -72,7 +72,7 @@ } else { // set label solde: credit or debit - if (cacheDataList.soldeDebit) { + if (cacheDataList.getSoldeDebit()) { view.soldeLabel.setText(_("lima.soldedebit")); } else { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java 2010-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceTableModel.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -124,10 +124,10 @@ try { switch (column) { case 0: - result = currentRow.account.getAccountNumber(); //account number + result = currentRow.getAccount().getAccountNumber(); //account number break; case 1: - result = currentRow.account.getLabel(); //account label + result = currentRow.getAccount().getLabel(); //account label break; case 2: result = currentRow.getAmountDebit(); // total debit 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-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -71,9 +71,9 @@ if (cacheDataList != null){ // set amounts credit, debit and solde - view.amountCreditLabel.setText(String.valueOf(cacheDataList.amountCredit)); - view.amountDebitLabel.setText(String.valueOf(cacheDataList.amountDebit)); - Double amountSolde = cacheDataList.amountSolde; + view.amountCreditLabel.setText(String.valueOf(cacheDataList.getAmountCredit())); + view.amountDebitLabel.setText(String.valueOf(cacheDataList.getAmountDebit())); + Double amountSolde = cacheDataList.getAmountSolde(); view.amountSoldeLabel.setText(String.valueOf(amountSolde)); @@ -82,7 +82,7 @@ } else { // set label solde: credit or debit - if (cacheDataList.soldeDebit) { + if (cacheDataList.getSoldeDebit()) { view.soldeLabel.setText(_("lima.soldedebit")); } else { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -85,7 +85,7 @@ // just prevent too much result if (selectedEntryBook != null) { - result = cacheDataList.listEntry.size(); + result = cacheDataList.getListEntry().size(); } else { if (log.isDebugEnabled()) { @@ -131,7 +131,7 @@ public Object getValueAt(int row, int column) { Object result = null; if(selectedEntryBook != null) { - Entry currentRow = cacheDataList.listEntry.get(row); + Entry currentRow = cacheDataList.getListEntry().get(row); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); 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-06-01 08:59:19 UTC (rev 2920) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2010-06-01 10:37:35 UTC (rev 2921) @@ -62,9 +62,9 @@ if (cacheDataList != null){ // set amounts credit, debit and solde - view.amountCreditLabel.setText(String.valueOf(cacheDataList.amountCredit)); - view.amountDebitLabel.setText(String.valueOf(cacheDataList.amountDebit)); - Double amountSolde = cacheDataList.amountSolde; + view.amountCreditLabel.setText(String.valueOf(cacheDataList.getAmountCredit())); + view.amountDebitLabel.setText(String.valueOf(cacheDataList.getAmountDebit())); + Double amountSolde = cacheDataList.getAmountSolde(); view.amountSoldeLabel.setText(String.valueOf(amountSolde)); @@ -73,7 +73,7 @@ } else { // set label solde: credit or debit - if (cacheDataList.soldeDebit) { + if (cacheDataList.getSoldeDebit()) { view.soldeLabel.setText(_("lima.soldedebit")); } else {
participants (1)
-
jpepin@users.chorem.org