/**
   * To update the billing configuration
   *
   * @param nextRunDate
   * @param maxPeriods
   * @param entityID
   * @param generateReport
   * @param onlyRecurring
   * @param invoiceDateProcess
   * @return
   */
  public static BillingProcessConfigurationWS updateBillingConfig(
      Date nextRunDate,
      Integer maxPeriods,
      Integer entityID,
      Integer generateReport,
      Integer onlyRecurring,
      Integer invoiceDateProcess) {

    BillingProcessConfigurationWS config = new BillingProcessConfigurationWS();

    config.setNextRunDate(nextRunDate);
    config.setMaximumPeriods(maxPeriods);
    config.setEntityId(entityID);
    config.setGenerateReport(generateReport);
    config.setInvoiceDateProcess(invoiceDateProcess);
    config.setOnlyRecurring(onlyRecurring);
    // present in some branches, pls uncomment if required
    //        config.setPeriodUnitId(CommonConstants.PERIOD_UNIT_MONTH);
    //        config.setPeriodValue(1);
    return config;
  }
 public BillingProcessConfigurationDTO(
     BillingProcessConfigurationWS ws, CompanyDTO entity, PeriodUnitDTO unit) {
   this.id = ws.getId();
   this.periodUnitDTO = unit;
   this.entity = entity;
   this.nextRunDate = ws.getNextRunDate();
   this.generateReport = ws.getGenerateReport();
   this.retries = ws.getRetries();
   this.daysForRetry = ws.getDaysForRetry();
   this.daysForReport = ws.getDaysForReport();
   this.reviewStatus = ws.getReviewStatus();
   this.periodValue = ws.getPeriodValue();
   this.dueDateUnitId = ws.getDueDateUnitId();
   this.dueDateValue = ws.getDueDateValue();
   this.dfFm = ws.getDfFm();
   this.onlyRecurring = ws.getOnlyRecurring();
   this.invoiceDateProcess = ws.getInvoiceDateProcess();
   this.autoPayment = ws.getAutoPayment();
   this.maximumPeriods = ws.getMaximumPeriods();
   this.autoPaymentApplication = ws.getAutoPaymentApplication();
 }