fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From av...@apache.org
Subject [15/19] fineract git commit: all modules populate & import
Date Wed, 13 Dec 2017 09:03:28 GMT
http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java
index d0752a3..95522eb 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsAccountHelper.java
@@ -18,6 +18,10 @@
  */
 package org.apache.fineract.integrationtests.common.savings;
 
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -27,12 +31,17 @@ import java.util.Locale;
 
 import org.apache.fineract.integrationtests.common.CommonConstants;
 import org.apache.fineract.integrationtests.common.Utils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.junit.Assert;
 
 import com.google.gson.Gson;
 import com.jayway.restassured.specification.RequestSpecification;
 import com.jayway.restassured.specification.ResponseSpecification;
 
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+
 @SuppressWarnings({ "rawtypes" })
 public class SavingsAccountHelper {
 
@@ -642,4 +651,28 @@ public class SavingsAccountHelper {
         datatablesListMap.add(datatableMap);
         return datatablesListMap;
     }
+
+    public Workbook getSavingsWorkbook(String dateFormat) throws IOException {
+        requestSpec.header(HttpHeaders.CONTENT_TYPE,"application/vnd.ms-excel");
+        byte[] byteArray=Utils.performGetBinaryResponse(requestSpec,responseSpec,SAVINGS_ACCOUNT_URL+"/downloadtemplate"+"?"+
+                Utils.TENANT_IDENTIFIER+"&dateFormat="+dateFormat);
+        InputStream inputStream= new ByteArrayInputStream(byteArray);
+        Workbook workbook=new HSSFWorkbook(inputStream);
+        return workbook;
+    }
+
+    public String importSavingsTemplate(File file) {
+        String locale="en";
+        String dateFormat="dd MMMM yyyy";
+        String legalFormType= null;
+        requestSpec.header(HttpHeaders.CONTENT_TYPE, MediaType.MULTIPART_FORM_DATA);
+        return Utils.performServerTemplatePost(requestSpec,responseSpec,SAVINGS_ACCOUNT_URL+"/uploadtemplate"+"?"+Utils.TENANT_IDENTIFIER,
+                legalFormType,file,locale,dateFormat);
+    }
+
+    public String getOutputTemplateLocation(final String importDocumentId){
+        requestSpec.header(HttpHeaders.CONTENT_TYPE,MediaType.TEXT_PLAIN);
+        return Utils.performServerOutputTemplateLocationGet(requestSpec,responseSpec,"/fineract-provider/api/v1/imports/getOutputTemplateLocation"+"?"
+                +Utils.TENANT_IDENTIFIER,importDocumentId);
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java
index 929e49e..a9269ef 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/savings/SavingsProductHelper.java
@@ -60,7 +60,7 @@ public class SavingsProductHelper {
     private String nameOfSavingsProduct = Utils.randomNameGenerator("SAVINGS_PRODUCT_", 6);
     private String shortName = Utils.randomNameGenerator("", 4);
     private String description = Utils.randomNameGenerator("", 20);
-    private String interestCompoundingPeriodType = "2";
+    private String interestCompoundingPeriodType = "4";
     private String interestPostingPeriodType = "4";
     private String interestCalculationType = INTEREST_CALCULATION_USING_DAILY_BALANCE;
     private String nominalAnnualInterestRate = "10.0";

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java
index 6139114..5e3be9d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java
@@ -18,6 +18,7 @@
  */
 package org.apache.fineract.accounting.glaccount.api;
 
+import java.io.InputStream;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
@@ -35,8 +36,11 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
+import com.sun.jersey.core.header.FormDataContentDisposition;
+import com.sun.jersey.multipart.FormDataParam;
 import org.apache.fineract.accounting.common.AccountingConstants;
 import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService;
 import org.apache.fineract.accounting.glaccount.data.GLAccountData;
@@ -46,6 +50,9 @@ import org.apache.fineract.accounting.journalentry.data.JournalEntryAssociationP
 import org.apache.fineract.commands.domain.CommandWrapper;
 import org.apache.fineract.commands.service.CommandWrapperBuilder;
 import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
+import org.apache.fineract.infrastructure.bulkimport.data.GlobalEntityType;
+import org.apache.fineract.infrastructure.bulkimport.service.BulkImportWorkbookPopulatorService;
+import org.apache.fineract.infrastructure.bulkimport.service.BulkImportWorkbookService;
 import org.apache.fineract.infrastructure.codes.data.CodeValueData;
 import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
 import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
@@ -78,13 +85,19 @@ public class GLAccountsApiResource {
     private final PlatformSecurityContext context;
     private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
     private final CodeValueReadPlatformService codeValueReadPlatformService;
+    private final BulkImportWorkbookService bulkImportWorkbookService;
+    private final BulkImportWorkbookPopulatorService bulkImportWorkbookPopulatorService;
+
+
 
     @Autowired
     public GLAccountsApiResource(final PlatformSecurityContext context, final GLAccountReadPlatformService glAccountReadPlatformService,
             final DefaultToApiJsonSerializer<GLAccountData> toApiJsonSerializer, final ApiRequestParameterHelper apiRequestParameterHelper,
             final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService,
             final AccountingDropdownReadPlatformService dropdownReadPlatformService,
-            final CodeValueReadPlatformService codeValueReadPlatformService) {
+            final CodeValueReadPlatformService codeValueReadPlatformService,
+            final BulkImportWorkbookService bulkImportWorkbookService,
+            final BulkImportWorkbookPopulatorService bulkImportWorkbookPopulatorService) {
         this.context = context;
         this.apiRequestParameterHelper = apiRequestParameterHelper;
         this.commandsSourceWritePlatformService = commandsSourceWritePlatformService;
@@ -92,6 +105,8 @@ public class GLAccountsApiResource {
         this.glAccountReadPlatformService = glAccountReadPlatformService;
         this.dropdownReadPlatformService = dropdownReadPlatformService;
         this.codeValueReadPlatformService = codeValueReadPlatformService;
+        this.bulkImportWorkbookService=bulkImportWorkbookService;
+        this.bulkImportWorkbookPopulatorService=bulkImportWorkbookPopulatorService;
     }
 
     @GET
@@ -219,4 +234,22 @@ public class GLAccountsApiResource {
         }
         return returnList;
     }
+
+    @GET
+    @Path("downloadtemplate")
+    @Produces("application/vnd.ms-excel")
+    public Response getGlAccountsTemplate(@QueryParam("dateFormat") final String dateFormat) {
+        return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.CHART_OF_ACCOUNTS.toString(),null,null,dateFormat);
+    }
+
+    @POST
+    @Path("uploadtemplate")
+    @Consumes(MediaType.MULTIPART_FORM_DATA)
+    public String postGlAccountsTemplate(@FormDataParam("file") InputStream uploadedInputStream,
+            @FormDataParam("file") FormDataContentDisposition fileDetail,
+            @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat){
+        Long importDocumentId= bulkImportWorkbookService.importWorkbook(GlobalEntityType.CHART_OF_ACCOUNTS.toString(), uploadedInputStream,fileDetail,
+                locale,dateFormat);
+        return this.apiJsonSerializerService.serialize(importDocumentId);
+    }
 }

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java
index aec2245..63acf2a 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java
@@ -62,6 +62,55 @@ public class GLAccountData {
     final Collection<CodeValueData> allowedIncomeTagOptions;
     final Collection<CodeValueData> allowedExpensesTagOptions;
 
+    //import fields
+    private transient Integer rowIndex;
+
+    public static GLAccountData importInstance(String name, Long parentId, String glCode, Boolean manualEntriesAllowed,
+            EnumOptionData type, EnumOptionData usage, String description, CodeValueData tagId,
+            Integer rowIndex){
+        return new GLAccountData(name,parentId,glCode,manualEntriesAllowed,type,
+                usage,description,tagId,rowIndex);
+    }
+
+    private GLAccountData(String name, Long parentId, String glCode, Boolean manualEntriesAllowed,
+            EnumOptionData type, EnumOptionData usage, String description, CodeValueData tagId,
+            Integer rowIndex) {
+
+        this.name = name;
+        this.parentId = parentId;
+        this.glCode = glCode;
+        this.manualEntriesAllowed = manualEntriesAllowed;
+        this.type = type;
+        this.usage = usage;
+        this.description = description;
+        this.tagId = tagId;
+        this.rowIndex = rowIndex;
+        this.id = null;
+        this.disabled = null;
+        this.nameDecorated = null;
+        this.organizationRunningBalance = null;
+        this.accountTypeOptions = null;
+        this.usageOptions = null;
+        this.assetHeaderAccountOptions = null;
+        this.liabilityHeaderAccountOptions = null;
+        this.equityHeaderAccountOptions = null;
+        this.incomeHeaderAccountOptions = null;
+        this.expenseHeaderAccountOptions = null;
+        this.allowedAssetsTagOptions = null;
+        this.allowedLiabilitiesTagOptions = null;
+        this.allowedEquityTagOptions = null;
+        this.allowedIncomeTagOptions = null;
+        this.allowedExpensesTagOptions = null;
+    }
+
+    public Integer getRowIndex() {
+        return rowIndex;
+    }
+
+    public CodeValueData getTagId() {
+        return tagId;
+    }
+
     public GLAccountData(final Long id, final String name, final Long parentId, final String glCode, final boolean disabled,
             final boolean manualEntriesAllowed, final EnumOptionData type, final EnumOptionData usage, final String description,
             final String nameDecorated, final CodeValueData tagId, final Long organizationRunningBalance) {
@@ -195,4 +244,5 @@ public class GLAccountData {
         return null;
     }
 
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java
index b9cf002..438faf6 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java
@@ -18,6 +18,8 @@
  */
 package org.apache.fineract.accounting.glaccount.domain;
 
+import org.apache.fineract.infrastructure.core.data.EnumOptionData;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -60,6 +62,27 @@ public enum GLAccountType {
             i = i + 1;
         }
     }
+    public static EnumOptionData fromString(String accountType){
+        Long accountTypeId=null;
+        if (accountType!=null && accountType.equalsIgnoreCase(ASSET.toString())){
+            accountTypeId=1L;
+            return new EnumOptionData(accountTypeId,null,null);
+        }else if(accountType!=null && accountType.equalsIgnoreCase(LIABILITY.toString())) {
+            accountTypeId = 2L;
+            return new EnumOptionData(accountTypeId, null, null);
+        }else if(accountType!=null && accountType.equalsIgnoreCase(EQUITY.toString())){
+            accountTypeId=3L;
+            return new EnumOptionData(accountTypeId,null,null);
+        }else if(accountType!=null && accountType.equalsIgnoreCase(INCOME.toString())) {
+            accountTypeId = 4L;
+            return new EnumOptionData(accountTypeId, null, null);
+        }else if(accountType!=null && accountType.equalsIgnoreCase(EXPENSE.toString())){
+            accountTypeId=5L;
+            return new EnumOptionData(accountTypeId,null,null);
+        }else {
+            return null;
+        }
+    }
 
     public static GLAccountType fromInt(final int i) {
         final GLAccountType type = intToEnumMap.get(Integer.valueOf(i));

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java
index 4c00869..c8b235c 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java
@@ -123,11 +123,13 @@ public class GLAccountReadPlatformServiceImpl implements GLAccountReadPlatformSe
         final GLAccountMapper rm = new GLAccountMapper(associationParametersData);
         String sql = "select " + rm.schema();
         // append SQL statement for fetching account totals
-        if (associationParametersData.isRunningBalanceRequired()) {
-            sql = sql + " and gl_j.id in (select t1.id from (select t2.account_id, max(t2.id) as id from "
-                    + "(select id, max(entry_date) as entry_date, account_id from acc_gl_journal_entry where is_running_balance_calculated = 1 "
-                    + "group by account_id desc) t3 inner join acc_gl_journal_entry t2 on t2.account_id = t3.account_id and t2.entry_date = t3.entry_date "
-                    + "group by t2.account_id desc) t1)";
+        if (associationParametersData!=null) {
+            if (associationParametersData.isRunningBalanceRequired()) {
+                sql = sql + " and gl_j.id in (select t1.id from (select t2.account_id, max(t2.id) as id from "
+                        + "(select id, max(entry_date) as entry_date, account_id from acc_gl_journal_entry where is_running_balance_calculated = 1 "
+                        + "group by account_id desc) t3 inner join acc_gl_journal_entry t2 on t2.account_id = t3.account_id and t2.entry_date = t3.entry_date "
+                        + "group by t2.account_id desc) t1)";
+            }
         }
         final Object[] paramaterArray = new Object[3];
         int arrayPos = 0;

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
index 9e66b0b..afc6405 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
@@ -18,6 +18,7 @@
  */
 package org.apache.fineract.accounting.journalentry.api;
 
+import java.io.InputStream;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.HashSet;
@@ -32,8 +33,11 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
+import com.sun.jersey.core.header.FormDataContentDisposition;
+import com.sun.jersey.multipart.FormDataParam;
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.accounting.journalentry.data.JournalEntryAssociationParametersData;
 import org.apache.fineract.accounting.journalentry.data.JournalEntryData;
@@ -43,6 +47,9 @@ import org.apache.fineract.accounting.producttoaccountmapping.domain.PortfolioPr
 import org.apache.fineract.commands.domain.CommandWrapper;
 import org.apache.fineract.commands.service.CommandWrapperBuilder;
 import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
+import org.apache.fineract.infrastructure.bulkimport.data.GlobalEntityType;
+import org.apache.fineract.infrastructure.bulkimport.service.BulkImportWorkbookPopulatorService;
+import org.apache.fineract.infrastructure.bulkimport.service.BulkImportWorkbookService;
 import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
 import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException;
@@ -72,17 +79,24 @@ public class JournalEntriesApiResource {
     private final ApiRequestParameterHelper apiRequestParameterHelper;
     private final PlatformSecurityContext context;
     private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
+    private final BulkImportWorkbookService bulkImportWorkbookService;
+    private final BulkImportWorkbookPopulatorService bulkImportWorkbookPopulatorService;
+
 
     @Autowired
     public JournalEntriesApiResource(final PlatformSecurityContext context,
             final JournalEntryReadPlatformService journalEntryReadPlatformService,
             final DefaultToApiJsonSerializer<Object> toApiJsonSerializer, final ApiRequestParameterHelper apiRequestParameterHelper,
-            final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService) {
+            final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService,
+            final BulkImportWorkbookService bulkImportWorkbookService,
+            final BulkImportWorkbookPopulatorService bulkImportWorkbookPopulatorService) {
         this.context = context;
         this.apiRequestParameterHelper = apiRequestParameterHelper;
         this.commandsSourceWritePlatformService = commandsSourceWritePlatformService;
         this.apiJsonSerializerService = toApiJsonSerializer;
         this.journalEntryReadPlatformService = journalEntryReadPlatformService;
+        this.bulkImportWorkbookService=bulkImportWorkbookService;
+        this.bulkImportWorkbookPopulatorService=bulkImportWorkbookPopulatorService;
     }
 
     @GET
@@ -208,4 +222,25 @@ public class JournalEntriesApiResource {
     private boolean is(final String commandParam, final String commandValue) {
         return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue);
     }
+
+    @GET
+    @Path("downloadtemplate")
+    @Produces("application/vnd.ms-excel")
+    public Response getJournalEntriesTemplate(@QueryParam("officeId") final Long officeId,
+            @QueryParam("dateFormat") final String dateFormat) {
+        return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.GL_JOURNAL_ENTRIES.toString(),
+                officeId,null,dateFormat);
+    }
+
+    @POST
+    @Path("uploadtemplate")
+    @Consumes(MediaType.MULTIPART_FORM_DATA)
+    public String postJournalEntriesTemplate(@FormDataParam("file") InputStream uploadedInputStream,
+            @FormDataParam("file") FormDataContentDisposition fileDetail,
+            @FormDataParam("locale") final String locale,
+            @FormDataParam("dateFormat") final String dateFormat){
+        final Long importDocumentId =this.bulkImportWorkbookService.importWorkbook(GlobalEntityType.GL_JOURNAL_ENTRIES.toString(),
+                uploadedInputStream,fileDetail, locale,dateFormat);
+        return this.apiJsonSerializerService.serialize(importDocumentId);
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java
new file mode 100644
index 0000000..0be9f1a
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.accounting.journalentry.data;
+
+import java.math.BigDecimal;
+
+public class CreditDebit {
+    private final Long glAccountId;
+    private final BigDecimal amount;
+
+    public CreditDebit(Long glAccountId, BigDecimal amount) {
+        this.glAccountId = glAccountId;
+        this.amount = amount;
+    }
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java
index b6bb15d..4c67d99 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java
@@ -19,8 +19,10 @@
 package org.apache.fineract.accounting.journalentry.data;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 import org.apache.fineract.accounting.glaccount.data.GLAccountData;
+import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants;
 import org.apache.fineract.infrastructure.core.data.EnumOptionData;
 import org.apache.fineract.organisation.monetary.data.CurrencyData;
 import org.joda.time.LocalDate;
@@ -78,6 +80,91 @@ public class JournalEntryData {
     @SuppressWarnings("unused")
     private final TransactionDetailData transactionDetails;
 
+    //import fields
+    private transient Integer rowIndex;
+    private String dateFormat;
+    private String locale;
+    private List<CreditDebit> credits;
+    private List<CreditDebit> debits;
+    private Long paymentTypeId;
+    private String currencyCode;
+    private String accountNumber;
+    private String checkNumber;
+    private String routingCode;
+    private String receiptNumber;
+    private String bankNumber;
+
+    public static JournalEntryData importInstance(Long officeId,LocalDate transactionDate,String currencyCode, Long paymentTypeId,
+            Integer rowIndex,List<CreditDebit> credits, List<CreditDebit>debits,
+            String accountNumber,String checkNumber,String routingCode,String receiptNumber,String bankNumber,
+            String comments,String locale,String dateFormat){
+        return new JournalEntryData(officeId, transactionDate, currencyCode,
+                paymentTypeId, rowIndex, credits, debits,accountNumber,checkNumber,routingCode,
+                receiptNumber,bankNumber,comments,locale,dateFormat);
+    }
+    private JournalEntryData(Long officeId,LocalDate transactionDate,String currencyCode, Long paymentTypeId,
+            Integer rowIndex,List<CreditDebit> credits, List<CreditDebit>debits,
+            String accountNumber,String checkNumber,String routingCode,String receiptNumber,
+            String bankNumber,String comments,String locale,String dateFormat) {
+
+        this.officeId = officeId;
+        this.dateFormat= dateFormat;
+        this.locale= locale;
+        this.transactionDate = transactionDate;
+        this.currencyCode=currencyCode;
+        this.rowIndex = rowIndex;
+        this.credits = credits;
+        this.debits = debits;
+        this.paymentTypeId = paymentTypeId;
+        this.accountNumber=accountNumber;
+        this.checkNumber=checkNumber;
+        this.routingCode=routingCode;
+        this.receiptNumber=receiptNumber;
+        this.bankNumber=bankNumber;
+        this.comments=comments;
+        this.id = null;
+        this.officeName = null;
+        this.glAccountName = null;
+        this.glAccountId = null;
+        this.glAccountCode = null;
+        this.glAccountType = null;
+        this.entryType = null;
+        this.amount = null;
+        this.currency = null;
+        this.transactionId = null;
+        this.manualEntry = null;
+        this.entityType = null;
+        this.entityId = null;
+        this.createdByUserId = null;
+        this.createdDate = null;
+        this.createdByUserName = null;
+        this.reversed = null;
+        this.referenceNumber = null;
+        this.officeRunningBalance = null;
+        this.organizationRunningBalance = null;
+        this.runningBalanceComputed = null;
+        this.transactionDetails = null;
+    }
+
+    public Integer getRowIndex() {
+        return rowIndex;
+    }
+
+    public LocalDate getTransactionDate() {
+        return transactionDate;
+    }
+
+    public void addDebits(CreditDebit debit) {
+
+        this.debits.add(debit);
+    }
+
+
+
+    public void addCredits(CreditDebit credit) {
+        this.credits.add(credit);
+    }
+
     public JournalEntryData(final Long id, final Long officeId, final String officeName, final String glAccountName,
             final Long glAccountId, final String glAccountCode, final EnumOptionData glAccountClassification,
             final LocalDate transactionDate, final EnumOptionData entryType, final BigDecimal amount, final String transactionId,

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java
new file mode 100644
index 0000000..854ea79
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java
@@ -0,0 +1,114 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.api;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.fineract.infrastructure.bulkimport.data.GlobalEntityType;
+import org.apache.fineract.infrastructure.bulkimport.data.ImportData;
+import org.apache.fineract.infrastructure.bulkimport.exceptions.ImportTypeNotFoundException;
+import org.apache.fineract.infrastructure.bulkimport.service.BulkImportWorkbookService;
+import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
+import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
+import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
+import org.apache.fineract.infrastructure.documentmanagement.data.DocumentData;
+import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+@Path("/imports")
+@Component
+@Scope("singleton")
+public class BulkImportApiResource {
+
+    private final String resourceNameForPermissions = "IMPORT";
+
+    private final PlatformSecurityContext context;
+    private final BulkImportWorkbookService bulkImportWorkbookService;
+    private final DefaultToApiJsonSerializer<ImportData> toApiJsonSerializer;
+    private final ApiRequestParameterHelper apiRequestParameterHelper;
+
+    @Autowired
+    public BulkImportApiResource(final PlatformSecurityContext context,
+                                 final BulkImportWorkbookService bulkImportWorkbookService,
+                                 final DefaultToApiJsonSerializer<ImportData> toApiJsonSerializer,
+                                 final ApiRequestParameterHelper apiRequestParameterHelper) {
+        this.context = context;
+        this.bulkImportWorkbookService = bulkImportWorkbookService;
+        this.toApiJsonSerializer = toApiJsonSerializer;
+        this.apiRequestParameterHelper = apiRequestParameterHelper;
+    }
+
+
+    @GET
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    public String retrieveImportDocuments(@Context final UriInfo uriInfo,
+                                          @QueryParam("entityType") final String entityType) {
+
+        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);
+        Collection<ImportData> importData=new ArrayList<>();
+        if (entityType.equals(GlobalEntityType.CLIENT.getCode())){
+            final Collection<ImportData> importForClientEntity = this.bulkImportWorkbookService.getImports(GlobalEntityType.CLIENTS_ENTTTY);
+            final Collection<ImportData> importForClientPerson=this.bulkImportWorkbookService.getImports(GlobalEntityType.CLIENTS_PERSON);
+            if (importForClientEntity!=null)
+            importData.addAll(importForClientEntity);
+            if (importForClientPerson!=null)
+            importData.addAll(importForClientPerson);
+        }else {
+            final GlobalEntityType type = GlobalEntityType.fromCode(entityType);
+            if (type == null)
+                throw new ImportTypeNotFoundException(entityType);
+                importData = this.bulkImportWorkbookService.getImports(type);
+        }
+        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
+        return this.toApiJsonSerializer.serialize(settings, importData);
+    }
+
+    @GET
+    @Path("getOutputTemplateLocation")
+    public String retriveOutputTemplateLocation(@QueryParam("importDocumentId")final String importDocumentId ){
+        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);
+        final DocumentData documentData =this.bulkImportWorkbookService.getOutputTemplateLocation(importDocumentId);
+        return this.toApiJsonSerializer.serialize(documentData.fileLocation());
+    }
+
+    @GET
+    @Path("downloadOutputTemplate")
+    @Produces("application/vnd.ms-excel")
+    public Response getOutputTemplate(@QueryParam("importDocumentId") final String importDocumentId) {
+        return bulkImportWorkbookService.getOutputTemplate(importDocumentId);
+    }
+
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java
new file mode 100644
index 0000000..0072221
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class CenterConstants {
+
+    //Column indices
+    public static final int CENTER_NAME_COL = 0;//A
+    public static final int OFFICE_NAME_COL = 1;//B
+    public static final int STAFF_NAME_COL = 2;//C
+    public static final int EXTERNAL_ID_COL = 3;//D
+    public static final int ACTIVE_COL = 4;//E
+    public static final int ACTIVATION_DATE_COL = 5;//F
+    public static final int SUBMITTED_ON_DATE_COL=6;//G
+    public static final int MEETING_START_DATE_COL = 7;//H
+    public static final int IS_REPEATING_COL = 8;//I
+    public static final int FREQUENCY_COL = 9;//J
+    public static final int INTERVAL_COL = 10;//K
+    public static final int REPEATS_ON_DAY_COL = 11;//L
+    public static final int STATUS_COL = 12;//M
+    public static final int CENTER_ID_COL = 13;//N
+    public static final int FAILURE_COL = 14;//O
+    public static final int GROUP_NAMES_STARTING_COL = 15;//P
+    public static final int GROUP_NAMES_ENDING_COL = 250;//IQ
+    public static final int LOOKUP_OFFICE_NAME_COL = 251;
+    public static final int LOOKUP_OFFICE_OPENING_DATE_COL = 252;
+    public static final int LOOKUP_REPEAT_NORMAL_COL = 253;
+    public static final int LOOKUP_REPEAT_MONTHLY_COL = 254;
+    public static final int LOOKUP_IF_REPEAT_WEEKLY_COL = 255;
+
+
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAcountsConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAcountsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAcountsConstants.java
new file mode 100644
index 0000000..02255c2
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAcountsConstants.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class ChartOfAcountsConstants {
+    public static final int ACCOUNT_TYPE_COL=0;//A
+    public static final int ACCOUNT_NAME_COL=1;//B
+    public static final int ACCOUNT_USAGE_COL=2;//C
+    public static final int MANUAL_ENTRIES_ALLOWED_COL=3;//D
+    public static final int PARENT_COL=4;//E
+    public static final int PARENT_ID_COL=5;//F
+    public static final int GL_CODE_COL=6;//G
+    public static final int TAG_COL=7;//H
+    public static final int TAG_ID_COL=8;//I
+    public static final int DESCRIPTION_COL=9;//J
+    public static final int LOOKUP_ACCOUNT_TYPE_COL=15;// P
+    public static final int LOOKUP_ACCOUNT_NAME_COL=16; //Q
+    public static final int LOOKUP_ACCOUNT_ID_COL=17;//R
+    public static final int LOOKUP_TAG_COL=18;    //S
+    public static final int LOOKUP_TAG_ID_COL=19;  //T
+    public static final int STATUS_COL=20;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java
new file mode 100644
index 0000000..f8ec573
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class ClientEntityConstants {
+
+    public static final int NAME_COL = 0;//A
+    public static final int OFFICE_NAME_COL = 1;//B
+    public static final int STAFF_NAME_COL = 2;//C
+    public static final int INCOPORATION_DATE_COL = 3;//D
+    public static final int INCOPORATION_VALID_TILL_COL = 4; //E
+    public static final int MOBILE_NO_COL=5;//F
+    public static final int CLIENT_TYPE_COL=6;//G
+    public static final int CLIENT_CLASSIFICATION_COL=7;//H
+    public static final int INCOPORATION_NUMBER_COL=8;//I
+    public static final int MAIN_BUSINESS_LINE=9;//J
+    public static final int CONSTITUTION_COL=10;//K
+    public static final int REMARKS_COL=11;//L
+    public static final int EXTERNAL_ID_COL=12;//M
+    public static final int ACTIVE_COL = 13;//N
+    public static final int ACTIVATION_DATE_COL = 14;//O
+    public static final int SUBMITTED_ON_COL=15; //P
+    public static final int ADDRESS_ENABLED=16;//Q
+    public static final int ADDRESS_TYPE_COL=17;//R
+    public static final int STREET_COL=18;//S
+    public static final int ADDRESS_LINE_1_COL=19;//T
+    public static final int ADDRESS_LINE_2_COL=20;//U
+    public static final int ADDRESS_LINE_3_COL=21;//V
+    public static final int CITY_COL =22;//W
+    public static final int STATE_PROVINCE_COL=23;//X
+    public static final int COUNTRY_COL=24;//Y
+    public static final int POSTAL_CODE_COL=25;//Z
+    public static final int IS_ACTIVE_ADDRESS_COL=26;//AA
+    public static final int WARNING_COL = 26;//AA
+    public static final int STATUS_COL = 27;//AB
+    public static final int RELATIONAL_OFFICE_NAME_COL = 35;//AJ
+    public static final int RELATIONAL_OFFICE_OPENING_DATE_COL = 36;//AK
+    public static final int LOOKUP_CONSTITUTION_COL = 37;//AL
+    public static final int LOOKUP_CLIENT_CLASSIFICATION = 38;//AM
+    public static final int LOOKUP_CLIENT_TYPES = 39;//AN
+    public static final int LOOKUP_ADDRESS_TYPE = 40;//AO
+    public static final int LOOKUP_STATE_PROVINCE = 41;//AP
+    public static final int LOOKUP_COUNTRY = 42;//AQ
+    public static final int LOOKUP_MAIN_BUSINESS_LINE=43;//AR
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java
new file mode 100644
index 0000000..5da8270
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class ClientPersonConstants {
+    public static final int FIRST_NAME_COL = 0;//A
+    public static final int LAST_NAME_COL = 1;//B
+    public static final int MIDDLE_NAME_COL = 2;//C
+    public static final int OFFICE_NAME_COL = 3;//D
+    public static final int STAFF_NAME_COL = 4;//E
+    public static final int EXTERNAL_ID_COL = 5;//F
+    public static final int ACTIVE_COL = 6;//G
+    public static final int ACTIVATION_DATE_COL = 7;//H
+    public static final int SUBMITTED_ON_COL=8; //I
+    public static final int MOBILE_NO_COL=9;//J
+    public static final int DOB_COL=10;//K
+    public static final int CLIENT_TYPE_COL=11;//L
+    public static final int GENDER_COL=12;//M
+    public static final int CLIENT_CLASSIFICATION_COL=13;//N
+    public static final int IS_STAFF_COL=14;//O
+    public static final int ADDRESS_ENABLED_COL=15;// P
+    public static final int ADDRESS_TYPE_COL=16;//Q
+    public static final int STREET_COL=17;//R
+    public static final int ADDRESS_LINE_1_COL=18;//S
+    public static final int ADDRESS_LINE_2_COL=19;//T
+    public static final int ADDRESS_LINE_3_COL=20;//U
+    public static final int CITY_COL=21;//V
+    public static final int STATE_PROVINCE_COL=22;//W
+    public static final int COUNTRY_COL=23;//X
+    public static final int POSTAL_CODE_COL=24;//Y
+    public static final int IS_ACTIVE_ADDRESS_COL=25;//Z
+    public static final int WARNING_COL = 26;//AA
+    public static final int STATUS_COL = 27;//AB
+    public static final int RELATIONAL_OFFICE_NAME_COL = 35;//AJ
+    public static final int RELATIONAL_OFFICE_OPENING_DATE_COL = 36;//AK
+    public static final int LOOKUP_GENDER_COL = 37;//AL
+    public static final int LOOKUP_CLIENT_CLASSIFICATION_COL = 38;//AM
+    public static final int LOOKUP_CLIENT_TYPES_COL = 39;//AN
+    public static final int LOOKUP_ADDRESS_TYPE_COL = 40;//AO
+    public static final int LOOKUP_STATE_PROVINCE_COL = 41;//AP
+    public static final int LOOKUP_COUNTRY_COL = 42;//AQ
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java
new file mode 100644
index 0000000..d617a07
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class FixedDepositConstants {
+
+    public static final int OFFICE_NAME_COL = 0;
+    public static final int CLIENT_NAME_COL = 1;
+    public static final int PRODUCT_COL = 2;
+    public static final int FIELD_OFFICER_NAME_COL = 3;
+    public static final int SUBMITTED_ON_DATE_COL = 4;
+    public static final int APPROVED_DATE_COL = 5;
+    public static final int ACTIVATION_DATE_COL = 6;
+    public static final int INTEREST_COMPOUNDING_PERIOD_COL = 7;
+    public static final int INTEREST_POSTING_PERIOD_COL = 8;
+    public static final int INTEREST_CALCULATION_COL = 9;
+    public static final int INTEREST_CALCULATION_DAYS_IN_YEAR_COL = 10;
+    public static final int LOCKIN_PERIOD_COL = 11;
+    public static final int LOCKIN_PERIOD_FREQUENCY_COL = 12;
+    public static final int DEPOSIT_AMOUNT_COL = 13;
+    public static final int DEPOSIT_PERIOD_COL = 14;
+    public static final int DEPOSIT_PERIOD_FREQUENCY_COL = 15;
+    public static final int EXTERNAL_ID_COL = 16;
+    public static final int CHARGE_ID_1 = 18;
+    public static final int CHARGE_AMOUNT_1 = 19;
+    public static final int CHARGE_DUE_DATE_1 = 20;
+    public static final int CHARGE_ID_2 = 21;
+    public static final int CHARGE_AMOUNT_2 = 22;
+    public static final int CHARGE_DUE_DATE_2 = 23;
+    public static final int CLOSED_ON_DATE = 24;
+    public static final int ON_ACCOUNT_CLOSURE_ID = 25;
+    public static final int TO_SAVINGS_ACCOUNT_ID = 26;
+    public static final int STATUS_COL = 27;
+    public static final int SAVINGS_ID_COL = 28;
+    public static final int FAILURE_REPORT_COL = 29;
+
+    public static final int LOOKUP_CLIENT_NAME_COL = 31;
+    public static final int LOOKUP_ACTIVATION_DATE_COL = 32;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java
new file mode 100644
index 0000000..02c0326
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class GroupConstants {
+
+    public static final int NAME_COL = 0; //A
+    public static final int OFFICE_NAME_COL = 1; //B
+    public static final int STAFF_NAME_COL = 2;//C
+
+    public static final int CENTER_NAME_COL = 3;//D
+    public static final int EXTERNAL_ID_COL = 4;//E
+    public static final int ACTIVE_COL = 5;//F
+    public static final int ACTIVATION_DATE_COL = 6;//G
+    public static final int SUBMITTED_ON_DATE_COL=7;//H
+    public static final int MEETING_START_DATE_COL = 8;//I
+    public static final int IS_REPEATING_COL = 9;//J
+    public static final int FREQUENCY_COL = 10;//K
+    public static final int INTERVAL_COL = 11;//L
+    public static final int REPEATS_ON_DAY_COL = 12;//M
+    public static final int STATUS_COL = 13;//N
+    public static final int GROUP_ID_COL = 14;//O
+    public static final int FAILURE_COL = 15;//P
+    public static final int CLIENT_NAMES_STARTING_COL = 16;//Q
+    public static final int CLIENT_NAMES_ENDING_COL = 250;//IQ
+    public static final int LOOKUP_OFFICE_NAME_COL = 251;//IR
+    public static final int LOOKUP_OFFICE_OPENING_DATE_COL = 252;//IS
+    public static final int LOOKUP_REPEAT_NORMAL_COL = 253;//IT
+    public static final int LOOKUP_REPEAT_MONTHLY_COL = 254;//IU
+    public static final int LOOKUP_IF_REPEAT_WEEKLY_COL = 255;//IV
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java
new file mode 100644
index 0000000..b37195b
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class GuarantorConstants {
+
+    public static final int OFFICE_NAME_COL = 0;
+    public static final int CLIENT_NAME_COL = 1;
+    public static final int LOAN_ACCOUNT_NO_COL = 2;
+    public static final int GUARANTO_TYPE_COL =3;
+    public static final int CLIENT_RELATIONSHIP_TYPE_COL =4;
+    public static final int ENTITY_OFFICE_NAME_COL = 5;
+    public static final int ENTITY_ID_COL = 6;
+    public static final int FIRST_NAME_COL = 7;
+    public static final int LAST_NAME_COL = 8;
+    public static final int ADDRESS_LINE_1_COL= 9;
+    public static final int ADDRESS_LINE_2_COL = 10;
+    public static final int CITY_COL = 11;
+    public static final int DOB_COL = 12;
+    public static final int ZIP_COL = 13;
+    public static final int SAVINGS_ID_COL=14;
+    public static final int AMOUNT=15;
+    public static final int STATUS_COL = 18;
+    public static final int LOOKUP_CLIENT_NAME_COL=81;
+    public static final int LOOKUP_ACCOUNT_NO_COL=82;
+    public static final int LOOKUP_SAVINGS_CLIENT_NAME_COL=83;
+    public static final int LOOKUP_SAVINGS_ACCOUNT_NO_COL=84;
+    public static final int LOOKUP_GUARANTOR_RELATIONSHIPS=85;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java
new file mode 100644
index 0000000..e54f19b
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class JournalEntryConstants {
+
+    public static final int OFFICE_NAME_COL = 0;
+
+    public static final int TRANSACION_ON_DATE_COL = 1;
+
+    public static final int CURRENCY_NAME_COL = 2;
+
+    public static final int PAYMENT_TYPE_ID_COL = 3;
+
+    public static final int TRANSACTION_ID_COL = 4;
+
+    public static final int GL_ACCOUNT_ID_CREDIT_COL = 5;
+
+    public static final int AMOUNT_CREDIT_COL = 6;
+
+    public static final int GL_ACCOUNT_ID_DEBIT_COL = 7;
+
+    public static final int AMOUNT_DEBIT_COL = 8;
+
+    public static final int STATUS_COL = 9;
+
+    public static final int ACCOUNT_NO_COL = 10;
+    public static final int CHECK_NO_COL = 11;
+    public static final int ROUTING_CODE_COL = 12;
+    public static final int RECEIPT_NO_COL = 13;
+    public static final int BANK_NO_COL = 14;
+    public static final int COMMENTS_COL=15;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java
new file mode 100644
index 0000000..2e5b38f
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class LoanConstants {
+
+    public static final int OFFICE_NAME_COL = 0;//A
+    public static final int LOAN_TYPE_COL = 1;//B
+    public static final int CLIENT_NAME_COL = 2;//C
+    public static final int CLIENT_EXTERNAL_ID=3;//D
+    public static final int PRODUCT_COL = 4;//E
+    public static final int LOAN_OFFICER_NAME_COL = 5;//F
+    public static final int SUBMITTED_ON_DATE_COL = 6;//G
+    public static final int APPROVED_DATE_COL = 7;//H
+    public static final int DISBURSED_DATE_COL = 8;//I
+    public static final int DISBURSED_PAYMENT_TYPE_COL = 9;//J
+    public static final int FUND_NAME_COL = 10;//K
+    public static final int PRINCIPAL_COL = 11;//L
+    public static final int NO_OF_REPAYMENTS_COL = 12;//M
+    public static final int REPAID_EVERY_COL = 13;//N
+    public static final int REPAID_EVERY_FREQUENCY_COL = 14;//O
+    public static final int LOAN_TERM_COL = 15;//P
+    public static final int LOAN_TERM_FREQUENCY_COL = 16;//Q
+    public static final int NOMINAL_INTEREST_RATE_COL = 17;//R
+    public static final int NOMINAL_INTEREST_RATE_FREQUENCY_COL = 18;//S
+    public static final int AMORTIZATION_COL = 19;//T
+    public static final int INTEREST_METHOD_COL = 20;//U
+    public static final int INTEREST_CALCULATION_PERIOD_COL = 21;//V
+    public static final int ARREARS_TOLERANCE_COL = 22;//W
+    public static final int REPAYMENT_STRATEGY_COL = 23;//X
+    public static final int GRACE_ON_PRINCIPAL_PAYMENT_COL = 24;//Y
+    public static final int GRACE_ON_INTEREST_PAYMENT_COL = 25;//Z
+    public static final int GRACE_ON_INTEREST_CHARGED_COL = 26;//AA
+    public static final int INTEREST_CHARGED_FROM_COL = 27;//AB
+    public static final int FIRST_REPAYMENT_COL = 28;//AC
+    public static final int TOTAL_AMOUNT_REPAID_COL = 29;//AD
+    public static final int LAST_REPAYMENT_DATE_COL = 30;//AE
+    public static final int REPAYMENT_TYPE_COL = 31;//AF
+    public static final int STATUS_COL = 32;//AG
+    public static final int LOAN_ID_COL = 33;//AH
+    public static final int FAILURE_REPORT_COL = 34;//AI
+    public static final int EXTERNAL_ID_COL = 35;//AJ
+    public static final int CHARGE_ID_1 = 36;//AK
+    public static final int CHARGE_AMOUNT_1 = 37;//AL
+    public static final int CHARGE_DUE_DATE_1 = 38;//AM
+    public static final int CHARGE_ID_2 = 39;//AN
+    public static final int CHARGE_AMOUNT_2 = 40;//AO
+    public static final int CHARGE_DUE_DATE_2 = 41;//AP
+    public static final int GROUP_ID = 42;//AQ
+    public static final int LOOKUP_CLIENT_NAME_COL = 43;//AR
+    public static final int LOOKUP_CLIENT_EXTERNAL_ID=44;//AS
+    public static final int LOOKUP_ACTIVATION_DATE_COL = 45;//AT
+    public static final int LINK_ACCOUNT_ID = 46;//AU
+
+    public static final String LOAN_TYPE_INDIVIDUAL="Individual";
+    public static final String LOAN_TYPE_GROUP="Group";
+    public static final String LOAN_TYPE_JLG="JLG" ;
+
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java
new file mode 100644
index 0000000..4a35d94
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class LoanRepaymentConstants {
+
+    public static final int OFFICE_NAME_COL = 0;//A
+    public static final int CLIENT_NAME_COL = 1;//B
+    public static final int CLIENT_EXTERNAL_ID=2;//C
+    public static final int LOAN_ACCOUNT_NO_COL = 3;//D
+    public static final int PRODUCT_COL = 4;//E
+    public static final int PRINCIPAL_COL = 5;//F
+    public static final int AMOUNT_COL = 6;//G
+    public static final int REPAID_ON_DATE_COL = 7;//H
+    public static final int REPAYMENT_TYPE_COL = 8;//I
+    public static final int ACCOUNT_NO_COL = 9;//J
+    public static final int CHECK_NO_COL = 10;//K
+    public static final int ROUTING_CODE_COL = 11;//L
+    public static final int RECEIPT_NO_COL = 12;//M
+    public static final int BANK_NO_COL = 13;//N
+    public static final int STATUS_COL = 14;//O
+    public static final int LOOKUP_CLIENT_NAME_COL = 15;//P
+    public static final int LOOKUP_CLIENT_EXTERNAL_ID = 16;//Q
+    public static final int LOOKUP_ACCOUNT_NO_COL = 17;//R
+    public static final int LOOKUP_PRODUCT_COL = 18;//S
+    public static final int LOOKUP_PRINCIPAL_COL = 19;//T
+    public static final int LOOKUP_LOAN_DISBURSEMENT_DATE_COL = 20;//U
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java
new file mode 100644
index 0000000..f1fe3a3
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class OfficeConstants {
+
+    //Column indices
+    public static final int OFFICE_NAME_COL = 0;
+    public static final int PARENT_OFFICE_NAME_COL = 1;
+    public static final int PARENT_OFFICE_ID_COL=2;
+    public static final int OPENED_ON_COL = 3;
+    public static final int EXTERNAL_ID_COL = 4;
+    public static final int LOOKUP_OFFICE_COL=7;
+    public static final int LOOKUP_OFFICE_ID_COL=8;
+    public static final int STATUS_COL=10;
+
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java
new file mode 100644
index 0000000..0cd58d0
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class RecurringDepositConstants {
+
+    public static final int OFFICE_NAME_COL = 0;
+    public static final int CLIENT_NAME_COL = 1;
+    public static final int PRODUCT_COL = 2;
+    public static final int FIELD_OFFICER_NAME_COL = 3;
+    public static final int SUBMITTED_ON_DATE_COL = 4;
+    public static final int APPROVED_DATE_COL = 5;
+    public static final int ACTIVATION_DATE_COL = 6;
+    public static final int INTEREST_COMPOUNDING_PERIOD_COL = 7;
+    public static final int INTEREST_POSTING_PERIOD_COL = 8;
+    public static final int INTEREST_CALCULATION_COL = 9;
+    public static final int INTEREST_CALCULATION_DAYS_IN_YEAR_COL = 10;
+    public static final int LOCKIN_PERIOD_COL = 11;
+    public static final int LOCKIN_PERIOD_FREQUENCY_COL = 12;
+    public static final int RECURRING_DEPOSIT_AMOUNT_COL = 13;
+    public static final int DEPOSIT_PERIOD_COL = 14;
+    public static final int DEPOSIT_PERIOD_FREQUENCY_COL = 15;
+    public static final int DEPOSIT_FREQUENCY_COL = 16;
+    public static final int DEPOSIT_FREQUENCY_TYPE_COL = 17;
+    public static final int DEPOSIT_START_DATE_COL = 18;
+    public static final int IS_MANDATORY_DEPOSIT_COL = 19;
+    public static final int ALLOW_WITHDRAWAL_COL = 20;
+    public static final int FREQ_SAME_AS_GROUP_CENTER_COL = 21;
+    public static final int ADJUST_ADVANCE_PAYMENTS_COL = 22;
+    public static final int EXTERNAL_ID_COL = 23;
+    public static final int STATUS_COL = 24;
+    public static final int SAVINGS_ID_COL = 25;
+    public static final int FAILURE_REPORT_COL = 26;
+    public static final int CHARGE_ID_1 = 28;
+    public static final int CHARGE_AMOUNT_1 = 29;
+    public static final int CHARGE_DUE_DATE_1 = 30;
+    public static final int CHARGE_ID_2 = 33;
+    public static final int CHARGE_AMOUNT_2 = 34;
+    public static final int CHARGE_DUE_DATE_2 = 35;
+
+
+    public static final int LOOKUP_CLIENT_NAME_COL = 31;
+    public static final int LOOKUP_ACTIVATION_DATE_COL = 32;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java
new file mode 100644
index 0000000..72b544a
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class SavingsConstants {
+
+    public static final int OFFICE_NAME_COL = 0;
+    public static final int SAVINGS_TYPE_COL = 1;
+    public static final int CLIENT_NAME_COL = 2;
+    public static final int PRODUCT_COL = 3;
+    public static final int FIELD_OFFICER_NAME_COL = 4;
+    public static final int SUBMITTED_ON_DATE_COL = 5;
+    public static final int APPROVED_DATE_COL = 6;
+    public static final int ACTIVATION_DATE_COL = 7;
+    public static final int CURRENCY_COL = 8;
+    public static final int DECIMAL_PLACES_COL = 9;
+    public static final int IN_MULTIPLES_OF_COL = 10;
+    public static final int NOMINAL_ANNUAL_INTEREST_RATE_COL = 11;
+    public static final int INTEREST_COMPOUNDING_PERIOD_COL = 12;
+    public static final int INTEREST_POSTING_PERIOD_COL = 13;
+    public static final int INTEREST_CALCULATION_COL = 14;
+    public static final int INTEREST_CALCULATION_DAYS_IN_YEAR_COL = 15;
+    public static final int MIN_OPENING_BALANCE_COL = 16;
+    public static final int LOCKIN_PERIOD_COL = 17;
+    public static final int LOCKIN_PERIOD_FREQUENCY_COL = 18;
+    public static final int APPLY_WITHDRAWAL_FEE_FOR_TRANSFERS = 19;
+    public static final int ALLOW_OVER_DRAFT_COL = 20;
+    public static final int OVER_DRAFT_LIMIT_COL= 21;
+    public static final int EXTERNAL_ID_COL = 22;
+    public static final int STATUS_COL = 23;
+    public static final int SAVINGS_ID_COL = 24;
+    public static final int FAILURE_REPORT_COL = 25;
+    public static final int LOOKUP_CLIENT_NAME_COL = 31;
+    public static final int LOOKUP_ACTIVATION_DATE_COL = 32;
+    public static final int CHARGE_ID_1 = 34;
+    public static final int CHARGE_AMOUNT_1 = 35;
+    public static final int CHARGE_DUE_DATE_1 = 36;
+    public static final int CHARGE_ID_2 = 37;
+    public static final int CHARGE_AMOUNT_2 = 38;
+    public static final int CHARGE_DUE_DATE_2 = 39;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java
new file mode 100644
index 0000000..c3d8e61
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class SharedAccountsConstants {
+
+    public static final int CLIENT_NAME_COL=0;
+    public static final int PRODUCT_COL=1;
+    public static final int SUBMITTED_ON_COL=2;
+    public static final int EXTERNAL_ID_COL=3;
+    public static final int CURRENCY_COL=4;
+    public static final int DECIMAL_PLACES_COL=5;
+    public static final int TOTAL_NO_SHARES_COL=6;
+    public static final int TODAYS_PRICE_COL=7;
+    public static final int CURRENCY_IN_MULTIPLES_COL=8;
+    public static final int DEFAULT_SAVINGS_AC_COL=9;
+    public static final int MINIMUM_ACTIVE_PERIOD_IN_DAYS_COL=10;
+    public static final int LOCK_IN_PERIOD_COL=11;
+    public static final int LOCK_IN_PERIOD_FREQUENCY_TYPE=12;
+    public static final int APPLICATION_DATE_COL=13;
+    public static final int ALLOW_DIVIDEND_CALCULATION_FOR_INACTIVE_CLIENTS_COL=14;
+    public static final int CHARGES_NAME_1_COL=15;
+    public static final int CHARGES_AMOUNT_1_COL=16;
+    public static final int CHARGES_NAME_2_COL=17;
+    public static final int CHARGES_AMOUNT_2_COL=18;
+    public static final int CHARGES_NAME_3_COL=19;
+    public static final int CHARGES_AMOUNT_3_COL=20;
+    public static final int STATUS_COL=25;
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java
new file mode 100644
index 0000000..f1d7d6a
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class StaffConstants {
+
+    public static final int OFFICE_NAME_COL = 0;//A
+    public static final int FIRST_NAME_COL = 1;//B
+    public static final int LAST_NAME_COL = 2;//C
+    public static final int IS_LOAN_OFFICER = 3;//D
+    public static final int MOBILE_NO_COL=4;//E
+    public static final int JOINED_ON_COL =5;//F
+    public static final int EXTERNAL_ID_COL =6;//G
+    public static final int IS_ACTIVE_COL =7;//h
+    public static final int STATUS_COL=8;//H
+}

http://git-wip-us.apache.org/repos/asf/fineract/blob/210647d4/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java
new file mode 100644
index 0000000..ba7ad96
--- /dev/null
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java
@@ -0,0 +1,143 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.bulkimport.constants;
+
+public class TemplatePopulateImportConstants {
+
+    //columns sizes
+    public final static int SMALL_COL_SIZE =4000;
+    public final static int MEDIUM_COL_SIZE =6000;
+    public final static int LARGE_COL_SIZE=8000;
+    public final static int EXTRALARGE_COL_SIZE=10000;
+
+    //Sheet names
+    public static final String OFFICE_SHEET_NAME ="Offices";
+    public static final String CENTER_SHEET_NAME="Centers";
+    public static final String STAFF_SHEET_NAME="Staff";
+    public static final String GROUP_SHEET_NAME="Groups";
+    public static final String CHART_OF_ACCOUNTS_SHEET_NAME="ChartOfAccounts";
+    public static final String CLIENT_ENTITY_SHEET_NAME="ClientEntity";
+    public static final String CLIENT_PERSON_SHEET_NAME="ClientPerson";
+    public static final String CLIENT_SHEET_NAME="Clients";
+    public static final String FIXED_DEPOSIT_SHEET_NAME="FixedDeposit";
+    public static final String FIXED_DEPOSIT_TRANSACTION_SHEET_NAME="FixedDepositTransactions";
+    public static final String PRODUCT_SHEET_NAME="Products";
+    public static final String GUARANTOR_SHEET_NAME="guarantor";
+    public static final String EXTRAS_SHEET_NAME="Extras";
+    public static final String GL_ACCOUNTS_SHEET_NAME="GlAccounts";
+    public static final String SAVINGS_ACCOUNTS_SHEET_NAME="SavingsAccounts";
+    public static final String SHARED_PRODUCTS_SHEET_NAME="SharedProducts";
+    public static final String JOURNAL_ENTRY_SHEET_NAME="AddJournalEntries";
+    public static final String LOANS_SHEET_NAME="Loans";
+    public static final String LOAN_REPAYMENT_SHEET_NAME="LoanRepayment";
+    public static final String RECURRING_DEPOSIT_SHEET_NAME="RecurringDeposit";
+    public static final String SAVINGS_TRANSACTION_SHEET_NAME="SavingsTransaction";
+    public static final String SHARED_ACCOUNTS_SHEET_NAME="SharedAccounts";
+    public static final String EMPLOYEE_SHEET_NAME="Employee";
+    public static final String ROLES_SHEET_NAME="Roles";
+    public static final String USER_SHEET_NAME="Users";
+
+    public final static int ROWHEADER_INDEX=0;
+    public final static short ROW_HEADER_HEIGHT =500;
+    public final static int FIRST_COLUMN_INDEX=0;
+
+    //Status column
+    public final static String STATUS_CELL_IMPORTED="Imported";
+    public final static String STATUS_CREATION_FAILED="Creation failed";
+    public final static String STATUS_APPROVAL_FAILED="Approval failed";
+    public final static String STATUS_ACTIVATION_FAILED="Activation failed";
+    public final static String STATUS_MEETING_FAILED="Meeting failed";
+    public final static String STATUS_DISBURSAL_FAILED="Disbursal failed";
+    public final static String STATUS_DISBURSAL_REPAYMENT_FAILED="Repayment failed";
+    public final static String STATUS_COLUMN_HEADER="Status";
+
+    //Frequency Calender
+    public static final String FREQUENCY_DAILY="Daily";
+    public static final String FREQUENCY_WEEKLY="Weekly";
+    public static final String FREQUENCY_MONTHLY="Monthly";
+    public static final String FREQUENCY_YEARLY= "Yearly";
+
+    //InterestCompoundingPeriod
+    public static final String INTEREST_COMPOUNDING_PERIOD_DAILY="Daily";
+    public static final String INTEREST_COMPOUNDING_PERIOD_MONTHLY="Monthly";
+    public static final String INTEREST_COMPOUNDING_PERIOD_QUARTERLY="Quarterly";
+    public static final String INTEREST_COMPOUNDING_PERIOD_SEMI_ANNUALLY="Semi-Annual";
+    public static final String INTEREST_COMPOUNDING_PERIOD_ANNUALLY="Annually";
+
+    //InterestPostingPeriod
+    public static final String INTEREST_POSTING_PERIOD_MONTHLY="Monthly";
+    public static final String INTEREST_POSTING_PERIOD_QUARTERLY="Quarterly";
+    public static final String INTEREST_POSTING_PERIOD_BIANUALLY="BiAnnual";
+    public static final String INTEREST_POSTING_PERIOD_ANNUALLY="Annually";
+
+    //InterestCalculation
+    public static final String INTEREST_CAL_DAILY_BALANCE="Daily Balance";
+    public static final String INTEREST_CAL_AVG_BALANCE="Average Daily Balance";
+
+    //InterestCalculation Day in Year
+    public static final String INTEREST_CAL_DAYS_IN_YEAR_360="360 Days";
+    public static final String INTEREST_CAL_DAYS_IN_YEAR_365="365 Days";
+
+    //Frequency
+    public static final String FREQUENCY_DAYS="Days";
+    public static final String FREQUENCY_WEEKS="Weeks";
+    public static final String FREQUENCY_MONTHS="Months";
+    public static final String FREQUENCY_YEARS="Years";
+
+    //Day Of Week
+    public static final String MONDAY ="Mon";
+    public static final String TUESDAY ="Tue";
+    public static final String WEDNESDAY ="Wed";
+    public static final String THURSDAY ="Thu";
+    public static final String FRIDAY ="Fri";
+    public static final String SATURDAY ="Sat";
+    public static final String SUNDAY ="Sun";
+
+    //Entity types
+    public static final String CENTER_ENTITY_TYPE="CENTER";
+    public static final String OFFICE_ENTITY_TYPE="OFFICE";
+    public static final String STAFF_ENTITY_TYPE="STAFF";
+    public static final String USER_ENTITY_TYPE="USER";
+    public static final String GROUP_ENTITY_TYPE="GROUP";
+    public static final String CLIENT_ENTITY_TYPE="CLIENT";
+    public static final String LOAN_PRODUCT_ENTITY_TYPE="LOANPRODUCT";
+    public static final String FUNDS_ENTITY_TYPE="FUNDS";
+    public static final String PAYMENT_TYPE_ENTITY_TYPE="PAYMENTTYPE";
+    public static final String CURRENCY_ENTITY_TYPE="CURRENCY";
+    public static final String GL_ACCOUNT_ENTITY_TYPE="GLACCOUNT";
+    public static final String SHARED_ACCOUNT_ENTITY_TYPE="SHAREDACCOUNT";
+    public static final String SAVINGS_PRODUCT_ENTITY_TYPE="SAVINGSPRODUCT";
+    public static final String RECURRING_DEPOSIT_PRODUCT_ENTITY_TYPE="RECURRINGDEPOSITPRODUCT";
+    public static final String FIXED_DEPOSIT_PRODUCT_ENTITY_TYPE="FIXEDDEPOSITPRODUCT";
+
+    //ReportHeader Values
+    public static final String STATUS_COL_REPORT_HEADER="Status";
+    public static final String CENTERID_COL_REPORT_HEADER="Center Id";
+    public static final String SAVINGS_ID_COL_REPORT_HEADER="Savings ID";
+    public static final String GROUP_ID_COL_REPORT_HEADER="Group ID";
+    public static final String FAILURE_COL_REPORT_HEADER="Failure Report";
+
+    //Guarantor Types
+    public static final String GUARANTOR_INTERNAL="Internal";
+    public static final String GUARANTOR_EXTERNAL="External";
+
+    //Loan Account/Loan repayment Client External Id
+    public static final Boolean CONTAINS_CLIENT_EXTERNAL_ID=true;
+
+}


Mime
View raw message