Lima-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
June 2011
- 3 participants
- 38 discussions
r3161 - in trunk/lima-swing/src/main/java/org/chorem/lima/ui: . vatreports
by vsalaun@users.chorem.org 07 Jun '11
by vsalaun@users.chorem.org 07 Jun '11
07 Jun '11
Author: vsalaun
Date: 2011-06-07 18:31:55 +0200 (Tue, 07 Jun 2011)
New Revision: 3161
Url: http://chorem.org/repositories/revision/lima/3161
Log:
#347 adding table, tableModeln, view
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatViewHandler.java
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTable.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTable.java 2011-06-07 16:31:55 UTC (rev 3161)
@@ -0,0 +1,54 @@
+package org.chorem.lima.ui.vatreports;
+
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
+import org.chorem.lima.ui.celleditor.BigDecimalTableCellEditor;
+import org.chorem.lima.ui.celleditor.BigDecimalTableCellRenderer;
+import org.chorem.lima.ui.celleditor.DateTableCellEditor;
+import org.chorem.lima.ui.celleditor.EmptyCellRenderer;
+import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
+import org.jdesktop.swingx.JXTable;
+
+public class VatTable extends JXTable {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 4042515416850867834L;
+
+ /** log. */
+ private static final Log log = LogFactory.getLog(VatTable.class);
+
+ protected VatViewHandler handler;
+
+ public VatTable(VatViewHandler handler) {
+
+ this.handler = handler;
+
+ //Get new date editor
+ setDefaultEditor(Date.class, new DateTableCellEditor());
+ //Get new entry book editor
+ setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor());
+ //Get new account editor
+ setDefaultEditor(Account.class, new AccountTableCellEditor());
+ //Get new amount editor
+ setDefaultEditor(BigDecimal.class, new BigDecimalTableCellEditor());
+ //Get new BigDecimal renderer
+ setDefaultRenderer(BigDecimal.class, new BigDecimalTableCellRenderer());
+ //get new String renderer for empty cells
+ setDefaultRenderer(String.class, new EmptyCellRenderer());
+ //get new Account renderer for empty cells
+ setDefaultRenderer(Account.class, new EmptyCellRenderer());
+ //get new EntryBook renderer for empty cells
+ setDefaultRenderer(EntryBook.class, new EmptyCellRenderer());
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTableModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatTableModel.java 2011-06-07 16:31:55 UTC (rev 3161)
@@ -0,0 +1,135 @@
+package org.chorem.lima.ui.vatreports;
+
+import static org.nuiton.i18n.I18n._;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.swing.table.AbstractTableModel;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
+
+public class VatTableModel extends AbstractTableModel implements ServiceListener {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -6301817853711018389L;
+
+ /** log. */
+ private static final Log log = LogFactory
+ .getLog(VatTableModel.class);
+
+ /** selected financial period */
+ protected FiscalPeriod selectedFiscalPeriod;
+
+ /** data cache */
+ protected List<Object> cacheDataList;
+
+
+ public VatTableModel() {
+ //
+ }
+
+ protected List<Object> getDataList() {
+ List<Object> results = new ArrayList<Object>();
+ return results;
+ }
+
+ public void refresh(){
+ cacheDataList = getDataList();
+ fireTableDataChanged();
+ }
+
+ @Override
+ public Class<?> getColumnClass(int column) {
+
+ Class<?> result = null;
+
+ switch (column) {
+ case 0:
+ result = Date.class;
+ break;
+ default:
+ result = BigDecimal.class;
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getColumnName(int column) {
+ String result = "n/a";
+
+ switch (column) {
+ case 0:
+ result = _("lima.table.date"); //date
+ break;
+ case 1:
+ result = _("lima.table.collectedvat"); //tva collectee
+ break;
+ case 2:
+ result = _("lima.table.deductiblevat"); //tva deductible
+ break;
+ case 3:
+ result = _("lima.table.vatdue"); //tva due
+ break;
+ case 4:
+ result = _("lima.table.vatcredit"); //credit de tva
+ break;
+ case 5:
+ result = _("lima.table.repayments"); //remboursemments
+ break;
+ case 6:
+ result = _("lima.table.remainingcredit"); //credit restant
+ break;
+ case 7:
+ result = _("lima.table.vatpayable"); //tva a payer
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public int getRowCount() {
+ int result = 0;
+
+ if (cacheDataList != null) {
+ result = cacheDataList.size();
+ }
+
+ return result;
+ }
+
+ @Override
+ public int getColumnCount() {
+ return 8;
+ }
+
+ @Override
+ public Object getValueAt(int rowIndex, int columnIndex) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setFiscalPeriod(FiscalPeriod fiscalPeriod){
+ selectedFiscalPeriod = fiscalPeriod;
+ refresh();
+ }
+
+ @Override
+ public void notifyMethod(String serviceName, String methodeName) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatView.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatView.jaxx 2011-06-07 16:31:55 UTC (rev 3161)
@@ -0,0 +1,50 @@
+<Table>
+ <VatViewHandler id="handler" javaBean="new VatViewHandler(this)" />
+ <Boolean id="selectedRow" javaBean="false" />
+
+ <script>
+ <![CDATA[
+ import org.chorem.lima.entity.FiscalPeriod;
+ import org.chorem.lima.entity.FinancialPeriod;
+ import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
+ import org.chorem.lima.ui.financialtransaction.FinancialPeriodComboBox;
+ import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer;
+ import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer;
+ import org.chorem.lima.ui.vatreports.VatTableModel;
+ import org.chorem.lima.ui.vatreports.VatTable;
+
+ void $afterCompleteSetup() {
+ getHandler().refresh();
+ }
+
+ ]]>
+ </script>
+
+ <row weightx="1" weighty="0" anchor="center">
+ <cell anchor="east">
+ <JLabel id="fiscalPeriodLabel" text="lima.charts.fiscalyear"/>
+ </cell>
+ <cell anchor="west">
+ <org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel id="modelFiscalPeriod"/>
+ <JComboBox id="fiscalPeriodComboBox"
+ model="{getModelFiscalPeriod()}"
+ renderer="{new FiscalPeriodComboBoxRenderer()}"
+ onActionPerformed="getVatTableModel().setFiscalPeriod((FiscalPeriod)fiscalPeriodComboBox.getSelectedItem())"
+ editable="false"/>
+ </cell>
+ </row>
+ <row>
+ <cell fill="both" weightx="1" weighty="1" rows="3" columns="11">
+ <JScrollPane>
+ <org.chorem.lima.ui.vatreports.VatTableModel
+ id="vatTableModel"/>
+ <org.chorem.lima.ui.vatreports.VatTable
+ id="vatTable" sortable="false" rowHeight="22"
+ constructorParams="getHandler()" model="{getVatTableModel()}"
+ selectionMode="{ListSelectionModel.SINGLE_SELECTION}" />
+ <javax.swing.ListSelectionModel javaBean="getVatTable().getSelectionModel()"
+ onValueChanged="setSelectedRow(vatTable.getSelectedRow() != -1)"/>
+ </JScrollPane>
+ </cell>
+ </row>
+</Table>
\ No newline at end of file
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatViewHandler.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatViewHandler.java 2011-06-07 16:31:55 UTC (rev 3161)
@@ -0,0 +1,29 @@
+package org.chorem.lima.ui.vatreports;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.ui.vatreports.VatTable;
+import org.chorem.lima.ui.vatreports.VatTableModel;
+import org.chorem.lima.ui.vatreports.VatView;
+
+public class VatViewHandler {
+ /** log. */
+ private static final Log log =
+ LogFactory.getLog(VatViewHandler.class);
+
+ protected VatView view;
+
+ protected VatTable table;
+
+ protected VatTableModel tableModel;
+
+ protected VatViewHandler(VatView view) {
+ this.view = view;
+ }
+
+ public void refresh(){
+ tableModel = view.getVatTableModel();
+ tableModel.refresh();
+ }
+
+}
1
0
Author: vsalaun
Date: 2011-06-07 17:10:55 +0200 (Tue, 07 Jun 2011)
New Revision: 3160
Url: http://chorem.org/repositories/revision/lima/3160
Log:
#347 VAT text properties
Modified:
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-06-07 12:50:05 UTC (rev 3159)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-06-07 15:10:55 UTC (rev 3160)
@@ -215,9 +215,11 @@
lima.table.closure=Closed
lima.table.code=Code
lima.table.credit=Credit
+lima.table.collectedvat=Collected VAT
lima.table.date=Date
lima.table.debit=Debit
lima.table.debitcredit=Debit and credit
+lima.table.deductiblevat=Deductible VAT
lima.table.description=Description
lima.table.entrybook=EntryBook
lima.table.fiscalperiod=Fiscalperiod
@@ -230,9 +232,15 @@
lima.table.number=Account Number
lima.table.period=Period
lima.table.provisiondeprecationamount=Provision & Deprecation
+lima.table.remainingcredit=Remaining credit
+lima.table.repayments=Repayments
lima.table.solde=Solder
lima.table.solde.credit=Credit solde
lima.table.solde.debit=Debit solde
+lima.table.vatcredit=VAT credit
+lima.table.vatdue=Due VAT
+lima.table.vatpaid=VAT paid
+lima.table.vatpayable=VAT payable
lima.table.voucher=Voucher
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 2011-06-07 12:50:05 UTC (rev 3159)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-06-07 15:10:55 UTC (rev 3160)
@@ -214,10 +214,12 @@
lima.table.balance=Balance
lima.table.closure=Cloture
lima.table.code=Code
+lima.table.collectedvat=TVA collect\u00E9e
lima.table.credit=Cr\u00E9dit
lima.table.date=Date
lima.table.debit=D\u00E9bit
lima.table.debitcredit=D\u00E9bit et Cr\u00E9dit
+lima.table.deductiblevat=TVA d\u00E9ductible
lima.table.description=Description
lima.table.entrybook=Journal
lima.table.fiscalperiod=Exercice
@@ -230,9 +232,15 @@
lima.table.number=Num\u00E9ro de compte
lima.table.period=P\u00E9riode
lima.table.provisiondeprecationamount=Amortissements et provisions
+lima.table.remainingcredit=Cr\u00E9dit de TVA
+lima.table.repayments=Remboursements
lima.table.solde=Solde
lima.table.solde.credit=Solde cr\u00E9dit
lima.table.solde.debit=Solde d\u00E9bit
+lima.table.vatcredit=Cr\u00E9dit de TVA
+lima.table.vatdue=TVA due
+lima.table.vatpaid=TVA pay\u00E9e
+lima.table.vatpayable=TVA \u00e0 payer
lima.table.voucher=Pi\u00E8ce comptable
lima.title=Lutin Invoice Monitoring and Accounting
lima.title.about=\u00C0 propos de Lima...
1
0
r3159 - in trunk/lima-business/src/main: java/org/chorem/lima/business/ejb java/org/chorem/lima/business/ejbinterface resources/i18n
by vsalaun@users.chorem.org 07 Jun '11
by vsalaun@users.chorem.org 07 Jun '11
07 Jun '11
Author: vsalaun
Date: 2011-06-07 14:50:05 +0200 (Tue, 07 Jun 2011)
New Revision: 3159
Url: http://chorem.org/repositories/revision/lima/3159
Log:
#345 Adding business services
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2011-06-07 08:53:23 UTC (rev 3158)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2011-06-07 12:50:05 UTC (rev 3159)
@@ -25,34 +25,44 @@
package org.chorem.lima.business.ejb;
+import static org.nuiton.i18n.I18n._;
+
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.BalanceTrial;
import org.chorem.lima.beans.FinancialTransactionSearch;
+import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountService;
import org.chorem.lima.business.ejbinterface.EntryBookService;
-import org.chorem.lima.business.ejbinterface.FinancialStatementService;
+import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.business.ejbinterface.FinancialTransactionServiceLocal;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
import org.chorem.lima.business.ejbinterface.ReportService;
+import org.chorem.lima.business.utils.FinancialPeriodComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.EntryDAO;
+import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialPeriodDAO;
+import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.Letter;
import org.chorem.lima.entity.LetterDAO;
@@ -87,18 +97,9 @@
protected AccountingRules accountingRules;
@EJB
- protected FiscalPeriodService fiscalPeriodService;
+ protected FinancialPeriodService financialPeriodService;
@EJB
- protected AccountService accountServiceImpl;
-
- @EJB
- protected FinancialStatementService financialStatementService;
-
- @EJB
- protected FinancialTransactionService financialTransactionService;
-
- @EJB
protected ReportService reportService;
@EJB
@@ -661,19 +662,125 @@
}
}
- public void addRetainedEarnings(FiscalPeriod previousFiscalPeriod, FiscalPeriod fiscalPeriod, EntryBook entryBook) throws LimaException {
- //TODO
+ @Override
+ public void addRetainedEarnings(FiscalPeriod previousFiscalPeriod, FiscalPeriod fiscalPeriod, EntryBook entryBook, Date date) throws LimaException {
TopiaContext topiaContext = null;
try {
+
+
+ BalanceTrial results = reportService.generateBalanceTrial(previousFiscalPeriod.getBeginDate(), previousFiscalPeriod.getEndDate(), null, false, false);
+
+ List<ReportsDatas> reportsDatasList = (List<ReportsDatas>) results.getReportsDatas();
+
topiaContext = beginTransaction();
- //temporary method
+ //Sets entryBook
+ //search for the entryBook to use using param
+ boolean found = false;
+ List<EntryBook> entryBooksList = entryBookService.getAllEntryBooks();
+ for (EntryBook entry : entryBooksList) {
+ if (!found && entry.getCode().equals(entryBook.getCode()) && entry.getLabel().equals(entryBook.getLabel())) {
+ entryBook = entry;
+ found = true;
+ }
+ }
+ //if entrybook is not found
+ //then create it
+ if (!found) {
+ entryBookService.createEntryBook(entryBook);
+ entryBooksList = entryBookService.getAllEntryBooks();
+ for (EntryBook entry : entryBooksList) {
+ if (!found && entry.getCode().equals(entryBook.getCode()) && entry.getLabel().equals(entryBook.getLabel())) {
+ entryBook = entry;
+ found = true;
+ }
+ }
+ }
- // + Net Income
- // - Dividends Paid
- // + Beginning Retained Earnings
- // = Ending Retained Earnings
+ //Sets the financialTransaction
+ FinancialTransaction financialTransaction = new FinancialTransactionImpl();
+ financialTransaction.setAmountDebit(BigDecimal.ZERO);
+ financialTransaction.setAmountCredit(BigDecimal.ZERO);
+ financialTransaction.setEntryBook(entryBook);
+ FinancialPeriod financialPeriod = null;
+
+ //Sets date for description
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(previousFiscalPeriod.getEndDate());
+
+
+ found = false;
+
+ //look for the first financial period on the current fiscal year with is unlocked
+ List<ClosedPeriodicEntryBook> resultsArray =
+ new ArrayList<ClosedPeriodicEntryBook>();
+ List<ClosedPeriodicEntryBook> closedPeriodicEntryBook =
+ financialPeriodService.getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod();
+ Collections.sort(closedPeriodicEntryBook, new FinancialPeriodComparator());
+ resultsArray.addAll(closedPeriodicEntryBook);
+
+ for (ClosedPeriodicEntryBook cPeriodicEntryBook : resultsArray) {
+ if (!found && (cPeriodicEntryBook.getFinancialPeriod().getBeginDate().compareTo(date) <= 0)
+ && (cPeriodicEntryBook.getFinancialPeriod().getEndDate().compareTo(date) >= 1)) {
+ if (cPeriodicEntryBook.getFinancialPeriod().getLocked() || cPeriodicEntryBook.getLocked()) {
+ throw new LimaException("Can't set financialPeriod");
+ }
+ if (cPeriodicEntryBook.getEntryBook().getCode().equals(entryBook.getCode())
+ && cPeriodicEntryBook.getEntryBook().getLabel().equals(entryBook.getLabel())) {
+ found = true;
+ financialPeriod = cPeriodicEntryBook.getFinancialPeriod();
+ }
+ }
+ }
+ if (!found) {
+ throw new LimaException("Can't set financialPeriod");
+ }
+ financialTransaction.setFinancialPeriod(financialPeriod);
+ financialTransaction.setTransactionDate(date);
+ // create it
+ createFinancialTransactionWithTransaction(financialTransaction, topiaContext);
+ commitTransaction(topiaContext);
+
+ //Sets entries
+ Entry entry = null;
+
+
+
+ for (ReportsDatas report : reportsDatasList) {
+ //Account class from 1 to 7
+ if (Integer.valueOf(report.getAccount().getAccountNumber().substring(0, 1)) < 8) {
+ if (report.getSoldeDebit()){
+ if (!report.getAmountDebit().equals(BigDecimal.ZERO)) {
+ entry = new EntryImpl();
+ entry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")");
+ entry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher"));
+ entry.setFinancialTransaction(financialTransaction);
+ entry.setAccount(report.getAccount());
+ entry.setAmount(report.getAmountDebit().abs());
+ entry.setDebit(true);
+ topiaContext = beginTransaction();
+ createEntryWithTransaction(entry, topiaContext);
+ commitTransaction(topiaContext);
+ }
+ }
+ if (!report.getSoldeDebit()){
+ if (!report.getAmountCredit().equals(BigDecimal.ZERO)) {
+ entry = new EntryImpl();
+ entry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")");
+ entry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher"));
+ entry.setFinancialTransaction(financialTransaction);
+ entry.setAccount(report.getAccount());
+ entry.setAmount(report.getAmountCredit().abs());
+ entry.setDebit(false);
+ topiaContext = beginTransaction();
+ createEntryWithTransaction(entry, topiaContext);
+ commitTransaction(topiaContext);
+ }
+ }
+ }
+ }
+
//commit
commitTransaction(topiaContext);
}
@@ -683,7 +790,6 @@
finally {
doFinally(topiaContext, log);
}
- //WORK
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2011-06-07 08:53:23 UTC (rev 3158)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2011-06-07 12:50:05 UTC (rev 3159)
@@ -99,7 +99,7 @@
* @throws LimaException
*/
- void addRetainedEarnings(FiscalPeriod previousFiscalPeriod, FiscalPeriod fiscalPeriod, EntryBook entryBook) throws LimaException;
+ void addRetainedEarnings(FiscalPeriod previousFiscalPeriod, FiscalPeriod fiscalPeriod, EntryBook entryBook, Date date) throws LimaException;
/**
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-06-07 08:53:23 UTC (rev 3158)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-06-07 12:50:05 UTC (rev 3159)
@@ -1,64 +1,67 @@
-lima-business.account.accountalreardyexist=An account already exists with this number \: %s
-lima-business.common.failed=FAILED \: %s \n
-lima-business.document.accountnumber=Account N\u00B0
-lima-business.document.amounts=Amounts
-lima-business.document.balance=Balance
-lima-business.document.businessnumber=Business N\u00B0
-lima-business.document.carryback=Carry Back
-lima-business.document.carryforward=reporter\u00C0
-lima-business.document.classificationcode=Classification Code
-lima-business.document.createdate1=Editing Date
-lima-business.document.createdate2=to
-lima-business.document.credit=Credit
-lima-business.document.date=Date
-lima-business.document.date.begin=Begin date
-lima-business.document.date.end=End date
-lima-business.document.debit=Debit
-lima-business.document.description=Description
-lima-business.document.entrybook=EntryBook
-lima-business.document.financialstatement=FinancialStatement
-lima-business.document.generalentrybook=General EntryBook
-lima-business.document.grossamount=Gross Amount
-lima-business.document.label=Label
-lima-business.document.ledger=Ledger
-lima-business.document.movementcredit=Credit movement
-lima-business.document.movementdebit=Debit movement
-lima-business.document.netamount=Net Amount
-lima-business.document.pagenumber=Page N\u00B0
-lima-business.document.period1=Periode from
-lima-business.document.period2=to
-lima-business.document.provisiondeprecationamount=Provision Deprecation Amount
-lima-business.document.solde=Solde
-lima-business.document.soldecredit=Credit solde
-lima-business.document.soldedebit=Debit solde
-lima-business.document.vatnumber=VAT N\u00B0
-lima-business.document.voucher=Voucher
-lima-business.entrybook.entrybookalreadyexist=An EntryBook already exists with this label \: %s
-lima-business.financialstatement.check.nothing=Not found \: %s - %s \n
-lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financialstatement.\n Some account marked not found is normally.\n\n
-lima-business.import.accountadded=SUCCES \: Account %s - %s added\n
-lima-business.import.accountalreadyexist=FAILED \: Account %s already exist \n
-lima-business.import.accountnomaster=FAILED \: The account %s have master \: %s which not exist \n
-lima-business.import.closedperiodicentrybookupdated=SUCCESS \: The blockClosedPeriodicEntryBook %s - %s - %s is updated \! \n
-lima-business.import.ebpmissingaccount=FAILED \: Account %s already exist, import aborted. \nCreate all accounts before import entries.
-lima-business.import.ebpnoentry=FAILED \: This file contains no entries.
-lima-business.import.entriesoutofdatesrange=WARNING \: %s entries is out of range of opened fiscal periods. Entry was skip \!\n
-lima-business.import.entryadded=SUCCES \: Entry %s %s added\n"
-lima-business.import.entrybookalreadyexist=FAILED \: The entrybook %s already exists \!\n
-lima-business.import.entrybooknotexist=WARNING \: Entrybook %s not exist was created \!\n
-lima-business.import.financialstatementadded=SUCCESS \: The financialStatement %s is created \n
-lima-business.import.financialstatementalnomaster=FAILED \: The financialStatement %s have master \: %s which not exist \n
-lima-business.import.financialstatementalreadyexist=FAILED \: The financialstatement %s already exists \!\n
-lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
-lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
-lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
-lima-business.import.letteradded=SUCCESS \: The letter %s - %s is created \! \n
-lima-business.import.letteralreadyexist=FAILED \: The letter %s already exists \!\n
-lima-business.import.noaccount=ERROR \: This file contains no account
-lima-business.import.nofiscalperiodopen=FAILED \: No Fiscal period open \! \n
-lima-business.import.transactionadded=SUCCES \: FinancialTransaction, %s - %s, added\n
-lima.config.configFileName.description=
-lima.config.httpport=HTTP Port
-lima.config.reportsdir=Reports directories
-lima.config.rulesnationality=Rules Nationality
-lima.config.serveraddress=Server Address
+=
+lima-business.account.accountalreardyexist=An account already exists with this number \: %s
+lima-business.common.failed=FAILED \: %s \n
+lima-business.document.accountnumber=Account N\u00B0
+lima-business.document.amounts=Amounts
+lima-business.document.balance=Balance
+lima-business.document.businessnumber=Business N\u00B0
+lima-business.document.carryback=Carry Back
+lima-business.document.carryforward=reporter\u00C0
+lima-business.document.classificationcode=Classification Code
+lima-business.document.createdate1=Editing Date
+lima-business.document.createdate2=to
+lima-business.document.credit=Credit
+lima-business.document.date=Date
+lima-business.document.date.begin=Begin date
+lima-business.document.date.end=End date
+lima-business.document.debit=Debit
+lima-business.document.description=Description
+lima-business.document.entrybook=EntryBook
+lima-business.document.financialstatement=FinancialStatement
+lima-business.document.generalentrybook=General EntryBook
+lima-business.document.grossamount=Gross Amount
+lima-business.document.label=Label
+lima-business.document.ledger=Ledger
+lima-business.document.movementcredit=Credit movement
+lima-business.document.movementdebit=Debit movement
+lima-business.document.netamount=Net Amount
+lima-business.document.pagenumber=Page N\u00B0
+lima-business.document.period1=Periode from
+lima-business.document.period2=to
+lima-business.document.provisiondeprecationamount=Provision Deprecation Amount
+lima-business.document.solde=Solde
+lima-business.document.soldecredit=Credit solde
+lima-business.document.soldedebit=Debit solde
+lima-business.document.vatnumber=VAT N\u00B0
+lima-business.document.voucher=Voucher
+lima-business.entrybook.entrybookalreadyexist=An EntryBook already exists with this label \: %s
+lima-business.financialstatement.check.nothing=Not found \: %s - %s \n
+lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financialstatement.\n Some account marked not found is normally.\n\n
+lima-business.financialtransaction.retainedearnings.description=Report \u00E0 nouveau
+lima-business.financialtransaction.retainedearnings.voucher=Selon d\u00E9cision AG
+lima-business.import.accountadded=SUCCES \: Account %s - %s added\n
+lima-business.import.accountalreadyexist=FAILED \: Account %s already exist \n
+lima-business.import.accountnomaster=FAILED \: The account %s have master \: %s which not exist \n
+lima-business.import.closedperiodicentrybookupdated=SUCCESS \: The blockClosedPeriodicEntryBook %s - %s - %s is updated \! \n
+lima-business.import.ebpmissingaccount=FAILED \: Account %s already exist, import aborted. \nCreate all accounts before import entries.
+lima-business.import.ebpnoentry=FAILED \: This file contains no entries.
+lima-business.import.entriesoutofdatesrange=WARNING \: %s entries is out of range of opened fiscal periods. Entry was skip \!\n
+lima-business.import.entryadded=SUCCES \: Entry %s %s added\n"
+lima-business.import.entrybookalreadyexist=FAILED \: The entrybook %s already exists \!\n
+lima-business.import.entrybooknotexist=WARNING \: Entrybook %s not exist was created \!\n
+lima-business.import.financialstatementadded=SUCCESS \: The financialStatement %s is created \n
+lima-business.import.financialstatementalnomaster=FAILED \: The financialStatement %s have master \: %s which not exist \n
+lima-business.import.financialstatementalreadyexist=FAILED \: The financialstatement %s already exists \!\n
+lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
+lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
+lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
+lima-business.import.letteradded=SUCCESS \: The letter %s - %s is created \! \n
+lima-business.import.letteralreadyexist=FAILED \: The letter %s already exists \!\n
+lima-business.import.noaccount=ERROR \: This file contains no account
+lima-business.import.nofiscalperiodopen=FAILED \: No Fiscal period open \! \n
+lima-business.import.transactionadded=SUCCES \: FinancialTransaction, %s - %s, added\n
+lima.config.configFileName.description=
+lima.config.httpport=HTTP Port
+lima.config.reportsdir=Reports directories
+lima.config.rulesnationality=Rules Nationality
+lima.config.serveraddress=Server Address
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-06-07 08:53:23 UTC (rev 3158)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-06-07 12:50:05 UTC (rev 3159)
@@ -1,64 +1,69 @@
-lima-business.account.accountalreardyexist=Un compte existe d\u00E9j\u00E0 avec ce num\u00E9ro \: %s
-lima-business.common.failed=\u00C9chec \: %s \n
-lima-business.document.accountnumber=N\u00B0 Compte
-lima-business.document.amounts=Totaux
-lima-business.document.balance=Balance
-lima-business.document.businessnumber=N\u00B0 Siret
-lima-business.document.carryback=Report
-lima-business.document.carryforward=\u00C0 reporter
-lima-business.document.classificationcode=NAF
-lima-business.document.createdate1=Date de tirage
-lima-business.document.createdate2=\u00E0
-lima-business.document.credit=Cr\u00E9dit
-lima-business.document.date=Date
-lima-business.document.date.begin=Date de d\u00E9but \:
-lima-business.document.date.end=Date de fin \:
-lima-business.document.debit=D\u00E9bit
-lima-business.document.description=Description
-lima-business.document.entrybook=Journal
-lima-business.document.financialstatement=Bilan et compte de r\u00E9sultat
-lima-business.document.generalentrybook=Journal G\u00E9n\u00E9ral
-lima-business.document.grossamount=Brut
-lima-business.document.label=Libell\u00E9
-lima-business.document.ledger=Grand Livre
-lima-business.document.movementcredit=Mouvement Cr\u00E9diteur
-lima-business.document.movementdebit=Mouvement D\u00E9biteur
-lima-business.document.netamount=Net
-lima-business.document.pagenumber=N\u00B0 page
-lima-business.document.period1=P\u00E9riode du
-lima-business.document.period2=au
-lima-business.document.provisiondeprecationamount=Amortissements et provisions
-lima-business.document.solde=Solde
-lima-business.document.soldecredit=Solde Cr\u00E9diteur
-lima-business.document.soldedebit=Solde D\u00E9biteur
-lima-business.document.vatnumber=N\u00B0 TVA
-lima-business.document.voucher=Pi\u00E8ce comptable
-lima-business.entrybook.entrybookalreadyexist=Un journal existe d\u00E9j\u00E0 avec ce libell\u00E9 \: %s
-lima-business.financialstatement.check.nothing=Introuvable \: %s - %s \n
-lima-business.financialstatement.check.warn=Attention cette fonctionnalit\u00E9 n'est qu'une aide utilisateur.\n Certains comptes ne doivent pas \u00EAtre pr\u00E9sent au bilan et compte de r\u00E9sultat.\n Il est donc normal que des comptes sont marqu\u00E9s comme introuvable.\n\n
-lima-business.import.accountadded=Succ\u00E8s \: Compte %s - %s ajout\u00E9\n
-lima-business.import.accountalreadyexist=\u00C9chec \: Le compte %s existe d\u00E9j\u00E0 \n
-lima-business.import.accountnomaster=\u00C9chec \: Le compte %s poss\u00E8de le master \: %s inexistant \n
-lima-business.import.closedperiodicentrybookupdated=Succ\u00E8s \: La p\u00E9riode financi\u00E8re %s - %s - %s est ajout\u00E9e \! \n
-lima-business.import.ebpmissingaccount=\u00C9chec \: Compte %s inexistant. \nImportation annul\u00E9e. \nCr\u00E9er tous les comptes avant d'importer les \u00E9critures.
-lima-business.import.ebpnoentry=\u00C9chec \: Ce fichier ne contient aucune entr\u00E9e.
-lima-business.import.entriesoutofdatesrange=Attention \: Cette entr\u00E9e %s ne fait partie d'aucune p\u00E9riode ouverte. Entr\u00E9e non import\u00E9e \!\n
-lima-business.import.entryadded=Succ\u00E8s \: Entr\u00E9e %s %s ajout\u00E9e \n
-lima-business.import.entrybookalreadyexist=\u00C9chec \: Le journal %s exist d\u00E9j\u00E0 \!\n
-lima-business.import.entrybooknotexist=Attention \: Le journal %s inexistant a \u00E9t\u00E9 cr\u00E9\u00E9 \!\n
-lima-business.import.financialstatementadded=Succ\u00E8s \: Mouvement %s ajout\u00E9e \n
-lima-business.import.financialstatementalnomaster=u00C9chec \: Le mouvement %s poss\u00E8de le master \: %s inexistant \n
-lima-business.import.financialstatementalreadyexist=u00C9chec \: Le mouvement %s exist d\u00E9j\u00E0 \!\n
-lima-business.import.fiscalperiodadded=Succ\u00E8s \: Exercice %s - %s ajout\u00E9e \! \n
-lima-business.import.fiscalperiodalreadyexist=u00C9chec \: L'exerice %s - %s existe d\u00E9j\u00E0 \!\n
-lima-business.import.identityadded=Succ\u00E8s \: Identit\u00E9 %s ajout\u00E9e \! \n
-lima-business.import.letteradded=Succ\u00E8s \: ajout\u00E9e \! \n
-lima-business.import.letteralreadyexist=u00C9chec \: La lettre %s existe d\u00E9j\u00E0 \!\n
-lima-business.import.noaccount=Erreur \: Ce fichier ne contient aucun compte.
-lima-business.import.nofiscalperiodopen=u00C9chec \: Aucun exercice ouvert \! \n
-lima-business.import.transactionadded=Succ\u00E8s \: Transaction, %s, %s, ajout\u00E9e\n
-lima.config.configFileName.description=
-lima.config.httpport=Port HTTP
-lima.config.reportsdir=Dossier des rapports
-lima.config.rulesnationality=R\u00E8gles nationales
-lima.config.serveraddress=Addresse serveur
+=
+lima-bisuness.financialtransaction.retainedearnings.description=Selon d\u00E9cision AG
+lima-bisuness.financialtransaction.retainedearnings.voucher=
+lima-business.account.accountalreardyexist=Un compte existe d\u00E9j\u00E0 avec ce num\u00E9ro \: %s
+lima-business.common.failed=\u00C9chec \: %s \n
+lima-business.document.accountnumber=N\u00B0 Compte
+lima-business.document.amounts=Totaux
+lima-business.document.balance=Balance
+lima-business.document.businessnumber=N\u00B0 Siret
+lima-business.document.carryback=Report
+lima-business.document.carryforward=\u00C0 reporter
+lima-business.document.classificationcode=NAF
+lima-business.document.createdate1=Date de tirage
+lima-business.document.createdate2=\u00E0
+lima-business.document.credit=Cr\u00E9dit
+lima-business.document.date=Date
+lima-business.document.date.begin=Date de d\u00E9but \:
+lima-business.document.date.end=Date de fin \:
+lima-business.document.debit=D\u00E9bit
+lima-business.document.description=Description
+lima-business.document.entrybook=Journal
+lima-business.document.financialstatement=Bilan et compte de r\u00E9sultat
+lima-business.document.generalentrybook=Journal G\u00E9n\u00E9ral
+lima-business.document.grossamount=Brut
+lima-business.document.label=Libell\u00E9
+lima-business.document.ledger=Grand Livre
+lima-business.document.movementcredit=Mouvement Cr\u00E9diteur
+lima-business.document.movementdebit=Mouvement D\u00E9biteur
+lima-business.document.netamount=Net
+lima-business.document.pagenumber=N\u00B0 page
+lima-business.document.period1=P\u00E9riode du
+lima-business.document.period2=au
+lima-business.document.provisiondeprecationamount=Amortissements et provisions
+lima-business.document.solde=Solde
+lima-business.document.soldecredit=Solde Cr\u00E9diteur
+lima-business.document.soldedebit=Solde D\u00E9biteur
+lima-business.document.vatnumber=N\u00B0 TVA
+lima-business.document.voucher=Pi\u00E8ce comptable
+lima-business.entrybook.entrybookalreadyexist=Un journal existe d\u00E9j\u00E0 avec ce libell\u00E9 \: %s
+lima-business.financialstatement.check.nothing=Introuvable \: %s - %s \n
+lima-business.financialstatement.check.warn=Attention cette fonctionnalit\u00E9 n'est qu'une aide utilisateur.\n Certains comptes ne doivent pas \u00EAtre pr\u00E9sent au bilan et compte de r\u00E9sultat.\n Il est donc normal que des comptes sont marqu\u00E9s comme introuvable.\n\n
+lima-business.financialtransaction.retainedearnings.description=Report \u00E0 nouveau
+lima-business.financialtransaction.retainedearnings.voucher=Selon d\u00E9cision AG
+lima-business.import.accountadded=Succ\u00E8s \: Compte %s - %s ajout\u00E9\n
+lima-business.import.accountalreadyexist=\u00C9chec \: Le compte %s existe d\u00E9j\u00E0 \n
+lima-business.import.accountnomaster=\u00C9chec \: Le compte %s poss\u00E8de le master \: %s inexistant \n
+lima-business.import.closedperiodicentrybookupdated=Succ\u00E8s \: La p\u00E9riode financi\u00E8re %s - %s - %s est ajout\u00E9e \! \n
+lima-business.import.ebpmissingaccount=\u00C9chec \: Compte %s inexistant. \nImportation annul\u00E9e. \nCr\u00E9er tous les comptes avant d'importer les \u00E9critures.
+lima-business.import.ebpnoentry=\u00C9chec \: Ce fichier ne contient aucune entr\u00E9e.
+lima-business.import.entriesoutofdatesrange=Attention \: Cette entr\u00E9e %s ne fait partie d'aucune p\u00E9riode ouverte. Entr\u00E9e non import\u00E9e \!\n
+lima-business.import.entryadded=Succ\u00E8s \: Entr\u00E9e %s %s ajout\u00E9e \n
+lima-business.import.entrybookalreadyexist=\u00C9chec \: Le journal %s exist d\u00E9j\u00E0 \!\n
+lima-business.import.entrybooknotexist=Attention \: Le journal %s inexistant a \u00E9t\u00E9 cr\u00E9\u00E9 \!\n
+lima-business.import.financialstatementadded=Succ\u00E8s \: Mouvement %s ajout\u00E9e \n
+lima-business.import.financialstatementalnomaster=u00C9chec \: Le mouvement %s poss\u00E8de le master \: %s inexistant \n
+lima-business.import.financialstatementalreadyexist=u00C9chec \: Le mouvement %s exist d\u00E9j\u00E0 \!\n
+lima-business.import.fiscalperiodadded=Succ\u00E8s \: Exercice %s - %s ajout\u00E9e \! \n
+lima-business.import.fiscalperiodalreadyexist=u00C9chec \: L'exerice %s - %s existe d\u00E9j\u00E0 \!\n
+lima-business.import.identityadded=Succ\u00E8s \: Identit\u00E9 %s ajout\u00E9e \! \n
+lima-business.import.letteradded=Succ\u00E8s \: ajout\u00E9e \! \n
+lima-business.import.letteralreadyexist=u00C9chec \: La lettre %s existe d\u00E9j\u00E0 \!\n
+lima-business.import.noaccount=Erreur \: Ce fichier ne contient aucun compte.
+lima-business.import.nofiscalperiodopen=u00C9chec \: Aucun exercice ouvert \! \n
+lima-business.import.transactionadded=Succ\u00E8s \: Transaction, %s, %s, ajout\u00E9e\n
+lima.config.configFileName.description=
+lima.config.httpport=Port HTTP
+lima.config.reportsdir=Dossier des rapports
+lima.config.rulesnationality=R\u00E8gles nationales
+lima.config.serveraddress=Addresse serveur
1
0
r3158 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod
by vsalaun@users.chorem.org 07 Jun '11
by vsalaun@users.chorem.org 07 Jun '11
07 Jun '11
Author: vsalaun
Date: 2011-06-07 10:53:23 +0200 (Tue, 07 Jun 2011)
New Revision: 3158
Url: http://chorem.org/repositories/revision/lima/3158
Log:
#345 adding Date selector
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsDateForm.jaxx
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2011-06-06 09:59:07 UTC (rev 3157)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2011-06-07 08:53:23 UTC (rev 3158)
@@ -29,6 +29,7 @@
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Date;
import java.util.List;
@@ -251,7 +252,7 @@
* @param entryBook
* @throws LimaException
*/
- public void addRetainedEarnings(int selectedRow, EntryBook entryBook) throws LimaException {
+ public void addRetainedEarnings(int selectedRow, EntryBook entryBook, Date date) throws LimaException {
FiscalPeriod fiscalPeriod = getFiscalPeriodAtRow(selectedRow);
//check if the current fiscal period isn't block
@@ -268,7 +269,7 @@
throw new LimaBusinessException("The previous fiscal period isn't blocked");
}
- financialTransactionService.addRetainedEarnings(previousFiscalPeriod, fiscalPeriod, entryBook);
+ financialTransactionService.addRetainedEarnings(previousFiscalPeriod, fiscalPeriod, entryBook, date);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2011-06-06 09:59:07 UTC (rev 3157)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2011-06-07 08:53:23 UTC (rev 3158)
@@ -27,6 +27,8 @@
import static org.nuiton.i18n.I18n._;
+import java.util.Date;
+
import javax.swing.JOptionPane;
import org.jdesktop.swingx.JXTable;
import org.nuiton.util.DateUtil;
@@ -130,7 +132,7 @@
/**
* Checks confirmation from user
- * Sets EntryBook to use
+ * Sets EntryBook and Date to use
*/
public void addRetainedEarnings() {
JXTable fiscalPeriodeTable = getView().getFiscalPeriodTable();
@@ -142,6 +144,7 @@
_("lima.common.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
+ //Sets EntryBook
EntryBook newEntryBook = new EntryBookImpl();
RetainedEarningsEntryBookForm entryBookForm = new RetainedEarningsEntryBookForm(view);
entryBookForm.setEntryBook(newEntryBook);
@@ -151,7 +154,16 @@
// null == cancel action
EntryBook entryBook = entryBookForm.getEntryBook();
if (entryBook != null) {
- model.addRetainedEarnings(selectedRow, entryBook);
+ //Sets Date
+ RetainedEarningsDateForm dateForm = new RetainedEarningsDateForm(view);
+ // jaxx constructor don't call super() ?
+ dateForm.setLocationRelativeTo(view);
+ dateForm.setVisible(true);
+ // null == cancel action
+ Date date = dateForm.getBeginDatePicker().getDate();
+ if (date != null) {
+ model.addRetainedEarnings(selectedRow, entryBook, date);
+ }
}
}
} catch (LimaException eee) {
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsDateForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsDateForm.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsDateForm.jaxx 2011-06-07 08:53:23 UTC (rev 3158)
@@ -0,0 +1,47 @@
+<JDialog modal="true"
+ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}"
+ onWindowClosing="performCancel();">
+
+ <script>
+ <![CDATA[
+
+ getRootPane().setDefaultButton(okButton);
+
+ import org.apache.commons.lang.time.DateUtils;
+
+ // set begin date picker
+ Calendar calendarBegin = Calendar.getInstance();
+ // set begindate to JAN 1 - 0:00.000 of this years
+ Date beginDate = calendarBegin.getTime();
+ beginDate = DateUtils.truncate(beginDate, Calendar.DATE);
+ getBeginDatePicker().setDate(beginDate);
+
+ /**
+ * Sets null to Date and closes JDialog
+ */
+ protected void performCancel() {
+ getBeginDatePicker().setDate(null);
+ dispose();
+ }
+ ]]>
+ </script>
+
+ <Table>
+ <row>
+ <cell anchor="center">
+ <JLabel text="lima.table.date"/>
+ </cell>
+ <cell anchor="west">
+ <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/>
+ </cell>
+ </row>
+ <row>
+ <cell anchor="center">
+ <JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/>
+ </cell>
+ <cell anchor="center">
+ <JButton id="okButton" text="lima.common.ok" onActionPerformed="dispose()"/>
+ </cell>
+ </row>
+ </Table>
+</JDialog>
\ No newline at end of file
1
0
r3157 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/java/org/chorem/lima/business/ejbinterface lima-swing/src/main/resources/i18n
by vsalaun@users.chorem.org 06 Jun '11
by vsalaun@users.chorem.org 06 Jun '11
06 Jun '11
Author: vsalaun
Date: 2011-06-06 11:59:07 +0200 (Mon, 06 Jun 2011)
New Revision: 3157
Url: http://chorem.org/repositories/revision/lima/3157
Log:
#345 temporary business service
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2011-06-06 09:46:38 UTC (rev 3156)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2011-06-06 09:59:07 UTC (rev 3157)
@@ -29,6 +29,8 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+
+import javax.ejb.EJB;
import javax.ejb.Stateless;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -37,8 +39,13 @@
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.ejbinterface.AccountService;
+import org.chorem.lima.business.ejbinterface.EntryBookService;
+import org.chorem.lima.business.ejbinterface.FinancialStatementService;
import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
import org.chorem.lima.business.ejbinterface.FinancialTransactionServiceLocal;
+import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
+import org.chorem.lima.business.ejbinterface.ReportService;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.Entry;
@@ -46,7 +53,6 @@
import org.chorem.lima.entity.EntryDAO;
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialPeriodDAO;
-import org.chorem.lima.entity.FinancialPeriodImpl;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.Letter;
import org.chorem.lima.entity.LetterDAO;
@@ -79,6 +85,24 @@
private TopiaContext rootContext;
protected AccountingRules accountingRules;
+
+ @EJB
+ protected FiscalPeriodService fiscalPeriodService;
+
+ @EJB
+ protected AccountService accountServiceImpl;
+
+ @EJB
+ protected FinancialStatementService financialStatementService;
+
+ @EJB
+ protected FinancialTransactionService financialTransactionService;
+
+ @EJB
+ protected ReportService reportService;
+
+ @EJB
+ protected EntryBookService entryBookService;
public FinancialTransactionServiceImpl() {
LimaConfig config = LimaConfig.getInstance();
@@ -479,7 +503,7 @@
/**
* Create new entry
- * the period mus not be blocked, call accounting rules
+ * the period must not be blocked, call accounting rules
*
* @return
*/
@@ -637,7 +661,32 @@
}
}
+ public void addRetainedEarnings(FiscalPeriod previousFiscalPeriod, FiscalPeriod fiscalPeriod, EntryBook entryBook) throws LimaException {
+ //TODO
+ TopiaContext topiaContext = null;
+ try {
+ topiaContext = beginTransaction();
+
+ //temporary method
+
+ // + Net Income
+ // - Dividends Paid
+ // + Beginning Retained Earnings
+ // = Ending Retained Earnings
+
+ //commit
+ commitTransaction(topiaContext);
+ }
+ catch (TopiaException ex) {
+ doCatch(topiaContext, ex, log);
+ }
+ finally {
+ doFinally(topiaContext, log);
+ }
+ //WORK
+ }
+
/**
* Get letter from count of existing letter
* 1 -> A, 2 -> B, 26 -> Z, 27 -> AA, 28 -> AB, ...
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2011-06-06 09:46:38 UTC (rev 3156)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2011-06-06 09:59:07 UTC (rev 3157)
@@ -82,7 +82,7 @@
/**
- * Methodes for create, update and remove the entry
+ * Methods for create, update and remove the entry
* @param entry
* @throws LimaException
*/
@@ -93,9 +93,17 @@
void removeEntry(Entry entry) throws LimaException;
+ /**
+ * Methods for report retained earnings
+ * @param previousFiscalPeriod, fiscalPeriod, entryBook
+ * @throws LimaException
+ */
+ void addRetainedEarnings(FiscalPeriod previousFiscalPeriod, FiscalPeriod fiscalPeriod, EntryBook entryBook) throws LimaException;
+
+
/**
- * Methodes for create, update and remove the letter
+ * Methods for create, update and remove the letter
* @param entry
* @throws LimaException
*/
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 2011-06-06 09:46:38 UTC (rev 3156)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-06-06 09:59:07 UTC (rev 3157)
@@ -1,238 +1,243 @@
-=
-lima.action.commandline.help=Show help in console
-lima.action.fullscreen=Full screen
-lima.action.fullscreen.tip=Open ui in full screen
-lima.action.normalscreen=Normal screen
-lima.action.normalscreen.tip=Open ui in normal screen
-lima.charts.account=Accounts chart
-lima.charts.account.addAccount=Add account
-lima.charts.account.addSubLedger=Add thirdpart account
-lima.charts.account.base=Base accountchart
-lima.charts.account.developed=Developped accountchart
-lima.charts.account.number=Account Number
-lima.charts.account.question.remove=Do you really remove this account ?
-lima.charts.account.shortened=Shorthened accountchart
-lima.charts.entrybook.add=Add entrybook
-lima.charts.entrybook.confirmation=Do you really remove this entrybook ?
-lima.charts.entrybook.default=Defaults entrybooks
-lima.charts.entrybook.import=Import entrybooks
-lima.charts.financialperiod=Financial Periods
-lima.charts.financialperiod.block=Block financialperiod
-lima.charts.financialperiod.question.blocked=Do you really block this financialperiod ? This action is irreversible \!
-lima.charts.financialstatement=Financialstatement chart
-lima.charts.financialstatement.base=Base financialstatement chart
-lima.charts.financialstatement.developed=Developped financialstatement chart
-lima.charts.financialstatement.nothing=NO financialstatement chart
-lima.charts.financialstatement.shortened=Shortened financialstatement chart
-lima.charts.financialtransaction.question.removeentry=Do you really remove this entry ?
-lima.charts.financialtransaction.question.removetransaction=Do you really remove this transaction ?
-lima.charts.fiscalperiod.add=Add fiscalperiod
-lima.charts.fiscalperiod.block=Block fiscalperiod
-lima.charts.fiscalperiod.create=Create fiscalperiod
-lima.charts.fiscalperiod.question.blocked=Block financialperiod
-lima.charts.fiscalperiod.question.morethan12=This period is longer than 12 months. Do you really create this ?
-lima.charts.fiscalyear=Fiscal Years
-lima.common.account=Account
-lima.common.amount=Amount
-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
-lima.common.code=Code
-lima.common.confirmation=Confirmation
-lima.common.copy=Copy
-lima.common.enddate=End
-lima.common.entrybook=EntryBook
-lima.common.entrybooks=EntryBooks
-lima.common.error=Error
-lima.common.filter=Filter
-lima.common.fin=Terminated
-lima.common.globalexception=Global lima exception
-lima.common.label=Label
-lima.common.movmentedfilter=Accounts filtered
-lima.common.next=Next
-lima.common.ok=OK
-lima.common.open=Open
-lima.common.paste=Paste
-lima.common.period=Period
-lima.common.question=Question
-lima.common.quit=Exit
-lima.common.remove=Remove
-lima.common.search=Search
-lima.common.solde=Solde
-lima.common.soldecredit=Credit solde
-lima.common.soldedebit=Debit solde
-lima.common.update=Modify
-lima.config.category.directories=Directories
-lima.config.category.directories.description=Directories used by LIMA
-lima.config.category.other=Other
-lima.config.category.other.description=Other configuration properties
-lima.config.configFileName.description=
-lima.config.host.adress=Host adress
-lima.config.locale.description=Localization used by LIMA
-lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=FullScreen
-lima.daily=Daily
-lima.documents=Documents\u2026
-lima.entries=Entries
-lima.entries.addEntry=Add entry
-lima.entries.addTransaction=Add transaction
-lima.entries.lettering=Lettering
-lima.entries.lettering.add=Add letter
-lima.entries.lettering.noletterselected=Error \: No selected letter
-lima.entries.lettering.radiobutton.list=Existing letters
-lima.entries.lettering.radiobutton.new=New letter
-lima.entries.lettering.remove=Remove letter
-lima.entries.searchtransaction=Search transaction
-lima.entries.searchunbalancedtransaction=Incorrect transactions
-lima.entries.writetransaction=Write entries
-lima.enum.comboboxaccount.account=Account
-lima.enum.comboboxaccount.accountlist=Account list
-lima.enum.comboboxaccount.allaccount=All accounts
-lima.enum.comboboxamount.both=Both
-lima.enum.comboboxamount.credit=Credit
-lima.enum.comboboxamount.debit=Debit
-lima.enum.comboboxentrybook.all=All entrybooks
-lima.enum.comboboxentrybook.select_one=EntryBook
-lima.enum.comboboxletter.all=All letters
-lima.enum.comboboxletter.selectone=Letter
-lima.enum.comboboxoperator.equal=Equal
-lima.enum.comboboxoperator.inferior=Inferior
-lima.enum.comboboxoperator.inferiororequal=Inferior or equal
-lima.enum.comboboxoperator.interval=Inteval
-lima.enum.comboboxoperator.notequal=Not equal
-lima.enum.comboboxoperator.superior=Superior
-lima.enum.comboboxoperator.superiororequal=Superior or equal
-lima.enum.comboboxperiod.date=Date
-lima.enum.comboboxperiod.financialperiod=Financial period
-lima.enum.comboboxperiod.fiscalperiod=Fiscal period
-lima.enum.comboboxperiod.period=Period
-lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html>
-lima.financialstatement.accounts=Account list on debit and on credit
-lima.financialstatement.check=Check accounts passing to movement
-lima.financialstatement.creditaccounts=Account credit list
-lima.financialstatement.debitaccounts=Account debit list
-lima.financialstatement.delete=Delete actual financialstatement chart before import new
-lima.financialstatement.header.add=Add category
-lima.financialstatement.headeramount=Calculate amount on header
-lima.financialstatement.label=Label
-lima.financialstatement.movement.add=Add movement
-lima.financialstatement.provisiondeprecationaccounts=Provisions and deprecations accounts list
-lima.financialstatement.subamount=Calculate a subamount
-lima.home.chartaccounts.create=Create accountschart
-lima.home.chartaccounts.modify=Modify accountschart
-lima.home.chartaccounts.nothing=No accountschart
-lima.home.chartaccounts.state1_2=The chart have
-lima.home.chartaccounts.state2_2=accounts
-lima.home.entrybooks.create=Create entrybook
-lima.home.entrybooks.modify=Modifiy entrybook
-lima.home.entrybooks.nothing=No entrybook
-lima.home.entrybooks.state.single=Entrybook is
-lima.home.entrybooks.state1_2.plural=The
-lima.home.entrybooks.state2_2.plural=entrybooks are
-lima.home.fiscalperiod.closed=fiscalperiods closed
-lima.home.fiscalperiod.create=Create fiscalperiod
-lima.home.fiscalperiod.modify=Modify fiscalperiod
-lima.home.fiscalperiod.noopen=No fiscalperiod
-lima.home.fiscalperiod.opened=fiscalperiods open
-lima.home.transaction.balanced=transactions are balanced
-lima.home.transaction.create=Create entries
-lima.home.transaction.modifiy.balanced=Modify entries
-lima.home.transaction.modifiy.unbalanced=Modify incorrect entries
-lima.home.transaction.nothing=No transaction
-lima.home.transaction.unbalanced=transactions are not balanced
-lima.identity=Identity
-lima.identity.address=Address
-lima.identity.address2=Address (next)
-lima.identity.businessNumber=Business number
-lima.identity.city=City
-lima.identity.classificationCode=Classification code
-lima.identity.contact=Contact
-lima.identity.description=Description
-lima.identity.email=Email
-lima.identity.name=Name
-lima.identity.phoneNumber=Phone number
-lima.identity.vatNumber=VAT number
-lima.identity.zipCode=Zip code
-lima.importexport.accountcharts=Accounts chart
-lima.importexport.all=All
-lima.importexport.choiceencoding=Choice encoding
-lima.importexport.csv=Import/Export CSV
-lima.importexport.defaultentrybooks=Defaults entrybooks
-lima.importexport.ebp=Import/Export EBP
-lima.importexport.entries=Entries
-lima.importexport.export=Export
-lima.importexport.export.terminated=Export terminated
-lima.importexport.financialstatements=FinancialStatements chart
-lima.importexport.import=Import
-lima.importexport.import.terminated=Import terminated
-lima.importexport.importcsv=Import CSV
-lima.importexport.importebp=Import EBP
-lima.importexport.wait=Job in progress\u2026
-lima.init.closed=Lima closed at %1$s
-lima.init.errorclosing=Error during Lima close
-lima.menu.file=File
-lima.menu.help=Help
-lima.menu.help.about=About
-lima.menu.help.help=Help
-lima.menu.help.i18n=Language
-lima.menu.help.i18n.fr=French
-lima.menu.help.i18n.uk=English
-lima.menu.help.site=WebSite
-lima.menu.window=Window
-lima.message.help.usage=Options (set with --option <key> <value>\:
-lima.misc.supportemail.description=Support email
-lima.openejb.remotemode.description=
-lima.opening.accounts=<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>
-lima.preferences=Preferences
-lima.refresh=\u21BB
-lima.reports=Reports
-lima.reports.accounts=Edit account
-lima.reports.balance=Balance
-lima.reports.entrybooks=Edit entrybook
-lima.reports.financialstatement=Financialstatements
-lima.reports.ledger=Ledger
-lima.response.no=No
-lima.response.yes=Yes
-lima.splash.1=Loading services...
-lima.splash.2="Loading accounting...
-lima.splash.3=Ready \!
-lima.structure=Structure
-lima.tab.home=Home
-lima.table.account=Account
-lima.table.balance=Balance
-lima.table.closure=Closed
-lima.table.code=Code
-lima.table.credit=Credit
-lima.table.date=Date
-lima.table.debit=Debit
-lima.table.debitcredit=Debit and credit
-lima.table.description=Description
-lima.table.entrybook=EntryBook
-lima.table.fiscalperiod=Fiscalperiod
-lima.table.grossamount=Gross amount
-lima.table.label=Label
-lima.table.letter=Letter
-lima.table.move.credit=Movmented Credit
-lima.table.move.debit=Movemented Debit
-lima.table.netamount=Net amount
-lima.table.number=Account Number
-lima.table.period=Period
-lima.table.provisiondeprecationamount=Provision & Deprecation
-lima.table.solde=Solder
-lima.table.solde.credit=Credit solde
-lima.table.solde.debit=Debit solde
-lima.table.voucher=Voucher
-lima.title=Lutin Invoice Monitoring and Accounting
-lima.title.about=About Lima...
-lima.title.about.description=Open sources accounting software
-lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html>
-lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html>
-lima.warning.nimbus.landf=Could not find Numbus Look&Feel
+=
+lima.action.commandline.help=Show help in console
+lima.action.fullscreen=Full screen
+lima.action.fullscreen.tip=Open ui in full screen
+lima.action.normalscreen=Normal screen
+lima.action.normalscreen.tip=Open ui in normal screen
+lima.charts.account=Accounts chart
+lima.charts.account.addAccount=Add account
+lima.charts.account.addSubLedger=Add thirdpart account
+lima.charts.account.base=Base accountchart
+lima.charts.account.developed=Developped accountchart
+lima.charts.account.number=Account Number
+lima.charts.account.question.remove=Do you really remove this account ?
+lima.charts.account.shortened=Shorthened accountchart
+lima.charts.entrybook.add=Add entrybook
+lima.charts.entrybook.confirmation=Do you really remove this entrybook ?
+lima.charts.entrybook.default=Defaults entrybooks
+lima.charts.entrybook.import=Import entrybooks
+lima.charts.financialperiod=Financial Periods
+lima.charts.financialperiod.block=Block financialperiod
+lima.charts.financialperiod.question.blocked=Do you really block this financialperiod ? This action is irreversible \!
+lima.charts.financialstatement=Financialstatement chart
+lima.charts.financialstatement.base=Base financialstatement chart
+lima.charts.financialstatement.developed=Developped financialstatement chart
+lima.charts.financialstatement.nothing=NO financialstatement chart
+lima.charts.financialstatement.shortened=Shortened financialstatement chart
+lima.charts.financialtransaction.question.removeentry=Do you really remove this entry ?
+lima.charts.financialtransaction.question.removetransaction=Do you really remove this transaction ?
+lima.charts.fiscalperiod.add=Add fiscalperiod
+lima.charts.fiscalperiod.addretainedearnings=Report retained earnings
+lima.charts.fiscalperiod.block=Block fiscalperiod
+lima.charts.fiscalperiod.create=Create fiscalperiod
+lima.charts.fiscalperiod.question.blocked=Block fiscalperiod
+lima.charts.fiscalperiod.question.morethan12=This period is longer than 12 months. Do you really create this ?
+lima.charts.fiscalyear=Fiscal Years
+lima.common.account=Account
+lima.common.amount=Amount
+lima.common.amountcredit=Credit amount
+lima.common.amountdebit=Debit amount
+lima.common.begindate=Begin
+lima.common.buttonback=\u2190
+lima.common.buttonnext=\u2192
+lima.common.cancel=Cancel
+lima.common.close=Close
+lima.common.closed=Closed
+lima.common.code=Code
+lima.common.confirmation=Confirmation
+lima.common.copy=Copy
+lima.common.enddate=End
+lima.common.entrybook=EntryBook
+lima.common.entrybooks=EntryBooks
+lima.common.error=Error
+lima.common.filter=Filter
+lima.common.fin=Terminated
+lima.common.globalexception=Global lima exception
+lima.common.label=Label
+lima.common.movmentedfilter=Accounts filtered
+lima.common.next=Next
+lima.common.ok=OK
+lima.common.open=Open
+lima.common.paste=Paste
+lima.common.period=Period
+lima.common.question=Question
+lima.common.quit=Exit
+lima.common.remove=Remove
+lima.common.search=Search
+lima.common.solde=Solde
+lima.common.soldecredit=Credit solde
+lima.common.soldedebit=Debit solde
+lima.common.update=Modify
+lima.config.category.directories=Directories
+lima.config.category.directories.description=Directories used by LIMA
+lima.config.category.other=Other
+lima.config.category.other.description=Other configuration properties
+lima.config.configFileName.description=
+lima.config.currency.description=
+lima.config.decimalseparator.description=
+lima.config.host.adress=Host adress
+lima.config.locale.description=Localization used by LIMA
+lima.config.scale.description=
+lima.config.ui.flaunchui.description=
+lima.config.ui.fullscreen.description=FullScreen
+lima.daily=Daily
+lima.documents=Documents\u2026
+lima.entries=Entries
+lima.entries.addEntry=Add entry
+lima.entries.addTransaction=Add transaction
+lima.entries.lettering=Lettering
+lima.entries.lettering.add=Add letter
+lima.entries.lettering.noletterselected=Error \: No selected letter
+lima.entries.lettering.radiobutton.list=Existing letters
+lima.entries.lettering.radiobutton.new=New letter
+lima.entries.lettering.remove=Remove letter
+lima.entries.searchtransaction=Search transaction
+lima.entries.searchunbalancedtransaction=Incorrect transactions
+lima.entries.writetransaction=Write entries
+lima.enum.comboboxaccount.account=Account
+lima.enum.comboboxaccount.accountlist=Account list
+lima.enum.comboboxaccount.allaccount=All accounts
+lima.enum.comboboxamount.both=Both
+lima.enum.comboboxamount.credit=Credit
+lima.enum.comboboxamount.debit=Debit
+lima.enum.comboboxentrybook.all=All entrybooks
+lima.enum.comboboxentrybook.select_one=EntryBook
+lima.enum.comboboxletter.all=All letters
+lima.enum.comboboxletter.selectone=Letter
+lima.enum.comboboxoperator.equal=Equal
+lima.enum.comboboxoperator.inferior=Inferior
+lima.enum.comboboxoperator.inferiororequal=Inferior or equal
+lima.enum.comboboxoperator.interval=Inteval
+lima.enum.comboboxoperator.notequal=Not equal
+lima.enum.comboboxoperator.superior=Superior
+lima.enum.comboboxoperator.superiororequal=Superior or equal
+lima.enum.comboboxperiod.date=Date
+lima.enum.comboboxperiod.financialperiod=Financial period
+lima.enum.comboboxperiod.fiscalperiod=Fiscal period
+lima.enum.comboboxperiod.period=Period
+lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html>
+lima.financialstatement.accounts=Account list on debit and on credit
+lima.financialstatement.check=Check accounts passing to movement
+lima.financialstatement.creditaccounts=Account credit list
+lima.financialstatement.debitaccounts=Account debit list
+lima.financialstatement.delete=Delete actual financialstatement chart before import new
+lima.financialstatement.header.add=Add category
+lima.financialstatement.headeramount=Calculate amount on header
+lima.financialstatement.label=Label
+lima.financialstatement.movement.add=Add movement
+lima.financialstatement.provisiondeprecationaccounts=Provisions and deprecations accounts list
+lima.financialstatement.subamount=Calculate a subamount
+lima.home.chartaccounts.create=Create accountschart
+lima.home.chartaccounts.modify=Modify accountschart
+lima.home.chartaccounts.nothing=No accountschart
+lima.home.chartaccounts.state1_2=The chart have
+lima.home.chartaccounts.state2_2=accounts
+lima.home.entrybooks.create=Create entrybook
+lima.home.entrybooks.modify=Modifiy entrybook
+lima.home.entrybooks.nothing=No entrybook
+lima.home.entrybooks.state.single=Entrybook is
+lima.home.entrybooks.state1_2.plural=The
+lima.home.entrybooks.state2_2.plural=entrybooks are
+lima.home.fiscalperiod.closed=fiscalperiods closed
+lima.home.fiscalperiod.create=Create fiscalperiod
+lima.home.fiscalperiod.modify=Modify fiscalperiod
+lima.home.fiscalperiod.noopen=No fiscalperiod
+lima.home.fiscalperiod.opened=fiscalperiods open
+lima.home.transaction.balanced=transactions are balanced
+lima.home.transaction.create=Create entries
+lima.home.transaction.modifiy.balanced=Modify entries
+lima.home.transaction.modifiy.unbalanced=Modify incorrect entries
+lima.home.transaction.nothing=No transaction
+lima.home.transaction.unbalanced=transactions are not balanced
+lima.identity=Identity
+lima.identity.address=Address
+lima.identity.address2=Address (next)
+lima.identity.businessNumber=Business number
+lima.identity.city=City
+lima.identity.classificationCode=Classification code
+lima.identity.contact=Contact
+lima.identity.description=Description
+lima.identity.email=Email
+lima.identity.name=Name
+lima.identity.phoneNumber=Phone number
+lima.identity.vatNumber=VAT number
+lima.identity.zipCode=Zip code
+lima.importexport.accountcharts=Accounts chart
+lima.importexport.all=All
+lima.importexport.choiceencoding=Choice encoding
+lima.importexport.csv=Import/Export CSV
+lima.importexport.defaultentrybooks=Defaults entrybooks
+lima.importexport.ebp=Import/Export EBP
+lima.importexport.entries=Entries
+lima.importexport.export=Export
+lima.importexport.export.terminated=Export terminated
+lima.importexport.financialstatements=FinancialStatements chart
+lima.importexport.import=Import
+lima.importexport.import.terminated=Import terminated
+lima.importexport.importcsv=Import CSV
+lima.importexport.importebp=Import EBP
+lima.importexport.wait=Job in progress\u2026
+lima.init.closed=Lima closed at %1$s
+lima.init.errorclosing=Error during Lima close
+lima.menu.file=File
+lima.menu.help=Help
+lima.menu.help.about=About
+lima.menu.help.help=Help
+lima.menu.help.i18n=Language
+lima.menu.help.i18n.fr=French
+lima.menu.help.i18n.uk=English
+lima.menu.help.site=WebSite
+lima.menu.window=Window
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Support email
+lima.openejb.remotemode.description=
+lima.opening.accounts=<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>
+lima.preferences=Preferences
+lima.refresh=\u21BB
+lima.reports=Reports
+lima.reports.accounts=Edit account
+lima.reports.balance=Balance
+lima.reports.entrybooks=Edit entrybook
+lima.reports.financialstatement=Financialstatements
+lima.reports.ledger=Ledger
+lima.response.no=No
+lima.response.yes=Yes
+lima.splash.1=Loading services...
+lima.splash.2="Loading accounting...
+lima.splash.3=Ready \!
+lima.structure=Structure
+lima.tab.home=Home
+lima.table.account=Account
+lima.table.balance=Balance
+lima.table.closure=Closed
+lima.table.code=Code
+lima.table.credit=Credit
+lima.table.date=Date
+lima.table.debit=Debit
+lima.table.debitcredit=Debit and credit
+lima.table.description=Description
+lima.table.entrybook=EntryBook
+lima.table.fiscalperiod=Fiscalperiod
+lima.table.grossamount=Gross amount
+lima.table.label=Label
+lima.table.letter=Letter
+lima.table.move.credit=Movmented Credit
+lima.table.move.debit=Movemented Debit
+lima.table.netamount=Net amount
+lima.table.number=Account Number
+lima.table.period=Period
+lima.table.provisiondeprecationamount=Provision & Deprecation
+lima.table.solde=Solder
+lima.table.solde.credit=Credit solde
+lima.table.solde.debit=Debit solde
+lima.table.voucher=Voucher
+lima.title=Lutin Invoice Monitoring and Accounting
+lima.title.about=About Lima...
+lima.title.about.description=Open sources accounting software
+lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html>
+lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html>
+lima.warning.nimbus.landf=Could not find Numbus Look&Feel
+limma.config.thousandseparator.description=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-06-06 09:46:38 UTC (rev 3156)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-06-06 09:59:07 UTC (rev 3157)
@@ -1,238 +1,243 @@
-=
-lima.action.commandline.help=Afficher l'aide en console
-lima.action.fullscreen=Plein Ecran
-lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
-lima.action.normalscreen=Ecran normal
-lima.action.normalscreen.tip=Revenir en \u00E9cran normal
-lima.charts.account=Plan comptable
-lima.charts.account.addAccount=Ajout Compte G\u00E9n\u00E9ral
-lima.charts.account.addSubLedger=Ajouter Compte Tiers
-lima.charts.account.base=Plan comptable de base
-lima.charts.account.developed=Plan comptable d\u00E9velopp\u00E9
-lima.charts.account.number=Num\u00E9ro de compte
-lima.charts.account.question.remove=Voulez-vous supprimer ce compte?
-lima.charts.account.shortened=Plan comptable abr\u00E9g\u00E9
-lima.charts.entrybook.add=Ajouter un journal
-lima.charts.entrybook.confirmation=Do you really want to delete entry book %s ?
-lima.charts.entrybook.default=Journaux par d\u00E9fault
-lima.charts.entrybook.import=Importer des journaux
-lima.charts.financialperiod=P\u00E9riodes comptables
-lima.charts.financialperiod.block=Cloturer une p\u00E9riode
-lima.charts.financialperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette p\u00E9riode ? Cette action est irr\u00E9versible \!
-lima.charts.financialstatement=Plan BCR
-lima.charts.financialstatement.base=Plan BCR de base
-lima.charts.financialstatement.developed=Plan BCR d\u00E9velopp\u00E9
-lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
-lima.charts.financialstatement.shortened=Plan BCR abr\u00E9g\u00E9
-lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction?
-lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction?
-lima.charts.fiscalperiod.add=Nouvel exercice
-lima.charts.fiscalperiod.block=Cloturer un exercice
-lima.charts.fiscalperiod.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
-lima.charts.fiscalperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette exercice ? Cette action est irr\u00E9versible \!
-lima.charts.fiscalperiod.question.morethan12=La p\u00E9riode s\u00E9lectionn\u00E9e n'est pas de 12 mois, voulez-vous continuer ?
-lima.charts.fiscalyear=Exercices
-lima.common.account=Compte
-lima.common.amount=Montant
-lima.common.amountcredit=Total Cr\u00E9dit
-lima.common.amountdebit=Total D\u00E9bit
-lima.common.begindate=D\u00E9but
-lima.common.buttonback=\u276E
-lima.common.buttonnext=\u276F
-lima.common.cancel=Annuler
-lima.common.close=Fermer
-lima.common.closed=Ferm\u00E9
-lima.common.code=Code
-lima.common.confirmation=Confirmation
-lima.common.copy=Copier
-lima.common.enddate=Fin
-lima.common.entrybook=Journal
-lima.common.entrybooks=Journaux
-lima.common.error=Erreur
-lima.common.filter=Filtrer
-lima.common.fin=Termin\u00E9
-lima.common.globalexception=Global lima exception
-lima.common.label=Libell\u00E9
-lima.common.movmentedfilter=Comptes mouvement\u00E9s
-lima.common.next=Suivant
-lima.common.ok=OK
-lima.common.open=Ouvert
-lima.common.paste=Coller
-lima.common.period=P\u00E9riode
-lima.common.question=Question
-lima.common.quit=Quitter
-lima.common.remove=Supprimer
-lima.common.search=Rechercher
-lima.common.solde=Solde
-lima.common.soldecredit=Solde Cr\u00E9diteur
-lima.common.soldedebit=Solde D\u00E9biteur
-lima.common.update=Modifier
-lima.config.category.directories=R\u00E9pertoires
-lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
-lima.config.category.other=Autre
-lima.config.category.other.description=Autre propri\u00E9t\u00E9s de configuration
-lima.config.configFileName.description=
-lima.config.host.adress=Adresse du serveur distant
-lima.config.locale.description=Locale utilis\u00E9e par l'application
-lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=Plein \u00E9cran
-lima.daily=Quotidien
-lima.documents=Documents\u2026
-lima.entries=Traitement
-lima.entries.addEntry=Ajouter entr\u00E9e
-lima.entries.addTransaction=Ajouter transaction
-lima.entries.lettering=Lettrage
-lima.entries.lettering.add=Ajouter une lettre
-lima.entries.lettering.noletterselected=Erreur \: Aucune lettre s\u00E9lectionn\u00E9e.
-lima.entries.lettering.radiobutton.list=Lettres existantes
-lima.entries.lettering.radiobutton.new=Nouvelle lettre
-lima.entries.lettering.remove=Supprimer une lettre
-lima.entries.searchtransaction=Rechercher des \u00E9critures
-lima.entries.searchunbalancedtransaction=Entr\u00E9es incorrectes
-lima.entries.writetransaction=Saisir des \u00E9critures
-lima.enum.comboboxaccount.account=Compte
-lima.enum.comboboxaccount.accountlist=Liste de comptes
-lima.enum.comboboxaccount.allaccount=Tous les comptes
-lima.enum.comboboxamount.both=Les deux
-lima.enum.comboboxamount.credit=Cr\u00E9dit
-lima.enum.comboboxamount.debit=D\u00E9bit
-lima.enum.comboboxentrybook.all=Tous les journaux
-lima.enum.comboboxentrybook.select_one=Journal
-lima.enum.comboboxletter.all=Toutes les lettres
-lima.enum.comboboxletter.selectone=Lettre
-lima.enum.comboboxoperator.equal=\u00C9gal
-lima.enum.comboboxoperator.inferior=Inf\u00E9rieur
-lima.enum.comboboxoperator.inferiororequal=Inf\u00E9rieur ou \u00E9gal
-lima.enum.comboboxoperator.interval=Intervalle
-lima.enum.comboboxoperator.notequal=Diff\u00E9rent
-lima.enum.comboboxoperator.superior=Sup\u00E9rieur
-lima.enum.comboboxoperator.superiororequal=Sup\u00E9rieur ou \u00E9gal
-lima.enum.comboboxperiod.date=Date
-lima.enum.comboboxperiod.financialperiod=P\u00E9riode Financi\u00E8re
-lima.enum.comboboxperiod.fiscalperiod=Exercice
-lima.enum.comboboxperiod.period=P\u00E9riode
-lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
-lima.financialstatement.accounts=Liste de comptes au cr\u00E9dit et au d\u00E9bit
-lima.financialstatement.check=V\u00E9rification des comptes aux postes
-lima.financialstatement.creditaccounts=Liste de comptes au cr\u00E9dit
-lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
-lima.financialstatement.delete=Supprimer le plan BCR actuel avant d'importer
-lima.financialstatement.header.add=Ajouter une cat\u00E9gorie
-lima.financialstatement.headeramount=Calculer le total en en-tete
-lima.financialstatement.label=Libell\u00E9
-lima.financialstatement.movement.add=Ajouter un regrouprement
-lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
-lima.financialstatement.subamount=Calculer un sous-total
-lima.home.chartaccounts.create=Cr\u00E9er le plan des comptes
-lima.home.chartaccounts.modify=Modifier le plan des comptes
-lima.home.chartaccounts.nothing=Aucun compte \!
-lima.home.chartaccounts.state1_2=Le plan comptable possede
-lima.home.chartaccounts.state2_2=comptes
-lima.home.entrybooks.create=Cr\u00E9er les journaux
-lima.home.entrybooks.modify=Modifier les journaux
-lima.home.entrybooks.nothing=Aucun journal ouvert \!
-lima.home.entrybooks.state.single=Le journal est \:
-lima.home.entrybooks.state1_2.plural=Les
-lima.home.entrybooks.state2_2.plural=journaux sont \:
-lima.home.fiscalperiod.closed=exercices clotur\u00E9s
-lima.home.fiscalperiod.create=Cr\u00E9er un exercice
-lima.home.fiscalperiod.modify=Modifier les exercices
-lima.home.fiscalperiod.noopen=Aucun exercice ouvert \!
-lima.home.fiscalperiod.opened=exercices ouverts
-lima.home.transaction.balanced=transactions, toutes sont \u00E9quilibr\u00E9es
-lima.home.transaction.create=Ajouter des \u00E9critures
-lima.home.transaction.modifiy.balanced=Modifier les \u00E9critures
-lima.home.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrectes
-lima.home.transaction.nothing=Aucune \u00E9criture
-lima.home.transaction.unbalanced=transactions ne sont pas \u00E9quilibr\u00E9es \!
-lima.identity=Identit\u00E9
-lima.identity.address=Adresse
-lima.identity.address2=Adresse (suite)
-lima.identity.businessNumber=SIRET
-lima.identity.city=Ville
-lima.identity.classificationCode=Code NAF
-lima.identity.contact=Contact
-lima.identity.description=Description
-lima.identity.email=Courriel
-lima.identity.name=Nom
-lima.identity.phoneNumber=n\u00B0 Tel
-lima.identity.vatNumber=n\u00B0 TVA
-lima.identity.zipCode=Code Postal
-lima.importexport.accountcharts=Plan des comptes
-lima.importexport.all=Tout
-lima.importexport.choiceencoding=Choisir encodage \:
-lima.importexport.csv=Import/Export CSV
-lima.importexport.defaultentrybooks=Journaux par d\u00E9faut
-lima.importexport.ebp=Import/Export EBP
-lima.importexport.entries=\u00C9critures
-lima.importexport.export=Export
-lima.importexport.export.terminated=Export termin\u00E9
-lima.importexport.financialstatements=Plan BCR
-lima.importexport.import=Import
-lima.importexport.import.terminated=Import termin\u00E9
-lima.importexport.importcsv=Import CSV
-lima.importexport.importebp=Import EBP
-lima.importexport.wait=Traitement en cours \u2026
-lima.init.closed=Lima ferm\u00E9 \u00E0 %1$s
-lima.init.errorclosing=Erreur lors de la fermeture
-lima.menu.file=Fichier
-lima.menu.help=Aide
-lima.menu.help.about=\u00C0 Propos
-lima.menu.help.help=Afficher l'aide
-lima.menu.help.i18n=Langue
-lima.menu.help.i18n.fr=Fran\u00E7ais
-lima.menu.help.i18n.uk=Anglais
-lima.menu.help.site=Acc\u00E9der au site de Lima
-lima.menu.window=Fen\u00EAtre
-lima.message.help.usage=Options (set with --option <key> <value>\:
-lima.misc.supportemail.description=Adresse email de support
-lima.openejb.remotemode.description=
-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>
-lima.preferences=Pr\u00E9f\u00E9rences
-lima.refresh=\u21BB
-lima.reports=Rapports
-lima.reports.accounts=Edition compte
-lima.reports.balance=Balance
-lima.reports.entrybooks=Edition journal
-lima.reports.financialstatement=Bilan et Compte de r\u00E9sultat
-lima.reports.ledger=Grand Livre
-lima.response.no=Non
-lima.response.yes=Oui
-lima.splash.1=Chargement des services...
-lima.splash.2=Chargement de la comptabilit\u00E9
-lima.splash.3=Application pr\u00EAte \!
-lima.structure=Structure
-lima.tab.home=Accueil
-lima.table.account=Compte
-lima.table.balance=Balance
-lima.table.closure=Cloture
-lima.table.code=Code
-lima.table.credit=Cr\u00E9dit
-lima.table.date=Date
-lima.table.debit=D\u00E9bit
-lima.table.debitcredit=D\u00E9bit et Cr\u00E9dit
-lima.table.description=Description
-lima.table.entrybook=Journal
-lima.table.fiscalperiod=Exercice
-lima.table.grossamount=Brut
-lima.table.label=Libell\u00E9
-lima.table.letter=Lettre
-lima.table.move.credit=Mouvement au cr\u00E9dit
-lima.table.move.debit=Mouvement au d\u00E9bit
-lima.table.netamount=Net
-lima.table.number=Num\u00E9ro de compte
-lima.table.period=P\u00E9riode
-lima.table.provisiondeprecationamount=Amortissements et provisions
-lima.table.solde=Solde
-lima.table.solde.credit=Solde cr\u00E9dit
-lima.table.solde.debit=Solde d\u00E9bit
-lima.table.voucher=Pi\u00E8ce comptable
-lima.title=Lutin Invoice Monitoring and Accounting
-lima.title.about=\u00C0 propos de Lima...
-lima.title.about.description=Logiciel de comptabilit\u00E9 Libre
-lima.tooltip.filter=<html>Expression r\u00E9guli\u00E8re \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
-lima.tooltip.lettering=<html>Pour ajouter une lettre \u00E0 plusieurs \u00E9critures <br/>S\u00E9lectionner plusieurs lignes avec la combinaison ctrl + click</html>
-lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
+=
+lima.action.commandline.help=Afficher l'aide en console
+lima.action.fullscreen=Plein Ecran
+lima.action.fullscreen.tip=Passer en mode plein \u00E9cran
+lima.action.normalscreen=Ecran normal
+lima.action.normalscreen.tip=Revenir en \u00E9cran normal
+lima.charts.account=Plan comptable
+lima.charts.account.addAccount=Ajout Compte G\u00E9n\u00E9ral
+lima.charts.account.addSubLedger=Ajouter Compte Tiers
+lima.charts.account.base=Plan comptable de base
+lima.charts.account.developed=Plan comptable d\u00E9velopp\u00E9
+lima.charts.account.number=Num\u00E9ro de compte
+lima.charts.account.question.remove=Voulez-vous supprimer ce compte?
+lima.charts.account.shortened=Plan comptable abr\u00E9g\u00E9
+lima.charts.entrybook.add=Ajouter un journal
+lima.charts.entrybook.confirmation=Voulez-vous supprimer ce journal?
+lima.charts.entrybook.default=Journaux par d\u00E9fault
+lima.charts.entrybook.import=Importer des journaux
+lima.charts.financialperiod=P\u00E9riodes comptables
+lima.charts.financialperiod.block=Cloturer une p\u00E9riode
+lima.charts.financialperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette p\u00E9riode ? Cette action est irr\u00E9versible \!
+lima.charts.financialstatement=Plan BCR
+lima.charts.financialstatement.base=Plan BCR de base
+lima.charts.financialstatement.developed=Plan BCR d\u00E9velopp\u00E9
+lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR charg\u00E9<br/>Veuillez s\u00E9lectionner un plan par d\u00E9fault, <br/>importer un plan personnalis\u00E9<br/> ou annuler pour cr\u00E9er votre propre plan.</center></html>
+lima.charts.financialstatement.shortened=Plan BCR abr\u00E9g\u00E9
+lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction?
+lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction?
+lima.charts.fiscalperiod.add=Nouvel exercice
+lima.charts.fiscalperiod.addretainedearnings=Reporter \u00E0 nouveau
+lima.charts.fiscalperiod.block=Cloturer un exercice
+lima.charts.fiscalperiod.create=Choisissez la date de d\u00E9but et de fin du nouvel exercice
+lima.charts.fiscalperiod.question.blocked=\u00C8tes vous s\u00FBre de vouloir cl\u00F4turer cette exercice ? Cette action est irr\u00E9versible \!
+lima.charts.fiscalperiod.question.morethan12=La p\u00E9riode s\u00E9lectionn\u00E9e n'est pas de 12 mois, voulez-vous continuer ?
+lima.charts.fiscalyear=Exercices
+lima.common.account=Compte
+lima.common.amount=Montant
+lima.common.amountcredit=Total Cr\u00E9dit
+lima.common.amountdebit=Total D\u00E9bit
+lima.common.begindate=D\u00E9but
+lima.common.buttonback=\u2190
+lima.common.buttonnext=\u2192
+lima.common.cancel=Annuler
+lima.common.close=Fermer
+lima.common.closed=Ferm\u00E9
+lima.common.code=Code
+lima.common.confirmation=Confirmation
+lima.common.copy=Copier
+lima.common.enddate=Fin
+lima.common.entrybook=Journal
+lima.common.entrybooks=Journaux
+lima.common.error=Erreur
+lima.common.filter=Filtrer
+lima.common.fin=Termin\u00E9
+lima.common.globalexception=Global lima exception
+lima.common.label=Libell\u00E9
+lima.common.movmentedfilter=Comptes mouvement\u00E9s
+lima.common.next=Suivant
+lima.common.ok=OK
+lima.common.open=Ouvert
+lima.common.paste=Coller
+lima.common.period=P\u00E9riode
+lima.common.question=Question
+lima.common.quit=Quitter
+lima.common.remove=Supprimer
+lima.common.search=Rechercher
+lima.common.solde=Solde
+lima.common.soldecredit=Solde Cr\u00E9diteur
+lima.common.soldedebit=Solde D\u00E9biteur
+lima.common.update=Modifier
+lima.config.category.directories=R\u00E9pertoires
+lima.config.category.directories.description=R\u00E9pertoires utilis\u00E9s par Lima
+lima.config.category.other=Autre
+lima.config.category.other.description=Autre propri\u00E9t\u00E9s de configuration
+lima.config.configFileName.description=
+lima.config.currency.description=
+lima.config.decimalseparator.description=
+lima.config.host.adress=Adresse du serveur distant
+lima.config.locale.description=Locale utilis\u00E9e par l'application
+lima.config.scale.description=
+lima.config.ui.flaunchui.description=
+lima.config.ui.fullscreen.description=Plein \u00E9cran
+lima.daily=Quotidien
+lima.documents=Documents\u2026
+lima.entries=Traitement
+lima.entries.addEntry=Ajouter entr\u00E9e
+lima.entries.addTransaction=Ajouter transaction
+lima.entries.lettering=Lettrage
+lima.entries.lettering.add=Ajouter une lettre
+lima.entries.lettering.noletterselected=Erreur \: Aucune lettre s\u00E9lectionn\u00E9e.
+lima.entries.lettering.radiobutton.list=Lettres existantes
+lima.entries.lettering.radiobutton.new=Nouvelle lettre
+lima.entries.lettering.remove=Supprimer une lettre
+lima.entries.searchtransaction=Rechercher des \u00E9critures
+lima.entries.searchunbalancedtransaction=Entr\u00E9es incorrectes
+lima.entries.writetransaction=Saisir des \u00E9critures
+lima.enum.comboboxaccount.account=Compte
+lima.enum.comboboxaccount.accountlist=Liste de comptes
+lima.enum.comboboxaccount.allaccount=Tous les comptes
+lima.enum.comboboxamount.both=Les deux
+lima.enum.comboboxamount.credit=Cr\u00E9dit
+lima.enum.comboboxamount.debit=D\u00E9bit
+lima.enum.comboboxentrybook.all=Tous les journaux
+lima.enum.comboboxentrybook.select_one=Journal
+lima.enum.comboboxletter.all=Toutes les lettres
+lima.enum.comboboxletter.selectone=Lettre
+lima.enum.comboboxoperator.equal=\u00C9gal
+lima.enum.comboboxoperator.inferior=Inf\u00E9rieur
+lima.enum.comboboxoperator.inferiororequal=Inf\u00E9rieur ou \u00E9gal
+lima.enum.comboboxoperator.interval=Intervalle
+lima.enum.comboboxoperator.notequal=Diff\u00E9rent
+lima.enum.comboboxoperator.superior=Sup\u00E9rieur
+lima.enum.comboboxoperator.superiororequal=Sup\u00E9rieur ou \u00E9gal
+lima.enum.comboboxperiod.date=Date
+lima.enum.comboboxperiod.financialperiod=P\u00E9riode Financi\u00E8re
+lima.enum.comboboxperiod.fiscalperiod=Exercice
+lima.enum.comboboxperiod.period=P\u00E9riode
+lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
+lima.financialstatement.accounts=Liste de comptes au cr\u00E9dit et au d\u00E9bit
+lima.financialstatement.check=V\u00E9rification des comptes aux postes
+lima.financialstatement.creditaccounts=Liste de comptes au cr\u00E9dit
+lima.financialstatement.debitaccounts=Liste de comptes au d\u00E9bit
+lima.financialstatement.delete=Supprimer le plan BCR actuel avant d'importer
+lima.financialstatement.header.add=Ajouter une cat\u00E9gorie
+lima.financialstatement.headeramount=Calculer le total en en-tete
+lima.financialstatement.label=Libell\u00E9
+lima.financialstatement.movement.add=Ajouter un regrouprement
+lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
+lima.financialstatement.subamount=Calculer un sous-total
+lima.home.chartaccounts.create=Cr\u00E9er le plan des comptes
+lima.home.chartaccounts.modify=Modifier le plan des comptes
+lima.home.chartaccounts.nothing=Aucun compte \!
+lima.home.chartaccounts.state1_2=Le plan comptable possede
+lima.home.chartaccounts.state2_2=comptes
+lima.home.entrybooks.create=Cr\u00E9er les journaux
+lima.home.entrybooks.modify=Modifier les journaux
+lima.home.entrybooks.nothing=Aucun journal ouvert \!
+lima.home.entrybooks.state.single=Le journal est \:
+lima.home.entrybooks.state1_2.plural=Les
+lima.home.entrybooks.state2_2.plural=journaux sont \:
+lima.home.fiscalperiod.closed=exercices clotur\u00E9s
+lima.home.fiscalperiod.create=Cr\u00E9er un exercice
+lima.home.fiscalperiod.modify=Modifier les exercices
+lima.home.fiscalperiod.noopen=Aucun exercice ouvert \!
+lima.home.fiscalperiod.opened=exercices ouverts
+lima.home.transaction.balanced=transactions, toutes sont \u00E9quilibr\u00E9es
+lima.home.transaction.create=Ajouter des \u00E9critures
+lima.home.transaction.modifiy.balanced=Modifier les \u00E9critures
+lima.home.transaction.modifiy.unbalanced=Modifier les \u00E9critures incorrectes
+lima.home.transaction.nothing=Aucune \u00E9criture
+lima.home.transaction.unbalanced=transactions ne sont pas \u00E9quilibr\u00E9es \!
+lima.identity=Identit\u00E9
+lima.identity.address=Adresse
+lima.identity.address2=Adresse (suite)
+lima.identity.businessNumber=SIRET
+lima.identity.city=Ville
+lima.identity.classificationCode=Code NAF
+lima.identity.contact=Contact
+lima.identity.description=Description
+lima.identity.email=Courriel
+lima.identity.name=Nom
+lima.identity.phoneNumber=n\u00B0 Tel
+lima.identity.vatNumber=n\u00B0 TVA
+lima.identity.zipCode=Code Postal
+lima.importexport.accountcharts=Plan des comptes
+lima.importexport.all=Tout
+lima.importexport.choiceencoding=Choisir encodage \:
+lima.importexport.csv=Import/Export CSV
+lima.importexport.defaultentrybooks=Journaux par d\u00E9faut
+lima.importexport.ebp=Import/Export EBP
+lima.importexport.entries=\u00C9critures
+lima.importexport.export=Export
+lima.importexport.export.terminated=Export termin\u00E9
+lima.importexport.financialstatements=Plan BCR
+lima.importexport.import=Import
+lima.importexport.import.terminated=Import termin\u00E9
+lima.importexport.importcsv=Import CSV
+lima.importexport.importebp=Import EBP
+lima.importexport.wait=Traitement en cours \u2026
+lima.init.closed=Lima ferm\u00E9 \u00E0 %1$s
+lima.init.errorclosing=Erreur lors de la fermeture
+lima.menu.file=Fichier
+lima.menu.help=Aide
+lima.menu.help.about=\u00C0 Propos
+lima.menu.help.help=Afficher l'aide
+lima.menu.help.i18n=Langue
+lima.menu.help.i18n.fr=Fran\u00E7ais
+lima.menu.help.i18n.uk=Anglais
+lima.menu.help.site=Acc\u00E9der au site de Lima
+lima.menu.window=Fen\u00EAtre
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Adresse email de support
+lima.openejb.remotemode.description=
+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>
+lima.preferences=Pr\u00E9f\u00E9rences
+lima.refresh=\u21BB
+lima.reports=Rapports
+lima.reports.accounts=Edition compte
+lima.reports.balance=Balance
+lima.reports.entrybooks=Edition journal
+lima.reports.financialstatement=Bilan et Compte de r\u00E9sultat
+lima.reports.ledger=Grand Livre
+lima.response.no=Non
+lima.response.yes=Oui
+lima.splash.1=Chargement des services...
+lima.splash.2=Chargement de la comptabilit\u00E9
+lima.splash.3=Application pr\u00EAte \!
+lima.structure=Structure
+lima.tab.home=Accueil
+lima.table.account=Compte
+lima.table.balance=Balance
+lima.table.closure=Cloture
+lima.table.code=Code
+lima.table.credit=Cr\u00E9dit
+lima.table.date=Date
+lima.table.debit=D\u00E9bit
+lima.table.debitcredit=D\u00E9bit et Cr\u00E9dit
+lima.table.description=Description
+lima.table.entrybook=Journal
+lima.table.fiscalperiod=Exercice
+lima.table.grossamount=Brut
+lima.table.label=Libell\u00E9
+lima.table.letter=Lettre
+lima.table.move.credit=Mouvement au cr\u00E9dit
+lima.table.move.debit=Mouvement au d\u00E9bit
+lima.table.netamount=Net
+lima.table.number=Num\u00E9ro de compte
+lima.table.period=P\u00E9riode
+lima.table.provisiondeprecationamount=Amortissements et provisions
+lima.table.solde=Solde
+lima.table.solde.credit=Solde cr\u00E9dit
+lima.table.solde.debit=Solde d\u00E9bit
+lima.table.voucher=Pi\u00E8ce comptable
+lima.title=Lutin Invoice Monitoring and Accounting
+lima.title.about=\u00C0 propos de Lima...
+lima.title.about.description=Logiciel de comptabilit\u00E9 Libre
+lima.tooltip.filter=<html>Expression r\u00E9guli\u00E8re \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
+lima.tooltip.lettering=<html>Pour ajouter une lettre \u00E0 plusieurs \u00E9critures <br/>S\u00E9lectionner plusieurs lignes avec la combinaison ctrl + click</html>
+lima.warning.nimbus.landf=Le look and feel nymbus n'a pas \u00E9t\u00E9 trouv\u00E9
+limma.config.thousandseparator.description=
1
0
r3156 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod
by vsalaun@users.chorem.org 06 Jun '11
by vsalaun@users.chorem.org 06 Jun '11
06 Jun '11
Author: vsalaun
Date: 2011-06-06 11:46:38 +0200 (Mon, 06 Jun 2011)
New Revision: 3156
Url: http://chorem.org/repositories/revision/lima/3156
Log:
#345 adding trigger button, EntryBook selector
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2011-06-06 09:18:53 UTC (rev 3155)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2011-06-06 09:46:38 UTC (rev 3156)
@@ -40,9 +40,11 @@
import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
import org.chorem.lima.business.FiscalPeriodServiceMonitorable;
import org.chorem.lima.business.ImportServiceMonitorable;
+import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.utils.FiscalPeriodComparator;
+import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.service.LimaServiceFactory;
@@ -242,6 +244,33 @@
refresh();
}
}
+
+ /**
+ * Sets FiscalPeriods and call for performing adding retained earnings
+ * @param selectedRow
+ * @param entryBook
+ * @throws LimaException
+ */
+ public void addRetainedEarnings(int selectedRow, EntryBook entryBook) throws LimaException {
+
+ FiscalPeriod fiscalPeriod = getFiscalPeriodAtRow(selectedRow);
+ //check if the current fiscal period isn't block
+ if (fiscalPeriod.getLocked()) {
+ throw new LimaBusinessException("The fiscal period is blocked");
+ }
+ if (selectedRow == 0) {
+ throw new LimaBusinessException("Can't find previous fiscal period");
+ }
+
+ //check if the previous fiscal period exists, if so check if it is blocked
+ FiscalPeriod previousFiscalPeriod = getFiscalPeriodAtRow(selectedRow-1);
+ if (!previousFiscalPeriod.getLocked()) {
+ throw new LimaBusinessException("The previous fiscal period isn't blocked");
+ }
+
+ financialTransactionService.addRetainedEarnings(previousFiscalPeriod, fiscalPeriod, entryBook);
+
+ }
@Override
public void notifyMethod(String serviceName, String methodeName) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2011-06-06 09:18:53 UTC (rev 3155)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2011-06-06 09:46:38 UTC (rev 3156)
@@ -40,7 +40,7 @@
]]>
</script>
<row>
- <cell fill="both" weightx="1" weighty="1" rows="4">
+ <cell fill="both" weightx="1" weighty="1" rows="5">
<JScrollPane>
<org.chorem.lima.ui.fiscalperiod.FiscalPeriodTableModel
id="modelFiscalPeriodTable"/>
@@ -61,9 +61,15 @@
</cell>
</row>
<row>
- <cell>
+ <cell fill="horizontal">
<JButton id="blockButton" text="lima.charts.fiscalperiod.block" enabled="{isSelectedPeriod()}"
onActionPerformed="getHandler().blockFiscalPeriod()" />
</cell>
</row>
+ <row>
+ <cell fill="horizontal">
+ <JButton id="ranButton" text="lima.charts.fiscalperiod.addretainedearnings" enabled="{isSelectedPeriod()}"
+ onActionPerformed="getHandler().addRetainedEarnings()" />
+ </cell>
+ </row>
</Table>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2011-06-06 09:18:53 UTC (rev 3155)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2011-06-06 09:46:38 UTC (rev 3156)
@@ -33,6 +33,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.EntryBookImpl;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.ui.fiscalperiod.AddPeriod;
import org.chorem.lima.ui.fiscalperiod.FiscalPeriodView;
@@ -125,7 +127,42 @@
DialogHelper.showMessageDialog(eee.getMessage());
}
}
+
+ /**
+ * Checks confirmation from user
+ * Sets EntryBook to use
+ */
+ public void addRetainedEarnings() {
+ JXTable fiscalPeriodeTable = getView().getFiscalPeriodTable();
+ int selectedRow = fiscalPeriodeTable.getSelectedRow();
+ FiscalPeriodTableModel model =
+ (FiscalPeriodTableModel)getView().getFiscalPeriodTable().getModel();
+ try {
+ int response = JOptionPane.showConfirmDialog(view, _("lima.charts.fiscalperiod.addretainedearnings"),
+ _("lima.common.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+ if (response == JOptionPane.YES_OPTION) {
+ EntryBook newEntryBook = new EntryBookImpl();
+ RetainedEarningsEntryBookForm entryBookForm = new RetainedEarningsEntryBookForm(view);
+ entryBookForm.setEntryBook(newEntryBook);
+ // jaxx constructor don't call super() ?
+ entryBookForm.setLocationRelativeTo(view);
+ entryBookForm.setVisible(true);
+ // null == cancel action
+ EntryBook entryBook = entryBookForm.getEntryBook();
+ if (entryBook != null) {
+ model.addRetainedEarnings(selectedRow, entryBook);
+ }
+ }
+ } catch (LimaException eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't set net income", eee);
+ }
+ DialogHelper.showMessageDialog(eee.getMessage());
+
+ }
+ }
+
public FiscalPeriodView getView() {
return view;
}
1
0
r3155 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod
by vsalaun@users.chorem.org 06 Jun '11
by vsalaun@users.chorem.org 06 Jun '11
06 Jun '11
Author: vsalaun
Date: 2011-06-06 11:18:53 +0200 (Mon, 06 Jun 2011)
New Revision: 3155
Url: http://chorem.org/repositories/revision/lima/3155
Log:
#345 report a nouveau (formulaire entrybook)
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx 2011-06-06 09:18:53 UTC (rev 3155)
@@ -0,0 +1,120 @@
+<JDialog modal="true"
+ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}"
+ onWindowClosing="performCancel();">
+
+ <org.chorem.lima.entity.EntryBook id="entryBook" javaBean="null" />
+ <Boolean id="addState" javaBean='true'/>
+
+ <script>
+ <![CDATA[
+
+ import org.chorem.lima.ui.combobox.EntryBookComboBoxModel;
+ import org.chorem.lima.ui.combobox.EntryBookRenderer;
+ import org.chorem.lima.entity.EntryBook;
+
+ getRootPane().setDefaultButton(okButton);
+
+ /**
+ * Sets null to EntryBook and closes JDialog
+ */
+ protected void performCancel() {
+ setEntryBook(null);
+ dispose();
+ }
+
+ /**
+ * Sets the right EntryBook to use and its values
+ */
+ protected void performNew() {
+ if (selectedEntryBook.isSelected()) {
+ entryBookComboBox.setEnabled(true);
+ entryBookLabelField.setEditable(false);
+ entryBookCodeField.setEditable(false);
+ if (getEntryBookComboBox().getSelectedItem() != null) {
+ getEntryBook().setCode(((EntryBook)getEntryBookComboBox().getSelectedItem()).getCode().trim());
+ getEntryBook().setLabel(((EntryBook)getEntryBookComboBox().getSelectedItem()).getLabel().trim());
+ } else {
+ setEntryBook(null);
+ }
+ } else {
+ entryBookComboBox.setEnabled(false);
+ entryBookLabelField.setEditable(true);
+ entryBookCodeField.setEditable(true);
+ getEntryBook().setCode(getEntryBookCodeField().getText());
+ getEntryBook().setLabel(getEntryBookLabelField().getText());
+ }
+ }
+
+ void $afterCompleteSetup() {
+ performNew();
+ }
+ ]]>
+ </script>
+
+ <Table>
+ <row>
+ <cell anchor="west">
+ <JRadioButton
+ id="selectedEntryBook"
+ text="lima.common.entrybook"
+ selected="true"
+ buttonGroup="EntryBookGroup"
+ onActionPerformed="performNew()"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/>
+ </cell>
+ <cell>
+ <org.chorem.lima.ui.combobox.EntryBookComboBoxModel id="modelEntryBookComboBox"/>
+ <JComboBox id="entryBookComboBox"
+ model="{getModelEntryBookComboBox()}"
+ renderer="{new org.chorem.lima.ui.combobox.EntryBookRenderer()}"
+ editable="false"
+ onItemStateChanged="getEntryBook().setCode(((EntryBook)getEntryBookComboBox().getSelectedItem()).getCode()); getEntryBook().setLabel(((EntryBook)getEntryBookComboBox().getSelectedItem()).getLabel())"/>
+ </cell>
+ </row>
+ <row>
+ <cell anchor="west">
+ <JRadioButton
+ id="newEntryBook"
+ text="lima.home.entrybooks.create"
+ selected="false"
+ buttonGroup="EntryBookGroup"
+ onActionPerformed="performNew()"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="lima.common.code"/>
+ </cell>
+ <cell>
+ <JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/>
+ <javax.swing.text.Document javaBean="getEntryBookCodeField().getDocument()"
+ onInsertUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())'
+ onRemoveUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' />
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="lima.common.label"/>
+ </cell>
+ <cell>
+ <JTextField id="entryBookLabelField" editable='{isAddState()}' text="{getEntryBook().getLabel()}"/>
+ <javax.swing.text.Document javaBean="getEntryBookLabelField().getDocument()"
+ onInsertUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())'
+ onRemoveUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' />
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/>
+ </cell>
+ <cell>
+ <JButton id="okButton" text="lima.common.ok" onActionPerformed="dispose()"/>
+ </cell>
+
+ </row>
+ </Table>
+</JDialog>
\ No newline at end of file
1
0
r3154 - in trunk/lima-business/src/main/java/org/chorem/lima/business: ejb ejbinterface
by vsalaun@users.chorem.org 01 Jun '11
by vsalaun@users.chorem.org 01 Jun '11
01 Jun '11
Author: vsalaun
Date: 2011-06-01 12:25:17 +0200 (Wed, 01 Jun 2011)
New Revision: 3154
Url: http://chorem.org/repositories/revision/lima/3154
Log:
ajout d'une fonction pour obtenir la liste des comptes a partir d'une de ses proprietes
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java
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 2011-05-30 12:40:22 UTC (rev 3153)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2011-06-01 10:25:17 UTC (rev 3154)
@@ -208,6 +208,31 @@
}
}
+
+ /**
+ * Permer d'obtenir la liste des comptes à partir d'une de ses propriétés
+ */
+ @Override
+ public List<Account> getAllAccountByProperty(String propertyName, String value) throws LimaException {
+ List<Account> account = null;
+
+ TopiaContext transaction = null;
+ try {
+ transaction = beginTransaction();
+
+ AccountDAO accountDAO =
+ LimaCallaoDAOHelper.getAccountDAO(transaction);
+ account = accountDAO.findAllByProperty(propertyName, value);
+ }
+ catch (TopiaException ex) {
+ doCatch(transaction, ex, log);
+ }
+ finally {
+ doFinally(transaction, log);
+ }
+
+ return account;
+ }
/**
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2011-05-30 12:40:22 UTC (rev 3153)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2011-06-01 10:25:17 UTC (rev 3154)
@@ -42,6 +42,8 @@
@Remote
public interface AccountService {
+
+ List<Account> getAllAccountByProperty(String propertyName, String value) throws LimaException;
List<Account> getAllAccounts() throws LimaException;
1
0