Exemple #1
0
        public ActionResult SaveBankProfile(POSAccount.Contract.Bank bank)
        {
            try
            {
                bank.CreatedBy  = Utility.DEFAULTUSER;
                bank.ModifiedBy = Utility.DEFAULTUSER;
                bank.Status     = Utility.DEFAULTSTATUS;


                if (bank.BankAddress.AddressId == 0 || bank.BankAddress.AddressId == null)
                {
                    bank.BankAddress.AddressType   = "Bank";
                    bank.BankAddress.SeqNo         = 1;
                    bank.BankAddress.AddressLinkID = bank.BankCode;
                }
                var result = new POSAccount.BusinessFactory.BankBO().SaveBank(bank);
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("Error", ex.Message);
            }

            //return RedirectToAction("BankProfile");// "Bank details Saved.";
            return(Json(new { success = true, Message = "Bank Profile saved successfully." }));
        }
Exemple #2
0
        public JsonResult GetDebtorOutStandingDocuments(string debtorCode, string bankCode, string matchDocumentNo)
        {
            var cbreceiptsetoffdetails = new POSAccount.DataFactory.CBReceiptSetOffDetailDAL().GetDebtorOutStandingDocuments(debtorCode, matchDocumentNo);

            var bankaccount = new POSAccount.BusinessFactory.BankBO().GetBank(new Bank {
                BankCode = bankCode
            }).BankAccount;

            var debtorAccount = new POSAccount.BusinessFactory.DebtorBO().GetDebtor(new Debtor {
                DebtorCode = debtorCode
            }).DebtorAccount;


            /* Debit Credit Account start */
            var debitCreditObj = Utility.GetAccountType(debtorAccount);
            var creditorDC     = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT";

            debitCreditObj = Utility.GetAccountType(bankaccount);
            var bankDC = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT";

            /* Debit Credit Account end */

            return(Json(new
            {
                SetOffDetailsData = cbreceiptsetoffdetails,
                DebtorAccount = debtorAccount,
                BankAccount = bankaccount,
                CreditorDebitCredit = creditorDC,
                bankDebitCredit = bankDC
            }, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        public ActionResult BankProfileList()
        {
            var lstbanks = new POSAccount.BusinessFactory.BankBO().GetList();

            //HttpContext.Session["OrderItems"] = null;
            return(View("BankProfileList", lstbanks));
        }
Exemple #4
0
        public JsonResult GetBankAccount(string bankcode)
        {
            var bankAccount = new POSAccount.BusinessFactory.BankBO().GetBank(new Bank {
                BankCode = bankcode
            }).BankAccount;
            var    debitCreditObj = Utility.GetAccountType(bankAccount);
            string accountType    = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT";

            return(Json(new { bankAccount = bankAccount, accountType = accountType }, JsonRequestBehavior.AllowGet));
        }
Exemple #5
0
 public ActionResult GetBankReconDetails(BankReconVm Obj)
 {
     try
     {
         var branchID = Convert.ToInt16(Session["BranchId"]);
         //var endDtUtc = Obj.endDate.ToUniversalTime().ThaiTime();
         var bankReconDetails = new POSAccount.BusinessFactory.BankBO().GetBankReconciliationList(branchID, Obj.bankCode, Obj.startDate.ToUniversalTime().ThaiTime(), Obj.endDate.ToUniversalTime().ThaiTime());
         return(PartialView("_BankReconDetails", bankReconDetails));
     }
     catch (Exception ex)
     {
         return(Json(ex.Message + "  >> " + ex.InnerException.Message.ToString()));
     }
 }
Exemple #6
0
        public ActionResult BankProfile(string bankCode)
        {
            Bank bankprofile = null;
            var  bankBo      = new POSAccount.BusinessFactory.BankBO();

            if (bankCode == Utility.NEWRECORD)
            {
                bankprofile = new Bank();
            }
            else
            {
                bankprofile = new POSAccount.BusinessFactory.BankBO().GetBank(new Bank {
                    BankCode = bankCode
                });
            }
            bankprofile.BankAccountList = Utility.GetAccountGroupItemList(Utility.SsnBranch);
            bankprofile.CurrencyList    = Utility.GetCurrencyItemList();
            bankprofile.CountryList     = Utility.GetCountryList();

            return(View("BankProfile", bankprofile));
        }