private void doRefreshReport(java.awt.event.ActionEvent evt) { // GEN-FIRST:event_doRefreshReport
    Date fromDate = dpStartDate.getDate();
    Date toDate = dpEndDate.getDate();

    if (fromDate.after(toDate)) {
      POSMessageDialog.showError(
          com.floreantpos.util.POSUtil.getFocusedWindow(),
          com.floreantpos.POSConstants.FROM_DATE_CANNOT_BE_GREATER_THAN_TO_DATE_);
      return;
    }

    try {
      reportPanel.removeAll();
      reportPanel.revalidate();

      if (report != null) {
        int reportType = cbReportType.getSelectedIndex();

        report.setReportType(reportType);
        report.setStartDate(fromDate);
        report.setEndDate(toDate);

        report.refresh();

        if (report != null && report.getViewer() != null) {
          reportPanel.add(report.getViewer());
          reportPanel.revalidate();
        }
      }

    } catch (Exception e) {
      MessageDialog.showError(com.floreantpos.POSConstants.ERROR_MESSAGE, e);
    }
  } // GEN-LAST:event_doRefreshReport
 public void actionPerformed(ActionEvent e) {
   try {
     MenuModifierGroupForm editor = new MenuModifierGroupForm();
     BeanEditorDialog dialog =
         new BeanEditorDialog(editor, Application.getInstance().getBackOfficeWindow(), true);
     dialog.open();
   } catch (Exception x) {
     MessageDialog.showError(com.floreantpos.POSConstants.ERROR_MESSAGE, x);
   }
 }
  @Override
  protected boolean updateModel() {
    Tax tax = (Tax) getBean();

    String name = tfName.getText();
    if (POSUtil.isBlankOrNull(name)) {
      MessageDialog.showError(com.floreantpos.POSConstants.NAME_REQUIRED);
      return false;
    }

    tax.setName(name);
    tax.setRate(new Double(tfRate.getValue().toString()).doubleValue());

    return true;
  }
  // End of variables declaration//GEN-END:variables
  @Override
  public boolean save() {

    try {
      if (!updateModel()) return false;

      Tax tax = (Tax) getBean();
      TaxDAO dao = new TaxDAO();
      dao.saveOrUpdate(tax);
    } catch (Exception e) {
      MessageDialog.showError(e);
      return false;
    }

    return true;
  }