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
- 1853 discussions
r3873 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
by dcosse@users.chorem.org 30 Jul '14
by dcosse@users.chorem.org 30 Jul '14
30 Jul '14
Author: dcosse
Date: 2014-07-30 09:41:15 +0200 (Wed, 30 Jul 2014)
New Revision: 3873
Url: http://forge.chorem.org/projects/lima/repository/revisions/3873
Log:
fix build
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-30 07:03:24 UTC (rev 3872)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-30 07:41:15 UTC (rev 3873)
@@ -224,19 +224,6 @@
return result;
}
- @Override
- public String exportFinancialTransactionsAsCSV(String charset) {
- String result;
- try {
- File file = exportFinancialTransactionsFile(charset);
- FileInputStream inputStream = new FileInputStream(file);
- result = IOUtils.toString(inputStream);
- } catch (Exception e) {
- throw new LimaTechnicalException(e);
- }
- return result;
- }
-
protected File exportEntriesFile(String charset, Boolean humanReadable) throws Exception {
EntryTopiaDao dao = getDaoHelper().getEntryDao();
List<Entry> entities = dao.findAll();
1
0
r3872 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-callao/src/main/java/org/chorem/lima/entity
by sbavencoff@users.chorem.org 30 Jul '14
by sbavencoff@users.chorem.org 30 Jul '14
30 Jul '14
Author: sbavencoff
Date: 2014-07-30 09:03:24 +0200 (Wed, 30 Jul 2014)
New Revision: 3872
Url: http://forge.chorem.org/projects/lima/repository/revisions/3872
Log:
fixes #1052 : non cr?\195?\169ation des p?\195?\169riodes comptables
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookTopiaDao.java
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-07-29 14:06:49 UTC (rev 3871)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2014-07-30 07:03:24 UTC (rev 3872)
@@ -101,7 +101,7 @@
FinancialPeriodTopiaDao financialPeriodTopiaDao =
getDaoHelper().getFinancialPeriodDao();
// for all unblocked financialperiod
- List<FinancialPeriod> financialPeriods = financialPeriodTopiaDao.forProperties(FinancialPeriod.PROPERTY_LOCKED, true).findAll();
+ List<FinancialPeriod> financialPeriods = financialPeriodTopiaDao.forProperties(FinancialPeriod.PROPERTY_LOCKED, false).findAll();
for (FinancialPeriod financialPeriod : financialPeriods) {
//new closed periodic entrybook
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookTopiaDao.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookTopiaDao.java 2014-07-29 14:06:49 UTC (rev 3871)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookTopiaDao.java 2014-07-30 07:03:24 UTC (rev 3872)
@@ -158,7 +158,7 @@
*/
public List<ClosedPeriodicEntryBook> findAllClosedPeriodicEntryBooksFromFiscalPeriod(FiscalPeriod fiscalPeriod) {
List<ClosedPeriodicEntryBook> closedPeriodicEntryBooks =
- forEquals(ClosedPeriodicEntryBook.PROPERTY_FINANCIAL_PERIOD, fiscalPeriod)
+ forIn(ClosedPeriodicEntryBook.PROPERTY_FINANCIAL_PERIOD, fiscalPeriod.getFinancialPeriod())
.setOrderByArguments(PROPERTY_BEGIN_DATE)
.findAll();
1
0
29 Jul '14
Author: dcosse
Date: 2014-07-29 16:06:49 +0200 (Tue, 29 Jul 2014)
New Revision: 3871
Url: http://forge.chorem.org/projects/lima/repository/revisions/3871
Log:
refs #1032 import export des transactions financi?\195?\168res
Added:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialStatementModel.java
Modified:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.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/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java
trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
trunk/lima-callao/src/main/xmi/accounting-model.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/resources/import/bcr_base.csv
trunk/lima-swing/src/main/resources/import/bcr_developed.csv
trunk/lima-swing/src/main/resources/import/bcr_shortened.csv
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-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -89,6 +89,7 @@
FinancialStatement masterfinancialStatementUpdate = null;
if (masterFinancialStatement != null) {
+ // TODO DCossé 29/07/14 fix it Label is not unique !
masterfinancialStatementUpdate = financialStatementTopiaDao.forLabelEquals(masterFinancialStatement.getLabel()).findAnyOrNull();
// valid that there are no duplicated financial statement.
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-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -37,7 +37,6 @@
import org.apache.pdfbox.exceptions.COSVisitorException;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.interactive.form.PDField;
-import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.beans.ClosedPeriodicEntryBookImport;
import org.chorem.lima.beans.ClosedPeriodicEntryBookImportImpl;
import org.chorem.lima.beans.EntryEBP;
@@ -45,13 +44,11 @@
import org.chorem.lima.beans.EntryImport;
import org.chorem.lima.beans.EntryImportImpl;
import org.chorem.lima.beans.FinancialStatementImport;
-import org.chorem.lima.beans.FinancialStatementImportImpl;
import org.chorem.lima.beans.FinancialTransactionImport;
import org.chorem.lima.beans.FinancialTransactionImportImpl;
import org.chorem.lima.beans.VatStatementImport;
import org.chorem.lima.beans.VatStatementImportImpl;
import org.chorem.lima.business.AlreadyExistAccountException;
-import org.chorem.lima.business.AlreadyExistFinancialTransaction;
import org.chorem.lima.business.BeginAfterEndFiscalPeriodException;
import org.chorem.lima.business.ImportEbpException;
import org.chorem.lima.business.InvalidAccountNumberException;
@@ -87,8 +84,6 @@
import org.chorem.lima.entity.EntryBookImpl;
import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FinancialStatement;
-import org.chorem.lima.entity.FinancialStatementImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FiscalPeriod;
@@ -570,9 +565,6 @@
switch (importExportEntityEnum) {
- case FINANCIALSTATEMENT:
- financialStatements = new LinkedHashMap<String, List<FinancialStatementImport>>();
- break;
case VATSTATEMENT:
vatStatements = new LinkedHashMap<String, List<VatStatementImport>>();
break;
@@ -599,10 +591,6 @@
case ACCOUNT:
result.append(importAccountsChartsCSV(nextLine));
break;
- case FINANCIALSTATEMENT:
- result.append(importFinancialsStatementChartCSV(nextLine,
- financialStatements));
- break;
case VATSTATEMENT:
result.append(importVatStatementChartCSV(nextLine,
vatStatements));
@@ -630,9 +618,6 @@
//create entity
switch (importExportEntityEnum) {
- case FINANCIALSTATEMENT:
- result.append(createFinancialStatements(financialStatements));
- break;
case VATSTATEMENT:
result.append(createVatStatements(vatStatements));
break;
@@ -849,64 +834,6 @@
}
/**
- * Import and create financialstatement Structure : TYPE | label | header
- * | accounts | debitAccount | creditAccount |
- * provisitionDeprecationAccounts | subAmount | headerAmount
- * | masterFinancialStatement
- *
- * @param nextLine
- * @param financialStatements
- * @return
- */
- protected String importFinancialsStatementChartCSV(String[] nextLine,
- Map<String, List<FinancialStatementImport>> financialStatements) {
- StringBuilder result = new StringBuilder();
-
- String label = StringUtils.trimToNull(nextLine[1]);
- String header = nextLine[2];
- String accounts = StringUtils.trimToNull(nextLine[3]);
- String debitAccounts = StringUtils.trimToNull(nextLine[4]);
- String creditAccounts = StringUtils.trimToNull(nextLine[5]);
- String provisionDeprecationAccounts = StringUtils.trimToNull(nextLine[6]);
- String subAmount = nextLine[7];
- String headerAmount = nextLine[8];
- String masterFinancialStatement = nextLine[9];
- String financialStatementWay = nextLine[10];
-
- // if exist, skip
- if (!financialStatementService.checkFinancialStatementExist(label)) {
- // create it
- FinancialStatementImport financialStatementImport = new FinancialStatementImportImpl();
- financialStatementImport.setLabel(label);
- financialStatementImport.setHeader(header);
- financialStatementImport.setAccounts(accounts);
- financialStatementImport.setCreditAccounts(creditAccounts);
- financialStatementImport.setDebitAccounts(debitAccounts);
- financialStatementImport.setHeaderAmount(headerAmount);
- financialStatementImport
- .setProvisionDeprecationAccounts(provisionDeprecationAccounts);
- financialStatementImport.setSubAmount(subAmount);
- financialStatementImport
- .setMasterFinancialStatement(masterFinancialStatement);
- financialStatementImport.setWay(financialStatementWay);
-
- // put it in hashlinkedlist
- if (financialStatements.containsKey(label)) {
- financialStatements.get(label).add(financialStatementImport);
- } else {
- List<FinancialStatementImport> list = new ArrayList<FinancialStatementImport>();
- list.add(financialStatementImport);
- financialStatements.put(label, list);
- }
- } else {
- result.append(t("lima-business.import.financialstatementalreadyexist", label));
- }
-
- return result.toString();
- }
-
-
- /**
* Import and create vatstatement Structure : TYPE | boxName | label
* | header | accounts | masterVatStatement
*
@@ -1001,97 +928,11 @@
}
}
- // ################ CREATE ENTITY IN DB FOR IMPORT ################
-
/**
* @throws TopiaException
* @deprecated do only one method import without bean use (and remove beans)
*/
@Deprecated
- protected String createFinancialStatements(Map<String, List<FinancialStatementImport>> financialStatements) {
- StringBuilder result = new StringBuilder();
-
- while (financialStatements.size() > 0) {
- for (Iterator<List<FinancialStatementImport>> itr = financialStatements
- .values().iterator(); itr.hasNext(); ) {
- List<FinancialStatementImport> financialStatementImports =
- itr.next();
-
- for (Iterator<FinancialStatementImport> itr2 = financialStatementImports.iterator(); itr2.hasNext(); ) {
- FinancialStatementImport financialStatementImport =
- itr2.next();
- String masterFinancialStatementLabel = financialStatementImport.getMasterFinancialStatement();
- FinancialStatement masterFinancialStatement = financialStatementService.getFinancialStatementByLabel(masterFinancialStatementLabel);
-
- if (masterFinancialStatementLabel.equals("")
- || masterFinancialStatement != null) {
- // create it
- FinancialStatement financialStatement = new FinancialStatementImpl();
- financialStatement.setLabel(financialStatementImport
- .getLabel());
- financialStatement.setHeader(Boolean
- .parseBoolean(financialStatementImport
- .getHeader()));
- financialStatement.setAccounts(financialStatementImport
- .getAccounts());
- financialStatement
- .setDebitAccounts(financialStatementImport
- .getDebitAccounts());
- financialStatement
- .setCreditAccounts(financialStatementImport
- .getCreditAccounts());
- financialStatement
- .setProvisionDeprecationAccounts(financialStatementImport
- .getProvisionDeprecationAccounts());
- financialStatement.setSubAmount(Boolean
- .parseBoolean(financialStatementImport
- .getSubAmount()));
- financialStatement.setHeaderAmount(Boolean
- .parseBoolean(financialStatementImport
- .getHeaderAmount()));
- String financialStatementWay = financialStatementImport.getWay();
- if (!financialStatementWay.equals("")) {
- FinancialStatementWayEnum financialStatementWayEnum =
- FinancialStatementWayEnum.valueOf(financialStatementWay);
- financialStatement.setWay(financialStatementWayEnum);
- }
-
-
- try {
- financialStatementService
- .createFinancialStatement(
- masterFinancialStatement,
- financialStatement);
- } catch (AlreadyExistFinancialTransaction alreadyExistFinancialTransaction) {
- result.append(t("lima.importexport.import.alreadyExistFinancialStatement",
- alreadyExistFinancialTransaction.getFinancialTransactionLabel(), alreadyExistFinancialTransaction.getMasterLabel()));
- }
-
- result.append(t("lima-business.import.financialstatementadded",
- financialStatementImport.getLabel()));
-
- itr2.remove();
- } else if (!financialStatements
- .containsKey(masterFinancialStatementLabel)) {
- result.append(t("lima-business.import.financialstatementalnomaster",
- financialStatementImport.getLabel(),
- masterFinancialStatementLabel));
- itr2.remove();
- }
- }
- if (financialStatementImports.isEmpty()) {
- itr.remove();
- }
- }
- }
- return result.toString();
- }
-
- /**
- * @throws TopiaException
- * @deprecated do only one method import without bean use (and remove beans)
- */
- @Deprecated
protected String createVatStatements(Map<String, List<VatStatementImport>> vatStatements) {
StringBuilder result = new StringBuilder();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -32,11 +32,13 @@
import org.chorem.lima.LimaTechnicalException;
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.EntryBookService;
+import org.chorem.lima.business.api.FinancialStatementService;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.NewExportService;
import org.chorem.lima.business.ejb.csv.AccountModel;
import org.chorem.lima.business.ejb.csv.EntryBookModel;
import org.chorem.lima.business.ejb.csv.EntryModel;
+import org.chorem.lima.business.ejb.csv.FinancialStatementModel;
import org.chorem.lima.business.ejb.csv.FinancialTransactionModel;
import org.chorem.lima.business.ejb.csv.FiscalPeriodModel;
import org.chorem.lima.entity.Account;
@@ -45,6 +47,7 @@
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.EntryBookTopiaDao;
import org.chorem.lima.entity.EntryTopiaDao;
+import org.chorem.lima.entity.FinancialStatement;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionTopiaDao;
import org.chorem.lima.entity.FiscalPeriod;
@@ -59,6 +62,8 @@
import java.io.File;
import java.io.FileInputStream;
import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@@ -85,6 +90,9 @@
@EJB
protected FinancialTransactionService financialTransactionService;
+ @EJB
+ protected FinancialStatementService financialStatementService;
+
public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
@Override
@@ -253,4 +261,33 @@
return result;
}
+ @Override
+ public String exportFinancialStatement(String charset) throws Exception {
+ String stResult = null;
+ String tmpDir = System.getProperty(JAVA_IO_TMPDIR)+"/";
+ File fileResult = new File(tmpDir + "masterFinancialStatements.csv");
+
+ List<FinancialStatement> rootFinancialStatements = financialStatementService.getRootFinancialStatements();
+ if (rootFinancialStatements != null) {
+ FinancialStatementModel model = new FinancialStatementModel();
+ List<FinancialStatement> financialStatements = new ArrayList<FinancialStatement>();
+ getAllSubFinancialStatements(financialStatements, rootFinancialStatements);
+ Export.exportToFile(model, financialStatements, fileResult, Charset.forName(charset));
+ FileInputStream inputStream = new FileInputStream(fileResult);
+ stResult = IOUtils.toString(inputStream);
+
+ }
+ return stResult;
+ }
+
+ public List<FinancialStatement> getAllSubFinancialStatements(List<FinancialStatement> result, Collection<FinancialStatement> subFinancialStatements) {
+ if (subFinancialStatements != null) {
+ for (FinancialStatement subFinancialStatement : subFinancialStatements) {
+ result.add(subFinancialStatement);
+ getAllSubFinancialStatements(result, subFinancialStatement.getSubFinancialStatements());
+ }
+ }
+ return result;
+ }
+
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -23,7 +23,10 @@
*/
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.chorem.lima.beans.FinancialStatementImport;
import org.chorem.lima.business.AlreadyExistAccountException;
+import org.chorem.lima.business.AlreadyExistFinancialTransaction;
import org.chorem.lima.business.FiscalPeriodException;
import org.chorem.lima.business.ImportResult;
import org.chorem.lima.business.InvalidAccountNumberException;
@@ -33,21 +36,27 @@
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.EntryBookService;
import org.chorem.lima.business.api.EntryService;
+import org.chorem.lima.business.api.FinancialStatementService;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.FiscalPeriodService;
import org.chorem.lima.business.api.NewImportService;
import org.chorem.lima.business.ejb.csv.AccountModel;
import org.chorem.lima.business.ejb.csv.EntryBookModel;
import org.chorem.lima.business.ejb.csv.EntryModel;
+import org.chorem.lima.business.ejb.csv.FinancialStatementModel;
import org.chorem.lima.business.ejb.csv.FinancialTransactionModel;
import org.chorem.lima.business.ejb.csv.FiscalPeriodModel;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialStatement;
+import org.chorem.lima.entity.FinancialStatementImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
import org.nuiton.csv.Import;
import org.nuiton.csv.ImportModel;
+import org.nuiton.util.beans.Binder;
+import org.nuiton.util.beans.BinderFactory;
import javax.ejb.EJB;
import javax.ejb.Remote;
@@ -80,6 +89,9 @@
@EJB
protected EntryService entryService;
+ @EJB
+ protected FinancialStatementService financialStatementService;
+
@Override
public ImportResult importAccountAsCSV(String contents) {
InputStream contentStream = IOUtils.toInputStream(contents);
@@ -207,6 +219,57 @@
}
@Override
+ public ImportResult importFinancialStatementsAsCSV(String contents) {
+ ImportResult result = new ImportResult();
+
+ // import and save FinancialTransactions
+ InputStream contentStream = IOUtils.toInputStream(contents);
+ try {
+ ImportModel<FinancialStatementImport> model = new FinancialStatementModel();
+
+ Import<FinancialStatementImport> financialStatementImports = Import.newImport(model, contentStream);
+
+ List<FinancialStatement> allFinancialStatements = new ArrayList<>();
+ int lineIndex = 0;
+ for (FinancialStatementImport financialStatementBean : financialStatementImports) {
+ try {
+ Binder<FinancialStatementImport, FinancialStatement> binder = BinderFactory.newBinder(FinancialStatementImport.class, FinancialStatement.class);
+ FinancialStatement financialStatement = new FinancialStatementImpl();
+ binder.copyExcluding(financialStatementBean, financialStatement, FinancialStatement.PROPERTY_MASTER_FINANCIAL_STATEMENT);
+
+ FinancialStatement masterFinancialStatement = null;
+
+ if (StringUtils.isNotBlank(financialStatementBean.getMasterFinancialStatement())) {
+ // look for master financial statement
+ // the last financialStatement is the current one.
+ int index = allFinancialStatements.size() - 1;
+ while (index >= 0) {
+ FinancialStatement mfs = allFinancialStatements.get(index);
+ if (StringUtils.isNotBlank(mfs.getLabel()) && mfs.getLabel().equals(financialStatementBean.getMasterFinancialStatement())) {
+ masterFinancialStatement = mfs;
+ masterFinancialStatement.addSubFinancialStatements(financialStatement);
+ break;
+ }
+ index --;
+ }
+ }
+ allFinancialStatements.add(financialStatement);
+
+ financialStatementService.createFinancialStatement(masterFinancialStatement, financialStatement);
+ lineIndex++;
+ result.increaseCreated();
+ } catch (AlreadyExistFinancialTransaction e) {
+ result.getException().addException(lineIndex, e);
+ }
+ }
+
+ } finally {
+ IOUtils.closeQuietly(contentStream);
+ }
+ return result;
+ }
+
+ @Override
public List<ImportResult> importBackup(String entryBooks, String financialTransactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException {
List<ImportResult> results = new ArrayList<ImportResult>();
importAccountAsCSV(accounts);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -25,11 +25,13 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import org.apache.commons.lang3.StringUtils;
+import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.EntryBookService;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialStatement;
import org.chorem.lima.entity.FinancialTransaction;
import org.nuiton.csv.ValueFormatter;
import org.nuiton.csv.ValueParser;
@@ -318,4 +320,70 @@
}
};
+
+ protected static final ValueFormatter<FinancialStatementWayEnum> FINANCIAL_STATEMENT_WAY_ENUM_VALUE_FORMATTER = new ValueFormatter<FinancialStatementWayEnum>() {
+ @Override
+ public String format(FinancialStatementWayEnum value) {
+ String result;
+ if (value != null) {
+ result = value.name();
+ } else {
+ result = "";
+ }
+ return result;
+ }
+ };
+
+ protected static final ValueParser<FinancialStatementWayEnum> FINANCIAL_STATEMENT_WAY_ENUM_VALUE_PARSER = new ValueParser<FinancialStatementWayEnum>() {
+
+ @Override
+ public FinancialStatementWayEnum parse(String value) {
+ FinancialStatementWayEnum result = null;
+ if (StringUtils.isNotBlank(value)) {
+ value = StringUtils.trim(value.toUpperCase());
+ if (value.equals("BOTH")) {
+ result = FinancialStatementWayEnum.BOTH;
+ } else if (value.equals("DEBIT")) {
+ result = FinancialStatementWayEnum.DEBIT;
+ } else if (value.equals("CREDIT")) {
+ result = FinancialStatementWayEnum.CREDIT;
+ } else {
+ throw new UnsupportedOperationException("Unsupported statement way" + value);
+ }
+ }
+ return result;
+ }
+ };
+
+ // TODO DCossé 29/07/14 is there a way to do sothing like that ?
+// protected static final ValueParser<FinancialStatement> MASTER_FINANCIAL_STATEMENT_LABEL_TO_MASTER_FINANCIAL_STATEMENT_PARSER = new ValueParser<FinancialStatement>() {
+//
+// @Override
+// public FinancialStatement parse(String value) {
+// FinancialStatement result = null;
+// if (StringUtils.isNotBlank(value)){
+// // look for master financial statement
+// // the last financialStatement is the current one.
+// int index = allFinancialStatements.size() - 2;
+// while (index > 0) {
+// FinancialStatement masterFinancialStatement = allFinancialStatements.get(index);
+// if (StringUtils.isNotBlank(masterFinancialStatement.getLabel()) && masterFinancialStatement.getLabel().equals(value)) {
+// result = masterFinancialStatement;
+// break;
+// }
+// index --;
+// }
+// }
+// return result;
+// }
+// };
+
+ protected static final ValueFormatter<FinancialStatement> MASTER_FINANCIAL_STATEMENT_TO_MASTER_FINANCIAL_STATEMENT_LABEL_FORMATTER = new ValueFormatter<FinancialStatement>() {
+
+ @Override
+ public String format(FinancialStatement value) {
+ String result = value == null ? "" : value.getLabel();
+ return result;
+ }
+ };
}
Added: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialStatementModel.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialStatementModel.java (rev 0)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialStatementModel.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -0,0 +1,53 @@
+package org.chorem.lima.business.ejb.csv;
+
+import org.chorem.lima.beans.FinancialStatementImport;
+import org.chorem.lima.beans.FinancialStatementImportImpl;
+import org.chorem.lima.entity.FinancialStatement;
+import org.chorem.lima.entity.FinancialStatementImpl;
+import org.nuiton.csv.ExportModel;
+import org.nuiton.csv.ExportableColumn;
+import org.nuiton.csv.ModelBuilder;
+
+/**
+ * Created by davidcosse on 28/07/14.
+ */
+public class FinancialStatementModel extends AbstractLimaModel<FinancialStatementImport> implements ExportModel<FinancialStatement> {
+
+ public FinancialStatementModel() {
+ super(';');
+ newMandatoryColumn("label", FinancialStatement.PROPERTY_LABEL);
+ newOptionalColumn("header", FinancialStatement.PROPERTY_HEADER, O_N_PARSER);
+ newOptionalColumn("accounts", FinancialStatement.PROPERTY_ACCOUNTS);
+ newOptionalColumn("debitAccounts", FinancialStatement.PROPERTY_DEBIT_ACCOUNTS);
+ newOptionalColumn("creditAccounts", FinancialStatement.PROPERTY_CREDIT_ACCOUNTS);
+ newOptionalColumn("provisionDeprecationAccounts", FinancialStatement.PROPERTY_PROVISION_DEPRECATION_ACCOUNTS);
+ newOptionalColumn("subAmount", FinancialStatement.PROPERTY_SUB_AMOUNT, O_N_PARSER);
+ newOptionalColumn("headerAmount", FinancialStatement.PROPERTY_HEADER_AMOUNT, O_N_PARSER);
+ newOptionalColumn("masterFinancialStatement", FinancialStatement.PROPERTY_MASTER_FINANCIAL_STATEMENT);
+ newOptionalColumn("financialStatementWay", FinancialStatement.PROPERTY_WAY, FINANCIAL_STATEMENT_WAY_ENUM_VALUE_PARSER);
+ }
+
+ @Override
+ public Iterable<ExportableColumn<FinancialStatement, Object>> getColumnsForExport() {
+ ModelBuilder<FinancialStatement> modelBuilder = new ModelBuilder<>();
+
+ modelBuilder.newColumnForExport("label", FinancialStatement.PROPERTY_LABEL);
+ modelBuilder.newColumnForExport("header", FinancialStatement.PROPERTY_HEADER, O_N_FORMATTER);
+ modelBuilder.newColumnForExport("accounts", FinancialStatement.PROPERTY_ACCOUNTS);
+ modelBuilder.newColumnForExport("debitAccounts", FinancialStatement.PROPERTY_DEBIT_ACCOUNTS);
+ modelBuilder.newColumnForExport("creditAccounts", FinancialStatement.PROPERTY_CREDIT_ACCOUNTS);
+ modelBuilder.newColumnForExport("provisionDeprecationAccounts", FinancialStatement.PROPERTY_PROVISION_DEPRECATION_ACCOUNTS);
+ modelBuilder.newColumnForExport("subAmount", FinancialStatement.PROPERTY_SUB_AMOUNT, O_N_FORMATTER);
+ modelBuilder.newColumnForExport("headerAmount", FinancialStatement.PROPERTY_HEADER_AMOUNT,O_N_FORMATTER);
+ modelBuilder.newColumnForExport("masterFinancialStatement", FinancialStatement.PROPERTY_MASTER_FINANCIAL_STATEMENT, MASTER_FINANCIAL_STATEMENT_TO_MASTER_FINANCIAL_STATEMENT_LABEL_FORMATTER);
+ modelBuilder.newColumnForExport("financialStatementWay", FinancialStatement.PROPERTY_WAY, FINANCIAL_STATEMENT_WAY_ENUM_VALUE_FORMATTER);
+ return (Iterable) modelBuilder.getColumnsForExport();
+ }
+
+ @Override
+ public FinancialStatementImport newEmptyInstance() {
+ FinancialStatementImpl financialStatement = new FinancialStatementImpl();
+// allFinancialStatements.add(financialStatement);
+ return new FinancialStatementImportImpl();
+ }
+}
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -294,4 +294,17 @@
}
return results;
}
+
+
+ @Test
+ public void testImportFiscalStatementsAsCSV() throws Exception {
+ String bcr_developed = IOUtils.toString(ImportServiceImplTest.class.getResourceAsStream("/import/bcr_developed.csv"));
+
+ ImportResult result;
+
+ result = newImportService.importFinancialStatementsAsCSV(bcr_developed);
+
+ Assert.assertEquals(162, result.getNbCreated());
+ Assert.assertTrue(result.getException().getAllExceptionsByLine().isEmpty());
+ }
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -46,7 +46,7 @@
String exportFiscalPeriodsAsCSV(String charset);
- String exportFinancialTransactionsAsCSV(String charset);
+ String exportEntriesAsCSV(String charset, Boolean humanReadable);
- String exportEntriesAsCSV(String charset, Boolean humanReadable);
+ String exportFinancialStatement(String charset) throws Exception;
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -41,5 +41,7 @@
ImportResult importEntriesAsCSV(String contents);
+ ImportResult importFinancialStatementsAsCSV(String contents);
+
List<ImportResult> importBackup(String entryBooks, String transactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException;
}
Modified: trunk/lima-callao/src/main/xmi/accounting-model.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-07-29 14:06:49 UTC (rev 3871)
@@ -168,8 +168,12 @@
createFile(filePath, charset.name(), datas);
break;
case CSV_FINANCIALSTATEMENTS_EXPORT:
- datas = exportService.exportFinancialStatementChartAsCSV();
- createFile(filePath, charset.name(), datas);
+ try {
+ datas = newExportService.exportFinancialStatement(charset.name());
+ createFile(filePath, charset.name(), datas);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
break;
case CSV_VAT_EXPORT:
datas = exportService.exportVatStatementChartAsCSV();
@@ -203,7 +207,9 @@
break;
case CSV_FINANCIALSTATEMENTS_IMPORT:
datas = extractFile(filePath, charset.name());
- result = importService.importAsCSV(datas, ImportExportEntityEnum.FINANCIALSTATEMENT);
+ importResult = newImportService.importFinancialStatementsAsCSV(datas);
+ // TODO DCossé 24/07/14 change result
+ result = "SUCCESS";
break;
case CSV_ENTRIES_IMPORT:
datas = extractFile(filePath, charset.name());
Modified: trunk/lima-swing/src/main/resources/import/bcr_base.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/bcr_base.csv 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-swing/src/main/resources/import/bcr_base.csv 2014-07-29 14:06:49 UTC (rev 3871)
@@ -1,162 +1,163 @@
-"FNST";"BILAN ACTIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"Capital Souscrit non appelé";"false";"109";" ";" ";" ";"false";"false";"BILAN ACTIF";""
-"FNST";"BILAN PASSIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"CREDIT"
-"FNST";"COMPTE DE RESULTAT";"true";"";"";"";"";"false";"false";"";"BOTH"
-"FNST";"Capital (dont versé?)";"false";"101, 108";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"CHARGES";"true";" ";" ";" ";" ";"true";"false";"COMPTE DE RESULTAT";"DEBIT"
-"FNST";"PRODUITS";"true";"";"";"";"";"true";"false";"COMPTE DE RESULTAT";"CREDIT"
-"FNST";"ACTIF IMMOBILISÉ";"true";" ";" ";" ";" ";"true";"false";"BILAN ACTIF";"BOTH"
-"FNST";"ACTIF CIRCULANT";"true";"";"";"";"";"true";"false";"BILAN ACTIF";"BOTH"
-"FNST";"CHARGES D'EXPLOITATION";"true";"";"";"";"";"true";"false";"CHARGES";"DEBIT"
-"FNST";"Coût d'achat des marchandises";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Stocks et en-cours";"true";"";"";"";"";"false";"true";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Marchandises";"false";"37";"";"";"397";"false";"false";"Stocks et en-cours";""
-"FNST";"Variations de stocks de march.";"false";"6037";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Achat de marchandises";"false";"607, 6087, 6097";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Immobilisations incorporelles";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Frais d'établissement";"false";"201";"";"";"2801";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Frais de recherche et développement";"false";"203";"";"";"2803";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires";"false";"205";"";"";"2805, 2905";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Fonds commercial";"false";"206, 207";"";"";"2807, 2906, 2907";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Autres";"false";"208";"";"";"2808, 2908";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Immobilisations incorporelles en cours";"false";"232";"";"";"2932";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Avances et acomptes";"false";"237";"";"";"";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Immobilisations corporelles";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Terrains";"false";"211, 212";"";"";"2811, 2812, 2911";"false";"false";"Immobilisations corporelles";""
-"FNST";"Constructions";"false";"213, 214";"";"";"2813, 2814";"false";"false";"Immobilisations corporelles";""
-"FNST";"Installations techniques, matériels, et outillage industriels";"false";"215";"";"";"2815";"false";"false";"Immobilisations corporelles";""
-"FNST";"Immobilisations corporelles en cours";"false";"231";"";"";"2931";"false";"false";"Immobilisations corporelles";""
-"FNST";"Immobilisations financières";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Participations";"false";"261, 266";"";"";"2961, 2966";"false";"false";"Immobilisations financières";""
-"FNST";"Créances rattachées à des participations";"false";"267, 268";"";"";"2967, 2968";"false";"false";"Immobilisations financières";""
-"FNST";"Titres immobilisés de l'activité de portefeuille";"false";"273";"";"";"2973";"false";"false";"Immobilisations financières";""
-"FNST";"Autres titres immobilisés";"false";"271, 272, 27682";"";"";"2971, 2972";"false";"false";"Immobilisations financières";""
-"FNST";"Prêts";"false";"274, 27684";"";"";"2974";"false";"false";"Immobilisations financières";""
-"FNST";"Matières premières et autres approvisionnements";"false";"31, 32";"";"";"391, 392";"false";"false";"Stocks et en-cours";""
-"FNST";"En cours de production (biens et services)";"false";"33, 34";"";"";"393, 394";"false";"false";"Stocks et en-cours";""
-"FNST";"Produits intermédiaires et finis";"false";"35";"";"";"395";"false";"false";"Stocks et en-cours";""
-"FNST";"Avances et acomptes versés sur commandes";"false";"4091";"";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Créances";"true";"";"";"";"";"false";"false";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Valeurs mobilières de placement";"true";"";"";"";"";"false";"false";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Actions propres";"false";"502";"";"";"59";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Autres titres";"false";"50 -502 -509";"";"";"59";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Disponibilités";"false";"53, 54 -5181 -519";"51";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Charges constatées d'avance";"false";"486";"";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Instrument de trésorerie";"false";"";"52";"";"";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Charges à répartir sur plusieurs exercices";"false";"481";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Primes de remboursement des emprunts";"false";"169";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Ecarts de conversion Actif";"false";"476";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Primes d'émission, de fusion, d'apport";"false";"104";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Ecart de réévaluation";"false";"105";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Ecart d'équivalence";"false";"107";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Réserves";"true";"";"";"";"";"false";"false";"CAPITAUX PROPRES";"BOTH"
-"FNST";"Réserve légale";"false";"1061";"";"";"";"false";"false";"Réserves";""
-"FNST";"Réserves statutaires ou contractuelles";"false";"1063";"";"";"";"false";"false";"Réserves";""
-"FNST";"Réserves réglementées";"false";"1062, 1064";"";"";"";"false";"false";"Réserves";""
-"FNST";"Report à nouveau";"false";"110,119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7,6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Subventions d'investissement";"false";"13";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Provisions réglementées";"false";"14";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"AUTRES FONDS PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Produits des émissions de titres participatifs";"false";"1671";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
-"FNST";"Avances conditionnées";"false";"1674";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
-"FNST";"PROVISIONS POUR RISQUES ET CHARGES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Provisions pour risques";"false";"151";"";"";"";"false";"false";"PROVISIONS POUR RISQUES ET CHARGES";""
-"FNST";"Provisions pour charges";"false";"15 -151";"";"";"";"false";"false";"PROVISIONS POUR RISQUES ET CHARGES";""
-"FNST";"DETTES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Emprunts obligataires convertibles";"false";"161, 16881";"";"";"";"false";"false";"DETTES";""
-"FNST";"Autres emprunts obligataires";"false";"163, 16683";"";"";"";"false";"false";"DETTES";""
-"FNST";"Emprunts et dettes auprès établissements de crédits";"false";"164, 16684, 5181, 519";"";"512, 514, 517";"";"false";"false";"DETTES";""
-"FNST";"Emprunts et dettes financières diverses";"false";"165, 166, 1675, 168, 16883, 17, 426 -16881 -457";"";"45";"";"false";"false";"DETTES";""
-"FNST";"Avances et acomptes reçues sur commandes en cours";"false";"4191";"";"";"";"false";"false";"DETTES";""
-"FNST";"Ecarts de conversion passif";"false";"477";"";"";"";"false";"false";"BILAN PASSIF";""
-"FNST";"Coût d'achats de matières premières et autres approvisionnements";"true";"";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Achats de matières premières et autres approvisionnements";"false";"601, 6081, 6091";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Variation des stock";"false";"6031, 6032";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Salaires et traitements";"false";"641, 644, 648";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Charges sociales";"false";"645, 646, 647";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Dotations aux amortis. & provisions";"true";" ";" ";" ";" ";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Autres charges";"false";"65 -655";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Quotes-parts de résultat sur opérations faites en commun";"false";"655";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Charges financières";"true";"";"";"";"";"false";"true";"CHARGES";"DEBIT"
-"FNST";"Dotations aux amortissements et provisions";"false";"686";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Intérêts et charges assimilées";"false";"661, 664, 665, 668";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Différences négatives de change";"false";"666";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Charges nettes sur cessions de valeurs mobilières de placement";"false";"667";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Charges exceptionnelles";"true";"";"";"";"";"false";"true";"CHARGES";"DEBIT"
-"FNST";"Sur opérations de gestion";"false";"671";"";"";"";"false";"false";"Charges exceptionnelles";""
-"FNST";"Participation des salariés aux résultats";"false";"691";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Impôts sur les bénéfices";"false";"695, 697, 689, 698, 699, 789";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Produits d'exploitation";"true";"";"";"";"";"true";"false";"PRODUITS";"CREDIT"
-"FNST";"Production vendue";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
-"FNST";"Ventes";"false";"701, 702, 703, 707, 708, 7091, 7092, 7097, 7098";"";"";"";"false";"false";"Production vendue";""
-"FNST";"Travaux";"false";"704, 708, 7094, 7098";"";"";"";"false";"false";"Production vendue";""
-"FNST";"Autres produits d'exploitation";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
-"FNST";"Quote-parts de résultat sur opérations faites en commun";"false";"755";"";"";"";"false";"false";"PRODUITS";""
-"FNST";"Produits financiers";"true";"";"";"";"";"false";"true";"PRODUITS";"CREDIT"
-"FNST";"De participations";"false";"761";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"D'autres valeurs mobilières et créances de l'actif immobilisé";"false";"762";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Autres intérêts et produits assimilés";"false";"763, 764, 765, 768";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Reprises sur provisions et transfers de charges";"false";"786, 796";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Différences positives de change";"false";"766";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Produits nets sur cessions de valeurs mobilières de placement";"false";"767";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Produits exceptionnels";"true";"";"";"";"";"false";"true";"PRODUITS";"CREDIT"
-"FNST";"Reprises sur provisions et transferts de charges";"false";"787, 797";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"Sur immobilisations : dotations aux amortissements";"false";"6811, 6812";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Sur immobilisations : dotations aux provisions";"false";"6816";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Sur actif circulant : dotations aux provisions";"false";"6817";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Pour risques et charges : dotations aux provisions";"false";"6815";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Créance d'exploitation";"true";"";"";"";"";"false";"false";"Créances";"BOTH"
-"FNST";"Créances clients et Comptes rattachés";"false";"410, 411, 413, 416, 418";"";"";"491";"false";"false";"Créance d'exploitation";""
-"FNST";"Créances diverses";"false";"4411, 4418, 462, 465, 4687";"443, 444, 451, 456, 458, 467 -4562";"";"";"false";"false";"Créances";""
-"FNST";"Capital souscrit et appelé, non versé";"false";"4562";"";"";"";"false";"false";"Créances";""
-"FNST";"Dettes d'exploitation";"true";"";"";"";"";"false";"false";"DETTES";"BOTH"
-"FNST";"Dettes fournisseurs et comptes rattachés";"false";"400, 401, 403, 4081, 4088";"";"";"";"false";"false";"Dettes d'exploitation";""
-"FNST";"Dettes fiscales et sociales";"false";"421, 422, 424, 427, 4282, 4286, 431, 437, 4386, 4455, 4457, 446, 447, 4486";"";"4458";"";"false";"false";"Dettes d'exploitation";""
-"FNST";"Dettes diverses";"true";"";"";"";"";"false";"false";"DETTES";"BOTH"
-"FNST";"Dettes sur immobilisations et Comptes rattachés";"false";"269, 279, 404, 405, 4084";"";"";"";"false";"false";"Dettes diverses";""
-"FNST";"Dettes fiscales (impôts sur les bénéfices)";"false";"";"";"444";"";"false";"false";"Dettes diverses";""
-"FNST";"Sur opérations en capital";"false";"775, 777, 778";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"Prestation de services";"false";"705, 706, 708, 7095, 7096, 7098";"";"";"";"false";"false";"Production vendue";""
-"FNST";"Production stockée";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
-"FNST";"En-cours de production de biens";"false";"7133";"";"";"";"false";"false";"Production stockée";""
-"FNST";"En-cours de production de services";"false";"7134";"";"";"";"false";"false";"Production stockée";""
-"FNST";"Produits";"false";"7135";"";"";"";"false";"false";"Production stockée";""
-"FNST";"Reprises sur provisions (et amortissements), transferts de charges";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
-"FNST";"Reprises sur provisions (et amortissements)";"false";"781";"";"";"";"false";"false";"Reprises sur provisions (et amortissements), transferts de charges";""
-"FNST";"Transferts de charges";"false";"791";"";"";"";"false";"false";"Reprises sur provisions (et amortissements), transferts de charges";""
-"FNST";"Production exceptionnels sur opérations en capital";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
-"FNST";"Produits des cessions d'éléments d'actif";"false";"775";"";"";"";"false";"false";"Production exceptionnels sur opérations en capital";""
-"FNST";"Subvention d'investissement virées au résultat de l'exercice";"false";"778";"";"";"";"false";"false";"Production exceptionnels sur opérations en capital";""
-"FNST";"Autres approvisionnements";"false";"602, 6082, 6092";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Autres charges et charges externes";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Achats de sous-traitance";"false";"604, 6084, 6094, 6095";"";"";"";"false";"false";"Autres charges et charges externes";""
-"FNST";"Achats non stockés de matières et fournitures";"false";"605, 606, 6085, 6086, 6096";"";"";"";"false";"false";"Autres charges et charges externes";""
-"FNST";"Services extérieurs";"true";"";"";"";"";"false";"true";"Autres charges et charges externes";"DEBIT"
-"FNST";"Personnel extérieur";"false";"621";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Loyers en crédit-bail mobilier";"false";"6122";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Loyers en crédit-bail immobilier";"false";"";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Impôts, taxes et versements assimilés";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"sur rémunérations";"false";"631, 633";"";"";"";"false";"false";"Impôts, taxes et versements assimilés";""
-"FNST";"autres";"false";"635, 637";"";"";"";"false";"false";"Impôts, taxes et versements assimilés";""
-"FNST";"sur opération en capital";"true";"";"";"";"";"false";"true";"Charges exceptionnelles";"DEBIT"
-"FNST";"valeurs comptables des éléments immobiliers et financiers cédés";"false";"675";"";"";"";"false";"false";"sur opération en capital";""
-"FNST";"Dotations aux amortissements et aux provisions";"true";"";"";"";"";"false";"true";"Charges exceptionnelles";"DEBIT"
-"FNST";"Dotations aux provisions réglementées";"false";"6872, 6873, 6874";"";"";"";"false";"false";"Dotations aux amortissements et aux provisions";""
-"FNST";"dotations aux amortissements et aux provisions";"false";"6871, 6875, 6876";"";"";"";"false";"false";"Dotations aux amortissements et aux provisions";""
-"FNST";"Produits constatés d'avance";"false";"487";"";"";"";"false";"false";"DETTES";""
-"FNST";"Production immobilisée";"false";"72, 73";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Subventions d'exploitation";"false";"74";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Autres";"false";"275, 2761, 27685, 27688";"";"";"2975, 2976";"false";"false";"Immobilisations financières";""
-"FNST";"Autres";"false";"218";"";"";"2818";"false";"false";"Immobilisations corporelles";""
-"FNST";"Autres";"false";"1068";"";"";"";"false";"false";"Réserves";""
-"FNST";"Autres";"false";"";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
-"FNST";"Autres";"false";"4096, 4097, 4098, 425, 4287, 4387, 4417, 4452, 4456, 4487";"4458";"";"495, 496";"false";"false";"Créance d'exploitation";""
-"FNST";"Autres";"false";"4196, 4197, 4198, 4419";"";"";"";"false";"false";"Dettes d'exploitation";""
-"FNST";"Autres";"false";"424, 426, 4284, 4419, 442, 4486, 457, 464, 467, 4686, 509";"";"443, 451, 455, 456, 458";"";"false";"false";"Dettes diverses";""
-"FNST";"Autres";"false";"61, 62 -6122 -6125 -621";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Autres";"false";"75 - 755";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Avances et acomptes";"false";"238";"";"";"";"false";"false";"Immobilisations corporelles";""
-"FNST";"Sur opérations de gestion";"false";"771";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"autres";"false";"678";"";"";"";"false";"false";"sur opération en capital";""
+label;header;accounts;debitAccounts;creditAccounts;provisionDeprecationAccounts;subAmount;headerAmount;masterFinancialStatement;financialStatementWay
+BILAN ACTIF;O;;;;;O;N;;BOTH
+Capital Souscrit non appelé;N;109; ; ; ;N;N;BILAN ACTIF;
+ACTIF IMMOBILISÉ;O; ; ; ; ;O;N;BILAN ACTIF;BOTH
+Immobilisations incorporelles;O;;;;;N;N;ACTIF IMMOBILISÉ;BOTH
+Frais d'établissement;N;201;;;2801;N;N;Immobilisations incorporelles;
+Frais de recherche et développement;N;203;;;2803;N;N;Immobilisations incorporelles;
+"Concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires";N;205;;;"2805, 2905";N;N;Immobilisations incorporelles;
+Fonds commercial;N;"206, 207";;;"2807, 2906, 2907";N;N;Immobilisations incorporelles;
+Autres;N;208;;;"2808, 2908";N;N;Immobilisations incorporelles;
+Immobilisations incorporelles en cours;N;232;;;2932;N;N;Immobilisations incorporelles;
+Avances et acomptes;N;237;;;;N;N;Immobilisations incorporelles;
+Immobilisations financières;O;;;;;N;N;ACTIF IMMOBILISÉ;BOTH
+Participations;N;"261, 266";;;"2961, 2966";N;N;Immobilisations financières;
+Créances rattachées à des participations;N;"267, 268";;;"2967, 2968";N;N;Immobilisations financières;
+Titres immobilisés de l'activité de portefeuille;N;273;;;2973;N;N;Immobilisations financières;
+Autres titres immobilisés;N;"271, 272, 27682";;;"2971, 2972";N;N;Immobilisations financières;
+Prêts;N;"274, 27684";;;2974;N;N;Immobilisations financières;
+Autres;N;"275, 2761, 27685, 27688";;;"2975, 2976";N;N;Immobilisations financières;
+Immobilisations corporelles;O;;;;;N;N;ACTIF IMMOBILISÉ;BOTH
+Terrains;N;"211, 212";;;"2811, 2812, 2911";N;N;Immobilisations corporelles;
+Constructions;N;"213, 214";;;"2813, 2814";N;N;Immobilisations corporelles;
+"Installations techniques, matériels, et outillage industriels";N;215;;;2815;N;N;Immobilisations corporelles;
+Immobilisations corporelles en cours;N;231;;;2931;N;N;Immobilisations corporelles;
+Autres;N;218;;;2818;N;N;Immobilisations corporelles;
+Avances et acomptes;N;238;;;;N;N;Immobilisations corporelles;
+ACTIF CIRCULANT;O;;;;;O;N;BILAN ACTIF;BOTH
+Stocks et en-cours;O;;;;;N;O;ACTIF CIRCULANT;BOTH
+Marchandises;N;37;;;397;N;N;Stocks et en-cours;
+Matières premières et autres approvisionnements;N;"31, 32";;;"391, 392";N;N;Stocks et en-cours;
+En cours de production (biens et services);N;"33, 34";;;"393, 394";N;N;Stocks et en-cours;
+Produits intermédiaires et finis;N;35;;;395;N;N;Stocks et en-cours;
+Avances et acomptes versés sur commandes;N;4091;;;;N;N;ACTIF CIRCULANT;
+Disponibilités;N;"53, 54 -5181 -519";51;;;N;N;ACTIF CIRCULANT;
+Charges constatées d'avance;N;486;;;;N;N;ACTIF CIRCULANT;
+Valeurs mobilières de placement;O;;;;;N;N;ACTIF CIRCULANT;BOTH
+Actions propres;N;502;;;59;N;N;Valeurs mobilières de placement;
+Autres titres;N;50 -502 -509;;;59;N;N;Valeurs mobilières de placement;
+Instrument de trésorerie;N;;52;;;N;N;Valeurs mobilières de placement;
+Créances;O;;;;;N;N;ACTIF CIRCULANT;BOTH
+Créances diverses;N;"4411, 4418, 462, 465, 4687";"443, 444, 451, 456, 458, 467 -4562";;;N;N;Créances;
+"Capital souscrit et appelé, non versé";N;4562;;;;N;N;Créances;
+Créance d'exploitation;O;;;;;N;N;Créances;BOTH
+Créances clients et Comptes rattachés;N;"410, 411, 413, 416, 418";;;491;N;N;Créance d'exploitation;
+Autres;N;"4096, 4097, 4098, 425, 4287, 4387, 4417, 4452, 4456, 4487";4458;;"495, 496";N;N;Créance d'exploitation;
+Charges à répartir sur plusieurs exercices;N;481;;;;N;N;BILAN ACTIF;
+Primes de remboursement des emprunts;N;169;;;;N;N;BILAN ACTIF;
+Ecarts de conversion Actif;N;476;;;;N;N;BILAN ACTIF;
+BILAN PASSIF;O;;;;;O;N;;BOTH
+CAPITAUX PROPRES;O;;;;;O;N;BILAN PASSIF;CREDIT
+Capital (dont versé?);N;"101, 108";;;;N;N;CAPITAUX PROPRES;
+"Primes d'émission, de fusion, d'apport";N;104;;;;N;N;CAPITAUX PROPRES;
+Ecart de réévaluation;N;105;;;;N;N;CAPITAUX PROPRES;
+Ecart d'équivalence;N;107;;;;N;N;CAPITAUX PROPRES;
+Report à nouveau;N;"110,119";;;;N;N;CAPITAUX PROPRES;
+RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE);N;"7,6";;;;N;N;CAPITAUX PROPRES;
+Subventions d'investissement;N;13;;;;N;N;CAPITAUX PROPRES;
+Provisions réglementées;N;14;;;;N;N;CAPITAUX PROPRES;
+Réserves;O;;;;;N;N;CAPITAUX PROPRES;BOTH
+Réserve légale;N;1061;;;;N;N;Réserves;
+Réserves statutaires ou contractuelles;N;1063;;;;N;N;Réserves;
+Réserves réglementées;N;"1062, 1064";;;;N;N;Réserves;
+Autres;N;1068;;;;N;N;Réserves;
+PROVISIONS POUR RISQUES ET CHARGES;O;;;;;O;N;BILAN PASSIF;BOTH
+Provisions pour risques;N;151;;;;N;N;PROVISIONS POUR RISQUES ET CHARGES;
+Provisions pour charges;N;15 -151;;;;N;N;PROVISIONS POUR RISQUES ET CHARGES;
+Ecarts de conversion passif;N;477;;;;N;N;BILAN PASSIF;
+DETTES;O;;;;;O;N;BILAN PASSIF;BOTH
+Emprunts obligataires convertibles;N;"161, 16881";;;;N;N;DETTES;
+Autres emprunts obligataires;N;"163, 16683";;;;N;N;DETTES;
+Emprunts et dettes auprès établissements de crédits;N;"164, 16684, 5181, 519";;"512, 514, 517";;N;N;DETTES;
+Emprunts et dettes financières diverses;N;"165, 166, 1675, 168, 16883, 17, 426 -16881 -457";;45;;N;N;DETTES;
+Avances et acomptes reçues sur commandes en cours;N;4191;;;;N;N;DETTES;
+Produits constatés d'avance;N;487;;;;N;N;DETTES;
+Dettes d'exploitation;O;;;;;N;N;DETTES;BOTH
+Dettes fournisseurs et comptes rattachés;N;"400, 401, 403, 4081, 4088";;;;N;N;Dettes d'exploitation;
+Dettes fiscales et sociales;N;"421, 422, 424, 427, 4282, 4286, 431, 437, 4386, 4455, 4457, 446, 447, 4486";;4458;;N;N;Dettes d'exploitation;
+Autres;N;"4196, 4197, 4198, 4419";;;;N;N;Dettes d'exploitation;
+Dettes diverses;O;;;;;N;N;DETTES;BOTH
+Dettes sur immobilisations et Comptes rattachés;N;"269, 279, 404, 405, 4084";;;;N;N;Dettes diverses;
+Dettes fiscales (impôts sur les bénéfices);N;;;444;;N;N;Dettes diverses;
+Autres;N;"424, 426, 4284, 4419, 442, 4486, 457, 464, 467, 4686, 509";;"443, 451, 455, 456, 458";;N;N;Dettes diverses;
+AUTRES FONDS PROPRES;O;;;;;O;N;BILAN PASSIF;BOTH
+Produits des émissions de titres participatifs;N;1671;;;;N;N;AUTRES FONDS PROPRES;
+Avances conditionnées;N;1674;;;;N;N;AUTRES FONDS PROPRES;
+Autres;N;;;;;N;N;AUTRES FONDS PROPRES;
+COMPTE DE RESULTAT;O;;;;;N;N;;BOTH
+CHARGES;O; ; ; ; ;O;N;COMPTE DE RESULTAT;DEBIT
+Quotes-parts de résultat sur opérations faites en commun;N;655;;;;N;N;CHARGES;
+Charges financières;O;;;;;N;O;CHARGES;DEBIT
+Dotations aux amortissements et provisions;N;686;;;;N;N;Charges financières;
+Intérêts et charges assimilées;N;"661, 664, 665, 668";;;;N;N;Charges financières;
+Différences négatives de change;N;666;;;;N;N;Charges financières;
+Charges nettes sur cessions de valeurs mobilières de placement;N;667;;;;N;N;Charges financières;
+Participation des salariés aux résultats;N;691;;;;N;N;CHARGES;
+Impôts sur les bénéfices;N;"695, 697, 689, 698, 699, 789";;;;N;N;CHARGES;
+CHARGES D'EXPLOITATION;O;;;;;O;N;CHARGES;DEBIT
+Coût d'achat des marchandises;O;;;;;N;O;CHARGES D'EXPLOITATION;DEBIT
+Variations de stocks de march.;N;6037;;;;N;N;Coût d'achat des marchandises;
+Achat de marchandises;N;"607, 6087, 6097";;;;N;N;Coût d'achat des marchandises;
+Salaires et traitements;N;"641, 644, 648";;;;N;N;CHARGES D'EXPLOITATION;
+Charges sociales;N;"645, 646, 647";;;;N;N;CHARGES D'EXPLOITATION;
+Autres charges;N;65 -655;;;;N;N;CHARGES D'EXPLOITATION;
+Dotations aux amortis. & provisions;O; ; ; ; ;N;O;CHARGES D'EXPLOITATION;DEBIT
+Sur immobilisations : dotations aux amortissements;N;"6811, 6812";;;;N;N;Dotations aux amortis. & provisions;
+Sur immobilisations : dotations aux provisions;N;6816;;;;N;N;Dotations aux amortis. & provisions;
+Sur actif circulant : dotations aux provisions;N;6817;;;;N;N;Dotations aux amortis. & provisions;
+Pour risques et charges : dotations aux provisions;N;6815;;;;N;N;Dotations aux amortis. & provisions;
+Coût d'achats de matières premières et autres approvisionnements;O;;;;;N;N;CHARGES D'EXPLOITATION;DEBIT
+Achats de matières premières et autres approvisionnements;N;"601, 6081, 6091";;;;N;N;Coût d'achats de matières premières et autres approvisionnements;
+Variation des stock;N;"6031, 6032";;;;N;N;Coût d'achats de matières premières et autres approvisionnements;
+Autres approvisionnements;N;"602, 6082, 6092";;;;N;N;Coût d'achats de matières premières et autres approvisionnements;
+Autres charges et charges externes;O;;;;;N;O;CHARGES D'EXPLOITATION;DEBIT
+Achats de sous-traitance;N;"604, 6084, 6094, 6095";;;;N;N;Autres charges et charges externes;
+Achats non stockés de matières et fournitures;N;"605, 606, 6085, 6086, 6096";;;;N;N;Autres charges et charges externes;
+Services extérieurs;O;;;;;N;O;Autres charges et charges externes;DEBIT
+Personnel extérieur;N;621;;;;N;N;Services extérieurs;
+Loyers en crédit-bail mobilier;N;6122;;;;N;N;Services extérieurs;
+Loyers en crédit-bail immobilier;N;;;;;N;N;Services extérieurs;
+Autres;N;"61, 62 -6122 -6125 -621";;;;N;N;Services extérieurs;
+"Impôts, taxes et versements assimilés";O;;;;;N;O;CHARGES D'EXPLOITATION;DEBIT
+sur rémunérations;N;"631, 633";;;;N;N;"Impôts, taxes et versements assimilés";
+autres;N;"635, 637";;;;N;N;"Impôts, taxes et versements assimilés";
+Charges exceptionnelles;O;;;;;N;O;CHARGES;DEBIT
+Sur opérations de gestion;N;671;;;;N;N;Charges exceptionnelles;
+Dotations aux amortissements et aux provisions;O;;;;;N;O;Charges exceptionnelles;DEBIT
+Dotations aux provisions réglementées;N;"6872, 6873, 6874";;;;N;N;Dotations aux amortissements et aux provisions;
+dotations aux amortissements et aux provisions;N;"6871, 6875, 6876";;;;N;N;Dotations aux amortissements et aux provisions;
+sur opération en capital;O;;;;;N;O;Charges exceptionnelles;DEBIT
+valeurs comptables des éléments immobiliers et financiers cédés;N;675;;;;N;N;sur opération en capital;
+autres;N;678;;;;N;N;sur opération en capital;
+PRODUITS;O;;;;;O;N;COMPTE DE RESULTAT;CREDIT
+Produits d'exploitation;O;;;;;O;N;PRODUITS;CREDIT
+Production vendue;O;;;;;N;O;Produits d'exploitation;CREDIT
+Ventes;N;"701, 702, 703, 707, 708, 7091, 7092, 7097, 7098";;;;N;N;Production vendue;
+Travaux;N;"704, 708, 7094, 7098";;;;N;N;Production vendue;
+Prestation de services;N;"705, 706, 708, 7095, 7096, 7098";;;;N;N;Production vendue;
+Autres produits d'exploitation;O;;;;;N;O;Produits d'exploitation;CREDIT
+Production stockée;O;;;;;N;O;Autres produits d'exploitation;CREDIT
+En-cours de production de biens;N;7133;;;;N;N;Production stockée;
+En-cours de production de services;N;7134;;;;N;N;Production stockée;
+Produits;N;7135;;;;N;N;Production stockée;
+"Reprises sur provisions (et amortissements), transferts de charges";O;;;;;N;O;Autres produits d'exploitation;CREDIT
+Reprises sur provisions (et amortissements);N;781;;;;N;N;"Reprises sur provisions (et amortissements), transferts de charges";
+Transferts de charges;N;791;;;;N;N;"Reprises sur provisions (et amortissements), transferts de charges";
+Production exceptionnels sur opérations en capital;O;;;;;N;O;Autres produits d'exploitation;CREDIT
+Produits des cessions d'éléments d'actif;N;775;;;;N;N;Production exceptionnels sur opérations en capital;
+Subvention d'investissement virées au résultat de l'exercice;N;778;;;;N;N;Production exceptionnels sur opérations en capital;
+Production immobilisée;N;"72, 73";;;;N;N;Autres produits d'exploitation;
+Subventions d'exploitation;N;74;;;;N;N;Autres produits d'exploitation;
+Autres;N;75 - 755;;;;N;N;Autres produits d'exploitation;
+Quote-parts de résultat sur opérations faites en commun;N;755;;;;N;N;PRODUITS;
+Produits financiers;O;;;;;N;O;PRODUITS;CREDIT
+De participations;N;761;;;;N;N;Produits financiers;
+D'autres valeurs mobilières et créances de l'actif immobilisé;N;762;;;;N;N;Produits financiers;
+Autres intérêts et produits assimilés;N;"763, 764, 765, 768";;;;N;N;Produits financiers;
+Reprises sur provisions et transfers de charges;N;"786, 796";;;;N;N;Produits financiers;
+Différences positives de change;N;766;;;;N;N;Produits financiers;
+Produits nets sur cessions de valeurs mobilières de placement;N;767;;;;N;N;Produits financiers;
+Produits exceptionnels;O;;;;;N;O;PRODUITS;CREDIT
+Reprises sur provisions et transferts de charges;N;"787, 797";;;;N;N;Produits exceptionnels;
+Sur opérations en capital;N;"775, 777, 778";;;;N;N;Produits exceptionnels;
+Sur opérations de gestion;N;771;;;;N;N;Produits exceptionnels;
Modified: trunk/lima-swing/src/main/resources/import/bcr_developed.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/bcr_developed.csv 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-swing/src/main/resources/import/bcr_developed.csv 2014-07-29 14:06:49 UTC (rev 3871)
@@ -1,162 +1,163 @@
-"FNST";"BILAN ACTIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"Capital Souscrit non appelé";"false";"109";" ";" ";" ";"false";"false";"BILAN ACTIF";""
-"FNST";"BILAN PASSIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"CREDIT"
-"FNST";"COMPTE DE RESULTAT";"true";"";"";"";"";"false";"false";"";"BOTH"
-"FNST";"Capital (dont versé?)";"false";"101, 108";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"CHARGES";"true";" ";" ";" ";" ";"true";"false";"COMPTE DE RESULTAT";"DEBIT"
-"FNST";"PRODUITS";"true";"";"";"";"";"true";"false";"COMPTE DE RESULTAT";"CREDIT"
-"FNST";"ACTIF IMMOBILISÉ";"true";" ";" ";" ";" ";"true";"false";"BILAN ACTIF";"BOTH"
-"FNST";"ACTIF CIRCULANT";"true";"";"";"";"";"true";"false";"BILAN ACTIF";"BOTH"
-"FNST";"CHARGES D'EXPLOITATION";"true";"";"";"";"";"true";"false";"CHARGES";"DEBIT"
-"FNST";"Coût d'achat des marchandises";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Stocks et en-cours";"true";"";"";"";"";"false";"true";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Marchandises";"false";"37";"";"";"397";"false";"false";"Stocks et en-cours";""
-"FNST";"Variations de stocks de march.";"false";"6037";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Achat de marchandises";"false";"607, 6087, 6097";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Immobilisations incorporelles";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Frais d'établissement";"false";"201";"";"";"2801";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Frais de recherche et développement";"false";"203";"";"";"2803";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires";"false";"205";"";"";"2805, 2905";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Fonds commercial";"false";"206, 207";"";"";"2807, 2906, 2907";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Autres";"false";"208";"";"";"2808, 2908";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Immobilisations incorporelles en cours";"false";"232";"";"";"2932";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Avances et acomptes";"false";"237";"";"";"";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Immobilisations corporelles";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Terrains";"false";"211, 212";"";"";"2811, 2812, 2911";"false";"false";"Immobilisations corporelles";""
-"FNST";"Constructions";"false";"213, 214";"";"";"2813, 2814";"false";"false";"Immobilisations corporelles";""
-"FNST";"Installations techniques, matériels, et outillage industriels";"false";"215";"";"";"2815";"false";"false";"Immobilisations corporelles";""
-"FNST";"Immobilisations corporelles en cours";"false";"231";"";"";"2931";"false";"false";"Immobilisations corporelles";""
-"FNST";"Immobilisations financières";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Participations";"false";"261, 266";"";"";"2961, 2966";"false";"false";"Immobilisations financières";""
-"FNST";"Créances rattachées à des participations";"false";"267, 268";"";"";"2967, 2968";"false";"false";"Immobilisations financières";""
-"FNST";"Titres immobilisés de l'activité de portefeuille";"false";"273";"";"";"2973";"false";"false";"Immobilisations financières";""
-"FNST";"Autres titres immobilisés";"false";"271, 272, 27682";"";"";"2971, 2972";"false";"false";"Immobilisations financières";""
-"FNST";"Prêts";"false";"274, 27684";"";"";"2974";"false";"false";"Immobilisations financières";""
-"FNST";"Matières premières et autres approvisionnements";"false";"31, 32";"";"";"391, 392";"false";"false";"Stocks et en-cours";""
-"FNST";"En cours de production (biens et services)";"false";"33, 34";"";"";"393, 394";"false";"false";"Stocks et en-cours";""
-"FNST";"Produits intermédiaires et finis";"false";"35";"";"";"395";"false";"false";"Stocks et en-cours";""
-"FNST";"Avances et acomptes versés sur commandes";"false";"4091";"";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Créances";"true";"";"";"";"";"false";"false";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Valeurs mobilières de placement";"true";"";"";"";"";"false";"false";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Actions propres";"false";"502";"";"";"59";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Autres titres";"false";"50 -502 -509";"";"";"59";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Disponibilités";"false";"53, 54 -5181 -519";"51";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Charges constatées d'avance";"false";"486";"";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Instrument de trésorerie";"false";"";"52";"";"";"false";"false";"Valeurs mobilières de placement";""
-"FNST";"Charges à répartir sur plusieurs exercices";"false";"481";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Primes de remboursement des emprunts";"false";"169";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Ecarts de conversion Actif";"false";"476";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Primes d'émission, de fusion, d'apport";"false";"104";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Ecart de réévaluation";"false";"105";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Ecart d'équivalence";"false";"107";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Réserves";"true";"";"";"";"";"false";"false";"CAPITAUX PROPRES";"BOTH"
-"FNST";"Réserve légale";"false";"1061";"";"";"";"false";"false";"Réserves";""
-"FNST";"Réserves statutaires ou contractuelles";"false";"1063";"";"";"";"false";"false";"Réserves";""
-"FNST";"Réserves réglementées";"false";"1062, 1064";"";"";"";"false";"false";"Réserves";""
-"FNST";"Report à nouveau";"false";"110,119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7,6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Subventions d'investissement";"false";"13";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Provisions réglementées";"false";"14";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"AUTRES FONDS PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Produits des émissions de titres participatifs";"false";"1671";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
-"FNST";"Avances conditionnées";"false";"1674";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
-"FNST";"PROVISIONS POUR RISQUES ET CHARGES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Provisions pour risques";"false";"151";"";"";"";"false";"false";"PROVISIONS POUR RISQUES ET CHARGES";""
-"FNST";"Provisions pour charges";"false";"15 -151";"";"";"";"false";"false";"PROVISIONS POUR RISQUES ET CHARGES";""
-"FNST";"DETTES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Emprunts obligataires convertibles";"false";"161, 16881";"";"";"";"false";"false";"DETTES";""
-"FNST";"Autres emprunts obligataires";"false";"163, 16683";"";"";"";"false";"false";"DETTES";""
-"FNST";"Emprunts et dettes auprès établissements de crédits";"false";"164, 16684, 5181, 519";"";"512, 514, 517";"";"false";"false";"DETTES";""
-"FNST";"Emprunts et dettes financières diverses";"false";"165, 166, 1675, 168, 16883, 17, 426 -16881 -457";"";"45";"";"false";"false";"DETTES";""
-"FNST";"Avances et acomptes reçues sur commandes en cours";"false";"4191";"";"";"";"false";"false";"DETTES";""
-"FNST";"Ecarts de conversion passif";"false";"477";"";"";"";"false";"false";"BILAN PASSIF";""
-"FNST";"Coût d'achats de matières premières et autres approvisionnements";"true";"";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Achats de matières premières et autres approvisionnements";"false";"601, 6081, 6091";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Variation des stock";"false";"6031, 6032";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Salaires et traitements";"false";"641, 644, 648";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Charges sociales";"false";"645, 646, 647";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Dotations aux amortis. & provisions";"true";" ";" ";" ";" ";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Autres charges";"false";"65 -655";"";"";"";"false";"false";"CHARGES D'EXPLOITATION";""
-"FNST";"Quotes-parts de résultat sur opérations faites en commun";"false";"655";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Charges financières";"true";"";"";"";"";"false";"true";"CHARGES";"DEBIT"
-"FNST";"Dotations aux amortissements et provisions";"false";"686";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Intérêts et charges assimilées";"false";"661, 664, 665, 668";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Différences négatives de change";"false";"666";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Charges nettes sur cessions de valeurs mobilières de placement";"false";"667";"";"";"";"false";"false";"Charges financières";""
-"FNST";"Charges exceptionnelles";"true";"";"";"";"";"false";"true";"CHARGES";"DEBIT"
-"FNST";"Sur opérations de gestion";"false";"671";"";"";"";"false";"false";"Charges exceptionnelles";""
-"FNST";"Participation des salariés aux résultats";"false";"691";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Impôts sur les bénéfices";"false";"695, 697, 689, 698, 699, 789";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Produits d'exploitation";"true";"";"";"";"";"true";"false";"PRODUITS";"CREDIT"
-"FNST";"Production vendue";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
-"FNST";"Ventes";"false";"701, 702, 703, 707, 708, 7091, 7092, 7097, 7098";"";"";"";"false";"false";"Production vendue";""
-"FNST";"Travaux";"false";"704, 708, 7094, 7098";"";"";"";"false";"false";"Production vendue";""
-"FNST";"Autres produits d'exploitation";"true";"";"";"";"";"false";"true";"Produits d'exploitation";"CREDIT"
-"FNST";"Quote-parts de résultat sur opérations faites en commun";"false";"755";"";"";"";"false";"false";"PRODUITS";""
-"FNST";"Produits financiers";"true";"";"";"";"";"false";"true";"PRODUITS";"CREDIT"
-"FNST";"De participations";"false";"761";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"D'autres valeurs mobilières et créances de l'actif immobilisé";"false";"762";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Autres intérêts et produits assimilés";"false";"763, 764, 765, 768";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Reprises sur provisions et transfers de charges";"false";"786, 796";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Différences positives de change";"false";"766";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Produits nets sur cessions de valeurs mobilières de placement";"false";"767";"";"";"";"false";"false";"Produits financiers";""
-"FNST";"Produits exceptionnels";"true";"";"";"";"";"false";"true";"PRODUITS";"CREDIT"
-"FNST";"Reprises sur provisions et transferts de charges";"false";"787, 797";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"Sur immobilisations : dotations aux amortissements";"false";"6811, 6812";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Sur immobilisations : dotations aux provisions";"false";"6816";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Sur actif circulant : dotations aux provisions";"false";"6817";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Pour risques et charges : dotations aux provisions";"false";"6815";"";"";"";"false";"false";"Dotations aux amortis. & provisions";""
-"FNST";"Créance d'exploitation";"true";"";"";"";"";"false";"false";"Créances";"BOTH"
-"FNST";"Créances clients et Comptes rattachés";"false";"410, 411, 413, 416, 418";"";"";"491";"false";"false";"Créance d'exploitation";""
-"FNST";"Créances diverses";"false";"4411, 4418, 462, 465, 4687";"443, 444, 451, 456, 458, 467 -4562";"";"";"false";"false";"Créances";""
-"FNST";"Capital souscrit et appelé, non versé";"false";"4562";"";"";"";"false";"false";"Créances";""
-"FNST";"Dettes d'exploitation";"true";"";"";"";"";"false";"false";"DETTES";"BOTH"
-"FNST";"Dettes fournisseurs et comptes rattachés";"false";"400, 401, 403, 4081, 4088";"";"";"";"false";"false";"Dettes d'exploitation";""
-"FNST";"Dettes fiscales et sociales";"false";"421, 422, 424, 427, 4282, 4286, 431, 437, 4386, 4455, 4457, 446, 447, 4486";"";"4458";"";"false";"false";"Dettes d'exploitation";""
-"FNST";"Dettes diverses";"true";"";"";"";"";"false";"false";"DETTES";"BOTH"
-"FNST";"Dettes sur immobilisations et Comptes rattachés";"false";"269, 279, 404, 405, 4084";"";"";"";"false";"false";"Dettes diverses";""
-"FNST";"Dettes fiscales (impôts sur les bénéfices)";"false";"";"";"444";"";"false";"false";"Dettes diverses";""
-"FNST";"Sur opérations en capital";"false";"775, 777, 778";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"Prestation de services";"false";"705, 706, 708, 7095, 7096, 7098";"";"";"";"false";"false";"Production vendue";""
-"FNST";"Production stockée";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
-"FNST";"En-cours de production de biens";"false";"7133";"";"";"";"false";"false";"Production stockée";""
-"FNST";"En-cours de production de services";"false";"7134";"";"";"";"false";"false";"Production stockée";""
-"FNST";"Produits";"false";"7135";"";"";"";"false";"false";"Production stockée";""
-"FNST";"Reprises sur provisions (et amortissements), transferts de charges";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
-"FNST";"Reprises sur provisions (et amortissements)";"false";"781";"";"";"";"false";"false";"Reprises sur provisions (et amortissements), transferts de charges";""
-"FNST";"Transferts de charges";"false";"791";"";"";"";"false";"false";"Reprises sur provisions (et amortissements), transferts de charges";""
-"FNST";"Production exceptionnels sur opérations en capital";"true";"";"";"";"";"false";"true";"Autres produits d'exploitation";"CREDIT"
-"FNST";"Produits des cessions d'éléments d'actif";"false";"775";"";"";"";"false";"false";"Production exceptionnels sur opérations en capital";""
-"FNST";"Subvention d'investissement virées au résultat de l'exercice";"false";"778";"";"";"";"false";"false";"Production exceptionnels sur opérations en capital";""
-"FNST";"Autres approvisionnements";"false";"602, 6082, 6092";"";"";"";"false";"false";"Coût d'achats de matières premières et autres approvisionnements";""
-"FNST";"Autres charges et charges externes";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"Achats de sous-traitance";"false";"604, 6084, 6094, 6095";"";"";"";"false";"false";"Autres charges et charges externes";""
-"FNST";"Achats non stockés de matières et fournitures";"false";"605, 606, 6085, 6086, 6096";"";"";"";"false";"false";"Autres charges et charges externes";""
-"FNST";"Services extérieurs";"true";"";"";"";"";"false";"true";"Autres charges et charges externes";"DEBIT"
-"FNST";"Personnel extérieur";"false";"621";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Loyers en crédit-bail mobilier";"false";"6122";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Loyers en crédit-bail immobilier";"false";"";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Impôts, taxes et versements assimilés";"true";"";"";"";"";"false";"true";"CHARGES D'EXPLOITATION";"DEBIT"
-"FNST";"sur rémunérations";"false";"631, 633";"";"";"";"false";"false";"Impôts, taxes et versements assimilés";""
-"FNST";"autres";"false";"635, 637";"";"";"";"false";"false";"Impôts, taxes et versements assimilés";""
-"FNST";"sur opération en capital";"true";"";"";"";"";"false";"true";"Charges exceptionnelles";"DEBIT"
-"FNST";"valeurs comptables des éléments immobiliers et financiers cédés";"false";"675";"";"";"";"false";"false";"sur opération en capital";""
-"FNST";"Dotations aux amortissements et aux provisions";"true";"";"";"";"";"false";"true";"Charges exceptionnelles";"DEBIT"
-"FNST";"Dotations aux provisions réglementées";"false";"6872, 6873, 6874";"";"";"";"false";"false";"Dotations aux amortissements et aux provisions";""
-"FNST";"dotations aux amortissements et aux provisions";"false";"6871, 6875, 6876";"";"";"";"false";"false";"Dotations aux amortissements et aux provisions";""
-"FNST";"Produits constatés d'avance";"false";"487";"";"";"";"false";"false";"DETTES";""
-"FNST";"Autres";"false";"275, 2761, 27685, 27688";"";"";"2975, 2976";"false";"false";"Immobilisations financières";""
-"FNST";"Autres";"false";"218";"";"";"2818";"false";"false";"Immobilisations corporelles";""
-"FNST";"Autres";"false";"1068";"";"";"";"false";"false";"Réserves";""
-"FNST";"Autres";"false";"";"";"";"";"false";"false";"AUTRES FONDS PROPRES";""
-"FNST";"Autres";"false";"4096, 4097, 4098, 425, 4287, 4387, 4417, 4452, 4456, 4487";"4458";"";"495, 496";"false";"false";"Créance d'exploitation";""
-"FNST";"Autres";"false";"4196, 4197, 4198, 4419";"";"";"";"false";"false";"Dettes d'exploitation";""
-"FNST";"Autres";"false";"424, 426, 4284, 4419, 442, 4486, 457, 464, 467, 4686, 509";"";"443, 451, 455, 456, 458";"";"false";"false";"Dettes diverses";""
-"FNST";"Autres";"false";"61, 62 -6122 -6125 -621";"";"";"";"false";"false";"Services extérieurs";""
-"FNST";"Avances et acomptes";"false";"238";"";"";"";"false";"false";"Immobilisations corporelles";""
-"FNST";"Sur opérations de gestion";"false";"771";"";"";"";"false";"false";"Produits exceptionnels";""
-"FNST";"autres";"false";"678";"";"";"";"false";"false";"sur opération en capital";""
-"FNST";"Production immobilisée";"false";"72, 73";"";"";"";"false";"false";"Autres produits d'exploitation";""
-"FNST";"Subventions d'exploitation";"false";"74";;;;"false";"false";"Autres produits d'exploitation";""
-"FNST";"Autres";"false";"75 - 755";;;;"false";"false";"Autres produits d'exploitation";""
+label;header;accounts;debitAccounts;creditAccounts;provisionDeprecationAccounts;subAmount;headerAmount;masterFinancialStatement;financialStatementWay
+BILAN ACTIF;true;;;;;true;false;;BOTH
+Capital Souscrit non appelé;false;109; ; ; ;false;false;BILAN ACTIF;
+BILAN PASSIF;true;;;;;true;false;;BOTH
+CAPITAUX PROPRES;true;;;;;true;false;BILAN PASSIF;CREDIT
+COMPTE DE RESULTAT;true;;;;;false;false;;BOTH
+Capital (dont versé?);false;101, 108;;;;false;false;CAPITAUX PROPRES;
+CHARGES;true; ; ; ; ;true;false;COMPTE DE RESULTAT;DEBIT
+PRODUITS;true;;;;;true;false;COMPTE DE RESULTAT;CREDIT
+ACTIF IMMOBILISÉ;true; ; ; ; ;true;false;BILAN ACTIF;BOTH
+ACTIF CIRCULANT;true;;;;;true;false;BILAN ACTIF;BOTH
+CHARGES D'EXPLOITATION;true;;;;;true;false;CHARGES;DEBIT
+Coût d'achat des marchandises;true;;;;;false;true;CHARGES D'EXPLOITATION;DEBIT
+Stocks et en-cours;true;;;;;false;true;ACTIF CIRCULANT;BOTH
+Marchandises;false;37;;;397;false;false;Stocks et en-cours;
+Variations de stocks de march.;false;6037;;;;false;false;Coût d'achat des marchandises;
+Achat de marchandises;false;607, 6087, 6097;;;;false;false;Coût d'achat des marchandises;
+Immobilisations incorporelles;true;;;;;false;false;ACTIF IMMOBILISÉ;BOTH
+Frais d'établissement;false;201;;;2801;false;false;Immobilisations incorporelles;
+Frais de recherche et développement;false;203;;;2803;false;false;Immobilisations incorporelles;
+Concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires;false;205;;;2805, 2905;false;false;Immobilisations incorporelles;
+Fonds commercial;false;206, 207;;;2807, 2906, 2907;false;false;Immobilisations incorporelles;
+Autres;false;208;;;2808, 2908;false;false;Immobilisations incorporelles;
+Immobilisations incorporelles en cours;false;232;;;2932;false;false;Immobilisations incorporelles;
+Avances et acomptes;false;237;;;;false;false;Immobilisations incorporelles;
+Immobilisations corporelles;true;;;;;false;false;ACTIF IMMOBILISÉ;BOTH
+Terrains;false;211, 212;;;2811, 2812, 2911;false;false;Immobilisations corporelles;
+Constructions;false;213, 214;;;2813, 2814;false;false;Immobilisations corporelles;
+Installations techniques, matériels, et outillage industriels;false;215;;;2815;false;false;Immobilisations corporelles;
+Immobilisations corporelles en cours;false;231;;;2931;false;false;Immobilisations corporelles;
+Immobilisations financières;true;;;;;false;false;ACTIF IMMOBILISÉ;BOTH
+Participations;false;261, 266;;;2961, 2966;false;false;Immobilisations financières;
+Créances rattachées à des participations;false;267, 268;;;2967, 2968;false;false;Immobilisations financières;
+Titres immobilisés de l'activité de portefeuille;false;273;;;2973;false;false;Immobilisations financières;
+Autres titres immobilisés;false;271, 272, 27682;;;2971, 2972;false;false;Immobilisations financières;
+Prêts;false;274, 27684;;;2974;false;false;Immobilisations financières;
+Matières premières et autres approvisionnements;false;31, 32;;;391, 392;false;false;Stocks et en-cours;
+En cours de production (biens et services);false;33, 34;;;393, 394;false;false;Stocks et en-cours;
+Produits intermédiaires et finis;false;35;;;395;false;false;Stocks et en-cours;
+Avances et acomptes versés sur commandes;false;4091;;;;false;false;ACTIF CIRCULANT;
+Créances;true;;;;;false;false;ACTIF CIRCULANT;BOTH
+Valeurs mobilières de placement;true;;;;;false;false;ACTIF CIRCULANT;BOTH
+Actions propres;false;502;;;59;false;false;Valeurs mobilières de placement;
+Autres titres;false;50 -502 -509;;;59;false;false;Valeurs mobilières de placement;
+Disponibilités;false;53, 54 -5181 -519;51;;;false;false;ACTIF CIRCULANT;
+Charges constatées d'avance;false;486;;;;false;false;ACTIF CIRCULANT;
+Instrument de trésorerie;false;;52;;;false;false;Valeurs mobilières de placement;
+Charges à répartir sur plusieurs exercices;false;481;;;;false;false;BILAN ACTIF;
+Primes de remboursement des emprunts;false;169;;;;false;false;BILAN ACTIF;
+Ecarts de conversion Actif;false;476;;;;false;false;BILAN ACTIF;
+Primes d'émission, de fusion, d'apport;false;104;;;;false;false;CAPITAUX PROPRES;
+Ecart de réévaluation;false;105;;;;false;false;CAPITAUX PROPRES;
+Ecart d'équivalence;false;107;;;;false;false;CAPITAUX PROPRES;
+Réserves;true;;;;;false;false;CAPITAUX PROPRES;BOTH
+Réserve légale;false;1061;;;;false;false;Réserves;
+Réserves statutaires ou contractuelles;false;1063;;;;false;false;Réserves;
+Réserves réglementées;false;1062, 1064;;;;false;false;Réserves;
+Report à nouveau;false;110,119;;;;false;false;CAPITAUX PROPRES;
+RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE);false;7,6;;;;false;false;CAPITAUX PROPRES;
+Subventions d'investissement;false;13;;;;false;false;CAPITAUX PROPRES;
+Provisions réglementées;false;14;;;;false;false;CAPITAUX PROPRES;
+AUTRES FONDS PROPRES;true;;;;;true;false;BILAN PASSIF;BOTH
+Produits des émissions de titres participatifs;false;1671;;;;false;false;AUTRES FONDS PROPRES;
+Avances conditionnées;false;1674;;;;false;false;AUTRES FONDS PROPRES;
+PROVISIONS POUR RISQUES ET CHARGES;true;;;;;true;false;BILAN PASSIF;BOTH
+Provisions pour risques;false;151;;;;false;false;PROVISIONS POUR RISQUES ET CHARGES;
+Provisions pour charges;false;15 -151;;;;false;false;PROVISIONS POUR RISQUES ET CHARGES;
+DETTES;true;;;;;true;false;BILAN PASSIF;BOTH
+Emprunts obligataires convertibles;false;161, 16881;;;;false;false;DETTES;
+Autres emprunts obligataires;false;163, 16683;;;;false;false;DETTES;
+Emprunts et dettes auprès établissements de crédits;false;164, 16684, 5181, 519;;512, 514, 517;;false;false;DETTES;
+Emprunts et dettes financières diverses;false;165, 166, 1675, 168, 16883, 17, 426 -16881 -457;;45;;false;false;DETTES;
+Avances et acomptes reçues sur commandes en cours;false;4191;;;;false;false;DETTES;
+Ecarts de conversion passif;false;477;;;;false;false;BILAN PASSIF;
+Coût d'achats de matières premières et autres approvisionnements;true;;;;;false;false;CHARGES D'EXPLOITATION;DEBIT
+Achats de matières premières et autres approvisionnements;false;601, 6081, 6091;;;;false;false;Coût d'achats de matières premières et autres approvisionnements;
+Variation des stock;false;6031, 6032;;;;false;false;Coût d'achats de matières premières et autres approvisionnements;
+Salaires et traitements;false;641, 644, 648;;;;false;false;CHARGES D'EXPLOITATION;
+Charges sociales;false;645, 646, 647;;;;false;false;CHARGES D'EXPLOITATION;
+Dotations aux amortis. & provisions;true; ; ; ; ;false;true;CHARGES D'EXPLOITATION;DEBIT
+Autres charges;false;65 -655;;;;false;false;CHARGES D'EXPLOITATION;
+Quotes-parts de résultat sur opérations faites en commun;false;655;;;;false;false;CHARGES;
+Charges financières;true;;;;;false;true;CHARGES;DEBIT
+Dotations aux amortissements et provisions;false;686;;;;false;false;Charges financières;
+Intérêts et charges assimilées;false;661, 664, 665, 668;;;;false;false;Charges financières;
+Différences négatives de change;false;666;;;;false;false;Charges financières;
+Charges nettes sur cessions de valeurs mobilières de placement;false;667;;;;false;false;Charges financières;
+Charges exceptionnelles;true;;;;;false;true;CHARGES;DEBIT
+Sur opérations de gestion;false;671;;;;false;false;Charges exceptionnelles;
+Participation des salariés aux résultats;false;691;;;;false;false;CHARGES;
+Impôts sur les bénéfices;false;695, 697, 689, 698, 699, 789;;;;false;false;CHARGES;
+Produits d'exploitation;true;;;;;true;false;PRODUITS;CREDIT
+Production vendue;true;;;;;false;true;Produits d'exploitation;CREDIT
+Ventes;false;701, 702, 703, 707, 708, 7091, 7092, 7097, 7098;;;;false;false;Production vendue;
+Travaux;false;704, 708, 7094, 7098;;;;false;false;Production vendue;
+Autres produits d'exploitation;true;;;;;false;true;Produits d'exploitation;CREDIT
+Quote-parts de résultat sur opérations faites en commun;false;755;;;;false;false;PRODUITS;
+Produits financiers;true;;;;;false;true;PRODUITS;CREDIT
+De participations;false;761;;;;false;false;Produits financiers;
+D'autres valeurs mobilières et créances de l'actif immobilisé;false;762;;;;false;false;Produits financiers;
+Autres intérêts et produits assimilés;false;763, 764, 765, 768;;;;false;false;Produits financiers;
+Reprises sur provisions et transfers de charges;false;786, 796;;;;false;false;Produits financiers;
+Différences positives de change;false;766;;;;false;false;Produits financiers;
+Produits nets sur cessions de valeurs mobilières de placement;false;767;;;;false;false;Produits financiers;
+Produits exceptionnels;true;;;;;false;true;PRODUITS;CREDIT
+Reprises sur provisions et transferts de charges;false;787, 797;;;;false;false;Produits exceptionnels;
+Sur immobilisations : dotations aux amortissements;false;6811, 6812;;;;false;false;Dotations aux amortis. & provisions;
+Sur immobilisations : dotations aux provisions;false;6816;;;;false;false;Dotations aux amortis. & provisions;
+Sur actif circulant : dotations aux provisions;false;6817;;;;false;false;Dotations aux amortis. & provisions;
+Pour risques et charges : dotations aux provisions;false;6815;;;;false;false;Dotations aux amortis. & provisions;
+Créance d'exploitation;true;;;;;false;false;Créances;BOTH
+Créances clients et Comptes rattachés;false;410, 411, 413, 416, 418;;;491;false;false;Créance d'exploitation;
+Créances diverses;false;4411, 4418, 462, 465, 4687;443, 444, 451, 456, 458, 467 -4562;;;false;false;Créances;
+Capital souscrit et appelé, non versé;false;4562;;;;false;false;Créances;
+Dettes d'exploitation;true;;;;;false;false;DETTES;BOTH
+Dettes fournisseurs et comptes rattachés;false;400, 401, 403, 4081, 4088;;;;false;false;Dettes d'exploitation;
+Dettes fiscales et sociales;false;421, 422, 424, 427, 4282, 4286, 431, 437, 4386, 4455, 4457, 446, 447, 4486;;4458;;false;false;Dettes d'exploitation;
+Dettes diverses;true;;;;;false;false;DETTES;BOTH
+Dettes sur immobilisations et Comptes rattachés;false;269, 279, 404, 405, 4084;;;;false;false;Dettes diverses;
+Dettes fiscales (impôts sur les bénéfices);false;;;444;;false;false;Dettes diverses;
+Sur opérations en capital;false;775, 777, 778;;;;false;false;Produits exceptionnels;
+Prestation de services;false;705, 706, 708, 7095, 7096, 7098;;;;false;false;Production vendue;
+Production stockée;true;;;;;false;true;Autres produits d'exploitation;CREDIT
+En-cours de production de biens;false;7133;;;;false;false;Production stockée;
+En-cours de production de services;false;7134;;;;false;false;Production stockée;
+Produits;false;7135;;;;false;false;Production stockée;
+Reprises sur provisions (et amortissements), transferts de charges;true;;;;;false;true;Autres produits d'exploitation;CREDIT
+Reprises sur provisions (et amortissements);false;781;;;;false;false;Reprises sur provisions (et amortissements), transferts de charges;
+Transferts de charges;false;791;;;;false;false;Reprises sur provisions (et amortissements), transferts de charges;
+Production exceptionnels sur opérations en capital;true;;;;;false;true;Autres produits d'exploitation;CREDIT
+Produits des cessions d'éléments d'actif;false;775;;;;false;false;Production exceptionnels sur opérations en capital;
+Subvention d'investissement virées au résultat de l'exercice;false;778;;;;false;false;Production exceptionnels sur opérations en capital;
+Autres approvisionnements;false;602, 6082, 6092;;;;false;false;Coût d'achats de matières premières et autres approvisionnements;
+Autres charges et charges externes;true;;;;;false;true;CHARGES D'EXPLOITATION;DEBIT
+Achats de sous-traitance;false;604, 6084, 6094, 6095;;;;false;false;Autres charges et charges externes;
+Achats non stockés de matières et fournitures;false;605, 606, 6085, 6086, 6096;;;;false;false;Autres charges et charges externes;
+Services extérieurs;true;;;;;false;true;Autres charges et charges externes;DEBIT
+Personnel extérieur;false;621;;;;false;false;Services extérieurs;
+Loyers en crédit-bail mobilier;false;6122;;;;false;false;Services extérieurs;
+Loyers en crédit-bail immobilier;false;;;;;false;false;Services extérieurs;
+Impôts, taxes et versements assimilés;true;;;;;false;true;CHARGES D'EXPLOITATION;DEBIT
+sur rémunérations;false;631, 633;;;;false;false;Impôts, taxes et versements assimilés;
+autres;false;635, 637;;;;false;false;Impôts, taxes et versements assimilés;
+sur opération en capital;true;;;;;false;true;Charges exceptionnelles;DEBIT
+valeurs comptables des éléments immobiliers et financiers cédés;false;675;;;;false;false;sur opération en capital;
+Dotations aux amortissements et aux provisions;true;;;;;false;true;Charges exceptionnelles;DEBIT
+Dotations aux provisions réglementées;false;6872, 6873, 6874;;;;false;false;Dotations aux amortissements et aux provisions;
+dotations aux amortissements et aux provisions;false;6871, 6875, 6876;;;;false;false;Dotations aux amortissements et aux provisions;
+Produits constatés d'avance;false;487;;;;false;false;DETTES;
+Autres;false;275, 2761, 27685, 27688;;;2975, 2976;false;false;Immobilisations financières;
+Autres;false;218;;;2818;false;false;Immobilisations corporelles;
+Autres;false;1068;;;;false;false;Réserves;
+Autres;false;;;;;false;false;AUTRES FONDS PROPRES;
+Autres;false;4096, 4097, 4098, 425, 4287, 4387, 4417, 4452, 4456, 4487;4458;;495, 496;false;false;Créance d'exploitation;
+Autres;false;4196, 4197, 4198, 4419;;;;false;false;Dettes d'exploitation;
+Autres;false;424, 426, 4284, 4419, 442, 4486, 457, 464, 467, 4686, 509;;443, 451, 455, 456, 458;;false;false;Dettes diverses;
+Autres;false;61, 62 -6122 -6125 -621;;;;false;false;Services extérieurs;
+Avances et acomptes;false;238;;;;false;false;Immobilisations corporelles;
+Sur opérations de gestion;false;771;;;;false;false;Produits exceptionnels;
+autres;false;678;;;;false;false;sur opération en capital;
+Production immobilisée;false;72, 73;;;;false;false;Autres produits d'exploitation;
+Subventions d'exploitation;false;74;;;;false;false;Autres produits d'exploitation;
+Autres;false;75 - 755;;;;false;false;Autres produits d'exploitation;
Modified: trunk/lima-swing/src/main/resources/import/bcr_shortened.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/bcr_shortened.csv 2014-07-28 15:37:39 UTC (rev 3870)
+++ trunk/lima-swing/src/main/resources/import/bcr_shortened.csv 2014-07-29 14:06:49 UTC (rev 3871)
@@ -1,68 +1,69 @@
-"FNST";"BILAN ACTIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"BILAN PASSIF";"true";"";"";"";"";"true";"false";"";"BOTH"
-"FNST";"CAPITAUX PROPRES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"CREDIT"
-"FNST";"COMPTE DE RESULTAT";"true";"";"";"";"";"false";"false";"";"BOTH"
-"FNST";"Capital";"false";"101, 108";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"CHARGES";"true";" ";" ";" ";" ";"true";"false";"COMPTE DE RESULTAT";"DEBIT"
-"FNST";"CHARGES D'EXPLOITATION ET FINANCIERES";"true";"";"";"";"";"true";"false";"CHARGES";"DEBIT"
-"FNST";"PRODUITS";"true";"";"";"";"";"true";"false";"COMPTE DE RESULTAT";"CREDIT"
-"FNST";"ACTIF IMMOBILISÉ";"true";" ";" ";" ";" ";"true";"false";"BILAN ACTIF";"BOTH"
-"FNST";"ACTIF CIRCULANT";"true";"";"";"";"";"true";"false";"BILAN ACTIF";"BOTH"
-"FNST";"Stocks et en-cours";"true";"";"";"";"";"false";"true";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Marchandises";"false";"37";"";"";"397";"false";"false";"Stocks et en-cours";""
-"FNST";"Immobilisations incorporelles";"true";"";"";"";"";"false";"false";"ACTIF IMMOBILISÉ";"BOTH"
-"FNST";"Fonds commercial";"false";"206, 207";"";"";"";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Autres";"false";"201, 208";"";"";"280, 290";"false";"false";"Immobilisations incorporelles";""
-"FNST";"Autres";"false";"31, 32, 33, 34, 35";"";"";"391, 393, 394, 395";"false";"false";"Stocks et en-cours";""
-"FNST";"Avances et acomptes versés sur commandes";"false";"409";"";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Créances";"true";"";"";"";"";"false";"false";"ACTIF CIRCULANT";"BOTH"
-"FNST";"Charges constatées d'avance";"false";"486";"";"";"";"false";"false";"BILAN ACTIF";""
-"FNST";"Ecart de réévaluation";"false";"105";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Réserves";"true";"";"";"";"";"false";"false";"CAPITAUX PROPRES";"BOTH"
-"FNST";"Réserve légale";"false";"1061";"";"";"";"false";"false";"Réserves";""
-"FNST";"Réserves réglementées";"false";"1064";"";"";"";"false";"false";"Réserves";""
-"FNST";"Report à nouveau";"false";"110,119";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE)";"false";"7,6";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Provisions réglementées";"false";"145, 146, 147, 148";"";"";"";"false";"false";"CAPITAUX PROPRES";""
-"FNST";"Provisions pour risques et charges";"false";"15";"";"";"";"false";"false";"BILAN PASSIF";""
-"FNST";"DETTES";"true";"";"";"";"";"true";"false";"BILAN PASSIF";"BOTH"
-"FNST";"Emprunts et dettes assimilées";"false";"16";"";"";"";"false";"false";"DETTES";""
-"FNST";"Avances et acomptes reçues sur commandes en cours";"false";"419";"";"";"";"false";"false";"DETTES";""
-"FNST";"Immobilisations corporelles";"false";"21, 23";"";"";"281, 291";"false";"false";"ACTIF IMMOBILISÉ";""
-"FNST";"Immobilisations financières";"false";"27";"";"";"297";"false";"false";"ACTIF IMMOBILISÉ";""
-"FNST";"Clients et comptes rattachés";"false";"41 - 419";"";"";"491";"false";"false";"Créances";""
-"FNST";"Valeurs mobilières de placement";"false";"50";"";"";"590";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Disponibilités (autres que caisse)";"false";"54, 58";"51";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Caisse";"false";"53";"";"";"";"false";"false";"ACTIF CIRCULANT";""
-"FNST";"Fournisseurs et comptes rattachés";"false";"40";"";"";"";"false";"false";"DETTES";""
-"FNST";"Produits constatés d'avance";"false";"487";"";"";"";"false";"false";"BILAN PASSIF";""
-"FNST";"Charges exceptionnelles";"false";"67, 687, 691";"";"";"";"false";"false";"CHARGES";""
-"FNST";"Impôts sur les bénéfices";"false";"695, 697";"";"";"";"false";"false";"CHARGES";""
-"FNST";"PRODUITS D'EXPLOITATION ET FINANCIERS";"true";"";"";"";"";"true";"false";"PRODUITS";"CREDIT"
-"FNST";"Produits d'exploitation";"true";"";"";"";"";"false";"false";"PRODUITS D'EXPLOITATION ET FINANCIERS";"CREDIT"
-"FNST";"Produits financiers";"false";"76, 786, 79";"";"";"";"false";"false";"PRODUITS D'EXPLOITATION ET FINANCIERS";""
-"FNST";"Ventes de marchandises";"false";"707, 709";"";"";"";"false";"false";"Produits d'exploitation";""
-"FNST";"Production vendue (bien et services)";"false";"701, 706, 708, 709";"";"";"";"false";"false";"Produits d'exploitation";""
-"FNST";"Production stockée";"false";"713";"";"";"";"false";"false";"Produits d'exploitation";""
-"FNST";"Production immobilisée";"false";"72";"";"";"";"false";"false";"Produits d'exploitation";""
-"FNST";"Subventions d'exploitation";"false";"74";"";"";"";"false";"false";"Produits d'exploitation";""
-"FNST";"Autres produits";"false";"75, 781, 79";"";"";"";"false";"false";"Produits d'exploitation";""
-"FNST";"Produits exceptionnels";"false";"77, 787, 79";"";"";"";"false";"false";"PRODUITS";""
-"FNST";"Charges d'exploitation";"true";"";"";"";"";"true";"false";"CHARGES D'EXPLOITATION ET FINANCIERES";"DEBIT"
-"FNST";"Coût d'achat des marchandises";"true";"";"";"";"";"false";"true";"Charges d'exploitation";"DEBIT"
-"FNST";"Variations de stocks de march.";"false";"6037";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Achat de marchandises";"false";"607";"";"";"";"false";"false";"Coût d'achat des marchandises";""
-"FNST";"Coût d'achats des approvisionnements";"true";"";"";"";"";"false";"false";"Charges d'exploitation";"DEBIT"
-"FNST";"Achats d'approvisionnements";"false";"60 -603 -607";"";"";"";"false";"false";"Coût d'achats des approvisionnements";""
-"FNST";"Variation des stock (approvisionnements)";"false";"6031, 6032";"";"";"";"false";"false";"Coût d'achats des approvisionnements";""
-"FNST";"Autres charges externes";"false";"61, 62";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Impôts, taxes et versements assimilés";"false";"63";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Rémunération du personnel";"false";"641, 644";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Charges sociales";"false";"645, 646";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Dotations aux amortissements";"false";"6811";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Dotations aux provisions";"false";"6815, 6816, 6817";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Autres charges";"false";"65";"";"";"";"false";"false";"Charges d'exploitation";""
-"FNST";"Charges financières";"false";"66, 686";"";"";"";"false";"false";"CHARGES D'EXPLOITATION ET FINANCIERES";""
-"FNST";"Autres";"false";"1063, 1068";"";"";"";"false";"false";"Réserves";""
-"FNST";"Autres";"false";"409, 428, 46";"43, 444, 445, 455";"";"496";"false";"false";"Créances";""
-"FNST";"Autres";"false";"419, 421, 428, 447, 46";"";"43, 444, 445";"";"false";"false";"DETTES";""
+label;header;accounts;debitAccounts;creditAccounts;provisionDeprecationAccounts;subAmount;headerAmount;masterFinancialStatement;financialStatementWay
+BILAN ACTIF;O;;;;;O;N;;BOTH
+Charges constatées d'avance;N;486;;;;N;N;BILAN ACTIF;
+ACTIF IMMOBILISÉ;O; ; ; ; ;O;N;BILAN ACTIF;BOTH
+Immobilisations incorporelles;O;;;;;N;N;ACTIF IMMOBILISÉ;BOTH
+Fonds commercial;N;"206, 207";;;;N;N;Immobilisations incorporelles;
+Autres;N;"201, 208";;;"280, 290";N;N;Immobilisations incorporelles;
+Immobilisations corporelles;N;"21, 23";;;"281, 291";N;N;ACTIF IMMOBILISÉ;
+Immobilisations financières;N;27;;;297;N;N;ACTIF IMMOBILISÉ;
+ACTIF CIRCULANT;O;;;;;O;N;BILAN ACTIF;BOTH
+Stocks et en-cours;O;;;;;N;O;ACTIF CIRCULANT;BOTH
+Marchandises;N;37;;;397;N;N;Stocks et en-cours;
+Autres;N;"31, 32, 33, 34, 35";;;"391, 393, 394, 395";N;N;Stocks et en-cours;
+Avances et acomptes versés sur commandes;N;409;;;;N;N;ACTIF CIRCULANT;
+Valeurs mobilières de placement;N;50;;;590;N;N;ACTIF CIRCULANT;
+Disponibilités (autres que caisse);N;"54, 58";51;;;N;N;ACTIF CIRCULANT;
+Caisse;N;53;;;;N;N;ACTIF CIRCULANT;
+Créances;O;;;;;N;N;ACTIF CIRCULANT;BOTH
+Clients et comptes rattachés;N;41 - 419;;;491;N;N;Créances;
+Autres;N;"409, 428, 46";"43, 444, 445, 455";;496;N;N;Créances;
+BILAN PASSIF;O;;;;;O;N;;BOTH
+CAPITAUX PROPRES;O;;;;;O;N;BILAN PASSIF;CREDIT
+Capital;N;"101, 108";;;;N;N;CAPITAUX PROPRES;
+Ecart de réévaluation;N;105;;;;N;N;CAPITAUX PROPRES;
+Report à nouveau;N;"110,119";;;;N;N;CAPITAUX PROPRES;
+RÉSULTAT DE L'EXERCICE (BÉNÉFICE OU PERTE);N;"7,6";;;;N;N;CAPITAUX PROPRES;
+Provisions réglementées;N;"145, 146, 147, 148";;;;N;N;CAPITAUX PROPRES;
+Réserves;O;;;;;N;N;CAPITAUX PROPRES;BOTH
+Réserve légale;N;1061;;;;N;N;Réserves;
+Réserves réglementées;N;1064;;;;N;N;Réserves;
+Autres;N;"1063, 1068";;;;N;N;Réserves;
+Provisions pour risques et charges;N;15;;;;N;N;BILAN PASSIF;
+Produits constatés d'avance;N;487;;;;N;N;BILAN PASSIF;
+DETTES;O;;;;;O;N;BILAN PASSIF;BOTH
+Emprunts et dettes assimilées;N;16;;;;N;N;DETTES;
+Avances et acomptes reçues sur commandes en cours;N;419;;;;N;N;DETTES;
+Fournisseurs et comptes rattachés;N;40;;;;N;N;DETTES;
+Autres;N;"419, 421, 428, 447, 46";;"43, 444, 445";;N;N;DETTES;
+COMPTE DE RESULTAT;O;;;;;N;N;;BOTH
+CHARGES;O; ; ; ; ;O;N;COMPTE DE RESULTAT;DEBIT
+Charges exceptionnelles;N;"67, 687, 691";;;;N;N;CHARGES;
+Impôts sur les bénéfices;N;"695, 697";;;;N;N;CHARGES;
+CHARGES D'EXPLOITATION ET FINANCIERES;O;;;;;O;N;CHARGES;DEBIT
+Charges d'exploitation;O;;;;;O;N;CHARGES D'EXPLOITATION ET FINANCIERES;DEBIT
+Coût d'achat des marchandises;O;;;;;N;O;Charges d'exploitation;DEBIT
+Variations de stocks de march.;N;6037;;;;N;N;Coût d'achat des marchandises;
+Achat de marchandises;N;607;;;;N;N;Coût d'achat des marchandises;
+Coût d'achats des approvisionnements;O;;;;;N;N;Charges d'exploitation;DEBIT
+Achats d'approvisionnements;N;60 -603 -607;;;;N;N;Coût d'achats des approvisionnements;
+Variation des stock (approvisionnements);N;"6031, 6032";;;;N;N;Coût d'achats des approvisionnements;
+Autres charges externes;N;"61, 62";;;;N;N;Charges d'exploitation;
+"Impôts, taxes et versements assimilés";N;63;;;;N;N;Charges d'exploitation;
+Rémunération du personnel;N;"641, 644";;;;N;N;Charges d'exploitation;
+Charges sociales;N;"645, 646";;;;N;N;Charges d'exploitation;
+Dotations aux amortissements;N;6811;;;;N;N;Charges d'exploitation;
+Dotations aux provisions;N;"6815, 6816, 6817";;;;N;N;Charges d'exploitation;
+Autres charges;N;65;;;;N;N;Charges d'exploitation;
+Charges financières;N;"66, 686";;;;N;N;CHARGES D'EXPLOITATION ET FINANCIERES;
+PRODUITS;O;;;;;O;N;COMPTE DE RESULTAT;CREDIT
+PRODUITS D'EXPLOITATION ET FINANCIERS;O;;;;;O;N;PRODUITS;CREDIT
+Produits financiers;N;"76, 786, 79";;;;N;N;PRODUITS D'EXPLOITATION ET FINANCIERS;
+Produits d'exploitation;O;;;;;N;N;PRODUITS D'EXPLOITATION ET FINANCIERS;CREDIT
+Ventes de marchandises;N;"707, 709";;;;N;N;Produits d'exploitation;
+Production vendue (bien et services);N;"701, 706, 708, 709";;;;N;N;Produits d'exploitation;
+Production stockée;N;713;;;;N;N;Produits d'exploitation;
+Production immobilisée;N;72;;;;N;N;Produits d'exploitation;
+Subventions d'exploitation;N;74;;;;N;N;Produits d'exploitation;
+Autres produits;N;"75, 781, 79";;;;N;N;Produits d'exploitation;
+Produits exceptionnels;N;"77, 787, 79";;;;N;N;PRODUITS;
1
0
r3870 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
by dcosse@users.chorem.org 28 Jul '14
by dcosse@users.chorem.org 28 Jul '14
28 Jul '14
Author: dcosse
Date: 2014-07-28 17:37:39 +0200 (Mon, 28 Jul 2014)
New Revision: 3870
Url: http://forge.chorem.org/projects/lima/repository/revisions/3870
Log:
refs #1032 gestion du cas ou il le master n'a pas de parents
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
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-07-28 15:33:53 UTC (rev 3869)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-07-28 15:37:39 UTC (rev 3870)
@@ -26,6 +26,7 @@
package org.chorem.lima.business.ejb;
import com.google.common.base.Function;
+import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
@@ -92,6 +93,9 @@
// valid that there are no duplicated financial statement.
Collection<FinancialStatement> subFinancialStatements = masterfinancialStatementUpdate.getSubFinancialStatements();
+ if (subFinancialStatements == null) {
+ subFinancialStatements = Lists.newArrayList();
+ }
Map indexedSubFinancialStatements = Maps.uniqueIndex(subFinancialStatements, GET_LABEL);
if (indexedSubFinancialStatements.get(financialStatement.getLabel()) != null){
throw new AlreadyExistFinancialTransaction(financialStatement.getLabel(), masterfinancialStatementUpdate.getLabel());
1
0
Author: dcosse
Date: 2014-07-28 17:33:53 +0200 (Mon, 28 Jul 2014)
New Revision: 3869
Url: http://forge.chorem.org/projects/lima/repository/revisions/3869
Log:
refs #1032 emp?\195?\170che la cr?\195?\169ation de cat?\195?\169gories de transaction financi?\195?\168res ayant le m?\195?\170me nom pour un m?\195?\170me parent
Added:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/AlreadyExistFinancialTransaction.java
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/NewExportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.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/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.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
trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -25,6 +25,8 @@
package org.chorem.lima.business.ejb;
+import com.google.common.base.Function;
+import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,7 @@
import org.chorem.lima.beans.FinancialStatementDatas;
import org.chorem.lima.beans.FinancialStatementDatasImpl;
import org.chorem.lima.beans.ReportsDatas;
+import org.chorem.lima.business.AlreadyExistFinancialTransaction;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.FinancialStatementService;
@@ -55,6 +58,7 @@
import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;
+import java.util.Map;
@Stateless
@Remote(FinancialStatementService.class)
@@ -69,22 +73,36 @@
protected static final Log log = LogFactory.getLog(FinancialStatementServiceImpl.class);
+ protected static final Function<FinancialStatement, String> GET_LABEL = new Function<FinancialStatement, String>() {
+ @Override
+ public String apply(FinancialStatement input) {
+ return input == null ? null : input.getLabel();
+ }
+ };
+
@Override
public void createFinancialStatement(FinancialStatement masterFinancialStatement,
- FinancialStatement financialStatement) {
+ FinancialStatement financialStatement) throws AlreadyExistFinancialTransaction {
FinancialStatementTopiaDao financialStatementTopiaDao = getDaoHelper().getFinancialStatementDao();
- financialStatementTopiaDao.create(financialStatement);
-
FinancialStatement masterfinancialStatementUpdate = null;
if (masterFinancialStatement != null) {
masterfinancialStatementUpdate = financialStatementTopiaDao.forLabelEquals(masterFinancialStatement.getLabel()).findAnyOrNull();
+
+ // valid that there are no duplicated financial statement.
+ Collection<FinancialStatement> subFinancialStatements = masterfinancialStatementUpdate.getSubFinancialStatements();
+ Map indexedSubFinancialStatements = Maps.uniqueIndex(subFinancialStatements, GET_LABEL);
+ if (indexedSubFinancialStatements.get(financialStatement.getLabel()) != null){
+ throw new AlreadyExistFinancialTransaction(financialStatement.getLabel(), masterfinancialStatementUpdate.getLabel());
+ }
}
+ FinancialStatement result = financialStatementTopiaDao.create(financialStatement);
+
// check if parent account exist;
if (masterfinancialStatementUpdate != null) {
- masterfinancialStatementUpdate.addSubFinancialStatements(financialStatement);
+ masterfinancialStatementUpdate.addSubFinancialStatements(result);
financialStatementTopiaDao.update(masterfinancialStatementUpdate);
}
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-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -51,6 +51,7 @@
import org.chorem.lima.beans.VatStatementImport;
import org.chorem.lima.beans.VatStatementImportImpl;
import org.chorem.lima.business.AlreadyExistAccountException;
+import org.chorem.lima.business.AlreadyExistFinancialTransaction;
import org.chorem.lima.business.BeginAfterEndFiscalPeriodException;
import org.chorem.lima.business.ImportEbpException;
import org.chorem.lima.business.InvalidAccountNumberException;
@@ -1019,8 +1020,7 @@
for (Iterator<FinancialStatementImport> itr2 = financialStatementImports.iterator(); itr2.hasNext(); ) {
FinancialStatementImport financialStatementImport =
itr2.next();
- String masterFinancialStatementLabel = financialStatementImport
- .getMasterFinancialStatement();
+ String masterFinancialStatementLabel = financialStatementImport.getMasterFinancialStatement();
FinancialStatement masterFinancialStatement = financialStatementService.getFinancialStatementByLabel(masterFinancialStatementLabel);
if (masterFinancialStatementLabel.equals("")
@@ -1057,10 +1057,15 @@
}
- financialStatementService
- .createFinancialStatement(
- masterFinancialStatement,
- financialStatement);
+ try {
+ financialStatementService
+ .createFinancialStatement(
+ masterFinancialStatement,
+ financialStatement);
+ } catch (AlreadyExistFinancialTransaction alreadyExistFinancialTransaction) {
+ result.append(t("lima.importexport.import.alreadyExistFinancialStatement",
+ alreadyExistFinancialTransaction.getFinancialTransactionLabel(), alreadyExistFinancialTransaction.getMasterLabel()));
+ }
result.append(t("lima-business.import.financialstatementadded",
financialStatementImport.getLabel()));
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -88,7 +88,7 @@
public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
@Override
- public String exportAllAsCSV(String charset) {
+ public String exportBackup(String charset) {
ByteArrayOutputStream rstBao = new ByteArrayOutputStream();
ZipOutputStream export = null;
try {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -207,7 +207,7 @@
}
@Override
- public List<ImportResult> importAllAsCSV(String entryBooks, String financialTransactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException {
+ public List<ImportResult> importBackup(String entryBooks, String financialTransactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException {
List<ImportResult> results = new ArrayList<ImportResult>();
importAccountAsCSV(accounts);
importEntryBooksAsCSV(entryBooks);
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-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2014-07-28 15:33:53 UTC (rev 3869)
@@ -132,6 +132,7 @@
lima.config.scale.description=Scale
lima.config.serveraddress.description=Server Address
lima.configFileName.description=
+lima.importexport.import.alreadyExistFinancialStatement=
lima.reports.account.noaccount=
lima.reports.account.noaccounttitle=
lima.reports.accounts=
@@ -147,3 +148,4 @@
lima.ui.financialtransaction.account=
lima.ui.fiscalperiod.fiscalperiod=
lima.ui.lettering.accountRegularization=
+llima.importexport.import.alreadyExistFinancialStatement=
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-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2014-07-28 15:33:53 UTC (rev 3869)
@@ -128,6 +128,7 @@
lima.config.scale.description=Précision
lima.config.serveraddress.description=Addresse serveur
lima.configFileName.description=
+lima.importexport.import.alreadyExistFinancialStatement=
lima.reports.account.noaccount=
lima.reports.account.noaccounttitle=
lima.reports.accounts=
@@ -143,3 +144,4 @@
lima.ui.financialtransaction.account=
lima.ui.fiscalperiod.fiscalperiod=
lima.ui.lettering.accountRegularization=
+llima.importexport.import.alreadyExistFinancialStatement=
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -193,7 +193,7 @@
@Test
public void exportImportAllAsCSVTest() throws Exception {
initTestWithFinancialTransaction();
- String export = newExportService.exportAllAsCSV("UTF-8");
+ String export = newExportService.exportBackup("UTF-8");
initAbstractTest();
String tmpDir = System.getProperty("java.io.tmpdir")+"/TMP_BACKUP.zip";
createZipFile(tmpDir, export);
@@ -284,7 +284,7 @@
String accountsStreamString = IOUtils.toString(accountsStream);
IOUtils.closeQuietly(accountsStream);
- results = newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
+ results = newImportService.importBackup(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
} catch (Exception ex) {
if(log.isInfoEnabled()) {
Added: trunk/lima-business-api/src/main/java/org/chorem/lima/business/AlreadyExistFinancialTransaction.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/AlreadyExistFinancialTransaction.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/AlreadyExistFinancialTransaction.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -0,0 +1,24 @@
+package org.chorem.lima.business;
+
+/**
+ * Created by davidcosse on 28/07/14.
+ */
+public class AlreadyExistFinancialTransaction extends LimaException {
+ private static final long serialVersionUID = 4816249386192290272L;
+
+ protected String financialTransactionLabel;
+ protected String masterLabel;
+
+ public AlreadyExistFinancialTransaction(String label, String masterLabel) {
+ this.financialTransactionLabel = label;
+ this.masterLabel = masterLabel;
+ }
+
+ public String getFinancialTransactionLabel() {
+ return financialTransactionLabel;
+ }
+
+ public String getMasterLabel() {
+ return masterLabel;
+ }
+}
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-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -26,6 +26,7 @@
package org.chorem.lima.business.api;
import org.chorem.lima.beans.FinancialStatementAmounts;
+import org.chorem.lima.business.AlreadyExistFinancialTransaction;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.FinancialStatement;
@@ -37,7 +38,7 @@
void createFinancialStatement(FinancialStatement masterFinancialStatement,
- FinancialStatement financialStatement);
+ FinancialStatement financialStatement) throws AlreadyExistFinancialTransaction;
void updateFinancialStatement(FinancialStatement financialStatement);
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewExportService.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -38,7 +38,7 @@
*/
public interface NewExportService {
- String exportAllAsCSV(String charset);
+ String exportBackup(String charset);
String exportAccountsAsCSV(String charset);
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -41,5 +41,5 @@
ImportResult importEntriesAsCSV(String contents);
- List<ImportResult> importAllAsCSV(String entryBooks, String transactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException;
+ List<ImportResult> importBackup(String entryBooks, String transactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -28,10 +28,13 @@
import com.google.common.collect.Lists;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.LimaConfig;
+import org.chorem.lima.business.AlreadyExistFinancialTransaction;
import org.chorem.lima.business.api.FinancialStatementService;
import org.chorem.lima.entity.FinancialStatement;
import org.chorem.lima.entity.FinancialStatementImpl;
import org.chorem.lima.service.LimaServiceFactory;
+import org.chorem.lima.util.ErrorHelper;
import org.jdesktop.swingx.treetable.AbstractTreeTableModel;
import javax.swing.tree.TreePath;
@@ -57,6 +60,8 @@
/** Services. */
protected final FinancialStatementService financialStatementService;
+ protected ErrorHelper errorHelper;
+
/** Model constructor. Init account service used here. */
public FinancialStatementChartTreeTableModel() {
//create root for the tree
@@ -64,6 +69,7 @@
// Gets factory service
financialStatementService =
LimaServiceFactory.getService(FinancialStatementService.class);
+ errorHelper = new ErrorHelper(LimaConfig.getInstance());
}
@@ -203,8 +209,13 @@
if (parentFinancialStatementHeader == getRoot()) {
parentFinancialStatementHeader = null;
}
- financialStatementService.createFinancialStatement(
- parentFinancialStatementHeader, financialStatement);
+ try {
+ financialStatementService.createFinancialStatement(
+ parentFinancialStatementHeader, financialStatement);
+ } catch (AlreadyExistFinancialTransaction alreadyExistFinancialTransaction) {
+ errorHelper.showErrorMessage(t("lima.importexport.import.alreadyExistFinancialStatement",
+ alreadyExistFinancialTransaction.getFinancialTransactionLabel(), alreadyExistFinancialTransaction.getMasterLabel()));
+ }
modelSupport.fireTreeStructureChanged(path);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-07-28 15:33:53 UTC (rev 3869)
@@ -152,7 +152,7 @@
try {
switch (importExportMethodeF) {
case CSV_ALL_EXPORT:
- datas = newExportService.exportAllAsCSV(charset.name());
+ datas = newExportService.exportBackup(charset.name());
createZipFile(filePath, datas);
break;
case CSV_ACCOUNTCHARTS_EXPORT:
@@ -496,7 +496,7 @@
String entriesStreamString = IOUtils.toString(entriesStream);
IOUtils.closeQuietly(entriesStream);
- results = newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
+ results = newImportService.importBackup(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
} catch (Exception ex) {
if(log.isInfoEnabled()) {
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2014-07-28 15:33:53 UTC (rev 3869)
@@ -275,6 +275,7 @@
lima.importexport.choiceencoding=
lima.importexport.export=
lima.importexport.export.terminated=
+lima.importexport.import.alreadyExistFinancialStatement=Category with name %s exists for parent %s.
lima.importexport.usevatpdf=
lima.init.closed=Lima closed at %1$s
lima.init.errorclosing=Error during Lima close
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2014-07-28 12:06:55 UTC (rev 3868)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2014-07-28 15:33:53 UTC (rev 3869)
@@ -258,6 +258,7 @@
lima.importexport.choiceencoding=Choix de l'encodage
lima.importexport.export=
lima.importexport.export.terminated=
+lima.importexport.import.alreadyExistFinancialStatement=Une catégorie avec comme nom %s et comme parent %s existe déjà.
lima.importexport.usevatpdf=Êtes-vous sûr de vouloir utiliser ce pdf pour la déclaration de TVA ?
lima.init.closed=Lima fermé à %1$s
lima.init.errorclosing=Erreur lors de la fermeture
@@ -548,6 +549,7 @@
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas été trouvé
limma.config.thousandseparator.description=Caractère de séparation entre les blocs de milliers
limma.config.thousandseparator.label=Séparateur de milliers
+llima.importexport.import.alreadyExistFinancialStatement=
org.chorem.lima.LimaConfig.NumberSeparator.COMMA=
org.chorem.lima.LimaConfig.NumberSeparator.DOT=
org.chorem.lima.LimaConfig.NumberSeparator.SPACE=
1
0
28 Jul '14
Author: dcosse
Date: 2014-07-28 14:06:55 +0200 (Mon, 28 Jul 2014)
New Revision: 3868
Url: http://forge.chorem.org/projects/lima/repository/revisions/3868
Log:
refs #1032 utilisation des services metier propre aux entit?\195?\169es dans le service de migration
Added:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportException.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportResult.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/EntryBookService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.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/EntryBookServiceImpl.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/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java
trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -67,7 +67,22 @@
return result;
}
+ @Override
+ public boolean createOrUbdateAccount(Account account) throws InvalidAccountNumberException {
+ // check if account number already exist
+ AccountTopiaDao accountDao = getDaoHelper().getAccountDao();
+ boolean result = accountDao.forNaturalId(account.getAccountNumber().toUpperCase().trim()).exists();
+
+ if (result) {
+ // update
+ updateAccount(account);
+ } else {
+ createNewAccount(account);
+ }
+ return result;
+ }
+
/**
* Permet de créer un nouveau compte dans le PCG de l'application.
*
@@ -77,6 +92,19 @@
@Override
public Account createAccount(Account account) throws AlreadyExistAccountException, InvalidAccountNumberException {
+ // check if account number already exist
+ AccountTopiaDao accountDao = getDaoHelper().getAccountDao();
+
+ if (accountDao.forNaturalId(account.getAccountNumber()).exists()) {
+ throw new AlreadyExistAccountException(account.getAccountNumber());
+ }
+
+ Account result = createNewAccount(account);
+
+ return result;
+ }
+
+ protected Account createNewAccount(Account account) throws InvalidAccountNumberException {
// check rules before create the account
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
accountingRules.createAccountRules(account);
@@ -87,13 +115,9 @@
// check if account number already exist
AccountTopiaDao accountDao = getDaoHelper().getAccountDao();
- if (accountDao.forNaturalId(account.getAccountNumber()).exists()) {
- throw new AlreadyExistAccountException(account.getAccountNumber());
- }
-
//create it
Account result = accountDao.create(account);
-
+
return result;
}
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-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -56,26 +56,45 @@
public class EntryBookServiceImpl extends AbstractLimaService implements EntryBookService {
@Override
+ public boolean createOrUpdateEntryBook(EntryBook entryBook) {
+ EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
+ EntryBook existingEntryBook = entryBookTopiaDao.forCodeEquals(entryBook.getCode()).findUniqueOrNull();
+ boolean result;
+ if (existingEntryBook != null) {
+ result = true;
+ updateEntryBook(entryBook);
+ } else {
+ result = false;
+ createNewEntryBook(entryBook);
+ }
+ return result;
+ }
+
+ @Override
public EntryBook createEntryBook(EntryBook entryBook) {
-
+ EntryBook result = null;
// check if entrybook with is name already exist
EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
- EntryBook result = entryBookTopiaDao.forCodeEquals(entryBook.getCode()).findUniqueOrNull();
- if (result != null) {
+ EntryBook alreadyExistingEntryBook = entryBookTopiaDao.forCodeEquals(entryBook.getCode()).findUniqueOrNull();
+ if (alreadyExistingEntryBook != null) {
log.error(
t("lima-business.entrybook.entrybookalreadyexist",
entryBook.getCode()));
} else {
// creation du EntryBook
- result = entryBookTopiaDao.create(entryBook);
-
- createClosedPeriodicEntryBook(result);
+ result = createNewEntryBook(entryBook);
}
return result;
}
- @Override
- public void createClosedPeriodicEntryBook(EntryBook entryBook) {
+ protected EntryBook createNewEntryBook(EntryBook entryBook) {
+ EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
+ EntryBook result = entryBookTopiaDao.create(entryBook);
+ createClosedPeriodicEntryBook(result);
+ return result;
+ }
+
+ protected void createClosedPeriodicEntryBook(EntryBook entryBook) {
//create ClosedPeriodicEntryBook for all unblocked financial period
ClosedPeriodicEntryBookTopiaDao closedPeriodicEntryBookTopiaDao =
getDaoHelper().getClosedPeriodicEntryBookDao();
@@ -127,7 +146,7 @@
// re-attach to current transaction
EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
- EntryBook localEntryBook = entryBookTopiaDao.findByTopiaId(entryBook.getTopiaId());
+ EntryBook localEntryBook = entryBookTopiaDao.forTopiaIdEquals(entryBook.getTopiaId()).findUnique();
// delete all ClosedPeriodicEntryBook from this EntryBook
ClosedPeriodicEntryBookTopiaDao closedPeriodicEntryBookTopiaDao =
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-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -111,7 +111,6 @@
MoreOneUnlockFiscalPeriodException {
FiscalPeriodTopiaDao fiscalPeriodTopiaDao = getDaoHelper().getFiscalPeriodDao();
- EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
@@ -124,51 +123,18 @@
endDate = DateUtils.addMilliseconds(endDate, -1);
fiscalPeriod.setBeginDate(beginDate);
fiscalPeriod.setEndDate(endDate);
+ createFiscalPeriodClosePeriodicEntryBooks(fiscalPeriod, accountingRules);
- //check rules before create the account
- List<FinancialPeriod> financialPeriods = accountingRules.createFiscalPeriodRules(fiscalPeriod);
-
- // create
- fiscalPeriod.addAllFinancialPeriod(financialPeriods);
-
- //create all financial period
- for (FinancialPeriod financialPeriod : financialPeriods) {
-
- List<ClosedPeriodicEntryBook> closedPeriodicEntryBooks = Lists.newArrayList();
- //create ClosedPeriodicEntryBook for all entrybook
- for (EntryBook entryBook : entryBookTopiaDao.findAll()) {
- //new closed periodic entrybook
- ClosedPeriodicEntryBook closedPeriodicEntryBook = new ClosedPeriodicEntryBookImpl();
- // set entrybook
- closedPeriodicEntryBook.setEntryBook(entryBook);
- // set financial period
- closedPeriodicEntryBook.setFinancialPeriod(financialPeriod);
-
- closedPeriodicEntryBooks.add(closedPeriodicEntryBook);
- }
- financialPeriod.addAllEntryBookClosedPeriodicEntryBook(closedPeriodicEntryBooks);
-
- }
-
FiscalPeriod result = fiscalPeriodTopiaDao.create(fiscalPeriod);
return result;
}
- @Override
- public void createFiscalPeriodsClosePeriodicEntryBooks(Collection<FiscalPeriod> fiscalPeriods) throws
+ protected void createFiscalPeriodClosePeriodicEntryBooks(FiscalPeriod fiscalPeriod, AccountingRules accountingRules) throws
BeginAfterEndFiscalPeriodException, NotBeginNextDayOfLastFiscalPeriodException, MoreOneUnlockFiscalPeriodException {
+
EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
- AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules();
- for (FiscalPeriod fiscalPeriod : fiscalPeriods) {
- createFiscalPeriodClosePeriodicEntryBooks(fiscalPeriod, accountingRules, entryBookTopiaDao);
- }
- }
-
- protected void createFiscalPeriodClosePeriodicEntryBooks(FiscalPeriod fiscalPeriod, AccountingRules accountingRules, EntryBookTopiaDao entryBookTopiaDao) throws
- BeginAfterEndFiscalPeriodException, NotBeginNextDayOfLastFiscalPeriodException, MoreOneUnlockFiscalPeriodException {
-
List<FinancialPeriod> financialPeriods;
financialPeriods = accountingRules.createFiscalPeriodRules(fiscalPeriod);
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-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -343,8 +343,7 @@
financialTransaction = new FinancialTransactionImpl();
financialTransaction.setEntryBook(entryBook);
financialTransaction.setTransactionDate(dateEcr);
- financialTransaction = financialTransactionService
- .createFinancialTransaction(financialTransaction);
+ financialTransaction = financialTransactionService.createFinancialTransaction(financialTransaction);
result.append(t(
"lima-business.import.transactionadded", dateEcr,
entryBook.getCode()));
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewExportServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -26,7 +26,6 @@
package org.chorem.lima.business.ejb;
import com.google.common.collect.Lists;
-import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@@ -59,8 +58,6 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;
import java.util.zip.ZipEntry;
@@ -79,17 +76,17 @@
@TransactionAttribute
public class NewExportServiceImpl extends AbstractLimaService implements NewExportService {
- protected final String DATE_PATTERN = "dd-MM-yyyy-HH:mm";
-
@EJB
- private EntryBookService entryBookService;
+ protected EntryBookService entryBookService;
@EJB
- private AccountService accountService;
+ protected AccountService accountService;
@EJB
- private FinancialTransactionService financialTransactionService;
+ protected FinancialTransactionService financialTransactionService;
+ public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
+
@Override
public String exportAllAsCSV(String charset) {
ByteArrayOutputStream rstBao = new ByteArrayOutputStream();
@@ -132,7 +129,7 @@
List<Account> entities = accountTopiaDao.findAll();
AccountModel model = new AccountModel();
- String tmpDir = System.getProperty("java.io.tmpdir")+"/";
+ String tmpDir = System.getProperty(JAVA_IO_TMPDIR)+"/";
File result = new File(tmpDir + "accounts.csv");
Export.exportToFile(model, entities, result, Charset.forName(charset));
@@ -156,7 +153,7 @@
EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao();
List<EntryBook> entities = entryBookTopiaDao.findAll();
- String tmpDir = System.getProperty("java.io.tmpdir")+"/";
+ String tmpDir = System.getProperty(JAVA_IO_TMPDIR)+"/";
File result = new File(tmpDir + "entryBooks.csv");
EntryBookModel model = new EntryBookModel();
Export.exportToFile(model, entities, result, Charset.forName(charset));
@@ -183,7 +180,7 @@
FiscalPeriodTopiaDao dao = getDaoHelper().getFiscalPeriodDao();
List<FiscalPeriod> entities = dao.findAll();
- String tmpDir = System.getProperty("java.io.tmpdir")+"/";
+ String tmpDir = System.getProperty(JAVA_IO_TMPDIR)+"/";
File result = new File(tmpDir + "fiscalPeriod.csv");
FiscalPeriodModel model = new FiscalPeriodModel();
Export.exportToFile(model, entities, result, Charset.forName(charset));
@@ -211,7 +208,7 @@
getDaoHelper().getFinancialTransactionDao();
List<FinancialTransaction> entities = financialTransactionTopiaDao.findAll();
- String tmpDir = System.getProperty("java.io.tmpdir")+"/";
+ String tmpDir = System.getProperty(JAVA_IO_TMPDIR)+"/";
result = new File(tmpDir + "financialTransactions.csv");
FinancialTransactionModel model = new FinancialTransactionModel(entryBookService);
Export.exportToFile(model, entities, result, Charset.forName(charset));
@@ -236,7 +233,7 @@
EntryTopiaDao dao = getDaoHelper().getEntryDao();
List<Entry> entities = dao.findAll();
- String tmpDir = System.getProperty("java.io.tmpdir")+"/";
+ String tmpDir = System.getProperty(JAVA_IO_TMPDIR)+"/";
File result = new File(tmpDir + "entries.csv");
EntryModel model = new EntryModel(accountService, financialTransactionService , humanReadable);
Export.exportToFile(model, entities, result, Charset.forName(charset));
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/NewImportServiceImpl.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -22,13 +22,14 @@
* #L%
*/
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
import org.apache.commons.io.IOUtils;
-import org.chorem.lima.business.BeginAfterEndFiscalPeriodException;
+import org.chorem.lima.business.AlreadyExistAccountException;
+import org.chorem.lima.business.FiscalPeriodException;
+import org.chorem.lima.business.ImportResult;
+import org.chorem.lima.business.InvalidAccountNumberException;
+import org.chorem.lima.business.LockedEntryBookException;
+import org.chorem.lima.business.LockedFinancialPeriodException;
import org.chorem.lima.business.MoreOneUnlockFiscalPeriodException;
-import org.chorem.lima.business.NotBeginNextDayOfLastFiscalPeriodException;
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.EntryBookService;
import org.chorem.lima.business.api.EntryService;
@@ -41,28 +42,21 @@
import org.chorem.lima.business.ejb.csv.FinancialTransactionModel;
import org.chorem.lima.business.ejb.csv.FiscalPeriodModel;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.AccountTopiaDao;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.EntryBookTopiaDao;
-import org.chorem.lima.entity.EntryTopiaDao;
import org.chorem.lima.entity.FinancialTransaction;
-import org.chorem.lima.entity.FinancialTransactionTopiaDao;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.FiscalPeriodTopiaDao;
import org.nuiton.csv.Import;
import org.nuiton.csv.ImportModel;
-import org.nuiton.topia.persistence.TopiaEntity;
import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import java.io.InputStream;
+import java.util.ArrayList;
import java.util.List;
-import static org.nuiton.i18n.I18n.t;
-
/**
* Created by davidcosse on 03/06/14.
*/
@@ -72,146 +66,154 @@
public class NewImportServiceImpl extends AbstractLimaService implements NewImportService {
@EJB
- private EntryBookService entryBookService;
+ protected EntryBookService entryBookService;
@EJB
- private AccountService accountService;
+ protected AccountService accountService;
@EJB
- private EntryService entryService;
+ protected FinancialTransactionService financialTransactionService;
@EJB
- private FinancialTransactionService financialTransactionService;
+ protected FiscalPeriodService fiscalPeriodService;
@EJB
- private FiscalPeriodService fiscalPeriodService;
+ protected EntryService entryService;
- protected static final Function<TopiaEntity, String> GET_TOPIA_ID = new Function<TopiaEntity, String>() {
- @Override
- public String apply(TopiaEntity input) {
- return input == null ? null : input.getTopiaId();
- }
- };
-
@Override
- public String importAccountAsCSV(String contents) {
+ public ImportResult importAccountAsCSV(String contents) {
InputStream contentStream = IOUtils.toInputStream(contents);
+ ImportResult result = new ImportResult();
try {
ImportModel<Account> model = new AccountModel();
- AccountTopiaDao dao = getDaoHelper().getAccountDao();
- Import<Account> result = Import.newImport(model, contentStream);
-
- List<Account> newAccounts = Lists.newArrayList();
- Account oldAccount;
- for (Account account : result) {
- oldAccount = dao.forAccountNumberEquals(account.getAccountNumber()).findUniqueOrNull();
- if (oldAccount == null) {
- newAccounts.add(account);
+ Import<Account> accounts = Import.newImport(model, contentStream);
+ // csv line index
+ int indexLine = 0;
+ boolean updated;
+ for (Account account : accounts) {
+ try {
+ updated = accountService.createOrUbdateAccount(account);
+ if (updated) {
+ result.increaseUpdated();
+ } else {
+ result.increaseCreated();
+ }
+ } catch (InvalidAccountNumberException e) {
+ result.getException().addException(indexLine, e);
}
+ indexLine++;
}
- dao.createAll(newAccounts);
} finally {
IOUtils.closeQuietly(contentStream);
}
- return "SUCCES";
+ return result;
}
@Override
- public String importEntryBooksAsCSV(String contents) {
+ public ImportResult importEntryBooksAsCSV(String contents) {
InputStream contentStream = IOUtils.toInputStream(contents);
+ ImportResult result = new ImportResult();
try {
ImportModel<EntryBook> model = new EntryBookModel();
- EntryBookTopiaDao dao = getDaoHelper().getEntryBookDao();
- Import<EntryBook> result = Import.newImport(model, contentStream);
- dao.createAll(result);
-
- for (EntryBook entryBook : result) {
- entryBookService.createClosedPeriodicEntryBook(entryBook);
+ Import<EntryBook> entryBooks = Import.newImport(model, contentStream);
+ for (EntryBook entryBook : entryBooks) {
+ boolean updated = entryBookService.createOrUpdateEntryBook(entryBook);
+ if(updated) {
+ result.increaseUpdated();
+ } else {
+ result.increaseCreated();
+ }
}
} finally {
IOUtils.closeQuietly(contentStream);
}
- return "SUCCES";
+ return result;
}
@Override
- public String importFiscalPeriodsAsCSV(String contents) {
- StringBuilder result = new StringBuilder();
+ public ImportResult importFiscalPeriodsAsCSV(String contents) {
InputStream contentStream = IOUtils.toInputStream(contents);
+ ImportResult result = new ImportResult();
try {
ImportModel<FiscalPeriod> model = new FiscalPeriodModel();
- FiscalPeriodTopiaDao dao = getDaoHelper().getFiscalPeriodDao();
- Import<FiscalPeriod> importedFPs = Import.newImport(model, contentStream);
- List<FiscalPeriod> fiscalPeriods = Lists.newArrayList(importedFPs);
+ Import<FiscalPeriod> fiscalPeriods = Import.newImport(model, contentStream);
+
+ int lineIndex = 0;
try {
- fiscalPeriodService.createFiscalPeriodsClosePeriodicEntryBooks(fiscalPeriods);
- result.append(t("lima-business.import.fiscalperiodscloseperiodicentrybooks"));
- } catch (BeginAfterEndFiscalPeriodException e) {
- result.append("Can't import " + t("lima-business.import.FiscalPeriod.error.beginAfterEndFiscalPeriod"));
+ for (FiscalPeriod fiscalPeriod : fiscalPeriods) {
+ fiscalPeriodService.createFiscalPeriod(fiscalPeriod);
+ lineIndex++;
+ result.increaseCreated();
+ }
+ } catch (FiscalPeriodException e) {
+ result.getException().addException(lineIndex, e);
} catch (MoreOneUnlockFiscalPeriodException e) {
- result.append("Can't import " + t("lima-business.import.FiscalPeriod.error.moreOneUnlockFiscalPeriod"));
- } catch (NotBeginNextDayOfLastFiscalPeriodException e) {
- result.append("Can't import " + t("lima-business.import.FiscalPeriod.error.notBeginNextDayOfLastFiscalPeriod"));
+ result.increaseIgnored();
}
- dao.createAll(fiscalPeriods);
} finally {
IOUtils.closeQuietly(contentStream);
}
- return result.toString();
+ return result;
}
- @Override
- public String importFinancialTransactionsAsCSV(String contents) {
+ protected ImportResult importFinancialTransactionsAsCSV(String contents) {
+ ImportResult result = new ImportResult();
- EntryBookTopiaDao entryBookdao = getDaoHelper().getEntryBookDao();
- Preconditions.checkArgument(entryBookdao.count() > 0, "Les journaux doivent avoir été importé.");
-
// import and save FinancialTransactions
InputStream contentStream = IOUtils.toInputStream(contents);
try {
ImportModel<FinancialTransaction> model = new FinancialTransactionModel(entryBookService);
- FinancialTransactionTopiaDao dao = getDaoHelper().getFinancialTransactionDao();
- Import<FinancialTransaction> result = Import.newImport(model, contentStream);
- dao.createAll(result);
+ Import<FinancialTransaction> financialTransactions = Import.newImport(model, contentStream);
+
+ int lineIndex = 0;
+ for (FinancialTransaction financialTransaction : financialTransactions) {
+ try {
+ financialTransactionService.createFinancialTransaction(financialTransaction);
+ lineIndex++;
+ result.increaseCreated();
+ } catch (LockedFinancialPeriodException e) {
+ result.getException().addException(lineIndex, e);
+ } catch (LockedEntryBookException e) {
+ result.getException().addException(lineIndex, e);
+ }
+ }
+
} finally {
IOUtils.closeQuietly(contentStream);
}
- return "SUCCES";
+ return result;
}
@Override
- public String importEntriesAsCSV(String contents) {
- AccountTopiaDao accountDao = getDaoHelper().getAccountDao();
- FinancialTransactionTopiaDao financialTransactionDao = getDaoHelper().getFinancialTransactionDao();
-
- Preconditions.checkArgument(accountDao.count() > 0 && financialTransactionDao.count() > 0, "Les comptes et trasactions financières doivent avoir été importé.");
-
+ public ImportResult importEntriesAsCSV(String contents) {
// import and save entries
InputStream contentStream = IOUtils.toInputStream(contents);
+ ImportResult result = new ImportResult();
try {
ImportModel<Entry> model = new EntryModel(accountService, financialTransactionService, false);
- Import<Entry> result = Import.newImport(model, contentStream);
-
- EntryTopiaDao dao = getDaoHelper().getEntryDao();
- dao.createAll(result);
-
+ Import<Entry> entries = Import.newImport(model, contentStream);
+ for (Entry entry : entries) {
+ entryService.createEntry(entry);
+ result.increaseCreated();
+ }
} finally {
IOUtils.closeQuietly(contentStream);
}
- return "SUCCES";
+ return result;
}
@Override
- public String importAllAsCSV(String entryBooks, String financialTransactions, String fiscalPeriods, String accounts, String entries){
+ public List<ImportResult> importAllAsCSV(String entryBooks, String financialTransactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException {
+ List<ImportResult> results = new ArrayList<ImportResult>();
importAccountAsCSV(accounts);
importEntryBooksAsCSV(entryBooks);
importFiscalPeriodsAsCSV(fiscalPeriods);
importFinancialTransactionsAsCSV(financialTransactions);
importEntriesAsCSV(entries);
- return "SUCCES";
+ return results;
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -22,6 +22,7 @@
* #L%
*/
+import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import org.apache.commons.lang3.StringUtils;
import org.chorem.lima.business.api.AccountService;
@@ -34,7 +35,6 @@
import org.nuiton.csv.ValueParser;
import org.nuiton.csv.ext.AbstractImportModel;
-import javax.ejb.EJB;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -311,12 +311,9 @@
@Override
public FinancialTransaction parse(String value) {
+ Preconditions.checkArgument(!Strings.isNullOrEmpty(value));
FinancialTransaction result;
- if (StringUtils.isNotBlank(value)) {
- result = financialTransactionService.getFinancialTransactionWithId(value);
- } else {
- result = null;
- }
+ result = financialTransactionService.getFinancialTransactionWithId(value);
return result;
}
};
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -109,7 +109,6 @@
@Before
public void initAbstractTest() throws Exception {
setUpLocale();
-// LimaInterceptor.schemaExistChecked = false;
Properties options = getTestConfiguration();
LimaConfig config = new LimaTestsConfig("/lima-test.properties", options);
initServices(config);
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -90,6 +90,7 @@
transaction1.setEntryBook(journalDesVentes);
transaction1 = financialTransactionService.createFinancialTransaction(transaction1);
+
Entry tr1Entry1 = new EntryImpl();
tr1Entry1.setAmount(BigDecimal.valueOf(42.0));
tr1Entry1.setAccount(accountVmpVae);
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -53,10 +53,12 @@
try {
contentStream = new FileInputStream(tmpDir + "export-accounts.csv");
String inportStream = IOUtils.toString(contentStream);
- newImportService.importAccountAsCSV(inportStream);
+ ImportResult result = newImportService.importAccountAsCSV(inportStream);
// make sure all account have been created
Assert.assertEquals(nbEntities, accountService.getAllAccounts().size());
+ Assert.assertEquals(nbEntities, result.getNbCreated());
+ Assert.assertTrue(result.getException().getAllExceptionsByLine().isEmpty());
} finally {
IOUtils.closeQuietly(contentStream);
}
@@ -83,50 +85,21 @@
Assert.assertEquals(0, entryBookService.getAllEntryBooks().size());
FileInputStream contentStream = null;
+ ImportResult result;
try {
contentStream = new FileInputStream(tmpDir + "export-EntryBooks.csv");
String inportStream = IOUtils.toString(contentStream);
- newImportService.importEntryBooksAsCSV(inportStream);
+ result = newImportService.importEntryBooksAsCSV(inportStream);
} finally {
IOUtils.closeQuietly(contentStream);
}
Assert.assertEquals(nbEntities, entryBookService.getAllEntryBooks().size());
+ Assert.assertEquals(nbEntities, result.getNbCreated());
+ Assert.assertTrue(result.getException().getAllExceptionsByLine().isEmpty());
}
@Test
- public void testExportImportFinancialTransactions() throws Exception {
- initTestWithFinancialTransaction();
-
- String tmpDir = System.getProperty("java.io.tmpdir")+"/";
- String export = newExportService.exportFinancialTransactionsAsCSV(Charset.defaultCharset().name());
- InputStream stream = IOUtils.toInputStream(export);
- FileOutputStream res = new FileOutputStream(tmpDir + "export-financial-transactions.csv");
- IOUtils.copy(stream, res);
-
- List<FinancialTransaction> financialTransactions = financialTransactionService.getAllFinancialTransactions(df.parse("January 1, 2012"),df.parse("December 31, 2012"));
- int nbEntities = financialTransactions.size();
- Assert.assertEquals(1, nbEntities);
-
- for (FinancialTransaction financialTransaction : financialTransactions) {
- financialTransactionService.removeFinancialTransaction(financialTransaction);
- }
-
- Assert.assertEquals(0, financialTransactionService.getAllFinancialTransactions(df.parse("January 1, 2012"), df.parse("December 31, 2012")).size());
-
- FileInputStream contentStream = null;
- try {
- contentStream = new FileInputStream(tmpDir + "export-financial-transactions.csv");
- String inportStream = IOUtils.toString(contentStream);
- newImportService.importFinancialTransactionsAsCSV(inportStream);
- } finally {
- IOUtils.closeQuietly(contentStream);
- }
-
- Assert.assertEquals(nbEntities, financialTransactionService.getAllFinancialTransactions(df.parse("January 1, 2012"),df.parse("December 31, 2012")).size());
- }
-
- @Test
public void testExportImportEntries() throws Exception {
initTestWithFinancialTransaction();
@@ -163,10 +136,11 @@
// test import
FileInputStream contentStream = null;
+ ImportResult result;
try {
contentStream = new FileInputStream(tmpDir + "export-entries.csv");
String inputStream = IOUtils.toString(contentStream);
- newImportService.importEntriesAsCSV(inputStream);
+ result = newImportService.importEntriesAsCSV(inputStream);
} finally {
IOUtils.closeQuietly(contentStream);
}
@@ -179,6 +153,8 @@
}
Assert.assertEquals(nbEntities, entries.size());
+ Assert.assertEquals(nbEntities, result.getNbCreated());
+ Assert.assertTrue(result.getException().getAllExceptionsByLine().isEmpty());
}
@Test
@@ -192,24 +168,26 @@
IOUtils.copy(stream, res);
List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllFiscalPeriods();
- int nbEntities = fiscalPeriods.size();
- Assert.assertEquals(1, nbEntities);
+ int nbFiscalPeriods = fiscalPeriods.size();
+ Assert.assertEquals(1, nbFiscalPeriods);
initAbstractTest();
Assert.assertEquals(0, fiscalPeriodService.getAllFiscalPeriods().size());
FileInputStream contentStream = null;
+ ImportResult result;
try {
contentStream = new FileInputStream(tmpDir + "export-fiscal-periods.csv");
String inputStream = IOUtils.toString(contentStream);
- // TODO DCossé 22/07/14 traiter les messages de retour
- newImportService.importFiscalPeriodsAsCSV(inputStream);
+ result = newImportService.importFiscalPeriodsAsCSV(inputStream);
} finally {
IOUtils.closeQuietly(contentStream);
}
- Assert.assertEquals(nbEntities, fiscalPeriodService.getAllFiscalPeriods().size());
+ Assert.assertEquals(nbFiscalPeriods, fiscalPeriodService.getAllFiscalPeriods().size());
+ Assert.assertEquals(nbFiscalPeriods, result.getNbCreated());
+ Assert.assertTrue(result.getException().getAllExceptionsByLine().isEmpty());
}
@Test
@@ -223,11 +201,15 @@
initAbstractTest();
FileInputStream contentStream = null;
+ List<ImportResult> importResults;
try {
- importAllFromZipFile(tmpDir);
+ importResults = importAllFromZipFile(tmpDir);
} finally {
IOUtils.closeQuietly(contentStream);
}
+ for (ImportResult importResult : importResults) {
+ Assert.assertTrue(importResult.getException().getAllExceptionsByLine().isEmpty());
+ }
}
protected void createZipFile(String path, String zippedBase64Str) throws Exception {
@@ -236,7 +218,7 @@
IOUtils.copy(inputStream, new FileOutputStream(path));
}
- protected String importAllFromZipFile(String filePath) {
+ protected List<ImportResult> importAllFromZipFile(String filePath) {
ZipInputStream zipInputStream = null;
String tmpDir = System.getProperty("java.io.tmpdir")+"/";
FileInputStream inputStream = null;
@@ -279,6 +261,7 @@
IOUtils.closeQuietly(inputStream);
}
InputStream transactionsStream, entryBooksStream, fiscalPeriodsStream, entriesStream, accountsStream;
+ List<ImportResult> results;
try {
entryBooksStream = new FileInputStream(tmpDir + "entryBooks.csv");
String entryBooksStreamString = IOUtils.toString(entryBooksStream);
@@ -301,8 +284,7 @@
String accountsStreamString = IOUtils.toString(accountsStream);
IOUtils.closeQuietly(accountsStream);
- // TODO DCossé 23/07/14 should be done in one transaction on service side but it doesn't work now
- newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
+ results = newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
} catch (Exception ex) {
if(log.isInfoEnabled()) {
@@ -310,6 +292,6 @@
}
throw new LimaTechnicalException("could not import files", ex);
}
- return "SUCCES";
+ return results;
}
}
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -38,7 +38,9 @@
import org.junit.Test;
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
/**
* Test le service de génération des reports.
@@ -92,7 +94,7 @@
transaction1.setTransactionDate(df.parse("April 5, 2012"));
transaction1.setEntryBook(journalDesVentes);
transaction1 = financialTransactionService.createFinancialTransaction(transaction1);
-
+
Entry tr1Entry1 = new EntryImpl();
tr1Entry1.setAmount(BigDecimal.valueOf(54.0));
tr1Entry1.setAccount(accountVmpVae);
Added: trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportException.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportException.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportException.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -0,0 +1,20 @@
+package org.chorem.lima.business;
+
+import java.util.HashMap;
+import java.util.Map;
+/**
+ * Created by davidcosse on 24/07/14.
+ */
+public class ImportException extends LimaException {
+
+ protected Map<Integer, LimaException> allExceptions = new HashMap<>();
+
+
+ public void addException(Integer indexLine, LimaException e) {
+ allExceptions.put(indexLine, e);
+ }
+
+ public Map<Integer, LimaException> getAllExceptionsByLine() {
+ return allExceptions;
+ }
+}
Added: trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportResult.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportResult.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/ImportResult.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -0,0 +1,52 @@
+package org.chorem.lima.business;
+
+import java.io.Serializable;
+
+/**
+ * Created by davidcosse on 24/07/14.
+ */
+public class ImportResult implements Serializable{
+
+ protected int nbCreated;
+
+ protected int nbUpdated;
+
+ protected int nbIgnored;
+
+ protected ImportException exception;
+
+ public ImportResult() {
+ this.exception = new ImportException();
+ nbCreated = 0;
+ nbUpdated = 0;
+ nbIgnored = 0;
+ }
+
+ public int getNbCreated() {
+ return nbCreated;
+ }
+
+ public int getNbUpdated() {
+ return nbUpdated;
+ }
+
+ public int getNbIgnored() {
+ return nbIgnored;
+ }
+
+ public ImportException getException() {
+ return exception;
+ }
+
+ public int increaseCreated() {
+ return nbCreated++;
+ }
+
+ public int increaseUpdated() {
+ return nbUpdated++;
+ }
+
+ public int increaseIgnored() {
+ return nbIgnored++;
+ }
+}
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-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -87,6 +87,14 @@
List<Account> getAllSubAccounts(Account account);
/**
+ * Create or update account
+ * @param account the account to create
+ * @return true if updated or false if created
+ * @throws InvalidAccountNumberException
+ */
+ boolean createOrUbdateAccount(Account account) throws InvalidAccountNumberException;
+
+ /**
* Create new account. If {@code masterAccount} is not null, {@code account}
* is added in {@code masterAccount}'s subAccounts.
*
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -60,6 +60,13 @@
List<EntryBook> getAllEntryBooks();
/**
+ * Create or update the given entry book
+ * @param entryBook
+ * @return true if updated, false if created
+ */
+ boolean createOrUpdateEntryBook(EntryBook entryBook);
+
+ /**
* Create new entry book.
*
* @param entryBook
@@ -85,6 +92,4 @@
* @throws org.chorem.lima.business.UsedEntryBookException
*/
void removeEntryBook(EntryBook entryBook) throws UsedEntryBookException;
-
- void createClosedPeriodicEntryBook(EntryBook entryBook);
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -39,7 +39,6 @@
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FiscalPeriod;
-import java.util.Collection;
import java.util.List;
/**
@@ -98,8 +97,4 @@
FiscalPeriod updateEndDate(FiscalPeriod fiscalPeriod);
- void createFiscalPeriodsClosePeriodicEntryBooks(Collection<FiscalPeriod> fiscalPeriods) throws
- BeginAfterEndFiscalPeriodException,
- NotBeginNextDayOfLastFiscalPeriodException,
- MoreOneUnlockFiscalPeriodException;
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/NewImportService.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -22,20 +22,24 @@
* #L%
*/
+import org.chorem.lima.business.AlreadyExistAccountException;
+import org.chorem.lima.business.ImportResult;
+import org.chorem.lima.business.InvalidAccountNumberException;
+
+import java.util.List;
+
/**
* Created by davidcosse on 03/06/14.
*/
public interface NewImportService {
- String importAccountAsCSV(String contents);
+ ImportResult importAccountAsCSV(String contents);
- String importEntryBooksAsCSV(String contents);
+ ImportResult importEntryBooksAsCSV(String contents);
- String importFiscalPeriodsAsCSV(String contents);
+ ImportResult importFiscalPeriodsAsCSV(String contents);
- String importFinancialTransactionsAsCSV(String contents);
+ ImportResult importEntriesAsCSV(String contents);
- String importEntriesAsCSV(String contents);
-
- String importAllAsCSV(String entryBooks, String transactions, String fiscalPeriods, String accounts, String entries);
+ List<ImportResult> importAllAsCSV(String entryBooks, String transactions, String fiscalPeriods, String accounts, String entries) throws AlreadyExistAccountException, InvalidAccountNumberException;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-07-28 12:06:55 UTC (rev 3868)
@@ -34,6 +34,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaTechnicalException;
import org.chorem.lima.business.ImportEbpException;
+import org.chorem.lima.business.ImportResult;
import org.chorem.lima.business.api.ExportService;
import org.chorem.lima.business.api.ImportService;
import org.chorem.lima.business.api.NewExportService;
@@ -66,6 +67,7 @@
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
@@ -144,7 +146,9 @@
@Override
protected String doInBackground() {
String datas;
+ // TODO DCossé 24/07/14 remove it
String result = "";
+ ImportResult importResult;
try {
switch (importExportMethodeF) {
case CSV_ALL_EXPORT:
@@ -182,15 +186,20 @@
createFile(filePath, EncodingEnum.ISOLATIN1.getEncoding(), datas);
break;
case CSV_ALL_IMPORT:
- result = importAllFromZipFile(filePath);
+ List<ImportResult> results = importAllFromZipFile(filePath);
+ result = "SUCCESS";
break;
case CSV_ACCOUNTCHARTS_IMPORT:
datas = extractFile(filePath, charset.name());
- result = newImportService.importAccountAsCSV(datas);
+ importResult = newImportService.importAccountAsCSV(datas);
+ // TODO DCossé 24/07/14 change result
+ result = "SUCCESS";
break;
case CSV_ENTRYBOOKS_IMPORT:
datas = extractFile(filePath, charset.name());
- result = newImportService.importEntryBooksAsCSV(datas);
+ importResult = newImportService.importEntryBooksAsCSV(datas);
+ // TODO DCossé 24/07/14 change result
+ result = "SUCCESS";
break;
case CSV_FINANCIALSTATEMENTS_IMPORT:
datas = extractFile(filePath, charset.name());
@@ -198,7 +207,9 @@
break;
case CSV_ENTRIES_IMPORT:
datas = extractFile(filePath, charset.name());
- result = newImportService.importEntriesAsCSV(datas);
+ importResult = newImportService.importEntriesAsCSV(datas);
+ // TODO DCossé 24/07/14 change result
+ result = "SUCCESS";
break;
case CSV_VAT_IMPORT:
datas = extractFile(filePath, charset.name());
@@ -419,7 +430,7 @@
}
}
- protected String importAllFromZipFile(String filePath) {
+ protected List<ImportResult> importAllFromZipFile(String filePath) {
ZipInputStream zipInputStream = null;
String tmpDir = System.getProperty("java.io.tmpdir")+"/";
FileInputStream inputStream = null;
@@ -462,6 +473,7 @@
IOUtils.closeQuietly(inputStream);
}
InputStream transactionsStream, entryBooksStream, fiscalPeriodsStream, entriesStream, accountsStream;
+ List<ImportResult> results;
try {
entryBooksStream = new FileInputStream(tmpDir + "entryBooks.csv");
String entryBooksStreamString = IOUtils.toString(entryBooksStream);
@@ -484,7 +496,7 @@
String entriesStreamString = IOUtils.toString(entriesStream);
IOUtils.closeQuietly(entriesStream);
- newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
+ results = newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
} catch (Exception ex) {
if(log.isInfoEnabled()) {
@@ -492,6 +504,6 @@
}
throw new LimaTechnicalException("could not import files", ex);
}
- return "SUCCES";
+ return results;
}
}
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2014-07-28 12:06:55 UTC (rev 3868)
@@ -242,6 +242,9 @@
lima.filter.entrybook=
lima.filter.letter=
lima.filter.voucher=
+lima.financialStatements.check=
+lima.financialStatements.check.nothing=
+lima.financialStatements.check.warn=
lima.financialstatement.accounts=Account list on debit and on credit
lima.financialstatement.addfinancialStatementHeadererror=Can't add financialStatementHeader
lima.financialstatement.check=Check accounts passing to movement
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2014-07-25 08:47:33 UTC (rev 3867)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2014-07-28 12:06:55 UTC (rev 3868)
@@ -226,6 +226,9 @@
lima.filter.entrybook=Ajouter un filtre sur les journaux
lima.filter.letter=Ajouter un filtre sur les lettres
lima.filter.voucher=Ajouter un filtre sur les pièces comptables
+lima.financialStatements.check=
+lima.financialStatements.check.nothing=
+lima.financialStatements.check.warn=
lima.financialstatement.accounts=Liste de comptes au crédit et au débit
lima.financialstatement.addfinancialStatementHeadererror=Erreur lors de l'ajout de l'entête sur la déclaration financière
lima.financialstatement.check=Vérification des comptes aux postes
1
0
r3867 - in trunk/lima-swing/src/main/java/org/chorem/lima/ui: celleditor common financialtransaction
by sbavencoff@users.chorem.org 25 Jul '14
by sbavencoff@users.chorem.org 25 Jul '14
25 Jul '14
Author: sbavencoff
Date: 2014-07-25 10:47:33 +0200 (Fri, 25 Jul 2014)
New Revision: 3867
Url: http://forge.chorem.org/projects/lima/repository/revisions/3867
Log:
fixes #973 : auto complete
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractColumn.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/Column.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java 2014-07-25 08:47:33 UTC (rev 3867)
@@ -0,0 +1,38 @@
+package org.chorem.lima.ui.celleditor;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Sylvain Bavencoff <bavencoff(a)codelutin.com>
+ */
+public class AutoCompleteTableCellEditor extends StringTableCellEditor {
+
+ protected static Map<String, List<String>> precedingValuesById = Maps.newHashMap();
+
+ List<String> precedingValues;
+
+ public AutoCompleteTableCellEditor(String id) {
+ precedingValues = precedingValuesById.get(id);
+
+ if (precedingValues == null) {
+ precedingValues = Lists.newLinkedList();
+ precedingValuesById.put(id, precedingValues);
+ }
+
+ AutoCompleteDecorator.decorate(getComponent(), precedingValues, false);
+ }
+
+ @Override
+ public String getCellEditorValue() {
+ String stringValue = super.getCellEditorValue().toString();
+ if (!precedingValues.contains(stringValue)) {
+ precedingValues.add(stringValue);
+ }
+ return stringValue;
+ }
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractColumn.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractColumn.java 2014-07-24 12:48:39 UTC (rev 3866)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractColumn.java 2014-07-25 08:47:33 UTC (rev 3867)
@@ -27,6 +27,8 @@
import org.chorem.lima.LimaConfig;
import org.chorem.lima.util.ErrorHelper;
+import javax.swing.table.TableCellEditor;
+
/**
* @author Sylvain Bavencoff <bavencoff(a)codelutin.com>
*/
@@ -40,6 +42,8 @@
protected boolean editable;
+ protected TableCellEditor cellEditor;
+
protected ErrorHelper errorHelper;
public AbstractColumn(Class<?> columnClass, String columnName, boolean editable) {
@@ -87,4 +91,12 @@
public void setEditable(boolean editable) {
this.editable = editable;
}
+
+ public TableCellEditor getCellEditor() {
+ return cellEditor;
+ }
+
+ public void setCellEditor(TableCellEditor cellEditor) {
+ this.cellEditor = cellEditor;
+ }
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java 2014-07-24 12:48:39 UTC (rev 3866)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java 2014-07-25 08:47:33 UTC (rev 3867)
@@ -40,9 +40,14 @@
import org.chorem.lima.ui.celleditor.StringTableCellEditor;
import org.jdesktop.swingx.JXTable;
-import javax.swing.*;
+import javax.swing.AbstractAction;
+import javax.swing.ActionMap;
+import javax.swing.InputMap;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
import javax.swing.table.TableCellEditor;
-import java.awt.*;
+import javax.swing.table.TableModel;
+import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
@@ -87,6 +92,20 @@
setShowHorizontalLines(false);
}
+ @Override
+ public void setModel(TableModel model) {
+ super.setModel(model);
+ if (model instanceof AbstractLimaTableModel) {
+ for (int columnIndex = 0; columnIndex < getColumnModel().getColumnCount(); columnIndex++) {
+ Column column = ((AbstractLimaTableModel) model).getColumn(columnIndex);
+ TableCellEditor cellEditor = column.getCellEditor();
+ if (cellEditor != null) {
+ getColumnModel().getColumn(columnIndex).setCellEditor(cellEditor);
+ }
+ }
+ }
+ }
+
protected void initNavigation() {
InputMap inputMap= getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
@@ -100,8 +119,6 @@
clearSelection();
}
});
-
-
}
public H getHandler() {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/Column.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/Column.java 2014-07-24 12:48:39 UTC (rev 3866)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/Column.java 2014-07-25 08:47:33 UTC (rev 3867)
@@ -24,20 +24,24 @@
* #L%
*/
+import javax.swing.table.TableCellEditor;
+
/**
* @author Sylvain Bavencoff <bavencoff(a)codelutin.com>
*/
public interface Column<T extends AbstractLimaTableModel> {
- public Class<?> getColumnClass();
+ Class<?> getColumnClass();
- public String getColumnName();
+ String getColumnName();
- public Object getValueAt(int row);
+ Object getValueAt(int row);
- public boolean isCellEditable(int row);
+ boolean isCellEditable(int row);
- public boolean setValueAt(Object value, int row);
+ boolean setValueAt(Object value, int row);
- public void setTableModel(T tableModel);
+ void setTableModel(T tableModel);
+
+ TableCellEditor getCellEditor();
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java 2014-07-24 12:48:39 UTC (rev 3866)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DescriptionColumn.java 2014-07-25 08:47:33 UTC (rev 3867)
@@ -25,6 +25,7 @@
*/
import org.chorem.lima.entity.Entry;
+import org.chorem.lima.ui.celleditor.AutoCompleteTableCellEditor;
import org.chorem.lima.ui.common.AbstractColumn;
import org.chorem.lima.ui.common.FinancialTransactionTableModel;
@@ -37,6 +38,7 @@
public DescriptionColumn() {
super(String.class, t("lima.ui.financialtransaction.description"), true);
+ setCellEditor(new AutoCompleteTableCellEditor("lima.ui.financialtransaction.description"));
}
@Override
public Object getValueAt(int row) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java 2014-07-24 12:48:39 UTC (rev 3866)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/VoucherColumn.java 2014-07-25 08:47:33 UTC (rev 3867)
@@ -25,6 +25,7 @@
*/
import org.chorem.lima.entity.Entry;
+import org.chorem.lima.ui.celleditor.AutoCompleteTableCellEditor;
import org.chorem.lima.ui.common.AbstractColumn;
import org.chorem.lima.ui.common.FinancialTransactionTableModel;
@@ -37,6 +38,7 @@
public VoucherColumn() {
super(String.class, t("lima.ui.financialtransaction.voucher"), true);
+ setCellEditor(new AutoCompleteTableCellEditor("lima.ui.financialtransaction.voucher"));
}
@Override
1
0
r3866 - trunk/lima-business/src/main/java/org/chorem/lima/business
by dcosse@users.chorem.org 24 Jul '14
by dcosse@users.chorem.org 24 Jul '14
24 Jul '14
Author: dcosse
Date: 2014-07-24 14:48:39 +0200 (Thu, 24 Jul 2014)
New Revision: 3866
Url: http://forge.chorem.org/projects/lima/repository/revisions/3866
Log:
refs #1049 ajout d'un commentaire sur le pourquoi de la cr?\195?\169ation manuel des sch?\195?\169mas
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java 2014-07-24 12:31:31 UTC (rev 3865)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java 2014-07-24 12:48:39 UTC (rev 3866)
@@ -104,6 +104,7 @@
LimaCallaoTopiaPersistenceContext tx = rootContext.newPersistenceContext();
+ // TODO DCossé 24/07/14 remove it as soon as migration service is done.
createShemaIfNeeded(rootContext, tx);
DAO_HELPER.set(tx);
1
0
r3865 - trunk/lima-business/src/test/java/org/chorem/lima/business
by dcosse@users.chorem.org 24 Jul '14
by dcosse@users.chorem.org 24 Jul '14
24 Jul '14
Author: dcosse
Date: 2014-07-24 14:31:31 +0200 (Thu, 24 Jul 2014)
New Revision: 3865
Url: http://forge.chorem.org/projects/lima/repository/revisions/3865
Log:
refs #1032 correction sur un test en echec
Modified:
trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-24 12:28:03 UTC (rev 3864)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/NewImportExportServiceTest.java 2014-07-24 12:31:31 UTC (rev 3865)
@@ -302,27 +302,8 @@
IOUtils.closeQuietly(accountsStream);
// TODO DCossé 23/07/14 should be done in one transaction on service side but it doesn't work now
- newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, entriesStreamString, accountsStreamString);
-// newImportService.importEntryBooksAsCSV(entryBooksStreamString);
-// if(log.isInfoEnabled()) {
-// log.info("jouranux importés");
-// }
-// newImportService.importFinancialTransactionsAsCSV(transactionsStreamString);
-// if(log.isInfoEnabled()) {
-// log.info("transactions importés");
-// }
-// newImportService.importFiscalPeriodsAsCSV(fiscalPeriodsStreamString);
-// if(log.isInfoEnabled()) {
-// log.info("période ficales importés");
-// }
-// newImportService.importEntriesAsCSV(entriesStreamString);
-// if(log.isInfoEnabled()) {
-// log.info("entrées importés");
-// }
-// newImportService.importAccountAsCSV(accountsStreamString);
-// if(log.isInfoEnabled()) {
-// log.info("comptes importés");
-// }
+ newImportService.importAllAsCSV(entryBooksStreamString, transactionsStreamString, fiscalPeriodsStreamString, accountsStreamString, entriesStreamString);
+
} catch (Exception ex) {
if(log.isInfoEnabled()) {
log.info(ex);
1
0
r3864 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod
by dcosse@users.chorem.org 24 Jul '14
by dcosse@users.chorem.org 24 Jul '14
24 Jul '14
Author: dcosse
Date: 2014-07-24 14:28:03 +0200 (Thu, 24 Jul 2014)
New Revision: 3864
Url: http://forge.chorem.org/projects/lima/repository/revisions/3864
Log:
refs #1048 il manquait un import pour que ?\195?\167a compile
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2014-07-24 12:11:50 UTC (rev 3863)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2014-07-24 12:28:03 UTC (rev 3864)
@@ -30,6 +30,7 @@
org.chorem.lima.entity.FinancialPeriod
org.chorem.lima.ui.financialperiod.FinancialPeriodTable
org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel
+ static org.nuiton.i18n.I18n.t
</import>
<FinancialPeriodViewHandler id="handler" constructorParams="this"/>
1
0