Example #1
0
 protected ActionItem()
 {
     PaymentGroup      = new PaymentGroup();
     Fees              = new List <Fee>();
     Remissions        = new List <Remission>();
     AssociatedActions = new List <ActionItem>();
 }
Example #2
0
        public virtual double CalculateUnallocatedPayment()
        {
            var totalFees      = Fees.Sum(x => x.CalculatedAmount);
            var totalRemission = Remissions.Sum(x => x.Amount);
            var totalPayment   = PaymentGroup.CalculateTotalPayment();

            return(totalPayment + totalRemission - totalFees);
        }
        public override double CalculateUnallocatedPayment()
        {
            var suspenseDeficiency = AssociatedActions.Find(x => x.ActionType == "SuspenseDeficiency");

            var failedPaymentAmount = 0d;

            if (suspenseDeficiency != null)
            {
                failedPaymentAmount = (suspenseDeficiency as SuspenseDeficiency).FailedPayment.Amount;
            }

            var totalPayment = PaymentGroup.CalculateTotalPayment();

            return(totalPayment - failedPaymentAmount);
        }