Beispiel #1
0
        public List <DebitNoteListEntity> GetAllPurDebit()
        {
            IDebitNoteListDAL purDebit = new DebitNoteListDAL();
            var Debitlist = purDebit.GetAllPurDebit();

            return(Debitlist);
        }
Beispiel #2
0
        public List <DebitNoteListEntity> GetAllPurDebit()
        {
            IDebitNoteListDAL purDebit = new DebitNoteListDAL();
            var Debitlist = purDebit.GetAllPurDebit();

            foreach (var item in Debitlist)
            {
                if (item.DebitDateDateTime != null)
                {
                    item.DebitDate = item.DebitDateDateTime.ToString();
                }
                if (item.CashChequeNo != null && item.CashChequeNo != "")
                {
                    item.DebitCashNO     = item.CashChequeNo;
                    item.DebitCashDate   = item.CashChequeDateDate.ToString();
                    item.DebitCashAmount = item.CashChequeAmount.ToString();
                }

                else
                {
                    item.DebitCashNO     = item.PurchaseInvoiceNo;
                    item.DebitCashDate   = item.InvoiceDateDateTime.ToString();
                    item.DebitCashAmount = item.PurchaseAmount.ToString();
                }
                switch (item.Status)
                {
                case 0:
                    item.StatusString = "All";
                    break;

                case 1:
                    item.StatusString = "Adjusted";
                    break;

                case 2:
                    item.StatusString = "UnAdjusted";
                    break;

                case 3:
                    item.StatusString = "Refunded";
                    break;

                default:
                    item.StatusString = "All";
                    break;
                }


                if (item.PurchaseInvoiceNo != null && item.PurchaseInvoiceNo != "")
                {
                    item.CashDebitNo = item.PurchaseInvoiceNo;
                }
                else if (item.CashChequeNo != null && item.CashChequeNo != "")
                {
                    item.CashDebitNo = item.CashChequeNo;
                }
                else
                {
                    item.CashDebitNo = null;
                }
                item.DebitAmount = item.DebitAmountValue.ToString();
            }
            return(Debitlist);
        }