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;