Author: sbavencoff Date: 2014-09-19 15:27:29 +0200 (Fri, 19 Sep 2014) New Revision: 3919 Url: http://forge.chorem.org/projects/lima/repository/revisions/3919 Log: refs #875 #1043 : VAT statement Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.css trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.css trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.css trunk/lima-swing/src/main/resources/icons/action-vatStatement-edit.png trunk/lima-swing/src/main/resources/icons/action-vatStatement-import.png trunk/lima-swing/src/main/resources/icons/action-vatStatement-new.png trunk/lima-swing/src/main/resources/icons/action-vatStatement-remove.png Removed: trunk/lima-swing/src/main/resources/icons/action-vatstatement-edit.png trunk/lima-swing/src/main/resources/icons/action-vatstatement-import.png trunk/lima-swing/src/main/resources/icons/action-vatstatement-new.png trunk/lima-swing/src/main/resources/icons/action-vatstatement-remove.png Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.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 Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.css =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.css (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.css 2014-09-19 13:27:29 UTC (rev 3919) @@ -0,0 +1,45 @@ +#vatStatementImportFormg { + title : "lima.vatStatement.import.form"; +} + +#nothingLabel { + text : "lima.vatStatement.nothing"; +} + +#shortened { + text : "lima.vatStatement.shortened"; + value : "{VatStatementsChartEnum.SHORTENED}"; + buttonGroup : "{getRadioButtons()}"; + selected : true; +} + +#vatBase { + text : "lima.vatStatement.base"; + value : "{VatStatementsChartEnum.BASE}"; + buttonGroup : "{getRadioButtons()}"; +} + +#developed { + text : "lima.vatStatement.developed"; + value : "{VatStatementsChartEnum.DEVELOPED}"; + buttonGroup : "{getRadioButtons()}"; +} + +#importCSV { + text : "lima.vatStatement.import"; + value : "{VatStatementsChartEnum.IMPORT}"; + buttonGroup : "{getRadioButtons()}"; +} + +#deleteVatStatementChart { + text : "lima.vatStatement.delete"; + selected : false; +} + +#cancel { + text : "lima.cancel"; +} + +#ok { + text : "lima.ok"; +} \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx 2014-09-12 15:33:20 UTC (rev 3918) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx 2014-09-19 13:27:29 UTC (rev 3919) @@ -22,7 +22,8 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<JDialog modal="true" +<JDialog id="vatStatementImportForm" + modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> @@ -48,45 +49,32 @@ <Table> <row> <cell> - <JLabel text='lima.charts.vatstatement.nothing'/> + <JLabel id="nothingLabel"/> </cell> </row> <row> <cell> - <JRadioButton text='lima.charts.vatstatement.shortened' - value='{VatStatementsChartEnum.SHORTENED}' - buttonGroup="{getRadioButtons()}" - selected='true'/> + <JRadioButton id="shortened"/> </cell> </row> <row> <cell> - <JRadioButton text='lima.charts.vatstatement.base' - value='{VatStatementsChartEnum.BASE}' - buttonGroup="{getRadioButtons()}" - selected='true'/> + <JRadioButton id="vatBase"/> </cell> </row> <row> <cell> - <JRadioButton text='lima.charts.vatstatement.developed' - value='{VatStatementsChartEnum.DEVELOPED}' - buttonGroup="{getRadioButtons()}" - selected='true'/> + <JRadioButton id="developed"/> </cell> </row> <row> <cell> - <JRadioButton text='lima.importExport.import' - value='{VatStatementsChartEnum.IMPORT}' - buttonGroup="{getRadioButtons()}" - selected='true'/> + <JRadioButton id="importCSV"/> </cell> </row> <row> <cell> - <JCheckBox id='deleteVatStatementChart' text='lima.vatstatement.delete' - selected='false'/> + <JCheckBox id='deleteVatStatementChart'/> </cell> </row> <row> @@ -94,11 +82,11 @@ <Table> <row> <cell fill="none"> - <JButton text="lima.cancel" + <JButton id="cancel" onActionPerformed="performCancel()"/> </cell> <cell fill="none"> - <JButton id="ok" text="lima.ok" + <JButton id="ok" onActionPerformed="dispose()"/> </cell> </row> Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.css =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.css (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.css 2014-09-19 13:27:29 UTC (rev 3919) @@ -0,0 +1,44 @@ +#VatChartMovementForm { + title : "lima.vatStatement.movement"; +} + +#labelLabel { + text : "lima.vatStatement.label"; +} + +#labelTextField { + text : "{getVatStatement().getLabel()}"; +} + +#boxNameLabel { + text : "lima.vatStatement.boxName"; +} + +#boxNameTextField { + text : "{getVatStatement().getBoxName()}"; +} + +#accountsLabel { + text : "lima.vatStatement.accounts"; +} + +#accountsTextField { + text : "{getVatStatement().getAccounts()}"; +} + +#masterLabel { + text : "lima.vatStatement.master"; +} + +#masterTextField { + text : "{getVatStatement().getMasterVatStatement().getLabel()}"; + editable : false; +} + +#cancel { + text : "lima.cancel"; +} + +#ok { + text : "lima.ok"; +} \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx 2014-09-12 15:33:20 UTC (rev 3918) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx 2014-09-19 13:27:29 UTC (rev 3919) @@ -22,7 +22,8 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<JDialog modal="true" +<JDialog id="VatChartMovementForm" + modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> @@ -52,10 +53,10 @@ <row> <cell fill="horizontal"> - <JLabel text="lima.vatstatement.label"/> + <JLabel id="labelLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="labelTextField" text="{getVatStatement().getLabel()}"/> + <JTextField id="labelTextField"/> <Document javaBean="getLabelTextField().getDocument()" onInsertUpdate='getVatStatement().setLabel(getLabelTextField().getText())' onRemoveUpdate='getVatStatement().setLabel(getLabelTextField().getText())'/> @@ -63,11 +64,10 @@ </row> <row> <cell fill="horizontal"> - <JLabel text="lima.vatstatement.boxname"/> + <JLabel id="boxNameLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="boxNameTextField" - text="{getVatStatement().getBoxName()}"/> + <JTextField id="boxNameTextField"/> <Document javaBean="getBoxNameTextField().getDocument()" onInsertUpdate='getVatStatement().setBoxName(getBoxNameTextField().getText())' onRemoveUpdate='getVatStatement().setBoxName(getBoxNameTextField().getText())'/> @@ -75,11 +75,10 @@ </row> <row> <cell fill="horizontal"> - <JLabel text="lima.vatstatement.accounts"/> + <JLabel id="accountsLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="accountsTextField" - text="{getVatStatement().getAccounts()}"/> + <JTextField id="accountsTextField"/> <Document javaBean="getAccountsTextField().getDocument()" onInsertUpdate='getVatStatement().setAccounts(getAccountsTextField().getText())' onRemoveUpdate='getVatStatement().setAccounts(getAccountsTextField().getText())'/> @@ -87,19 +86,20 @@ </row> <row> <cell fill="horizontal"> - <JLabel text="lima.vatstatement.mastervatstatement"/> + <JLabel id="masterLabel"/> </cell> <cell fill="horizontal"> - <JTextField editable="{false}" id="masterVatStatementTextField" - text="{getVatStatement().getMasterVatStatement().getLabel()}"/> + <JTextField id="masterTextField"/> </cell> </row> <row> <cell fill="none"> - <JButton text="lima.cancel" onActionPerformed="performCancel()"/> + <JButton id="cancel" + onActionPerformed="performCancel()"/> </cell> <cell fill="none"> - <JButton id="ok" text="lima.ok" onActionPerformed="dispose()"/> + <JButton id="ok" + onActionPerformed="dispose()"/> </cell> </row> </Table> Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.css =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.css (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.css 2014-09-19 13:27:29 UTC (rev 3919) @@ -0,0 +1,29 @@ +#toolbar { + floatable : false; +} + +#addVatStatementMovement { + toolTipText : "lima.vatStatement.movement.add"; + actionIcon : "vatStatement-new"; +} + +#updateButton { + toolTipText : "lima.update.shortcut"; + actionIcon : "vatStatement-edit"; + enabled : "{isSelectedRow()}"; +} + +#removeButton { + toolTipText : "lima.remove.shortcut"; + actionIcon : "vatStatement-remove"; + enabled : "{isSelectedRow()}"; +} + +#importButton { + toolTipText : "lima.importExport.import"; + actionIcon : "vatStatement-import"; +} + +#treeTable { + selectionMode : "{ListSelectionModel.SINGLE_SELECTION}"; +} \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx 2014-09-12 15:33:20 UTC (rev 3918) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx 2014-09-19 13:27:29 UTC (rev 3919) @@ -22,7 +22,7 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<Table> +<JPanel layout="{new BorderLayout()}"> <import> javax.swing.ListSelectionModel @@ -37,48 +37,30 @@ ]]> </script> - <row> - <cell fill="horizontal"> - <JToolBar floatable="false"> + <JToolBar id="toolbar" + constraints="BorderLayout.PAGE_START"> - <JButton id="addVatStatementMovement" - toolTipText="{ t("lima.vatstatement.movement.add") + " (Ctrl+N)"}" - actionIcon='vatstatement-new' - onActionPerformed="handler.addVatStatementMovement()"/> + <JButton id="addVatStatementMovement" + onActionPerformed="handler.addVatStatementMovement()"/> - <JButton id="updateButton" - toolTipText="{ t("lima.update") + " (Ctrl+M)"}" - actionIcon='vatstatement-edit' - onActionPerformed="handler.updateVatStatement()" - enabled="{isSelectedRow()}"/> + <JButton id="updateButton" + onActionPerformed="handler.updateVatStatement()"/> - <JButton id="removeButton" - toolTipText="{ t("lima.remove") + " (Del)"}" - actionIcon='vatstatement-remove' - onActionPerformed="handler.removeVatStatement()" - enabled="{isSelectedRow()}"/> + <JButton id="removeButton" + onActionPerformed="handler.removeVatStatement()"/> - <JButton id="importButton" - actionIcon='vatstatement-import' - toolTipText="lima.importExport.import" - onActionPerformed="handler.importVatStatementChart()"/> + <JButton id="importButton" + onActionPerformed="handler.importVatStatementChart()"/> - </JToolBar> - </cell> - </row> + </JToolBar> - <row> - <cell fill="both" weightx="1" weighty="1" > - <JScrollPane> - <VatChartTreeTableModel id="vatTreeTableModel"/> - <VatChartTreeTable id="treeTable" - constructorParams="getHandler()" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - treeTableModel="{getVatTreeTableModel()}"/> - <ListSelectionModel - javaBean="getTreeTable().getSelectionModel()" - onValueChanged="setSelectedRow(treeTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - </row> -</Table> \ No newline at end of file + <JScrollPane> + <VatChartTreeTableModel id="vatTreeTableModel"/> + <VatChartTreeTable id="treeTable" + constructorParams="getHandler()" + treeTableModel="{getVatTreeTableModel()}"/> + <ListSelectionModel + javaBean="getTreeTable().getSelectionModel()" + onValueChanged="setSelectedRow(treeTable.getSelectedRow() != -1)"/> + </JScrollPane> +</JPanel> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2014-09-12 15:33:20 UTC (rev 3918) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2014-09-19 13:27:29 UTC (rev 3919) @@ -246,7 +246,7 @@ int selectedRow = view.treeTable.getSelectedRow(); if (selectedRow != -1) { int n = JOptionPane.showConfirmDialog(view, - t("lima.charts.vatstatement.question.remove"), + t("lima.vatStatement.question.remove"), t("lima.confirmation"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); @@ -258,7 +258,7 @@ if (!treeTableModel.isLeaf(vatStatement)) { JOptionPane.showMessageDialog( view, - t("lima.charts.vatstatement.deleteparent"), + t("lima.vatStatement.deleteparent"), t("lima.info"), JOptionPane.INFORMATION_MESSAGE); } else { 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 2014-09-12 15:33:20 UTC (rev 3918) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2014-09-19 13:27:29 UTC (rev 3919) @@ -75,13 +75,6 @@ lima.charts.fiscalperiod.update=Updated fiscal 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.closed=Closed lima.closedPeriodicEntryBook.franceAccountingRules.unbalancedFinancialTransactionsException=Fiscal Period has unbalanced transactions. lima.closedPeriodicEntryBook.franceAccountingRules.withoutEntryBookFinancialTransactionsException=Can't block financialperiod / missing EntryBook in transactions @@ -667,15 +660,24 @@ lima.transaction=Transaction lima.update=Modify lima.update.shortcut= +lima.vatStatement=VAT statement chart +lima.vatStatement.accounts=List of accounts lima.vatStatement.alreadyExistVatStatement=FAILED \: The vatStatement %s already exists \! +lima.vatStatement.base=Base VAT statement chart +lima.vatStatement.boxName=PDF BoxName +lima.vatStatement.delete=Delete actual VAT statement chart before import new +lima.vatStatement.deleteparent=Delete subcategories before this line +lima.vatStatement.developed=Developped VAT statement chart +lima.vatStatement.import= +lima.vatStatement.label=Label +lima.vatStatement.master= +lima.vatStatement.movement= +lima.vatStatement.movement.add=Add movement +lima.vatStatement.nothing=No vat statement chart +lima.vatStatement.question.remove=Do you really want to delete this line ? +lima.vatStatement.shortened=Shortened vat statement chart lima.vatStatements= lima.vatreport.listerror=Can't get entries list -lima.vatstatement.accounts=List of accounts -lima.vatstatement.boxname=PDF BoxName -lima.vatstatement.delete=Delete actual VAT statement chart before import new -lima.vatstatement.label=Label -lima.vatstatement.mastervatstatement= -lima.vatstatement.movement.add=Add movement lima.wait= lima.warning.nimbus.landf=Could not find Numbus Look&Feel limaFinancialStatement.movement.form= 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 2014-09-12 15:33:20 UTC (rev 3918) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2014-09-19 13:27:29 UTC (rev 3919) @@ -56,13 +56,6 @@ lima.charts.fiscalperiod.create= lima.charts.fiscalyear=Exercices lima.charts.vatpdf=Import 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.closed=Fermé lima.closedPeriodicEntryBook.franceAccountingRules.unbalancedFinancialTransactionsException=Impossible de bloquer la période financière / le journal, il contient des transactions non équilibrées. lima.closedPeriodicEntryBook.franceAccountingRules.withoutEntryBookFinancialTransactionsException=Impossible de bloquer la période financière / il manque un journal dans une transaction (%1$te/%1$tm/%1$tY) @@ -579,15 +572,24 @@ lima.transaction=Transaction lima.update=Modifier lima.update.shortcut=Modifier (Ctrl+M) +lima.vatStatement=Plan TVA +lima.vatStatement.accounts=Liste des comptes lima.vatStatement.alreadyExistVatStatement=u00C9chec \: Le plan %s exist déjà \! +lima.vatStatement.base=Plan TVA de base +lima.vatStatement.boxName=PDF BoxName +lima.vatStatement.delete=Supprimer le plan TVA actuel avant d'importer +lima.vatStatement.deleteparent=Veuillez supprimer les sous-catégories de cette ligne +lima.vatStatement.developed=Plan TVA développé +lima.vatStatement.import= +lima.vatStatement.label=Libellé +lima.vatStatement.master= +lima.vatStatement.movement= +lima.vatStatement.movement.add=Ajouter un regrouprement (Ctrl+N) +lima.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.vatStatement.question.remove=Etes vous sur de vouloir supprimer cette ligne ? +lima.vatStatement.shortened=Plan TVA abrégé lima.vatStatements=Plan TVA 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.delete=Supprimer le plan TVA actuel avant d'importer -lima.vatstatement.label=Libellé -lima.vatstatement.mastervatstatement= -lima.vatstatement.movement.add=Ajouter un regrouprement lima.wait=Traitement en cours lima.warning.nimbus.landf=Le look and feel nymbus n'a pas été trouvé limma.config.thousandseparator.description=Caractère de séparation entre les blocs de milliers Copied: trunk/lima-swing/src/main/resources/icons/action-vatStatement-edit.png (from rev 3918, trunk/lima-swing/src/main/resources/icons/action-vatstatement-edit.png) =================================================================== (Binary files differ) Copied: trunk/lima-swing/src/main/resources/icons/action-vatStatement-import.png (from rev 3918, trunk/lima-swing/src/main/resources/icons/action-vatstatement-import.png) =================================================================== (Binary files differ) Copied: trunk/lima-swing/src/main/resources/icons/action-vatStatement-new.png (from rev 3918, trunk/lima-swing/src/main/resources/icons/action-vatstatement-new.png) =================================================================== (Binary files differ) Copied: trunk/lima-swing/src/main/resources/icons/action-vatStatement-remove.png (from rev 3918, trunk/lima-swing/src/main/resources/icons/action-vatstatement-remove.png) =================================================================== (Binary files differ) Deleted: trunk/lima-swing/src/main/resources/icons/action-vatstatement-edit.png =================================================================== (Binary files differ) Deleted: trunk/lima-swing/src/main/resources/icons/action-vatstatement-import.png =================================================================== (Binary files differ) Deleted: trunk/lima-swing/src/main/resources/icons/action-vatstatement-new.png =================================================================== (Binary files differ) Deleted: trunk/lima-swing/src/main/resources/icons/action-vatstatement-remove.png =================================================================== (Binary files differ)