Merge branch 'master' into develop

This commit is contained in:
Vishwas Babu A J
2013-12-29 22:06:21 +05:30
7 changed files with 38 additions and 9 deletions
+11
View File
@@ -6,6 +6,7 @@ See VERSIONING (https://github.com/openMF/mifosx/blob/master/VERSIONING.md) for
Releases
===============
1. 29 Dec 2013 - 1.16.1.RELEASE
1. 15 Dec 2013 - 1.16.0.RELEASE
1. 12 Dec 2013 - 1.15.2.RELEASE
1. 04 Dec 2013 - 1.15.1.RELEASE
@@ -54,6 +55,16 @@ Releases
1. 05 April 2013 - 0.11.1.beta
1. 05 April 2013 - 0.11.0.beta
1.16.1.RELEASE
=============
Bug Release
Bugs
- [MIFOSX-802] - Loan life cycle is not considered in validations for loan operations
- [MIFOSX-812] - Journalentries Api is not returning currency while retrieving transactions
- [MIFOSX-825] - Timeline is not displaying while fetching the details of created centers
- [MIFOSX-830] - APIs are returning invalid commandId for all actions when maker-checker is enabled.
- [MIFOSX-834] - Reports-Loan products are not listing for currency ALL(Active Loans - Summary)
1.16.0.RELEASE
=============
+1 -1
View File
@@ -1,4 +1,4 @@
releaseVersion=1.16.0.RELEASE
releaseVersion=1.16.1.RELEASE
@@ -48,7 +48,7 @@ public class JournalEntriesApiResource {
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<String>(Arrays.asList("id", "officeId", "officeName",
"glAccountName", "glAccountId", "glAccountCode", "glAccountType", "transactionDate", "entryType", "amount", "transactionId",
"manualEntry", "entityType", "entityId", "createdByUserId", "createdDate", "createdByUserName", "comments", "reversed",
"referenceNumber"));
"referenceNumber", "currency"));
private final String resourceNameForPermission = "JOURNALENTRY";
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.joda.time.LocalDate;
import org.mifosplatform.infrastructure.core.data.EnumOptionData;
import org.mifosplatform.organisation.monetary.data.CurrencyData;
/**
* Immutable object representing a General Ledger Account
@@ -33,6 +34,8 @@ public class JournalEntryData {
private final EnumOptionData entryType;
private final BigDecimal amount;
@SuppressWarnings("unused")
private final CurrencyData currency;
@SuppressWarnings("unused")
private final String transactionId;
@SuppressWarnings("unused")
private final Boolean manualEntry;
@@ -68,7 +71,7 @@ public class JournalEntryData {
final Boolean manualEntry, final EnumOptionData entityType, final Long entityId, final Long createdByUserId,
final LocalDate createdDate, final String createdByUserName, final String comments, final Boolean reversed,
final String referenceNumber, final BigDecimal officeRunningBalance, final BigDecimal organizationRunningBalance,
final Boolean runningBalanceComputed,final TransactionDetailData transactionDetailData) {
final Boolean runningBalanceComputed,final TransactionDetailData transactionDetailData, final CurrencyData currency) {
this.id = id;
this.officeId = officeId;
this.officeName = officeName;
@@ -93,6 +96,7 @@ public class JournalEntryData {
this.organizationRunningBalance = organizationRunningBalance;
this.runningBalanceComputed = runningBalanceComputed;
this.transactionDetails = transactionDetailData;
this.currency = currency;
}
public Long getId() {
@@ -27,6 +27,7 @@ import org.mifosplatform.infrastructure.core.domain.JdbcSupport;
import org.mifosplatform.infrastructure.core.service.Page;
import org.mifosplatform.infrastructure.core.service.PaginationHelper;
import org.mifosplatform.infrastructure.core.service.RoutingDataSource;
import org.mifosplatform.organisation.monetary.data.CurrencyData;
import org.mifosplatform.portfolio.group.service.SearchParameters;
import org.mifosplatform.portfolio.note.data.NoteData;
import org.mifosplatform.portfolio.paymentdetail.data.PaymentDetailData;
@@ -71,7 +72,9 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
.append(" journalEntry.type_enum as entryType,journalEntry.amount as amount, journalEntry.transaction_id as transactionId,")
.append(" journalEntry.entity_type_enum as entityType, journalEntry.entity_id as entityId, creatingUser.id as createdByUserId, ")
.append(" creatingUser.username as createdByUserName, journalEntry.description as comments, ")
.append(" journalEntry.created_date as createdDate, journalEntry.reversed as reversed ");
.append(" journalEntry.created_date as createdDate, journalEntry.reversed as reversed, ")
.append(" journalEntry.currency_code as currencyCode, curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, ")
.append(" curr.display_symbol as currencyDisplaySymbol, curr.decimal_places as currencyDigits, curr.currency_multiplesof as inMultiplesOf ");
if(associationParametersData.isRunningBalanceRequired()){
sb.append(" ,journalEntry.is_running_balance_caculated as runningBalanceComputed, ")
.append(" journalEntry.office_running_balance as officeRunningBalance, ")
@@ -91,7 +94,8 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
sb.append(" from acc_gl_journal_entry as journalEntry ")
.append(" left join acc_gl_account as glAccount on glAccount.id = journalEntry.account_id")
.append(" left join m_office as office on office.id = journalEntry.office_id")
.append(" left join m_appuser as creatingUser on creatingUser.id = journalEntry.createdby_id ");
.append(" left join m_appuser as creatingUser on creatingUser.id = journalEntry.createdby_id ")
.append(" join m_currency curr on curr.code = journalEntry.currency_code ");
if(associationParametersData.isTransactionDetailsRequired()){
sb.append(" left join m_loan_transaction as lt on journalEntry.loan_transaction_id = lt.id ")
.append(" left join m_savings_account_transaction as st on journalEntry.savings_transaction_id = st.id ")
@@ -136,6 +140,16 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
BigDecimal officeRunningBalance = null;
BigDecimal organizationRunningBalance =null;
Boolean runningBalanceComputed =null;
final String currencyCode = rs.getString("currencyCode");
final String currencyName = rs.getString("currencyName");
final String currencyNameCode = rs.getString("currencyNameCode");
final String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol");
final Integer currencyDigits = JdbcSupport.getInteger(rs, "currencyDigits");
final Integer inMultiplesOf = JdbcSupport.getInteger(rs, "inMultiplesOf");
final CurrencyData currency = new CurrencyData(currencyCode, currencyName, currencyDigits, inMultiplesOf,
currencyDisplaySymbol, currencyNameCode);
if(associationParametersData.isRunningBalanceRequired()){
officeRunningBalance = rs.getBigDecimal("officeRunningBalance");
organizationRunningBalance = rs.getBigDecimal("organizationRunningBalance");
@@ -171,7 +185,7 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
}
return new JournalEntryData(id, officeId, officeName, glAccountName, glAccountId, glCode, accountType, transactionDate,
entryType, amount, transactionId, manualEntry, entityType, entityId, createdByUserId, createdDate, createdByUserName,
comments, reversed, referenceNumber,officeRunningBalance,organizationRunningBalance,runningBalanceComputed,transactionDetailData);
comments, reversed, referenceNumber,officeRunningBalance,organizationRunningBalance,runningBalanceComputed,transactionDetailData, currency);
}
}
@@ -268,7 +268,7 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
final EnumOptionData entryType = AccountingEnumerations.journalEntryType(entryTypeId);
return new JournalEntryData(id, officeId, null, null, glAccountId, null, accountType, null, entryType, amount, null, null,
null, null, null, null, null, null, null, null, null, null, null,null);
null, null, null, null, null, null, null, null, null, null, null,null, null);
}
}
@@ -93,10 +93,10 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer
@Transactional
@Override
public CommandProcessingResult logCommand(final CommandSource commandSourceResult) {
public CommandProcessingResult logCommand(CommandSource commandSourceResult) {
commandSourceResult.markAsAwaitingApproval();
this.commandSourceRepository.save(commandSourceResult);
commandSourceResult = this.commandSourceRepository.save(commandSourceResult);
return new CommandProcessingResultBuilder().withCommandId(commandSourceResult.getId())
.withEntityId(commandSourceResult.getResourceId()).build();