r2687 - in trunk/lima-main/src/main/java/org/chorem/lima: bilan table/model ui
Author: rchapelet Date: 2009-08-25 18:18:12 +0200 (Tue, 25 Aug 2009) New Revision: 2687 Modified: trunk/lima-main/src/main/java/org/chorem/lima/bilan/Bilan.java trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultChargesTableModel.java trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultProduitsTableModel.java trunk/lima-main/src/main/java/org/chorem/lima/ui/BilanViewImpl.java trunk/lima-main/src/main/java/org/chorem/lima/ui/ResultViewImpl.java Log: J'ai r?\195?\169par?\195?\169 le bilan et compte de r?\195?\169sultat. Modified: trunk/lima-main/src/main/java/org/chorem/lima/bilan/Bilan.java =================================================================== --- trunk/lima-main/src/main/java/org/chorem/lima/bilan/Bilan.java 2009-08-25 14:13:29 UTC (rev 2686) +++ trunk/lima-main/src/main/java/org/chorem/lima/bilan/Bilan.java 2009-08-25 16:18:12 UTC (rev 2687) @@ -165,11 +165,20 @@ String newNumberAccount = balance.getAccount().getIdNumber(); newNumberAccount = newNumberAccount.substring(0,1) + newNumberAccount.substring(2,newNumberAccount.length()); Bilan bilan = searchBilanWithNumberAccount(newNumberAccount); + Bilan bilanSearch = this; if (bilan != null) { bilan.setDepreciation(depreciation); + bilanSearch = bilan.getBilanMaster(); + } + /** + * Ajout de la depreciation à tous les bilans pères + */ + while ( bilanSearch!=null ) + { + bilanSearch.setDepreciation(DTOHelper.AddNumbersString(bilanSearch.getDepreciation(), depreciation)); + bilanSearch = bilanSearch.getBilanMaster(); } - this.setDepreciation(DTOHelper.AddNumbersString(this.getDepreciation(), depreciation)); } } Modified: trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultChargesTableModel.java =================================================================== --- trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultChargesTableModel.java 2009-08-25 14:13:29 UTC (rev 2686) +++ trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultChargesTableModel.java 2009-08-25 16:18:12 UTC (rev 2687) @@ -93,7 +93,7 @@ { return ""; } else { - return balance.getDebit(); + return DTOHelper.SubNumbersString(balance.getDebit(),balance.getCredit()); } } } Modified: trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultProduitsTableModel.java =================================================================== --- trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultProduitsTableModel.java 2009-08-25 14:13:29 UTC (rev 2686) +++ trunk/lima-main/src/main/java/org/chorem/lima/table/model/ResultProduitsTableModel.java 2009-08-25 16:18:12 UTC (rev 2687) @@ -93,7 +93,7 @@ { return ""; } else { - return balance.getCredit(); + return DTOHelper.SubNumbersString(balance.getCredit(),balance.getDebit()); } } } Modified: trunk/lima-main/src/main/java/org/chorem/lima/ui/BilanViewImpl.java =================================================================== --- trunk/lima-main/src/main/java/org/chorem/lima/ui/BilanViewImpl.java 2009-08-25 14:13:29 UTC (rev 2686) +++ trunk/lima-main/src/main/java/org/chorem/lima/ui/BilanViewImpl.java 2009-08-25 16:18:12 UTC (rev 2687) @@ -225,10 +225,7 @@ if ( Category.accountNumberCategory("51", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("52", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("53", balanceDTO.getAccount().getIdNumber()) || - Category.accountNumberCategory("54", balanceDTO.getAccount().getIdNumber()) || - Category.accountNumberCategory("35", balanceDTO.getAccount().getIdNumber()) || - Category.accountNumberCategory("36", balanceDTO.getAccount().getIdNumber()) || - Category.accountNumberCategory("37", balanceDTO.getAccount().getIdNumber()) ) + Category.accountNumberCategory("54", balanceDTO.getAccount().getIdNumber()) ) { actifTab.get("ACTIF_CIRCULANT_DISPONIBILITE").add(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getDebit(), balanceDTO.getCredit())); } @@ -273,8 +270,7 @@ Category.accountNumberCategory("105", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("107", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("108", balanceDTO.getAccount().getIdNumber()) || - Category.accountNumberCategory("109", balanceDTO.getAccount().getIdNumber()) || - Category.accountNumberCategory("37", balanceDTO.getAccount().getIdNumber()) ) + Category.accountNumberCategory("109", balanceDTO.getAccount().getIdNumber()) ) { passifTab.get("PASSIF_CP_CAPITAL").add(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getCredit(), balanceDTO.getDebit())); } @@ -343,7 +339,7 @@ List<BalanceDTO> listBalance = provisionMap.get("ACTIF_IMMOBILISE_INCORPOREL"); for ( BalanceDTO balanceDTO : listBalance ) { - actifTab.get("ACTIF_IMMOBILISE_INCORPOREL").addDepreciation(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getDebit(), balanceDTO.getCredit())); + actifTab.get("ACTIF_IMMOBILISE_INCORPOREL").addDepreciation(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getCredit(), balanceDTO.getDebit())); } } if ( provisionMap.get("ACTIF_IMMOBILISE_CORPOREL") != null ) @@ -351,7 +347,7 @@ List<BalanceDTO> listBalance = provisionMap.get("ACTIF_IMMOBILISE_CORPOREL"); for ( BalanceDTO balanceDTO : listBalance ) { - actifTab.get("ACTIF_IMMOBILISE_CORPOREL").addDepreciation(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getDebit(), balanceDTO.getCredit())); + actifTab.get("ACTIF_IMMOBILISE_CORPOREL").addDepreciation(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getCredit(), balanceDTO.getDebit())); } } if ( provisionMap.get("ACTIF_IMMOBILISE_FINANCIER") != null ) @@ -359,7 +355,7 @@ List<BalanceDTO> listBalance = provisionMap.get("ACTIF_IMMOBILISE_FINANCIER"); for ( BalanceDTO balanceDTO : listBalance ) { - actifTab.get("ACTIF_IMMOBILISE_FINANCIER").addDepreciation(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getDebit(), balanceDTO.getCredit())); + actifTab.get("ACTIF_IMMOBILISE_FINANCIER").addDepreciation(balanceDTO,DTOHelper.SubNumbersString(balanceDTO.getCredit(), balanceDTO.getDebit())); } } @@ -372,7 +368,7 @@ listActif.add(actifTab.get("ACTIF_IMMOBILISE_INCORPOREL")); listActif.add(actifTab.get("ACTIF_IMMOBILISE_CORPOREL")); listActif.add(actifTab.get("ACTIF_IMMOBILISE_FINANCIER")); - listActif.add(new Bilan("SOUS-TOTAL (1)","soustotal",actifTab.get("ACTIF_IMMOBILISE").getTotal(),"0")); + listActif.add(new Bilan("SOUS-TOTAL (1)","soustotal",actifTab.get("ACTIF_IMMOBILISE").getTotal(),actifTab.get("ACTIF_IMMOBILISE").getDepreciation())); listActif.add(actifTab.get("ACTIF_CIRCULANT")); listActif.add(actifTab.get("ACTIF_CIRCULANT_STOCK")); listActif.add(actifTab.get("ACTIF_CIRCULANT_AVANCES")); @@ -380,7 +376,7 @@ listActif.add(actifTab.get("ACTIF_CIRCULANT_VMP")); listActif.add(actifTab.get("ACTIF_CIRCULANT_DISPONIBILITE")); listActif.add(actifTab.get("ACTIF_CIRCULANT_CCA")); - listActif.add(new Bilan("SOUS-TOTAL (2)","soustotal",actifTab.get("ACTIF_CIRCULANT").getTotal(),"0")); + listActif.add(new Bilan("SOUS-TOTAL (2)","soustotal",actifTab.get("ACTIF_CIRCULANT").getTotal(),actifTab.get("ACTIF_CIRCULANT").getDepreciation())); listActif.add(actifTab.get("ACTIF")); // Création du modèle à partir de la liste précédement créée Modified: trunk/lima-main/src/main/java/org/chorem/lima/ui/ResultViewImpl.java =================================================================== --- trunk/lima-main/src/main/java/org/chorem/lima/ui/ResultViewImpl.java 2009-08-25 14:13:29 UTC (rev 2686) +++ trunk/lima-main/src/main/java/org/chorem/lima/ui/ResultViewImpl.java 2009-08-25 16:18:12 UTC (rev 2687) @@ -30,13 +30,11 @@ import org.chorem.lima.table.ResultProduitsJXTable; import org.chorem.lima.table.model.ResultChargesTableModel; import org.chorem.lima.table.model.ResultProduitsTableModel; -import org.chorem.lima.table.renderer.ResultTableCellRenderer; import org.chorem.lima.util.Util; import static org.nuiton.i18n.I18n._; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.jdesktop.swingx.decorator.HighlighterFactory; import org.jdesktop.swingx.JXTable; import javax.swing.table.DefaultTableModel; import javax.swing.*; @@ -239,28 +237,28 @@ ) { chargeTab.get("exploitation").add(balanceDTO); - totalCharges = DTOHelper.AddNumbersString(totalCharges, balanceDTO.getDebit()); + totalCharges = DTOHelper.AddNumbersString(totalCharges, DTOHelper.SubNumbersString(balanceDTO.getDebit(),balanceDTO.getCredit())); } // Financières if ( Category.accountNumberCategory("66", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("686", balanceDTO.getAccount().getIdNumber()) ) { chargeTab.get("financier").add(balanceDTO); - totalCharges = DTOHelper.AddNumbersString(totalCharges, balanceDTO.getDebit()); + totalCharges = DTOHelper.AddNumbersString(totalCharges, DTOHelper.SubNumbersString(balanceDTO.getDebit(),balanceDTO.getCredit())); } // Exceptionnelles if ( Category.accountNumberCategory("67", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("687", balanceDTO.getAccount().getIdNumber()) ) { chargeTab.get("exceptionnel").add(balanceDTO); - totalCharges = DTOHelper.AddNumbersString(totalCharges, balanceDTO.getDebit()); + totalCharges = DTOHelper.AddNumbersString(totalCharges, DTOHelper.SubNumbersString(balanceDTO.getDebit(),balanceDTO.getCredit())); } // Autres if ( Category.accountNumberCategory("691", balanceDTO.getAccount().getIdNumber()) || Category.accountNumberCategory("695", balanceDTO.getAccount().getIdNumber()) ) { chargeTab.get("autres").add(balanceDTO); - totalCharges = DTOHelper.AddNumbersString(totalCharges, balanceDTO.getDebit()); + totalCharges = DTOHelper.AddNumbersString(totalCharges, DTOHelper.SubNumbersString(balanceDTO.getDebit(),balanceDTO.getCredit())); } /** * PRODUIT @@ -277,7 +275,7 @@ ) { produitTab.get("exploitation").add(balanceDTO); - totalProduits = DTOHelper.AddNumbersString(totalProduits, balanceDTO.getCredit()); + totalProduits = DTOHelper.AddNumbersString(totalProduits, DTOHelper.SubNumbersString(balanceDTO.getCredit(),balanceDTO.getDebit())); } // Financières if ( Category.accountNumberCategory("76", balanceDTO.getAccount().getIdNumber()) || @@ -285,7 +283,7 @@ Category.accountNumberCategory("796", balanceDTO.getAccount().getIdNumber()) ) { produitTab.get("financier").add(balanceDTO); - totalProduits = DTOHelper.AddNumbersString(totalProduits, balanceDTO.getCredit()); + totalProduits = DTOHelper.AddNumbersString(totalProduits, DTOHelper.SubNumbersString(balanceDTO.getCredit(),balanceDTO.getDebit())); } // Exceptionnelles if ( Category.accountNumberCategory("77", balanceDTO.getAccount().getIdNumber()) || @@ -293,7 +291,7 @@ Category.accountNumberCategory("797", balanceDTO.getAccount().getIdNumber()) ) { produitTab.get("exceptionnel").add(balanceDTO); - totalProduits = DTOHelper.AddNumbersString(totalProduits, balanceDTO.getCredit()); + totalProduits = DTOHelper.AddNumbersString(totalProduits, DTOHelper.SubNumbersString(balanceDTO.getCredit(),balanceDTO.getDebit())); } }
participants (1)
-
rchapelet@users.chorem.org