Exemplo n.º 1
0
 public void saveDebitTransaction(int datAccID, string batch, decimal debit, string accID, int weekno)
 {
     LoanDSTableAdapters.FinancialTransactionsTableAdapter finantrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
     finantrans.InsertFinancialTransaction(MySessionManager.ClientID,
                                           MySessionManager.AppID,
                                           Convert.ToInt32(accID),
                                           datAccID,
                                           "Interest on Loan Amount",
                                           batch,
                                           0,
                                           null,
                                           0,
                                           debit,
                                           null,
                                           Convert.ToInt32(accID),
                                           weekno,
                                           MySessionManager.CurrentUser.UserID
                                           );
 }
Exemplo n.º 2
0
    public void completeRefreshment()
    {
        int OldAppID = 0;

        LoanAccountDSTableAdapters.GetLoanAccountTableAdapter loanAcc = new LoanAccountDSTableAdapters.GetLoanAccountTableAdapter();
        LoanAccountDS.GetLoanAccountDataTable tblLoanAcc = loanAcc.GetLoanAccount(Convert.ToInt32(MySessionManager.AccountID));

        LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter loanAccRefRecord = new LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter();
        LoanAccountDS.GetAccountRefreshmentRecordDataTable tblLoanAccRefRecord = loanAccRefRecord.GetAccountRefreshmentRecord(Convert.ToInt32(MySessionManager.AccountID));
        OldAccount = tblLoanAccRefRecord[0].datOldAppID;

        if (tblLoanAcc.Rows.Count > 0)
        {
            createAccount(tblLoanAcc[0].datOutstandingAmount);
        }

        LoanDSTableAdapters.FinancialTransactionsTableAdapter FinTrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        FinTrans.InsertFinancialTransaction(OldAppID,
                                            MySessionManager.ClientID,
                                            1,
                                            tblLoanAcc[0].datID,
                                            "Account Refreshed",
                                            "closed",
                                            0,
                                            tblLoanAcc[0].datTeamID,
                                            tblLoanAcc[0].datOutstandingAmount,
                                            0,
                                            0,
                                            0,
                                            0,
                                            MySessionManager.CurrentUser.UserID
                                            );

        LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter loanAcRef = new LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter();
        loanAcRef.UpdateSetAccountClosed(Convert.ToInt32(MySessionManager.AccountID));


        loanAccRefRecord.UpdateNewAccountID(Convert.ToInt32(MySessionManager.AccountID), tblLoanAcc[0].datID);
    }
Exemplo n.º 3
0
    protected void btnFinalize_Click(object sender, EventArgs e)
    {
        try
        {
            MySessionManager.cash = 0;
            MySessionManager.bank = 0;
            decimal amtDeductable = 0;
            decimal fees          = 0;
            decimal amt           = 0;
            int     ops           = 0;

            mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
            mTemp.GetTransactionDetailsDataTable tblTempHolder             = tempHolder.GetInvTempTransactions(MySessionManager.InvAppID);
            LoanDSTableAdapters.FinancialTransactionsTableAdapter fintrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
            int rows = tblTempHolder.Rows.Count;

            for (int i = 0; i < rows; i++)
            {
                int?datDebitAc  = null;
                int?datCreditAc = null;
                if (tblTempHolder[i].datDebit > 0)
                {
                    datDebitAc = tblTempHolder[i].datAccountID;
                    amt        = tblTempHolder[i].datDebit;
                    ops        = 1;
                }
                else if (tblTempHolder[i].datCredit > 0)
                {
                    datCreditAc = tblTempHolder[i].datAccountID;
                    amt         = tblTempHolder[i].datCredit;
                    ops         = 2;
                }
                //
                if (tblTempHolder[i].datPaymentMethod == 1)
                {
                    getAmtForPaymentMode(amt, "cash", ops);
                }
                else if (tblTempHolder[i].datPaymentMethod == 2)
                {
                    getAmtForPaymentMode(amt, "bank", ops);
                }
                fintrans.InsertFinancialTransaction(MySessionManager.InvAppID,
                                                    MySessionManager.ClientID,
                                                    tblTempHolder[i].datAccountID,
                                                    MySessionManager.InvAppID,
                                                    tblTempHolder[i].datDescription,
                                                    batch(),
                                                    tblTempHolder[i].datPaymentMethod,
                                                    MySessionManager.AppBranchID,
                                                    tblTempHolder[i].datCredit,
                                                    tblTempHolder[i].datDebit,
                                                    datCreditAc,
                                                    datDebitAc,
                                                    0,
                                                    MySessionManager.CurrentUser.UserID);
            }
        }
        catch (Exception ex) { }

        //This block of code changes the status of the application
        try
        {
            InvestmentDSTableAdapters.GetInvestmentAppTableAdapter InvApp = new InvestmentDSTableAdapters.GetInvestmentAppTableAdapter();
            InvApp.UpdateApplicationStatus(3, MySessionManager.InvAppID);
            Response.Redirect("~/pages/invapplications.aspx");
        }
        catch (Exception ex) { }
    }
    protected void btnFinalize_Click(object sender, EventArgs e)
    {
        MySessionManager.cash = 0;
        MySessionManager.bank = 0;
        decimal amtDeductable = 0;
        decimal fees          = 0;
        decimal amt           = 0;
        int     ops           = 0;

        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();

        int status = Convert.ToInt32(loanApp.getApplicationStatus(MySessionManager.AppID));

        util.UpdateApplicationStatus("Forward Application", status);

        createAccount();

        mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
        mTemp.GetTransactionDetailsDataTable tblTempHolder             = tempHolder.GetTempTransactions(MySessionManager.AppID);
        LoanDSTableAdapters.FinancialTransactionsTableAdapter fintrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        int rows = tblTempHolder.Rows.Count;

        for (int i = 0; i < rows; i++)
        {
            int?datDebitAc  = null;
            int?datCreditAc = null;
            if (tblTempHolder[i].datDebit > 0)
            {
                datDebitAc = tblTempHolder[i].datAccountID;
                amt        = tblTempHolder[i].datDebit;

                ops = 1;
            }
            else if (tblTempHolder[i].datCredit > 0)
            {
                datCreditAc = tblTempHolder[i].datAccountID;
                amt         = tblTempHolder[i].datCredit;
                ops         = 2;
            }
            //
            if (tblTempHolder[i].datPaymentMethod == 1)
            {
                getAmtForPaymentMode(amt, "cash", ops);
            }
            else if (tblTempHolder[i].datPaymentMethod == 2)
            {
                getAmtForPaymentMode(amt, "bank", ops);
            }
            fintrans.InsertFinancialTransaction(MySessionManager.AppID,
                                                MySessionManager.ClientID,
                                                tblTempHolder[i].datAccountID,
                                                Convert.ToInt32(MySessionManager.AccountID),
                                                tblTempHolder[i].datDescription,
                                                batch(),
                                                tblTempHolder[i].datPaymentMethod,
                                                MySessionManager.AppBranchID,
                                                tblTempHolder[i].datCredit,
                                                tblTempHolder[i].datDebit,
                                                datCreditAc,
                                                datDebitAc,
                                                0,
                                                MySessionManager.CurrentUser.UserID);
        }
        saveDisburse(Convert.ToInt32(MySessionManager.AccountID), MySessionManager.cash, MySessionManager.bank);
        saveCreditTransaction(Convert.ToInt32(MySessionManager.AccountID), batch(), interestamt, "1", 1);
        saveDebitTransaction(Convert.ToInt32(MySessionManager.AccountID), batch(), interestamt, "1", 0);
        interest_payment_dates(MySessionManager.AppID, Convert.ToInt32(MySessionManager.AccountID), DateTime.Now, 12);

        Response.Redirect("~/pages/loanapplications.aspx");
    }
    protected void btnFinalize_Click(object sender, EventArgs e)
    {
        MySessionManager.cash = 0;
        MySessionManager.bank = 0;
        decimal amtDeductable= 0;
        decimal fees = 0;
        decimal amt =0;
        int ops =0;
        mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
        mTemp.GetTransactionDetailsDataTable tblTempHolder = tempHolder.GetAccTransactions(Convert.ToInt32( MySessionManager.AccountID));
        LoanDSTableAdapters.FinancialTransactionsTableAdapter fintrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        int rows = tblTempHolder.Rows.Count;

        for (int i = 0; i < rows; i++)
        {
            int? datDebitAc = null;
            int? datCreditAc = null;
            if (tblTempHolder[i].datDebit > 0)
            {
                datDebitAc = tblTempHolder[i].datAccountID;
                amt=tblTempHolder[i].datDebit;
                amtDeductable = amtDeductable + tblTempHolder[i].datDebit;
                ops = 1;
            }
            else if (tblTempHolder[i].datCredit > 0)
            {
                datCreditAc = tblTempHolder[i].datAccountID;
                amt = tblTempHolder[i].datCredit;
                amtDeductable = amtDeductable - tblTempHolder[i].datCredit;
                ops = 2;
            }
            //
            if (tblTempHolder[i].datPaymentMethod == 1)
            {
                getAmtForPaymentMode(amt,"cash",ops);
            }
            else if (tblTempHolder[i].datPaymentMethod == 2)
            {
                getAmtForPaymentMode(amt, "bank", ops); 
            }

            fintrans.InsertFinancialTransaction(MySessionManager.AppID,
                                                MySessionManager.ClientID,
                                                tblTempHolder[i].datAccountID,
                                                Convert.ToInt32(MySessionManager.AccountID),
                                                tblTempHolder[i].datDescription,
                                                batch(),
                                                tblTempHolder[i].datPaymentMethod,
                                                MySessionManager.CurrentUser.BranchID,
                                                tblTempHolder[i].datCredit,
                                                tblTempHolder[i].datDebit,
                                                datCreditAc,
                                                datDebitAc,
                                                0,
                                                MySessionManager.CurrentUser.UserID);
        }

        mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter();
        LoanAccountDSTableAdapters.GetLoanAccountTableAdapter loanAcc = new LoanAccountDSTableAdapters.GetLoanAccountTableAdapter();
        LoanAccountDS.GetLoanAccountDataTable tblLoaonAcc = loanAcc.GetLoanAccount(Convert.ToInt32(MySessionManager.AccountID));
        LoanAccountDSTableAdapters.GetAllLoanRepaymentsTableAdapter repayment = new LoanAccountDSTableAdapters.GetAllLoanRepaymentsTableAdapter();

        if(tblLoaonAcc.Rows.Count>0)
        {
            repayment.InsertLoanRepayment(receiptNo(),
                                          DateTime.Now,
                                          tblLoaonAcc[0].datID,
                                          tblLoaonAcc[0].datAccountNumber.ToString(),
                                          client.GetClientNo(Convert.ToInt32(MySessionManager.AccountID)),
                                          tblLoaonAcc[0].datIssueDate,
                                          tblLoaonAcc[0].datInterestRate,
                                          MySessionManager.cash,
                                          MySessionManager.bank,
                                          (MySessionManager.cash + MySessionManager.bank),
                                          fees,
                                          tblLoaonAcc[0].datLoanType,
                                          tblLoaonAcc[0].datPurpose,
                                          tblLoaonAcc[0].datTeamID,
                                          MySessionManager.CurrentUser.UserID);
        }

        loanAcc.UpdateNewAmtOutstanding(amtDeductable,Convert.ToInt32(MySessionManager.AccountID));

        decimal outstanding=Convert.ToDecimal(loanAcc.GetAmtOutstanding(Convert.ToInt32(MySessionManager.AccountID)));
        if (outstanding <= 0)
        {
            loanAcc.UpdateCloseAccount(Convert.ToInt32(MySessionManager.AccountID));
        }
        tempHolder.DeleteTempTransByAccID(Convert.ToInt32(MySessionManager.AccountID));
    }
    public void completeRefreshment()
    {
        int OldAppID=0;

        LoanAccountDSTableAdapters.GetLoanAccountTableAdapter loanAcc = new LoanAccountDSTableAdapters.GetLoanAccountTableAdapter();
        LoanAccountDS.GetLoanAccountDataTable tblLoanAcc = loanAcc.GetLoanAccount(Convert.ToInt32(MySessionManager.AccountID));

        LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter loanAccRefRecord = new LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter();
        LoanAccountDS.GetAccountRefreshmentRecordDataTable tblLoanAccRefRecord = loanAccRefRecord.GetAccountRefreshmentRecord(Convert.ToInt32(MySessionManager.AccountID));
        OldAccount = tblLoanAccRefRecord[0].datOldAppID;

        if(tblLoanAcc.Rows.Count>0)
        {
         createAccount(tblLoanAcc[0].datOutstandingAmount);
        }

        LoanDSTableAdapters.FinancialTransactionsTableAdapter FinTrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        FinTrans.InsertFinancialTransaction(OldAppID,
                                            MySessionManager.ClientID,
                                            1,
                                            tblLoanAcc[0].datID,
                                            "Account Refreshed",
                                            "closed",
                                            0,
                                            tblLoanAcc[0].datTeamID,
                                            tblLoanAcc[0].datOutstandingAmount,
                                            0,
                                            0,
                                            0,
                                            0,
                                            MySessionManager.CurrentUser.UserID
                                            );

        LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter loanAcRef = new LoanAccountDSTableAdapters.GetAccountRefreshmentRecordTableAdapter();
        loanAcRef.UpdateSetAccountClosed(Convert.ToInt32(MySessionManager.AccountID));


        loanAccRefRecord.UpdateNewAccountID(Convert.ToInt32(MySessionManager.AccountID), tblLoanAcc[0].datID);

    }
    protected void btnFinalize_Click(object sender, EventArgs e)
    {
        try
        {
            MySessionManager.cash = 0;
            MySessionManager.bank = 0;
            decimal amtDeductable = 0;
            decimal fees = 0;
            decimal amt = 0;
            int ops = 0;

            mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
            mTemp.GetTransactionDetailsDataTable tblTempHolder = tempHolder.GetInvTempTransactions(MySessionManager.InvAppID);
            LoanDSTableAdapters.FinancialTransactionsTableAdapter fintrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
            int rows = tblTempHolder.Rows.Count;

            for (int i = 0; i < rows; i++)
            {
                int? datDebitAc = null;
                int? datCreditAc = null;
                if (tblTempHolder[i].datDebit > 0)
                {
                    datDebitAc = tblTempHolder[i].datAccountID;
                    amt = tblTempHolder[i].datDebit;
                    ops = 1;
                }
                else if (tblTempHolder[i].datCredit > 0)
                {
                    datCreditAc = tblTempHolder[i].datAccountID;
                    amt = tblTempHolder[i].datCredit;
                    ops = 2;
                }
                //
                if (tblTempHolder[i].datPaymentMethod == 1)
                {
                    getAmtForPaymentMode(amt, "cash", ops);
                }
                else if (tblTempHolder[i].datPaymentMethod == 2)
                {
                    getAmtForPaymentMode(amt, "bank", ops);
                }
                fintrans.InsertFinancialTransaction(MySessionManager.InvAppID,
                                                    MySessionManager.ClientID,
                                                    tblTempHolder[i].datAccountID,
                                                    MySessionManager.InvAppID,
                                                    tblTempHolder[i].datDescription,
                                                    batch(),
                                                    tblTempHolder[i].datPaymentMethod,
                                                    MySessionManager.AppBranchID,
                                                    tblTempHolder[i].datCredit,
                                                    tblTempHolder[i].datDebit,
                                                    datCreditAc,
                                                    datDebitAc,
                                                    0,
                                                    MySessionManager.CurrentUser.UserID);
            }
                
                 
        }
        catch(Exception ex) { }

        //This block of code changes the status of the application
        try
        {
            InvestmentDSTableAdapters.GetInvestmentAppTableAdapter InvApp = new InvestmentDSTableAdapters.GetInvestmentAppTableAdapter();
            InvApp.UpdateApplicationStatus(3, MySessionManager.InvAppID);
            Response.Redirect("~/pages/invapplications.aspx");

        }
        catch (Exception ex) { }
    }
    public void saveDebitTransaction(int datAccID, string batch, decimal debit, string accID, int weekno)
    {
        LoanDSTableAdapters.FinancialTransactionsTableAdapter finantrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        finantrans.InsertFinancialTransaction(MySessionManager.ClientID,
                                              MySessionManager.AppID,
                                              Convert.ToInt32(accID),
                                              datAccID,
                                              "Interest on Loan Amount",
                                              batch,
                                              0,
                                              null,
                                              0,
                                              debit,
                                              null,
                                              Convert.ToInt32(accID),
                                              weekno,
                                              MySessionManager.CurrentUser.UserID
                                              );


    }
    protected void btnFinalize_Click(object sender, EventArgs e)
    {
        MySessionManager.cash = 0;
        MySessionManager.bank = 0;
        decimal amtDeductable = 0;
        decimal fees          = 0;
        decimal amt           = 0;
        int     ops           = 0;

        mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
        mTemp.GetTransactionDetailsDataTable tblTempHolder             = tempHolder.GetAccTransactions(Convert.ToInt32(MySessionManager.AccountID));
        LoanDSTableAdapters.FinancialTransactionsTableAdapter fintrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        int rows = tblTempHolder.Rows.Count;

        for (int i = 0; i < rows; i++)
        {
            int?datDebitAc  = null;
            int?datCreditAc = null;
            if (tblTempHolder[i].datDebit > 0)
            {
                datDebitAc    = tblTempHolder[i].datAccountID;
                amt           = tblTempHolder[i].datDebit;
                amtDeductable = amtDeductable + tblTempHolder[i].datDebit;
                ops           = 1;
            }
            else if (tblTempHolder[i].datCredit > 0)
            {
                datCreditAc   = tblTempHolder[i].datAccountID;
                amt           = tblTempHolder[i].datCredit;
                amtDeductable = amtDeductable - tblTempHolder[i].datCredit;
                ops           = 2;
            }
            //
            if (tblTempHolder[i].datPaymentMethod == 1)
            {
                getAmtForPaymentMode(amt, "cash", ops);
            }
            else if (tblTempHolder[i].datPaymentMethod == 2)
            {
                getAmtForPaymentMode(amt, "bank", ops);
            }

            fintrans.InsertFinancialTransaction(MySessionManager.AppID,
                                                MySessionManager.ClientID,
                                                tblTempHolder[i].datAccountID,
                                                Convert.ToInt32(MySessionManager.AccountID),
                                                tblTempHolder[i].datDescription,
                                                batch(),
                                                tblTempHolder[i].datPaymentMethod,
                                                MySessionManager.CurrentUser.BranchID,
                                                tblTempHolder[i].datCredit,
                                                tblTempHolder[i].datDebit,
                                                datCreditAc,
                                                datDebitAc,
                                                0,
                                                MySessionManager.CurrentUser.UserID);
        }

        mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter();
        LoanAccountDSTableAdapters.GetLoanAccountTableAdapter loanAcc         = new LoanAccountDSTableAdapters.GetLoanAccountTableAdapter();
        LoanAccountDS.GetLoanAccountDataTable tblLoaonAcc                     = loanAcc.GetLoanAccount(Convert.ToInt32(MySessionManager.AccountID));
        LoanAccountDSTableAdapters.GetAllLoanRepaymentsTableAdapter repayment = new LoanAccountDSTableAdapters.GetAllLoanRepaymentsTableAdapter();

        if (tblLoaonAcc.Rows.Count > 0)
        {
            repayment.InsertLoanRepayment(receiptNo(),
                                          DateTime.Now,
                                          tblLoaonAcc[0].datID,
                                          tblLoaonAcc[0].datAccountNumber.ToString(),
                                          client.GetClientNo(Convert.ToInt32(MySessionManager.AccountID)),
                                          tblLoaonAcc[0].datIssueDate,
                                          tblLoaonAcc[0].datInterestRate,
                                          MySessionManager.cash,
                                          MySessionManager.bank,
                                          (MySessionManager.cash + MySessionManager.bank),
                                          fees,
                                          tblLoaonAcc[0].datLoanType,
                                          tblLoaonAcc[0].datPurpose,
                                          tblLoaonAcc[0].datTeamID,
                                          MySessionManager.CurrentUser.UserID);
        }

        loanAcc.UpdateNewAmtOutstanding(amtDeductable, Convert.ToInt32(MySessionManager.AccountID));

        decimal outstanding = Convert.ToDecimal(loanAcc.GetAmtOutstanding(Convert.ToInt32(MySessionManager.AccountID)));

        if (outstanding <= 0)
        {
            loanAcc.UpdateCloseAccount(Convert.ToInt32(MySessionManager.AccountID));
        }
        tempHolder.DeleteTempTransByAccID(Convert.ToInt32(MySessionManager.AccountID));
    }
    protected void btnFinalize_Click(object sender, EventArgs e)
    {
        MySessionManager.cash = 0;
        MySessionManager.bank = 0;
        decimal amtDeductable = 0;
        decimal fees = 0;
        decimal amt = 0;
        int ops = 0;

        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        
        int status =Convert.ToInt32(loanApp.getApplicationStatus(MySessionManager.AppID));

        util.UpdateApplicationStatus("Forward Application", status);

        createAccount();
        
        mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
        mTemp.GetTransactionDetailsDataTable tblTempHolder =tempHolder.GetTempTransactions(MySessionManager.AppID);
        LoanDSTableAdapters.FinancialTransactionsTableAdapter fintrans = new LoanDSTableAdapters.FinancialTransactionsTableAdapter();
        int rows =tblTempHolder.Rows.Count;
 
        for(int i=0;i<rows;i++)
        {
            int? datDebitAc=null;
            int? datCreditAc= null;
            if (tblTempHolder[i].datDebit > 0)
            {
                datDebitAc = tblTempHolder[i].datAccountID;
                amt = tblTempHolder[i].datDebit;

                ops = 1;
            }
            else if (tblTempHolder[i].datCredit > 0)
            {
                datCreditAc = tblTempHolder[i].datAccountID;
                amt = tblTempHolder[i].datCredit;
                ops = 2;
            }
            //
            if (tblTempHolder[i].datPaymentMethod == 1)
            {
                getAmtForPaymentMode(amt, "cash", ops);
            }
            else if (tblTempHolder[i].datPaymentMethod == 2)
            {
                getAmtForPaymentMode(amt, "bank", ops);
            }
             fintrans.InsertFinancialTransaction(MySessionManager.AppID,
                                                 MySessionManager.ClientID,
                                                 tblTempHolder[i].datAccountID,
                                                 Convert.ToInt32(MySessionManager.AccountID),
                                                 tblTempHolder[i].datDescription,
                                                 batch(),
                                                 tblTempHolder[i].datPaymentMethod,
                                                 MySessionManager.AppBranchID,
                                                 tblTempHolder[i].datCredit,
                                                 tblTempHolder[i].datDebit,
                                                 datCreditAc,
                                                 datDebitAc,
                                                 0,
                                                 MySessionManager.CurrentUser.UserID); 
        }
        saveDisburse(Convert.ToInt32(MySessionManager.AccountID),MySessionManager.cash,MySessionManager.bank);
        saveCreditTransaction(Convert.ToInt32(MySessionManager.AccountID), batch(),interestamt, "1", 1);
        saveDebitTransaction(Convert.ToInt32(MySessionManager.AccountID),batch(),interestamt ,"1",0);
        interest_payment_dates(MySessionManager.AppID,Convert.ToInt32(MySessionManager.AccountID),DateTime.Now,12);

        Response.Redirect("~/pages/loanapplications.aspx");
    }