Esempio n. 1
0
        public JsonResult GetCreditorOutStandingDocuments(string creditorCode, string bankCode, string matchDocumentNo)
        {
            var cbpaymentsetoffdetails = new POSAccount.DataFactory.CBPaymentSetOffDetailDAL().GetCreditorOutStandingDocuments(creditorCode, matchDocumentNo);

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

            var creditorAccount = new POSAccount.BusinessFactory.CreditorBO().GetCreditor(new Creditor {
                CreditorCode = creditorCode
            }).CreditorAccount;
            /* Debit Credit Account start */
            var debitCreditObj = Utility.GetAccountType(creditorAccount);
            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";

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

            /* Debit Credit Account end */

            return(Json(new {
                SetOffDetailsData = cbpaymentsetoffdetails,
                CreditorAccount = creditorAccount,
                BankAccount = bankaccount,
                CreditorDebitCredit = creditorDC,
                bankDebitCredit = bankDC,
                bankChargesDebitCredit = bankChargesDC
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public JsonResult GetBankChargeAccountCode(string customerCode)
        {
            var bankChargeAccount = Utility.BANKCHARGESACCOUNTCODE;
            var creditorAccount   = new POSAccount.BusinessFactory.CreditorBO().GetCreditor(new Creditor {
                CreditorCode = customerCode
            }).CreditorAccount;

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

            debitCreditObj = Utility.GetAccountType(Utility.BANKCHARGESACCOUNTCODE);
            string bankChargesDC = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT";

            return(Json(new {
                bankChargeAccount = bankChargeAccount,
                creditorAccount = creditorAccount,
                creditorDebitCredit = customerDC,
                bankChargesDebitCredit = bankChargesDC
            }, JsonRequestBehavior.AllowGet));
        }