public void updateFee() {
    if (getCurrentPackege() == null) {
      UtilityController.addErrorMessage("Please select a package");
      return;
    }
    if (getCurrentItem() == null) {
      UtilityController.addErrorMessage("Please select an item");
      return;
    }

    getFacade().edit(getCurrent());
    UtilityController.addSuccessMessage("savedFeeSuccessfully");
    saveCharge();
    // recreateModel();
    getItems();
  }
  /** Delete the current PackageItem */
  public void delete() {

    if (current != null) {
      current.setRetired(true);
      current.setRetiredAt(Calendar.getInstance(TimeZone.getTimeZone("IST")).getTime());
      current.setRetirer(getSessionController().getLoggedUser());
      getFacade().edit(current);
      UtilityController.addSuccessMessage("DeleteSuccessfull");
    } else {
      UtilityController.addSuccessMessage("NothingToDelete");
    }
    recreateModel();
    getItems();
    current = null;
    getCurrent();
  }
  public void saveSelected() {

    if (getCurrent().getId() != null && getCurrent().getId() > 0) {

      getFacade().edit(current);

      UtilityController.addSuccessMessage("savedOldSuccessfully");
    } else {
      current.setCreatedAt(Calendar.getInstance(TimeZone.getTimeZone("IST")).getTime());
      current.setCreater(getSessionController().getLoggedUser());
      getFacade().create(current);
      UtilityController.addSuccessMessage("savedNewSuccessfully");
    }
    recreateModel();
    getItems();
  }
  public void removeFromPackage() {
    if (getCurrentPackege() == null) {
      UtilityController.addErrorMessage("Please select a package");
      return;
    }
    if (getCurrent() == null) {
      UtilityController.addErrorMessage("Please select an item");
      return;
    }

    getCurrent().setRetired(true);
    getCurrent().setRetirer(getSessionController().getLoggedUser());
    getCurrent().setRetiredAt(Calendar.getInstance(TimeZone.getTimeZone("IST")).getTime());
    getFacade().edit(getCurrent());
    UtilityController.addSuccessMessage("Item Removed");
    recreateModel();
  }
  public void addToPackage() {
    if (getCurrentPackege() == null) {
      UtilityController.addErrorMessage("Please select a package");
      return;
    }
    if (getCurrentItem() == null) {
      UtilityController.addErrorMessage("Please select an item");
      return;
    }
    PackageItem pi = new PackageItem();

    pi.setPackege(getCurrentPackege());
    pi.setItem(getCurrentItem());
    pi.setCreatedAt(Calendar.getInstance(TimeZone.getTimeZone("IST")).getTime());
    pi.setCreater(sessionController.loggedUser);
    getFacade().create(pi);
    UtilityController.addSuccessMessage("Added");
    recreateModel();
  }