From ff2aae4a161ff3174364862452aa40945030d0e8 Mon Sep 17 00:00:00 2001 From: Sander van der Heyden Date: Thu, 31 Oct 2013 16:55:23 +0100 Subject: [PATCH] MIFOSX-764 - Fixed default ordering of journal entries to make sure running balances add up --- .../service/JournalEntryReadPlatformServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java index d133d9678..6bc1e31fe 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java @@ -175,6 +175,10 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat sqlBuilder.append(' ').append(searchParameters.getSortOrder()); } } + else + { + sqlBuilder.append(" order by journalEntry.entry_date, journalEntry.id"); + } if (searchParameters.isLimited()) { sqlBuilder.append(" limit ").append(searchParameters.getLimit());