public void initForm() {
    mbFirstTime = true;

    moFieldYear.setFieldValue(miClient.getSessionXXX().getWorkingYear());
    jckShowPayDays.setSelected(false);
    itemStateChangedShowPayDays(); // resets reference date

    if (mnBizPartnerId == SLibConsts.UNDEFINED) {
      moFieldBizPartner.resetField();
    } else {
      SFormUtilities.locateComboBoxItem(jcbBizPartner, new int[] {mnBizPartnerId});
    }
  }
  private void itemStateChangedShowPayDays() {
    int[] date = null;

    if (jckShowPayDays.isSelected()) {
      jftDateRef.setEnabled(true);
      jbPickDateRef.setEnabled(true);

      date = SLibTimeUtils.digestDate(miClient.getSession().getCurrentDate());
      moFieldDateRef.setFieldValue(
          SLibTimeUtils.createDate(moFieldYear.getInteger(), date[1], date[2]));
    } else {
      jftDateRef.setEnabled(false);
      jbPickDateRef.setEnabled(false);

      moFieldDateRef.resetField();
    }
  }