Beispiel #1
0
        public async Task <IQueryable <VCashFlow> > GetVCashFlow(FinancialReportsModel filter)
        {
            var data = await _cVCashFlowServices.QueryAsync();


            if (!string.IsNullOrEmpty(filter.suplier))
            {
                data = data.Where(a => a.Person.FirstName.Contains(filter.suplier) || a.Person.LastName.Contains(filter.suplier));
            }

            if (!string.IsNullOrEmpty(filter.name))
            {
                data = data.Where(a => a.Name.Contains(filter.name));
            }

            if (!string.IsNullOrEmpty(filter.ExpenseNumber))
            {
                data = data.Where(a => a.CashFlowNumber.Contains(filter.ExpenseNumber));
            }

            if ((filter.dueDateStart.HasValue))
            {
                data = data.Where(a => a.DueDate.Value.Date >= filter.dueDateStart.Value.Date);
            }

            if ((filter.dueDateEnd.HasValue))
            {
                data = data.Where(a => a.DueDate.Value.Date <= filter.dueDateEnd.Value.Date);
            }

            if ((filter.duePayStart.HasValue))
            {
                data = data.Where(a => a.DuePayment.Value.Date >= filter.duePayStart.Value.Date);
            }

            if ((filter.duePayEnd.HasValue))
            {
                data = data.Where(a => a.DuePayment.Value.Date <= filter.duePayEnd.Value.Date);
            }

            if ((filter.createDateStart.HasValue))
            {
                data = data.Where(a => a.CreateDate.Value.Date >= filter.createDateStart.Value.Date);
            }

            if ((filter.createDateEnd.HasValue))
            {
                data = data.Where(a => a.CreateDate.Value.Date <= filter.createDateEnd.Value.Date);
            }



            if ((filter.value.HasValue))
            {
                data = data.Where(a => a.Total == filter.value.Value);
            }


            return(data);
        }
        public async Task <IActionResult> BankCash(FinancialReportsModel filter, string trahs)
        {
            LoadViewData();
            IQueryable <BankTrans> data = await _financialExtension.GetBankTans(filter);

            filter.BankTrans = data;
            return(View(filter));
        }
        public async Task <IActionResult> Revenue(FinancialReportsModel filter, string name)
        {
            LoadViewData();
            IQueryable <VRevenue> data = await _financialExtension.GetVRevenue(filter);

            filter.VRevenue = data.Include(a => a.Revenue).ThenInclude(a => a.Person);
            return(View(filter));
        }
        public async Task <IActionResult> Expense(FinancialReportsModel filter, string trash)
        {
            LoadViewData();
            IQueryable <VExpense> data = await _financialExtension.GetVExpense(filter);

            filter.VExpense = data.Include(a => a.Expense).ThenInclude(a => a.Person);
            return(View(filter));
        }
        public async Task <IActionResult> CashflowReports(FinancialReportsModel filter, string trahs)
        {
            LoadViewData();
            IQueryable <VCashFlow> data = await _financialExtension.GetVCashFlow(filter);

            filter.VCashFlow = data;
            return(View(filter));
        }
Beispiel #6
0
        public async Task <IQueryable <BankTrans> > GetBankTans(FinancialReportsModel filter)
        {
            var data = await _bankTransServices.QueryAsync(a => a.Deleted == false);

            if (!string.IsNullOrEmpty(filter.suplier))
            {
                data = data.Where(a => a.Description.Contains(filter.suplier));
            }


            if ((filter.createDateStart.HasValue))
            {
                data = data.Where(a => a.CreateDate.Date >= filter.createDateStart.Value.Date);
            }

            if ((filter.createDateEnd.HasValue))
            {
                data = data.Where(a => a.CreateDate.Date <= filter.createDateEnd.Value.Date);
            }



            if ((filter.dueDateStart.HasValue))
            {
                data = data.Where(a => a.DueDate.Value.Date >= filter.dueDateStart.Value.Date);
            }

            if ((filter.dueDateEnd.HasValue))
            {
                data = data.Where(a => a.DueDate.Value.Date <= filter.dueDateEnd.Value.Date);
            }


            if ((filter.CategoryId.HasValue))
            {
                data = data.Where(a => a.ChartAccountId == filter.CategoryId);
            }

            if ((filter.AccountBankId.HasValue))
            {
                data = data.Where(a => a.AccountBankId == filter.AccountBankId);
            }



            if ((filter.value.HasValue))
            {
                data = data.Where(a => a.Total == filter.value.Value);
            }

            return(data);
        }
 public IActionResult BankCash(FinancialReportsModel filter)
 {
     LoadViewData();
     return(View(filter));
 }
 public IActionResult Revenue(FinancialReportsModel filter)
 {
     return(View(filter));
 }
 public IActionResult Expense(FinancialReportsModel filter)
 {
     return(View(filter));
 }