/// <summary>
        /// Overrides the base constructor which tries to create a new object based on a
        /// parameterless constructor.
        /// </summary>
        /// <returns>a new object added to the collection.</returns>
        protected override object AddNewCore()
        {
            int planId    = _intInitialPlanId;
            int feeTypeId = -1;


            // does the current plan have a fee with a balance
            int idx = _Plans.Find("ID", _intInitialPlanId);

            _Plans[idx].Fees.ApplySort("PaymentOrder", ListSortDirection.Ascending);
            foreach (PlanFee fee in _Plans[idx].Fees)
            {
                if (fee.Balance > 0)
                {
                    feeTypeId = fee.FeeTypeId;
                    break;
                }
            }

            // if the current plan has no balance find the first plan that does
            if (feeTypeId <= -1)
            {
                foreach (Plan plan in _Plans)
                {
                    if (plan.ID != _intInitialPlanId)
                    {
                        plan.Fees.ApplySort("PaymentOrder", ListSortDirection.Ascending);

                        foreach (PlanFee fee in plan.Fees)
                        {
                            if (fee.Balance > 0)
                            {
                                planId    = plan.ID;
                                feeTypeId = fee.FeeTypeId;
                                break;
                            }
                        }
                    }
                }
            }

            FeePayment payment = new FeePayment(planId, ParentId, feeTypeId);

            this.Add(payment);

            return(payment);
        }