Package nu.lazy8.ledger.forms

Examples of nu.lazy8.ledger.forms.StartUpDialogs


      j1.add(jPanel1);
    } else {
      j1.add(new JPanel());
    }
    jPanel2.add(j1);
    accountAccess = new JdbcTable("APP.Account", 2, view);
    dataMovementPane = new DataMovementPane(
        accountAccess, this, bIsAddOnly, view);

    jPanel2.add(dataMovementPane);
View Full Code Here


    jPanel1.add(textField1);

    jPanel1.add(label2);
    jPanel1.add(textField2);

    CompanyAccess = new JdbcTable("Company", 1, view);
    dataMovementPane = new DataMovementPane(
        CompanyAccess, this, view);

    jPanel22.add(dataMovementPane);
View Full Code Here

    jPanel1.add(label3);
    jPanel1.add(textField3);

    jPanel1.add(new HelpedLabel(Translator.getTranslation("Default account"),
        "DefaultAccount", "customer", view));
    accountCombo = new DataComboBox(new JdbcTable("APP.Account", 2, view), true, "Account", "transaction", view);
    accountCombo.loadComboBox("AccDesc", "Account", (Integer) cc.comboBox.getSelectedItemsKey());
    accountCombo.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
    accountCombo.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));

    jPanel1.add(accountCombo);

    customerAccess = new JdbcTable("Customer2", 2, view);
    dataMovementPane = new DataMovementPane(
        customerAccess, this, bIsAddOnly, view);

    jPanel22.add(dataMovementPane);
    JPanel horizontalSpacePanel = new JPanel();
View Full Code Here

    StringBuffer sb = new StringBuffer();
    sb.append(
        "SELECT CustId ,CustName, CustDesc, DefaultAcc " +
        " FROM Customer2 WHERE CompId=" + compId +
        " ORDER BY CustId ");
    JdbcTable db = new JdbcTable(sb.toString(), view, new int[]{0});
    if (isJFreeReport) {
      db.GetFirstRecord();
      return new CustomerTable(db.resultSet);
    }

    if (!db.GetFirstRecord()) {
      return "";
    }

    //Print the Report header
    AddReportHeaders();

    initializeRow(fieldSize, 3);
    addField(Translator.getTranslation("CustId"), fieldSize, 1,
        -1, false);
    addField(Translator.getTranslation("Customer name"), fieldSize, 2,
        -1, false);
    addField(Translator.getTranslation("Customer description"), fieldSize, 3,
        -1, false);
    addField(Translator.getTranslation("Default account"), fieldSize, 4,
        -1, false);
    jTextArea.append(sbRow.toString());
    jTextArea.append(newline);
    initializeRow(fieldSize, 3);
    addField("-----------------------", fieldSize, 1, -1, false);
    addField("------------------------------------------------------------", fieldSize, 2, -1, false);
    addField("------------------------------------------------------------", fieldSize, 3, -1, false);
    addField("-----------------------", fieldSize, 4, -1, false);
    jTextArea.append(sbRow.toString());
    jTextArea.append(newline);

    do {
      jTextArea.append(renderIntegerField(
          db.getObject("CustId", null), fieldSize[1]));
      jTextArea.append(renderField((String)
          db.getObject("CustName", null), fieldSize[2]));
      jTextArea.append(renderField((String)
          db.getObject("CustDesc", null), fieldSize[3]));
      jTextArea.append(renderIntegerField((Integer)
          db.getObject("DefaultAcc", null), fieldSize[4]));
      jTextArea.append(newline);
    } while (db.GetNextRecord());

    return jTextField3.getText();
  }//}}}
View Full Code Here

   * @param  compId         Description of the Parameter
   * @return                Description of the Return Value
   */
  public Object buttonGetReportOld(boolean isJFreeReport,
      String rapName, int compId) {
    JdbcTable db = getJdbcTable(compId, true);
    if (isJFreeReport) {
      if (db==null)return null;
      db.GetFirstRecord();
      try {
        return new AccountReportTable(db.resultSet,new java.sql.Date(
            jTextField1.getDate().getTime()),new java.sql.Date(
            jTextField2.getDate().getTime()),compId);
      } catch (Exception e) {
        e.printStackTrace();
        return null;
      }
    }
    if (db==null)return "";

    if (!db.GetFirstRecord()) {
      return "";
    }

    if (((Integer) customerComboBox.getSelectedItemsKey()).intValue() != 0) {
      jTextArea.append(Translator.getTranslation("Customer") + "     " + customerComboBox.getSelectedItemsSecondaryKey());
      jTextArea.append(newline);
    }
    //Print the Report header
    AddReportHeaders();

    Integer processingAccount = (Integer) db.getObject("Amount.Account", null);
    Integer processingCustomer = (Integer) db.getObject("Amount.Customer", null);
    boolean bIsNewAccount = true;
    boolean bIsNewCustomer = true;
    boolean bIsNewPost = false;
    double fDebitTotal = 0;
    double fCreditTotal = 0;
    double fCustDebitTotal = 0;
    double fCustCreditTotal = 0;
    do {
      if(bIsNewAccount){
        jTextArea.append("               " + Translator.getTranslation("Account") +
            " " + IntegerField.ConvertIntToLocalizedString(
            processingAccount) + " : " +
            (String) db.getObject("AccDesc", null));
        jTextArea.append(newline);
        jTextArea.append(newline);
      }
      jTextArea.append("               " + Translator.getTranslation("Customer") +
          " " + IntegerField.ConvertIntToLocalizedString(
          processingCustomer) + " : " +
          (String) db.getObject("CustName", null));
      jTextArea.append(newline);
      jTextArea.append(newline);
      initializeRow(fieldSize, 6);
      addField(Translator.getTranslation("Transaction"), fieldSize, 1,
          -1, false);
      addField(Translator.getTranslation("InvDate"), fieldSize, 2,
          -1, false);
      addField(Translator.getTranslation("Commentary"), fieldSize, 3,
          -1, false);
      addField(Translator.getTranslation("Commentary"), fieldSize, 4,
          -1, false);
      addField(Translator.getTranslation("Customer"), fieldSize, 5,
          -1, false);
      addField(Translator.getTranslation("Debit"), fieldSize, 6,
          -1, true);
      addField(Translator.getTranslation("Credit"), fieldSize, 7,
          -1, true);
      jTextArea.append(sbRow.toString());
      jTextArea.append(newline);

      do {
        jTextArea.append(renderIntegerField(
            db.getObject("Amount.Act_id", null), fieldSize[1]));
        jTextArea.append(renderDateField(
            db.getObject("InvDate", null), fieldSize[2]));
        jTextArea.append(renderField((String)
            db.getObject("Activity2.Notes", null), fieldSize[3]));
        jTextArea.append(renderField((String)
            db.getObject("Amount.Notes", null), fieldSize[4]));
        jTextArea.append(renderField((String)
            db.getObject("CustName", null), fieldSize[5]));

        jTextArea.append(renderDecimalField(((Double)
            db.getObject("Debit", null)), fieldSize[6]));
        fCustDebitTotal += ((Double)
            db.getObject("Debit", null)).doubleValue();
        fDebitTotal += ((Double)
            db.getObject("Debit", null)).doubleValue();
        jTextArea.append(renderDecimalField(((Double)
            db.getObject("Credit", null)), fieldSize[7]));
        fCustCreditTotal += ((Double)
            db.getObject("Credit", null)).doubleValue();
        fCreditTotal += ((Double)
            db.getObject("Credit", null)).doubleValue();
        jTextArea.append(newline);
        bIsNewPost = db.GetNextRecord();
        if (bIsNewPost) {
          bIsNewAccount = processingAccount.compareTo(
              (Integer) db.getObject("Amount.Account", null)) != 0;
          bIsNewCustomer = processingCustomer.compareTo(
              (Integer) db.getObject("Amount.Customer", null)) != 0;
        }
      } while (bIsNewPost && !bIsNewAccount && !bIsNewCustomer);
      initializeRow(fieldSize, 7);
      addField("-----------------------", fieldSize, 6, -1, false);
      addField("-----------------------", fieldSize, 7, -1, false);
      jTextArea.append(sbRow.toString());
      jTextArea.append(newline);
      initializeRow(fieldSize, 7);
      addField(Translator.getTranslation("Balance"), fieldSize, 4, -1, false);
      addField(new Double(fCustDebitTotal-fCustCreditTotal), fieldSize, 5, Types.DOUBLE, false);
      addField(new Double(fCustDebitTotal), fieldSize, 6, Types.DOUBLE, false);
      addField(new Double(fCustCreditTotal), fieldSize, 7, Types.DOUBLE, false);
      jTextArea.append(sbRow.toString());
      jTextArea.append(newline);
      processingCustomer = (Integer) db.getObject("Amount.Customer", null);
      fCustCreditTotal=0;
      fCustDebitTotal=0;
      if(bIsNewAccount || !bIsNewPost){
        initializeRow(fieldSize, 7);
        addField("-----------------------", fieldSize, 6, -1, false);
        addField("-----------------------", fieldSize, 7, -1, false);
        jTextArea.append(sbRow.toString());
        jTextArea.append(newline);
        initializeRow(fieldSize, 7);
        addField(Translator.getTranslation("Balance"), fieldSize, 4, -1, false);
        addField(new Double(fDebitTotal-fCreditTotal), fieldSize, 5, Types.DOUBLE, false);
        addField(new Double(fDebitTotal), fieldSize, 6, Types.DOUBLE, false);
        addField(new Double(fCreditTotal), fieldSize, 7, Types.DOUBLE, false);
        jTextArea.append(sbRow.toString());
        jTextArea.append(newline);
        processingAccount = (Integer) db.getObject("Amount.Account", null);
        fCreditTotal=0;
        fDebitTotal=0;
      }

    } while (bIsNewPost);
View Full Code Here

          startNum=rs.getInt("id")+1;
        }
        st.close();
      }catch(Exception e){
      }
      UniqNumGenerator a = new UniqNumGenerator();
      accountTypeAccess.setObject(
          new Integer(a.GetUniqueNumber("AccTypeId", startNum, 999999999,
          (Integer) cc.comboBox.getSelectedItemsKey())), "AccTypeId");
    } else {
      getCustomerId(i++);
    }
    accountTypeAccess.setObject(textField2.getText(), "TypeName");
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodDelete() {
    super.AfterGoodDelete();
    EditBus.send(new AccountListChanged(this, "no parameters"));
  }//}}}
View Full Code Here

  }//}}}

  //{{{ +AfterGoodChange() : void
  public void AfterGoodChange() {
    super.AfterGoodChange();
    EditBus.send(new AccountListChanged(this, "no parameters"));
    wasWriteOk = true;
    if (parent != null && bIsAddOnly) {
      parent.setVisible(false);
    }
  }//}}}
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodWrite() {
    super.AfterGoodWrite();
    EditBus.send(new AccountListChanged(this, "no parameters"));
    wasWriteOk = true;
    if (parent != null && bIsAddOnly) {
      parent.setVisible(false);
    }
  }//}}}
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodDelete() {
    super.AfterGoodDelete();
    EditBus.send(new AccountTypeListChanged(this, "no parameters"));
  }//}}}
View Full Code Here

TOP

Related Classes of nu.lazy8.ledger.forms.StartUpDialogs

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.