r3713 - in trunk/lima-business/src/main: java/org/chorem/lima/business/accountingrules resources/i18n
Author: sbavencoff Date: 2013-11-22 16:33:11 +0100 (Fri, 22 Nov 2013) New Revision: 3713 Url: http://chorem.org/projects/lima/repository/revisions/3713 Log: [Account Plan] fixes : check account number and error message Modified: 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/FranceAccountingRules.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2013-10-28 08:11:44 UTC (rev 3712) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2013-11-22 15:33:11 UTC (rev 3713) @@ -74,7 +74,7 @@ } // Check root account starts with 1 to 8 - if (accountNumber.length() == 1 && !accountNumber.matches("[1-8]")) { + if (accountNumber.length() >= 1 && !accountNumber.substring(0, 1).matches("[1-8]")) { throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror", account.getAccountNumber())); } @@ -94,7 +94,7 @@ } // Check root account starts with 1 to 8 - if (accountNumber.length() == 1 && accountNumber.matches("[1-8]")) { + if (accountNumber.length() >= 1 && !accountNumber.substring(0, 1).matches("[1-8]")) { throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountstartnumbererror", 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 2013-10-28 08:11:44 UTC (rev 3712) +++ trunk/lima-business/src/main/resources/i18n/lima-business_en_GB.properties 2013-11-22 15:33:11 UTC (rev 3713) @@ -73,7 +73,7 @@ lima-business.fiscalperiod.newfinancialperioderror=Can't set financial period on the following fiscal year lima-business.fiscalperiod.previousfiscalperiodalreadyblocked=The last financial period from the fiscal period is blocked lima-business.franceaccountingrules.accountnumbernotnumeric=Account Number is not numeric \: %s -lima-business.franceaccountingrules.accountstartnumbererror=Master account is not a digit between 1 to 8 \: %d +lima-business.franceaccountingrules.accountstartnumbererror=Master account is not a digit between 1 to 8 \: %s 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.fiscalperiodnotempty=The fiscal period is not empty \! 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 2013-10-28 08:11:44 UTC (rev 3712) +++ trunk/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties 2013-11-22 15:33:11 UTC (rev 3713) @@ -74,8 +74,8 @@ lima-business.fiscalperiod.fiscalperiodalreadyblocked=La période fiscale est déjà bloquée lima-business.fiscalperiod.newfinancialperioderror=Impossible de définir la période financière sur la période fiscale suivante lima-business.fiscalperiod.previousfiscalperiodalreadyblocked=La dernière période financière de la période fiscale est bloquée -lima-business.franceaccountingrules.accountnumbernotnumeric=Le numéro de copte n'est pas numéric \: %s -lima-business.franceaccountingrules.accountstartnumbererror=Le numéro du copte général n'est pas compris entre 1 et 8 \: %d +lima-business.franceaccountingrules.accountnumbernotnumeric=Le numéro de compte n'est pas numérique \: %s +lima-business.franceaccountingrules.accountstartnumbererror=Le numéro du compte général n'est pas compris entre 1 et 8 \: %s 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édente n'est pas bloquée lima-business.franceaccountingrules.fiscalperiodnotempty=La période fiscale à supprimer n'est pas vide \!
participants (1)
-
sbavencoff@users.chorem.org