Пример #1
0
 public ActionResult RebookPostedAmount(SCMS.UI.Models.RebookModel model)
 {
     if (model.FullRebooking)
     {
         budgetService.FullRebookPostedFunds(model.CurrentBudgetLine.Id, model.BudgetLineId, currentStaff);
     }
     else
     {
         budgetService.PartRebookPostedFunds(model.CurrentBudgetLine.Id, model.BudgetLineId, model.AmountRebooked, currentStaff);
     }
     return(ViewBudget(model.CurrentProjectId));
 }
Пример #2
0
        /// <summary>
        /// BudgetPosting Id is passed
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult RebookPostedAmount(Guid id)
        {
            BudgetPosting bp = budgetService.GetBudgetPostingById(id);

            SCMS.UI.Models.RebookModel model = new SCMS.UI.Models.RebookModel
            {
                CurrentBudgetLine = bp,
                NewBudgetLine     = new BudgetPosting(),
                CurrentProjectId  = bp.PaymentRequestBudgetLine.ProjectBudget.BudgetCategory.ProjectDonor.Id,
                FullRebooking     = true,
                AmountRebooked    = Math.Round(bp.AmountPosted, 2),
                Projects          = new SelectList(orderRequestService.GetProject(), "Id", "Name"),
                ProjectDonors     = new SelectList(orderRequestService.GetProjectNos(Guid.Empty), "Id", "ProjectNumber"),
                BudgetLines       = new SelectList(orderRequestService.GetProjectBugdetLines(Guid.Empty), "Id", "Description")
            };
            return(View("RebookBL", model));
        }