protected void transactionDateRangeSelector() {
    dateRangeSelector = new SelectCombo(messages.date());

    ArrayList<String> dateRangeList = new ArrayList<String>();
    String[] dateRangeArray = {
      messages.all(),
      messages.thisWeek(),
      messages.thisMonth(),
      messages.lastWeek(),
      messages.lastMonth(),
      messages.thisFinancialYear(),
      messages.lastFinancialYear(),
      messages.thisFinancialQuarter(),
      messages.lastFinancialQuarter(),
      messages.financialYearToDate()
    };
    for (int i = 0; i < dateRangeArray.length; i++) {
      dateRangeList.add(dateRangeArray[i]);
    }
    dateRangeSelector.initCombo(dateRangeList);

    dateRangeSelector.setComboItem(messages.all());
    dateRangeSelector.addSelectionChangeHandler(
        new IAccounterComboSelectionChangeHandler<String>() {
          @Override
          public void selectedComboBoxItem(String selectItem) {
            dateRangeSelector.setComboItem(selectItem);
            if (dateRangeSelector.getValue() != null) {
              dateRangeChanged(selectItem);
              callRPC(0, getPageSize());
            }
          }
        });
  }
  private void viewTypeCombo() {
    if (activeInActiveSelect == null) {
      activeInActiveSelect = new SelectCombo(messages.show());

      List<String> activetypeList = new ArrayList<String>();
      activetypeList.add(messages.active());
      activetypeList.add(messages.inActive());
      activeInActiveSelect.initCombo(activetypeList);
      activeInActiveSelect.setComboItem(messages.active());
      activeInActiveSelect.addSelectionChangeHandler(
          new IAccounterComboSelectionChangeHandler<String>() {

            @Override
            public void selectedComboBoxItem(String selectItem) {
              if (activeInActiveSelect.getSelectedValue() != null) {
                if (activeInActiveSelect
                    .getSelectedValue()
                    .toString()
                    .equalsIgnoreCase(messages.active())) {
                  refreshActiveinActiveList(true);
                } else {
                  refreshActiveinActiveList(false);
                }
              }
            }
          });
    }
  }
  private void transactionViewTypeSelectCombo() {
    if (trasactionViewTypeSelect == null) {
      trasactionViewTypeSelect = new SelectCombo(messages.type());
      getMessagesList();
      trasactionViewTypeSelect.addSelectionChangeHandler(
          new IAccounterComboSelectionChangeHandler<String>() {

            @Override
            public void selectedComboBoxItem(String selectItem) {
              if (trasactionViewTypeSelect.getSelectedValue() != null) {
                callRPC(0, getPageSize());
              }
            }
          });
    }
  }
  private void transactionViewSelectCombo() {
    if (trasactionViewSelect == null) {
      trasactionViewSelect = new SelectCombo(messages.currentView());

      ArrayList<String> transactionTypeList = new ArrayList<String>();
      transactionTypeList.add(messages.allTransactions());
      for (String type : transactionTypes) {
        if (type.equalsIgnoreCase(messages.Charges())
            || type.equalsIgnoreCase(messages.credits())) {
          if (getPreferences().isDelayedchargesEnabled()) {
            transactionTypeList.add(type);
          } else {
            continue;
          }
        } else if (type.equalsIgnoreCase(messages.salesOrders())) {
          if (getPreferences().isSalesOrderEnabled()) {
            transactionTypeList.add(type);
          } else {
            continue;
          }
        } else if (type.equalsIgnoreCase(messages.purchaseOrders())) {
          if (getPreferences().isPurchaseOrderEnabled()) {
            transactionTypeList.add(type);
          } else {
            continue;
          }
        } else {
          transactionTypeList.add(type);
        }
      }
      trasactionViewSelect.initCombo(transactionTypeList);
      trasactionViewSelect.setComboItem(messages.allTransactions());
      trasactionViewSelect.addSelectionChangeHandler(
          new IAccounterComboSelectionChangeHandler<String>() {

            @Override
            public void selectedComboBoxItem(String selectItem) {
              if (trasactionViewSelect.getSelectedValue() != null) {
                getMessagesList();
                callRPC(0, 25);
              }
            }
          });
    }
  }
  private void transactionViewSelectCombo() {
    if (trasactionViewSelect == null) {
      trasactionViewSelect = new SelectCombo(messages.currentView());

      List<String> transactionTypeList = new ArrayList<String>();
      transactionTypeList.add(messages.allTransactions());
      transactionTypeList.add(messages.invoices());
      if (getPreferences().isDoyouwantEstimates()) {
        transactionTypeList.add(messages.quotes());
      }
      if (getCompany().getPreferences().isDelayedchargesEnabled()) {
        transactionTypeList.add(messages.Charges());
        transactionTypeList.add(messages.credits());
      }
      transactionTypeList.add(messages.cashSales());
      transactionTypeList.add(messages.receivedPayments());
      transactionTypeList.add(messages.CustomerCreditNotes());
      transactionTypeList.add(messages.customerRefunds(Global.get().Customer()));
      transactionTypeList.add(messages.cheques());
      if (getPreferences().isSalesOrderEnabled()) {
        transactionTypeList.add(messages.salesOrders());
      }
      trasactionViewSelect.initCombo(transactionTypeList);
      trasactionViewSelect.setComboItem(messages.allTransactions());
      trasactionViewSelect.addSelectionChangeHandler(
          new IAccounterComboSelectionChangeHandler<String>() {

            @Override
            public void selectedComboBoxItem(String selectItem) {
              if (trasactionViewSelect.getSelectedValue() != null) {
                getMessagesList();
                callRPC(0, getPageSize());
              }
            }
          });
    }
  }