r3543 - in trunk: lima-business/src/main/java/org/chorem/lima/business/accountingrules lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod lima-swing/src/main/java/org/chorem/lima/ui/lettering
Author: echatellier Date: 2012-07-20 14:04:34 +0200 (Fri, 20 Jul 2012) New Revision: 3543 Url: http://chorem.org/repositories/revision/lima/3543 Log: Remove tabulations Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 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 2012-07-20 11:49:46 UTC (rev 3542) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2012-07-20 12:04:34 UTC (rev 3543) @@ -109,7 +109,6 @@ return null; } - /** Rules to check before block fiscals periods */ @Override public void blockFiscalPeriodRules(FiscalPeriod fiscalPeriod) throws LimaException { @@ -118,10 +117,10 @@ /** Rules to check before delete fiscals periods */ @Override - public void deleteFiscalPeriodRules(FiscalPeriod fiscalPeriod) - throws LimaException { - } - + public void deleteFiscalPeriodRules(FiscalPeriod fiscalPeriod) + throws LimaException { + } + /** * Rules to check if an account and all his subaccount is not used * Recursive function 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 2012-07-20 11:49:46 UTC (rev 3542) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2012-07-20 12:04:34 UTC (rev 3543) @@ -202,20 +202,20 @@ */ @Override public void deleteFiscalPeriodRules(FiscalPeriod fiscalPeriod) throws LimaBusinessException { - - try { - - FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO(); - - //Check if the fiscal period to delete is empty - if (financialTransactionDAO.findAllByDates(fiscalPeriod.getBeginDate(), fiscalPeriod.getEndDate()).size() != 0) { + + try { + + FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO(); + + //Check if the fiscal period to delete is empty + if (financialTransactionDAO.findAllByDates(fiscalPeriod.getBeginDate(), fiscalPeriod.getEndDate()).size() != 0) { throw new LimaBusinessException(_("lima-business.franceaccountingrules.fiscalperiodnotempty")); - } + } } catch (TopiaException ex) { throw new LimaException("Can't check rule", ex); } } - + /** * Check if old financialperiod for a an entrybook are closed before bock the asked closedperiodicentrybook * <p/> Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-07-20 11:49:46 UTC (rev 3542) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-07-20 12:04:34 UTC (rev 3543) @@ -447,23 +447,23 @@ } } - @Override - /** + /** * to delete a fiscal period * <p/> * check localized rules before delete it */ - public void deleteFiscalPeriod(FiscalPeriod fiscalPeriod) - throws LimaException { + @Override + public void deleteFiscalPeriod(FiscalPeriod fiscalPeriod) + throws LimaException { AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules(); try { try { - //get entities with DAO - FiscalPeriodDAO fiscalPeriodDAO = getDaoHelper().getFiscalPeriodDAO(); + //get entities with DAO + FiscalPeriodDAO fiscalPeriodDAO = getDaoHelper().getFiscalPeriodDAO(); - // re-attach entities to current session + // re-attach entities to current session FiscalPeriod localFiscalPeriod = fiscalPeriodDAO.findByTopiaId(fiscalPeriod.getTopiaId()); //check rules @@ -475,9 +475,9 @@ //delete closedPeriodicEntryBook before fiscal period for (ClosedPeriodicEntryBook closedPeriodicEntryBook : closedPeriodicEntryBookDAOList) { - // fix : ObjectDeletedException: deleted object would be re-saved by cascade (Need to delete association between entryBook and financial period via closedPeriodEntityBook) + // fix : ObjectDeletedException: deleted object would be re-saved by cascade (Need to delete association between entryBook and financial period via closedPeriodEntityBook) closedPeriodicEntryBook.getEntryBook().removeFinancialPeriodClosedPeriodicEntryBook(closedPeriodicEntryBook); - closedPeriodicEntryBookDAO.delete(closedPeriodicEntryBook); + closedPeriodicEntryBookDAO.delete(closedPeriodicEntryBook); } fiscalPeriodDAO.delete(localFiscalPeriod); @@ -490,6 +490,6 @@ throw new LimaException("Can't delete period", ex); } - } + } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2012-07-20 11:49:46 UTC (rev 3542) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchView.jaxx 2012-07-20 12:04:34 UTC (rev 3543) @@ -67,7 +67,7 @@ <JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxPeriodEnum.descriptions())" onActionPerformed="periodSearchPanel.refresh(ComboBoxPeriodEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); - validate(); repaint()"/> + validate(); repaint()"/> </cell> <cell> <FinancialTransactionPeriodSearchPanel @@ -122,7 +122,7 @@ <JComboBox id="accountComboBox" javaBean="new JComboBox(ComboBoxAccountsEnum.descriptions())" onActionPerformed="accountSearchPanel.refresh(ComboBoxAccountsEnum.valueOfDescription((String) accountComboBox.getSelectedItem())); - validate(); repaint()"/> + validate(); repaint()"/> </cell> <cell> <AccountSearchPanel javaBean="accountSearchPanel"/> @@ -151,13 +151,13 @@ <JComboBox id="amountComboBox" javaBean="new JComboBox(FinancialStatementWayEnum.descriptions())" onActionPerformed="handler.setAmountWayEnum(FinancialStatementWayEnum.valueOfDescription((String)amountComboBox.getSelectedItem())); - handler.refresh()"/> + handler.refresh()"/> </cell> <cell> <JComboBox id="operatorComboBox" javaBean="new JComboBox(ComboBoxOperatorsEnum.descriptions())" onActionPerformed="amountSearchPanel.refresh(ComboBoxOperatorsEnum.valueOfDescription((String) operatorComboBox.getSelectedItem())); - validate(); repaint()"/> + validate(); repaint()"/> </cell> <cell> <AmountSearchPanel javaBean="amountSearchPanel"/> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-07-20 11:49:46 UTC (rev 3542) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-07-20 12:04:34 UTC (rev 3543) @@ -50,7 +50,6 @@ import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.ui.home.FinancialTransactionsPane; import org.jdesktop.swingx.JXTable; import org.nuiton.util.DateUtil; @@ -123,17 +122,17 @@ FiscalPeriod fiscalPeriod = addPeriodDialog.getPeriod(); if (fiscalPeriod != null) { - //check if fiscalperiod have 12 months, ask a confirmation - int nbMonth = DateUtil.getDifferenceInMonths(fiscalPeriod.getBeginDate(), - fiscalPeriod.getEndDate()); - int response = JOptionPane.YES_OPTION; - if (nbMonth != 12) { - response = JOptionPane.showConfirmDialog(view, + //check if fiscalperiod have 12 months, ask a confirmation + int nbMonth = DateUtil.getDifferenceInMonths(fiscalPeriod.getBeginDate(), + fiscalPeriod.getEndDate()); + int response = JOptionPane.YES_OPTION; + if (nbMonth != 12) { + response = JOptionPane.showConfirmDialog(view, _("lima.ui.fiscalperiod.addfiscalperiod.morethan12"), _("lima.ui.fiscalperiod.addfiscalperiodtitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); - } - + } + if (response == JOptionPane.YES_OPTION) { fiscalPeriod = fiscalPeriodService.createFiscalPeriod(fiscalPeriod); model.addFiscalPeriod(fiscalPeriod); @@ -145,26 +144,26 @@ * Undisplay period and perform delete. */ public void deleteFiscalPeriod() { - - JXTable fiscalPeriodeTable = view.getFiscalPeriodTable(); - FiscalPeriodTableModel model = (FiscalPeriodTableModel) view.getFiscalPeriodTable().getModel(); - + + JXTable fiscalPeriodeTable = view.getFiscalPeriodTable(); + FiscalPeriodTableModel model = (FiscalPeriodTableModel) view.getFiscalPeriodTable().getModel(); + //check if the user want to delete the fiscal year int response = JOptionPane.showConfirmDialog(view, _("lima.ui.fiscalperiod.delete.confirmation"), _("lima.ui.fiscalperiod.delete.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); - + int selectedRow = fiscalPeriodeTable.getSelectedRow(); FiscalPeriod selectedFiscalPeriod = model.getFiscalPeriodAt(selectedRow); - + if (response == JOptionPane.YES_OPTION) { - fiscalPeriodService.deleteFiscalPeriod(selectedFiscalPeriod); - - model.deleteFiscalPeriod(selectedFiscalPeriod); + fiscalPeriodService.deleteFiscalPeriod(selectedFiscalPeriod); + + model.deleteFiscalPeriod(selectedFiscalPeriod); } } - + /** * Init add period view. * Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2012-07-20 11:49:46 UTC (rev 3542) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2012-07-20 12:04:34 UTC (rev 3543) @@ -22,7 +22,6 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> - <Table> <import> @@ -44,13 +43,11 @@ <LettringSelectionModel id='lettringSelectionModel' constructorParams=' tableModel' onValueChanged="handler.balanceAndActions()"/> - <script> - <![CDATA[ + <script><![CDATA[ void $afterCompleteSetup() { handler.init(); } - ]]> - </script> + ]]></script> <row> <cell anchor="center" weightx="1" columns="2"> @@ -67,13 +64,13 @@ <cell anchor="center" weightx="1" columns="2"> <JPanel id="panelAccountComboBox"> <org.chorem.lima.ui.common.AccountComboBoxModel id="accountComboBoxModel"/> - <JComboBox id="accountComboBox" model="{accountComboBoxModel}" - renderer="{new org.chorem.lima.ui.common.AccountListRenderer()}" - onActionPerformed="filterModel.setAccount((Account)accountComboBoxModel.getSelectedItem())"/> - <JButton id="backCount" text="lima.ui.account.buttonback" - onActionPerformed="handler.back(accountComboBox)"/> - <JButton id="nextCount" text="lima.ui.account.buttonnext" - onActionPerformed="handler.next(accountComboBox)"/> + <JComboBox id="accountComboBox" model="{accountComboBoxModel}" + renderer="{new org.chorem.lima.ui.common.AccountListRenderer()}" + onActionPerformed="filterModel.setAccount((Account)accountComboBoxModel.getSelectedItem())"/> + <JButton id="backCount" text="lima.ui.account.buttonback" + onActionPerformed="handler.back(accountComboBox)"/> + <JButton id="nextCount" text="lima.ui.account.buttonnext" + onActionPerformed="handler.next(accountComboBox)"/> </JPanel> </cell> <cell anchor="center" weightx="1"> @@ -97,7 +94,7 @@ onActionPerformed="filterModel.setDateEnd(pickerFin.getDate())"/> </cell> </row> - </Table> + </Table> </JPanel> </cell> <cell anchor="center" weightx="1"> @@ -183,14 +180,14 @@ </cell> </row> <row> - <cell fill="both" weightx="1" weighty="1" columns="4"> - <JScrollPane> - <LetteringTable - id="table" sortable="false" rowHeight="22" - constructorParams="getTableModel()" - selectionModel="{lettringSelectionModel}" - /> - </JScrollPane> - </cell> + <cell fill="both" weightx="1" weighty="1" columns="4"> + <JScrollPane> + <LetteringTable + id="table" sortable="false" rowHeight="22" + constructorParams="getTableModel()" + selectionModel="{lettringSelectionModel}" + /> + </JScrollPane> + </cell> </row> </Table> \ No newline at end of file
participants (1)
-
echatellier@users.chorem.org