Example #1
0
 public LeaseItem copy(
     final @ParameterLayout(named = "Start date") LocalDate startDate,
     final InvoicingFrequency invoicingFrequency,
     final PaymentMethod paymentMethod,
     final Charge charge) {
   final LeaseItem newItem =
       getLease()
           .newItem(
               this.getType(),
               charge,
               invoicingFrequency,
               paymentMethod,
               startDate,
               getApplicationTenancy());
   this.copyTerms(startDate, newItem);
   this.changeDates(getStartDate(), newItem.getInterval().endDateFromStartDate());
   return newItem;
 }