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

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