Lima-commits
Threads by month
- ----- 2026 -----
- August
- July
- 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
July 2011
- 3 participants
- 46 discussions
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
July 28, 2011
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 July 26, 2011
by vsalaun@users.chorem.org July 26, 2011
July 26, 2011
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 July 26, 2011
by vsalaun@users.chorem.org July 26, 2011
July 26, 2011
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 July 25, 2011
by vsalaun@users.chorem.org July 25, 2011
July 25, 2011
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 July 25, 2011
by vsalaun@users.chorem.org July 25, 2011
July 25, 2011
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 July 18, 2011
by vsalaun@users.chorem.org July 18, 2011
July 18, 2011
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
July 18, 2011
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
r3228 - in trunk/lima-business/src/main: java/org/chorem/lima/business/accountingrules java/org/chorem/lima/business/ejb resources/i18n
by vsalaun@users.chorem.org July 18, 2011
by vsalaun@users.chorem.org July 18, 2011
July 18, 2011
Author: vsalaun
Date: 2011-07-18 11:49:01 +0200 (Mon, 18 Jul 2011)
New Revision: 3228
Url: http://chorem.org/repositories/revision/lima/3228
Log:
add to i18n all LimaBusinessExceptions from FiscalPeriodServiceImpl 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-business/src/main/resources/i18n/lima-business_en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 08:42:25 UTC (rev 3227)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 09:49:01 UTC (rev 3228)
@@ -71,8 +71,8 @@
// Check if the numberaccount is not blank
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber",
+ account.getAccountNumber()));
}
}
@@ -84,8 +84,8 @@
throws LimaException {
// check the number account is not empty
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber",
+ account.getAccountNumber()));
}
//check if parentaccount have no subaccount
if (masterAccount.getSubAccounts().size() > 0){
@@ -466,15 +466,15 @@
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
public void updateAccountRules(Account masterAccount, Account account) throws LimaException {
// Check if the numberaccount is not blank
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber",
+ account.getAccountNumber()));
}
}
@@ -482,8 +482,8 @@
public void updateSubLedgerRules(Account account) throws LimaException {
// check the number account is not empty
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber",
+ account.getAccountNumber()));
}
}
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 08:42:25 UTC (rev 3227)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2011-07-18 09:49:01 UTC (rev 3228)
@@ -65,21 +65,21 @@
// Check if the number account is type numeric
if (!StringUtils.isNumeric(account.getAccountNumber())){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric",
+ account.getAccountNumber()));
}
// Check if the number account start with the number of the master account
if (masterAccount!=null && !account.getAccountNumber().startsWith(
masterAccount.getAccountNumber())){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotmaster")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotmaster",
+ account.getAccountNumber()));
}
// Check if master account have a number between 1 to 8
if (masterAccount==null && !account.getAccountNumber().matches("[1-8]")){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror",
+ account.getAccountNumber()));
}
}
@@ -89,21 +89,21 @@
// Check if the number account is type numeric
if (!StringUtils.isNumeric(account.getAccountNumber())){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric",
+ account.getAccountNumber()));
}
// Check if the number account start with the number of the master account
if (masterAccount!=null && !account.getAccountNumber().startsWith(
masterAccount.getAccountNumber())){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotmaster")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotmaster",
+ account.getAccountNumber()));
}
// Check if master account have a number between 1 to 8
if (masterAccount==null && !account.getAccountNumber().matches("[1-8]")){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror",
+ account.getAccountNumber()));
}
}
@@ -115,8 +115,8 @@
// check if the master account number is begin with 4
if (!masterAccount.getAccountNumber().startsWith("4")){
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.masteraccountnumbererror")
- + " : " + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.masteraccountnumbererror",
+ account.getAccountNumber()));
}
}
@@ -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 08:42:25 UTC (rev 3227)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java 2011-07-18 09:49:01 UTC (rev 3228)
@@ -25,6 +25,8 @@
package org.chorem.lima.business.ejb;
+import static org.nuiton.i18n.I18n._;
+
import org.apache.commons.logging.Log;
import org.chorem.lima.business.LimaException;
import org.nuiton.topia.TopiaContext;
@@ -64,7 +66,7 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException("Exception during query", cause);
+ throw new LimaException(_("lima-business.common.queryerror", cause));
}
/**
@@ -82,7 +84,7 @@
if (log != null && log.isErrorEnabled()) {
log.error("Can't close transaction", ex);
}
- throw new LimaException("Can't close transaction", ex);
+ throw new LimaException(_("lima-business.common.transactionerror", ex));
}
}
}
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 08:42:25 UTC (rev 3227)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2011-07-18 09:49:01 UTC (rev 3228)
@@ -288,7 +288,8 @@
transaction = beginTransaction();
if (fiscalPeriod.getLocked()){
- throw new LimaBusinessException("Fiscal Period already blocked");
+ //throw new LimaBusinessException("Fiscal Period already blocked");
+ throw new LimaBusinessException(_("lima-business.fiscalperiod.fiscalperiodalreadyblocked"));
}
//check rules
accountingRules.blockFiscalPeriodRules(fiscalPeriod, transaction);
@@ -405,7 +406,7 @@
}
//check if the last financial period isn't blocked
if (lastFPeriod.getLocked()) {
- throw new LimaException("The last financial period from the fiscal period is blocked");
+ throw new LimaBusinessException(_("lima-business.fiscalperiod.previousfiscalperiodalreadyblocked"));
}
FinancialPeriod beginfinancialPeriod = null;
@@ -434,7 +435,7 @@
}
}
if (!found) {
- throw new LimaException("Can't set financial period on the following fiscal year ");
+ throw new LimaBusinessException(_("lima-business.fiscalperiod.newfinancialperioderror"));
}
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-07-18 08:42:25 UTC (rev 3227)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-07-18 09:49:01 UTC (rev 3228)
@@ -5,7 +5,8 @@
lima-Business.defaultaccountingrules.updatenewentryerror=Can't update entry \: financialperiod of this entrybook is closed
lima-business.account.accountalreardyexist=An account already exists with this number \: %s
lima-business.common.failed=FAILED \: %s \n
-lima-business.common.queryerror=Exception during query
+lima-business.common.queryerror=Exception during query \: %s
+lima-business.common.transactionerror=Can't close transaction \: %s
lima-business.defaultaccountingrules.allentrybookclosed=All EntryBook of this financialperiod are closed
lima-business.defaultaccountingrules.blockerrorequillibrate=Can't block financialperiod/entrybook contain financialtransaction not equilibrate
lima-business.defaultaccountingrules.dateaftererror=The date is after the fiscal period
@@ -16,7 +17,7 @@
lima-business.defaultaccountingrules.financialnewdateblocked=The financial period of the new date is blocked
lima-business.defaultaccountingrules.financialperiodblocked=The financial period is blocked
lima-business.defaultaccountingrules.financialtransactionblocked=The financial period of this transaction is blocked
-lima-business.defaultaccountingrules.invalidaccountnumber=Invalid AccountNumber
+lima-business.defaultaccountingrules.invalidaccountnumber=Invalid Account Number \: %d
lima-business.defaultaccountingrules.missingelements=Can't block financialperiod / missing elements in transactions for this FinancialPeriod/EntryBook
lima-business.defaultaccountingrules.missingentrybook=Can't block financialperiod / missing EntryBook in transactions
lima-business.defaultaccountingrules.subledgererror=Subledger must create on a account whithout subaccount
@@ -59,9 +60,12 @@
lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financial statement.\n Some account marked not found is normally.\n\n
lima-business.financialtransaction.retainedearnings.description=Retained earnings
lima-business.financialtransaction.retainedearnings.voucher=According to general meeting
-lima-business.franceaccountingrules.accountnumbernotmaster=Account Number not begin with the number account master
-lima-business.franceaccountingrules.accountnumbernotnumeric=Account Number is not numeric
-lima-business.franceaccountingrules.accountstartnumbererror=Master account is not a digit between 1 to 8
+lima-business.fiscalperiod.fiscalperiodalreadyblocked=Fiscal Period already blocked
+lima-business.fiscalperiod.newfinancialperioderror=Can't set financial period on the following fiscal year
+lima-business.fiscalperiod.previousfiscalperiodalreadyblocked=The last financial period from the fiscal period is blocked
+lima-business.franceaccountingrules.accountnumbernotmaster=Account Number not begin with the number account master \: %d
+lima-business.franceaccountingrules.accountnumbernotnumeric=Account Number is not numeric \: %s
+lima-business.franceaccountingrules.accountstartnumbererror=Master account is not a digit between 1 to 8 \: %d
lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook=The previous financial periods for this entrybook must be blocked before this
lima-business.franceaccountingrules.antefiscalperiodnotblocked=The ante fiscal period is not locked
lima-business.franceaccountingrules.masteraccountnumbererror=Master Account Number is not a thirdpart account
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-07-18 08:42:25 UTC (rev 3227)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-07-18 09:49:01 UTC (rev 3228)
@@ -5,7 +5,8 @@
lima-Business.defaultaccountingrules.updatenewentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce nouveau journal est bloquée
lima-business.account.accountalreardyexist=Un compte existe déjà avec ce numéro \: %s
lima-business.common.failed=Échec \: %s \n
-lima-business.common.queryerror=Exception lors de la requête
+lima-business.common.queryerror=Exception lors de la requête \: %s
+lima-business.common.transactionerror=Impossible de fermer la transaction \: %s
lima-business.defaultaccountingrules.allentrybookclosed=Tous les journaux de cette période financière sont fermés
lima-business.defaultaccountingrules.blockerrorequillibrate=Impossible de bloquer la période financière / le journal, il contient des transactions non équilibrées
lima-business.defaultaccountingrules.dateaftererror=La date est antérieure à la période fiscale
@@ -16,7 +17,7 @@
lima-business.defaultaccountingrules.financialnewdateblocked=La période financière de cette nouvelle date est bloquée
lima-business.defaultaccountingrules.financialperiodblocked=La période financière est bloquée
lima-business.defaultaccountingrules.financialtransactionblocked=La période financière de cette transaction est bloquée
-lima-business.defaultaccountingrules.invalidaccountnumber=Numéro de compte invalide
+lima-business.defaultaccountingrules.invalidaccountnumber=Numéro de compte invalide \: %d
lima-business.defaultaccountingrules.missingelements=Impossible de bloquer la période financière / il manque des éléments dans des transactions
lima-business.defaultaccountingrules.missingentrybook=Impossible de bloquer la période financière / il mmanque un journal dans une transaction
lima-business.defaultaccountingrules.subledgererror=Un livre auxilliaire doit être créé sur un compte contenant aucun sous-compte
@@ -59,9 +60,12 @@
lima-business.financialstatement.check.warn=Attention cette fonctionnalité n'est qu'une aide utilisateur.\n Certains comptes ne doivent pas être présent au bilan et compte de résultat.\n Il est donc normal que des comptes sont marqués comme introuvable.\n\n
lima-business.financialtransaction.retainedearnings.description=Report à nouveau
lima-business.financialtransaction.retainedearnings.voucher=Selon décision AG
-lima-business.franceaccountingrules.accountnumbernotmaster=Le numéro de compte doit reprendre le numéro de compte général
-lima-business.franceaccountingrules.accountnumbernotnumeric=Le numéro de copte n'est pas numéric
-lima-business.franceaccountingrules.accountstartnumbererror=Le numéro du copte général n'est pas compris entre 1 et 8
+lima-business.fiscalperiod.fiscalperiodalreadyblocked=La période fiscale est déjà bloquée
+lima-business.fiscalperiod.newfinancialperioderror=Impossible de définir la période financière sur la période fiscale suivante
+lima-business.fiscalperiod.previousfiscalperiodalreadyblocked=La dernière période financière de la période fiscale est bloquée
+lima-business.franceaccountingrules.accountnumbernotmaster=Le numéro de compte doit reprendre le numéro de compte général \: %d
+lima-business.franceaccountingrules.accountnumbernotnumeric=Le numéro de copte n'est pas numéric \: %s
+lima-business.franceaccountingrules.accountstartnumbererror=Le numéro du copte général n'est pas compris entre 1 et 8 \: %d
lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook=Les périodes financières précédentes pour ce journal doivent être bloquées avant
lima-business.franceaccountingrules.antefiscalperiodnotblocked=La période fiscale précédante n'est pas bloquée
lima-business.franceaccountingrules.masteraccountnumbererror=Le numéro du compte général n'est pas un compte de tiers
1
0
r3227 - in trunk/lima-business/src/main: java/org/chorem/lima/business/accountingrules resources/i18n
by vsalaun@users.chorem.org July 18, 2011
by vsalaun@users.chorem.org July 18, 2011
July 18, 2011
Author: vsalaun
Date: 2011-07-18 10:42:25 +0200 (Mon, 18 Jul 2011)
New Revision: 3227
Url: http://chorem.org/repositories/revision/lima/3227
Log:
add to i18n all LimaBusinessExceptions from FranceAccountingRules 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/resources/i18n/lima-business_en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 08:03:17 UTC (rev 3226)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 08:42:25 UTC (rev 3227)
@@ -71,7 +71,7 @@
// Check if the numberaccount is not blank
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
+ " : " + account.getAccountNumber());
}
}
@@ -84,12 +84,12 @@
throws LimaException {
// check the number account is not empty
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
+ account.getAccountNumber());
}
//check if parentaccount have no subaccount
if (masterAccount.getSubAccounts().size() > 0){
- throw new LimaBusinessException(_("lima-business.accountingrules.subledgererror"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.subledgererror"));
}
}
@@ -100,7 +100,7 @@
public List<FinancialPeriod> createFiscalPeriodRules(FiscalPeriod fiscalPeriod, TopiaContext transaction) throws LimaException {
//check if the enddate period is after the begindate period
if (fiscalPeriod.getEndDate().before(fiscalPeriod.getBeginDate())){
- throw new LimaBusinessException(_("lima-business.accountingrules.enddateerror"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.enddateerror"));
}
return null;
}
@@ -126,7 +126,7 @@
// Check if account have entries
int nbentries = entryDAO.findAllByAccount(account).size();
if (nbentries != 0) {
- throw new LimaBusinessException(_("lima-business.accountingrules.deleteaccounterror"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.deleteaccounterror"));
}
}
catch (TopiaException ex) {
@@ -144,7 +144,7 @@
// Check if entrybook have entries
int nbfinancialtransaction = financialTransactionDAO.findAllByEntryBook(entryBook).size();
if (nbfinancialtransaction != 0) {
- throw new LimaBusinessException(_("lima-business.accountingrules.deleteentrybookerror"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.deleteentrybookerror"));
}
}
catch (TopiaException ex) {
@@ -161,7 +161,7 @@
public void checkFinancialPeriodBlockedWithFinancialTransaction(FinancialTransaction financialTransaction, TopiaContext topiaContext) throws LimaException {
//check financial period locked
if (financialTransaction.getFinancialPeriod().getLocked()){
- throw new LimaBusinessException(_("lima-business.accountingrules.financialperiodblocked"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.financialperiodblocked"));
}
//check all entrybook of his financial period are blocked
@@ -186,7 +186,7 @@
}
}
if (entryBooks.size() == closedEntryBooks.size()){
- throw new LimaBusinessException(_("lima-business.accountingrules.allentrybookclosed"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.allentrybookclosed"));
}
}
catch (TopiaException eee) {
@@ -218,7 +218,7 @@
result = financialTransactionDAO.findAllByQuery(query);
if (result.size()>0){
- throw new LimaBusinessException(_("lima-business.accountingrules.blockerrorequillibrate"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.blockerrorequillibrate"));
}
}
catch (TopiaException ex) {
@@ -244,7 +244,7 @@
result = financialTransactionDAO.findAllByQuery(query);
if (result.size()>0){
- throw new LimaBusinessException(_("lima-business.accountingrules.missingelements"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.missingelements"));
}
}
catch (TopiaException ex) {
@@ -268,7 +268,7 @@
result = financialTransactionDAO.findAllByQuery(query);
if (result.size()>0){
- throw new LimaBusinessException(_("lima-business.accountingrules.missingentrybook"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.missingentrybook"));
}
}
catch (TopiaException ex) {
@@ -299,7 +299,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
entryOld.getFinancialTransaction().getEntryBook(), financialPeriod);
if (closedPeriodicEntryBook.getLocked()){
- throw new LimaBusinessException(_("lima-Business.accountingrules.updateentryerror"));
+ throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updateentryerror"));
}
//third case
@@ -309,7 +309,7 @@
// Check 2 & 3 cases
if (closedPeriodicEntryBook2.getLocked()){
- throw new LimaBusinessException(_("lima-Business.accountingrules.updateentryerror"));
+ throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updateentryerror"));
}
}
@@ -337,12 +337,12 @@
//1. check old financial period locked
if (financialPeriodOld.getLocked()){
- throw new LimaBusinessException(_("lima-business.accountingrules.financialtransactionblocked"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.financialtransactionblocked"));
}
//2. check new financial period locked
if (financialPeriod.getLocked()){
- throw new LimaBusinessException(_("lima-business.accountingrules.financialnewdateblocked"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.financialnewdateblocked"));
}
try {
@@ -355,7 +355,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransactionOld.getEntryBook(), financialPeriod);
if (closedPeriodicEntryBookOld.getLocked()){
- throw new LimaBusinessException(_("lima-Business.accountingrules.updateentryerror"));
+ throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updateentryerror"));
}
//4. the new entrybook belong to a blocked closedPeriodicEntryBook
@@ -363,7 +363,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransaction.getEntryBook(), financialPeriod);
if (closedPeriodicEntryBook.getLocked()){
- throw new LimaBusinessException(_("lima-Business.accountingrules.updatenewentryerror"));
+ throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updatenewentryerror"));
}
//5. the actual entrybook belong to a blocked closedPeriodicEntryBook
@@ -371,7 +371,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransactionOld.getEntryBook(), financialPeriodOld);
if (closedPeriodicEntryBookOld2.getLocked()){
- throw new LimaBusinessException(_("lima-Business.accountingrules.updatefinancialtransactionperioderror"));
+ throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updatefinancialtransactionperioderror"));
}
//6. the new entrybook belong to a blocked closedPeriodicEntryBook
@@ -379,7 +379,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransaction.getEntryBook(), financialPeriodOld);
if (closedPeriodicEntryBook2.getLocked()){
- throw new LimaBusinessException(_("lima-Business.accountingrules.updatefinancialtransactionnewperioderror"));
+ throw new LimaBusinessException(_("lima-Business.defaultaccountingrules.updatefinancialtransactionnewperioderror"));
}
@@ -398,10 +398,10 @@
Date financialTransactionDate =
financialTransaction.getTransactionDate();
if (financialTransactionDate.before(beginDateFiscalPeriod)){
- throw new LimaBusinessException(_("lima-business.accountingrules.datebeforeerror"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.datebeforeerror"));
}
if (financialTransactionDate.after(endDateFiscalPeriod)){
- throw new LimaBusinessException(_("lima-business.accountingrules.dateaftererror"));
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.dateaftererror"));
}
/*
@@ -473,7 +473,7 @@
public void updateAccountRules(Account masterAccount, Account account) throws LimaException {
// Check if the numberaccount is not blank
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
+ account.getAccountNumber());
}
}
@@ -482,7 +482,7 @@
public void updateSubLedgerRules(Account account) throws LimaException {
// check the number account is not empty
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ throw new LimaBusinessException(_("lima-business.defaultaccountingrules.invalidaccountnumber")
+ account.getAccountNumber());
}
}
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 08:03:17 UTC (rev 3226)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2011-07-18 08:42:25 UTC (rev 3227)
@@ -25,6 +25,8 @@
package org.chorem.lima.business.accountingrules;
+import static org.nuiton.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
@@ -63,24 +65,21 @@
// Check if the number account is type numeric
if (!StringUtils.isNumeric(account.getAccountNumber())){
- throw new LimaBusinessException("AccountNumber is not numeric : "
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric")
+ + " : " + account.getAccountNumber());
}
// Check if the number account start with the number of the master account
if (masterAccount!=null && !account.getAccountNumber().startsWith(
masterAccount.getAccountNumber())){
-
- throw new LimaBusinessException(
- "Account Number not begin with the number account master : "
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotmaster")
+ + " : " + account.getAccountNumber());
}
// Check if master account have a number between 1 to 8
if (masterAccount==null && !account.getAccountNumber().matches("[1-8]")){
- throw new LimaBusinessException(
- "Master account is not a digit between 1 to 8 :"
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror")
+ + " : " + account.getAccountNumber());
}
}
@@ -90,24 +89,21 @@
// Check if the number account is type numeric
if (!StringUtils.isNumeric(account.getAccountNumber())){
- throw new LimaBusinessException("AccountNumber is not numeric : "
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric")
+ + " : " + account.getAccountNumber());
}
// Check if the number account start with the number of the master account
if (masterAccount!=null && !account.getAccountNumber().startsWith(
masterAccount.getAccountNumber())){
-
- throw new LimaBusinessException(
- "Account Number not begin with the number account master : "
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotmaster")
+ + " : " + account.getAccountNumber());
}
// Check if master account have a number between 1 to 8
if (masterAccount==null && !account.getAccountNumber().matches("[1-8]")){
- throw new LimaBusinessException(
- "Master account is not a digit between 1 to 8 :"
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror")
+ + " : " + account.getAccountNumber());
}
}
@@ -119,9 +115,8 @@
// check if the master account number is begin with 4
if (!masterAccount.getAccountNumber().startsWith("4")){
- throw new LimaBusinessException(
- "Master Account Number is not a thirdpart account"
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.masteraccountnumbererror")
+ + " : " + account.getAccountNumber());
}
}
@@ -165,8 +160,7 @@
dateLastFiscalPeriod = DateUtils.truncate(dateLastFiscalPeriod, Calendar.DATE);
Date dateFiscalPeriod=fiscalPeriod.getBeginDate();
if(dateLastFiscalPeriod.compareTo(dateFiscalPeriod)!=0){
- throw new LimaBusinessException(
- "The new fiscalperiod must adjoining the last");
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.newfiscalperiodadjoiningerror"));
}
//We can create a new fiscal period meantime the last fiscal period was not locked
@@ -174,8 +168,7 @@
int unblockedFiscalPeriod =
fiscalPeriodDAO.findAllByLocked(false).size();
if (unblockedFiscalPeriod>1){
- throw new LimaBusinessException(
- "The ante fiscal period is not locked");
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.antefiscalperiodnotblocked"));
}
}
@@ -228,8 +221,7 @@
//Check if the fiscal period to block is the oldest
if (!oldestUnBlockedFiscalPeriod.equals(fiscalPeriod)){
- throw new LimaBusinessException(
- "The ante fiscal period must be blocked before this.");
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.antefiscalperiodnotblocked"));
}
} catch (TopiaException ex) {
doCatch(transaction, ex, log);
@@ -303,8 +295,7 @@
//Check if the fiscal period to block is the oldest
if (nbClosedPeriodicEntryBooks != nbBlockedClosedPeriodicEntryBooks){
- throw new LimaBusinessException(
- "The previous financial periods for this entrybook must be blocked before this.");
+ throw new LimaBusinessException(_("lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook"));
}
}
@@ -331,6 +322,6 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException("Exception during query", cause);
+ throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
}
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-07-18 08:03:17 UTC (rev 3226)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-07-18 08:42:25 UTC (rev 3227)
@@ -1,25 +1,25 @@
=
-lima-Business.accountingrules.updateentryerror=Can't update entry \: financialperiod of this entrybook is closed
-lima-Business.accountingrules.updatefinancialtransactionnewperioderror=Can't update financialtransaction \: this financialperiod of new entrybook is closed
-lima-Business.accountingrules.updatefinancialtransactionperioderror=Can't update financialtransaction \: the new financialperiod of this entrybook is closed
-lima-Business.accountingrules.updatenewentryerror=Can't update entry : financialperiod of this entrybook is closed
+lima-Business.defaultaccountingrules.updateentryerror=Can't update entry \: financialperiod of this entrybook is closed
+lima-Business.defaultaccountingrules.updatefinancialtransactionnewperioderror=Can't update financialtransaction \: this financialperiod of new entrybook is closed
+lima-Business.defaultaccountingrules.updatefinancialtransactionperioderror=Can't update financialtransaction \: the new financialperiod of this entrybook is closed
+lima-Business.defaultaccountingrules.updatenewentryerror=Can't update entry \: financialperiod of this entrybook is closed
lima-business.account.accountalreardyexist=An account already exists with this number \: %s
-lima-business.accountingrules.allentrybookclosed=All EntryBook of this financialperiod are closed
-lima-business.accountingrules.blockerrorequillibrate=Can't block financialperiod/entrybook contain financialtransaction not equilibrate
-lima-business.accountingrules.dateaftererror=The date is after the fiscal period
-lima-business.accountingrules.datebeforeerror=The date is before the fiscal period
-lima-business.accountingrules.deleteaccounterror=Can't delete Account with entries
-lima-business.accountingrules.deleteentrybookerror=Can't delete entryBook with financialtransaction
-lima-business.accountingrules.enddateerror=The end date is before the begin date
-lima-business.accountingrules.financialnewdateblocked=The financial period of the new date is blocked
-lima-business.accountingrules.financialperiodblocked=The financial period is blocked
-lima-business.accountingrules.financialtransactionblocked=The financial period of this transaction is blocked
-lima-business.accountingrules.invalidaccountnumber=Invalid AccountNumber
-lima-business.accountingrules.missingelements=Can't block financialperiod / missing elements in transactions for this FinancialPeriod/EntryBook
-lima-business.accountingrules.missingentrybook=Can't block financialperiod / missing EntryBook in transactions
-lima-business.accountingrules.subledgererror=Subledger must create on a account whithout subaccount
lima-business.common.failed=FAILED \: %s \n
lima-business.common.queryerror=Exception during query
+lima-business.defaultaccountingrules.allentrybookclosed=All EntryBook of this financialperiod are closed
+lima-business.defaultaccountingrules.blockerrorequillibrate=Can't block financialperiod/entrybook contain financialtransaction not equilibrate
+lima-business.defaultaccountingrules.dateaftererror=The date is after the fiscal period
+lima-business.defaultaccountingrules.datebeforeerror=The date is before the fiscal period
+lima-business.defaultaccountingrules.deleteaccounterror=Can't delete Account with entries
+lima-business.defaultaccountingrules.deleteentrybookerror=Can't delete entryBook with financialtransaction
+lima-business.defaultaccountingrules.enddateerror=The end date is before the begin date
+lima-business.defaultaccountingrules.financialnewdateblocked=The financial period of the new date is blocked
+lima-business.defaultaccountingrules.financialperiodblocked=The financial period is blocked
+lima-business.defaultaccountingrules.financialtransactionblocked=The financial period of this transaction is blocked
+lima-business.defaultaccountingrules.invalidaccountnumber=Invalid AccountNumber
+lima-business.defaultaccountingrules.missingelements=Can't block financialperiod / missing elements in transactions for this FinancialPeriod/EntryBook
+lima-business.defaultaccountingrules.missingentrybook=Can't block financialperiod / missing EntryBook in transactions
+lima-business.defaultaccountingrules.subledgererror=Subledger must create on a account whithout subaccount
lima-business.document.accountnumber=Account N°
lima-business.document.amounts=Amounts
lima-business.document.balance=Balance
@@ -56,9 +56,16 @@
lima-business.document.voucher=Voucher
lima-business.entrybook.entrybookalreadyexist=An EntryBook already exists with this label \: %s
lima-business.financialstatement.check.nothing=Not found \: %s - %s \n
-lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financialstatement.\n Some account marked not found is normally.\n\n
-lima-business.financialtransaction.retainedearnings.description=Report à nouveau
-lima-business.financialtransaction.retainedearnings.voucher=Selon décision AG
+lima-business.financialstatement.check.warn=Warning this function is just an help.\n Many accounts must no calculate on Financial statement.\n Some account marked not found is normally.\n\n
+lima-business.financialtransaction.retainedearnings.description=Retained earnings
+lima-business.financialtransaction.retainedearnings.voucher=According to general meeting
+lima-business.franceaccountingrules.accountnumbernotmaster=Account Number not begin with the number account master
+lima-business.franceaccountingrules.accountnumbernotnumeric=Account Number is not numeric
+lima-business.franceaccountingrules.accountstartnumbererror=Master account is not a digit between 1 to 8
+lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook=The previous financial periods for this entrybook must be blocked before this
+lima-business.franceaccountingrules.antefiscalperiodnotblocked=The ante fiscal period is not locked
+lima-business.franceaccountingrules.masteraccountnumbererror=Master Account Number is not a thirdpart account
+lima-business.franceaccountingrules.newfiscalperiodadjoiningerror=The new fiscal period must adjoining the last
lima-business.import.accountadded=SUCCES \: Account %s - %s added\n
lima-business.import.accountalreadyexist=FAILED \: Account %s already exist \n
lima-business.import.accountnomaster=FAILED \: The account %s have master \: %s which not exist \n
@@ -71,9 +78,9 @@
lima-business.import.entrybooknotexist=WARNING \: Entrybook %s not exist was created \!\n
lima-business.import.financialstatementadded=SUCCESS \: The financialStatement %s is created \n
lima-business.import.financialstatementalnomaster=FAILED \: The financialStatement %s has master \: %s which not exist \n
-lima-business.import.financialstatementalreadyexist=FAILED \: The financialstatement %s already exists \!\n
+lima-business.import.financialstatementalreadyexist=FAILED \: The financial statement %s already exists \!\n
lima-business.import.fiscalperiodadded=SUCCESS \: The fiscalPeriod %s - %s is created \! \n
-lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscalperiod %s - %s already exists \!\n
+lima-business.import.fiscalperiodalreadyexist=FAILED \: The fiscal period %s - %s already exists \!\n
lima-business.import.identityadded=SUCCESS \: The identity %s is created \! \n
lima-business.import.letteradded=SUCCESS \: The letter %s - %s is created \! \n
lima-business.import.letteralreadyexist=FAILED \: The letter %s already exists \!\n
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-07-18 08:03:17 UTC (rev 3226)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-07-18 08:42:25 UTC (rev 3227)
@@ -1,25 +1,25 @@
=
-lima-Business.accountingrules.updateentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce journal est bloquée
-lima-Business.accountingrules.updatefinancialtransactionnewperioderror=Impossible de mettre à jour la transaction \: la période financière de ce nouveau journal est bloquée
-lima-Business.accountingrules.updatefinancialtransactionperioderror=Impossible de mettre à jour la transaction \: la période financière de ce journal est bloquée
-lima-Business.accountingrules.updatenewentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce nouveau journal est bloquée
+lima-Business.defaultaccountingrules.updateentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce journal est bloquée
+lima-Business.defaultaccountingrules.updatefinancialtransactionnewperioderror=Impossible de mettre à jour la transaction \: la période financière de ce nouveau journal est bloquée
+lima-Business.defaultaccountingrules.updatefinancialtransactionperioderror=Impossible de mettre à jour la transaction \: la période financière de ce journal est bloquée
+lima-Business.defaultaccountingrules.updatenewentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce nouveau journal est bloquée
lima-business.account.accountalreardyexist=Un compte existe déjà avec ce numéro \: %s
-lima-business.accountingrules.allentrybookclosed=Tous les journaux de cette période financière sont fermés
-lima-business.accountingrules.blockerrorequillibrate=Impossible de bloquer la période financière / le journal, il contient des transactions non équilibrées
-lima-business.accountingrules.dateaftererror=La date est antérieure à la période fiscale
-lima-business.accountingrules.datebeforeerror=La date est postérieure à la période fiscale
-lima-business.accountingrules.deleteaccounterror=Impossible de supprimer un comte contenant des entrées
-lima-business.accountingrules.deleteentrybookerror=Impossible de supprimer un journal contenant des transactions
-lima-business.accountingrules.enddateerror=La date de fin est antérieure à la date de début
-lima-business.accountingrules.financialnewdateblocked=La période financière de cette nouvelle date est bloquée
-lima-business.accountingrules.financialperiodblocked=La période financière est bloquée
-lima-business.accountingrules.financialtransactionblocked=La période financière de cette transaction est bloquée
-lima-business.accountingrules.invalidaccountnumber=Numéro de compte invalide
-lima-business.accountingrules.missingelements=Impossible de bloquer la période financière / il manque des éléments dans des transactions
-lima-business.accountingrules.missingentrybook=Impossible de bloquer la période financière / il mmanque un journal dans une transaction
-lima-business.accountingrules.subledgererror=Un livre auxilliaire doit être créé sur un compte contenant aucun sous-compte
lima-business.common.failed=Échec \: %s \n
lima-business.common.queryerror=Exception lors de la requête
+lima-business.defaultaccountingrules.allentrybookclosed=Tous les journaux de cette période financière sont fermés
+lima-business.defaultaccountingrules.blockerrorequillibrate=Impossible de bloquer la période financière / le journal, il contient des transactions non équilibrées
+lima-business.defaultaccountingrules.dateaftererror=La date est antérieure à la période fiscale
+lima-business.defaultaccountingrules.datebeforeerror=La date est postérieure à la période fiscale
+lima-business.defaultaccountingrules.deleteaccounterror=Impossible de supprimer un comte contenant des entrées
+lima-business.defaultaccountingrules.deleteentrybookerror=Impossible de supprimer un journal contenant des transactions
+lima-business.defaultaccountingrules.enddateerror=La date de fin est antérieure à la date de début
+lima-business.defaultaccountingrules.financialnewdateblocked=La période financière de cette nouvelle date est bloquée
+lima-business.defaultaccountingrules.financialperiodblocked=La période financière est bloquée
+lima-business.defaultaccountingrules.financialtransactionblocked=La période financière de cette transaction est bloquée
+lima-business.defaultaccountingrules.invalidaccountnumber=Numéro de compte invalide
+lima-business.defaultaccountingrules.missingelements=Impossible de bloquer la période financière / il manque des éléments dans des transactions
+lima-business.defaultaccountingrules.missingentrybook=Impossible de bloquer la période financière / il mmanque un journal dans une transaction
+lima-business.defaultaccountingrules.subledgererror=Un livre auxilliaire doit être créé sur un compte contenant aucun sous-compte
lima-business.document.accountnumber=N° Compte
lima-business.document.amounts=Totaux
lima-business.document.balance=Balance
@@ -59,6 +59,13 @@
lima-business.financialstatement.check.warn=Attention cette fonctionnalité n'est qu'une aide utilisateur.\n Certains comptes ne doivent pas être présent au bilan et compte de résultat.\n Il est donc normal que des comptes sont marqués comme introuvable.\n\n
lima-business.financialtransaction.retainedearnings.description=Report à nouveau
lima-business.financialtransaction.retainedearnings.voucher=Selon décision AG
+lima-business.franceaccountingrules.accountnumbernotmaster=Le numéro de compte doit reprendre le numéro de compte général
+lima-business.franceaccountingrules.accountnumbernotnumeric=Le numéro de copte n'est pas numéric
+lima-business.franceaccountingrules.accountstartnumbererror=Le numéro du copte général n'est pas compris entre 1 et 8
+lima-business.franceaccountingrules.antefinancialperiodnotblockedentrybook=Les périodes financières précédentes pour ce journal doivent être bloquées avant
+lima-business.franceaccountingrules.antefiscalperiodnotblocked=La période fiscale précédante n'est pas bloquée
+lima-business.franceaccountingrules.masteraccountnumbererror=Le numéro du compte général n'est pas un compte de tiers
+lima-business.franceaccountingrules.newfiscalperiodadjoiningerror=La nouvelle période fiscale doit suivre la précédante
lima-business.import.accountadded=Succès \: Compte %s - %s ajouté\n
lima-business.import.accountalreadyexist=Échec \: Le compte %s existe déjà \n
lima-business.import.accountnomaster=Échec \: Le compte %s possède le master \: %s inexistant \n
1
0
r3226 - in trunk/lima-business/src/main: java/org/chorem/lima/business/accountingrules resources/i18n
by vsalaun@users.chorem.org July 18, 2011
by vsalaun@users.chorem.org July 18, 2011
July 18, 2011
Author: vsalaun
Date: 2011-07-18 10:03:17 +0200 (Mon, 18 Jul 2011)
New Revision: 3226
Url: http://chorem.org/repositories/revision/lima/3226
Log:
add to i18n all LimaBusinessExceptions from DefaultAccountingRules and translate them to French
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties
trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-13 14:47:32 UTC (rev 3225)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2011-07-18 08:03:17 UTC (rev 3226)
@@ -25,6 +25,8 @@
package org.chorem.lima.business.accountingrules;
+import static org.nuiton.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -69,8 +71,8 @@
// Check if the numberaccount is not blank
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException("Invalid AccountNumber : "
- + account.getAccountNumber());
+ throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ + " : " + account.getAccountNumber());
}
}
@@ -82,13 +84,12 @@
throws LimaException {
// check the number account is not empty
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException("Invalid AccountNumber : "
+ throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ account.getAccountNumber());
}
//check if parentaccount have no subaccount
if (masterAccount.getSubAccounts().size() > 0){
- throw new LimaBusinessException(
- "Subledger must create on a account whithout subaccount : ");
+ throw new LimaBusinessException(_("lima-business.accountingrules.subledgererror"));
}
}
@@ -99,8 +100,7 @@
public List<FinancialPeriod> createFiscalPeriodRules(FiscalPeriod fiscalPeriod, TopiaContext transaction) throws LimaException {
//check if the enddate period is after the begindate period
if (fiscalPeriod.getEndDate().before(fiscalPeriod.getBeginDate())){
- throw new LimaBusinessException(
- "The enddate is before the begindate");
+ throw new LimaBusinessException(_("lima-business.accountingrules.enddateerror"));
}
return null;
}
@@ -126,7 +126,7 @@
// Check if account have entries
int nbentries = entryDAO.findAllByAccount(account).size();
if (nbentries != 0) {
- throw new LimaBusinessException("Can't delete Account with entries");
+ throw new LimaBusinessException(_("lima-business.accountingrules.deleteaccounterror"));
}
}
catch (TopiaException ex) {
@@ -144,7 +144,7 @@
// Check if entrybook have entries
int nbfinancialtransaction = financialTransactionDAO.findAllByEntryBook(entryBook).size();
if (nbfinancialtransaction != 0) {
- throw new LimaBusinessException("Can't delete entryBook with financialtransaction");
+ throw new LimaBusinessException(_("lima-business.accountingrules.deleteentrybookerror"));
}
}
catch (TopiaException ex) {
@@ -161,7 +161,7 @@
public void checkFinancialPeriodBlockedWithFinancialTransaction(FinancialTransaction financialTransaction, TopiaContext topiaContext) throws LimaException {
//check financial period locked
if (financialTransaction.getFinancialPeriod().getLocked()){
- throw new LimaBusinessException("The financial period is blocked");
+ throw new LimaBusinessException(_("lima-business.accountingrules.financialperiodblocked"));
}
//check all entrybook of his financial period are blocked
@@ -186,7 +186,7 @@
}
}
if (entryBooks.size() == closedEntryBooks.size()){
- throw new LimaBusinessException("All EntryBook of this financialperiod are closed");
+ throw new LimaBusinessException(_("lima-business.accountingrules.allentrybookclosed"));
}
}
catch (TopiaException eee) {
@@ -218,7 +218,7 @@
result = financialTransactionDAO.findAllByQuery(query);
if (result.size()>0){
- throw new LimaBusinessException("Can't block financialperiod/entrybook contain financialtransaction not equilibrate");
+ throw new LimaBusinessException(_("lima-business.accountingrules.blockerrorequillibrate"));
}
}
catch (TopiaException ex) {
@@ -244,7 +244,7 @@
result = financialTransactionDAO.findAllByQuery(query);
if (result.size()>0){
- throw new LimaBusinessException("Can't block financialperiod / missing elements in transactions for this FinancialPeriod/EntryBook");
+ throw new LimaBusinessException(_("lima-business.accountingrules.missingelements"));
}
}
catch (TopiaException ex) {
@@ -268,7 +268,7 @@
result = financialTransactionDAO.findAllByQuery(query);
if (result.size()>0){
- throw new LimaBusinessException("Can't block financialperiod / missing EntryBook in transactions");
+ throw new LimaBusinessException(_("lima-business.accountingrules.missingentrybook"));
}
}
catch (TopiaException ex) {
@@ -299,7 +299,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
entryOld.getFinancialTransaction().getEntryBook(), financialPeriod);
if (closedPeriodicEntryBook.getLocked()){
- throw new LimaBusinessException("Can't update entry : financialperiod of this entrybook is closed");
+ throw new LimaBusinessException(_("lima-Business.accountingrules.updateentryerror"));
}
//third case
@@ -309,7 +309,7 @@
// Check 2 & 3 cases
if (closedPeriodicEntryBook2.getLocked()){
- throw new LimaBusinessException("Can't update entry : financialperiod of this entrybook is closed");
+ throw new LimaBusinessException(_("lima-Business.accountingrules.updateentryerror"));
}
}
@@ -337,12 +337,12 @@
//1. check old financial period locked
if (financialPeriodOld.getLocked()){
- throw new LimaBusinessException("The financial period of this transaction is blocked");
+ throw new LimaBusinessException(_("lima-business.accountingrules.financialtransactionblocked"));
}
//2. check new financial period locked
if (financialPeriod.getLocked()){
- throw new LimaBusinessException("The financial period of the new date is blocked");
+ throw new LimaBusinessException(_("lima-business.accountingrules.financialnewdateblocked"));
}
try {
@@ -355,7 +355,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransactionOld.getEntryBook(), financialPeriod);
if (closedPeriodicEntryBookOld.getLocked()){
- throw new LimaBusinessException("Can't update financialtransaction : financialperiod of this entrybook is closed");
+ throw new LimaBusinessException(_("lima-Business.accountingrules.updateentryerror"));
}
//4. the new entrybook belong to a blocked closedPeriodicEntryBook
@@ -363,7 +363,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransaction.getEntryBook(), financialPeriod);
if (closedPeriodicEntryBook.getLocked()){
- throw new LimaBusinessException("Can't update financialtransaction : financialperiod of new entrybook is closed");
+ throw new LimaBusinessException(_("lima-Business.accountingrules.updatenewentryerror"));
}
//5. the actual entrybook belong to a blocked closedPeriodicEntryBook
@@ -371,7 +371,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransactionOld.getEntryBook(), financialPeriodOld);
if (closedPeriodicEntryBookOld2.getLocked()){
- throw new LimaBusinessException("Can't update financialtransaction : the new financialperiod of this entrybook is closed");
+ throw new LimaBusinessException(_("lima-Business.accountingrules.updatefinancialtransactionperioderror"));
}
//6. the new entrybook belong to a blocked closedPeriodicEntryBook
@@ -379,7 +379,7 @@
closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(
financialTransaction.getEntryBook(), financialPeriodOld);
if (closedPeriodicEntryBook2.getLocked()){
- throw new LimaBusinessException("Can't update financialtransaction : this financialperiod of new entrybook is closed");
+ throw new LimaBusinessException(_("lima-Business.accountingrules.updatefinancialtransactionnewperioderror"));
}
@@ -398,10 +398,10 @@
Date financialTransactionDate =
financialTransaction.getTransactionDate();
if (financialTransactionDate.before(beginDateFiscalPeriod)){
- throw new LimaBusinessException("The date is before the fiscal period");
+ throw new LimaBusinessException(_("lima-business.accountingrules.datebeforeerror"));
}
if (financialTransactionDate.after(endDateFiscalPeriod)){
- throw new LimaBusinessException("The date is after the fiscal period");
+ throw new LimaBusinessException(_("lima-business.accountingrules.dateaftererror"));
}
/*
@@ -466,14 +466,14 @@
if (log.isErrorEnabled()) {
log.error("Exception during query", cause);
}
- throw new LimaException("Exception during query", cause);
+ throw new LimaException(_("lima-business.common.queryerror") + " " + cause);
}
@Override
public void updateAccountRules(Account masterAccount, Account account) throws LimaException {
// Check if the numberaccount is not blank
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException("Invalid AccountNumber : "
+ throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ account.getAccountNumber());
}
}
@@ -482,7 +482,7 @@
public void updateSubLedgerRules(Account account) throws LimaException {
// check the number account is not empty
if (StringUtils.isBlank(account.getAccountNumber())) {
- throw new LimaBusinessException("Invalid AccountNumber : "
+ throw new LimaBusinessException(_("lima-business.accountingrules.invalidaccountnumber")
+ account.getAccountNumber());
}
}
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-07-13 14:47:32 UTC (rev 3225)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2011-07-18 08:03:17 UTC (rev 3226)
@@ -1,6 +1,25 @@
=
+lima-Business.accountingrules.updateentryerror=Can't update entry \: financialperiod of this entrybook is closed
+lima-Business.accountingrules.updatefinancialtransactionnewperioderror=Can't update financialtransaction \: this financialperiod of new entrybook is closed
+lima-Business.accountingrules.updatefinancialtransactionperioderror=Can't update financialtransaction \: the new financialperiod of this entrybook is closed
+lima-Business.accountingrules.updatenewentryerror=Can't update entry : financialperiod of this entrybook is closed
lima-business.account.accountalreardyexist=An account already exists with this number \: %s
+lima-business.accountingrules.allentrybookclosed=All EntryBook of this financialperiod are closed
+lima-business.accountingrules.blockerrorequillibrate=Can't block financialperiod/entrybook contain financialtransaction not equilibrate
+lima-business.accountingrules.dateaftererror=The date is after the fiscal period
+lima-business.accountingrules.datebeforeerror=The date is before the fiscal period
+lima-business.accountingrules.deleteaccounterror=Can't delete Account with entries
+lima-business.accountingrules.deleteentrybookerror=Can't delete entryBook with financialtransaction
+lima-business.accountingrules.enddateerror=The end date is before the begin date
+lima-business.accountingrules.financialnewdateblocked=The financial period of the new date is blocked
+lima-business.accountingrules.financialperiodblocked=The financial period is blocked
+lima-business.accountingrules.financialtransactionblocked=The financial period of this transaction is blocked
+lima-business.accountingrules.invalidaccountnumber=Invalid AccountNumber
+lima-business.accountingrules.missingelements=Can't block financialperiod / missing elements in transactions for this FinancialPeriod/EntryBook
+lima-business.accountingrules.missingentrybook=Can't block financialperiod / missing EntryBook in transactions
+lima-business.accountingrules.subledgererror=Subledger must create on a account whithout subaccount
lima-business.common.failed=FAILED \: %s \n
+lima-business.common.queryerror=Exception during query
lima-business.document.accountnumber=Account N°
lima-business.document.amounts=Amounts
lima-business.document.balance=Balance
Modified: trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties
===================================================================
--- trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-07-13 14:47:32 UTC (rev 3225)
+++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2011-07-18 08:03:17 UTC (rev 3226)
@@ -1,6 +1,25 @@
=
+lima-Business.accountingrules.updateentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce journal est bloquée
+lima-Business.accountingrules.updatefinancialtransactionnewperioderror=Impossible de mettre à jour la transaction \: la période financière de ce nouveau journal est bloquée
+lima-Business.accountingrules.updatefinancialtransactionperioderror=Impossible de mettre à jour la transaction \: la période financière de ce journal est bloquée
+lima-Business.accountingrules.updatenewentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce nouveau journal est bloquée
lima-business.account.accountalreardyexist=Un compte existe déjà avec ce numéro \: %s
+lima-business.accountingrules.allentrybookclosed=Tous les journaux de cette période financière sont fermés
+lima-business.accountingrules.blockerrorequillibrate=Impossible de bloquer la période financière / le journal, il contient des transactions non équilibrées
+lima-business.accountingrules.dateaftererror=La date est antérieure à la période fiscale
+lima-business.accountingrules.datebeforeerror=La date est postérieure à la période fiscale
+lima-business.accountingrules.deleteaccounterror=Impossible de supprimer un comte contenant des entrées
+lima-business.accountingrules.deleteentrybookerror=Impossible de supprimer un journal contenant des transactions
+lima-business.accountingrules.enddateerror=La date de fin est antérieure à la date de début
+lima-business.accountingrules.financialnewdateblocked=La période financière de cette nouvelle date est bloquée
+lima-business.accountingrules.financialperiodblocked=La période financière est bloquée
+lima-business.accountingrules.financialtransactionblocked=La période financière de cette transaction est bloquée
+lima-business.accountingrules.invalidaccountnumber=Numéro de compte invalide
+lima-business.accountingrules.missingelements=Impossible de bloquer la période financière / il manque des éléments dans des transactions
+lima-business.accountingrules.missingentrybook=Impossible de bloquer la période financière / il mmanque un journal dans une transaction
+lima-business.accountingrules.subledgererror=Un livre auxilliaire doit être créé sur un compte contenant aucun sous-compte
lima-business.common.failed=Échec \: %s \n
+lima-business.common.queryerror=Exception lors de la requête
lima-business.document.accountnumber=N° Compte
lima-business.document.amounts=Totaux
lima-business.document.balance=Balance
1
0
r3225 - in trunk/lima-swing/src/main: java/org/chorem/lima/ui resources/icons
by vsalaun@users.chorem.org July 13, 2011
by vsalaun@users.chorem.org July 13, 2011
July 13, 2011
Author: vsalaun
Date: 2011-07-13 16:47:32 +0200 (Wed, 13 Jul 2011)
New Revision: 3225
Url: http://chorem.org/repositories/revision/lima/3225
Log:
#347 add vat charts and report icon
Added:
trunk/lima-swing/src/main/resources/icons/action-charts-vatstatements.png
trunk/lima-swing/src/main/resources/icons/action-reports-vatstatement.png
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
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-13 13:28:51 UTC (rev 3224)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-07-13 14:47:32 UTC (rev 3225)
@@ -169,7 +169,7 @@
<JMenuItem text="lima.charts.financialstatement" onActionPerformed='getHandler().showFinancialStatementView(this)'
actionIcon='charts-financialstatements'/>
<JMenuItem text="lima.charts.vatstatement" onActionPerformed='getHandler().showVatChartView(this)'
- actionIcon='charts-financialstatements'/>
+ actionIcon='charts-vatstatements'/>
</JMenu>
<JMenu text="lima.entries" mnemonic="{'E'}">
@@ -193,8 +193,8 @@
actionIcon='reports-ledger'/>
<JMenuItem text="lima.reports.financialstatement" onActionPerformed='getHandler().showFinancialStatementReportsView(this)'
actionIcon='reports-financialstatement'/>
- <JMenuItem text="lima.reports.vatstatement" onActionPerformed='getHandler().showVatReportView(this)'
- actionIcon='reports-financialstatement'/>
+ <JMenuItem text="lima.reports.vat" onActionPerformed='getHandler().showVatReportView(this)'
+ actionIcon='reports-vatstatement'/>
</JMenu>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2011-07-13 13:28:51 UTC (rev 3224)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2011-07-13 14:47:32 UTC (rev 3225)
@@ -347,7 +347,7 @@
public void showVatChartView(JAXXContext rootContext){
MainView mainView = getUI(rootContext);
VatChartView vatChartView = new VatChartView(mainView);
- mainView.showTab(_("lima.charts.vat"), vatChartView);
+ mainView.showTab(_("lima.charts.vatstatement"), vatChartView);
}
/**
Added: trunk/lima-swing/src/main/resources/icons/action-charts-vatstatements.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/icons/action-charts-vatstatements.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/lima-swing/src/main/resources/icons/action-reports-vatstatement.png
===================================================================
(Binary files differ)
Property changes on: trunk/lima-swing/src/main/resources/icons/action-reports-vatstatement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
r3224 - 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 July 13, 2011
by vsalaun@users.chorem.org July 13, 2011
July 13, 2011
Author: vsalaun
Date: 2011-07-13 15:28:51 +0200 (Wed, 13 Jul 2011)
New Revision: 3224
Url: http://chorem.org/repositories/revision/lima/3224
Log:
#347 add possibility (checkbox) to create an empty vat document
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/ejbinterface/DocumentService.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/VatReportView.jaxx
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-13 12:00:44 UTC (rev 3223)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-13 13:28:51 UTC (rev 3224)
@@ -1458,7 +1458,9 @@
//############## VAT ##############
@Override
- public void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException, IOException, COSVisitorException {
+ public void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete)
+ throws LimaException, IOException, COSVisitorException {
+
try {
String filePath =
@@ -1469,15 +1471,17 @@
DocumentServiceImpl.class.getResourceAsStream("/reports/vat_form_fr.pdf");
// load the document
doc = PDDocument.load(reportsStream);
+
+ if (autocomplete.equals("true")) {
- SetField fields = new SetField();
+ SetField fields = new SetField();
- Identity identity = identityService.getIdentity();
+ Identity identity = identityService.getIdentity();
- //page one
+ //page one
- //sets names for each TextField
- String periodTextField = "a1.a1",
+ //sets names for each TextField
+ String periodTextField = "a1.a1",
serviceAddressTextField = "a2.a2",
companyAlternativeAddressTextField = "a3.a3",
companyAddressTextField = "a4.a4",
@@ -1496,16 +1500,16 @@
finalDateTextField = "date1.date1", // dd/mm/yyyy
payementDateTextField = "date2.date2"; // dd/mm/yyyy;
- //fills in Period TextField
- Calendar beginDateCal = Calendar.getInstance();
- beginDateCal.setTime(beginDate);
+ //fills in Period TextField
+ Calendar beginDateCal = Calendar.getInstance();
+ beginDateCal.setTime(beginDate);
- Calendar endDateCal = Calendar.getInstance();
- endDateCal.setTime(endDate);
+ Calendar endDateCal = Calendar.getInstance();
+ endDateCal.setTime(endDate);
- Locale locale = new Locale("fr","FR","");
+ Locale locale = new Locale("fr","FR","");
- fields.setField(doc, periodTextField,
+ fields.setField(doc, periodTextField,
beginDateCal.get(Calendar.DAY_OF_WEEK) + " "
+ beginDateCal.getDisplayName(Calendar.MONTH, Calendar.LONG, locale)
+ " " + beginDateCal.get(Calendar.YEAR) + " - "
@@ -1513,140 +1517,141 @@
+ endDateCal.getDisplayName(Calendar.MONTH, Calendar.LONG, locale)
+ " " + endDateCal.get(Calendar.YEAR));
- //fills in address TextField
- String address = "";
- if (identity.getName() != null) {
- address = identity.getName() + "\n";
- }
- if (identity.getAddress() != null) {
- address += identity.getAddress() + "\n";
- }
- if (identity.getAddress2() != null) {
+ //fills in address TextField
+ String address = "";
+ if (identity.getName() != null) {
+ address = identity.getName() + "\n";
+ }
+ if (identity.getAddress() != null) {
+ address += identity.getAddress() + "\n";
+ }
+ if (identity.getAddress2() != null) {
address += identity.getAddress2() + "\n";
- }
- if (identity.getZipCode() != null) {
- address += identity.getZipCode() + " ";
- }
- if (identity.getCity() != null) {
- address += identity.getCity();
- }
- fields.setField(doc, companyAddressTextField, address);
+ }
+ if (identity.getZipCode() != null) {
+ address += identity.getZipCode() + " ";
+ }
+ if (identity.getCity() != null) {
+ address += identity.getCity();
+ }
+ fields.setField(doc, companyAddressTextField, address);
- //fills in SIRET TextField
- if (identity.getVatNumber() != null) {
- String VATNumber = "";
- for (int i=0; i<identity.getVatNumber().length(); i++) {
- //add spaces to suit cells width
- VATNumber += identity.getVatNumber().substring(i, i+1) + " ";
+ //fills in SIRET TextField
+ if (identity.getVatNumber() != null) {
+ String VATNumber = "";
+ for (int i=0; i<identity.getVatNumber().length(); i++) {
+ //add spaces to suit cells width
+ VATNumber += identity.getVatNumber().substring(i, i+1) + " ";
+ }
+ fields.setField(doc, VATNumberTextField, VATNumber);
}
- fields.setField(doc, VATNumberTextField, VATNumber);
- }
- //fills in phone number TextField
- if (identity.getPhoneNumber() != null) {
- fields.setField(doc, phoneNumberTextField, identity.getPhoneNumber());
- }
+ //fills in phone number TextField
+ if (identity.getPhoneNumber() != null) {
+ fields.setField(doc, phoneNumberTextField, identity.getPhoneNumber());
+ }
- //end of page one
- //page two
+ //end of page one
+ //page two
- //sets parameters to use for each TextField
- ArrayList<ArrayList<String>> listOfLists = new ArrayList<ArrayList<String>>();
+ //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")));
+ 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());
+ 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());
+ }
}
- }
- 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());
+ 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);
+ // 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());
- }
+ 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());
+ //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());
+ 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());
+ //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());
- }
+ //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
+ //end of page two
+ }
// save the updated document to the new file and close
doc.save(filePath);
doc.close();
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-13 12:00:44 UTC (rev 3223)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2011-07-13 13:28:51 UTC (rev 3224)
@@ -127,6 +127,7 @@
String format = req.getParameter("format");
String beginDate = req.getParameter("beginDate");
String endDate = req.getParameter("endDate");
+ String autocomplete = req.getParameter("autocomplete");
//if image
if (imageParam != null){
@@ -171,7 +172,8 @@
break;
case VAT:
documentService.createVatDocuments(
- beginDateFormat, endDateFormat, formatsEnum);
+ beginDateFormat, endDateFormat, formatsEnum,
+ autocomplete);
break;
}
} catch (LimaException eeeLE) {
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-13 12:00:44 UTC (rev 3223)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2011-07-13 13:28:51 UTC (rev 3224)
@@ -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) throws LimaException, IOException, COSVisitorException;;
+ void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete) throws LimaException, IOException, COSVisitorException;;
}
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-13 12:00:44 UTC (rev 3223)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2011-07-13 13:28:51 UTC (rev 3224)
@@ -68,11 +68,14 @@
/** data cache */
protected List<Object> cacheDataList;
+ protected String autocomplete;
+
public VatReportTableModel() {
reportService =
LimaServiceFactory.getInstance().getService(
ReportServiceMonitorable.class);
+ autocomplete = "true";
}
protected List<Object> getDataList() throws TopiaException {
@@ -329,6 +332,18 @@
selectedFiscalPeriod = fiscalPeriod;
refresh();
}
+
+ public String getAutocomplete() {
+ return autocomplete;
+ }
+
+ public void setAutocomplete() {
+ if (getAutocomplete().equals("true")) {
+ autocomplete = "false";
+ } else {
+ autocomplete = "true";
+ }
+ }
@Override
public void notifyMethod(String serviceName, String methodeName) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportView.jaxx 2011-07-13 12:00:44 UTC (rev 3223)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportView.jaxx 2011-07-13 13:28:51 UTC (rev 3224)
@@ -57,13 +57,10 @@
editable="false"/>
</cell>
<cell>
- <EnumEditor id='DocumentEditor'
- constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'/>
+ <JCheckBox id='autocomplete' text='lima.common.autocomplete' selected='true'
+ onActionPerformed="getVatReportTableModel().setAutocomplete()"/>
</cell>
<cell>
- <JCheckBox id='autocomplete' text='lima.common.autocomplete' selected='true'/>
- </cell>
- <cell>
<JButton id="editVatButton" text="lima.reports.vat"
onActionPerformed="getHandler().editVat()"/>
</cell>
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-13 12:00:44 UTC (rev 3223)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java 2011-07-13 13:28:51 UTC (rev 3224)
@@ -84,9 +84,9 @@
try {
String url = "http://"+address+":"+port+"/?beginDate="
+ dateFormat.format(tableModel.getFiscalPeriod().getBeginDate())
- + "&endDate="+dateFormat.format(tableModel.getFiscalPeriod().getEndDate())
- + "&format=.pdf&model="
- + DocumentsEnum.VAT.getFileName();
+ + "&endDate=" + dateFormat.format(tableModel.getFiscalPeriod().getEndDate())
+ + "&format=.pdf&model=" + DocumentsEnum.VAT.getFileName()
+ + "&autocomplete=" + tableModel.getAutocomplete();
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
log.error("Can't open browser", e);
1
0
r3223 - in trunk/lima-business/src/main/java/org/chorem/lima/business: ejb ejbinterface
by vsalaun@users.chorem.org July 13, 2011
by vsalaun@users.chorem.org July 13, 2011
July 13, 2011
Author: vsalaun
Date: 2011-07-13 14:00:44 +0200 (Wed, 13 Jul 2011)
New Revision: 3223
Url: http://chorem.org/repositories/revision/lima/3223
Log:
#347 update vat document creation
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/VatStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.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-12 15:29:21 UTC (rev 3222)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-13 12:00:44 UTC (rev 3223)
@@ -36,6 +36,7 @@
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
@@ -46,7 +47,6 @@
import javax.ejb.Stateless;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.pdfbox.examples.fdf.PrintFields;
import org.apache.pdfbox.examples.fdf.SetField;
import org.apache.pdfbox.exceptions.COSVisitorException;
import org.apache.pdfbox.pdmodel.PDDocument;
@@ -77,7 +77,6 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.Identity;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
-import org.chorem.lima.entity.VatStatement;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
import org.nuiton.topia.TopiaException;
@@ -1462,13 +1461,6 @@
public void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException, IOException, COSVisitorException {
try {
- List<VatStatement> vatStatementsList = vatStatementService.getAllVatStatements();
-
- for (VatStatement vatStatement : vatStatementsList) {
- BigDecimal amount = vatStatementService.vatStatementAmounts(vatStatement, beginDate, endDate);
- //System.out.println(vatStatement.getLabel() + " : " + amount);
- }
-
String filePath =
path+File.separator+DocumentsEnum.VAT.getFileName()+format.getExtension();
@@ -1478,14 +1470,13 @@
// load the document
doc = PDDocument.load(reportsStream);
- PrintFields printFields = new PrintFields();
- printFields.printFields(doc);
SetField fields = new SetField();
Identity identity = identityService.getIdentity();
//page one
+ //sets names for each TextField
String periodTextField = "a1.a1",
serviceAddressTextField = "a2.a2",
companyAlternativeAddressTextField = "a3.a3",
@@ -1505,7 +1496,7 @@
finalDateTextField = "date1.date1", // dd/mm/yyyy
payementDateTextField = "date2.date2"; // dd/mm/yyyy;
- //Period TextField
+ //fills in Period TextField
Calendar beginDateCal = Calendar.getInstance();
beginDateCal.setTime(beginDate);
@@ -1520,14 +1511,9 @@
+ " " + beginDateCal.get(Calendar.YEAR) + " - "
+ endDateCal.get(Calendar.DAY_OF_WEEK) + " "
+ endDateCal.getDisplayName(Calendar.MONTH, Calendar.LONG, locale)
- + " " + endDateCal.get(Calendar.YEAR));
+ + " " + endDateCal.get(Calendar.YEAR));
-
- fields.setField(doc, "a2.a2", "a2");
- fields.setField(doc, "a3.a3", "a3");
-
-
- //address TextField
+ //fills in address TextField
String address = "";
if (identity.getName() != null) {
address = identity.getName() + "\n";
@@ -1544,21 +1530,10 @@
if (identity.getCity() != null) {
address += identity.getCity();
}
-
fields.setField(doc, companyAddressTextField, address);
- //fields.setField(doc, "a5.a5", "a5"); no field
- fields.setField(doc, "a6.a6", "a6");
- fields.setField(doc, "a7.a7", "a7");
- fields.setField(doc, "a8.a8", "a8");
- fields.setField(doc, "a9.a9", "a9");
- fields.setField(doc, "a10.a10", "a10");
- fields.setField(doc, "a11.a11", "a11");
- fields.setField(doc, "a12.a12", "a12");
-
-
- //SIRET TextField
+ //fills in SIRET TextField
if (identity.getVatNumber() != null) {
String VATNumber = "";
for (int i=0; i<identity.getVatNumber().length(); i++) {
@@ -1569,197 +1544,109 @@
}
- //phone number TextField
+ //fills in phone number TextField
if (identity.getPhoneNumber() != null) {
fields.setField(doc, phoneNumberTextField, identity.getPhoneNumber());
}
- fields.setField(doc, "a15.a15", "a15");
- fields.setField(doc, "a16.a16", "a16");
-
- fields.setField(doc, "date1.date1", "date1");
- fields.setField(doc, "date2.date2", "date2");
-
//end of page one
//page two
- String
- //A. MONTANT DES OPERATIONS REALISEE
- //OPERATIONS IMPOSABLES (H.T.) OPERATIONS NON IMPOSABLE
- textField_01 = "b1.b1", textField_04 = "b8.b8",
- textField_02 = "b2.b2", textField_05 = "b9.b9",
- textField_2A = "b3.b3", textField_06 = "b10.b10",
- textField_03 = "b4.b4", textField_6A = "b11.b11",
- textField_03_bis = "b04.b04",
- textField_3A = "b5.b5", textField_07 = "b12.b12",
- textField_3B = "b6.b6", textField_7A = "b13.b13",
- textField_3C = "b7.b7", textField_7B = "b14.b14",
-
- //B. DECOMPTE DE LA TVA A PAYE
- //TVA BRUTE
- //Base hors taxe Taxe due
- textField_08_DutyFree = "b15.b15", textField_08_VAT = "b23.b23",
- textField_09_DutyFree = "b16.b16", textField_09_VAT = "b24.b24",
- textField_9B_DutyFree = "b17.b17", textField_9B_VAT = "b25.b25",
- textField_10_DutyFree = "b18.b18", textField_10_VAT = "b26.b26",
- textField_11_DutyFree = "b19.b19", textField_11_VAT = "b27.b27",
- textField_12_DutyFree = "b20.b20", textField_12_VAT = "b28.b28",
- textField_13_DutyFree = "b21.b21", textField_13_VAT = "b29.b29",
- textField_14_DutyFree = "b22.b22", textField_14_VAT = "b30.b30",
- textField_15_VAT = "b31.b31",
- textField_16_VAT = "b32.b32",
- textField_17_VAT = "b33.b33",
- textField_18_VAT = "b34.b34",
- //TVA DEDUCTIBLE
- textField_19_VAT = "b35.b35",
- textField_20_VAT = "b36.b36",
- textField_21_VAT = "b37.b37",
- textField_21_bis = "b.b",
- textField_22_VAT = "b38.b38",
- textField_22A = "taux.taux",
- textField_23_VAT = "total1.total1",
- textField_24_VAT = "b39.b39",
-
- //CREDIT TAXE A PAYER
- textField_25 = "b40.b40", textField_28 = "b43.b43",
- textField_26 = "b41.b41", textField_29 = "b44.b44",
- textField_27 = "b42.b42", textField_30 = "b45.b45",
- textField_31 = "b46.b46",
- textField_32 = "b47.b47";
-
- //Operations realisees en France metropolitaine
- BigDecimal BD_08_DutyFree = new BigDecimal(0),
- BD_08_VAT = new BigDecimal(0);
- if (!BD_08_DutyFree.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_08_DutyFree, BD_08_DutyFree.toString());
- BD_08_VAT = BD_08_DutyFree.multiply(BigDecimal.valueOf(0.196));
- fields.setField(doc, textField_08_VAT, BD_08_VAT.toString());
- }
+ //sets parameters to use for each TextField
+ ArrayList<ArrayList<String>> listOfLists = new ArrayList<ArrayList<String>>();
- BigDecimal BD_09_DutyFree = new BigDecimal(0),
- BD_09_VAT = new BigDecimal(0);
- if (!BD_09_DutyFree.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_09_DutyFree, BD_09_DutyFree.toString());
- BD_09_VAT = BD_09_DutyFree.multiply(BigDecimal.valueOf(0,055));
- fields.setField(doc, textField_09_VAT, BD_09_VAT.toString());
- }
+ 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 BD_9B_DutyFree = new BigDecimal(0),
- BD_9B_VAT = new BigDecimal(0);
-
-
- //Operations realisees dans les DOM
- BigDecimal BD_10_DutyFree = new BigDecimal(0),
- BD_10_VAT = new BigDecimal(0);
- if (!BD_10_DutyFree.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_10_DutyFree, BD_10_DutyFree.toString());
- BD_10_VAT = BD_10_DutyFree.multiply(BigDecimal.valueOf(0,055));
- fields.setField(doc, textField_10_VAT, BD_10_VAT.toString());
+ 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());
+ }
}
- BigDecimal BD_11_DutyFree = new BigDecimal(0),
- BD_11_VAT = new BigDecimal(0);
- if (!BD_11_DutyFree.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_11_DutyFree, BD_11_DutyFree.toString());
- BD_11_VAT = BD_11_DutyFree.multiply(BigDecimal.valueOf(0,021));
- fields.setField(doc, textField_11_VAT, BD_11_VAT.toString());
+ 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());
+ }
}
- BigDecimal BD_12_DutyFree = new BigDecimal(0),
- BD_12_VAT = new BigDecimal(0);
+ // 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());
+ }
- //Operations imposables a un autre taux (France metro. ou DOM)
- BigDecimal BD_13_DutyFree = new BigDecimal(0),
- BD_13_VAT = new BigDecimal(0);
-
- BigDecimal BD_14_DutyFree = new BigDecimal(0),
- BD_14_VAT = new BigDecimal(0);
-
-
-
- BigDecimal BD_15_VAT = new BigDecimal(0);
-
//Total de la TVA brute due
- //Total from line 08 to 15
- BigDecimal BD_16_VAT =
- BD_08_VAT.add(BD_09_VAT).add(BD_9B_VAT).add(BD_10_VAT)
- .add(BD_11_VAT).add(BD_12_VAT).add(BD_13_VAT).add(BD_14_VAT)
- .add(BD_15_VAT);
+ fields.setField(doc, "b32.b32" , sommeTVABruteDue.toString());
- fields.setField(doc, textField_16_VAT, BD_16_VAT.toString());
-
- //TVA DEDUCTIBLE
- BigDecimal BD_19_VAT = new BigDecimal(0);
- if (!BD_19_VAT.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_19_VAT, BD_19_VAT.toString());
- }
-
- BigDecimal BD_20_VAT = new BigDecimal(0);
- if (!BD_20_VAT.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_20_VAT, BD_20_VAT.toString());
- }
-
- BigDecimal BD_21_VAT = new BigDecimal(0);
- if (!BD_21_VAT.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_21_VAT, BD_21_VAT.toString());
- }
-
- BigDecimal BD_21_bis = new BigDecimal(0);
- if (!BD_21_bis.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_21_bis, BD_21_bis.toString());
- }
-
- BigDecimal BD_22_VAT = new BigDecimal(0);
- if (!BD_22_VAT.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_22_VAT, BD_22_VAT.toString());
- }
-
- //Total TVA deductible
- //Total from line 19 to 22
- BigDecimal BD_23_VAT =
- BD_19_VAT.add(BD_20_VAT).add(BD_21_VAT).add(BD_22_VAT);
- fields.setField(doc, textField_23_VAT, BD_23_VAT.toString());
-
- //CREDIT
- BigDecimal BD_27 = new BigDecimal(0);
- if (BD_23_VAT.subtract(BD_16_VAT).compareTo(BigDecimal.ZERO) < 0) {
- BigDecimal BD_25 = BD_23_VAT.subtract(BD_16_VAT);
- fields.setField(doc, textField_25, BD_25.toString());
-
- BigDecimal BD_26 = new BigDecimal(0);
- if (!BD_26.equals(BigDecimal.ZERO)) {
- fields.setField(doc, textField_26, BD_26.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());
}
-
- //Credit a reporter =
- //Credit de TVA - remboursement demande sur form. n. 3519
- BD_27 = BD_25.subtract(BD_26);
}
- fields.setField(doc, textField_27, BD_27.toString());
- //TAXE A PAYER
- BigDecimal BD_32 = new BigDecimal(0);
- if (BD_23_VAT.subtract(BD_16_VAT).compareTo(BigDecimal.ZERO) > 0) {
- //TVA nette due
- BigDecimal BD_28 = BD_16_VAT.subtract(BD_23_VAT);
- fields.setField(doc, textField_28, BD_28.toString());
-
- BigDecimal BD_29 = new BigDecimal(0);
- BigDecimal BD_30 = new BigDecimal(0);
- BigDecimal BD_31 = new BigDecimal(0);
-
- //Total a payer =
- //TVA nette due + taxes assimilees (annexe 3310)
- // - sommes a imputer + sommes a ajouter
- BD_32 = BD_28.add(BD_29).subtract(BD_30).add(BD_31);
- }
- fields.setField(doc, textField_32, BD_32.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
-
// save the updated document to the new file and close
doc.save(filePath);
doc.close();
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-12 15:29:21 UTC (rev 3222)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2011-07-13 12:00:44 UTC (rev 3223)
@@ -25,7 +25,6 @@
package org.chorem.lima.business.ejb;
import java.math.BigDecimal;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;
@@ -46,11 +45,10 @@
import org.chorem.lima.business.ejbinterface.VatStatementServiceLocal;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
-import org.chorem.lima.entity.FinancialStatement;
-import org.chorem.lima.entity.FinancialStatementDAO;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.chorem.lima.entity.VatStatement;
import org.chorem.lima.entity.VatStatementDAO;
+import org.chorem.lima.entity.VatStatementImpl;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
import org.nuiton.topia.TopiaException;
@@ -342,7 +340,49 @@
}
return debitTemp.subtract(creditTemp).abs();
}
+
+ @Override
+ public VatStatement findVatStatementByString(String label) throws LimaException {
+
+ VatStatement vatStatement = new VatStatementImpl();
+ TopiaContext transaction = null;
+
+ try {
+
+ transaction = beginTransaction();
+
+ VatStatementDAO vatStatementDAO =
+ LimaCallaoDAOHelper.getVatStatementDAO(transaction);
+ TopiaQuery query = vatStatementDAO.createQuery();
+
+ String labelProperty =
+ TopiaQuery.getProperty(VatStatement.LABEL);
+
+ //not to be used causing query exception with ' character
+ //query.addWhere(labelProperty + " " + Op.LIKE + " '%" +
+ // vatStatement.getLabel() + "%'");
+
+ query.addWhere(labelProperty, Op.LIKE, label);
+ query.setMaxResults(1);
+ log.debug("query to find account by VAT " + query);
+
+ List<VatStatement> vatStatementsList = vatStatementDAO.findAllByQuery(query);
+
+ if (vatStatementsList.size() > 0) {
+ vatStatement = vatStatementsList.get(0);
+ }
+
+ }
+ catch (TopiaException e) {
+ doCatch(transaction, e, log);
+ }
+ finally {
+ doFinally(transaction, log);
+ }
+ return vatStatement;
+ }
+
protected TopiaContext beginTransaction() throws TopiaException {
// basic check done, make check in database
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-12 15:29:21 UTC (rev 3222)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2011-07-13 12:00:44 UTC (rev 3223)
@@ -55,5 +55,7 @@
Date selectedBeginDate, Date selectedEndDate) throws LimaException,
TopiaException;
+ VatStatement findVatStatementByString(String label) throws LimaException;
+
}
\ No newline at end of file
1
0
July 12, 2011
Author: vsalaun
Date: 2011-07-12 17:29:21 +0200 (Tue, 12 Jul 2011)
New Revision: 3222
Url: http://chorem.org/repositories/revision/lima/3222
Log:
#347 missing letters in vat csv + bug fix on two equals sentences
Modified:
trunk/lima-swing/src/main/resources/import/vat_base.csv
trunk/lima-swing/src/main/resources/import/vat_default.csv
trunk/lima-swing/src/main/resources/import/vat_developed.csv
trunk/lima-swing/src/main/resources/import/vat_shortened.csv
Modified: trunk/lima-swing/src/main/resources/import/vat_base.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/vat_base.csv 2011-07-12 12:33:30 UTC (rev 3221)
+++ trunk/lima-swing/src/main/resources/import/vat_base.csv 2011-07-12 15:29:21 UTC (rev 3222)
@@ -1,20 +1,20 @@
"VAT";"A. MONTANT DES OPERATIONS REALISEES";"true";"";""
"VAT";"OPERATIONS IMPOSABLES (H.T.)";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Ventes, prestations de services";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Autres opérations impossables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Autres opérations imposables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de prestations de services intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Acquisitions intracomunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Acquisitions intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Livraisons de gaz naturel ou d'électricité imposables en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Régularisations";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Régularisations (imposables)";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"OPERATIONS NON IMPOSABLES";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Exportations hors CE";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Autres opérations non iposables";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Autres opérations non imposables";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons intracommunautaires";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons de gaz naturel ou d'électricité non imposables en France";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Achats de franchise";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Régularisations";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Régularisations (non imposables)";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"B. DECOMPTE DE LA TVA A PAYER";"true";"";""
"VAT";"TVA BRUTE";"true";"";"B. DECOMPTE DE LA TVA A PAYER"
"VAT";"Opérations réalisées en France métropolitaine";"true";"";"TVA BRUTE"
@@ -34,7 +34,7 @@
"VAT";"Biens constituant des immobilisations";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autres biens et services";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autre TVA à déduire";"false";"";"TVA DEDUCTIBLE"
-"VAT";"Report du crédit apparaissant ligne 27 de la précedente déclaration";"false";"";"TVA DEDUCTIBLE"
+"VAT";"Report du crédit apparaissant ligne 27 de la précédente déclaration";"false";"";"TVA DEDUCTIBLE"
"VAT";"Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM";"false";"";"TVA DEDUCTIBLE"
"VAT";"CREDIT";"true";"";""
"VAT";"Crédit de TVA";"false";"";"CREDIT"
@@ -42,7 +42,7 @@
"VAT";"Crédit à reporter";"false";"";"CREDIT"
"VAT";"TAXE A PAYER";"true";"";""
"VAT";"TVA nette due";"false";"";"TAXE A PAYER"
-"VAT";"Taxes assimilées calculée sur annexe n°3310 A";"false";"";"TAXE A PAYER"
+"VAT";"Taxes assimilées calculées sur annexe n°3310 A";"false";"";"TAXE A PAYER"
"VAT";"Sommes à imputer, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Sommes à ajouter, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Total à payer";"false";"";"TAXE A PAYER"
Modified: trunk/lima-swing/src/main/resources/import/vat_default.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/vat_default.csv 2011-07-12 12:33:30 UTC (rev 3221)
+++ trunk/lima-swing/src/main/resources/import/vat_default.csv 2011-07-12 15:29:21 UTC (rev 3222)
@@ -1,20 +1,20 @@
"VAT";"A. MONTANT DES OPERATIONS REALISEES";"true";"";""
"VAT";"OPERATIONS IMPOSABLES (H.T.)";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Ventes, prestations de services";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Autres opérations impossables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Autres opérations imposables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de prestations de services intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Acquisitions intracomunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Acquisitions intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Livraisons de gaz naturel ou d'électricité imposables en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Régularisations";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Régularisations (imposables)";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"OPERATIONS NON IMPOSABLES";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Exportations hors CE";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Autres opérations non iposables";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Autres opérations non imposables";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons intracommunautaires";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons de gaz naturel ou d'électricité non imposables en France";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Achats de franchise";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Régularisations";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Régularisations (non imposables)";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"B. DECOMPTE DE LA TVA A PAYER";"true";"";""
"VAT";"TVA BRUTE";"true";"";"B. DECOMPTE DE LA TVA A PAYER"
"VAT";"Opérations réalisées en France métropolitaine";"true";"";"TVA BRUTE"
@@ -34,7 +34,7 @@
"VAT";"Biens constituant des immobilisations";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autres biens et services";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autre TVA à déduire";"false";"";"TVA DEDUCTIBLE"
-"VAT";"Report du crédit apparaissant ligne 27 de la précedente déclaration";"false";"";"TVA DEDUCTIBLE"
+"VAT";"Report du crédit apparaissant ligne 27 de la précédente déclaration";"false";"";"TVA DEDUCTIBLE"
"VAT";"Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM";"false";"";"TVA DEDUCTIBLE"
"VAT";"CREDIT";"true";"";""
"VAT";"Crédit de TVA";"false";"";"CREDIT"
@@ -42,7 +42,7 @@
"VAT";"Crédit à reporter";"false";"";"CREDIT"
"VAT";"TAXE A PAYER";"true";"";""
"VAT";"TVA nette due";"false";"";"TAXE A PAYER"
-"VAT";"Taxes assimilées calculée sur annexe n°3310 A";"false";"";"TAXE A PAYER"
+"VAT";"Taxes assimilées calculées sur annexe n°3310 A";"false";"";"TAXE A PAYER"
"VAT";"Sommes à imputer, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Sommes à ajouter, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Total à payer";"false";"";"TAXE A PAYER"
Modified: trunk/lima-swing/src/main/resources/import/vat_developed.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/vat_developed.csv 2011-07-12 12:33:30 UTC (rev 3221)
+++ trunk/lima-swing/src/main/resources/import/vat_developed.csv 2011-07-12 15:29:21 UTC (rev 3222)
@@ -1,20 +1,20 @@
"VAT";"A. MONTANT DES OPERATIONS REALISEES";"true";"";""
"VAT";"OPERATIONS IMPOSABLES (H.T.)";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Ventes, prestations de services";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Autres opérations impossables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Autres opérations imposables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de prestations de services intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Acquisitions intracomunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Acquisitions intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Livraisons de gaz naturel ou d'électricité imposables en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Régularisations";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Régularisations (imposables)";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"OPERATIONS NON IMPOSABLES";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Exportations hors CE";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Autres opérations non iposables";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Autres opérations non imposables";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons intracommunautaires";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons de gaz naturel ou d'électricité non imposables en France";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Achats de franchise";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Régularisations";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Régularisations (non imposables)";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"B. DECOMPTE DE LA TVA A PAYER";"true";"";""
"VAT";"TVA BRUTE";"true";"";"B. DECOMPTE DE LA TVA A PAYER"
"VAT";"Opérations réalisées en France métropolitaine";"true";"";"TVA BRUTE"
@@ -34,7 +34,7 @@
"VAT";"Biens constituant des immobilisations";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autres biens et services";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autre TVA à déduire";"false";"";"TVA DEDUCTIBLE"
-"VAT";"Report du crédit apparaissant ligne 27 de la précedente déclaration";"false";"";"TVA DEDUCTIBLE"
+"VAT";"Report du crédit apparaissant ligne 27 de la précédente déclaration";"false";"";"TVA DEDUCTIBLE"
"VAT";"Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM";"false";"";"TVA DEDUCTIBLE"
"VAT";"CREDIT";"true";"";""
"VAT";"Crédit de TVA";"false";"";"CREDIT"
@@ -42,7 +42,7 @@
"VAT";"Crédit à reporter";"false";"";"CREDIT"
"VAT";"TAXE A PAYER";"true";"";""
"VAT";"TVA nette due";"false";"";"TAXE A PAYER"
-"VAT";"Taxes assimilées calculée sur annexe n°3310 A";"false";"";"TAXE A PAYER"
+"VAT";"Taxes assimilées calculées sur annexe n°3310 A";"false";"";"TAXE A PAYER"
"VAT";"Sommes à imputer, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Sommes à ajouter, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Total à payer";"false";"";"TAXE A PAYER"
Modified: trunk/lima-swing/src/main/resources/import/vat_shortened.csv
===================================================================
--- trunk/lima-swing/src/main/resources/import/vat_shortened.csv 2011-07-12 12:33:30 UTC (rev 3221)
+++ trunk/lima-swing/src/main/resources/import/vat_shortened.csv 2011-07-12 15:29:21 UTC (rev 3222)
@@ -1,20 +1,20 @@
"VAT";"A. MONTANT DES OPERATIONS REALISEES";"true";"";""
"VAT";"OPERATIONS IMPOSABLES (H.T.)";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Ventes, prestations de services";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Autres opérations impossables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Autres opérations imposables";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de prestations de services intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Acquisitions intracomunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Acquisitions intracommunautaires";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Livraisons de gaz naturel ou d'électricité imposables en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
-"VAT";"Régularisations";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
+"VAT";"Régularisations (imposables)";"false";"";"OPERATIONS IMPOSABLES (H.T.)"
"VAT";"OPERATIONS NON IMPOSABLES";"true";"";"A. MONTANT DES OPERATIONS REALISEES"
"VAT";"Exportations hors CE";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Autres opérations non iposables";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Autres opérations non imposables";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons intracommunautaires";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Livraisons de gaz naturel ou d'électricité non imposables en France";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Achats de franchise";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France";"false";"";"OPERATIONS NON IMPOSABLES"
-"VAT";"Régularisations";"false";"";"OPERATIONS NON IMPOSABLES"
+"VAT";"Régularisations (non imposables)";"false";"";"OPERATIONS NON IMPOSABLES"
"VAT";"B. DECOMPTE DE LA TVA A PAYER";"true";"";""
"VAT";"TVA BRUTE";"true";"";"B. DECOMPTE DE LA TVA A PAYER"
"VAT";"Opérations réalisées en France métropolitaine";"true";"";"TVA BRUTE"
@@ -34,7 +34,7 @@
"VAT";"Biens constituant des immobilisations";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autres biens et services";"false";"";"TVA DEDUCTIBLE"
"VAT";"Autre TVA à déduire";"false";"";"TVA DEDUCTIBLE"
-"VAT";"Report du crédit apparaissant ligne 27 de la précedente déclaration";"false";"";"TVA DEDUCTIBLE"
+"VAT";"Report du crédit apparaissant ligne 27 de la précédente déclaration";"false";"";"TVA DEDUCTIBLE"
"VAT";"Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM";"false";"";"TVA DEDUCTIBLE"
"VAT";"CREDIT";"true";"";""
"VAT";"Crédit de TVA";"false";"";"CREDIT"
@@ -42,7 +42,7 @@
"VAT";"Crédit à reporter";"false";"";"CREDIT"
"VAT";"TAXE A PAYER";"true";"";""
"VAT";"TVA nette due";"false";"";"TAXE A PAYER"
-"VAT";"Taxes assimilées calculée sur annexe n°3310 A";"false";"";"TAXE A PAYER"
+"VAT";"Taxes assimilées calculées sur annexe n°3310 A";"false";"";"TAXE A PAYER"
"VAT";"Sommes à imputer, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Sommes à ajouter, exprimées en euros, y compris acompte congés";"false";"";"TAXE A PAYER"
"VAT";"Total à payer";"false";"";"TAXE A PAYER"
1
0
r3221 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui lima-swing/src/main/resources/i18n
by vsalaun@users.chorem.org July 12, 2011
by vsalaun@users.chorem.org July 12, 2011
July 12, 2011
Author: vsalaun
Date: 2011-07-12 14:33:30 +0200 (Tue, 12 Jul 2011)
New Revision: 3221
Url: http://chorem.org/repositories/revision/lima/3221
Log:
#347 enable access to vat chart and vat statement
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/VatStatementServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-12 08:23:05 UTC (rev 3220)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-12 12:33:30 UTC (rev 3221)
@@ -1465,8 +1465,8 @@
List<VatStatement> vatStatementsList = vatStatementService.getAllVatStatements();
for (VatStatement vatStatement : vatStatementsList) {
- BigDecimal nb = vatStatementService.vatStatementAmounts(vatStatement, beginDate, endDate);
- System.out.println(vatStatement.getLabel() + " : " + nb);
+ BigDecimal amount = vatStatementService.vatStatementAmounts(vatStatement, beginDate, endDate);
+ //System.out.println(vatStatement.getLabel() + " : " + amount);
}
String filePath =
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-12 08:23:05 UTC (rev 3220)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2011-07-12 12:33:30 UTC (rev 3221)
@@ -151,6 +151,9 @@
} catch (TopiaException ex) {
doCatch(transaction, ex, log);
}
+ finally {
+ doFinally(transaction, log);
+ }
return vatStatements;
}
@@ -239,7 +242,7 @@
ReportsDatas reportsDatas = reportServiceLocal.
generateAccountReportsWithTransaction(account, true,
selectedBeginDate, selectedEndDate, topiaContext);
- if (reportsDatas.getSoldeDebit()){
+ if (reportsDatas.getSoldeDebit()) {
debitTemp = debitTemp.add(reportsDatas.getAmountSolde());
}
else {
@@ -283,9 +286,11 @@
String labelProperty =
TopiaQuery.getProperty(VatStatement.LABEL);
- query.addWhere(labelProperty + " " + Op.LIKE + " '%" +
- vatStatement.getLabel() + "%'");
- //query.addWhere(label, operator, paramValue)
+ //not to be used causing query exception with ' character
+ //query.addWhere(labelProperty + " " + Op.LIKE + " '%" +
+ // vatStatement.getLabel() + "%'");
+
+ query.addWhere(labelProperty, Op.LIKE, vatStatement.getLabel());
query.setMaxResults(1);
log.debug("query to find account by VAT " + query);
@@ -298,7 +303,7 @@
}
catch (TopiaException e) {
doCatch(topiaContext, e, log);
- }
+ }
return accountNumbersList;
}
@@ -331,8 +336,10 @@
}
catch (TopiaException e) {
doCatch(transaction, e, log);
- }
-
+ }
+ finally {
+ doFinally(transaction, log);
+ }
return debitTemp.subtract(creditTemp).abs();
}
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-12 08:23:05 UTC (rev 3220)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-07-12 12:33:30 UTC (rev 3221)
@@ -168,6 +168,8 @@
actionIcon='charts-financialperiod'/>
<JMenuItem text="lima.charts.financialstatement" onActionPerformed='getHandler().showFinancialStatementView(this)'
actionIcon='charts-financialstatements'/>
+ <JMenuItem text="lima.charts.vatstatement" onActionPerformed='getHandler().showVatChartView(this)'
+ actionIcon='charts-financialstatements'/>
</JMenu>
<JMenu text="lima.entries" mnemonic="{'E'}">
@@ -191,6 +193,8 @@
actionIcon='reports-ledger'/>
<JMenuItem text="lima.reports.financialstatement" onActionPerformed='getHandler().showFinancialStatementReportsView(this)'
actionIcon='reports-financialstatement'/>
+ <JMenuItem text="lima.reports.vatstatement" onActionPerformed='getHandler().showVatReportView(this)'
+ actionIcon='reports-financialstatement'/>
</JMenu>
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-12 08:23:05 UTC (rev 3220)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-07-12 12:33:30 UTC (rev 3221)
@@ -34,7 +34,7 @@
lima.charts.fiscalperiod.question.morethan12=This period is longer than 12 months. Do you really create this ?
lima.charts.fiscalperiod.question.newyear=Do you want to create a new fiscal year ?
lima.charts.fiscalyear=Fiscal Years
-lima.charts.vat=VAT statement chart
+lima.charts.vatstatement=VAT statement chart
lima.common.account=Account
lima.common.amount=Amount
lima.common.amountcredit=Credit amount
@@ -208,6 +208,7 @@
lima.reports.financialstatement=Financialstatements
lima.reports.ledger=Ledger
lima.reports.vat=Edit VAT
+lima.reports.vatstatement=
lima.response.no=No
lima.response.yes=Yes
lima.splash.1=Loading services...
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-12 08:23:05 UTC (rev 3220)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-07-12 12:33:30 UTC (rev 3221)
@@ -34,7 +34,7 @@
lima.charts.fiscalperiod.question.morethan12=La période sélectionnée n'est pas de 12 mois, voulez-vous continuer ?
lima.charts.fiscalperiod.question.newyear=Voulez vous créer un nouvel exercice?
lima.charts.fiscalyear=Exercices
-lima.charts.vat=Plan TVA
+lima.charts.vatstatement=Plan TVA
lima.common.account=Compte
lima.common.amount=Montant
lima.common.amountcredit=Total Crédit
@@ -208,6 +208,7 @@
lima.reports.financialstatement=Bilan et Compte de résultat
lima.reports.ledger=Grand Livre
lima.reports.vat=Edition TVA
+lima.reports.vatstatement=
lima.response.no=Non
lima.response.yes=Oui
lima.splash.1=Chargement des services...
1
0
July 12, 2011
Author: vsalaun
Date: 2011-07-12 10:23:05 +0200 (Tue, 12 Jul 2011)
New Revision: 3220
Url: http://chorem.org/repositories/revision/lima/3220
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2011-07-12 08:23:02 UTC (rev 3219)
+++ trunk/lima-business/pom.xml 2011-07-12 08:23:05 UTC (rev 3220)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2011-07-12 08:23:02 UTC (rev 3219)
+++ trunk/lima-callao/pom.xml 2011-07-12 08:23:05 UTC (rev 3220)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2011-07-12 08:23:02 UTC (rev 3219)
+++ trunk/lima-swing/pom.xml 2011-07-12 08:23:05 UTC (rev 3220)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-12 08:23:02 UTC (rev 3219)
+++ trunk/pom.xml 2011-07-12 08:23:05 UTC (rev 3220)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2</version>
+ <version>0.6-SNAPSHOT</version>
<modules>
<module>lima-callao</module>
@@ -362,10 +362,10 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.5-beta-2</connection>
- <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.5-beta-2
+ <connection>scm:svn:http://svn.chorem.org/svn/lima/trunk</connection>
+ <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/trunk
</developerConnection>
- <url>http://www.chorem.org/repositories/browse/lima/tags/lima-0.5-beta-2</url>
+ <url>http://www.chorem.org/repositories/browse/lima/trunk</url>
</scm>
<repositories>
1
0
Author: vsalaun
Date: 2011-07-12 10:23:02 +0200 (Tue, 12 Jul 2011)
New Revision: 3219
Url: http://chorem.org/repositories/revision/lima/3219
Log:
[maven-release-plugin] copy for tag lima-0.5-beta-2
Added:
tags/lima-0.5-beta-2/
Property changes on: tags/lima-0.5-beta-2
___________________________________________________________________
Added: svn:ignore
+ *.log
target
bin
.classpath
.project
*.ipr
*.iws
*.iml
Added: svn:mergeinfo
+
1
0
July 12, 2011
Author: vsalaun
Date: 2011-07-12 10:23:00 +0200 (Tue, 12 Jul 2011)
New Revision: 3218
Url: http://chorem.org/repositories/revision/lima/3218
Log:
[maven-release-plugin] prepare release lima-0.5-beta-2
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
+++ trunk/lima-business/pom.xml 2011-07-12 08:23:00 UTC (rev 3218)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2-SNAPSHOT</version>
+ <version>0.5-beta-2</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
+++ trunk/lima-callao/pom.xml 2011-07-12 08:23:00 UTC (rev 3218)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2-SNAPSHOT</version>
+ <version>0.5-beta-2</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
+++ trunk/lima-swing/pom.xml 2011-07-12 08:23:00 UTC (rev 3218)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2-SNAPSHOT</version>
+ <version>0.5-beta-2</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
+++ trunk/pom.xml 2011-07-12 08:23:00 UTC (rev 3218)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta-2-SNAPSHOT</version>
+ <version>0.5-beta-2</version>
<modules>
<module>lima-callao</module>
@@ -362,10 +362,10 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/lima/trunk</connection>
- <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/trunk
+ <connection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.5-beta-2</connection>
+ <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.5-beta-2
</developerConnection>
- <url>http://www.chorem.org/repositories/browse/lima/trunk</url>
+ <url>http://www.chorem.org/repositories/browse/lima/tags/lima-0.5-beta-2</url>
</scm>
<repositories>
1
0
r3217 - in trunk: . lima-business lima-callao lima-swing
by echatellier@users.chorem.org July 11, 2011
by echatellier@users.chorem.org July 11, 2011
July 11, 2011
Author: echatellier
Date: 2011-07-11 22:18:28 +0200 (Mon, 11 Jul 2011)
New Revision: 3217
Url: http://chorem.org/repositories/revision/lima/3217
Log:
Make versionutil happy
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
+++ trunk/lima-business/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta2-SNAPSHOT</version>
+ <version>0.5-beta-2-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
+++ trunk/lima-callao/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta2-SNAPSHOT</version>
+ <version>0.5-beta-2-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
+++ trunk/lima-swing/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta2-SNAPSHOT</version>
+ <version>0.5-beta-2-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
+++ trunk/pom.xml 2011-07-11 20:18:28 UTC (rev 3217)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta2-SNAPSHOT</version>
+ <version>0.5-beta-2-SNAPSHOT</version>
<modules>
<module>lima-callao</module>
1
0
r3216 - in trunk: . lima-business lima-callao lima-swing
by echatellier@users.chorem.org July 11, 2011
by echatellier@users.chorem.org July 11, 2011
July 11, 2011
Author: echatellier
Date: 2011-07-11 20:56:12 +0200 (Mon, 11 Jul 2011)
New Revision: 3216
Url: http://chorem.org/repositories/revision/lima/3216
Log:
Fix plugin version, prepare next release
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2011-07-11 17:59:25 UTC (rev 3215)
+++ trunk/lima-business/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.6-SNAPSHOT</version>
+ <version>0.5-beta2-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2011-07-11 17:59:25 UTC (rev 3215)
+++ trunk/lima-callao/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.6-SNAPSHOT</version>
+ <version>0.5-beta2-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2011-07-11 17:59:25 UTC (rev 3215)
+++ trunk/lima-swing/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.6-SNAPSHOT</version>
+ <version>0.5-beta2-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-11 17:59:25 UTC (rev 3215)
+++ trunk/pom.xml 2011-07-11 18:56:12 UTC (rev 3216)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.6-SNAPSHOT</version>
+ <version>0.5-beta2-SNAPSHOT</version>
<modules>
<module>lima-callao</module>
@@ -332,7 +332,7 @@
<!-- plugin i18n -->
<plugin>
<groupId>org.nuiton.i18n</groupId>
- <artifactId>nuiton-i18n</artifactId>
+ <artifactId>maven-i18n-plugin</artifactId>
<version>${nuitonI18nVersion}</version>
</plugin>
1
0
Author: sletellier
Date: 2011-07-11 19:59:25 +0200 (Mon, 11 Jul 2011)
New Revision: 3215
Url: http://chorem.org/repositories/revision/lima/3215
Log:
Fix ejb dependency
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-11 14:47:39 UTC (rev 3214)
+++ trunk/pom.xml 2011-07-11 17:59:25 UTC (rev 3215)
@@ -25,13 +25,6 @@
<dependencyManagement>
<dependencies>
-
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>javaee-api</artifactId>
- <version>5.0-3</version>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -126,7 +119,15 @@
<version>${openEjbVersion}</version>
<scope>compile</scope>
</dependency>
+
<dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ <version>5.0-3</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>ejb31-api-experimental</artifactId>
<version>${openEjbVersion}</version>
1
0
July 11, 2011
Author: vsalaun
Date: 2011-07-11 16:47:39 +0200 (Mon, 11 Jul 2011)
New Revision: 3214
Url: http://chorem.org/repositories/revision/lima/3214
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/lima-business/pom.xml
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2011-07-11 14:47:33 UTC (rev 3213)
+++ trunk/lima-business/pom.xml 2011-07-11 14:47:39 UTC (rev 3214)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta1</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2011-07-11 14:47:33 UTC (rev 3213)
+++ trunk/lima-callao/pom.xml 2011-07-11 14:47:39 UTC (rev 3214)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta1</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2011-07-11 14:47:33 UTC (rev 3213)
+++ trunk/lima-swing/pom.xml 2011-07-11 14:47:39 UTC (rev 3214)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta1</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.chorem.lima</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-11 14:47:33 UTC (rev 3213)
+++ trunk/pom.xml 2011-07-11 14:47:39 UTC (rev 3214)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>lima</artifactId>
- <version>0.5-beta1</version>
+ <version>0.6-SNAPSHOT</version>
<modules>
<module>lima-callao</module>
@@ -361,10 +361,10 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.5-beta1</connection>
- <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/tags/lima-0.5-beta1
+ <connection>scm:svn:http://svn.chorem.org/svn/lima/trunk</connection>
+ <developerConnection>scm:svn:http://svn.chorem.org/svn/lima/trunk
</developerConnection>
- <url>http://www.chorem.org/repositories/browse/lima/tags/lima-0.5-beta1</url>
+ <url>http://www.chorem.org/repositories/browse/lima/trunk</url>
</scm>
<repositories>
1
0
Author: vsalaun
Date: 2011-07-11 16:47:33 +0200 (Mon, 11 Jul 2011)
New Revision: 3213
Url: http://chorem.org/repositories/revision/lima/3213
Log:
[maven-release-plugin] copy for tag lima-0.5-beta1
Added:
tags/lima-0.5-beta1/
Property changes on: tags/lima-0.5-beta1
___________________________________________________________________
Added: svn:ignore
+ *.log
target
bin
.classpath
.project
*.ipr
*.iws
*.iml
Added: svn:mergeinfo
+
1
0