public void RemoveRentedUnit(RentedUnit rentedUnit)
 {
     //RentedContract.AddAjustmentPostForRentedUnitRemoval(rentedUnit);
     rentedUnit.Stock.CustomerAccountId = null;
     if (RentedUnits.Count(c => c.RemovalDate == null) == 0)
     {
         RentedContract.Charge     = MonthlyCharge;
         RentedContract.ExpiryDate = rentedUnit.RemovalDate;
     }
 }
 public void AddRentedUnitAndUpdateContract(RentedUnit rentedUnit)
 {
     RentedUnits = RentedUnits ?? new List <RentedUnit>();
     RentedUnits.Add(rentedUnit);
     if (GetActiveRentalContract() == null)
     {
         RentedContract = new RentalContract();
     }
     RentedContract.StartDate       = rentedUnit.RentedDate;
     RentedContract.ExpiryDate      = null;
     RentedContract.Charge          = MonthlyCharge;
     RentedContract.PaymentPeriodId = 1;
     RentedContract.NoOfUnits       = RentedUnits.Count;
     //RentedContract.AddAdjustmentPostForAddedRentedUnit(rentedUnit);
     rentedUnit.Stock.ProductLifeCycleId = (int)ProductLifeCycleStatus.Rented;
     rentedUnit.Stock.CustomerAccountId  = this.CustomerAccountId;
 }