void confirmButton_actionPerformed(ActionEvent e) {
    // view close dialog...
    if (JOptionPane.showConfirmDialog(
            ClientUtils.getParentFrame(this),
            ClientSettings.getInstance().getResources().getResource("close credit note?"),
            ClientSettings.getInstance().getResources().getResource("credit note closing"),
            JOptionPane.YES_NO_OPTION)
        == JOptionPane.YES_OPTION) {

      Response res = ClientUtils.getData("closeSaleDoc", controller.getPk());
      if (!res.isError()) {
        confirmButton.setEnabled(false);
        headerFormPanel.setMode(Consts.READONLY);
        headerFormPanel.executeReload();
        if (getInvoices() != null) getInvoices().reloadCurrentBlockOfData();
      } else
        JOptionPane.showMessageDialog(
            ClientUtils.getParentFrame(this),
            res.getErrorMessage(),
            ClientSettings.getInstance().getResources().getResource("credit note closing"),
            JOptionPane.ERROR_MESSAGE);
    }
  }
  private void jbInit() throws Exception {
    printButton.setToolTipText(
        ClientSettings.getInstance().getResources().getResource("print journal"));
    printButton.addActionListener(new JournalFilterFrame_printButton_actionAdapter(this));
    controlCompaniesCombo.setAttributeName("companyCodeSys01WAR01");

    this.setTitle(ClientSettings.getInstance().getResources().getResource("print journal"));
    buttonsPanel.setBorder(BorderFactory.createEtchedBorder());
    mainPanel.setLayout(gridBagLayout1);
    labelFromDate.setText("from date");
    labelToDate.setText("to date");
    labelFromItemNr.setText("from item number");
    labelCompanyCode.setText("companyCodeSys01WAR01");
    this.getContentPane().add(mainPanel, BorderLayout.CENTER);
    this.getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
    buttonsPanel.add(printButton, null);
    mainPanel.add(
        labelCompanyCode,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        labelFromDate,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        labelToDate,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        labelFromItemNr,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            1.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        controlCompaniesCombo,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        controlFromDate,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        controlToDate,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    mainPanel.add(
        controlFromItemNr,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    Calendar cal = Calendar.getInstance();
    cal.set(cal.DAY_OF_MONTH, 1);
    cal.set(cal.MONTH, 0);
    controlFromDate.setValue(cal.getTime());
    controlToDate.setValue(new Date());
  }
 public void enabledConfirmButton() {
   confirmButton.setEnabled(true);
 }
  public void loadDataCompleted(boolean error, SaleDocPK pk) {
    DetailSaleDocVO vo = (DetailSaleDocVO) headerFormPanel.getVOModel().getValueObject();

    this.setTitle(
        ClientSettings.getInstance().getResources().getResource("credit note")
            + (vo.getDocSequenceDOC01() != null
                ? " - " + vo.getDocYearDOC01() + "/" + vo.getDocSequenceDOC01()
                : "")
            + " - "
            + vo.getName_1REG04()
            + " "
            + (vo.getName_2REG04() == null ? "" : vo.getName_2REG04()));

    saleTotalsPanel1.getControlTaxableIncome().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlTaxableIncome().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1
        .getControlTaxableIncome()
        .setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1
        .getControlTaxableIncome()
        .setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlTotal().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlTotal().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlTotal().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlTotal().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlTotalVat().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlTotalVat().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlTotalVat().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlTotalVat().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlAllowance().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlAllowance().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlAllowance().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlAllowance().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlDeposit().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlDeposit().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlDeposit().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlDeposit().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    rowsPanel.setParentVO(vo);
    rowsPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk);
    rowsPanel.getGrid().reloadData();

    discPanel.setParentVO(vo);
    discPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk);
    discPanel.getGrid().reloadData();

    chargePanel.setParentVO(vo);
    chargePanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk);
    chargePanel.getGrid().reloadData();

    actPanel.setParentVO(vo);
    actPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk);
    actPanel.getGrid().reloadData();

    if (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED)
        || vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED)) {
      confirmButton.setEnabled(false);
      setButtonsEnabled(false);
      rowsPanel.setButtonsEnabled(false);
    }
    if (!vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(false);
    }
    if (vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(true);
    }

    if (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED)
        || vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED)
        || vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
      printButton.setEnabled(true);
    } else {
      printButton.setEnabled(false);
    }
  }
  private void jbInit() throws Exception {
    printButton.setToolTipText(
        ClientSettings.getInstance().getResources().getResource("print document"));
    printButton.addActionListener(new SaleCreditDocFrame_printButton_actionAdapter(this));

    addPanel.setLayout(borderLayout5);
    confirmButton.addActionListener(new SaleCreditDocFrame_confirmButton_actionAdapter(this));

    headerFormPanel.setFunctionId("DOC01_CREDITNOTES");
    headerFormPanel.setFormController(controller);
    headerFormPanel.setVOClassName("org.jallinone.sales.documents.java.DetailSaleDocVO");

    headerPanel.setLayout(borderLayout3);
    headerButtonsPanel.setLayout(flowLayout1);
    flowLayout1.setAlignment(FlowLayout.LEFT);
    mainPanel.setLayout(borderLayout2);
    this.getContentPane().setLayout(borderLayout1);
    linesPanel.setLayout(borderLayout4);
    insertButton1.setText("insertButton1");
    reloadButton1.setText("reloadButton1");
    deleteButton1.setText("deleteButton1");
    headerFormPanel.setLayout(gridBagLayout1);
    headerFormPanel.setInsertButton(insertButton1);
    headerFormPanel.setEditButton(editButton1);
    headerFormPanel.setReloadButton(reloadButton1);
    headerFormPanel.setDeleteButton(deleteButton1);
    headerFormPanel.setSaveButton(saveButton1);
    this.getContentPane().add(mainPanel, BorderLayout.CENTER);
    mainPanel.add(tabbedPane, BorderLayout.CENTER);
    tabbedPane.add(headerPanel, "header");
    headerPanel.add(headerButtonsPanel, BorderLayout.NORTH);
    headerButtonsPanel.add(insertButton1, null);
    headerButtonsPanel.add(editButton1, null);
    headerButtonsPanel.add(saveButton1, null);
    headerButtonsPanel.add(reloadButton1, null);
    headerButtonsPanel.add(deleteButton1, null);
    headerButtonsPanel.add(confirmButton, null);
    printButton.setEnabled(false);
    headerButtonsPanel.add(printButton, null);
    linesPanel.add(rowsPanel, BorderLayout.CENTER);
    headerPanel.add(headerFormPanel, BorderLayout.CENTER);
    headerFormPanel.add(
        saleIdHeadPanel1,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    headerFormPanel.add(
        saleCustomerHeadPanel1,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    headerFormPanel.add(
        warePanel,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    headerFormPanel.add(
        saleTotalsPanel1,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));

    confirmButton.setToolTipText(
        ClientSettings.getInstance().getResources().getResource("credit note closing"));
    confirmButton.setEnabled(false);

    addPanel.add(saleAgentPanel, BorderLayout.NORTH);
    addPanel.add(saleNotesPanel, BorderLayout.CENTER);

    tabbedPane.add(addPanel, "notes");
    tabbedPane.add(linesPanel, "items");
    tabbedPane.add(discPanel, "customer discounts");
    tabbedPane.add(chargePanel, "charges");
    tabbedPane.add(actPanel, "activities");

    headerFormPanel.addLinkedPanel(addPanel);

    tabbedPane.setTitleAt(0, ClientSettings.getInstance().getResources().getResource("header"));
    tabbedPane.setTitleAt(1, ClientSettings.getInstance().getResources().getResource("notes"));
    tabbedPane.setTitleAt(2, ClientSettings.getInstance().getResources().getResource("items"));
    tabbedPane.setTitleAt(
        3, ClientSettings.getInstance().getResources().getResource("customer discounts"));
    tabbedPane.setTitleAt(4, ClientSettings.getInstance().getResources().getResource("charges"));
    tabbedPane.setTitleAt(
        5, ClientSettings.getInstance().getResources().getResource("sale activities"));
  }
  private void jbInit() throws Exception {
    itemsGrid.setMaxNumberOfRowsOnInsert(50);
    impAllItemsButton.setToolTipText(
        ClientSettings.getInstance().getResources().getResource("import all items"));
    impAllItemsButton.addActionListener(
        new SupplierDetailFrame_impAllItemsButton_actionAdapter(this));

    detailPanel.setLayout(gridBagLayout4);
    itemsGrid.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    supplierPanel.setVOClassName("org.jallinone.purchases.suppliers.java.DetailSupplierVO");
    supplierPanel.addLinkedPanel(organizationPanel);
    titledBorder1 = new TitledBorder("");
    titledBorder2 = new TitledBorder("");
    subjectPanel.setLayout(gridBagLayout1);
    supplierPanel.setBorder(titledBorder1);
    supplierPanel.setLayout(gridBagLayout2);
    titledBorder1.setTitle(ClientSettings.getInstance().getResources().getResource("supplier"));
    titledBorder1.setTitleColor(Color.blue);
    labelSupplierCode.setText("supplierCodePUR01");
    labelPay.setText("payment terms");
    labelBank.setText("bank");
    controlSupplierCode.setAttributeName("supplierCodePUR01");
    controlSupplierCode.setCanCopy(false);
    controlSupplierCode.setLinkLabel(labelSupplierCode);
    controlSupplierCode.setMaxCharacters(20);
    //    controlSupplierCode.setRequired(true);
    controlSupplierCode.setTrimText(true);
    controlSupplierCode.setUpperCase(true);
    controlSupplierCode.setEnabledOnEdit(false);
    controlPayment.setAttributeName("paymentCodeReg10PUR01");
    controlPayment.setCanCopy(true);
    controlPayment.setLinkLabel(labelPay);
    controlPayment.setMaxCharacters(20);
    controlPayment.setRequired(true);
    controlPayDescr.setAttributeName("paymentDescriptionSYS10");
    controlPayDescr.setCanCopy(true);
    controlPayDescr.setEnabledOnInsert(false);
    controlPayDescr.setEnabledOnEdit(false);
    controlBank.setAttributeName("bankCodeReg12PUR01");
    controlBank.setCanCopy(true);
    controlBank.setLinkLabel(labelBank);
    controlBank.setMaxCharacters(20);
    controlBankDescr.setAttributeName("descriptionREG12");
    controlBankDescr.setCanCopy(true);
    controlBankDescr.setEnabledOnInsert(false);
    controlBankDescr.setEnabledOnEdit(false);
    refPanel.setLayout(borderLayout1);
    hierarPanel.setLayout(borderLayout4);
    treeGridItemsPanel.setLayout(borderLayout3);
    itemsSplitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
    itemsSplitPane.setDividerSize(5);
    itemsPanel.setLayout(borderLayout5);
    itemButtonsPanel.setLayout(flowLayout2);
    flowLayout2.setAlignment(FlowLayout.LEFT);
    itemsGrid.setAutoLoadData(false);
    itemsGrid.setDeleteButton(deleteButton1);
    itemsGrid.setEditButton(editButton1);
    itemsGrid.setExportButton(exportButton1);
    itemsGrid.setFunctionId("PUR01");
    itemsGrid.setMaxSortedColumns(3);
    itemsGrid.setInsertButton(insertButton1);
    itemsGrid.setNavBar(navigatorBar1);
    itemsGrid.setReloadButton(reloadButton1);
    itemsGrid.setSaveButton(saveButton1);
    itemsGrid.setValueObjectClassName("org.jallinone.purchases.items.java.SupplierItemVO");
    insertButton1.setText("insertButton1");
    editButton1.setText("editButton1");
    saveButton1.setText("saveButton1");
    reloadButton1.setText("reloadButton1");
    deleteButton1.setText("deleteButton1");
    itemHierarsPanel.setLayout(gridBagLayout3);
    labelHierar.setText("item hierarchies");
    colItemCode.setColumnFilterable(true);
    colItemCode.setColumnName("itemCodeItm01PUR02");
    colItemCode.setColumnSortable(true);
    colItemCode.setEditableOnInsert(true);
    colItemCode.setHeaderColumnName("itemCodeITM01");
    colItemCode.setPreferredWidth(90);
    colItemCode.setSortVersus(org.openswing.swing.util.java.Consts.ASC_SORTED);
    colItemCode.setMaxCharacters(20);
    colItemDescr.setColumnFilterable(true);
    colItemDescr.setColumnName("descriptionSYS10");
    colItemDescr.setColumnSortable(true);
    colItemDescr.setHeaderColumnName("itemDescriptionSYS10");
    colItemDescr.setPreferredWidth(200);
    colSupplierItemCode.setMaxCharacters(20);
    colSupplierItemCode.setTrimText(true);
    colSupplierItemCode.setUpperCase(true);
    colSupplierItemCode.setColumnFilterable(true);
    colSupplierItemCode.setColumnName("supplierItemCodePUR02");
    colSupplierItemCode.setColumnSortable(true);
    colSupplierItemCode.setEditableOnEdit(true);
    colSupplierItemCode.setEditableOnInsert(true);
    colSupplierItemCode.setHeaderColumnName("supplierItemCodePUR02");
    colSupplierItemCode.setPreferredWidth(120);
    colUmCode.setColumnDuplicable(true);
    colUmCode.setColumnFilterable(true);
    colUmCode.setColumnName("umCodeReg02PUR02");
    colUmCode.setEditableOnEdit(true);
    colUmCode.setEditableOnInsert(true);
    colUmCode.setHeaderColumnName("umCodeReg02PUR02");
    colUmCode.setMaxCharacters(20);
    colMinQty.setDecimals(2);
    colMinQty.setGrouping(false);
    colMinQty.setColumnDuplicable(true);
    colMinQty.setColumnFilterable(true);
    colMinQty.setColumnSortable(true);
    colMinQty.setEditableOnEdit(true);
    colMinQty.setEditableOnInsert(true);
    colMinQty.setPreferredWidth(80);
    colMinQty.setColumnName("minPurchaseQtyPUR02");
    colMultipleQty.setGrouping(false);
    colMultipleQty.setColumnDuplicable(true);
    colMultipleQty.setColumnFilterable(true);
    colMultipleQty.setColumnSortable(true);
    colMultipleQty.setEditableOnEdit(true);
    colMultipleQty.setEditableOnInsert(true);
    colMultipleQty.setPreferredWidth(80);
    colMultipleQty.setColumnName("multipleQtyPUR02");
    subjectPanel.add(
        organizationPanel,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.setTitle(ClientSettings.getInstance().getResources().getResource("supplier detail"));
    buttonsPanel.setLayout(flowLayout1);
    flowLayout1.setAlignment(FlowLayout.LEFT);
    insertButton.setText("insertButton1");
    editButton.setText("editButton1");
    saveButton.setEnabled(false);
    saveButton.setText("saveButton1");
    reloadButton.setText("reloadButton1");
    deleteButton.setText("deleteButton1");

    labelCompanyCode.setText("companyCodeSys01REG04");
    controlCompanyCode.setAttributeName("companyCodeSys01REG04");
    controlCompanyCode.setLinkLabel(labelCompanyCode);
    controlCompanyCode.setRequired(true);
    controlCompanyCode.setEnabledOnEdit(false);

    this.getContentPane().add(buttonsPanel, BorderLayout.NORTH);
    buttonsPanel.add(insertButton, null);
    buttonsPanel.add(editButton, null);
    buttonsPanel.add(saveButton, null);
    buttonsPanel.add(reloadButton, null);
    buttonsPanel.add(deleteButton, null);
    buttonsPanel.add(navigatorBar, null);
    //    tabbedPane.add(subjectPanel,   "generic data");
    this.getContentPane().add(tabbedPane, BorderLayout.CENTER);
    supplierPanel.add(
        labelCompanyCode,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        controlCompanyCode,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            0,
            0));

    //    tabbedPane.add(supplierPanel,    "supplierPanel");
    supplierPanel.add(
        labelSupplierCode,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        controlSupplierCode,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        labelPay,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        controlPayment,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            40,
            0));
    supplierPanel.add(
        controlPayDescr,
        new GridBagConstraints(
            2,
            2,
            2,
            1,
            1.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        labelPricelist,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        labelBank,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 0, 5),
            0,
            0));
    supplierPanel.add(
        controlBank,
        new GridBagConstraints(
            1,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            40,
            0));
    supplierPanel.add(
        controlBankDescr,
        new GridBagConstraints(
            2,
            4,
            2,
            3,
            1.0,
            1.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 0, 5),
            0,
            0));

    supplierPanel.add(
        labelDebit,
        new GridBagConstraints(
            0,
            5,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            0,
            0));
    supplierPanel.add(
        labelPurchase,
        new GridBagConstraints(
            0,
            6,
            1,
            1,
            0.0,
            1.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 15, 5),
            0,
            0));
    supplierPanel.add(
        controlDebitsCode,
        new GridBagConstraints(
            1,
            5,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            40,
            0));
    supplierPanel.add(
        controlDebitsDescr,
        new GridBagConstraints(
            2,
            5,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 0, 5),
            0,
            0));
    supplierPanel.add(
        controlCostsCode,
        new GridBagConstraints(
            1,
            6,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            40,
            0));
    supplierPanel.add(
        controlCostsDescr,
        new GridBagConstraints(
            2,
            6,
            2,
            3,
            1.0,
            1.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 0, 5),
            0,
            0));

    labelDebit.setText("debits account");
    labelPurchase.setText("purchase costs account");
    controlDebitsCode.setAttributeName("debitAccountCodeAcc02PUR01");
    controlDebitsDescr.setAttributeName("debitAccountDescrPUR01");
    controlCostsCode.setAttributeName("costsAccountCodeAcc02PUR01");
    controlCostsDescr.setAttributeName("costsAccountDescrPUR01");

    detailPanel.add(
        subjectPanel,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(5, 5, 5, 5),
            0,
            0));
    detailPanel.add(
        supplierPanel,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(5, 5, 5, 5),
            0,
            0));
    tabbedPane.add(detailPanel, "supplier data");

    tabbedPane.add(refPanel, "references");
    refPanel.add(referencesPanel, BorderLayout.CENTER);
    tabbedPane.add(hierarPanel, "hierarchies");
    hierarPanel.add(hierarchiesPanel, BorderLayout.CENTER);
    tabbedPane.add(treeGridItemsPanel, "supplierItems");
    treeGridItemsPanel.add(itemsSplitPane, BorderLayout.CENTER);
    itemsSplitPane.add(treePanel, JSplitPane.LEFT);
    itemsSplitPane.add(itemsPanel, JSplitPane.RIGHT);
    itemsPanel.add(itemButtonsPanel, BorderLayout.NORTH);
    itemsPanel.add(itemsGrid, BorderLayout.CENTER);
    itemsGrid.getColumnContainer().add(colItemCode, null);
    itemButtonsPanel.add(insertButton1, null);
    itemButtonsPanel.add(editButton1, null);
    itemButtonsPanel.add(saveButton1, null);
    itemButtonsPanel.add(reloadButton1, null);
    itemButtonsPanel.add(deleteButton1, null);
    itemButtonsPanel.add(exportButton1, null);
    itemButtonsPanel.add(navigatorBar1, null);
    itemButtonsPanel.add(impAllItemsButton, null);

    controlDebitsCode.setLinkLabel(labelDebit);
    controlDebitsCode.setMaxCharacters(20);
    controlDebitsCode.setRequired(true);
    controlDebitsDescr.setEnabledOnInsert(false);
    controlDebitsDescr.setEnabledOnEdit(false);
    controlCostsCode.setLinkLabel(labelPurchase);
    controlCostsCode.setMaxCharacters(20);
    controlCostsCode.setRequired(true);
    controlCostsDescr.setEnabledOnInsert(false);
    controlCostsDescr.setEnabledOnEdit(false);

    treeGridItemsPanel.add(itemHierarsPanel, BorderLayout.NORTH);
    itemHierarsPanel.add(
        labelHierar,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 0),
            0,
            0));
    itemHierarsPanel.add(
        controlHierarchy,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            100,
            0));
    tabbedPane.add(supplierPricelistPanel, "supplierPricelistPanel");
    itemsGrid.getColumnContainer().add(colItemDescr, null);
    itemsGrid.getColumnContainer().add(colSupplierItemCode, null);
    itemsGrid.getColumnContainer().add(colUmCode, null);
    itemsGrid.getColumnContainer().add(colMinQty, null);
    itemsGrid.getColumnContainer().add(colMultipleQty, null);

    tabbedPane.setTitleAt(
        0, ClientSettings.getInstance().getResources().getResource("supplier data"));
    tabbedPane.setTitleAt(1, ClientSettings.getInstance().getResources().getResource("references"));
    tabbedPane.setTitleAt(
        2, ClientSettings.getInstance().getResources().getResource("hierarchies"));
    tabbedPane.setTitleAt(
        3, ClientSettings.getInstance().getResources().getResource("supplierItems"));
    tabbedPane.setTitleAt(
        4, ClientSettings.getInstance().getResources().getResource("supplierPricelists"));
    itemsSplitPane.setDividerLocation(200);
  }