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
January 2014
- 3 participants
- 22 discussions
r3744 - in trunk: lima-business/src/main/resources/i18n lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod
by sbavencoff@users.chorem.org 31 Jan '14
by sbavencoff@users.chorem.org 31 Jan '14
31 Jan '14
Author: sbavencoff
Date: 2014-01-31 17:41:50 +0100 (Fri, 31 Jan 2014)
New Revision: 3744
Url: http://chorem.org/projects/lima/repository/revisions/3744
Log:
refs #768 : change error message, don't create next fiscal period if already exist
Modified:
trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
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 2014-01-31 15:31:55 UTC (rev 3743)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2014-01-31 16:41:50 UTC (rev 3744)
@@ -77,7 +77,7 @@
lima-business.franceaccountingrules.accountnumbernotnumeric=Le numéro de compte n'est pas numérique \: %s
lima-business.franceaccountingrules.accountstartnumbererror=Le numéro du compte général n'est pas compris entre 1 et 8 \: %s
lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook=Les périodes financières précédentes pour ce journal doivent être bloquées avant
-lima-business.franceaccountingrules.antefiscalperiodnotblocked=La période fiscale précédente n'est pas bloquée
+lima-business.franceaccountingrules.antefiscalperiodnotblocked=Le nombre maximal d'exercices ouverts est déjà ateint
lima-business.franceaccountingrules.fiscalperiodnotempty=La période fiscale à supprimer n'est pas vide \!
lima-business.franceaccountingrules.lastFiscalPeriodCantBlocked=Impossible de clore la dernière période fiscale ouverte
lima-business.franceaccountingrules.newfiscalperiodadjoiningerror=La nouvelle période fiscale doit suivre la précédente
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 2014-01-31 15:31:55 UTC (rev 3743)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2014-01-31 16:41:50 UTC (rev 3744)
@@ -260,16 +260,25 @@
boolean retainedEarnings = false;
EntryBook entryBook = null;
- //check if the user wants to create a new fiscal year
- int answerCreate = JOptionPane.showConfirmDialog(view,
- _("lima.ui.fiscalperiod.block.newyear"),
- _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
+ // find next fiscal year
+ FiscalPeriod lastFiscalPeriod = fiscalPeriodService.getLastFiscalPeriod();
+ if (selectedFiscalPeriod.equals(lastFiscalPeriod)) {
- // create a new fiscal year
- if (answerCreate == JOptionPane.YES_OPTION) {
- addFiscalPeriod();
+ //check if the user wants to create a new fiscal year
+ int answerCreate = JOptionPane.showConfirmDialog(view,
+ _("lima.ui.fiscalperiod.block.newyear"),
+ _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ // create a new fiscal year
+ if (answerCreate == JOptionPane.YES_OPTION) {
+ addFiscalPeriod();
+ }
+ }
+
+ // if next fiscal year exist
+ if (selectedFiscalPeriod.equals(lastFiscalPeriod)) {
+
//report if they are at least one transaction to be report
if (fiscalPeriodService.isRetainedEarnings(selectedFiscalPeriod)) {
@@ -297,7 +306,7 @@
}
FiscalPeriod fiscalPeriodBlocked = fiscalPeriodService.retainedEarningsAndBlockFiscalPeriod(selectedFiscalPeriod, entryBook, retainedEarnings);
- tableModel.fireTableRowsUpdated(selectedRow, selectedRow);
+ tableModel.setValue(selectedRow, fiscalPeriodBlocked);
view.setBlockEnabled(false);
view.setDeleteEnabled(false);
1
0
r3743 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction
by sbavencoff@users.chorem.org 31 Jan '14
by sbavencoff@users.chorem.org 31 Jan '14
31 Jan '14
Author: sbavencoff
Date: 2014-01-31 16:31:55 +0100 (Fri, 31 Jan 2014)
New Revision: 3743
Url: http://chorem.org/projects/lima/repository/revisions/3743
Log:
fixes #665 : Pr?\195?\169-remplissage de la date sur la saisie d'une ?\195?\169criture
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-01-31 14:17:41 UTC (rev 3742)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-01-31 15:31:55 UTC (rev 3743)
@@ -26,7 +26,6 @@
package org.chorem.lima.ui.financialtransaction;
import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.ServiceListener;
@@ -57,7 +56,6 @@
import java.awt.event.ItemEvent;
import java.awt.event.KeyEvent;
import java.math.BigDecimal;
-import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -86,6 +84,7 @@
protected FinancialPeriodService financialPeriodService;
protected FiscalPeriodService fiscalPeriodService;
protected FinancialTransactionService financialTransactionService;
+ protected Date lastAssignDate;
public FinancialTransactionViewHandler(FinancialTransactionView view) {
this.view = view;
@@ -398,11 +397,10 @@
FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
FinancialTransaction transaction = (FinancialTransaction) clipBoard;
- FinancialPeriod financialPeriod = (FinancialPeriod) view.getFinancialPeriodComboBox().getSelectedItem();
EntryBook entryBook = (EntryBook)view.getEntryBookComboBox().getSelectedItem();
transaction.setEntryBook(entryBook);
- transaction.setTransactionDate(financialPeriod.getBeginDate());
+ transaction.setTransactionDate(getUseDate());
tableModel.addTransaction(transaction);
@@ -468,28 +466,8 @@
financialTransaction.setEntryBook(entryBook);
}
- // compute new transaction date from selected financial
- // transaction begin date
- Calendar actualCalendar = Calendar.getInstance();
- Date transactionDate = financialPeriod.getBeginDate();
- Calendar calEnd = Calendar.getInstance();
- calEnd.setTime(financialPeriod.getEndDate());
- int dayMax = calEnd.get(Calendar.DAY_OF_MONTH);
- Calendar calBegin = Calendar.getInstance();
- calBegin.setTime(financialPeriod.getBeginDate());
- int dayMin = calBegin.get(Calendar.DAY_OF_MONTH);
- int toDay = actualCalendar.get(Calendar.DAY_OF_MONTH);
-
- // FIXME echatellier 20120413 explain this code, why actualCalendar
- // is not enought ?
- if (toDay > dayMax || toDay < dayMin) {
- transactionDate = DateUtils.setDays(transactionDate, dayMax);
- } else {
- transactionDate = DateUtils.setDays(transactionDate, toDay);
- }
-
// set date to the financial transaction
- financialTransaction.setTransactionDate(transactionDate);
+ financialTransaction.setTransactionDate(getUseDate());
// create it
financialTransaction = tableModel.addTransaction(financialTransaction);
@@ -757,6 +735,9 @@
FinancialTransactionTable table = view.getFinancialTransactionTable();
FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
Entry entry = tableModel.get(e.getFirstRow());
+ FinancialTransaction financialTransaction = entry.getFinancialTransaction();
+ lastAssignDate = financialTransaction.getTransactionDate();
+
tableModel.sort();
int newRow = tableModel.indexOf(entry);
table.changeSelection(newRow, 0, false, false);
@@ -797,4 +778,19 @@
view.setAssignableInAllEntries(false);
}
}
+
+ public Date getUseDate() {
+
+ FinancialPeriod financialPeriod = (FinancialPeriod)view.getFinancialPeriodComboBox().getSelectedItem();
+ Date beginDate = financialPeriod.getBeginDate();
+ Date endDate = financialPeriod.getEndDate();
+
+ if (lastAssignDate == null
+ || lastAssignDate.before(beginDate)
+ || lastAssignDate.after(endDate) ) {
+ lastAssignDate = beginDate;
+ }
+
+ return lastAssignDate;
+ }
}
1
0
r3742 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
by sbavencoff@users.chorem.org 31 Jan '14
by sbavencoff@users.chorem.org 31 Jan '14
31 Jan '14
Author: sbavencoff
Date: 2014-01-31 15:17:41 +0100 (Fri, 31 Jan 2014)
New Revision: 3742
Url: http://chorem.org/projects/lima/repository/revisions/3742
Log:
fixes #757 : Tri des comptes dans l'?\195?\169cran pour g?\195?\169n?\195?\169rer la balance
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2014-01-17 23:31:14 UTC (rev 3741)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2014-01-31 14:17:41 UTC (rev 3742)
@@ -25,16 +25,6 @@
package org.chorem.lima.business.ejb;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.ejb.EJB;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -46,6 +36,7 @@
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.FinancialPeriodService;
import org.chorem.lima.business.api.ReportService;
+import org.chorem.lima.business.utils.AccountComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.Entry;
@@ -55,6 +46,16 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.nuiton.topia.TopiaException;
+import javax.ejb.EJB;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
@Stateless
@Remote(ReportService.class)
@TransactionAttribute
@@ -327,6 +328,9 @@
else {
accounts = accountDAO.stringToListAccounts( result, false);
}
+
+ Collections.sort(accounts, new AccountComparator());
+
for (Account account : accounts) {
ReportsDatas reportsDatas =
generateSubAccountBalance(account, beginDate,
1
0
r3741 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
by dcosse@users.chorem.org 17 Jan '14
by dcosse@users.chorem.org 17 Jan '14
17 Jan '14
Author: dcosse
Date: 2014-01-18 00:31:14 +0100 (Sat, 18 Jan 2014)
New Revision: 3741
Url: http://chorem.org/projects/lima/repository/revisions/3741
Log:
refs #966 some works on report done
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-17 23:31:14 UTC (rev 3741)
@@ -148,10 +148,9 @@
String title = list.get(0).getLabel();
int i = 0;
int n = list.size();
- int max = n;
printedType ++;
while (i < n) {
- int j = i + max;
+ int j = i + n;
if (j > n) {
j = n;
}
@@ -210,7 +209,7 @@
}
} else {
//cell1
- StringBuffer tab = new StringBuffer();
+ StringBuilder tab = new StringBuilder();
for (int k = 0; k < level; k++) {
tab.append("\t");
}
@@ -223,13 +222,13 @@
}
//cell2
String grossAmountStr = "";
- if (grossAmount != BigDecimal.ZERO) {
+ if (!grossAmount.equals(BigDecimal.ZERO)) {
grossAmountStr = grossAmount.toString();
}
//cell 3
String provisionDeprecationAmountStr = "";
- if (provisionDeprecationAmount != BigDecimal.ZERO) {
+ if (!provisionDeprecationAmount.equals(BigDecimal.ZERO)) {
provisionDeprecationAmountStr = provisionDeprecationAmount.toString();
}
@@ -237,7 +236,7 @@
BigDecimal solde = grossAmount;
solde = solde.subtract(provisionDeprecationAmount);
String soldeStr = "";
- if (solde != BigDecimal.ZERO) {
+ if (!solde.equals(BigDecimal.ZERO)) {
soldeStr = solde.toString();
}
@@ -250,7 +249,7 @@
}
}
}
- i = i + max;
+ i = i + n;
financialReport += "</table>";
}
}
@@ -546,10 +545,9 @@
//create pages
int i = 0;
int n = list.size();
- int max = n;
while (i < n) {
- int j = i + max;
+ int j = i + n;
if (j > n) {
j = n;
}
@@ -565,7 +563,7 @@
balanceReport += constructTableHeader(columnsNames);
balanceReport += "\t\t<tbody>\n";
- if (n > max) {
+ if (n > n) {
String boldBegin = "<b>";
String boldEnd = "</b>";
String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.carryback") + boldEnd,
@@ -597,7 +595,7 @@
}
}
- if (n > max && i <= n - max) {
+ if (n > n && i <= n - n) {
String boldBegin = "<b>";
String boldEnd = "</b>";
String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.carryforward") + boldEnd,
@@ -609,7 +607,7 @@
}
//final amounts
- if (i >= n - max) {
+ if (i >= n - n) {
String boldBegin = "<b>";
String boldEnd = "</b>";
String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.amounts") + boldEnd,
@@ -619,7 +617,7 @@
even = !even;
balanceReport += "</tbody></table>\n";
}
- i = i + max;
+ i = i + n;
}
balanceReport += "</body>\n</html>";
} catch (Exception ex) {
@@ -994,6 +992,10 @@
Identity identity = identityService.getIdentity();
headerTitle += "<table>" +
+ "<thead> " +
+ "<tr><th>" + title +
+ "</th></tr>" +
+ "</thead>" +
"<tr> " +
"<td>" +
"<table align=\"left\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n" +
@@ -1002,38 +1004,40 @@
String boldItalicBegin = "<b>" + "<i>";
String boldItalicEnd = "</i>" + "</b>";
- String [] columnsNameSociety = {boldItalicBegin + identity.getName()+ boldItalicEnd};
+ String [] columnsNameSociety = {boldItalicBegin + _("lima-business.document.society") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getName()) ? identity.getName() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsNameSociety);
- String [] columnsDescription = {"<i>" + identity.getDescription()+ "</i>"};
+ String [] columnsDescription = {boldItalicBegin + _("lima-business.document.description") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getDescription()) ? identity.getDescription() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsDescription);
- String [] columnsAdressOne = {"<i>" + identity.getAddress() + "</i>"};
+ String [] columnsAdressOne = {boldItalicBegin + _("lima-business.document.adress") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getAddress()) ? identity.getAddress() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsAdressOne);
- String [] columnsAdressTwo = {"<i>" + identity.getAddress2() + "</i>"};
+
+ String [] columnsAdressTwo = {boldItalicBegin + _("lima-business.document.adresssuite") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getAddress2()) ? identity.getAddress2() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsAdressTwo);
- String [] columnsZipCode = {"<i>" + identity.getZipCode() + "</i>"};
+ String [] columnsZipCode = {boldItalicBegin + _("lima-business.document.zipcode") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getZipCode()) ? identity.getZipCode() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsZipCode);
- String [] columnsCity = {"<i>" + identity.getCity()+ "</i>"};
+ String [] columnsCity = {boldItalicBegin + _("lima-business.document.city") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getCity()) ? identity.getCity() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsCity);
- headerTitle += "</table>\n" +
- "</td>" +
- "<td>" +
- "<table align=\"right\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n";
-
String [] columnsBusinessNumber = {boldItalicBegin + _("lima-business.document.businessnumber") +
- boldItalicEnd, "<i>" + identity.getBusinessNumber()+ "</i>"};
+ boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getBusinessNumber()) ? identity.getBusinessNumber() : " - ") + "</i>"};
headerTitle += constructTableLine(columnsBusinessNumber);
String [] columnsClassifCode = {boldItalicBegin + _("lima-business.document.classificationcode") +
- boldItalicEnd, "<i>" + identity.getClassificationCode()+ "</i>"};
+ boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"};
headerTitle += constructTableLine(columnsClassifCode);
String [] columnsVatNumber = {boldItalicBegin + _("lima-business.document.vatnumber") + boldItalicEnd,
- "<i>" + identity.getVatNumber()+ "</i>", };
+ "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>", };
headerTitle += constructTableLine(columnsVatNumber);
String [] columnsPeriodOne = {boldItalicBegin + _("lima-business.document.period1") + boldItalicEnd, "<i>"
1
0
r3740 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/java/org/chorem/lima/business/utils lima-business-api/src/main/java/org/chorem/lima/business/api lima-swing/src/main/java/org/chorem/lima/ui/lettering
by dcosse@users.chorem.org 17 Jan '14
by dcosse@users.chorem.org 17 Jan '14
17 Jan '14
Author: dcosse
Date: 2014-01-17 23:12:04 +0100 (Fri, 17 Jan 2014)
New Revision: 3740
Url: http://chorem.org/projects/lima/repository/revisions/3740
Log:
refactoring
Added:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java
Modified:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/LetteringComparator.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.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 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -42,8 +42,6 @@
import org.chorem.lima.business.utils.AccountComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.FiscalPeriodDAO;
import org.nuiton.topia.TopiaException;
/**
@@ -61,7 +59,7 @@
@Override
public long getAccountCount() throws LimaException {
- long result = 0;
+ long result;
try {
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
@@ -72,6 +70,7 @@
return result;
}
+
/**
* Permet de créer un nouveau compte dans le PCG de l'application.
*
@@ -85,18 +84,16 @@
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
accountingRules.createAccountRules(account);
- Account result = null;
+ Account result;
try {
// force uppercase account number
- account.setAccountNumber(account.getAccountNumber().toUpperCase());
+ account.setAccountNumber(account.getAccountNumber().toUpperCase().trim());
// check if account number already exist
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
- Account existAccount =
- accountDAO.findByAccountNumber(account.getAccountNumber());
- if (existAccount != null) {
+ if (accountDAO.existByNaturalId(account.getAccountNumber())) {
throw new LimaBusinessException(
_("lima-business.account.accountalreardyexist",
account.getAccountNumber()));
@@ -134,7 +131,7 @@
@Override
public Account getAccountByNumber(String number) throws LimaException {
- Account account = null;
+ Account account;
try {
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
account = accountDAO.findByAccountNumber(number);
@@ -169,7 +166,7 @@
@Override
public List<Account> getAllLeafAccounts() throws LimaException {
- List<Account> accountsList = null;
+ List<Account> accountsList;
try {
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
@@ -187,7 +184,7 @@
@Override
public List<Account> getAllSubAccounts(Account account)
throws LimaException {
- List<Account> accountsList = null;
+ List<Account> accountsList;
try {
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
@@ -205,7 +202,7 @@
* Si il existe une entrée comptable associée au numéro de
* compte ou a un de ses sous-compte, il est alors impossible de supprimer le compte.
*
- * @param account
+ * @param account Le compte à supprimer
* @throws LimaException
*/
@Override
@@ -242,7 +239,7 @@
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
- Account result = null;
+ Account result;
try {
// DAO
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
Added: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java (rev 0)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -0,0 +1,33 @@
+package org.chorem.lima.business.ejb;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.api.ClosedPeriodicEntryBookService;
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
+import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.nuiton.topia.TopiaException;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+
+/**
+ * Created by davidcosse on 17/01/14.
+ */
+@Stateless
+(a)Remote(ClosedPeriodicEntryBookService.class)
+@TransactionAttribute
+public class ClosedPeriodicEntryBookServiceImpl extends AbstractLimaService implements ClosedPeriodicEntryBookService {
+ @Override
+ public ClosedPeriodicEntryBook getByEntryBookAndFinancialPeriod(EntryBook entryBook, FinancialPeriod financialPeriod) {
+ ClosedPeriodicEntryBook result;
+ try {
+ ClosedPeriodicEntryBookDAO accountDAO = getDaoHelper().getClosedPeriodicEntryBookDAO();
+ result = accountDAO.findByEntryBookAndFinancialPeriod(entryBook, financialPeriod);
+ } catch (TopiaException e) {
+ throw new LimaException("Can't find closed period entry book", e);
+ }
+ return result;
+ }
+}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -77,6 +77,9 @@
import static org.nuiton.i18n.I18n._;
+/**
+ * TODO david: 17/01/14, Ce service doit être entièrement revue, !!!
+ */
@Stateless
@Remote(DocumentService.class)
@TransactionAttribute
@@ -98,21 +101,6 @@
protected String path;
- private static final Font titleFont =
- new Font(Font.HELVETICA, 14, Font.BOLD, Color.BLACK);
-
- private static final Font normalFont =
- new Font(Font.HELVETICA, 9, Font.NORMAL, Color.BLACK);
-
- private static final Font boldFont =
- new Font(Font.HELVETICA, 9, Font.BOLD, Color.BLACK);
-
- private static final Font italicFont =
- new Font(Font.HELVETICA, 9, Font.ITALIC, Color.BLACK);
-
- private static final Font bolditalicFont =
- new Font(Font.HELVETICA, 9, Font.BOLDITALIC, Color.BLACK);
-
public DocumentServiceImpl() {
path = LimaConfig.getInstance().getReportsDir().getAbsolutePath();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -62,7 +62,7 @@
public EntryBook createEntryBook(EntryBook entryBook)
throws LimaException {
- EntryBook result = null;
+ EntryBook result;
try {
// check if entrybook with is name already exist
@@ -106,7 +106,7 @@
@Override
public List<EntryBook> getAllEntryBooks() throws LimaException {
- List<EntryBook> entryBooksList = null;
+ List<EntryBook> entryBooksList;
try {
// check if entrybook with is name already exist
@@ -122,7 +122,7 @@
@Override
public EntryBook updateEntryBook(EntryBook entryBook) throws LimaException {
- EntryBook result = null;
+ EntryBook result;
try {
EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
@@ -181,7 +181,7 @@
@Override
public EntryBook getEntryBookByCode(String code) throws LimaException {
- EntryBook entryBook = null;
+ EntryBook entryBook;
try {
EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
Added: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java (rev 0)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -0,0 +1,32 @@
+package org.chorem.lima.business.ejb;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.api.EntryService;
+import org.chorem.lima.entity.Entry;
+import org.chorem.lima.entity.EntryDAO;
+import org.nuiton.topia.TopiaException;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+
+/**
+ * Created by davidcosse on 17/01/14.
+ */
+@Stateless
+(a)Remote(EntryService.class)
+@TransactionAttribute
+public class EntryServiceImpl extends AbstractLimaService implements EntryService {
+
+ @Override
+ public Entry createEntry(Entry entry) {
+
+ try {
+ EntryDAO entryDao = getDaoHelper().getEntryDAO();
+ entryDao.create(entry);
+ } catch (TopiaException e) {
+ throw new LimaException("Can't create entry", e);
+ }
+ return null;
+ }
+}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -108,7 +108,7 @@
@Override
public List<FinancialPeriod> getAllFinancialPeriods() throws LimaException {
- List<FinancialPeriod> result = null;
+ List<FinancialPeriod> result;
try {
FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
@@ -124,7 +124,7 @@
@Override
public List<FinancialPeriod> getUnblockedFinancialPeriods() throws LimaException {
- List<FinancialPeriod> result = null;
+ List<FinancialPeriod> result;
try {
FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
@@ -140,7 +140,7 @@
@Override
public List<FinancialPeriod> getFinancialPeriods(Date beginDate, Date endDate) throws LimaException {
- List<FinancialPeriod> result = null;
+ List<FinancialPeriod> result;
try {
FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
@@ -152,11 +152,25 @@
return result;
}
+ public FinancialPeriod getFinancialPeriodByNaturalIds(Date beginDate, Date endDate) throws LimaException {
+
+ FinancialPeriod result;
+
+ try {
+ FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
+ result = financialPeriodDAO.findByNaturalId(beginDate, endDate);
+ } catch (Exception ex) {
+ throw new LimaException("Can't get period", ex);
+ }
+
+ return result;
+ }
+
@Override
public ClosedPeriodicEntryBook blockClosedPeriodicEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException {
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
- ClosedPeriodicEntryBook result = null;
+ ClosedPeriodicEntryBook result;
try {
// check rules before create the account
accountingRules.blockClosedPeriodicEntryBookRules(closedPeriodicEntryBook);
@@ -181,7 +195,7 @@
@Override
public ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook,
FinancialPeriod financialPeriod) throws LimaException {
- ClosedPeriodicEntryBook closedPeriodicEntryBook = null;
+ ClosedPeriodicEntryBook closedPeriodicEntryBook;
try {
ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = getDaoHelper().getClosedPeriodicEntryBookDAO();
@@ -196,7 +210,7 @@
@Override
public List<ClosedPeriodicEntryBook> getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod() throws LimaException {
- List<ClosedPeriodicEntryBook> result = null;
+ List<ClosedPeriodicEntryBook> result;
try {
ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = getDaoHelper().getClosedPeriodicEntryBookDAO();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -136,7 +136,7 @@
@Override
public List<FinancialStatement> getAllFinancialStatements() throws LimaException {
- List<FinancialStatement> financialStatements = null;
+ List<FinancialStatement> financialStatements;
try {
FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
@@ -161,7 +161,7 @@
@Override
public List<FinancialStatement> getChildrenFinancialStatement(FinancialStatement masterFinancialStatement) throws LimaException {
- List<FinancialStatement> financialStatements = null;
+ List<FinancialStatement> financialStatements;
try {
FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
@@ -194,7 +194,7 @@
@Override
public List<FinancialStatementAmounts> financialStatementReport(Date selectedBeginDate,
Date selectedEndDate) throws LimaException {
- List<FinancialStatementAmounts> result = null;
+ List<FinancialStatementAmounts> result;
try {
@@ -347,7 +347,7 @@
}
// DEBIT & CREDIT ACCOUNTS LIST
- Amounts amounts = new AmountsImpl();
+ Amounts amounts;
String accountsString = financialStatement.getAccounts();
if (accountsString != null && !accountsString.equals("")) {
amounts = amountFromAccountList(accountsString,
@@ -498,4 +498,28 @@
}
return result.toString();
}
+
+ @Override
+ public boolean checkFinancialStatementExist(String label) throws LimaException {
+ boolean result;
+ try {
+ FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
+ result = financialStatementDAO.existByProperties(FinancialStatement.PROPERTY_LABEL, label);
+ } catch (TopiaException e) {
+ throw new LimaException("Can't check financial statement", e);
+ }
+ return result;
+ }
+
+ @Override
+ public FinancialStatement getFinancialStatementByLabel(String label) throws LimaException {
+ FinancialStatement result;
+ try {
+ FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
+ result = financialStatementDAO.findByLabel(label);
+ } catch (TopiaException e) {
+ throw new LimaException("Can't find financial statement", e);
+ }
+ return result;
+ }
}
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 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -38,11 +38,7 @@
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.api.AccountService;
-import org.chorem.lima.business.api.EntryBookService;
-import org.chorem.lima.business.api.FinancialPeriodService;
import org.chorem.lima.business.api.FinancialTransactionService;
-import org.chorem.lima.business.api.OptionsService;
-import org.chorem.lima.business.api.ReportService;
import org.chorem.lima.business.utils.LetteringComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
@@ -82,20 +78,20 @@
@TransactionAttribute
public class FinancialTransactionServiceImpl extends AbstractLimaService implements FinancialTransactionService {
- @EJB
- protected FinancialPeriodService financialPeriodService;
+// @EJB
+// protected FinancialPeriodService financialPeriodService;
- @EJB
- protected ReportService reportService;
+// @EJB
+// protected ReportService reportService;
- @EJB
- protected EntryBookService entryBookService;
+ //@EJB
+ //protected EntryBookService entryBookService;
@EJB
protected AccountService accountService;
- @EJB
- protected OptionsService optionsService;
+// @EJB
+// protected OptionsService optionsService;
protected static final Log log = LogFactory.getLog(FinancialTransactionServiceImpl.class);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -98,7 +98,7 @@
@Override
public FiscalPeriod createFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException {
- FiscalPeriod result = null;
+ FiscalPeriod result;
try {
@@ -144,7 +144,7 @@
@Override
public List<FiscalPeriod> getAllFiscalPeriods() throws LimaException {
- List<FiscalPeriod> result = null;
+ List<FiscalPeriod> result;
try {
@@ -163,7 +163,7 @@
@Override
public List<FiscalPeriod> getAllBlockedFiscalPeriods() throws LimaException {
- List<FiscalPeriod> result = null;
+ List<FiscalPeriod> result;
try {
FiscalPeriodDAO fiscalPeriodDAO = getDaoHelper().getFiscalPeriodDAO();
@@ -180,7 +180,7 @@
@Override
public List<FiscalPeriod> getAllUnblockedFiscalPeriods() throws LimaException {
- List<FiscalPeriod> result = null;
+ List<FiscalPeriod> result;
try {
@@ -195,7 +195,7 @@
@Override
public FiscalPeriod getLastFiscalPeriod() throws LimaException {
- FiscalPeriod result = null;
+ FiscalPeriod result;
try {
@@ -390,13 +390,13 @@
//holds entries of all opening transactions
FinancialTransaction beginfinancialTransaction = new FinancialTransactionImpl();
- if (found) {
- //Sets the endfinancialTransaction
- beginfinancialTransaction.setEntryBook(entryBook);
- beginfinancialTransaction.setTransactionDate(beginfinancialPeriod.getBeginDate());
- beginfinancialTransaction = financialTransactionService.createFinancialTransaction(beginfinancialTransaction);
- }
+ //Sets the endfinancialTransaction
+ beginfinancialTransaction.setEntryBook(entryBook);
+ beginfinancialTransaction.setTransactionDate(beginfinancialPeriod.getBeginDate());
+ beginfinancialTransaction = financialTransactionService.createFinancialTransaction(beginfinancialTransaction);
+
+
//Sets date for description, e.g: Report à nouveau (DATE)
Calendar calendar = Calendar.getInstance();
calendar.setTime(fiscalPeriod.getEndDate());
@@ -434,26 +434,24 @@
financialTransactionService.createEntry(beginEntry);
//open new year accounts if new year exists and a date has been found for the transaction
- if (found) {
- //give back amounts from class 1 to 5 accounts
- beginEntry = new EntryImpl();
- beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")");
- beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher"));
- beginEntry.setFinancialTransaction(beginfinancialTransaction);
- beginEntry.setAccount(report.getAccount());
- beginEntry.setAmount(report.getAmountSolde().abs());
- beginEntry.setDebit(report.getSoldeDebit());
- financialTransactionService.createEntry(beginEntry);
- //close account by removing amount from account number 890
- beginEntry = new EntryImpl();
- beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")");
- beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher"));
- beginEntry.setFinancialTransaction(beginfinancialTransaction);
- beginEntry.setAccount(endRetainedAccount);
- beginEntry.setAmount(report.getAmountSolde().abs());
- beginEntry.setDebit(!report.getSoldeDebit());
- financialTransactionService.createEntry(beginEntry);
- }
+ //give back amounts from class 1 to 5 accounts
+ beginEntry = new EntryImpl();
+ beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")");
+ beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher"));
+ beginEntry.setFinancialTransaction(beginfinancialTransaction);
+ beginEntry.setAccount(report.getAccount());
+ beginEntry.setAmount(report.getAmountSolde().abs());
+ beginEntry.setDebit(report.getSoldeDebit());
+ financialTransactionService.createEntry(beginEntry);
+ //close account by removing amount from account number 890
+ beginEntry = new EntryImpl();
+ beginEntry.setDescription(_("lima-business.financialtransaction.retainedearnings.description") + " (" + calendar.get(Calendar.YEAR) + ")");
+ beginEntry.setVoucher(_("lima-business.financialtransaction.retainedearnings.voucher"));
+ beginEntry.setFinancialTransaction(beginfinancialTransaction);
+ beginEntry.setAccount(endRetainedAccount);
+ beginEntry.setAmount(report.getAmountSolde().abs());
+ beginEntry.setDebit(!report.getSoldeDebit());
+ financialTransactionService.createEntry(beginEntry);
}
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -273,30 +273,16 @@
beginDatePicker =
DateUtils.truncate(beginDatePicker, Calendar.YEAR);
- pageContent.append("<!DOCTYPE html>\n"
- + "<html lang=\"fr\">\n"
- + "<head>\n"
- + "<title>LIMA Documents Report</title>\n"
- + "<style type=\"text/css\">"
- + "body { font: 14px sans-serif; }"
- + "h1 { font: 20px sans-serif; text-align: center; }"
- + "table.padding td {padding-right:20px;}"
- + ".tdright {text-align: right;}"
- + "</style>"
- + "</head>\n"
- + "<body>\n"
- + "<table class=\"padding\">\n"
- + "<tr><td><img src=\"?img=puzzle_icon_mini.png\"/></td>\n"
- + "<td><h1>LIMA Documents Report</h1></td></tr>\n"
- + "<tr><td class=\"tdright\"><img src=\"?img=identity.png\"/></td>\n"
- + "<td rowspan=3><form method=GET action="
- + serverAdress + ">\n"
- + _("lima-business.document.date.begin")
- + "<input value=\"" + DATEFORMAT.format(beginDatePicker)
- + "\" type=\"date\" name=\"beginDate\">\n"
- + _("lima-business.document.date.end")
- + "<input value=\"" + DATEFORMAT.format(endDatePicker)
- + "\" type=\"date\" name=\"endDate\">\n<br/><br/>");
+ pageContent.append("<!DOCTYPE html>\n" + "<html lang=\"fr\">\n" + "<head>\n" + "<title>LIMA Documents Report</title>\n" + "<style type=\"text/css\">" + "body { font: 14px sans-serif; }" + "h1 { font: 20px sans-serif; text-align: center; }" + "table.padding td {padding-right:20px;}" + ".tdright {text-align: right;}" + "</style>" + "</head>\n" + "<body>\n" + "<table class=\"padding\">\n" + "<tr><td><img src=\"?img=puzzle_icon_mini.png\"/></td>\n" + "<td><h1>LIMA Documents Report</h1></td></tr>\n" + "<tr><td class=\"tdright\"><img src=\"?img=identity.png\"/></td>\n" + "<td rowspan=3><form method=GET action=")
+ .append(serverAdress).append(">\n")
+ .append(_("lima-business.document.date.begin"))
+ .append("<input value=\"")
+ .append(DATEFORMAT.format(beginDatePicker))
+ .append("\" type=\"date\" name=\"beginDate\">\n")
+ .append(_("lima-business.document.date.end"))
+ .append("<input value=\"")
+ .append(DATEFORMAT.format(endDatePicker))
+ .append("\" type=\"date\" name=\"endDate\">\n<br/><br/>");
//+ "Format : <select name=\"format\">");
/*TODO : voir pour générer des pdf avec éventuellement iReport*/
@@ -310,9 +296,11 @@
+ */"Documents : <select name=\"model\">");
for (DocumentsEnum documentsEnum : DocumentsEnum.values()) {
- pageContent.append("<option value=\""
- + documentsEnum.getFileName() + "\">"
- + documentsEnum.getDescription() + "</option>\n");
+ pageContent.append("<option value=\"")
+ .append(documentsEnum.getFileName())
+ .append("\">")
+ .append(documentsEnum.getDescription())
+ .append("</option>\n");
}
pageContent.append("</select><input type=\"submit\">\n"
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -74,7 +74,9 @@
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.api.AccountService;
+import org.chorem.lima.business.api.ClosedPeriodicEntryBookService;
import org.chorem.lima.business.api.EntryBookService;
+import org.chorem.lima.business.api.EntryService;
import org.chorem.lima.business.api.FinancialPeriodService;
import org.chorem.lima.business.api.FinancialStatementService;
import org.chorem.lima.business.api.FinancialTransactionService;
@@ -87,31 +89,22 @@
import org.chorem.lima.business.utils.FiscalPeriodComparator;
import org.chorem.lima.business.utils.ImportExportEntityEnum;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.AccountImpl;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
-import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.EntryBookDAO;
import org.chorem.lima.entity.EntryBookImpl;
-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.FinancialStatement;
-import org.chorem.lima.entity.FinancialStatementDAO;
import org.chorem.lima.entity.FinancialStatementImpl;
import org.chorem.lima.entity.FinancialTransaction;
-import org.chorem.lima.entity.FinancialTransactionDAO;
import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.FiscalPeriodDAO;
import org.chorem.lima.entity.FiscalPeriodImpl;
import org.chorem.lima.entity.Identity;
import org.chorem.lima.entity.IdentityImpl;
import org.chorem.lima.entity.VatStatement;
-import org.chorem.lima.entity.VatStatementDAO;
import org.chorem.lima.entity.VatStatementImpl;
import org.nuiton.topia.TopiaException;
@@ -156,6 +149,12 @@
@EJB
private IdentityService identityService;
+ @EJB
+ private ClosedPeriodicEntryBookService closedPeriodicEntryBookService;
+
+ @EJB
+ private EntryService entryService;
+
private static final SimpleDateFormat SDATEFORMAT = new SimpleDateFormat(
"dd,MM,yyyy HH:mm:ss");
@@ -202,10 +201,6 @@
List<EntryEBPImpl> list = csv.parse(strat, csvReader);
Collections.sort(list, new EntryEBPComparator());
- // DAOs
- AccountDAO accountDAO = getDaoHelper().getAccountDAO();
- EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
-
// Get all the valid fiscalPeriods Ordered by date.
List<FiscalPeriod> fiscalPeriods = fiscalPeriodService
.getAllUnblockedFiscalPeriods();
@@ -236,8 +231,7 @@
dateEcr = epbDateFormat.parse(entryEBP.getDatEcr());
// account loading
- account = accountDAO.findByAccountNumber(entryEBP
- .getCompte());
+ account = accountService.getAccountByNumber(entryEBP.getCompte());
// if entry date have fiscalperiod open
if (dateEcr.compareTo(fiscalPeriods.get(0).getBeginDate()) < 0
@@ -287,7 +281,7 @@
entryBookCode = entryEBP.getJournal();
// entryBook loading
- entryBook = entryBookDAO.findByCode(entryBookCode);
+ entryBook = entryBookService.getEntryBookByCode(entryBookCode);
// if entrybook not exist create it !
if (entryBook == null) {
@@ -372,21 +366,15 @@
CsvToBean<AccountEBPImpl> csv = new CsvToBean<AccountEBPImpl>();
List<AccountEBPImpl> list = csv.parse(strat, csvReader);
- AccountDAO accountDAO = getDaoHelper().getAccountDAO();
for (AccountEBP accountEBP : list) {
String accountNumber = accountEBP.getNumero();
- if (accountDAO.findByAccountNumber(accountNumber) != null) {
- result.append(_("lima-business.import.accountalreadyexist",
- accountNumber));
- } else {
- String label = accountEBP.getIntitule();
- Account account = new AccountImpl();
- account.setAccountNumber(accountNumber);
- account.setLabel(label);
- accountService.createAccount(account);
- result.append(_("lima-business.import.accountadded",
- accountNumber, label));
- }
+ String label = accountEBP.getIntitule();
+ Account account = new AccountImpl();
+ account.setAccountNumber(accountNumber);
+ account.setLabel(label);
+ accountService.createAccount(account);
+ result.append(_("lima-business.import.accountadded",
+ accountNumber, label));
}
if (log.isInfoEnabled()) {
@@ -744,10 +732,9 @@
StringBuilder result = new StringBuilder();
- AccountDAO accountDAO = getDaoHelper().getAccountDAO();
String accountNumber = nextLine[1];
// if not exists, create it
- if (accountDAO.findByAccountNumber(accountNumber) == null) {
+ if (accountService.getAccountByNumber(accountNumber) == null) {
Account account = new AccountImpl();
account.setAccountNumber(accountNumber);
@@ -758,7 +745,7 @@
account.setThirdParty(thirdParty);
}
- accountDAO.create(account);
+ accountService.createAccount(account);
result.append(_("lima-business.import.accountadded",
account.getAccountNumber(),
account.getLabel()));
@@ -784,8 +771,6 @@
throws ParseException, TopiaException {
StringBuilder result = new StringBuilder();
- FiscalPeriodDAO fiscalPeriodDAO = getDaoHelper().getFiscalPeriodDAO();
-
FiscalPeriod fiscalPeriod = new FiscalPeriodImpl();
Date beginDate = SDATEFORMAT.parse(nextLine[1]);
fiscalPeriod.setBeginDate(beginDate);
@@ -794,7 +779,7 @@
fiscalPeriod.setLocked(Boolean.parseBoolean(nextLine[3]));
// if not exist, skip
- if (fiscalPeriodDAO.findByNaturalId(beginDate, endDate) == null) {
+ if (financialPeriodService.getFinancialPeriods(beginDate, endDate) == null) {
fiscalPeriods.add(fiscalPeriod);
} else {
result.append(_("lima-business.import.fiscalperiodalreadyexist", beginDate, endDate));
@@ -814,14 +799,12 @@
protected String importEntryBooksChartCSV(String[] nextLine) throws TopiaException, LimaException {
StringBuilder result = new StringBuilder();
- EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
-
EntryBook entryBook = new EntryBookImpl();
entryBook.setCode(nextLine[1]);
entryBook.setLabel(nextLine[2]);
// if exist, skip
- if (entryBookDAO.findByCode(entryBook.getCode()) != null) {
+ if (entryBookService.getEntryBookByCode(entryBook.getCode()) != null) {
result.append(_("lima-business.import.entrybookalreadyexist", entryBook.getLabel()));
} else {
// create it
@@ -886,10 +869,8 @@
String masterFinancialStatement = nextLine[9];
String financialStatementWay = nextLine[10];
- FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
-
// if exist, skip
- if (financialStatementDAO.findByLabel(label) == null) {
+ if (!financialStatementService.checkFinancialStatementExist(label)) {
// create it
FinancialStatementImport financialStatementImport = new FinancialStatementImportImpl();
financialStatementImport.setLabel(label);
@@ -942,10 +923,8 @@
String accounts = nextLine[4];
String masterVatStatement = nextLine[5];
- VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
-
// if exist, skip
- if (vatStatementDAO.findByLabel(label) == null) {
+ if (!vatStatementService.checkVatStatementExist(label)) {
// create it
VatStatementImport vatStatementImport = new VatStatementImportImpl();
vatStatementImport.setLabel(label);
@@ -1032,8 +1011,6 @@
protected String createFinancialStatements(Map<String, List<FinancialStatementImport>> financialStatements) throws LimaException, TopiaException {
StringBuilder result = new StringBuilder();
- FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
-
while (financialStatements.size() > 0) {
for (Iterator<List<FinancialStatementImport>> itr = financialStatements
.values().iterator(); itr.hasNext(); ) {
@@ -1045,8 +1022,7 @@
itr2.next();
String masterFinancialStatementLabel = financialStatementImport
.getMasterFinancialStatement();
- FinancialStatement masterFinancialStatement = financialStatementDAO
- .findByLabel(masterFinancialStatementLabel);
+ FinancialStatement masterFinancialStatement = financialStatementService.getFinancialStatementByLabel(masterFinancialStatementLabel);
if (masterFinancialStatementLabel.equals("")
|| masterFinancialStatement != null) {
@@ -1116,8 +1092,6 @@
StringBuilder result = new StringBuilder();
- VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
-
while (vatStatements.size() > 0) {
for (Iterator<List<VatStatementImport>> itr = vatStatements
.values().iterator(); itr.hasNext(); ) {
@@ -1129,8 +1103,7 @@
itr2.next();
String masterVatStatementLabel = vatStatementImport
.getMasterVatStatement();
- VatStatement masterVatStatement = vatStatementDAO
- .findByLabel(masterVatStatementLabel);
+ VatStatement masterVatStatement = vatStatementService.findVatStatementByLabel(masterVatStatementLabel);
if (masterVatStatementLabel.equals("")
|| masterVatStatement != null) {
@@ -1198,9 +1171,6 @@
List<ClosedPeriodicEntryBookImport> closedPeriodicEntryBooks) throws LimaException, ParseException, TopiaException {
StringBuilder result = new StringBuilder();
- FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
- EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
- ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = getDaoHelper().getClosedPeriodicEntryBookDAO();
for (ClosedPeriodicEntryBookImport closedPeriodicEntryBookImport : closedPeriodicEntryBooks) {
// update closedPeriodicEntryBook
Date beginDateFinancialPeriod = SDATEFORMAT
@@ -1209,15 +1179,13 @@
Date endDateFinancialPeriod = SDATEFORMAT
.parse(closedPeriodicEntryBookImport
.getEndDateFinancialPeriod());
- FinancialPeriod financialPeriod = financialPeriodDAO
- .findByNaturalId(beginDateFinancialPeriod,
- endDateFinancialPeriod);
+ FinancialPeriod financialPeriod = financialPeriodService.getFinancialPeriodByNaturalIds(beginDateFinancialPeriod, endDateFinancialPeriod);
+
String codeEntryBook = closedPeriodicEntryBookImport
.getCodeEntryBook();
- EntryBook entryBook = entryBookDAO.findByCode(codeEntryBook);
- ClosedPeriodicEntryBook closedPeriodicEntryBook = closedPeriodicEntryBookDAO
- .findByEntryBookAndFinancialPeriod(entryBook,
- financialPeriod);
+ EntryBook entryBook = entryBookService.getEntryBookByCode(codeEntryBook);
+ ClosedPeriodicEntryBook closedPeriodicEntryBook = closedPeriodicEntryBookService.getByEntryBookAndFinancialPeriod(entryBook,
+ financialPeriod);
try {
financialPeriodService
.blockClosedPeriodicEntryBook(closedPeriodicEntryBook);
@@ -1242,11 +1210,6 @@
Map<Integer, List<EntryImport>> entries)
throws LimaException, ParseException, TopiaException {
- EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
- EntryDAO entryDAO = getDaoHelper().getEntryDAO();
- FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO();
- AccountDAO accountDAO = getDaoHelper().getAccountDAO();
-
for (Map.Entry<Integer, FinancialTransactionImport> map : financialTransactions
.entrySet()) {
FinancialTransactionImport financialTransactionImport = map
@@ -1257,18 +1220,16 @@
financialTransaction
.setTransactionDate(dateFinancialTransaction);
- EntryBook entryBook = entryBookDAO
- .findByCode(financialTransactionImport
- .getCodeEntryBook());
+ EntryBook entryBook = entryBookService.getEntryBookByCode(financialTransactionImport
+ .getCodeEntryBook());
financialTransaction.setEntryBook(entryBook);
- financialTransactionDAO.create(financialTransaction);
+ financialTransactionService.createFinancialTransaction(financialTransaction);
List<EntryImport> entryImports = entries.get(map.getKey());
for (EntryImport entryImport : entryImports) {
Entry entry = new EntryImpl();
- Account account = accountDAO
- .findByAccountNumber(entryImport.getAccount());
+ Account account = accountService.getAccountByNumber(entryImport.getAccount());
entry.setAccount(account);
entry.setDescription(entryImport.getDescription());
entry.setAmount(new BigDecimal(entryImport.getAmount()));
@@ -1279,7 +1240,7 @@
entry.setDetail(entryImport.getDetail());
entry.setVoucher(entryImport.getVoucher());
entry.setPosition(entryImport.getPosition());
- entryDAO.create(entry);
+ entryService.createEntry(entry);
financialTransaction.addEntry(entry);
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -80,7 +80,7 @@
@Override
public ReportsDatas generateAccountsReports(Account account, Boolean thirdPartAccountsMode,
Date beginDate, Date endDate) throws LimaException {
- ReportsDatas reportsDatas = new ReportsDatasImpl();
+ ReportsDatas reportsDatas;
try {
BigDecimal credit = new BigDecimal(0);
@@ -337,8 +337,8 @@
amount = new BigDecimal(0);
}
if (movementedFilter) {
- if (reportsDatas.getAmountCredit() != BigDecimal.ZERO
- || reportsDatas.getAmountDebit() != BigDecimal.ZERO) {
+ if (!reportsDatas.getAmountCredit().equals(BigDecimal.ZERO)
+ || !reportsDatas.getAmountDebit().equals(BigDecimal.ZERO)) {
// add balance sheet to balance trial
balanceTrial.addReportsDatas(reportsDatas);
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -90,7 +90,7 @@
@Override
public List<VatStatement> getAllVatStatements() throws LimaException {
- List<VatStatement> vatStatements = null;
+ List<VatStatement> vatStatements;
try {
VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
vatStatements = vatStatementDAO.findAll();
@@ -118,7 +118,7 @@
@Override
public List<VatStatement> getChildrenVatStatement(VatStatement masterVatStatement) throws LimaException {
- List<VatStatement> vatStatements = null;
+ List<VatStatement> vatStatements;
try {
VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
@@ -251,9 +251,9 @@
}
@Override
- public VatStatement findVatStatementByString(String label) throws LimaException {
+ public VatStatement findVatStatementByLabel(String label) throws LimaException {
- VatStatement vatStatement = null;
+ VatStatement vatStatement;
try {
@@ -280,7 +280,7 @@
/**
* Créé la liste de postes contenant les calculs de comptes
*
- * @throws TopiaException
+ * @throws LimaException
*/
public VatStatementDatas vatStatementReport(VatStatement vatStatement,
Date selectedBeginDate,
@@ -378,6 +378,18 @@
}
@Override
+ public boolean checkVatStatementExist(String label) throws LimaException {
+ boolean result;
+ try {
+ VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
+ result = vatStatementDAO.existByProperties(VatStatement.PROPERTY_LABEL, label);
+ } catch (TopiaException e) {
+ throw new LimaException("Can't check VAT statement", e);
+ }
+ return result;
+ }
+
+ @Override
public void removeAllVatStatement() throws LimaException {
for (VatStatement vatStatement : getChildrenVatStatement(null)) {
removeVatStatement(vatStatement);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/LetteringComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/LetteringComparator.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/LetteringComparator.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -35,7 +35,7 @@
int lengthFirstString = firstString.length();
int lengthSecondString = secondString.length();
- int result = 0;
+ int result;
if (lengthFirstString < lengthSecondString) {
result = -1;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -27,6 +27,7 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
+import org.nuiton.topia.TopiaException;
import java.util.List;
Added: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -0,0 +1,13 @@
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+
+/**
+ * Created by davidcosse on 17/01/14.
+ */
+public interface ClosedPeriodicEntryBookService {
+
+ ClosedPeriodicEntryBook getByEntryBookAndFinancialPeriod(EntryBook entryBook, FinancialPeriod financialPeriod);
+}
Added: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -0,0 +1,11 @@
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.entity.Entry;
+
+/**
+ * Created by davidcosse on 17/01/14.
+ */
+public interface EntryService {
+
+ Entry createEntry(Entry entry);
+}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -61,4 +61,6 @@
List<FinancialPeriod> getFinancialPeriods(Date beginDate,
Date endDate) throws LimaException;
+
+ FinancialPeriod getFinancialPeriodByNaturalIds(Date beginDate, Date endDate) throws LimaException;
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -56,4 +56,13 @@
String checkFinancialStatementChart() throws LimaException;
+ /**
+ * Check if Financial Statement exist according the label given as parameter.
+ * @param label the Financial Statement's label
+ * @return true if a statement with same label exist otherwise false.
+ * @throws LimaException
+ */
+ boolean checkFinancialStatementExist(String label) throws LimaException;
+
+ FinancialStatement getFinancialStatementByLabel(String label) throws LimaException;
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -49,7 +49,7 @@
Date selectedBeginDate,
Date selectedEndDate) throws LimaException;
- VatStatement findVatStatementByString(String label) throws LimaException;
+ VatStatement findVatStatementByLabel(String label) throws LimaException;
List<VatStatementAmounts> vatStatementReport(Date beginDate,
Date endDate) throws LimaException;
@@ -58,5 +58,13 @@
void removeVatStatement(VatStatement vatStatement) throws LimaException;
+ /**
+ * Check if VAT Statement exist according the label given as parameter.
+ * @param label the VAT Statement's label
+ * @return true if a VAT statement with same label exist otherwise false.
+ * @throws LimaException
+ */
+ boolean checkVatStatementExist(String label) throws LimaException;
+
}
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java 2014-01-17 15:05:17 UTC (rev 3739)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java 2014-01-17 22:12:04 UTC (rev 3740)
@@ -3,8 +3,8 @@
/*
* #%L
* Lima :: Swing
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2008 - 2013 CodeLutin
* %%
1
0
r3739 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/common
by sbavencoff@users.chorem.org 17 Jan '14
by sbavencoff@users.chorem.org 17 Jan '14
17 Jan '14
Author: sbavencoff
Date: 2014-01-17 16:05:17 +0100 (Fri, 17 Jan 2014)
New Revision: 3739
Url: http://chorem.org/projects/lima/repository/revisions/3739
Log:
fixes #972 : remove limit label for account selection
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountListRenderer.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountListRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountListRenderer.java 2014-01-17 00:02:30 UTC (rev 3738)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountListRenderer.java 2014-01-17 15:05:17 UTC (rev 3739)
@@ -52,10 +52,6 @@
if (value != null) {
Account account = (Account) value;
String accountLabel = account.getLabel();
- int nbChars = 30;
- if (accountLabel != null && accountLabel.length() > nbChars) {
- accountLabel = accountLabel.substring(0, nbChars) + "…";
- }
label.setText(account.getAccountNumber() + " - " + accountLabel);
}
return this;
1
0
r3738 - in trunk/lima-business/src/main: java/org/chorem/lima/business/ejb resources/i18n
by dcosse@users.chorem.org 17 Jan '14
by dcosse@users.chorem.org 17 Jan '14
17 Jan '14
Author: dcosse
Date: 2014-01-17 01:02:30 +0100 (Fri, 17 Jan 2014)
New Revision: 3738
Url: http://chorem.org/projects/lima/repository/revisions/3738
Log:
refs #429 must be fix but need deeper test
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.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/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-06 16:50:14 UTC (rev 3737)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-17 00:02:30 UTC (rev 3738)
@@ -555,8 +555,6 @@
BigDecimal currentSoldeDebit = new BigDecimal(0);
BigDecimal currentSoldeCredit = new BigDecimal(0);
- Identity identity = identityService.getIdentity();
-
//create pages
int i = 0;
int n = list.size();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2014-01-06 16:50:14 UTC (rev 3737)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2014-01-17 00:02:30 UTC (rev 3738)
@@ -56,6 +56,7 @@
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
+import java.io.IOException;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.List;
@@ -77,81 +78,111 @@
private static final SimpleDateFormat SDATEFORMAT =
new SimpleDateFormat("dd,MM,yyyy HH:mm:ss");
+ protected final String DATE_PATTERN = "dd/MM/yyyy";
+
//############## EXPORT EBP
/**
* Export entries to EBP
- * Struturce example : 1,010101,VE,411ART,, "Ventes d’ordinateur ", "123 ",12548.95,D,010301,
- * Can't use opencsv for create export because don't support "" for just some columns
+ * Structure example : DatEcr,Journal,Compte,Libelle,Piece,Debit,Credit,Lettre
+ * 01/01/2013,AN,101,Capital,1,0,100000.00,C
*/
@Override
public String exportEntriesAsEBP() throws LimaException {
- SimpleDateFormat epbDateFormat = new SimpleDateFormat("ddMMyyyy");
- StringBuilder result = new StringBuilder();
- int num = 0;
+ SimpleDateFormat epbDateFormat = new SimpleDateFormat(DATE_PATTERN);
+ StringWriter out = new StringWriter();
+ CSVWriter csvWriter = null;
try {
+ csvWriter = new CSVWriter(out,
+ CSVWriter.DEFAULT_SEPARATOR,
+ CSVWriter.NO_QUOTE_CHARACTER);
//export entries
FinancialTransactionDAO financialTransactionDAO =
getDaoHelper().getFinancialTransactionDAO();
List<FinancialTransaction> listFinancialTransaction =
financialTransactionDAO.findAll();
+
+ String[] nextLine = new String[8];
+
+ // Add the header line
+ if (!listFinancialTransaction.isEmpty()) {
+ nextLine[0] = "DatEcr";
+ nextLine[1] = "Journal";
+ nextLine[2] = "Compte";
+ nextLine[3] = "Libelle";
+ nextLine[4] = "Piece";
+ nextLine[5] = "Debit";
+ nextLine[6] = "Credit";
+ nextLine[7] = "Lettre";
+ // Ajoute la ligne au fichier
+ csvWriter.writeNext(nextLine);
+ }
+
+ String date, debitcredit, debit, credit, entrybookCode, accountNumber;
+ EntryBook entryBook;
+ Account account;
+
// For all financialTransaction
for (FinancialTransaction financialTransaction : listFinancialTransaction) {
- String date = epbDateFormat.format(financialTransaction.getTransactionDate());
- String entrybookCode = "";
- EntryBook entryBook = financialTransaction.getEntryBook();
+ date = epbDateFormat.format(financialTransaction.getTransactionDate());
+ entryBook = financialTransaction.getEntryBook();
+
if (entryBook != null) {
entrybookCode = entryBook.getCode();
+ } else {
+ entrybookCode = "";
}
- String[] nextLine = new String[11];
for (Entry entry : financialTransaction.getEntry()) {
- num++;
- Account account = entry.getAccount();
+ account = entry.getAccount();
- String accountNumber = "";
if (account != null) {
accountNumber = entry.getAccount().getAccountNumber();
+ } else {
+ accountNumber = "";
}
- String debitcredit = "";
+ debit = "0";
+ credit = "0";
if (entry.getDebit()) {
debitcredit = "D";
+ debit = entry.getAmount().toString();
} else {
debitcredit = "C";
+ credit = entry.getAmount().toString();
}
- nextLine[0] = String.valueOf(num);
- nextLine[1] = date;
- nextLine[2] = entrybookCode;
- nextLine[3] = accountNumber;
- nextLine[5] = '"' + entry.getDescription() + '"';
- nextLine[6] = '"' + entry.getVoucher() + '"';
- nextLine[7] = entry.getAmount().toString();
- nextLine[8] = debitcredit;
+ nextLine[0] = date;
+ nextLine[1] = entrybookCode;
+ nextLine[2] = accountNumber;
+ nextLine[3] = entry.getDescription();
+ nextLine[4] = entry.getVoucher();
+ nextLine[5] = debit;
+ nextLine[6] = credit;
+ nextLine[7] = debitcredit;
// Ajoute la ligne au fichier
- for (int i = 0; i < 9; i++) {
- String string = "";
- String nextln = nextLine[i];
- if (nextln != null) {
- string = nextln;
- }
- if (i == 8) {
- result.append(string).append("\r\n");
- } else {
- result.append(string).append(",");
- }
- }
+ csvWriter.writeNext(nextLine);
}
}
+ // Write cache in string
+ csvWriter.flush();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
- return result.toString();
+ return out.getBuffer().toString();
}
/**
@@ -162,7 +193,7 @@
@Override
public String exportAccountsAsEBP() throws LimaException {
StringWriter out = new StringWriter();
- CSVWriter csvWriter;
+ CSVWriter csvWriter = null;
try {
csvWriter = new CSVWriter(out,
@@ -185,6 +216,15 @@
csvWriter.close();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
return out.getBuffer().toString();
}
@@ -196,7 +236,7 @@
@Override
public String exportAsCSV() throws LimaException {
StringWriter out = new StringWriter();
- CSVWriter csvWriter;
+ CSVWriter csvWriter = null;
try {
csvWriter = new CSVWriter(out, ';');
@@ -209,9 +249,17 @@
exportIdentityAsCSV(csvWriter);
// Write cache in string
csvWriter.flush();
- csvWriter.close();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
return out.getBuffer().toString();
}
@@ -222,16 +270,24 @@
public String exportFinancialStatementChartAsCSV() throws LimaException {
StringWriter out = new StringWriter();
- CSVWriter csvWriter;
+ CSVWriter csvWriter = null;
try {
csvWriter = new CSVWriter(out, ';');
exportFinancialStatementChartAsCSV(csvWriter);
// Write cache in file
csvWriter.flush();
- csvWriter.close();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
return out.getBuffer().toString();
}
@@ -298,16 +354,24 @@
public String exportVatStatementChartAsCSV() throws LimaException {
StringWriter out = new StringWriter();
- CSVWriter csvWriter;
+ CSVWriter csvWriter = null;
try {
csvWriter = new CSVWriter(out, ';');
exportVatStatementChartAsCSV(csvWriter);
// Write cache in file
csvWriter.flush();
- csvWriter.close();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
return out.getBuffer().toString();
@@ -360,16 +424,24 @@
public String exportEntryBookChartAsCSV() throws LimaException {
StringWriter out = new StringWriter();
- CSVWriter csvWriter;
+ CSVWriter csvWriter = null;
try {
csvWriter = new CSVWriter(out, ';');
exportEntryBookChartAsCSV(csvWriter);
// Write cache in file
csvWriter.flush();
- csvWriter.close();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
return out.getBuffer().toString();
}
@@ -406,16 +478,24 @@
@Override
public String exportAccountsChartAsCSV() throws LimaException {
StringWriter out = new StringWriter();
- CSVWriter csvWriter;
+ CSVWriter csvWriter = null;
try {
csvWriter = new CSVWriter(out, ';');
exportAccountsChartAsCSV(csvWriter);
// Write cache in file
csvWriter.flush();
- csvWriter.close();
} catch (Exception ex) {
throw new LimaException("Can't export", ex);
+ } finally {
+ if (csvWriter != null) {
+ try {
+ csvWriter.close();
+ out.close();
+ } catch (IOException e) {
+ // nothing to do
+ }
+ }
}
return out.getBuffer().toString();
}
@@ -539,7 +619,6 @@
* Structure : TYPE | Locked | FinancialPeriod beginDate | FinancialPeriod endDate | EntryBook Code
*
* @param csvWriter
- * @param topiaContext
* @throws LimaException
*/
public void exportClosedPeriodicEntryBooksAsCSV(CSVWriter csvWriter) throws LimaException {
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 2014-01-06 16:50:14 UTC (rev 3737)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2014-01-17 00:02:30 UTC (rev 3738)
@@ -102,7 +102,7 @@
@Override
public FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction)
throws LimaException {
- FinancialTransaction fTransaction = null;
+ FinancialTransaction fTransaction;
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
try {
@@ -125,7 +125,7 @@
@Override
public List<FinancialTransaction> getAllFinancialTransactions(
Date beginDate, Date endDate) throws LimaException {
- List<FinancialTransaction> financialTransactions = null;
+ List<FinancialTransaction> financialTransactions;
try {
FinancialTransactionDAO transactionDAO = getDaoHelper().getFinancialTransactionDAO();
@@ -142,7 +142,7 @@
@Override
public String getNextLetters() throws LimaException {
String lastActualLetters;
- String nextLetters = "";
+ String nextLetters;
try {
EntryDAO entryDAO = getDaoHelper().getEntryDAO();
@@ -161,7 +161,7 @@
public static String lettersAfter(String letters) {
- String letterAfter = null;
+ String letterAfter;
/* "" -> "A" */
if (StringUtils.isEmpty(letters)) {
@@ -349,7 +349,7 @@
@Override
public List<FinancialTransaction> getAllFinancialTransactions(
FiscalPeriod period) throws LimaException {
- List<FinancialTransaction> financialTransactions = null;
+ List<FinancialTransaction> financialTransactions;
try {
FinancialTransactionDAO transactionDAO = getDaoHelper().getFinancialTransactionDAO();
@@ -366,7 +366,7 @@
@Override
public List<FinancialTransaction> getAllFinancialTransactions(FinancialPeriod financialPeriod, EntryBook entryBook) throws LimaException {
- List<FinancialTransaction> financialTransactions = null;
+ List<FinancialTransaction> financialTransactions;
try {
FinancialTransactionDAO transactionDAO = getDaoHelper().getFinancialTransactionDAO();
@@ -391,7 +391,7 @@
@Override
public List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException {
- List<FinancialTransaction> result = null;
+ List<FinancialTransaction> result;
//List<FinancialTransaction> checkedResult = new ArrayList<FinancialTransaction>();
try {
@@ -418,15 +418,15 @@
}
/**
- * Get balanced financialtransaction from selected fiscalperiod
+ * Get balanced financial transaction from selected fiscal period
*
- * @param fiscalPeriod
- * @return
+ * @param fiscalPeriod The fiscal period for financial transaction
+ * @return the balanced financial transaction
* @throws LimaException
*/
@Override
public List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod) throws LimaException {
- List<FinancialTransaction> result = null;
+ List<FinancialTransaction> result;
try {
FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO();
@@ -489,11 +489,8 @@
accountingRules.updateFinancialTransactionDateRules(financialTransaction, financialTransactionOld);
- Date financialTransactionOldDate = financialTransactionOld.getTransactionDate();
- Date financialTransactionDate = financialTransaction.getTransactionDate();
-
financialTransactionOld.setEntryBook(financialTransaction.getEntryBook());
- financialTransactionOld.setTransactionDate(financialTransactionDate);
+ financialTransactionOld.setTransactionDate(financialTransaction.getTransactionDate());
transactionDAO.update(financialTransactionOld);
} catch (TopiaException ex) {
@@ -527,7 +524,7 @@
public Entry createEntry(Entry entry) throws LimaException {
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
- Entry newEntry = null;
+ Entry newEntry;
try {
//check if the financial period is blocked
accountingRules.checkFinancialPeriodBlockedWithFinancialTransaction(
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-01-06 16:50:14 UTC (rev 3737)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-01-17 00:02:30 UTC (rev 3738)
@@ -82,7 +82,6 @@
import org.chorem.lima.business.api.IdentityService;
import org.chorem.lima.business.api.ImportService;
import org.chorem.lima.business.api.VatStatementService;
-import org.chorem.lima.business.utils.AccountEBPComparator;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.EntryEBPComparator;
import org.chorem.lima.business.utils.FiscalPeriodComparator;
@@ -131,6 +130,8 @@
private static final Log log = LogFactory.getLog(ImportServiceImpl.class);
+ protected final String DATE_PATTERN = "dd/MM/yyyy";
+
@EJB
private AccountService accountService;
@@ -163,13 +164,19 @@
@Override
public String importEntriesFromEbp(String datas) throws LimaException {
+ if (datas.isEmpty()) {
+ throw new LimaBusinessException(_("lima-business.import.ebpnoentry"));
+ }
+
+ // use for logs
long before = System.currentTimeMillis();
- SimpleDateFormat epbDateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ SimpleDateFormat epbDateFormat = new SimpleDateFormat(DATE_PATTERN);
StringBuilder result = new StringBuilder();
+ CSVReader csvReader = null;
try {
- CSVReader csvReader = new CSVReader(new StringReader(datas));
+ csvReader = new CSVReader(new StringReader(datas));
ColumnPositionMappingStrategy<EntryEBPImpl> strat = new ColumnPositionMappingStrategy<EntryEBPImpl>();
strat.setType(EntryEBPImpl.class);
// read header to set strategy mapping
@@ -177,20 +184,20 @@
// check if file have a good header
List<String> headEntry = new ArrayList<String>();
+ headEntry.add("DatEcr");
headEntry.add("Journal");
headEntry.add("Compte");
- headEntry.add("DatEcr");
+ headEntry.add("Libelle");
headEntry.add("Piece");
- headEntry.add("Libelle");
headEntry.add("Debit");
headEntry.add("Credit");
headEntry.add("Lettre");
- if (!Arrays.asList(strat.getColumnMapping()).containsAll(
- headEntry)) {
+ if (!Arrays.asList(strat.getColumnMapping()).containsAll(headEntry)) {
throw new LimaBusinessException(
- _("lima-business.import.ebpnoentry"));
+ _("lima-business.import.ebpnoheader"));
}
+ // Sorts the list according to the entry date
CsvToBean<EntryEBPImpl> csv = new CsvToBean<EntryEBPImpl>();
List<EntryEBPImpl> list = csv.parse(strat, csvReader);
Collections.sort(list, new EntryEBPComparator());
@@ -198,92 +205,143 @@
// DAOs
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
- List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllUnblockedFiscalPeriods();
+
+ // Get all the valid fiscalPeriods Ordered by date.
+ List<FiscalPeriod> fiscalPeriods = fiscalPeriodService
+ .getAllUnblockedFiscalPeriods();
Collections.sort(fiscalPeriods, new FiscalPeriodComparator());
+
+ // There are no valid fiscalPeriods -> exception
int nbFiscalPeriods = fiscalPeriods.size();
- FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
-
if (nbFiscalPeriods == 0) {
throw new LimaBusinessException(
_("lima-business.import.nofiscalperiodopen"));
}
+ // attributes declaration
FinancialTransaction financialTransaction = null;
+ Date dateEcr;
+ Account account;
+ Entry entry;
+ BigDecimal debit;
+ String entryBookCode;
+ EntryBook entryBook;
+
+ // For all entries loaded from the file
+ // the entry is validate (checking for valide FiscalPeriod and existing Account associated to it)
+ // if valid entry
+ // the entry entity is created and the association with it's dependant entites (Account are FinancialTransaction) are created
+
for (EntryEBP entryEBP : list) {
- // create entry
- Entry entry = new EntryImpl();
- Account account = accountDAO.findByAccountNumber(entryEBP.getCompte());
+ dateEcr = epbDateFormat.parse(entryEBP.getDatEcr());
- Date date = epbDateFormat.parse(entryEBP.getDatEcr());
- Date beginDate = fiscalPeriods.get(0).getBeginDate();
- Date endDate = fiscalPeriods.get(nbFiscalPeriods - 1).getEndDate();
+ // account loading
+ account = accountDAO.findByAccountNumber(entryEBP
+ .getCompte());
- //if entry date have fiscalperiod open
- if (date.compareTo(beginDate) < 0 || date.compareTo(endDate) > 0) {
+ // if entry date have fiscalperiod open
+ if (dateEcr.compareTo(fiscalPeriods.get(0).getBeginDate()) < 0
+ || dateEcr.compareTo(fiscalPeriods.get(nbFiscalPeriods - 1).getEndDate()) > 0) {
+ result.append(_(
+ "lima-business.import.entriesoutofdatesrange", dateEcr));
+ }
- result.append(_("lima-business.import.entriesoutofdatesrange", date));
- }
- // if account not exist not export
+ // if account not exist not export -> exception
else if (account == null) {
- throw new LimaBusinessException(
- _("lima-business.import.ebpmissingaccount",
- entryEBP.getCompte()));
+ throw new LimaBusinessException(_(
+ "lima-business.import.ebpmissingaccount",
+ entryEBP.getCompte()));
}
- //create entry
+
+ // create entry
else {
- entry.setAccount(account);
- BigDecimal debit = new BigDecimal(entryEBP.getDebit());
- BigDecimal credit = new BigDecimal(entryEBP.getCredit());
- if (debit == BigDecimal.ZERO) {
+
+ // creation of the entry
+ // initialisation of this attributs
+
+ entry = new EntryImpl();
+
+ // the entry has one amount witch can be Debit or Credit
+ // regarding the value of the boolean:debit
+ debit = new BigDecimal(entryEBP.getDebit());
+ if (BigDecimal.ZERO.compareTo(debit)==0) {
entry.setDebit(false);
- entry.setAmount(credit);
+ entry.setAmount(new BigDecimal(entryEBP.getCredit()));
} else {
entry.setDebit(true);
entry.setAmount(debit);
}
+ entry.setAccount(account);
entry.setDescription(entryEBP.getLibelle());
entry.setVoucher(entryEBP.getPiece());
-
entry.setLettering(entryEBP.getLettre());
- String entryBookCode = entryEBP.getJournal();
- EntryBook entryBook = entryBookDAO
- .findByCode(entryBookCode);
+ // Association of the entry with the financialTransaction
+ // Each financialTransaction is associated with an entryBook
+ // loading of the entryBook from the db according to the entryBookCode
+ // if the entryBook doesn't exist it's entity is created
+ // if any financialTransaction exist for the entry
+ // a financialTransaction entity is created associated with the entryBook
+ // creation of the entry entity
+ // association between the entry and the financialTransaction is done.
+
+ entryBookCode = entryEBP.getJournal();
+ // entryBook loading
+ entryBook = entryBookDAO.findByCode(entryBookCode);
+
// if entrybook not exist create it !
if (entryBook == null) {
entryBook = new EntryBookImpl();
entryBook.setCode(entryBookCode);
+ //financialTransaction = null;
// create it
- entryBookService.createEntryBook(entryBook);
- result.append(_("lima-business.import.entrybooknotexist", entryBook));
+ entryBook = entryBookService.createEntryBook(entryBook);
+ result.append(_(
+ "lima-business.import.entrybooknotexist",
+ entryBook));
}
- //create transaction
+
+ // create transaction
if (financialTransaction == null
- || !(date.equals(financialTransaction.getTransactionDate())
- && entryBook.getCode().equals(financialTransaction.getEntryBook().getCode()))) {
-
+ || !(dateEcr.equals(financialTransaction
+ .getTransactionDate()) && entryBook
+ .getCode().equals(
+ financialTransaction.getEntryBook()
+ .getCode()))) {
// create financial transaction
financialTransaction = new FinancialTransactionImpl();
financialTransaction.setEntryBook(entryBook);
- financialTransaction.setTransactionDate(date);
- financialTransactionService
+ financialTransaction.setTransactionDate(dateEcr);
+ financialTransaction = financialTransactionService
.createFinancialTransaction(financialTransaction);
- result.append(_("lima-business.import.transactionadded", date, entryBook.getCode()));
+ result.append(_(
+ "lima-business.import.transactionadded", dateEcr,
+ entryBook.getCode()));
+ }
+ // Inside the db, the entries reference the financialTransaction
+ entry.setFinancialTransaction(financialTransaction);
+ entry = financialTransactionService.createEntry(entry);
+ result.append(_("lima-business.import.entryadded",
+ entry.getDescription(), entry.getAmount()));
- }
- financialTransaction.addEntry(entry);
- financialTransactionService.createEntry(entry);
- result.append(_("lima-business.import.entryadded", entry.getDescription(), entry.getAmount()));
}
}
-
if (log.isInfoEnabled()) {
+
long after = System.currentTimeMillis();
- log.info("Imported form EBP : " + list.size() + " entries in " + (after-before) + " ms");
+ log.info("Imported form EBP : " + list.size() + " entries in "
+ + (after - before) + " ms");
}
-
} catch (Exception ex) {
throw new LimaException("Can't import", ex);
+ } finally {
+ if (csvReader != null) {
+ try {
+ csvReader.close();
+ } catch (IOException e) {
+ // on fait rien
+ }
+ }
}
return result.toString();
}
@@ -291,16 +349,14 @@
@Override
public String importAccountsChartFromEbp(String datas) throws LimaException {
long before = System.currentTimeMillis();
-
StringBuilder result = new StringBuilder();
-
+ CSVReader csvReader = null;
try {
- CSVReader csvReader = new CSVReader(new StringReader(datas));
+ csvReader = new CSVReader(new StringReader(datas));
ColumnPositionMappingStrategy<AccountEBPImpl> strat = new ColumnPositionMappingStrategy<AccountEBPImpl>();
strat.setType(AccountEBPImpl.class);
// read header to set strategy mapping
strat.setColumnMapping(csvReader.readNext());
-
// check if file have a good header
List<String> headAccount = new ArrayList<String>();
headAccount.add("Numero");
@@ -315,32 +371,41 @@
// creating beans instance
CsvToBean<AccountEBPImpl> csv = new CsvToBean<AccountEBPImpl>();
List<AccountEBPImpl> list = csv.parse(strat, csvReader);
- Collections.sort(list, new AccountEBPComparator());
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
for (AccountEBP accountEBP : list) {
String accountNumber = accountEBP.getNumero();
if (accountDAO.findByAccountNumber(accountNumber) != null) {
- result.append(_("lima-business.import.accountalreadyexist", accountNumber));
+ result.append(_("lima-business.import.accountalreadyexist",
+ accountNumber));
} else {
String label = accountEBP.getIntitule();
Account account = new AccountImpl();
account.setAccountNumber(accountNumber);
account.setLabel(label);
accountService.createAccount(account);
- result.append(_("lima-business.import.accountadded", accountNumber, label));
+ result.append(_("lima-business.import.accountadded",
+ accountNumber, label));
}
}
-
+
if (log.isInfoEnabled()) {
long after = System.currentTimeMillis();
- log.info("Imported form EBP : " + list.size() + " accounts in " + (after-before) + " ms");
+ log.info("Imported form EBP : " + list.size() + " accounts in "
+ + (after - before) + " ms");
}
} catch (Exception ex) {
throw new LimaException("Can't import", ex);
+ } finally {
+ if (csvReader != null) {
+ try {
+ csvReader.close();
+ } catch (IOException e) {
+ // on fait rien
+ }
+ }
}
-
return result.toString();
}
@@ -349,9 +414,10 @@
long before = System.currentTimeMillis();
StringBuilder result = new StringBuilder();
+ CSVReader csvReader = null;
try {
- CSVReader csvReader = new CSVReader(new StringReader(datas));
+ csvReader = new CSVReader(new StringReader(datas));
// check if file have a good header
String[] headers = csvReader.readNext();
@@ -373,9 +439,7 @@
line = csvReader.readNext();
}
-
- csvReader.close();
-
+
if (log.isInfoEnabled()) {
long after = System.currentTimeMillis();
log.info("Imported form EBP : " + count + " accounts in " + (after-before) + " ms");
@@ -383,6 +447,14 @@
} catch (Exception ex) {
throw new LimaException("Can't import", ex);
+ } finally {
+ if (csvReader != null) {
+ try {
+ csvReader.close();
+ } catch (IOException e) {
+ // on fait rien
+ }
+ }
}
return result.toString();
@@ -413,10 +485,11 @@
Map<Integer, List<EntryImport>> entries =
new HashMap<Integer, List<EntryImport>>();
+ CSVReader csvReader = null;
try {
String[] nextLine;
- CSVReader csvReader = new CSVReader(new StringReader(datas), ';');
+ csvReader = new CSVReader(new StringReader(datas), ';');
while ((nextLine = csvReader.readNext()) != null) {
ImportExportEntityEnum importExportEntityEnum = ImportExportEntityEnum
@@ -474,6 +547,14 @@
} catch (Exception ex) {
throw new LimaException("Can't import", ex);
+ } finally {
+ if (csvReader != null) {
+ try {
+ csvReader.close();
+ } catch (IOException e) {
+ // on fait rien
+ }
+ }
}
return result.toString();
}
@@ -510,11 +591,11 @@
entries = new HashMap<Integer, List<EntryImport>>();
break;
}
-
+ CSVReader csvReader = null;
try {
String[] nextLine;
- CSVReader csvReader = new CSVReader(new StringReader(datas), ';');
+ csvReader = new CSVReader(new StringReader(datas), ';');
while ((nextLine = csvReader.readNext()) != null) {
if (ImportExportEntityEnum.valueOfLabel(nextLine[0]) == importExportEntityEnum
@@ -573,6 +654,14 @@
} catch (Exception ex) {
throw new LimaException("Can't import", ex);
+ } finally {
+ if (csvReader != null) {
+ try {
+ csvReader.close();
+ } catch (IOException e) {
+ // on fait rien
+ }
+ }
}
return result.toString();
}
@@ -584,6 +673,7 @@
StringBuilder result = new StringBuilder();
+ PDDocument doc = null;
try {
String path = LimaConfig.getInstance().getReportsDir().getAbsolutePath();
@@ -592,7 +682,6 @@
String filePathStructured = path + File.separator
+ DocumentsEnum.VAT.getFileName() + "_structure.pdf";
- PDDocument doc;
InputStream reportsStream = new FileInputStream(datas);
//DocumentServiceImpl.class.getResourceAsStream("/reports/vat_form_fr.pdf");
// load the document
@@ -618,13 +707,20 @@
if (setMode) {
LimaConfig.getInstance().setVatPDFUrl(datas);
}
- doc.close();
} catch (IOException ex) {
log.error("Can't read vat pdf", ex);
result.append("Can't read vat pdf");
} catch (COSVisitorException ex) {
log.error("Can't save vat pdf", ex);
result.append("Can't save vat pdf");
+ } finally {
+ try {
+ if (doc != null) {
+ doc.close();
+ }
+ } catch (Exception e) {
+ // Nothing to do
+ }
}
return result.toString();
}
@@ -742,7 +838,6 @@
*
* @param nextLine
* @param closedPeriodicEntryBooks
- * @param topiaContext
* @throws LimaException
*/
protected void importClosedPeriodicEntryBookCSV(String[] nextLine,
@@ -816,7 +911,7 @@
} else {
List<FinancialStatementImport> list = new ArrayList<FinancialStatementImport>();
list.add(financialStatementImport);
- financialStatements.put(label, (ArrayList<FinancialStatementImport>) list);
+ financialStatements.put(label, list);
}
} else {
result.append(_("lima-business.import.financialstatementalreadyexist", label));
@@ -865,7 +960,7 @@
} else {
List<VatStatementImport> list = new ArrayList<VatStatementImport>();
list.add(vatStatementImport);
- vatStatements.put(label, (ArrayList<VatStatementImport>) list);
+ vatStatements.put(label, list);
}
} else {
result.append(_("lima-business.import.vatstatementalreadyexist", label));
@@ -1124,7 +1219,7 @@
.findByEntryBookAndFinancialPeriod(entryBook,
financialPeriod);
try {
- closedPeriodicEntryBook = financialPeriodService
+ financialPeriodService
.blockClosedPeriodicEntryBook(closedPeriodicEntryBook);
result.append(_("lima-business.import.closedperiodicentrybookupdated",
beginDateFinancialPeriod, endDateFinancialPeriod, codeEntryBook));
@@ -1146,11 +1241,9 @@
Map<Integer, FinancialTransactionImport> financialTransactions,
Map<Integer, List<EntryImport>> entries)
throws LimaException, ParseException, TopiaException {
- StringBuilder result = new StringBuilder();
EntryBookDAO entryBookDAO = getDaoHelper().getEntryBookDAO();
EntryDAO entryDAO = getDaoHelper().getEntryDAO();
- FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO();
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
@@ -1190,7 +1283,7 @@
financialTransaction.addEntry(entry);
}
}
- return result.toString();
+ return "";
}
protected String importIdentity(String[] nextLine) 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 2014-01-06 16:50:14 UTC (rev 3737)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2014-01-17 00:02:30 UTC (rev 3738)
@@ -60,10 +60,11 @@
lima-business.document.solde=Solde
lima-business.document.soldecredit=Credit solde
lima-business.document.soldedebit=Debit solde
+lima-business.document.unknow=POA
lima-business.document.vat=VAT form
lima-business.document.vatnumber=VAT N°
lima-business.document.voucher=Voucher
-lima-business.document.zipcode=
+lima-business.document.zipcode=Zipcode
lima-business.entrybook.entrybookalreadyexist=An EntryBook already exists with this code \: %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 Financial statement.\n Some account marked not found is normally.\n\n
@@ -84,6 +85,7 @@
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.ebpnoheader=FAILED \: This file has no header datas.
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
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 2014-01-06 16:50:14 UTC (rev 3737)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2014-01-17 00:02:30 UTC (rev 3738)
@@ -86,6 +86,7 @@
lima-business.import.closedperiodicentrybookupdated=Succès \: La période financière %s - %s - %s est ajoutée \! \n
lima-business.import.ebpmissingaccount=Échec \: Compte %s inexistant. \nImportation annulée. \nCréer tous les comptes avant d'importer les écritures.
lima-business.import.ebpnoentry=Échec \: Ce fichier ne contient aucune entrée.
+lima-business.import.ebpnoheader=Échec \: Ce fichier ne contient aucun entête.
lima-business.import.entriesoutofdatesrange=Attention \: Cette entrée %s ne fait partie d'aucune période ouverte. Entrée non importée \!\n
lima-business.import.entryadded=Succès \: Entrée %s %s ajoutée \n
lima-business.import.entrybookalreadyexist=Échec \: Le journal %s exist déjà \!\n
1
0
07 Jan '14
See <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/2638/ch…>
Changes:
[sbavencoff] refs #370 : update JAXX to 2.6 fix application settings
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Lima :: business 0.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lima-business ---
[INFO] Deleting <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ lima-business ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (copy-dependencies) @ lima-business ---
[INFO] Copying openejb-jpa-integration-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-beanutils-1.8.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying lima-callao-0.8-SNAPSHOT.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-beanutils-core-1.8.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-action-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying nuiton-config-3.0-alpha-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-ejbd-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying quartz-2.1.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying activemq-protobuf-1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-dbcp-1.4.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying bval-core-0.5.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-jxpath-1.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jaxb-impl-2.2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying fontbox-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying mbean-annotation-api-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying nuiton-decorator-3.0-alpha-2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-logging-1.1.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying hibernate-ehcache-3.6.10.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jempbox-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-common-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-server-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying javassist-3.12.1.GA.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-painters-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying itext-4.2.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-cli-1.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying bval-jsr303-0.5.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jaxx-config-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying hibernate-commons-annotations-3.2.0.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying xbean-asm-shaded-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jxlayer-3.0.4.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying xbean-reflect-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying junit-4.11.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openjpa-asm-shaded-2.2.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying slf4j-api-1.7.5.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-jee-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying geronimo-transaction-3.1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jcommon-1.0.15.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying activemq-ra-5.7.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying serp-1.13.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-loader-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openwebbeans-impl-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jansi-1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-graphics-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying ehcache-core-2.4.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying nuiton-csv-2.6.4.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying hsqldb-2.2.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying topia-persistence-2.7.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying guava-14.0.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-io-2.4.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-api-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying dom4j-1.6.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying hibernate-core-3.6.10.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-primitives-1.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jfreechart-1.0.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-net-3.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying topia-service-migration-2.7.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying javax.servlet-3.0.0.v201112011016.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-javaagent-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-autocomplete-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying lima-business-api-0.8-SNAPSHOT.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-pool-1.5.7.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying h2-1.3.172.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-servlet-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying nuiton-utils-2.6.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openwebbeans-spi-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openwebbeans-ee-common-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-lang-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying nuiton-i18n-2.5.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-server-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying howl-1.0.1-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-client-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying log4j-1.2.17.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-security-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying xml-apis-1.0.b2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swizzle-stream-1.6.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-util-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openwebbeans-web-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jaxx-widgets-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-continuation-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying javaee-api-6.0-5.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openwebbeans-ee-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jta-1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying geronimo-connector-3.1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying xbean-finder-shaded-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-plaf-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying geronimo-javamail_1.4_mail-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying xbean-naming-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying antlr-2.7.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying pdfbox-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying hamcrest-core-1.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jaxx-runtime-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-collections-3.2.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying pdfbox-examples-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying activemq-core-5.7.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying geronimo-j2ee-connector_1.6_spec-1.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying swingx-core-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying slf4j-log4j12-1.7.5.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openejb-core-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying openwebbeans-ejb-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-vfs2-2.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying xbean-bundleutils-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying javacsv-2.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying opencsv-2.3.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying hibernate-jpa-2.0-api-1.0.1.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-http-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying javassist-3.17.1-GA.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying commons-lang3-3.1.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying kahadb-5.7.0.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying pdf-renderer-1.0.5.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying jetty-io-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying wsdl4j-1.6.2.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying javahelp-2.0.05.jar to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO]
[INFO] --- i18n-maven-plugin:2.5.1:parserJava (default) @ lima-business ---
[INFO] start entry basedir:<http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…,> includes:[**/*.java]
[INFO] 41 file(s) to process (among 41 files)
[INFO] Parsing is done. [treated file(s) : 12/41](total time:332.988ms) ( ~ 8.122ms / file)
[INFO]
[INFO] >>> i18n-maven-plugin:2.5.1:gen (default) @ lima-business >>>
[INFO]
[INFO] --- i18n-maven-plugin:2.5.1:get (get) @ lima-business ---
[INFO] config - basedir : <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] import getter java.getter in 241729ns
[INFO] Copying lima-business.properties to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Copying lima-business.properties to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO]
[INFO] <<< i18n-maven-plugin:2.5.1:gen (default) @ lima-business <<<
[INFO]
[INFO] --- i18n-maven-plugin:2.5.1:gen (default) @ lima-business ---
[INFO] config - src basedir : <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>
[INFO] config - out basedir : <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] prepare bundle for locale fr_FR
[INFO] merge bundle fr_FR to out
[WARNING] bundle fr_FR contains 95/164 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO] copy bundle fr_FR to src
[INFO] prepare bundle for locale en_GB
[INFO] merge bundle en_GB to out
[WARNING] bundle en_GB contains 94/162 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO] copy bundle en_GB to src
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lima-business ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 18 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ lima-business ---
[INFO] Compiling 41 source files to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[37,23] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[38,23] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[56,33] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[37,23] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[38,23] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[56,33] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[37,23] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[38,23] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[56,33] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[232,52] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[66,9] <O,A>ApplicationConfig(java.lang.Class<O>,java.lang.Class<A>,java.util.Properties,java.lang.String) in org.nuiton.util.ApplicationConfig has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[161,18] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[328,38] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[423,56] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[474,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[478,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[482,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[486,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[581,19] importAsPDF(java.lang.String,org.chorem.lima.business.utils.ImportExportEntityEnum,boolean) in org.chorem.lima.business.api.ImportService has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ lima-business ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lima-business ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ lima-business ---
[INFO] Compiling 22 source files to <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/targ…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[61,44] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[64,30] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[INFO] 3 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.nuiton.org/jenkins/job/lima/org.chorem.lima$lima-business/ws/src/…>:[174,27] method initFactory in class org.chorem.lima.service.LimaServiceFactory cannot be applied to given types;
required: org.nuiton.config.ApplicationConfig
found: org.chorem.lima.business.LimaConfig
reason: actual argument org.chorem.lima.business.LimaConfig cannot be converted to org.nuiton.config.ApplicationConfig by method invocation conversion
[INFO] 1 error
[INFO] -------------------------------------------------------------
1
1
See <http://ci.nuiton.org/jenkins/job/lima/2638/changes>
Changes:
[sbavencoff] Financial transaction : fire model if values is clear
[sbavencoff] refs #370 : fix spelling
[sbavencoff] refs #370 : update JAXX to 2.6 fix application settings
[sbavencoff] refs #777 : paste transaction even if no rows are select. no past transaction date and entry book
------------------------------------------
[...truncated 212 lines...]
[INFO] No tests to run.
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ lima-business-api ---
[INFO] Building jar: <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business-api/target/lim…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ lima-business-api ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ lima-business-api ---
[INFO] Installing <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business-api/target/lim…> to /var/local/maven/data/repository/org/chorem/lima/lima-business-api/0.8-SNAPSHOT/lima-business-api-0.8-SNAPSHOT.jar
[INFO] Installing <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business-api/pom.xml> to /var/local/maven/data/repository/org/chorem/lima/lima-business-api/0.8-SNAPSHOT/lima-business-api-0.8-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Lima :: business 0.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lima-business ---
[INFO] Deleting <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ lima-business ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (copy-dependencies) @ lima-business ---
[INFO] Copying openejb-jpa-integration-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying commons-beanutils-1.8.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying lima-callao-0.8-SNAPSHOT.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/lim…>
[INFO] Copying commons-beanutils-core-1.8.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying swingx-action-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying nuiton-config-3.0-alpha-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/nui…>
[INFO] Copying openejb-ejbd-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying quartz-2.1.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/qua…>
[INFO] Copying activemq-protobuf-1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/act…>
[INFO] Copying commons-dbcp-1.4.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying bval-core-0.5.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/bva…>
[INFO] Copying commons-jxpath-1.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying jaxb-impl-2.2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jax…>
[INFO] Copying fontbox-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/fon…>
[INFO] Copying mbean-annotation-api-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/mbe…>
[INFO] Copying nuiton-decorator-3.0-alpha-2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/nui…>
[INFO] Copying commons-logging-1.1.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying hibernate-ehcache-3.6.10.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/hib…>
[INFO] Copying jempbox-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jem…>
[INFO] Copying swingx-common-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying jetty-server-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying javassist-3.12.1.GA.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jav…>
[INFO] Copying swingx-painters-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying itext-4.2.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ite…>
[INFO] Copying commons-cli-1.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying bval-jsr303-0.5.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/bva…>
[INFO] Copying jaxx-config-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jax…>
[INFO] Copying hibernate-commons-annotations-3.2.0.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/hib…>
[INFO] Copying xbean-asm-shaded-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/xbe…>
[INFO] Copying jxlayer-3.0.4.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jxl…>
[INFO] Copying xbean-reflect-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/xbe…>
[INFO] Copying junit-4.11.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jun…>
[INFO] Copying openjpa-asm-shaded-2.2.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying slf4j-api-1.7.5.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/slf…>
[INFO] Copying openejb-jee-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying geronimo-transaction-3.1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ger…>
[INFO] Copying jcommon-1.0.15.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jco…>
[INFO] Copying activemq-ra-5.7.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/act…>
[INFO] Copying serp-1.13.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ser…>
[INFO] Copying openejb-loader-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying openwebbeans-impl-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying jansi-1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jan…>
[INFO] Copying swingx-graphics-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying ehcache-core-2.4.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ehc…>
[INFO] Copying nuiton-csv-2.6.4.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/nui…>
[INFO] Copying hsqldb-2.2.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/hsq…>
[INFO] Copying topia-persistence-2.7.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/top…>
[INFO] Copying guava-14.0.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/gua…>
[INFO] Copying commons-io-2.4.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying openejb-api-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying dom4j-1.6.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/dom…>
[INFO] Copying hibernate-core-3.6.10.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/hib…>
[INFO] Copying commons-primitives-1.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying jfreechart-1.0.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jfr…>
[INFO] Copying commons-net-3.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying topia-service-migration-2.7.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/top…>
[INFO] Copying javax.servlet-3.0.0.v201112011016.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jav…>
[INFO] Copying openejb-javaagent-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying swingx-autocomplete-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying lima-business-api-0.8-SNAPSHOT.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/lim…>
[INFO] Copying commons-pool-1.5.7.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying h2-1.3.172.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/h2-…>
[INFO] Copying jetty-servlet-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying nuiton-utils-2.6.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/nui…>
[INFO] Copying openwebbeans-spi-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying openwebbeans-ee-common-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying commons-lang-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying nuiton-i18n-2.5.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/nui…>
[INFO] Copying openejb-server-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying howl-1.0.1-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/how…>
[INFO] Copying openejb-client-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying log4j-1.2.17.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/log…>
[INFO] Copying jetty-security-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying xml-apis-1.0.b2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/xml…>
[INFO] Copying swizzle-stream-1.6.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying jetty-util-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying openwebbeans-web-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying jaxx-widgets-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jax…>
[INFO] Copying jetty-continuation-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying javaee-api-6.0-5.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jav…>
[INFO] Copying openwebbeans-ee-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying jta-1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jta…>
[INFO] Copying geronimo-connector-3.1.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ger…>
[INFO] Copying xbean-finder-shaded-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/xbe…>
[INFO] Copying swingx-plaf-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying geronimo-javamail_1.4_mail-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ger…>
[INFO] Copying xbean-naming-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/xbe…>
[INFO] Copying antlr-2.7.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ant…>
[INFO] Copying pdfbox-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/pdf…>
[INFO] Copying hamcrest-core-1.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ham…>
[INFO] Copying jaxx-runtime-2.6.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jax…>
[INFO] Copying commons-collections-3.2.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying pdfbox-examples-1.8.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/pdf…>
[INFO] Copying activemq-core-5.7.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/act…>
[INFO] Copying geronimo-j2ee-connector_1.6_spec-1.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ger…>
[INFO] Copying swingx-core-1.6.5-1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/swi…>
[INFO] Copying slf4j-log4j12-1.7.5.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/slf…>
[INFO] Copying openejb-core-4.5.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying openwebbeans-ejb-1.1.8.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying commons-vfs2-2.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying xbean-bundleutils-3.12.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/xbe…>
[INFO] Copying javacsv-2.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jav…>
[INFO] Copying opencsv-2.3.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/ope…>
[INFO] Copying hibernate-jpa-2.0-api-1.0.1.Final.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/hib…>
[INFO] Copying jetty-http-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying javassist-3.17.1-GA.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jav…>
[INFO] Copying commons-lang3-3.1.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/com…>
[INFO] Copying kahadb-5.7.0.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/kah…>
[INFO] Copying pdf-renderer-1.0.5.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/pdf…>
[INFO] Copying jetty-io-8.1.12.v20130726.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jet…>
[INFO] Copying wsdl4j-1.6.2.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/wsd…>
[INFO] Copying javahelp-2.0.05.jar to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/lib/jav…>
[INFO]
[INFO] --- i18n-maven-plugin:2.5.1:parserJava (default) @ lima-business ---
[INFO] start entry basedir:<http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java,> includes:[**/*.java]
[INFO] 41 file(s) to process (among 41 files)
[INFO] Parsing is done. [treated file(s) : 12/41](total time:332.988ms) ( ~ 8.122ms / file)
[INFO]
[INFO] >>> i18n-maven-plugin:2.5.1:gen (default) @ lima-business >>>
[INFO]
[INFO] --- i18n-maven-plugin:2.5.1:get (get) @ lima-business ---
[INFO] config - basedir : <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/generat…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] import getter java.getter in 241729ns
[INFO] Copying lima-business.properties to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/generat…>
[INFO] Copying lima-business.properties to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/generat…>
[INFO]
[INFO] <<< i18n-maven-plugin:2.5.1:gen (default) @ lima-business <<<
[INFO]
[INFO] --- i18n-maven-plugin:2.5.1:gen (default) @ lima-business ---
[INFO] config - src basedir : <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/resou…>
[INFO] config - out basedir : <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/generat…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] prepare bundle for locale fr_FR
[INFO] merge bundle fr_FR to out
[WARNING] bundle fr_FR contains 95/164 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO] copy bundle fr_FR to src
[INFO] prepare bundle for locale en_GB
[INFO] merge bundle en_GB to out
[WARNING] bundle en_GB contains 94/162 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO] copy bundle en_GB to src
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lima-business ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 18 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ lima-business ---
[INFO] Compiling 41 source files to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/classes>
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[37,23] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[38,23] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[56,33] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[37,23] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[38,23] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[56,33] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[37,23] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[38,23] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[56,33] org.nuiton.util.ApplicationConfig in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[232,52] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[66,9] <O,A>ApplicationConfig(java.lang.Class<O>,java.lang.Class<A>,java.util.Properties,java.lang.String) in org.nuiton.util.ApplicationConfig has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[161,18] org.nuiton.util.ArgumentsParserException in org.nuiton.util has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[328,38] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[423,56] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[474,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[478,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[482,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[486,35] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>:[581,19] importAsPDF(java.lang.String,org.chorem.lima.business.utils.ImportExportEntityEnum,boolean) in org.chorem.lima.business.api.ImportService has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/main/java/…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ lima-business ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/surefir…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lima-business ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ lima-business ---
[INFO] Compiling 22 source files to <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/target/test-cl…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/test/java/…>:[61,44] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/test/java/…>:[64,30] stringToListAccounts(java.lang.String,java.lang.Boolean) in org.chorem.lima.entity.AccountDAOImpl has been deprecated
[INFO] 3 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/src/test/java/…>:[174,27] method initFactory in class org.chorem.lima.service.LimaServiceFactory cannot be applied to given types;
required: org.nuiton.config.ApplicationConfig
found: org.chorem.lima.business.LimaConfig
reason: actual argument org.chorem.lima.business.LimaConfig cannot be converted to org.nuiton.config.ApplicationConfig by method invocation conversion
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lima .............................................. SUCCESS [6.418s]
[INFO] Lima :: callao .................................... SUCCESS [10.840s]
[INFO] Lima :: business API .............................. SUCCESS [0.764s]
[INFO] Lima :: business .................................. FAILURE [5.525s]
[INFO] Lima :: Swing ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.216s
[INFO] Finished at: Sat Jan 04 13:01:27 CET 2014
[INFO] Final Memory: 42M/296M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business-api/pom.xml> to org.chorem.lima/lima-business-api/0.8-SNAPSHOT/lima-business-api-0.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business-api/target/lim…> to org.chorem.lima/lima-business-api/0.8-SNAPSHOT/lima-business-api-0.8-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-callao/pom.xml> to org.chorem.lima/lima-callao/0.8-SNAPSHOT/lima-callao-0.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-callao/target/lima-call…> to org.chorem.lima/lima-callao/0.8-SNAPSHOT/lima-callao-0.8-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-swing/pom.xml> to org.chorem.lima/lima-swing/0.8-SNAPSHOT/lima-swing-0.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/pom.xml> to org.chorem/lima/0.8-SNAPSHOT/lima-0.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/target/lima-0.8-SNAPSHOT-sit…> to org.chorem/lima/0.8-SNAPSHOT/lima-0.8-SNAPSHOT-site_fr.xml
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/lima/ws/trunk/lima-business/pom.xml> to org.chorem.lima/lima-business/0.8-SNAPSHOT/lima-business-0.8-SNAPSHOT.pom
Sending e-mails to: lima-commits(a)list.chorem.org
channel stopped
1
1
r3737 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction
by sbavencoff@users.chorem.org 06 Jan '14
by sbavencoff@users.chorem.org 06 Jan '14
06 Jan '14
Author: sbavencoff
Date: 2014-01-06 17:50:14 +0100 (Mon, 06 Jan 2014)
New Revision: 3737
Url: http://chorem.org/projects/lima/repository/revisions/3737
Log:
fixes #968 : fix bug if entryTarget.getVoucher() is null
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-01-06 16:20:04 UTC (rev 3736)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-01-06 16:50:14 UTC (rev 3737)
@@ -25,6 +25,7 @@
package org.chorem.lima.ui.financialtransaction;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -452,7 +453,7 @@
}
}
- /**
+ /**
* Add new transaction.
*/
public void addFinancialTransaction() {
@@ -668,10 +669,7 @@
FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
ListSelectionModel selectionModel = table.getSelectionModel();
- if (table.isEditing()) {
- TableCellEditor editor = table.getCellEditor();
- editor.stopCellEditing();
- }
+ table.exit();
int selectedRow = table.getSelectedRow();
int selectedColumn = table.getSelectedColumn();
@@ -682,13 +680,13 @@
if (entrySource != entryTarget) {
switch (selectedColumn) {
case 1 :
- if (entryTarget.getVoucher().compareTo(entrySource.getVoucher()) != 0) {
+ if (!StringUtils.equals(entryTarget.getVoucher(), entrySource.getVoucher())) {
entryTarget.setVoucher(entrySource.getVoucher());
financialTransactionService.updateEntry(entryTarget);
}
break;
case 3 :
- if (entryTarget.getDescription().compareTo(entrySource.getDescription()) != 0) {
+ if (!StringUtils.equals(entryTarget.getDescription(), entrySource.getDescription())) {
entryTarget.setDescription(entrySource.getDescription());
financialTransactionService.updateEntry(entryTarget);
}
1
0