Flag determines if an entry is
generated by the portfolio (posted automatically by
- the system during lifecycle of loan and saving
+ the system during the lifecycle of loan or saving
products) or manually created by using the Create (Balanced) Journal
Entries API
@@ -9761,7 +9751,7 @@ No Request Body:
Flag determines if portfolio generated Journal
Entries (posted automatically by the system
- during lifecycle of loan and saving products)
+ during lifecycle of loan or saving products)
shall also be returned
Set to "True" by default if not passed in explicity
@@ -9803,7 +9793,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
"glAccountName": "Something totally else",
"glAccountId": 17,
"glAccountCode": "340098",
- "glAccountClassification": {
+ "glAccountType": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
@@ -9837,7 +9827,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
"glAccountName": "Something else",
"glAccountId": 19,
"glAccountCode": "560050",
- "glAccountClassification": {
+ "glAccountType": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
@@ -9879,7 +9869,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
amounts are equal
Compound Journal entries may have "n" debits and "m"
credits where both "m" and "n" are greater than 0
- and the sum or all debits and all credits are equal
+ and the net sum or all debits and credits are equal
@@ -9901,9 +9891,9 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
in the journal entry. Each credit entry contains
the following items
glAccountId: Identifier of the general ledger
- account against which credit entry shall be
+ account against which the credit entry shall be
made
- amount: Amount of money involved in the credit
+ amount: Amount of money credited
comments: Optional description associated with
a credit entry
@@ -9918,7 +9908,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
in the journal entry. Each debit entry contains the following items
glAccountId: Identifier of the general ledger account against which the debit entry shall be
made
- amount: Amount of money involved in the debit
+ amount: Amount of money debited
comments: Optional description associated with
a debit entry
@@ -9955,7 +9945,8 @@ Request Body:
{
- "resourceId": C1MAE935K0IAEYA
+ "officeId": 1,
+ "transactionId": "DNEEMS2LPD0NJ9O"
}
@@ -9979,13 +9970,13 @@ GET https://DomainName/api/v1/journalentries/{entryId}
{
- "id": 22,
+ "id": 1,
"officeId": 2,
"officeName": "sub branch 1",
"glAccountName": "Income from interest",
"glAccountId": 14,
"glAccountCode": "400001",
- "glAccountClassification": {
+ "glAccountType": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
@@ -10024,7 +10015,8 @@ GET https://DomainName/api/v1/journalentries/{entryId}
Note: A journal entry is reversed by logging debits
for all credits that constitute the Journal entry and
- vice-versa
+ vice-versa. The transactionId of the "reversal Entry" is returned
+ as the methods response
Arguments
@@ -10045,7 +10037,7 @@ Content-Type: application/json
{
- "resourceId": C1MAE935K0IAEYA
+ "transactionId": "YFDYMPBVVI9TRJP"
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/data/GLClosureData.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/data/GLClosureData.java
index f5967dbbd..7e4339c15 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/data/GLClosureData.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/data/GLClosureData.java
@@ -61,6 +61,7 @@ public class GLClosureData {
this.lastUpdatedByUserId = lastUpdatedByUserId;
this.lastUpdatedByUsername = lastUpdatedByUsername;
this.comments = comments;
+ this.allowedOffices = null;
}
public List getAllowedOffices() {
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/domain/GLClosure.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/domain/GLClosure.java
index 2479a477e..e97bcfb5e 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/domain/GLClosure.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/domain/GLClosure.java
@@ -23,7 +23,6 @@ import org.mifosplatform.accounting.closure.api.GLClosureJsonInputParams;
import org.mifosplatform.infrastructure.core.api.JsonCommand;
import org.mifosplatform.infrastructure.core.domain.AbstractAuditableCustom;
import org.mifosplatform.organisation.office.domain.Office;
-import org.mifosplatform.portfolio.loanaccount.guarantor.GuarantorConstants.GUARANTOR_JSON_INPUT_PARAMS;
import org.mifosplatform.useradministration.domain.AppUser;
@Entity
@@ -65,7 +64,7 @@ public class GLClosure extends AbstractAuditableCustom {
public static GLClosure fromJson(Office office, final JsonCommand command) {
Date closingDate = command.DateValueOfParameterNamed(GLClosureJsonInputParams.CLOSING_DATE.getValue());
- String comments = command.stringValueOfParameterNamed(GUARANTOR_JSON_INPUT_PARAMS.COMMENT.getValue());
+ String comments = command.stringValueOfParameterNamed(GLClosureJsonInputParams.COMMENTS.getValue());
return new GLClosure(office, closingDate, comments);
}
@@ -80,9 +79,8 @@ public class GLClosure extends AbstractAuditableCustom {
if (command.isChangeInStringParameterNamed(paramName, propertyToBeUpdated)) {
final String newValue = command.stringValueOfParameterNamed(paramName);
actualChanges.put(paramName, newValue);
- propertyToBeUpdated = newValue;
// now update actual property
- if (paramName.equals(GUARANTOR_JSON_INPUT_PARAMS.COMMENT.getValue())) {
+ if (paramName.equals(GLClosureJsonInputParams.COMMENTS.getValue())) {
this.comments = newValue;
}
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java
index e9e123516..5cf49fc78 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java
@@ -102,7 +102,7 @@ public class GLClosureWritePlatformServiceJpaRepositoryImpl implements GLClosure
}
return new CommandProcessingResultBuilder().withCommandId(command.commandId()).withOfficeId(glClosure.getOffice().getId())
- .withEntityId(glClosure.getId()).build();
+ .withEntityId(glClosure.getId()).with(changesOnly).build();
}
@Transactional
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/domain/GLAccount.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/domain/GLAccount.java
index 0640f3800..15e37f218 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/domain/GLAccount.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/domain/GLAccount.java
@@ -121,8 +121,6 @@ public class GLAccount extends AbstractPersistable {
newValue = command.integerValueOfParameterNamed(paramName);
}
actualChanges.put(paramName, newValue);
- propertyToBeUpdated = newValue;
-
// now update actual property
if (paramName.equals(GLAccountJsonInputParams.TYPE.getValue())) {
this.type = newValue;
@@ -137,8 +135,6 @@ public class GLAccount extends AbstractPersistable {
if (command.isChangeInStringParameterNamed(paramName, propertyToBeUpdated)) {
final String newValue = command.stringValueOfParameterNamed(paramName);
actualChanges.put(paramName, newValue);
- propertyToBeUpdated = newValue;
-
// now update actual property
if (paramName.equals(GLAccountJsonInputParams.DESCRIPTION.getValue())) {
this.description = newValue;
@@ -155,8 +151,6 @@ public class GLAccount extends AbstractPersistable {
if (command.isChangeInLongParameterNamed(paramName, propertyToBeUpdated)) {
final Long newValue = command.longValueOfParameterNamed(paramName);
actualChanges.put(paramName, newValue);
- propertyToBeUpdated = newValue;
-
// now update actual property
if (paramName.equals(GLAccountJsonInputParams.PARENT_ID.getValue())) {
// do nothing as this is a nested property
@@ -169,8 +163,6 @@ public class GLAccount extends AbstractPersistable {
if (command.isChangeInBooleanParameterNamed(paramName, propertyToBeUpdated)) {
final Boolean newValue = command.booleanObjectValueOfParameterNamed(paramName);
actualChanges.put(paramName, newValue);
- propertyToBeUpdated = newValue;
-
// now update actual property
if (paramName.equals(GLAccountJsonInputParams.MANUAL_ENTRIES_ALLOWED.getValue())) {
this.manualEntriesAllowed = newValue;
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java
index 288431bc8..f50e84f00 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/domain/Loan.java
@@ -1106,7 +1106,7 @@ public class Loan extends AbstractAuditableCustom {
handleDisbursementTransaction(expectedDisbursedOnLocalDate);
}
- public Map deriveDisbursementData(final CurrencyData currencyData) {
+ public Map deriveDisbursementData(final CurrencyData currencyData, final List existingTransactionIds) {
final Map accountingBridgeData = new LinkedHashMap(20);
@@ -1119,7 +1119,9 @@ public class Loan extends AbstractAuditableCustom {
final List |