Ejemplo n.º 1
0
  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());
            }
          }
        });
  }
Ejemplo n.º 2
0
  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);
                }
              }
            }
          });
    }
  }
Ejemplo n.º 3
0
  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());
              }
            }
          });
    }
  }
Ejemplo n.º 4
0
  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);
              }
            }
          });
    }
  }
Ejemplo n.º 5
0
  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());
              }
            }
          });
    }
  }