r3241 - in trunk/lima-swing/src/main: java/org/chorem/lima/enums java/org/chorem/lima/ui java/org/chorem/lima/ui/importexport java/org/chorem/lima/util resources/i18n
Author: vsalaun Date: 2011-08-02 13:39:02 +0200 (Tue, 02 Aug 2011) New Revision: 3241 Url: http://chorem.org/repositories/revision/lima/3241 Log: #347 update import/export for vat Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java 2011-08-02 11:37:55 UTC (rev 3240) +++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java 2011-08-02 11:39:02 UTC (rev 3241) @@ -36,6 +36,7 @@ CSV_ENTRYBOOKS_EXPORT(false, true), CSV_ENTRYBOOKS_IMPORT(true, true), CSV_FINANCIALSTATEMENTS_EXPORT(false, true), CSV_FINANCIALSTATEMENTS_IMPORT(true, true), CSV_VAT_EXPORT(false, true), CSV_VAT_IMPORT(true, true), + PDF_VAT_EXPORT(false, true), PDF_VAT_IMPORT(true, true), EBP_ACCOUNTCHARTS_EXPORT(false, false), EBP_ENTRIES_EXPORT(false, false), EBP_ACCOUNTCHARTS_IMPORT(true, false), EBP_ENTRIES_IMPORT(true, false); 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-08-02 11:37:55 UTC (rev 3240) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-08-02 11:39:02 UTC (rev 3241) @@ -170,8 +170,12 @@ 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-vatstatements'/> + <JMenu text="lima.charts.vatstatement" actionIcon='charts-vatstatements'> + <JMenuItem text="lima.charts.vatstatement" onActionPerformed='getHandler().showVatChartView(this)' + actionIcon='charts-vatstatements'/> + <JMenuItem text="lima.charts.vatpdf" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.PDF_VAT_IMPORT)' + actionIcon='charts-vatstatements'/> + </JMenu> </JMenu> <JMenu text="lima.entries" mnemonic="{'E'}"> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2011-08-02 11:37:55 UTC (rev 3240) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2011-08-02 11:39:02 UTC (rev 3241) @@ -172,6 +172,13 @@ datas = extractFile(filePath, charset.getEncoding()); result = importService.importAsCSV(datas, ImportExportEntityEnum.VATSTATEMENT); break; + case PDF_VAT_IMPORT: + int response = JOptionPane.showConfirmDialog(waitView, + _("lima.importexport.usevatpdf"), + _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION); + datas = extractFile(filePath, charset.getEncoding()); + result = importService.importAsPDF(filePath, ImportExportEntityEnum.VATPDF, (response == JOptionPane.YES_OPTION)); + break; case EBP_ACCOUNTCHARTS_IMPORT: //For windows ebp datas = extractFile(filePath, EncodingEnum.ISOLATIN1.getEncoding()); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2011-08-02 11:37:55 UTC (rev 3240) +++ trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2011-08-02 11:39:02 UTC (rev 3241) @@ -51,6 +51,17 @@ } /** @deprecated */ + /* + * Use instead: JOptionPane.showMessageDialog (String message,String titre,int type) + * + * for e.g: + * JOptionPane.showMessageDialog( + view, + _("lima.importexport.export.terminated"), + _("lima.importexport.export"), + JOptionPane.INFORMATION_MESSAGE); + * + */ public static void showMessageDialog(String message) { JFrame f = new JFrame(); f.setIconImage(Resource.getIcon("icons/lima.png").getImage()); 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-08-02 11:37:55 UTC (rev 3240) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2011-08-02 11:39:02 UTC (rev 3241) @@ -39,7 +39,14 @@ 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.vatpdf=PDF structure lima.charts.vatstatement=VAT statement chart +lima.charts.vatstatement.base=Base VAT statement chart +lima.charts.vatstatement.deleteparent=Delete subcategories before this line +lima.charts.vatstatement.developed=Developped VAT statement chart +lima.charts.vatstatement.nothing=No vat statement chart +lima.charts.vatstatement.question.remove=Do you really want to delete this line ? +lima.charts.vatstatement.shortened=Shortened vat statement chart lima.common.account=Account lima.common.amount=Amount lima.common.amountcredit=Credit amount @@ -61,6 +68,7 @@ lima.common.filter=Filter lima.common.fin=Terminated lima.common.globalexception=Global lima exception +lima.common.info=Information lima.common.label=Label lima.common.movmentedfilter=Accounts filtered lima.common.next=Next @@ -193,6 +201,7 @@ lima.importexport.import.terminated=Import terminated lima.importexport.importcsv=Import CSV lima.importexport.importebp=Import EBP +lima.importexport.usevatpdf=Would you like to use this PDF when editing the VAT document ? lima.importexport.vatstatements=VAT chart lima.importexport.wait=Job in progress… lima.init.closed=Lima closed at %1$s @@ -272,6 +281,16 @@ lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html> lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html> lima.vatreport.listerror=Can't get entries list +lima.vatstatement.accounts=List of accounts +lima.vatstatement.boxname=PDF BoxName +lima.vatstatement.check= +lima.vatstatement.delete=Delete actual VAT statement chart before import new +lima.vatstatement.header= +lima.vatstatement.label=Label +lima.vatstatement.masteramount= +lima.vatstatement.mastervatstatement= +lima.vatstatement.movement.add=Add movement +lima.vatstatement.subamount= lima.warning.nimbus.landf=Could not find Numbus Look&Feel limma.config.thousandseparator.description= nuitonutil.error.applicationconfig.save= Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties =================================================================== --- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-08-02 11:37:55 UTC (rev 3240) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2011-08-02 11:39:02 UTC (rev 3241) @@ -27,7 +27,7 @@ lima.charts.financialstatement=Plan BCR lima.charts.financialstatement.base=Plan BCR de base lima.charts.financialstatement.developed=Plan BCR développé -lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR chargé<br/>Veuillez sélectionner un plan par défault, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html> +lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR chargé<br/>Veuillez sélectionner un plan par défaut, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html> lima.charts.financialstatement.shortened=Plan BCR abrégé lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction? lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction? @@ -39,7 +39,14 @@ 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.vatpdf=Structure du pdf lima.charts.vatstatement=Plan TVA +lima.charts.vatstatement.base=Plan TVA de base +lima.charts.vatstatement.deleteparent=Veuillez supprimer les sous-catégories de cette ligne +lima.charts.vatstatement.developed=Plan TVA développé +lima.charts.vatstatement.nothing=<html><center>Aucun plan TVA chargé<br/>Veuillez sélectionner un plan par défaut, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html> +lima.charts.vatstatement.question.remove=Etes vous sur de vouloir supprimer cette ligne ? +lima.charts.vatstatement.shortened=Plan TVA abrégé lima.common.account=Compte lima.common.amount=Montant lima.common.amountcredit=Total Crédit @@ -61,6 +68,7 @@ lima.common.filter=Filtrer lima.common.fin=Terminé lima.common.globalexception=Global lima exception +lima.common.info=Information lima.common.label=Libellé lima.common.movmentedfilter=Comptes mouvementés lima.common.next=Suivant @@ -193,6 +201,7 @@ lima.importexport.import.terminated=Import terminé lima.importexport.importcsv=Import CSV lima.importexport.importebp=Import EBP +lima.importexport.usevatpdf=Voulez-vous utilser ce PDF pour la déclaration de TVA ? lima.importexport.vatstatements=Plan TVA lima.importexport.wait=Traitement en cours … lima.init.closed=Lima fermé à %1$s @@ -224,7 +233,6 @@ 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... @@ -272,6 +280,16 @@ lima.tooltip.filter=<html>Expression régulière \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html> lima.tooltip.lettering=<html>Pour ajouter une lettre à plusieurs écritures <br/>Sélectionner plusieurs lignes avec la combinaison ctrl + click</html> lima.vatreport.listerror=Erreur lors de la récupération des données de la liste +lima.vatstatement.accounts=Liste des comptes +lima.vatstatement.boxname=PDF BoxName +lima.vatstatement.check= +lima.vatstatement.delete=Supprimer le plan TVA actuel avant d'importer +lima.vatstatement.header= +lima.vatstatement.label=Libellé +lima.vatstatement.masteramount= +lima.vatstatement.mastervatstatement= +lima.vatstatement.movement.add=Ajouter un regrouprement +lima.vatstatement.subamount= lima.warning.nimbus.landf=Le look and feel nymbus n'a pas été trouvé limma.config.thousandseparator.description= nuitonutil.error.applicationconfig.save=
participants (1)
-
vsalaun@users.chorem.org