Lima-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 1853 discussions
Author: vsalaun
Date: 2011-08-01 10:03:10 +0200 (Mon, 01 Aug 2011)
New Revision: 3238
Url: http://chorem.org/repositories/revision/lima/3238
Log:
add contributor to project
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-28 14:48:10 UTC (rev 3237)
+++ trunk/pom.xml 2011-08-01 08:03:10 UTC (rev 3238)
@@ -289,6 +289,16 @@
<role>Développeur</role>
</roles>
</contributor>
+ <contributor>
+ <name>Victor Salaun</name>
+ <email>salaun(a)codelutin.com</email>
+ <organization>Code Lutin</organization>
+ <organizationUrl>http://www.codelutin.com</organizationUrl>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </contributor>
</contributors>
<!-- ************************************************************* -->
1
0
Author: vsalaun
Date: 2011-07-28 16:48:10 +0200 (Thu, 28 Jul 2011)
New Revision: 3237
Url: http://chorem.org/repositories/revision/lima/3237
Log:
#420 Add directory in zip release for CSV document
#421 i18n files
Modified:
trunk/lima-swing/src/main/assembly/bin.xml
Modified: trunk/lima-swing/src/main/assembly/bin.xml
===================================================================
--- trunk/lima-swing/src/main/assembly/bin.xml 2011-07-28 14:46:54 UTC (rev 3236)
+++ trunk/lima-swing/src/main/assembly/bin.xml 2011-07-28 14:48:10 UTC (rev 3237)
@@ -72,5 +72,19 @@
<include>LICENSE*</include>
</includes>
</fileSet>
+ <fileSet>
+ <directory>src/main/resources/import</directory>
+ <outputDirectory>import</outputDirectory>
+ <includes>
+ <include>*.csv</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/resources/i18n</directory>
+ <outputDirectory>i18n</outputDirectory>
+ <includes>
+ <include>*.properties</include>
+ </includes>
+ </fileSet>
</fileSets>
-</assembly>
\ No newline at end of file
+</assembly>
1
0
Author: vsalaun
Date: 2011-07-28 16:46:54 +0200 (Thu, 28 Jul 2011)
New Revision: 3236
Url: http://chorem.org/repositories/revision/lima/3236
Log:
Add directory in zip release for reports documents
Modified:
trunk/lima-business/src/main/assembly/bin.xml
Modified: trunk/lima-business/src/main/assembly/bin.xml
===================================================================
--- trunk/lima-business/src/main/assembly/bin.xml 2011-07-26 16:05:28 UTC (rev 3235)
+++ trunk/lima-business/src/main/assembly/bin.xml 2011-07-28 14:46:54 UTC (rev 3236)
@@ -59,5 +59,12 @@
<include>LICENSE*</include>
</includes>
</fileSet>
+ <fileSet>
+ <directory>src/main/resources/reports</directory>
+ <outputDirectory>reports</outputDirectory>
+ <includes>
+ <include>*.pdf</include>
+ </includes>
+ </fileSet>
</fileSets>
-</assembly>
\ No newline at end of file
+</assembly>
1
0
r3235 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-callao/src/main/xmi
by vsalaun@users.chorem.org 26 Jul '11
by vsalaun@users.chorem.org 26 Jul '11
26 Jul '11
Author: vsalaun
Date: 2011-07-26 18:05:28 +0200 (Tue, 26 Jul 2011)
New Revision: 3235
Url: http://chorem.org/repositories/revision/lima/3235
Log:
#347 add string variable to vat csv and uml used for pdf linkage
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2011-07-26 09:34:52 UTC (rev 3234)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2011-07-26 16:05:28 UTC (rev 3235)
@@ -304,7 +304,7 @@
*/
public void exportFinancialStatementChartAsCSV(CSVWriter csvWriter, TopiaContext topiaContext) throws LimaException {
try {
- String[] nextLine = new String[11];
+ String[] nextLine = new String[12];
// Get all Financialstatements
FinancialStatementDAO financialStatementDAO =
LimaCallaoDAOHelper.getFinancialStatementDAO(topiaContext);
@@ -385,11 +385,12 @@
/**
* Local methode, export vatstatements from database
- * structure : TYPE | Label | Header | Accounts
+ * vatstatement Structure : TYPE | label | header |
+ * | accounts | subAmount | headerAmount | masterVatStatement | editable
*/
public void exportVatStatementChartAsCSV(CSVWriter csvWriter, TopiaContext topiaContext) throws LimaException {
try {
- String[] nextLine = new String[7];
+ String[] nextLine = new String[9];
// Get all Vatstatements
VatStatementDAO vatStatementDAO =
LimaCallaoDAOHelper.getVatStatementDAO(topiaContext);
@@ -402,13 +403,14 @@
// For all Vatstatements
for (VatStatement vatStatement : listVatStatements) {
nextLine[0] = ImportExportEntityEnum.VATSTATEMENT.getLabel();
- nextLine[1] = vatStatement.getLabel();
- nextLine[2] = Boolean.toString(
+ nextLine[1] = vatStatement.getBoxName();
+ nextLine[2] = vatStatement.getLabel();
+ nextLine[3] = Boolean.toString(
vatStatement.getHeader());
- nextLine[3] = vatStatement.getAccounts();
- nextLine[4] = Boolean.toString(
+ nextLine[4] = vatStatement.getAccounts();
+ nextLine[5] = Boolean.toString(
vatStatement.getSubAmount());
- nextLine[5] = Boolean.toString(
+ nextLine[6] = Boolean.toString(
vatStatement.getHeaderAmount());
VatStatement masterVatStatement =
vatStatement.getMasterVatStatement();
@@ -417,8 +419,10 @@
masterVatStatementString =
masterVatStatement.getLabel();
}
- nextLine[6] = masterVatStatementString;
-
+ nextLine[7] = masterVatStatementString;
+ nextLine[8] = Boolean.toString(
+ vatStatement.getEditable());
+
csvWriter.writeNext(nextLine);
}
}
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 2011-07-26 09:34:52 UTC (rev 3234)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2011-07-26 16:05:28 UTC (rev 3235)
@@ -847,8 +847,8 @@
/**
- * Import and create vatstatement Structure : TYPE | label | header |
- * | accounts | subAmount | headerAmount | masterVatStatement
+ * Import and create vatstatement Structure : TYPE | boxName | label | header
+ * | accounts | subAmount | headerAmount | masterVatStatement | editable
*/
public String importVatStatementChartCSV(String[] nextLine,
@@ -857,12 +857,14 @@
StringBuffer result = new StringBuffer();
- String label = nextLine[1];
- String header = nextLine[2];
- String accounts = nextLine[3];
- String subAmount = nextLine[4];
- String headerAmount = nextLine[5];
- String masterVatStatement = nextLine[6];
+ String boxName = nextLine[1];
+ String label = nextLine[2];
+ String header = nextLine[3];
+ String accounts = nextLine[4];
+ String subAmount = nextLine[5];
+ String headerAmount = nextLine[6];
+ String masterVatStatement = nextLine[7];
+ String editable = nextLine[8];
try {
@@ -874,11 +876,13 @@
// create it
VatStatementImport vatStatementImport = new VatStatementImportImpl();
vatStatementImport.setLabel(label);
+ vatStatementImport.setBoxName(boxName);
vatStatementImport.setHeader(header);
vatStatementImport.setAccounts(accounts);
vatStatementImport.setSubAmount(subAmount);
vatStatementImport.setHeaderAmount(headerAmount);
vatStatementImport.setMasterVatStatement(masterVatStatement);
+ vatStatementImport.setEditable(editable);
// put it in hashlinkedlist
if (vatStatements.containsKey(label)){
@@ -1062,6 +1066,8 @@
|| masterVatStatement != null) {
// create it
VatStatement vatStatement = new VatStatementImpl();
+ vatStatement.setBoxName(vatStatementImport
+ .getBoxName());
vatStatement.setLabel(vatStatementImport
.getLabel());
vatStatement.setAccounts(vatStatementImport
@@ -1074,6 +1080,9 @@
.getSubAmount()));
vatStatement.setHeaderAmount(vatStatement
.getHeaderAmount());
+ vatStatement.setEditable(Boolean
+ .parseBoolean(vatStatementImport
+ .getEditable()));
vatStatementService
.createVatStatementWithTransaction(
masterVatStatement,
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
1
0
r3234 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/java/org/chorem/lima/business/ejbinterface lima-swing/src/main/java/org/chorem/lima/ui/vatreports
by vsalaun@users.chorem.org 26 Jul '11
by vsalaun@users.chorem.org 26 Jul '11
26 Jul '11
Author: vsalaun
Date: 2011-07-26 11:34:52 +0200 (Tue, 26 Jul 2011)
New Revision: 3234
Url: http://chorem.org/repositories/revision/lima/3234
Log:
#347 update vat UI and service
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -1458,7 +1458,7 @@
//############## VAT ##############
@Override
- public void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete)
+ public void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete, String datas)
throws LimaException, IOException, COSVisitorException {
try {
@@ -1556,98 +1556,76 @@
//end of page one
//page two
+
+ String[] bigDecimalList = datas.split("_");
//sets parameters to use for each TextField
ArrayList<ArrayList<String>> listOfLists = new ArrayList<ArrayList<String>>();
-
- listOfLists.add(new ArrayList<String>(Arrays.asList("b1.b1", "Ventes, prestations de services")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b2.b2", "Autres opérations imposables")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b3.b3", "Achats de prestations de services intracommunautaires")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b4.b4", "Acquisitions intracommunautaires")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b5.b5", "Livraisons de gaz naturel ou d'électricité imposables en France")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b6.b6", "Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b7.b7", "Régularisations (imposables)")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b8.b8", "Exportations hors CE")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b9.b9", "Autres opérations non imposables")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b10.b10", "Livraisons intracommunautaires")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b11.b11", "Livraisons de gaz naturel ou d'électricité non imposables en France")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b12.b12", "Achats de franchise")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b13.b13", "Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b14.b14", "Régularisations (non imposables)")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b15.b15", "Taux normal 19,6%", "0.196", "b23.b23")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b16.b16", "Taux réduit 5,5%", "0.055", "b24.b24")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b17.b17", "Taux normal 8,5%", "0.085", "b25.b25")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b18.b18", "Taux réduit 2,1%", "0.021", "b26.b26")));
- //unknown tax %
- //listOfLists.add(new ArrayList<String>(Arrays.asList("b19.b19", "Opérations imposables à un autre taux (France métropolitaine ou DOM)", "", "b27.b27")));
- //listOfLists.add(new ArrayList<String>(Arrays.asList("b20.b20", "Ancien taux", "", "b27.b27")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b35.b35", "Biens constituant des immobilisations")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b36.b36", "Autres biens et services")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b37.b37", "Autre TVA à déduire")));
- listOfLists.add(new ArrayList<String>(Arrays.asList("b38.b38", "Report du crédit apparaissant ligne 27 de la précédente déclaration")));
-
- BigDecimal amount;
- //A MONTANT DES OPÉRATIONS RÉALISÉES
- for (int i = 0; i < 13; i++) {
- amount = vatStatementService.vatStatementAmounts(
- vatStatementService.findVatStatementByString(listOfLists.get(i).get(1)),
- beginDate, endDate);
- if (!amount.equals(BigDecimal.ZERO)) {
- fields.setField(doc, listOfLists.get(i).get(0), amount.toString());
- }
+ // Structure : box name on the pdf | text showed on the pdf | amount
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b1.b1", "Ventes, prestations de services", bigDecimalList[2])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b2.b2", "Autres opérations imposables", bigDecimalList[3])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b3.b3", "Achats de prestations de services intracommunautaires", bigDecimalList[4])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b4.b4", "Acquisitions intracommunautaires", bigDecimalList[5])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b5.b5", "Livraisons de gaz naturel ou d'électricité imposables en France", bigDecimalList[6])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b6.b6", "Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France", bigDecimalList[7])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b7.b7", "Régularisations (imposables)", bigDecimalList[8])));
+
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b8.b8", "Exportations hors CE", bigDecimalList[11])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b9.b9", "Autres opérations non imposables", bigDecimalList[12])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b10.b10", "Livraisons intracommunautaires", bigDecimalList[13])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b11.b11", "Livraisons de gaz naturel ou d'électricité non imposables en France", bigDecimalList[14])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b12.b12", "Achats de franchise", bigDecimalList[15])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b13.b13", "Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France", bigDecimalList[16])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b14.b14", "Régularisations (non imposables)", bigDecimalList[17])));
+
+
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b15.b15", "Taux normal 19,6% (Base hors taxe)", bigDecimalList[23])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b23.b23", "Taux normal 19,6% (Taxe due)", bigDecimalList[24])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b16.b16", "Taux réduit 5,5% (Base hors taxe)", bigDecimalList[25])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b24.b24", "Taux réduit 5,5% (Taxe due)", bigDecimalList[26])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b18.b18", "Taux normal 8,5% (Base hors taxe)", bigDecimalList[29])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b26.b26", "Taux normal 8,5% (Taxe due)", bigDecimalList[30])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b19.b19", "Taux réduit 2,1% (Base hors taxe)", bigDecimalList[31])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b27.b27", "Taux réduit 2,1% (Taxe due)", bigDecimalList[32])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b21.b21", "Ancien taux (Base hors taxe)", bigDecimalList[35])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b29.b29", "Ancien taux (Taxe due)", bigDecimalList[36])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b22.b22", "Opérations imposables à un autre taux (France métropolitaine ou DOM) (Base hors taxe)", bigDecimalList[37])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b30.b30", "Opérations imposables à un autre taux (France métropolitaine ou DOM) (Taxe due)", bigDecimalList[38])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b31.b31", "TVA antérieurement déduite à reverser", bigDecimalList[40])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b32.b32", "Total de la TVA brute due (lignes 08 à 15)", bigDecimalList[41])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b33.b33", "Dont TVA sur acquisitions intracommunautaires", bigDecimalList[42])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b34.b34", "Dont TVA sur opérations à destination de Monaco", bigDecimalList[43])));
+
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b35.b35", "Biens constituant des immobilisations", bigDecimalList[46])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b36.b36", "Autres biens et services", bigDecimalList[47])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b37.b37", "Autre TVA à déduire", bigDecimalList[48])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b38.b38", "Report du crédit apparaissant ligne 27 de la précédente déclaration", bigDecimalList[49])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("total1.total1", "Total TVA déductible (lignes 19 à 22)", bigDecimalList[50])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b39.b39", "Dont TVA non perçue récupérable par les assujettis disposant d’un établissement stable dans les DOM", bigDecimalList[51])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b40.b40", "Crédit de TVA", bigDecimalList[55])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b41.b41", "Remboursement demandé sur formulaire", bigDecimalList[56])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b42.b42", "Crédit à reporter", bigDecimalList[57])));
+
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b43.b43", "TVA nette due", bigDecimalList[60])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b44.b44", "Taxes assimilées calculées sur annexe no 3310 A", bigDecimalList[61])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b45.b45", "Sommes à imputer, exprimées en euros, y compris acompte congés", bigDecimalList[62])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b46.b46", "Sommes à ajouter, exprimées en euros, y compris acompte congés", bigDecimalList[63])));
+ listOfLists.add(new ArrayList<String>(Arrays.asList("b47.b47", "Total à payer", bigDecimalList[64])));
+
+
+ for (List<String> list : listOfLists) {
+ fields.setField(doc, list.get(0), list.get(2));
}
-
- BigDecimal sommeTVABruteDue = new BigDecimal(0);
- //B DÉCOMPTE DE LA TVA À PAYER
- for (int i = 13; i < 19; i++) {
- amount = vatStatementService.vatStatementAmounts(
- vatStatementService.findVatStatementByString(listOfLists.get(i).get(1)),
- beginDate, endDate);
- if (!amount.equals(BigDecimal.ZERO)) {
- sommeTVABruteDue = sommeTVABruteDue.add(amount.multiply(BigDecimal.valueOf(Double.valueOf(listOfLists.get(i).get(2)))));
- fields.setField(doc, listOfLists.get(i).get(0), amount.toString());
- fields.setField(doc, listOfLists.get(i).get(3),
- amount.multiply(BigDecimal.valueOf(Double.valueOf(listOfLists.get(i).get(2)))).toString());
- }
- }
-
- // TVA antérieurement déduite à reverser
- BigDecimal tvaAReverser = vatStatementService.vatStatementAmounts(
- vatStatementService.findVatStatementByString("TVA antérieurement déduite à reverser"),
- beginDate, endDate);
- sommeTVABruteDue = sommeTVABruteDue.add(tvaAReverser);
-
- if (!tvaAReverser.equals(BigDecimal.ZERO)) {
- fields.setField(doc, "b31.b31" , tvaAReverser.toString());
- }
-
- //Total de la TVA brute due
- fields.setField(doc, "b32.b32" , sommeTVABruteDue.toString());
-
- BigDecimal sommeTVADeductible = new BigDecimal(0);
- //TVA DÉDUCTIBLE
- for (int i = 19; i < 22; i++) {
- amount = vatStatementService.vatStatementAmounts(
- vatStatementService.findVatStatementByString(listOfLists.get(i).get(1)),
- beginDate, endDate);
- if (!amount.equals(BigDecimal.ZERO)) {
- sommeTVADeductible = sommeTVADeductible.add(amount);
- fields.setField(doc, listOfLists.get(i).get(0), amount.toString());
- }
- }
-
- //Total de la TVA déductible
- fields.setField(doc, "total1.total1" , sommeTVADeductible.toString());
-
- //Crédit de TVA
- BigDecimal creditDeTva = sommeTVADeductible.subtract(sommeTVABruteDue);
- if (creditDeTva.compareTo(BigDecimal.ZERO) == 1) {
- fields.setField(doc, "b40.b40" , creditDeTva.abs().toString());
- fields.setField(doc, "b42.b42" , creditDeTva.abs().toString());
- } else {
- fields.setField(doc, "b43.b43" , creditDeTva.abs().toString());
- fields.setField(doc, "b47.b47" , creditDeTva.abs().toString());
- }
//end of page two
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -128,6 +128,7 @@
String beginDate = req.getParameter("beginDate");
String endDate = req.getParameter("endDate");
String autocomplete = req.getParameter("autocomplete");
+ String datas = req.getParameter("datas");
//if image
if (imageParam != null){
@@ -173,7 +174,7 @@
case VAT:
documentService.createVatDocuments(
beginDateFormat, endDateFormat, formatsEnum,
- autocomplete);
+ autocomplete, datas);
break;
}
} catch (LimaException eeeLE) {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -25,6 +25,7 @@
package org.chorem.lima.business.ejb;
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;
@@ -38,6 +39,10 @@
import org.chorem.lima.beans.Amounts;
import org.chorem.lima.beans.AmountsImpl;
import org.chorem.lima.beans.ReportsDatas;
+import org.chorem.lima.beans.VatStatementAmounts;
+import org.chorem.lima.beans.VatStatementAmountsImpl;
+import org.chorem.lima.beans.VatStatementDatas;
+import org.chorem.lima.beans.VatStatementDatasImpl;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
@@ -306,24 +311,41 @@
}
@Override
- public BigDecimal vatStatementAmounts(VatStatement vatStatement, Date selectedBeginDate, Date selectedEndDate) throws LimaException, TopiaException {
+ public VatStatementAmounts vatStatementAmounts(VatStatement vatStatement, Date selectedBeginDate, Date selectedEndDate) throws LimaException, TopiaException {
+ TopiaContext transaction = null;
+ VatStatementAmounts vatStatementAmount = new VatStatementAmountsImpl();
+ transaction = beginTransaction();
+ try {
+ vatStatementAmount = vatStatementAmounts(vatStatement, selectedBeginDate, selectedEndDate, transaction);
+ }
+ catch (TopiaException e) {
+ doCatch(transaction, e, log);
+ }
+ finally {
+ doFinally(transaction, log);
+ }
+ return vatStatementAmount;
+ }
+
+ @Override
+ public VatStatementAmounts vatStatementAmounts(VatStatement vatStatement, Date selectedBeginDate, Date selectedEndDate, TopiaContext topiacontext) throws LimaException, TopiaException {
+ VatStatementAmounts vatStatementAmounts =
+ new VatStatementAmountsImpl();
BigDecimal debitTemp = new BigDecimal(0);
BigDecimal creditTemp = new BigDecimal(0);
- TopiaContext transaction = null;
try {
- transaction = beginTransaction();
- String accountNumbersList = findAccountNumberByVatStatement(vatStatement, transaction);
+ String accountNumbersList = findAccountNumberByVatStatement(vatStatement, topiacontext);
- AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction);
+ AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(topiacontext);
List<Account> accountsList = accountDAO.stringToListAccounts(accountNumbersList, false);
for (Account account : accountsList) {
ReportsDatas reportsDatas = reportServiceLocal.
generateAccountReportsWithTransaction(account, true,
- selectedBeginDate, selectedEndDate, transaction);
+ selectedBeginDate, selectedEndDate, topiacontext);
if (reportsDatas.getSoldeDebit()){
debitTemp = debitTemp.add(reportsDatas.getAmountSolde());
}
@@ -333,12 +355,12 @@
}
}
catch (TopiaException e) {
- doCatch(transaction, e, log);
+ doCatch(topiacontext, e, log);
}
- finally {
- doFinally(transaction, log);
- }
- return debitTemp.subtract(creditTemp).abs();
+ //return debitTemp.subtract(creditTemp).abs();
+ vatStatementAmounts.setAmount(debitTemp.subtract(creditTemp).abs());
+ return vatStatementAmounts;
+
}
@Override
@@ -382,7 +404,110 @@
}
return vatStatement;
}
+
+ /**
+ * remote methode to get list of financial statement
+ */
+ public List<VatStatementAmounts> vatStatementReport(Date beginDate, Date endDate) throws LimaException {
+ TopiaContext transaction = null;
+ List<VatStatementAmounts> result = null;
+ try {
+ transaction = beginTransaction();
+ //create list form tree
+ result = vatStatementReport(null, beginDate, endDate,
+ new VatStatementDatasImpl(), transaction).getListResult();
+ }
+ catch (TopiaException ex) {
+ doCatch(transaction, ex, log);
+ }
+ finally {
+ doFinally(transaction, log);
+ }
+ return result;
+ }
+
+ /**
+ * Créé la liste de postes contenant les calculs de comptes
+ * @throws TopiaException
+ */
+ public VatStatementDatas vatStatementReport(VatStatement vatStatement, Date selectedBeginDate, Date selectedEndDate,VatStatementDatas result, TopiaContext topiaContext) throws LimaException, TopiaException {
+ List<VatStatement> vatStatements =
+ getChildrenVatStatement(vatStatement);
+ try {
+ BigDecimal amount = new BigDecimal(0);
+ List<VatStatementAmounts> subResult =
+ new ArrayList<VatStatementAmounts>();
+ for (VatStatement subVatStatement : vatStatements) {
+ VatStatementAmounts vatStatementAmounts =
+ vatStatementAmounts(subVatStatement,
+ selectedBeginDate, selectedEndDate, topiaContext);
+ vatStatementAmounts.setLabel(subVatStatement.getLabel());
+ if (!subVatStatement.getHeader()){
+ //on calcul
+ amount =
+ amount.add(vatStatementAmounts.getAmount());
+ subResult.add(vatStatementAmounts);
+ }
+ else {
+ VatStatementDatas vatStatementDatas =
+ vatStatementReport(subVatStatement,
+ selectedBeginDate, selectedEndDate, result, topiaContext);
+ amount = amount.add(vatStatementDatas.
+ getVatStatementAmounts().getAmount());
+
+ VatStatementAmounts headerVatStatementAmounts =
+ vatStatementDatas.getVatStatementAmounts();
+ //Si sous-total
+ if (subVatStatement.getSubAmount()){
+ VatStatementAmounts header =
+ new VatStatementAmountsImpl();
+ header.setLabel(headerVatStatementAmounts.getLabel());
+ header.setLevel(headerVatStatementAmounts.getLevel());
+ header.setHeader(true);
+ //ajoute header
+ subResult.add(header);
+ //ajoute liste
+ if (vatStatementDatas.getListResult() != null){
+ subResult.addAll(vatStatementDatas.getListResult());
+ }
+ //ajoute une ligne vide
+ subResult.add(new VatStatementAmountsImpl());
+
+ }//sinon
+ else {
+ if (subVatStatement.getHeaderAmount()){
+ subResult.add(headerVatStatementAmounts);
+ }
+ else {
+ headerVatStatementAmounts.
+ setAmount(new BigDecimal(0));
+ subResult.add(headerVatStatementAmounts);
+ }
+ //ajoute liste
+ if (vatStatementDatas.getListResult() != null){
+ subResult.addAll(vatStatementDatas.getListResult());
+ }
+ }
+ }
+ }
+ VatStatementAmounts vatStatementAmounts =
+ new VatStatementAmountsImpl();
+ vatStatementAmounts.setAmount(amount);
+ if (vatStatement != null){
+ vatStatementAmounts.setLabel(vatStatement.getLabel());
+ vatStatementAmounts.setHeader(vatStatement.getHeader());
+ vatStatementAmounts.setLevel(vatStatement.getLevel());
+ }
+ result.setVatStatementAmounts(vatStatementAmounts);
+ result.setListResult(subResult);
+ }
+ catch (LimaException eee) {
+ doCatch(topiaContext, eee, log);
+ }
+ return result;
+ }
+
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -47,6 +47,6 @@
void createEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
void createBalanceDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
void createGeneralEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
- void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete) throws LimaException, IOException, COSVisitorException;;
+ void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete, String datas) throws LimaException, IOException, COSVisitorException;;
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -24,12 +24,12 @@
*/
package org.chorem.lima.business.ejbinterface;
-import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.ejb.Remote;
+import org.chorem.lima.beans.VatStatementAmounts;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.VatStatement;
import org.nuiton.topia.TopiaException;
@@ -51,11 +51,13 @@
void updateVatStatement(VatStatement vatStatement) throws LimaException;
- BigDecimal vatStatementAmounts(VatStatement vatStatement,
+ VatStatementAmounts vatStatementAmounts(VatStatement vatStatement,
Date selectedBeginDate, Date selectedEndDate) throws LimaException,
TopiaException;
VatStatement findVatStatementByString(String label) throws LimaException;
+
+ List<VatStatementAmounts> vatStatementReport(Date beginDate, Date endDate) throws LimaException;
}
\ No newline at end of file
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -24,11 +24,14 @@
*/
package org.chorem.lima.business.ejbinterface;
+import java.util.Date;
import javax.ejb.Local;
+import org.chorem.lima.beans.VatStatementAmounts;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.VatStatement;
import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
@Local
public interface VatStatementServiceLocal extends VatStatementService {
@@ -37,4 +40,8 @@
VatStatement masterVatStatement, VatStatement vatStatement,
TopiaContext transaction) throws LimaException;
+ VatStatementAmounts vatStatementAmounts(VatStatement vatStatement,
+ Date selectedBeginDate, Date selectedEndDate,
+ TopiaContext topiacontext) throws LimaException, TopiaException;
+
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -35,6 +35,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.beans.VatStatementAmounts;
+import org.chorem.lima.business.FinancialTransactionServiceMonitorable;
+import org.chorem.lima.business.ImportServiceMonitorable;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ReportServiceMonitorable;
import org.chorem.lima.business.ServiceListener;
@@ -56,6 +58,8 @@
/** Services. */
protected ReportServiceMonitorable reportService;
protected VatStatementServiceMonitorable vatStatementService;
+ protected FinancialTransactionServiceMonitorable financialTransactionService;
+ protected ImportServiceMonitorable importService;
/** selected financial period */
protected FiscalPeriod selectedFiscalPeriod;
@@ -67,7 +71,7 @@
* list of BigDecimal, save the difference between the number given by the VAT chart
* and the number given by the user afterwards
*/
- private List<BigDecimal> diffBigDecimalList = new ArrayList<BigDecimal>(); //list of 38 elements
+ private List<BigDecimal> diffBigDecimalList = new ArrayList<BigDecimal>(); //list of 65 elements
/**
* variable used for the document edition,
@@ -80,11 +84,23 @@
public VatReportTableModel() {
reportService =
LimaServiceFactory.getInstance().getService(
- ReportServiceMonitorable.class);
+ ReportServiceMonitorable.class);
+
+ //add listeners
vatStatementService =
- LimaServiceFactory.getInstance().getService(
- VatStatementServiceMonitorable.class);
+ LimaServiceFactory.getInstance().getService(
+ VatStatementServiceMonitorable.class);
vatStatementService.addListener(this);
+ financialTransactionService =
+ LimaServiceFactory.getInstance().getService(
+ FinancialTransactionServiceMonitorable.class);
+ financialTransactionService.addListener(this);
+ importService =
+ LimaServiceFactory.getInstance().getService(
+ ImportServiceMonitorable.class);
+ importService.addListener(this);
+
+ //sets autocomplete mode to true on start
autocomplete = "true";
}
@@ -121,7 +137,7 @@
if (cacheDataList != null) {
for (int index = 0; index < cacheDataList.size(); index++) {
//sets the BigDecimal difference list
- if (diffBigDecimalList.size() != 38) {
+ if (diffBigDecimalList.size() != 65) {
diffBigDecimalList.add(BigDecimal.ZERO);
}
}
@@ -206,7 +222,6 @@
break;
}
}
-
return result;
}
@@ -215,7 +230,10 @@
//check first if the user has changed the number value
if (!getValueAt(row, column).equals((BigDecimal)value)) {
//if so set the difference between the values inside diffBigDecimalList
- diffBigDecimalList.set(row, ((BigDecimal) value).subtract((BigDecimal)getValueAt(row, column)));
+ BigDecimal diff = diffBigDecimalList.get(row)
+ .add(((BigDecimal) value)
+ .subtract((BigDecimal)getValueAt(row, column)));
+ diffBigDecimalList.set(row, diff);
}
}
@@ -240,6 +258,15 @@
}
}
+ public String getDiffBigDecimalList() {
+ String result = "";
+ for (BigDecimal bigdecimal : diffBigDecimalList) {
+ result += bigdecimal.toString() + "_";
+ }
+ result = result.substring(0, result.length()-1);
+ return result;
+ }
+
@Override
public boolean isCellEditable(int row, int column) {
//only the second column can be editable, and also if it contains a number
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java 2011-07-25 09:02:55 UTC (rev 3233)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java 2011-07-26 09:34:52 UTC (rev 3234)
@@ -86,7 +86,8 @@
+ dateFormat.format(tableModel.getFiscalPeriod().getBeginDate())
+ "&endDate=" + dateFormat.format(tableModel.getFiscalPeriod().getEndDate())
+ "&format=.pdf&model=" + DocumentsEnum.VAT.getFileName()
- + "&autocomplete=" + tableModel.getAutocomplete();
+ + "&autocomplete=" + tableModel.getAutocomplete()
+ + "&datas=" + tableModel.getDiffBigDecimalList();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
log.error("Can't open browser", e);
1
0
r3233 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui java/org/chorem/lima/ui/vatreports resources/i18n
by vsalaun@users.chorem.org 25 Jul '11
by vsalaun@users.chorem.org 25 Jul '11
25 Jul '11
Author: vsalaun
Date: 2011-07-25 11:02:55 +0200 (Mon, 25 Jul 2011)
New Revision: 3233
Url: http://chorem.org/repositories/revision/lima/3233
Log:
#347 update vat report table + add import/export for vat to menu
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-07-25 08:07:59 UTC (rev 3232)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-07-25 09:02:55 UTC (rev 3233)
@@ -125,12 +125,14 @@
<JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT)'/>
<JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/>
<JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT)'/>
+ <JMenuItem text="lima.importexport.vatstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_VAT_IMPORT)'/>
</JMenu>
<JMenu text="lima.importexport.export" actionIcon='export-element'>
<JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_EXPORT)'/>
<JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_EXPORT)'/>
<JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/>
<JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_EXPORT)'/>
+ <JMenuItem text="lima.importexport.vatstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_VAT_EXPORT)'/>
</JMenu>
</JMenu>
<JMenu text="lima.importexport.ebp">
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-25 08:07:59 UTC (rev 3232)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-25 09:02:55 UTC (rev 3233)
@@ -26,25 +26,19 @@
import static org.nuiton.i18n.I18n._;
-import java.text.SimpleDateFormat;
import java.math.BigDecimal;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.beans.BalanceTrial;
-import org.chorem.lima.beans.ReportsDatas;
+import org.chorem.lima.beans.VatStatementAmounts;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ReportServiceMonitorable;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.utils.EntryComparator;
-import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.business.VatStatementServiceMonitorable;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.ErrorHelper;
@@ -61,13 +55,25 @@
/** Services. */
protected ReportServiceMonitorable reportService;
+ protected VatStatementServiceMonitorable vatStatementService;
/** selected financial period */
protected FiscalPeriod selectedFiscalPeriod;
/** data cache */
- protected List<Object> cacheDataList;
+ protected List<VatStatementAmounts> cacheDataList;
+ /**
+ * list of BigDecimal, save the difference between the number given by the VAT chart
+ * and the number given by the user afterwards
+ */
+ private List<BigDecimal> diffBigDecimalList = new ArrayList<BigDecimal>(); //list of 38 elements
+
+ /**
+ * variable used for the document edition,
+ * if "true" then the document will be automatically filled in
+ * if "false" the the document will be empty
+ */
protected String autocomplete;
@@ -75,37 +81,22 @@
reportService =
LimaServiceFactory.getInstance().getService(
ReportServiceMonitorable.class);
+ vatStatementService =
+ LimaServiceFactory.getInstance().getService(
+ VatStatementServiceMonitorable.class);
+ vatStatementService.addListener(this);
autocomplete = "true";
}
- protected List<Object> getDataList() throws TopiaException {
- List<Object> finalresults = new ArrayList<Object>();
+ protected List<VatStatementAmounts> getDataList() throws TopiaException {
+ List<VatStatementAmounts> list = null;
+
if (selectedFiscalPeriod != null) {
try {
- List<Object> results = reportService.generateVat(selectedFiscalPeriod);
-
- for (int index=0; index<results.size(); index++) {
- if (results.get(index) instanceof BalanceTrial) {
- if (((BalanceTrial)results.get(index)).getReportsDatas() != null){
- for (ReportsDatas reportsDatas : ((BalanceTrial)results.get(index)).getReportsDatas()) {
- //reports datas
- finalresults.add(reportsDatas);
- List<Entry> entries = (List<Entry>) reportsDatas.getListEntry();
- if (entries != null){
- Collections.sort(entries, new EntryComparator());
- for (Entry entry : entries) {
- //entry
- finalresults.add(entry);
- }
- }
- }
- }
- } else {
- //financial period
- finalresults.add(results.get(index));
- }
- }
+ list = vatStatementService.vatStatementReport(
+ selectedFiscalPeriod.getBeginDate(),
+ selectedFiscalPeriod.getEndDate());
}
catch (LimaException eee) {
if (log.isErrorEnabled()) {
@@ -114,7 +105,7 @@
ErrorHelper.showErrorDialog(_("lima.vatreport.listerror"), eee);
}
}
- return finalresults;
+ return list;
}
public void refresh(){
@@ -126,6 +117,15 @@
}
ErrorHelper.showErrorDialog("Can't get VAT list", eee);
}
+
+ if (cacheDataList != null) {
+ for (int index = 0; index < cacheDataList.size(); index++) {
+ //sets the BigDecimal difference list
+ if (diffBigDecimalList.size() != 38) {
+ diffBigDecimalList.add(BigDecimal.ZERO);
+ }
+ }
+ }
fireTableDataChanged();
}
@@ -136,26 +136,11 @@
switch (column) {
case 0:
- result = String.class;
+ result = String.class; //libellé
break;
case 1:
- result = Account.class;
+ result = BigDecimal.class; //solde
break;
- case 2:
- result = String.class;
- break;
- case 3:
- result = String.class;
- break;
- case 4:
- result = BigDecimal.class;
- break;
- case 5:
- result = BigDecimal.class;
- break;
- case 6:
- result = BigDecimal.class;
- break;
}
return result;
@@ -167,26 +152,11 @@
switch (column) {
case 0:
- result = _("lima.table.date"); //date
+ result = _("lima.table.label"); //label
break;
case 1:
- result = "compte"; //tva collectee
+ result = _("lima.table.solde"); //solde
break;
- case 2:
- result = "piece comptable"; //tva due
- break;
- case 3:
- result = "description"; //credit de tva
- break;
- case 4:
- result = "debit"; //remboursemments
- break;
- case 5:
- result = "credit"; //credit restant
- break;
- case 6:
- result = "solde"; //tva a payer
- break;
}
return result;
@@ -205,11 +175,11 @@
@Override
public int getColumnCount() {
- return 7;
+ return 2;
}
- public Object getElementAt(int row){
- Object currentRow = cacheDataList.get(row);
+ public VatStatementAmounts getElementAt(int row){
+ VatStatementAmounts currentRow = cacheDataList.get(row);
return currentRow;
}
@@ -218,112 +188,37 @@
Object result = null;
// just prevent too much result
if (cacheDataList != null) {
- result = cacheDataList.get(row);
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMM yyyy");
- if (result instanceof FinancialPeriod) {
- FinancialPeriod fp = (FinancialPeriod) result;
-
- switch (column) {
+ VatStatementAmounts value = cacheDataList.get(row);
+ switch (column) {
case 0:
- result = simpleDateFormat.format(fp.getBeginDate())
- + " - " + simpleDateFormat.format(fp.getEndDate());
+ result = value.getLabel();
break;
case 1:
- result = null;
- break;
- case 2:
- result = null; // voucher
- break;
- case 3:
- result = null; // description
- break;
- case 4:
- result = null; // position
- break;
- case 5:
- result = null;
- break;
- case 6:
- result = null;
- break;
- }
- }
- else if (result instanceof ReportsDatas) {
- ReportsDatas currentRow = (ReportsDatas)result;
- BigDecimal amountDebit = currentRow.getAmountDebit();
- BigDecimal amountCredit = currentRow.getAmountCredit();
-
- switch (column) {
- case 0:
- result = null; // date
- break;
- case 1:
- if (currentRow.getAccount() != null){
- result = currentRow.getAccount().getAccountNumber()
- + " - " + currentRow.getAccount().getLabel();
- }
- else {
+ if (value.getAmount() != null) {
+ //the number showed is the number given by the chart plus
+ //the number calculated from the diffBigDecimalList
+ //diffBigDecimalList can be a negative number !
+ result = value.getAmount()
+ .add(diffBigDecimalList.get(row));
+ } else {
result = null;
}
break;
- case 2:
- result = null; // voucher
- break;
- case 3:
- result = null; // description
- break;
- case 4:
- result = amountDebit; // position
- break;
- case 5:
- result = amountCredit;
- break;
- case 6:
- result = amountDebit.subtract(amountCredit);
- break;
- }
}
- else if (result instanceof Entry) {
- Entry currentRow = (Entry)result;
- BigDecimal amountDebit = BigDecimal.ZERO,
- amountCredit = BigDecimal.ZERO;
- if (currentRow.getDebit()){
- amountDebit = currentRow.getAmount();
- }
- else {
- amountCredit = currentRow.getAmount();
- }
-
- switch (column) {
- case 0: // date
- result = simpleDateFormat.
- format(currentRow.getFinancialTransaction().getTransactionDate());
- break;
- case 1 : // account
- result = null;
- break;
- case 2: // description
- result = currentRow.getVoucher();
- break;
- case 3:
- result = currentRow.getDescription();
- break;
- case 4:
- result = amountDebit;
- break;
- case 5:
- result = amountCredit;
- break;
- case 6:
- result = amountDebit.subtract(amountCredit);
- break;
- }
- }
}
return result;
}
+ @Override
+ public void setValueAt(Object value, int row, int column) {
+ //check first if the user has changed the number value
+ if (!getValueAt(row, column).equals((BigDecimal)value)) {
+ //if so set the difference between the values inside diffBigDecimalList
+ diffBigDecimalList.set(row, ((BigDecimal) value).subtract((BigDecimal)getValueAt(row, column)));
+ }
+ }
+
public FiscalPeriod getFiscalPeriod() {
return selectedFiscalPeriod;
}
@@ -344,11 +239,19 @@
autocomplete = "true";
}
}
+
+ @Override
+ public boolean isCellEditable(int row, int column) {
+ //only the second column can be editable, and also if it contains a number
+ return ((column ==1) && (getValueAt(row, column) != null));
+ }
@Override
public void notifyMethod(String serviceName, String methodeName) {
- // TODO Auto-generated method stub
-
+ //automatic refresh when FinancialTransaction, VatStatement chart or import for VAT services have been used by the user
+ if (serviceName.contains("FinancialTransaction") || methodeName.contains("VatStatement") || methodeName.contains("importAll")) {
+ refresh();
+ }
}
}
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-07-25 08:07:59 UTC (rev 3232)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-07-25 09:02:55 UTC (rev 3233)
@@ -193,6 +193,7 @@
lima.importexport.import.terminated=Import terminated
lima.importexport.importcsv=Import CSV
lima.importexport.importebp=Import EBP
+lima.importexport.vatstatements=VAT chart
lima.importexport.wait=Job in progress…
lima.init.closed=Lima closed at %1$s
lima.init.errorclosing=Error during Lima close
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-07-25 08:07:59 UTC (rev 3232)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-07-25 09:02:55 UTC (rev 3233)
@@ -193,6 +193,7 @@
lima.importexport.import.terminated=Import terminé
lima.importexport.importcsv=Import CSV
lima.importexport.importebp=Import EBP
+lima.importexport.vatstatements=Plan TVA
lima.importexport.wait=Traitement en cours …
lima.init.closed=Lima fermé à %1$s
lima.init.errorclosing=Erreur lors de la fermeture
1
0
r3232 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
by vsalaun@users.chorem.org 25 Jul '11
by vsalaun@users.chorem.org 25 Jul '11
25 Jul '11
Author: vsalaun
Date: 2011-07-25 10:07:59 +0200 (Mon, 25 Jul 2011)
New Revision: 3232
Url: http://chorem.org/repositories/revision/lima/3232
Log:
#347 add import and export for vat CSV
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2011-07-25 08:06:05 UTC (rev 3231)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2011-07-25 08:07:59 UTC (rev 3232)
@@ -389,7 +389,7 @@
*/
public void exportVatStatementChartAsCSV(CSVWriter csvWriter, TopiaContext topiaContext) throws LimaException {
try {
- String[] nextLine = new String[11];
+ String[] nextLine = new String[7];
// Get all Vatstatements
VatStatementDAO vatStatementDAO =
LimaCallaoDAOHelper.getVatStatementDAO(topiaContext);
@@ -403,7 +403,22 @@
for (VatStatement vatStatement : listVatStatements) {
nextLine[0] = ImportExportEntityEnum.VATSTATEMENT.getLabel();
nextLine[1] = vatStatement.getLabel();
- nextLine[2] = vatStatement.getAccounts();
+ nextLine[2] = Boolean.toString(
+ vatStatement.getHeader());
+ nextLine[3] = vatStatement.getAccounts();
+ nextLine[4] = Boolean.toString(
+ vatStatement.getSubAmount());
+ nextLine[5] = Boolean.toString(
+ vatStatement.getHeaderAmount());
+ VatStatement masterVatStatement =
+ vatStatement.getMasterVatStatement();
+ String masterVatStatementString = "";
+ if (masterVatStatement != null){
+ masterVatStatementString =
+ masterVatStatement.getLabel();
+ }
+ nextLine[6] = masterVatStatementString;
+
csvWriter.writeNext(nextLine);
}
}
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 2011-07-25 08:06:05 UTC (rev 3231)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2011-07-25 08:07:59 UTC (rev 3232)
@@ -847,7 +847,8 @@
/**
- * Import and create vatstatement Structure : TYPE | label | accounts
+ * Import and create vatstatement Structure : TYPE | label | header |
+ * | accounts | subAmount | headerAmount | masterVatStatement
*/
public String importVatStatementChartCSV(String[] nextLine,
@@ -859,8 +860,11 @@
String label = nextLine[1];
String header = nextLine[2];
String accounts = nextLine[3];
- String masterVatStatement = nextLine[4];
+ String subAmount = nextLine[4];
+ String headerAmount = nextLine[5];
+ String masterVatStatement = nextLine[6];
+
try {
VatStatementDAO vatStatementDAO = LimaCallaoDAOHelper
.getVatStatementDAO(topiaContext);
@@ -872,6 +876,8 @@
vatStatementImport.setLabel(label);
vatStatementImport.setHeader(header);
vatStatementImport.setAccounts(accounts);
+ vatStatementImport.setSubAmount(subAmount);
+ vatStatementImport.setHeaderAmount(headerAmount);
vatStatementImport.setMasterVatStatement(masterVatStatement);
// put it in hashlinkedlist
@@ -1063,6 +1069,11 @@
vatStatement.setHeader(Boolean
.parseBoolean(vatStatementImport
.getHeader()));
+ vatStatement.setSubAmount(Boolean
+ .parseBoolean(vatStatementImport
+ .getSubAmount()));
+ vatStatement.setHeaderAmount(vatStatement
+ .getHeaderAmount());
vatStatementService
.createVatStatementWithTransaction(
masterVatStatement,
1
0
Author: vsalaun
Date: 2011-07-25 10:06:05 +0200 (Mon, 25 Jul 2011)
New Revision: 3231
Url: http://chorem.org/repositories/revision/lima/3231
Log:
#347 update accounting.zargo for vat, and its properties (lazy)
Modified:
trunk/lima-callao/src/main/xmi/accounting.properties
trunk/lima-callao/src/main/xmi/accounting.zargo
Modified: trunk/lima-callao/src/main/xmi/accounting.properties
===================================================================
--- trunk/lima-callao/src/main/xmi/accounting.properties 2011-07-18 14:27:37 UTC (rev 3230)
+++ trunk/lima-callao/src/main/xmi/accounting.properties 2011-07-25 08:06:05 UTC (rev 3231)
@@ -48,6 +48,8 @@
org.chorem.lima.entity.FiscalPeriod.attribute.financialPeriod.tagvalue.lazy=false
org.chorem.lima.entity.FinancialStatement.attribute.subFinancialStatements.tagvalue.lazy=false
org.chorem.lima.entity.FinancialStatement.attribute.masterFinancialStatement.tagvalue.lazy=false
+org.chorem.lima.entity.VatStatement.attribute.subVatStatements.tagvalue.lazy=false
+org.chorem.lima.entity.VatStatement.attribute.masterVatStatement.tagvalue.lazy=false
#model.tagvalue.dbSchema=Callao
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
1
0
r3230 - in trunk/lima-business/src/main/java/org/chorem/lima/business: accountingrules ejb
by vsalaun@users.chorem.org 18 Jul '11
by vsalaun@users.chorem.org 18 Jul '11
18 Jul '11
Author: vsalaun
Date: 2011-07-18 16:27:37 +0200 (Mon, 18 Jul 2011)
New Revision: 3230
Url: http://chorem.org/repositories/revision/lima/3230
Log:
fix parameter error
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 14:17:31 UTC (rev 3229)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 14:27:37 UTC (rev 3230)
@@ -466,7 +466,7 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
+ throw new LimaException(_("lima-business.common.queryerror"), cause);
}
@Override
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2011-07-18 14:17:31 UTC (rev 3229)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2011-07-18 14:27:37 UTC (rev 3230)
@@ -322,6 +322,6 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
+ throw new LimaException(_("lima-business.common.queryerror"), cause);
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java 2011-07-18 14:17:31 UTC (rev 3229)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java 2011-07-18 14:27:37 UTC (rev 3230)
@@ -66,7 +66,7 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
+ throw new LimaException(_("lima-business.common.queryerror"), cause);
}
/**
1
0
Author: vsalaun
Date: 2011-07-18 16:17:31 +0200 (Mon, 18 Jul 2011)
New Revision: 3229
Url: http://chorem.org/repositories/revision/lima/3229
Log:
add to i18n all ErrorHelper and JOption text from lima-swing and translate them to French
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -466,7 +466,7 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException(_("lima-business.common.queryerror", cause));
+ throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
}
@Override
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -322,6 +322,6 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException(_("lima-business.common.queryerror", cause));
+ throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
}
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -66,7 +66,7 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException(_("lima-business.common.queryerror", cause));
+ throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
}
/**
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -288,7 +288,6 @@
transaction = beginTransaction();
if (fiscalPeriod.getLocked()){
- //throw new LimaBusinessException("Fiscal Period already blocked");
throw new LimaBusinessException(_("lima-business.fiscalperiod.fiscalperiodalreadyblocked"));
}
//check rules
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -119,7 +119,7 @@
if (log.isErrorEnabled()) {
log.error("Can't add account", ex);
}
- ErrorHelper.showErrorDialog("Can't add account", ex);
+ ErrorHelper.showErrorDialog(_("lima.account.addaccounterror"), ex);
}
}
};
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -112,7 +112,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get entries list", eee);
+ ErrorHelper.showErrorDialog(_("lima.accountsreports.listerror"), eee);
}
}
return results;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -137,7 +137,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get entries list", eee);
+ ErrorHelper.showErrorDialog(_("lima.balance.listerror"), eee);
}
return results;
}
@@ -193,7 +193,7 @@
if (log.isErrorEnabled()) {
log.debug("Enable to create document ", eee);
}
- ErrorHelper.showErrorDialog("Enable to create document ", eee);
+ ErrorHelper.showErrorDialog(_("lima.balance.documentcreationerror"), eee);
}
//tells if the fiscaPeriod as been found and is blocked
@@ -211,7 +211,7 @@
if (error) {
JOptionPane.showMessageDialog(
view,
- "Can't create document on an open fiscal year",
+ _("lima.balance.documentcreationfiscalerror"),
_("lima.common.error"),
JOptionPane.ERROR_MESSAGE);
} else {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -140,7 +140,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get entries list", eee);
+ ErrorHelper.showErrorDialog(_("lima.entrybooksreports.listerror"), eee);
}
}
return results;
@@ -198,7 +198,7 @@
if (log.isErrorEnabled()) {
log.debug("Enable to create document ", eee);
}
- ErrorHelper.showErrorDialog("Enable to create document ", eee);
+ ErrorHelper.showErrorDialog(_("lima.entrybooksreports.documentcreationerror"), eee);
}
//tells if the fiscaPeriod as been found and is blocked
@@ -216,7 +216,7 @@
if (error) {
JOptionPane.showMessageDialog(
view,
- "Can't create document on an open fiscal year",
+ _("lima.entrybooksreports.documentcreationfiscalerror"),
_("lima.common.error"),
JOptionPane.ERROR_MESSAGE);
} else {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -122,7 +122,7 @@
if (log.isErrorEnabled()) {
log.error("Can't add financialStatementHeader", ex);
}
- ErrorHelper.showErrorDialog("Can't add financialStatementHeader", ex);
+ ErrorHelper.showErrorDialog(_("lima.financialstatement.addfinancialStatementHeadererror"), ex);
}
}
};
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -263,7 +263,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get entries list", eee);
+ ErrorHelper.showErrorDialog(_("lima.financialstatementreport.listerror"), eee);
}
}
return results;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -98,7 +98,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get fiscal periods list", eee);
+ ErrorHelper.showErrorDialog(_("lima.fiscalperiod.listerror"), eee);
}
return results;
}
@@ -221,7 +221,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't create FiscalPeriod", eee);
}
- ErrorHelper.showErrorDialog("Can't create fiscal periods ", eee);
+ ErrorHelper.showErrorDialog(_("lima.fiscalperiod.creationerror"), eee);
}
}
@@ -233,7 +233,7 @@
f.setIconImage(Resource.getIcon("icons/lima.png").getImage());
JOptionPane.showMessageDialog(
f,
- "Fiscal Period has unbalanced transactions",
+ _("lima.fiscalperiod.unbalancedtransactions"),
_("lima.common.error"),
JOptionPane.ERROR_MESSAGE);
f.dispose();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -209,7 +209,7 @@
if (log.isErrorEnabled()) {
log.debug("Enable to create document ", eee);
}
- ErrorHelper.showErrorDialog("Enable to create document ", eee);
+ ErrorHelper.showErrorDialog(_("lima.ledger.documentcreationerror"), eee);
}
//tells if the fiscaPeriod as been found and is blocked
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -136,7 +136,7 @@
if (log.isErrorEnabled()) {
log.error("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get transaction list", eee);
+ ErrorHelper.showErrorDialog(_("lima.lettering.listerror"), eee);
}
}
return results;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-18 14:17:31 UTC (rev 3229)
@@ -111,7 +111,7 @@
if (log.isErrorEnabled()) {
log.debug("Can't update model", eee);
}
- ErrorHelper.showErrorDialog("Can't get VAT list", eee);
+ ErrorHelper.showErrorDialog(_("lima.vatreport.listerror"), eee);
}
}
return finalresults;
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-07-18 14:17:31 UTC (rev 3229)
@@ -1,9 +1,14 @@
=
+lima.account.addaccounterror=Can't add account
+lima.accountsreports.listerror=Can't get entries list
lima.action.commandline.help=Show help in console
lima.action.fullscreen=Full screen
lima.action.fullscreen.tip=Open ui in full screen
lima.action.normalscreen=Normal screen
lima.action.normalscreen.tip=Open ui in normal screen
+lima.balance.documentcreationerror=Enable to create document
+lima.balance.documentcreationfiscalerror=Can't create document on an open fiscal year
+lima.balance.listerror=Can't get entries list
lima.charts.account=Accounts chart
lima.charts.account.addAccount=Add account
lima.charts.account.addSubLedger=Add thirdpart account
@@ -98,6 +103,9 @@
lima.entries.searchtransaction=Search transaction
lima.entries.searchunbalancedtransaction=Incorrect transactions
lima.entries.writetransaction=Write entries
+lima.entrybooksreports.documentcreationerror=Enable to create document
+lima.entrybooksreports.documentcreationfiscalerror=Can't create document on an open fiscal year
+lima.entrybooksreports.listerror=Can't get entries list
lima.enum.comboboxaccount.account=Account
lima.enum.comboboxaccount.accountlist=Account list
lima.enum.comboboxaccount.allaccount=All accounts
@@ -121,6 +129,7 @@
lima.enum.comboboxperiod.period=Period
lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html>
lima.financialstatement.accounts=Account list on debit and on credit
+lima.financialstatement.addfinancialStatementHeadererror=Can't add financialStatementHeader
lima.financialstatement.check=Check accounts passing to movement
lima.financialstatement.creditaccounts=Account credit list
lima.financialstatement.debitaccounts=Account debit list
@@ -131,6 +140,10 @@
lima.financialstatement.movement.add=Add movement
lima.financialstatement.provisiondeprecationaccounts=Provisions and deprecations accounts list
lima.financialstatement.subamount=Calculate a subamount
+lima.financialstatementreport.listerror=Can't get entries list
+lima.fiscalperiod.creationerror=Can't create fiscal periods
+lima.fiscalperiod.listerror=Can't get fiscal periods list
+lima.fiscalperiod.unbalancedtransactions=Fiscal Period has unbalanced transactions
lima.home.chartaccounts.create=Create accountschart
lima.home.chartaccounts.modify=Modify accountschart
lima.home.chartaccounts.nothing=No accountschart
@@ -183,6 +196,8 @@
lima.importexport.wait=Job in progress…
lima.init.closed=Lima closed at %1$s
lima.init.errorclosing=Error during Lima close
+lima.ledger.documentcreationerror=Enable to create document
+lima.lettering.listerror=Can't get entries list
lima.menu.file=File
lima.menu.help=Help
lima.menu.help.about=About
@@ -255,6 +270,7 @@
lima.title.about.description=Open sources accounting software
lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html>
lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html>
+lima.vatreport.listerror=Can't get entries list
lima.warning.nimbus.landf=Could not find Numbus Look&Feel
limma.config.thousandseparator.description=
nuitonutil.error.applicationconfig.save=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-07-18 09:49:01 UTC (rev 3228)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-07-18 14:17:31 UTC (rev 3229)
@@ -1,9 +1,14 @@
=
+lima.account.addaccounterror=Erreur lors l'ajout d'un compte
+lima.accountsreports.listerror=Erreur lors de la récupération des données de la liste
lima.action.commandline.help=Afficher l'aide en console
lima.action.fullscreen=Plein Ecran
lima.action.fullscreen.tip=Passer en mode plein écran
lima.action.normalscreen=Ecran normal
lima.action.normalscreen.tip=Revenir en écran normal
+lima.balance.documentcreationerror=Erreur lors de la création du document
+lima.balance.documentcreationfiscalerror=Impossible de créer le document quand la période fiscale est ouverte
+lima.balance.listerror=Erreur lors de la récupération des données de la liste
lima.charts.account=Plan comptable
lima.charts.account.addAccount=Ajout Compte Général
lima.charts.account.addSubLedger=Ajouter Compte Tiers
@@ -98,6 +103,9 @@
lima.entries.searchtransaction=Rechercher des écritures
lima.entries.searchunbalancedtransaction=Entrées incorrectes
lima.entries.writetransaction=Saisir des écritures
+lima.entrybooksreports.documentcreationerror=Erreur lors de la création du document
+lima.entrybooksreports.documentcreationfiscalerror=Impossible de créedr un document quand la période fiscale est ouverte
+lima.entrybooksreports.listerror=Erreur lors de la récupération des données de la liste
lima.enum.comboboxaccount.account=Compte
lima.enum.comboboxaccount.accountlist=Liste de comptes
lima.enum.comboboxaccount.allaccount=Tous les comptes
@@ -121,6 +129,7 @@
lima.enum.comboboxperiod.period=Période
lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
lima.financialstatement.accounts=Liste de comptes au crédit et au débit
+lima.financialstatement.addfinancialStatementHeadererror=Erreur lors de l'ajout de l'entête sur la déclaration financière
lima.financialstatement.check=Vérification des comptes aux postes
lima.financialstatement.creditaccounts=Liste de comptes au crédit
lima.financialstatement.debitaccounts=Liste de comptes au débit
@@ -131,6 +140,10 @@
lima.financialstatement.movement.add=Ajouter un regrouprement
lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
lima.financialstatement.subamount=Calculer un sous-total
+lima.financialstatementreport.listerror=Erreur lors de la récupération des données de la liste
+lima.fiscalperiod.creationerror=Erreur lors de la création de la période fiscale
+lima.fiscalperiod.listerror=Erreur lors de la récupération des données de la liste
+lima.fiscalperiod.unbalancedtransactions=La période fiscale contient des transactions non équilibrées
lima.home.chartaccounts.create=Créer le plan des comptes
lima.home.chartaccounts.modify=Modifier le plan des comptes
lima.home.chartaccounts.nothing=Aucun compte \!
@@ -183,6 +196,8 @@
lima.importexport.wait=Traitement en cours …
lima.init.closed=Lima fermé à %1$s
lima.init.errorclosing=Erreur lors de la fermeture
+lima.ledger.documentcreationerror=Erreur lors de la création du document
+lima.lettering.listerror=Erreur lors de la récupération des données de la liste
lima.menu.file=Fichier
lima.menu.help=Aide
lima.menu.help.about=À Propos
@@ -255,6 +270,7 @@
lima.title.about.description=Logiciel de comptabilité Libre
lima.tooltip.filter=<html>Expression régulière \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
lima.tooltip.lettering=<html>Pour ajouter une lettre à plusieurs écritures <br/>Sélectionner plusieurs lignes avec la combinaison ctrl + click</html>
+lima.vatreport.listerror=Erreur lors de la récupération des données de la liste
lima.warning.nimbus.landf=Le look and feel nymbus n'a pas été trouvé
limma.config.thousandseparator.description=
nuitonutil.error.applicationconfig.save=
1
0