r3019 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui/accountsreports lima-swing/src/main/java/org/chorem/lima/ui/balance lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction lima-swing/src/main/java/org/chorem/lima/ui/ledger lima-swing/src/main/resources/i18n src/site/resources src/site/
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
participants (1)
-
jpepin@users.chorem.org