You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vi...@apache.org on 2026/01/06 22:38:38 UTC

(fineract) branch develop updated: FINERACT-2426: Fix ChartOfAcountsConstants typo to ChartOfAccountsConstants (#5284)

This is an automated email from the ASF dual-hosted git repository.

victorromero pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5c04216841 FINERACT-2426: Fix ChartOfAcountsConstants typo to ChartOfAccountsConstants (#5284)
5c04216841 is described below

commit 5c042168415954851cc4e3f9501e5398e3583c8d
Author: Kengne-yvana <13...@users.noreply.github.com>
AuthorDate: Tue Jan 6 23:38:33 2026 +0100

    FINERACT-2426: Fix ChartOfAcountsConstants typo to ChartOfAccountsConstants (#5284)
---
 ...onstants.java => ChartOfAccountsConstants.java} |   4 +-
 .../ChartOfAccountsImportHandler.java              |  60 ++++-----
 .../chartofaccounts/ChartOfAccountsWorkbook.java   | 140 +++++++++++----------
 3 files changed, 103 insertions(+), 101 deletions(-)

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/ChartOfAccountsConstants.java
similarity index 96%
rename from fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAcountsConstants.java
rename to fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAccountsConstants.java
index 0dd414b380..e6bd21f52f 100644
--- 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/ChartOfAccountsConstants.java
@@ -18,9 +18,9 @@
  */
 package org.apache.fineract.infrastructure.bulkimport.constants;
 
-public final class ChartOfAcountsConstants {
+public final class ChartOfAccountsConstants {
 
-    private ChartOfAcountsConstants() {
+    private ChartOfAccountsConstants() {
 
     }
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java
index d8b522a5d9..98eae53cea 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java
@@ -35,7 +35,7 @@ import org.apache.fineract.accounting.journalentry.data.JournalEntryData;
 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.constants.ChartOfAcountsConstants;
+import org.apache.fineract.infrastructure.bulkimport.constants.ChartOfAccountsConstants;
 import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants;
 import org.apache.fineract.infrastructure.bulkimport.data.Count;
 import org.apache.fineract.infrastructure.bulkimport.importhandler.ImportHandler;
@@ -93,9 +93,9 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
         for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) {
             Row row;
             row = chartOfAccountsSheet.getRow(rowIndex);
-            if (ImportHandlerUtils.isNotImported(row, ChartOfAcountsConstants.STATUS_COL)) {
+            if (ImportHandlerUtils.isNotImported(row, ChartOfAccountsConstants.STATUS_COL)) {
                 glAccounts.add(readGlAccounts(row));
-                if (ImportHandlerUtils.readAsString(ChartOfAcountsConstants.OFFICE_COL, row) != null) {
+                if (ImportHandlerUtils.readAsString(ChartOfAccountsConstants.OFFICE_COL, row) != null) {
                     flagForOpBal = Boolean.TRUE;
                 } else {
                     flagForOpBal = Boolean.FALSE;
@@ -108,10 +108,10 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
 
     private GLAccountData readGlAccounts(final Row row) {
 
-        String accountType = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.ACCOUNT_TYPE_COL, row);
+        String accountType = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.ACCOUNT_TYPE_COL, row);
         EnumOptionData accountTypeEnum = GLAccountType.fromString(accountType);
-        String accountName = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.ACCOUNT_NAME_COL, row);
-        String usage = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.ACCOUNT_USAGE_COL, row);
+        String accountName = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.ACCOUNT_NAME_COL, row);
+        String usage = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.ACCOUNT_USAGE_COL, row);
         Long usageId = null;
         EnumOptionData usageEnum = null;
         if (usage != null && usage.equals(GLAccountUsage.DETAIL.toString())) {
@@ -121,20 +121,20 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
             usageId = 2L;
             usageEnum = new EnumOptionData(usageId, null, null);
         }
-        Boolean manualEntriesAllowed = ImportHandlerUtils.readAsBoolean(ChartOfAcountsConstants.MANUAL_ENTRIES_ALLOWED_COL, row);
+        Boolean manualEntriesAllowed = ImportHandlerUtils.readAsBoolean(ChartOfAccountsConstants.MANUAL_ENTRIES_ALLOWED_COL, row);
         Long parentId = null;
-        if (ImportHandlerUtils.readAsString(ChartOfAcountsConstants.PARENT_ID_COL, row) != null) {
-            parentId = Long.parseLong(Objects.requireNonNull(ImportHandlerUtils.readAsString(ChartOfAcountsConstants.PARENT_ID_COL, row)));
+        if (ImportHandlerUtils.readAsString(ChartOfAccountsConstants.PARENT_ID_COL, row) != null) {
+            parentId = Long.parseLong(Objects.requireNonNull(ImportHandlerUtils.readAsString(ChartOfAccountsConstants.PARENT_ID_COL, row)));
         }
-        String glCode = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.GL_CODE_COL, row);
+        String glCode = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.GL_CODE_COL, row);
         Long tagId = null;
         CodeValueData tagIdCodeValueData = null;
-        if (ImportHandlerUtils.readAsString(ChartOfAcountsConstants.TAG_ID_COL, row) != null
-                && !ImportHandlerUtils.readAsString(ChartOfAcountsConstants.TAG_ID_COL, row).equals("0")) {
-            tagId = Long.parseLong(Objects.requireNonNull(ImportHandlerUtils.readAsString(ChartOfAcountsConstants.TAG_ID_COL, row)));
+        if (ImportHandlerUtils.readAsString(ChartOfAccountsConstants.TAG_ID_COL, row) != null
+                && !ImportHandlerUtils.readAsString(ChartOfAccountsConstants.TAG_ID_COL, row).equals("0")) {
+            tagId = Long.parseLong(Objects.requireNonNull(ImportHandlerUtils.readAsString(ChartOfAccountsConstants.TAG_ID_COL, row)));
             tagIdCodeValueData = new CodeValueData().setId(tagId);
         }
-        String description = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.DESCRIPTION_COL, row);
+        String description = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.DESCRIPTION_COL, row);
         return new GLAccountData().setName(accountName).setParentId(parentId).setGlCode(glCode)
                 .setManualEntriesAllowed(manualEntriesAllowed).setType(accountTypeEnum).setUsage(usageEnum).setDescription(description)
                 .setTagId(tagIdCodeValueData).setRowIndex(row.getRowNum());
@@ -164,7 +164,7 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
                             .build(); //
                     commandsSourceWritePlatformService.logCommandSource(commandRequest);
                     successCount++;
-                    Cell statusCell = chartOfAccountsSheet.getRow(glAccount.getRowIndex()).createCell(ChartOfAcountsConstants.STATUS_COL);
+                    Cell statusCell = chartOfAccountsSheet.getRow(glAccount.getRowIndex()).createCell(ChartOfAccountsConstants.STATUS_COL);
                     statusCell.setCellValue(TemplatePopulateImportConstants.STATUS_CELL_IMPORTED);
                     statusCell.setCellStyle(ImportHandlerUtils.getCellStyle(workbook, IndexedColors.LIGHT_GREEN));
                 } catch (RuntimeException ex) {
@@ -172,7 +172,7 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
                     LOG.error("Problem occurred in importEntity function", ex);
                     errorMessage = ImportHandlerUtils.getErrorMessage(ex);
                     ImportHandlerUtils.writeErrorMessage(chartOfAccountsSheet, glAccount.getRowIndex(), errorMessage,
-                            ChartOfAcountsConstants.STATUS_COL);
+                            ChartOfAccountsConstants.STATUS_COL);
                 }
             }
             if (flagForOpBal) {
@@ -185,25 +185,25 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
                             .withJson(payload).build();
                     commandsSourceWritePlatformService.logCommandSource(commandRequest);
                     successCount++;
-                    Cell statusCell = chartOfAccountsSheet.getRow(1).createCell(ChartOfAcountsConstants.STATUS_COL);
+                    Cell statusCell = chartOfAccountsSheet.getRow(1).createCell(ChartOfAccountsConstants.STATUS_COL);
                     statusCell.setCellValue(TemplatePopulateImportConstants.STATUS_CELL_IMPORTED);
                     statusCell.setCellStyle(ImportHandlerUtils.getCellStyle(workbook, IndexedColors.LIGHT_GREEN));
                 } catch (RuntimeException ex) {
                     errorCount++;
                     LOG.error("Problem occurred in importEntity function", ex);
                     errorMessage = ImportHandlerUtils.getErrorMessage(ex);
-                    ImportHandlerUtils.writeErrorMessage(chartOfAccountsSheet, 1, errorMessage, ChartOfAcountsConstants.STATUS_COL);
+                    ImportHandlerUtils.writeErrorMessage(chartOfAccountsSheet, 1, errorMessage, ChartOfAccountsConstants.STATUS_COL);
                 }
             }
-            chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.STATUS_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-            ImportHandlerUtils.writeString(ChartOfAcountsConstants.STATUS_COL,
+            chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.STATUS_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+            ImportHandlerUtils.writeString(ChartOfAccountsConstants.STATUS_COL,
                     chartOfAccountsSheet.getRow(TemplatePopulateImportConstants.ROWHEADER_INDEX),
                     TemplatePopulateImportConstants.STATUS_COLUMN_HEADER);
             return Count.instance(successCount, errorCount);
         }
 
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.STATUS_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        ImportHandlerUtils.writeString(ChartOfAcountsConstants.STATUS_COL,
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.STATUS_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        ImportHandlerUtils.writeString(ChartOfAccountsConstants.STATUS_COL,
                 chartOfAccountsSheet.getRow(TemplatePopulateImportConstants.ROWHEADER_INDEX),
                 TemplatePopulateImportConstants.STATUS_COLUMN_HEADER);
         return Count.instance(successCount, errorCount);
@@ -233,11 +233,11 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
             final String locale, String dateFormat) {
         LocalDate transactionDate = DateUtils.getBusinessLocalDate();
 
-        Long officeId = ImportHandlerUtils.readAsLong(ChartOfAcountsConstants.OFFICE_COL_ID, row);
+        Long officeId = ImportHandlerUtils.readAsLong(ChartOfAccountsConstants.OFFICE_COL_ID, row);
 
-        String currencyCode = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.CURRENCY_CODE, row);
-        String accountToBeDebitedCredited = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.ACCOUNT_NAME_COL, row);
-        String glCode = ImportHandlerUtils.readAsString(ChartOfAcountsConstants.GL_CODE_COL, row);
+        String currencyCode = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.CURRENCY_CODE, row);
+        String accountToBeDebitedCredited = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.ACCOUNT_NAME_COL, row);
+        String glCode = ImportHandlerUtils.readAsString(ChartOfAccountsConstants.GL_CODE_COL, row);
         GLAccount glAccount = this.glAccountRepository.findOneByGlCodeWithNotFoundDetection(glCode);
         Long glAccountIdToDebitedCredited = glAccount.getId();
         if (glAccountIdToDebitedCredited == null) {
@@ -250,13 +250,13 @@ public class ChartOfAccountsImportHandler implements ImportHandler {
         // readAsString(JournalEntryConstants.GL_ACCOUNT_ID_DEBIT_COL, row);
 
         if (accountToBeDebitedCredited != null) {
-            if (ImportHandlerUtils.readAsLong(ChartOfAcountsConstants.CREDIT_AMOUNT, row) != null) {
+            if (ImportHandlerUtils.readAsLong(ChartOfAccountsConstants.CREDIT_AMOUNT, row) != null) {
                 credits.add(new CreditDebit(glAccountIdToDebitedCredited,
-                        BigDecimal.valueOf(ImportHandlerUtils.readAsLong(ChartOfAcountsConstants.CREDIT_AMOUNT, row))));
+                        BigDecimal.valueOf(ImportHandlerUtils.readAsLong(ChartOfAccountsConstants.CREDIT_AMOUNT, row))));
 
-            } else if (ImportHandlerUtils.readAsLong(ChartOfAcountsConstants.DEBIT_AMOUNT, row) != null) {
+            } else if (ImportHandlerUtils.readAsLong(ChartOfAccountsConstants.DEBIT_AMOUNT, row) != null) {
                 debits.add(new CreditDebit(glAccountIdToDebitedCredited,
-                        BigDecimal.valueOf(ImportHandlerUtils.readAsLong(ChartOfAcountsConstants.DEBIT_AMOUNT, row))));
+                        BigDecimal.valueOf(ImportHandlerUtils.readAsLong(ChartOfAccountsConstants.DEBIT_AMOUNT, row))));
             }
         }
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java
index 463065bb69..38a2ca2cd5 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java
@@ -26,7 +26,7 @@ import java.util.Map;
 import org.apache.fineract.accounting.glaccount.data.GLAccountData;
 import org.apache.fineract.accounting.glaccount.domain.GLAccountType;
 import org.apache.fineract.accounting.glaccount.domain.GLAccountUsage;
-import org.apache.fineract.infrastructure.bulkimport.constants.ChartOfAcountsConstants;
+import org.apache.fineract.infrastructure.bulkimport.constants.ChartOfAccountsConstants;
 import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants;
 import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator;
 import org.apache.fineract.organisation.monetary.data.CurrencyData;
@@ -103,22 +103,23 @@ public class ChartOfAccountsWorkbook extends AbstractWorkbookPopulator {
 
     private void setRules(Sheet chartOfAccountsSheet) {
         CellRangeAddressList accountTypeRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.ACCOUNT_TYPE_COL, ChartOfAcountsConstants.ACCOUNT_TYPE_COL);
+                ChartOfAccountsConstants.ACCOUNT_TYPE_COL, ChartOfAccountsConstants.ACCOUNT_TYPE_COL);
         CellRangeAddressList accountUsageRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.ACCOUNT_USAGE_COL, ChartOfAcountsConstants.ACCOUNT_USAGE_COL);
+                ChartOfAccountsConstants.ACCOUNT_USAGE_COL, ChartOfAccountsConstants.ACCOUNT_USAGE_COL);
         CellRangeAddressList manualEntriesAllowedRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.MANUAL_ENTRIES_ALLOWED_COL, ChartOfAcountsConstants.MANUAL_ENTRIES_ALLOWED_COL);
+                ChartOfAccountsConstants.MANUAL_ENTRIES_ALLOWED_COL, ChartOfAccountsConstants.MANUAL_ENTRIES_ALLOWED_COL);
         CellRangeAddressList parentRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.PARENT_COL, ChartOfAcountsConstants.PARENT_COL);
+                ChartOfAccountsConstants.PARENT_COL, ChartOfAccountsConstants.PARENT_COL);
         CellRangeAddressList tagRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.TAG_COL, ChartOfAcountsConstants.TAG_COL);
+                ChartOfAccountsConstants.TAG_COL, ChartOfAccountsConstants.TAG_COL);
         CellRangeAddressList officeNameRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.OFFICE_COL, ChartOfAcountsConstants.OFFICE_COL); // validation for opening bal
-                                                                                         // office column
+                ChartOfAccountsConstants.OFFICE_COL, ChartOfAccountsConstants.OFFICE_COL); // validation for opening bal
+                                                                                           // office column
         CellRangeAddressList currencyCodeRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(),
-                ChartOfAcountsConstants.CURRENCY_CODE, ChartOfAcountsConstants.CURRENCY_CODE);// validation for currency
-                                                                                              // code for opening
-                                                                                              // balance
+                ChartOfAccountsConstants.CURRENCY_CODE, ChartOfAccountsConstants.CURRENCY_CODE);// validation for
+                                                                                                // currency
+                                                                                                // code for opening
+                                                                                                // balance
 
         DataValidationHelper validationHelper = new HSSFDataValidationHelper((HSSFSheet) chartOfAccountsSheet);
         setNames(chartOfAccountsSheet, accountTypesNoDuplicatesList, offices);
@@ -183,10 +184,10 @@ public class ChartOfAccountsWorkbook extends AbstractWorkbookPopulator {
                 if (row == null) {
                     row = worksheet.createRow(rowNo);
                 }
-                writeFormula(ChartOfAcountsConstants.PARENT_ID_COL, row,
+                writeFormula(ChartOfAccountsConstants.PARENT_ID_COL, row,
                         "IF(ISERROR(VLOOKUP($E" + (rowNo + 1) + ",$T$2:$U$" + (glAccounts.size() + 1) + ",2,FALSE))," + "\"\",(VLOOKUP($E"
                                 + (rowNo + 1) + ",$T$2:$U$" + (glAccounts.size() + 1) + ",2,FALSE)))");
-                writeFormula(ChartOfAcountsConstants.TAG_ID_COL, row,
+                writeFormula(ChartOfAccountsConstants.TAG_ID_COL, row,
                         "IF(ISERROR(VLOOKUP($H" + (rowNo + 1) + ",$V$2:$W$" + (glAccounts.size() + 1) + ",2,FALSE))," + "\"\",(VLOOKUP($H"
                                 + (rowNo + 1) + ",$V$2:$W$" + (glAccounts.size() + 1) + ",2,FALSE)))");
             }
@@ -209,39 +210,39 @@ public class ChartOfAccountsWorkbook extends AbstractWorkbookPopulator {
         for (String accountType : accountTypesNoDuplicatesList) {
             startIndex = rowIndex + 1;
             Row row = chartOfAccountsSheet.createRow(rowIndex);
-            writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_TYPE_COL, row, accountType);
+            writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_TYPE_COL, row, accountType);
             List<String> accountNamesandTags = accountTypeToAccountNameAndTag.get(accountType);
             if (!accountNamesandTags.isEmpty()) {
                 for (String accountNameandTag : accountNamesandTags) {
                     if (chartOfAccountsSheet.getRow(rowIndex) != null) {
                         List<String> accountNameAndTagAr = Splitter.on('-').splitToList(accountNameandTag);
-                        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_NAME_COL, row, accountNameAndTagAr.get(0));
-                        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_ID_COL, row, accountNameAndTagAr.get(1));
+                        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_NAME_COL, row, accountNameAndTagAr.get(0));
+                        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_ID_COL, row, accountNameAndTagAr.get(1));
                         if (accountNameAndTagAr.get(2).equals("null")) {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_COL, row, "");
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_COL, row, "");
                         } else {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_COL, row, accountNameAndTagAr.get(2));
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_COL, row, accountNameAndTagAr.get(2));
                         }
                         if (accountNameAndTagAr.get(3).equals("0")) {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_ID_COL, row, "");
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_ID_COL, row, "");
                         } else {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_ID_COL, row, accountNameAndTagAr.get(3));
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_ID_COL, row, accountNameAndTagAr.get(3));
                         }
                         rowIndex++;
                     } else {
                         row = chartOfAccountsSheet.createRow(rowIndex);
                         List<String> accountNameAndTagAr = Splitter.on('-').splitToList(accountNameandTag);
-                        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_NAME_COL, row, accountNameAndTagAr.get(0));
-                        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_ID_COL, row, accountNameAndTagAr.get(1));
+                        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_NAME_COL, row, accountNameAndTagAr.get(0));
+                        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_ID_COL, row, accountNameAndTagAr.get(1));
                         if (accountNameAndTagAr.get(2).equals("null")) {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_COL, row, "");
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_COL, row, "");
                         } else {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_COL, row, accountNameAndTagAr.get(2));
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_COL, row, accountNameAndTagAr.get(2));
                         }
                         if (accountNameAndTagAr.get(3).equals("0")) {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_ID_COL, row, "");
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_ID_COL, row, "");
                         } else {
-                            writeString(ChartOfAcountsConstants.LOOKUP_TAG_ID_COL, row, accountNameAndTagAr.get(3));
+                            writeString(ChartOfAccountsConstants.LOOKUP_TAG_ID_COL, row, accountNameAndTagAr.get(3));
                         }
                         rowIndex++;
                     }
@@ -258,14 +259,14 @@ public class ChartOfAccountsWorkbook extends AbstractWorkbookPopulator {
             startIndex = rowIndex + 1;
             if (chartOfAccountsSheet.getRow(rowIndex) != null) {
                 Row row = chartOfAccountsSheet.getRow(rowIndex);
-                writeString(ChartOfAcountsConstants.LOOKUP_OFFICE_COL, row, office.getName());
-                writeLong(ChartOfAcountsConstants.LOOKUP_OFFICE_ID_COL, row, office.getId());
+                writeString(ChartOfAccountsConstants.LOOKUP_OFFICE_COL, row, office.getName());
+                writeLong(ChartOfAccountsConstants.LOOKUP_OFFICE_ID_COL, row, office.getId());
                 rowIndex++;
 
             } else {
                 Row row = chartOfAccountsSheet.createRow(rowIndex);
-                writeString(ChartOfAcountsConstants.LOOKUP_OFFICE_COL, row, office.getName());
-                writeLong(ChartOfAcountsConstants.LOOKUP_OFFICE_ID_COL, row, office.getId());
+                writeString(ChartOfAccountsConstants.LOOKUP_OFFICE_COL, row, office.getName());
+                writeLong(ChartOfAccountsConstants.LOOKUP_OFFICE_ID_COL, row, office.getId());
                 rowIndex++;
             }
 
@@ -275,52 +276,53 @@ public class ChartOfAccountsWorkbook extends AbstractWorkbookPopulator {
     private void setLayout(Sheet chartOfAccountsSheet) {
 
         Row rowHeader = chartOfAccountsSheet.createRow(TemplatePopulateImportConstants.ROWHEADER_INDEX);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.ACCOUNT_TYPE_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.ACCOUNT_NAME_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.ACCOUNT_USAGE_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.MANUAL_ENTRIES_ALLOWED_COL,
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.ACCOUNT_TYPE_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.ACCOUNT_NAME_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.ACCOUNT_USAGE_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.MANUAL_ENTRIES_ALLOWED_COL,
                 TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.PARENT_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.PARENT_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.GL_CODE_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.TAG_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.TAG_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.DESCRIPTION_COL, TemplatePopulateImportConstants.EXTRALARGE_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.OFFICE_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.OFFICE_COL_ID, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.CURRENCY_CODE, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.DEBIT_AMOUNT, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.CREDIT_AMOUNT, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_ACCOUNT_TYPE_COL,
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.PARENT_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.PARENT_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.GL_CODE_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.TAG_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.TAG_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.DESCRIPTION_COL, TemplatePopulateImportConstants.EXTRALARGE_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.OFFICE_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.OFFICE_COL_ID, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.CURRENCY_CODE, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.DEBIT_AMOUNT, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.CREDIT_AMOUNT, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_ACCOUNT_TYPE_COL,
                 TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_ACCOUNT_NAME_COL,
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_ACCOUNT_NAME_COL,
                 TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_ACCOUNT_ID_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_TAG_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_TAG_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_ACCOUNT_ID_COL,
+                TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_TAG_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_TAG_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
         // adding lookup for opening balance bulk import
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_OFFICE_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
-        chartOfAccountsSheet.setColumnWidth(ChartOfAcountsConstants.LOOKUP_OFFICE_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_OFFICE_COL, TemplatePopulateImportConstants.MEDIUM_COL_SIZE);
+        chartOfAccountsSheet.setColumnWidth(ChartOfAccountsConstants.LOOKUP_OFFICE_ID_COL, TemplatePopulateImportConstants.SMALL_COL_SIZE);
 
-        writeString(ChartOfAcountsConstants.ACCOUNT_TYPE_COL, rowHeader, "Account Type*");
-        writeString(ChartOfAcountsConstants.GL_CODE_COL, rowHeader, "GL Code *");
-        writeString(ChartOfAcountsConstants.ACCOUNT_USAGE_COL, rowHeader, "Account Usage *");
-        writeString(ChartOfAcountsConstants.MANUAL_ENTRIES_ALLOWED_COL, rowHeader, "Manual entries allowed *");
-        writeString(ChartOfAcountsConstants.PARENT_COL, rowHeader, "Parent");
-        writeString(ChartOfAcountsConstants.PARENT_ID_COL, rowHeader, "Parent Id");
-        writeString(ChartOfAcountsConstants.ACCOUNT_NAME_COL, rowHeader, "Account Name");
-        writeString(ChartOfAcountsConstants.TAG_COL, rowHeader, "Tag");
-        writeString(ChartOfAcountsConstants.TAG_ID_COL, rowHeader, "Tag Id");
-        writeString(ChartOfAcountsConstants.DESCRIPTION_COL, rowHeader, "Description *");
+        writeString(ChartOfAccountsConstants.ACCOUNT_TYPE_COL, rowHeader, "Account Type*");
+        writeString(ChartOfAccountsConstants.GL_CODE_COL, rowHeader, "GL Code *");
+        writeString(ChartOfAccountsConstants.ACCOUNT_USAGE_COL, rowHeader, "Account Usage *");
+        writeString(ChartOfAccountsConstants.MANUAL_ENTRIES_ALLOWED_COL, rowHeader, "Manual entries allowed *");
+        writeString(ChartOfAccountsConstants.PARENT_COL, rowHeader, "Parent");
+        writeString(ChartOfAccountsConstants.PARENT_ID_COL, rowHeader, "Parent Id");
+        writeString(ChartOfAccountsConstants.ACCOUNT_NAME_COL, rowHeader, "Account Name");
+        writeString(ChartOfAccountsConstants.TAG_COL, rowHeader, "Tag");
+        writeString(ChartOfAccountsConstants.TAG_ID_COL, rowHeader, "Tag Id");
+        writeString(ChartOfAccountsConstants.DESCRIPTION_COL, rowHeader, "Description *");
 
-        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_TYPE_COL, rowHeader, "Lookup Account type");
-        writeString(ChartOfAcountsConstants.LOOKUP_TAG_COL, rowHeader, "Lookup Tag");
-        writeString(ChartOfAcountsConstants.LOOKUP_TAG_ID_COL, rowHeader, "Lookup Tag Id");
-        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_NAME_COL, rowHeader, "Lookup Account name *");
-        writeString(ChartOfAcountsConstants.LOOKUP_ACCOUNT_ID_COL, rowHeader, "Lookup Account Id");
+        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_TYPE_COL, rowHeader, "Lookup Account type");
+        writeString(ChartOfAccountsConstants.LOOKUP_TAG_COL, rowHeader, "Lookup Tag");
+        writeString(ChartOfAccountsConstants.LOOKUP_TAG_ID_COL, rowHeader, "Lookup Tag Id");
+        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_NAME_COL, rowHeader, "Lookup Account name *");
+        writeString(ChartOfAccountsConstants.LOOKUP_ACCOUNT_ID_COL, rowHeader, "Lookup Account Id");
         // adding lookup for opening balance bulk import
-        writeString(ChartOfAcountsConstants.LOOKUP_OFFICE_COL, rowHeader, "Lookup Office Name");
-        writeString(ChartOfAcountsConstants.LOOKUP_OFFICE_ID_COL, rowHeader, "Lookup Office Id");
+        writeString(ChartOfAccountsConstants.LOOKUP_OFFICE_COL, rowHeader, "Lookup Office Name");
+        writeString(ChartOfAccountsConstants.LOOKUP_OFFICE_ID_COL, rowHeader, "Lookup Office Id");
 
     }