Esempio n. 1
0
 public ProductPriceAdjustment(AmountTypes type, decimal amount)
 {
     Id             = 0;
     Settings       = new Dictionary <string, string>();
     AdjustmentType = type;
     Amount         = amount;
 }
 public ProductPriceAdjustment(AmountTypes type, decimal amount)
 {
     Id = 0;
     Settings = new Dictionary<string, string>();
     this.AdjustmentType = type;
     this.Amount = amount;
 }
 public OrderTotalAdjustment(AmountTypes type, decimal amount)
 {
     Id             = 0;
     Settings       = new Dictionary <string, string>();
     AdjustmentType = type;
     Amount         = amount;
 }
 public OrderShippingAdjustment(AmountTypes type, decimal amount)
 {
     Id = 0;
     Settings = new Dictionary<string, string>();
     this.AdjustmentType = type;
     this.Amount = amount;
 }
 public OrderShippingAdjustment(AmountTypes type, decimal amount)
 {
     Id                  = 0;
     Settings            = new Dictionary <string, string>();
     this.AdjustmentType = type;
     this.Amount         = amount;
 }
Esempio n. 6
0
        public decimal TotalFinAmount(List <int> Projs, AmountTypes type)
        {
            FinanceResults finres     = new FinanceResults();
            BudgetService  budservice = new BudgetService();
            decimal        Sum        = 0;

            foreach (var prjId in Projs)
            {
                finres.Initialize(prjId);
                decimal amt = 0;

                if (type == AmountTypes.AllTransfered)
                {
                    amt = finres.Project_TotalMoneyTransferedFromAwardAmount();
                }
                if (type == AmountTypes.UsedAmount)
                {
                    amt = finres.Project_TotalMoneySpentAmountFromAwardAmount();
                }
                if (type == AmountTypes.UnusedAmount)
                {
                    amt = finres.Project_TotalAmountLeftFromAwardAmount();
                }
                if (type == AmountTypes.CashOnHand)
                {
                    amt = finres.Project_TotalCashOnHand();
                }
                if (type == AmountTypes.Refund)
                {
                    //TODO Check with : =========
                    //Alya, what Returned she wants to USE! SEE IF Reports periods one is OKAY> BELOW
                    //   ViewData["Refund"] = SumTransfered - SumSpent - b.Returned;  // . Awarded Amt - total paid amt
                    Budget b = budservice.GetBudget(prjId);
                    if (b.Returned != null)
                    {
                        amt = b.Returned.Value;
                    }
                }
                if (type == AmountTypes.Cancellation)
                {
                    // ViewData["Cancellation"] = ProjInfo.AwardedAmt.Value - b.Cancellation - SumTransfered;  // . Awarded Amt - total paid amt
                    Budget b = budservice.GetBudget(prjId);
                    if (b.Cancellation != null)
                    {
                        amt = b.Cancellation.Value;
                    }
                }


                Sum = Sum + amt;
            }

            return(Sum);
        }
        public PickupObjectPropertiesViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            PickupObjectProperties modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            SelectedPickupTypeIndex = PickupTypes.IndexOf(LocalModelObject.PickupType);
            SelectedAmountTypeIndex = AmountTypes.IndexOf(LocalModelObject.PickupAmountType);
        }
Esempio n. 8
0
        public IEnumerable <DRContainer> GeneratePartialReportsByTypeAwrd(IQueryable <Project> prj, AmountTypes at)
        {
            var query = prj
                        .GroupBy(g => new  //GROUP BY GrantType, ProgramArea Field1, Field2 and SUM AmtRequested.
            {
                g.GrantType.GrantTypeList.GrantTypeText
            })
                        .Select(group => new DRContainer() //Select all Grouped into VersusContainer.
            {
                Name        = group.Key.GrantTypeText,
                GrantNumber = group.Count(),
                Amt1        = TotalFinAmount(group.Select(i => i.ProjectID).ToList(), at),
                Amt2        = group.Sum(i => i.ProjectInfo.AwardedAmt)
            });


            return(query);
        }