Protractor tests.
diff --git a/Pages/Accounting b/Pages/Accounting
index e7e95ea..1bedff0 100644
--- a/Pages/Accounting
+++ b/Pages/Accounting
@@ -64,6 +64,12 @@
         $('a[href="'+ link + '"]').click();
         browser.sleep(1000);
     },
+    goToSubledgersForAccount: function(accountIdentifier){
+        link = "/accounting/ledgers/detail/" + accountIdentifier + "/ledgers";
+        browser.wait(EC.visibilityOf($('a[href="'+ link + '"]')));
+        $('a[href="'+ link + '"]').click();
+        browser.sleep(1000);
+    },
     clickLinkShowForAccountWithName: function(name) {
         browser.wait(EC.invisibilityOf($("div[class='md-padding'] h3")), 5000);
         browser.sleep(1000);
diff --git a/Pages/Common.js b/Pages/Common.js
index a634a64..87d37e4 100644
--- a/Pages/Common.js
+++ b/Pages/Common.js
@@ -65,6 +65,10 @@
     cancelAction: function(){
         $$("td-dialog-actions button").get(0).click();
     },
+    clickFirstColumnHeaderInTableToResortTable: function(){
+        browser.wait(EC.visibilityOf($("th")), 5000);
+        $$("th").first().click();
+    },
     clickLinkShowForRowWithId2: function(identifier) {
         numberPages = 1;
         i = 1;
diff --git a/Pages/Loans.js b/Pages/Loans.js
index 248846e..1eb497a 100644
--- a/Pages/Loans.js
+++ b/Pages/Loans.js
@@ -91,15 +91,9 @@
         browser.wait(EC.elementToBeClickable(cashAccountInput), 5000);
         cashAccountInput.click().sendKeys(text);
     },
-    enterTextIntoLoanInProcessLedgerInputField: function(text) {
-        loanInProcessLedgerInput.click().sendKeys(text);
-    },
     enterTextIntoCustomerLoanLedgerInputField: function(text) {
        customerLoanLedgerInput.click().sendKeys(text);
     },
-    enterTextIntoPendingDisbursalAccountInputField: function(text) {
-        pendingDisbursalAccountInput.click().sendKeys(text);
-    },
     enterTextIntoInterestMinimumInputField: function(text) {
         browser.executeScript("arguments[0].scrollIntoView();", interestMinimumInput.getWebElement());
         browser.wait(EC.elementToBeClickable(interestMinimumInput), 5000);
diff --git a/Specs/gate1.js b/Specs/gate1.js
index 5f781b2..5bc5500 100644
--- a/Specs/gate1.js
+++ b/Specs/gate1.js
@@ -47,6 +47,7 @@
     customerAccount = helper.getRandomString(5);
     depositIdentifier = helper.getRandomString(4);
     depositName = helper.getRandomString(8);
+    chequeReceivablesAccount = helper.getRandomString(4);
     tellerAccount = helper.getRandomString(4);
     revenueAccount = helper.getRandomString(4);
     loanShortName = helper.getRandomString(6);
@@ -72,6 +73,16 @@
     it('should create new accounts', function () {
         Accounting.goToAccountingViaSidePanel();
         Common.clickLinkShowForRowWithId("7000");
+        Common.clickLinkShowForRowWithId("7200");
+        Accounting.clickCreateNewAccountInLedger("7200");
+        Accounting.enterTextIntoAccountIdentifierInputField(chequeReceivablesAccount);
+        Accounting.verifyRadioAssetToBeSelected();
+        Accounting.verifyRadioAssetToBeDisabled();
+        Accounting.enterTextIntoAccountNameInputField("Cheques Receivables");
+        Accounting.clickButtonCreateAccount();
+        Common.verifyMessagePopupIsDisplayed("Account is going to be saved");
+        Accounting.goToAccountingViaSidePanel();
+        Common.clickLinkShowForRowWithId("7000");
         Common.clickLinkShowForRowWithId("7300");
         Accounting.clickCreateNewAccountInLedger("7300");
         Accounting.enterTextIntoAccountIdentifierInputField(tellerAccount);
@@ -122,7 +133,7 @@
         Offices.enterTextIntoCashWithdrawalLimitInputField("1000");
         Offices.enterTextIntoTellerAccountInputFieldAndSelectMatchingEntry(tellerAccount);
         Offices.enterTextIntoVaultAccountInputFieldAndSelectMatchingEntry("7351");
-        Offices.enterTextIntoChequesReceivableAccountInputFieldAndSelectMatchingEntry("7310.1");
+        Offices.enterTextIntoChequesReceivableAccountInputFieldAndSelectMatchingEntry("7290");
         Offices.clickCreateTellerButton();
         Common.verifyMessagePopupIsDisplayed("Teller is going to be saved");
         //workaround for current bug that teller is not always listed immediately
@@ -400,10 +411,8 @@
     Loans.enterTextIntoTermInputField("12");
     Loans.clickEnabledContinueButtonForProductDetails();
     Loans.enterTextIntoCashAccountInputField(tellerAccount);
-    Loans.enterTextIntoLoanInProcessLedgerInputField("8100");
     Loans.enterTextIntoCustomerLoanLedgerInputField("7900");
-    Loans.enterTextIntoPendingDisbursalAccountInputField("7013");
-    Loans.clickEnabledContinueButtonForLedgerAndAccountSettings("7810");
+    Loans.clickEnabledContinueButtonForLedgerAndAccountSettings();
     Loans.enterTextIntoInterestMinimumInputField("3.50");
     Loans.enterTextIntoIncomeAccountAccountInputField(revenueAccount);
     Loans.enterTextIntoAccrualAccountInputField("7015");
@@ -471,8 +480,8 @@
         Customers.selectExecuteTaskCheckbox();
         Common.verifyMessagePopupIsDisplayed("Task executed successfully");
         Customers.clickButtonForTask("OPEN");
-        //verify correct processing fee
-        Customers.verifyTransactionCharge("processing-fee", "150.00");
+        //verify correct principal amount
+
         Customers.clickButtonForTransaction("OPEN");
         Common.verifyMessagePopupIsDisplayed("Case is going to be updated");
     });
@@ -480,14 +489,18 @@
         Customers.clickLinkTasks(customerAccount, loanShortName, loanAccountShortName);
         //checkbox already selected since one task only that already has been executed
         Customers.clickButtonForTask("APPROVE");
-        Customers.verifyTransactionCharge("loan-origination-fee", "50.00");
+
         Customers.clickButtonForTransaction("APPROVE");
         Common.verifyMessagePopupIsDisplayed("Case is going to be updated");
         Customers.verifyLoanHasStatus("APPROVED");
     });
     it('should be able to disburse loan - no task', function () {
+        //currently error if this is done too quickly
+        browser.sleep("5000");
         Customers.clickLinkTasks(customerAccount, loanShortName, loanAccountShortName);
         Customers.clickButtonForTask("DISBURSE");
+        Customers.verifyTransactionCharge("processing-fee", "150.00");
+        Customers.verifyTransactionCharge("loan-origination-fee", "50.00");
         Customers.verifyTransactionCharge("disbursement-fee", "05.00");
         Customers.clickButtonForTransaction("DISBURSE");
         Common.verifyMessagePopupIsDisplayed("Case is going to be updated");
@@ -500,45 +513,64 @@
         Accounting.clickLinkShowForAccountWithIdentifier("1300");
         Accounting.clickLinkShowForAccountWithIdentifier("1312");
         Accounting.viewAccountEntriesForAccount("1312");
+        Common.clickFirstColumnHeaderInTableToResortTable();
         Accounting.verifyTransactionTypeForRow("CREDIT", 1);
         Accounting.verifyTransactionAmountForRow("150", 1);
-        Accounting.verifyTransactionBalanceForRow("150", 1);
+        //Accounting.verifyTransactionBalanceForRow("150", 1);
         Common.clickBackButtonInTitleBar();
         Common.clickBackButtonInTitleBar();
         Accounting.clickLinkShowForAccountWithIdentifier("1310");
         Accounting.viewAccountEntriesForAccount("1310");
+        Common.clickFirstColumnHeaderInTableToResortTable();
         Accounting.verifyTransactionTypeForRow("CREDIT", 1);
         Accounting.verifyTransactionAmountForRow("50", 1);
-        Accounting.verifyTransactionBalanceForRow("50", 1);
+        //Accounting.verifyTransactionBalanceForRow("50", 1);
         Common.clickBackButtonInTitleBar();
         Common.clickBackButtonInTitleBar();
         Accounting.clickLinkShowForAccountWithIdentifier("1313");
         Accounting.viewAccountEntriesForAccount("1313");
+        Common.clickFirstColumnHeaderInTableToResortTable();
         Accounting.verifyTransactionTypeForRow("CREDIT", 1);
         Accounting.verifyTransactionAmountForRow("5", 1);
-        Accounting.verifyTransactionBalanceForRow("5", 1);
+        //Accounting.verifyTransactionBalanceForRow("5", 1);
         Common.clickBackButtonInTitleBar();
         Common.clickBackButtonInTitleBar();
         Common.clickBackButtonInTitleBar();
         Common.clickBackButtonInTitleBar();
-        //verify principal has been transferred to customer's deposit account and the fees substracted
+        //verify principal has been transferred to customer's deposit account
         Accounting.clickLinkShowForAccountWithIdentifier("9000");
         Accounting.clickLinkShowForAccountWithIdentifier("9100");
         Accounting.clickLinkShowForAccountWithName(depositName);
         Accounting.verifyAccountInfo("Balance", "4843.5");
         Accounting.viewAccountEntriesForAccount(customerAccount + ".9100.00001");
-        Accounting.verifyTransactionTypeForRow("DEBIT",4);
-        Accounting.verifyTransactionAmountForRow("150", 4);
-        Accounting.verifyTransactionBalanceForRow("-101.5", 4);
-        Accounting.verifyTransactionTypeForRow("DEBIT",5);
-        Accounting.verifyTransactionAmountForRow("50", 5);
-        Accounting.verifyTransactionBalanceForRow("-151.5", 5);
-        Accounting.verifyTransactionTypeForRow("DEBIT",6);
-        Accounting.verifyTransactionAmountForRow("5", 6);
-        Accounting.verifyTransactionBalanceForRow("-156.5", 6);
-        Accounting.verifyTransactionTypeForRow("CREDIT",7);
-        Accounting.verifyTransactionAmountForRow("5000", 7);
-        Accounting.verifyTransactionBalanceForRow("4843.5", 7);
+        Accounting.verifyTransactionTypeForRow("CREDIT",4);
+        Accounting.verifyTransactionAmountForRow("5000", 4);
+        Accounting.verifyTransactionBalanceForRow("5048.5", 4);
+        Accounting.goToAccountingViaSidePanel();
+        Accounting.clickLinkShowForAccountWithIdentifier("7000");
+        Accounting.clickLinkShowForAccountWithIdentifier("7900");
+        Accounting.goToSubledgersForAccount("7900");
+        Accounting.clickLinkShowForAccountWithIdentifier(customerAccount + ".cll.00001");
+        Accounting.clickLinkShowForAccountWithIdentifier(customerAccount + ".clp.00001");
+        //principal
+        Accounting.viewAccountEntriesForAccount(customerAccount + ".clp.00001");
+        Accounting.verifyTransactionTypeForRow("DEBIT", 1);
+        Accounting.verifyTransactionMessageForRow(loanShortName + "." + loanAccountShortName + ".DISBURSE", 1);
+        Accounting.verifyTransactionAmountForRow("5000", 1);
+        Accounting.verifyTransactionBalanceForRow("5000", 1);
+        Common.clickBackButtonInTitleBar();
+        Common.clickBackButtonInTitleBar();
+        Accounting.clickLinkShowForAccountWithIdentifier(customerAccount + ".clf.00002");
+        //fees
+        Accounting.viewAccountEntriesForAccount(customerAccount + ".clf.00002");
+        Accounting.verifyTransactionTypeForRow("DEBIT", 1);
+        Accounting.verifyTransactionMessageForRow(loanShortName + "." + loanAccountShortName + ".DISBURSE", 1);
+        Accounting.verifyTransactionAmountForRow("205", 1);
+        Accounting.verifyTransactionBalanceForRow("205", 1);
+        Common.clickBackButtonInTitleBar();
+        Common.clickBackButtonInTitleBar();
+        Accounting.clickLinkShowForAccountWithIdentifier(customerAccount + ".cli.00003");
+        Accounting.verifyAccountInfo("Balance", "0");
     });
     it('should be able to repay loan', function () {