//取得特定日期收入明細 public ActionResult CashInFlowItem(string paymentDate, string type) { List <PlanAccountFunction> CashInFlow = null; List <LoanTranactionFunction> LoanInFlow = null; CashFlowModel viewModel = new CashFlowModel(); string projectname = ""; string account_type = "R"; int day = (Convert.ToDateTime(paymentDate) - Convert.ToDateTime("2018/01/01")).Days % 7; string lstDate = Convert.ToDateTime(paymentDate).AddDays(-2).ToString("yyyy/MM/dd"); int dayOverHalfAYear = (Convert.ToDateTime(paymentDate) - DateTime.Now).Days; string DateOverHalfAYear = DateTime.Now.AddDays(181).ToString("yyyy/MM/dd"); logger.Debug("day's mod =" + day); if (dayOverHalfAYear > 180) { CashInFlow = service.getPlanAccount(null, projectname, projectname, account_type, projectname, DateOverHalfAYear, paymentDate); LoanInFlow = service.getLoanTranaction(type, null, DateOverHalfAYear, paymentDate); } else if (day == 0) { CashInFlow = service.getPlanAccount(null, projectname, projectname, account_type, projectname, lstDate, paymentDate); LoanInFlow = service.getLoanTranaction(type, null, lstDate, paymentDate); } else { CashInFlow = service.getPlanAccount(paymentDate, projectname, projectname, account_type, projectname, null, null); LoanInFlow = service.getLoanTranaction(type, paymentDate, null, null); } viewModel.planAccount = CashInFlow; viewModel.finLoanTranaction = LoanInFlow; ViewBag.SearchTerm = "實際入帳日期為 : " + paymentDate; return(View(viewModel)); }
public ActionResult SearchCashOutFlow() { List <PlanAccountFunction> CashOutFlow = null; List <LoanTranactionFunction> LoanOutFlow = null; List <PlanAccountFunction> OutFlowBalance = null; List <ExpenseFormFunction> ExpenseOutFlow = null; List <ExpenseFormFunction> ExpenseBudget = null; CashFlowModel viewModel = new CashFlowModel(); string projectname = ""; string account_type = "P"; string type = "O"; CashOutFlow = service.getPlanAccount(Request["payment_date"], projectname, projectname, account_type, projectname, Request["during_start"], Request["during_end"]); LoanOutFlow = service.getLoanTranaction(type, Request["payment_date"], Request["during_start"], Request["during_end"]); OutFlowBalance = service.getOutFlowBalanceByDate(Request["payment_date"], Request["during_start"], Request["during_end"]); ExpenseOutFlow = service.getExpenseOutFlowByDate(Request["payment_date"], Request["during_start"], Request["during_end"]); ExpenseBudget = service.getExpenseBudgetByDate(Request["payment_date"], Request["during_start"], Request["during_end"]); viewModel.planAccount = CashOutFlow; viewModel.finLoanTranaction = LoanOutFlow; viewModel.outFlowBalance = OutFlowBalance; viewModel.outFlowExp = ExpenseOutFlow; viewModel.expBudget = ExpenseBudget; if (null != Request["payment_date"] && Request["payment_date"] != "") { ViewBag.SearchTerm = "查詢日期為 : " + Request["payment_date"]; } else { ViewBag.SearchTerm = "查詢區間為 : " + Request["during_start"] + "~" + Request["during_end"]; } return(View("CashOutFlowItem", viewModel)); }
//取得特定日期支出明細 public ActionResult CashOutFlowItem(string paymentDate, string type) { List <PlanAccountFunction> CashOutFlow = null; //廠商請款 List <LoanTranactionFunction> LoanOutFlow = null; //借款還款 / 廠商借款 List <PlanAccountFunction> OutFlowBalance = null; //費用支出 List <ExpenseFormFunction> ExpenseOutFlow = null; List <ExpenseFormFunction> ExpenseBudget = null; CashFlowModel viewModel = new CashFlowModel(); string projectname = ""; string account_type = "P"; int day = (Convert.ToDateTime(paymentDate) - Convert.ToDateTime("2018/01/01")).Days % 7; string lstDate = Convert.ToDateTime(paymentDate).AddDays(-2).ToString("yyyy/MM/dd"); int dayOverHalfAYear = (Convert.ToDateTime(paymentDate) - DateTime.Now).Days; string DateOverHalfAYear = DateTime.Now.AddDays(181).ToString("yyyy/MM/dd"); logger.Debug("day's mod =" + day); if (dayOverHalfAYear > 180) { CashOutFlow = service.getPlanAccount(null, projectname, projectname, account_type, projectname, DateOverHalfAYear, paymentDate); LoanOutFlow = service.getLoanTranaction(type, null, DateOverHalfAYear, paymentDate); OutFlowBalance = service.getOutFlowBalanceByDate(null, DateOverHalfAYear, paymentDate); ExpenseOutFlow = service.getExpenseOutFlowByDate(null, DateOverHalfAYear, paymentDate); ExpenseBudget = service.getExpenseBudgetByDate(null, DateOverHalfAYear, paymentDate); } else if (day == 0) { CashOutFlow = service.getPlanAccount(null, projectname, projectname, account_type, projectname, lstDate, paymentDate); LoanOutFlow = service.getLoanTranaction(type, null, lstDate, paymentDate); OutFlowBalance = service.getOutFlowBalanceByDate(null, lstDate, paymentDate); ExpenseOutFlow = service.getExpenseOutFlowByDate(null, lstDate, paymentDate); ExpenseBudget = service.getExpenseBudgetByDate(null, lstDate, paymentDate); } else { CashOutFlow = service.getPlanAccount(paymentDate, projectname, projectname, account_type, projectname, null, null); LoanOutFlow = service.getLoanTranaction(type, paymentDate, null, null); OutFlowBalance = service.getOutFlowBalanceByDate(paymentDate, null, null); ExpenseOutFlow = service.getExpenseOutFlowByDate(paymentDate, null, null); ExpenseBudget = service.getExpenseBudgetByDate(paymentDate, null, null); } //廠商請款(計價單) viewModel.planAccount = CashOutFlow; //借款還款/廠商借款 viewModel.finLoanTranaction = LoanOutFlow; //費用單 viewModel.outFlowBalance = OutFlowBalance; //費用預算(含公司與工地,不含今天以前的資料) viewModel.expBudget = ExpenseBudget; //當日須支付明細 viewModel.outFlowExp = ExpenseOutFlow; ViewBag.SearchTerm = "實際付款日期為 : " + paymentDate; return(View(viewModel)); }
public ActionResult CashFlowManage() { List <CashFlowFunction> lstCashFlow = null; List <PlanFinanceProfile> lstFinProfile = null; CashFlowBalance cashFlowBalance = null; lstCashFlow = service.getCashFlow(); lstFinProfile = service.getPlanFinProfile(); //totalFinProfile = service.getFinProfile(); cashFlowBalance = service.getCashFlowBalance(); CashFlowModel viewModel = new CashFlowModel(); viewModel.finFlow = lstCashFlow; viewModel.finProfile = lstFinProfile; //todo //viewModel.totalFinProfile = totalFinProfile; viewModel.finBalance = cashFlowBalance; ViewBag.today = DateTime.Now; return(View(viewModel)); }
public ActionResult SearchCashInFlow() { List <PlanAccountFunction> CashInFlow = null; List <LoanTranactionFunction> LoanInFlow = null; CashFlowModel viewModel = new CashFlowModel(); string projectname = ""; string account_type = "R"; string type = "I"; CashInFlow = service.getPlanAccount(Request["payment_date"], projectname, projectname, account_type, projectname, Request["during_start"], Request["during_end"]); LoanInFlow = service.getLoanTranaction(type, Request["payment_date"], Request["during_start"], Request["during_end"]); viewModel.planAccount = CashInFlow; viewModel.finLoanTranaction = LoanInFlow; if (null != Request["payment_date"] && Request["payment_date"] != "") { ViewBag.SearchTerm = "查詢日期為 : " + Request["payment_date"]; } else { ViewBag.SearchTerm = "查詢區間為 : " + Request["during_start"] + "~" + Request["during_end"]; } return(View("CashInFlowItem", viewModel)); }
public async Task <CashFlowMasterDetailDto> GetCashFlowDetailReportAsync(CashFlowModel model) { var pageResult = await _reportManager.GetCashFlowReportForDetailAsync(model); return(pageResult); }
public async Task <CashFlowReportDto> GetCashFlowReportAsync(CashFlowModel model) { var pageResult = await _reportManager.GetCashFlowReportForSummaryAsync(model); return(pageResult); }