Example #1
0
        public JsonResult GetDebtorOutStandingDocuments(string debtorCode, string bankCode, string matchDocumentNo)
        {
            var cbreceiptsetoffdetails = new NetStock.DataFactory.CBReceiptSetOffDetailDAL().GetDebtorOutStandingDocuments(debtorCode, matchDocumentNo);

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

            var debtorAccount = new NetStock.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));
        }
Example #2
0
        public JsonResult GetBankChargeDBAccountCode(string customerCode)
        {
            var bankChargeAccount = Utility.BANKCHARGESACCOUNTCODE;
            var debtorAccount     = new NetStock.BusinessFactory.DebtorBO().GetDebtor(new Debtor {
                DebtorCode = customerCode
            }).DebtorAccount;

            return(Json(new { bankChargeAccount = bankChargeAccount, debtorAccount = debtorAccount }, JsonRequestBehavior.AllowGet));
        }