r3646 - in trunk/lima-swing/src/main/java/org/chorem/lima/ui: financialtransaction financialtransactionsearch financialtransactionunbalanced lettering
Author: tchemit Date: 2012-09-18 17:51:37 +0200 (Tue, 18 Sep 2012) New Revision: 3646 Url: http://chorem.org/repositories/revision/lima/3646 Log: refs #810: Patch affichage du nom de compte Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-09-18 15:41:42 UTC (rev 3645) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-09-18 15:51:37 UTC (rev 3646) @@ -150,6 +150,7 @@ Object result = transactionAndEntries.get(row); if (result instanceof FinancialTransaction) { + // Transaction "header" line FinancialTransaction currentRow = (FinancialTransaction) result; BigDecimal amountDebit = currentRow.getAmountDebit(); BigDecimal amountCredit = currentRow.getAmountCredit(); @@ -178,6 +179,7 @@ break; } } else if (result instanceof Entry) { + // Transaction content line Entry currentEntry = (Entry) result; switch (column) { @@ -189,7 +191,9 @@ break; case 2: // account if (currentEntry.getAccount() != null) { - result = currentEntry.getAccount().getAccountNumber(); + Account acc = currentEntry.getAccount(); + result = acc.getAccountNumber() + " - " + + acc.getLabel(); } else { result = null; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-09-18 15:41:42 UTC (rev 3645) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-09-18 15:51:37 UTC (rev 3646) @@ -281,7 +281,9 @@ break; case 3: // account if (currentEntry.getAccount() != null) { - result = currentEntry.getAccount().getAccountNumber(); + Account acc = currentEntry.getAccount(); + result = acc.getAccountNumber() + " - " + + acc.getLabel(); } else { result = null; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-09-18 15:41:42 UTC (rev 3645) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-09-18 15:51:37 UTC (rev 3646) @@ -216,6 +216,7 @@ result = cacheDataList.get(row); if (result instanceof FinancialTransaction) { + // Values for a transaction "header" FinancialTransaction currentRow = (FinancialTransaction) result; BigDecimal amountDebit = currentRow.getAmountDebit(); BigDecimal amountCredit = currentRow.getAmountCredit(); @@ -254,12 +255,13 @@ break; } } else if (result instanceof Entry) { + // Values for transaction content Entry currentEntry = (Entry) result; switch (column) { case 0: - result = null; // date + result = null; // date, set in header break; - case 1: // entry book + case 1: // entry book, set in header result = null; break; case 2: @@ -267,7 +269,9 @@ break; case 3: // account if (currentEntry.getAccount() != null) { - result = currentEntry.getAccount().getAccountNumber(); + Account acc = currentEntry.getAccount(); + result = acc.getAccountNumber() + " - " + + acc.getLabel(); } else { result = null; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-09-18 15:41:42 UTC (rev 3645) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-09-18 15:51:37 UTC (rev 3646) @@ -189,7 +189,9 @@ result = datesEntree.get(row); // date break; case 1: - result = currentEntry.getAccount().getAccountNumber(); + Account acc = currentEntry.getAccount(); + result = acc.getAccountNumber() + " - " + + acc.getLabel(); break; case 2: result = currentEntry.getVoucher();
participants (1)
-
tchemit@users.chorem.org