Lima-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
July 2011
- 3 participants
- 46 discussions
r3227 - in trunk/lima-business/src/main: java/org/chorem/lima/business/accountingrules resources/i18n
by vsalaun@users.chorem.org 18 Jul '11
by vsalaun@users.chorem.org 18 Jul '11
18 Jul '11
Author: vsalaun
Date: 2011-07-18 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 18 Jul '11
by vsalaun@users.chorem.org 18 Jul '11
18 Jul '11
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 13 Jul '11
by vsalaun@users.chorem.org 13 Jul '11
13 Jul '11
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 13 Jul '11
by vsalaun@users.chorem.org 13 Jul '11
13 Jul '11
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 13 Jul '11
by vsalaun@users.chorem.org 13 Jul '11
13 Jul '11
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
12 Jul '11
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 12 Jul '11
by vsalaun@users.chorem.org 12 Jul '11
12 Jul '11
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
12 Jul '11
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
12 Jul '11
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