Package nu.lazy8.ledger.port

Examples of nu.lazy8.ledger.port.AccountPeriodTable


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


              JOptionPane.PLAIN_MESSAGE);
        }
      }
    }
    EditBus.send(new CompanyListChanged(null, "no parameters"));
    EditBus.send(new CustomerListChanged(null, "no parameters"));
    EditBus.send(new AccountTypeListChanged(null, "no parameters"));
  }//}}}
View Full Code Here

        gpNames.add((String) groupdef[0]);
        gpIsInBalance.add(groupdef[2]);
        lastFoundGroup = (String) groupdef[0];
      }
    }
    AccountPeriodTable apt;
    java.sql.Date stopdate;
    java.sql.Date startdate;
    double[] preDefAmounts = new double[predefModel.getRowCount()];
    double[] groupAmounts = new double[numGroups];
    double[] individualAccounts = new double[listData.allAccountSel.length];
    //get all the comparissons.  If no comparisons, this loops just once
    for (int j = 0; j < iNumComparisons; j++) {
      //arrays must be zero before beginning this loop again
      ClearTheArrays(preDefAmounts, groupAmounts, individualAccounts, gpIsInBalance, false);
      if (useIncommingBalances.isSelected() && iPeriod != AccountPeriodTable.PERIOD_ALL) {
        //need to prefill all the assets and debts arrays
        //with the incomming balances.
        startdate = AccountPeriodTable.GetEarliestDate(((Integer) cc.comboBox.getSelectedItemsKey()).intValue());
        stopdate = new java.sql.Date(periodStartDates[j].getValue().getTime().getTime());
        Calendar selectStopDate = Calendar.getInstance();
        selectStopDate.setTime(stopdate);
        selectStopDate.add(Calendar.DATE, -1);
        //minus one day
        stopdate = new java.sql.Date(selectStopDate.getTime().getTime());
        apt = new AccountPeriodTable(view,
            CompId, startdate,
            stopdate, AccountPeriodTable.PERIOD_GIVEN,
            1, false);
        FillTheArrays(preDefAmounts, groupAmounts, individualAccounts, apt, dataset,
            lastCategoryName, gpNames, gpIsInBalance, graphType, iNumComparisons, 0);
        //get rid of result balances..
        ClearTheArrays(preDefAmounts, groupAmounts, individualAccounts, gpIsInBalance, true);
      }
      stopdate = new java.sql.Date(periodStartDates[j].getValue().getTime().getTime());
      startdate = stopdate;
      apt = new AccountPeriodTable(view,
          CompId, startdate,
          stopdate, iPeriod, ((Number) numPeriods.getValue()).intValue(),
          false);
      int periodNum = FillTheArrays(preDefAmounts, groupAmounts, individualAccounts, apt, dataset,
          lastCategoryName, gpNames, gpIsInBalance, graphType, iNumComparisons, j);
View Full Code Here

        Calendar selectStopDate = Calendar.getInstance();
        selectStopDate.setTime(startDateIn);
        selectStopDate.add(Calendar.DATE, -1);
        //minus one day
        java.sql.Date stopdate = new java.sql.Date(selectStopDate.getTime().getTime());
        AccountPeriodTable aptIncomming = new AccountPeriodTable(view,
            compId, startdate,
            stopdate, AccountPeriodTable.PERIOD_GIVEN,
            1, false);
        //now get the periods balances
        AccountPeriodTable aptPeriod = new AccountPeriodTable(view,
            compId, startDateIn,
            stopDateIn, AccountPeriodTable.PERIOD_GIVEN,
            1, false);
        //merge with the previously loaded array
        resultSet.beforeFirst();
View Full Code Here

    Calendar selectStopDate = Calendar.getInstance();
    selectStopDate.setTime(startDateIn);
    selectStopDate.add(Calendar.DATE, -1);
    //minus one day
    java.sql.Date stopdate = new java.sql.Date(selectStopDate.getTime().getTime());
    AccountPeriodTable apt = new AccountPeriodTable(view,
        compId, startdate,
        stopdate, AccountPeriodTable.PERIOD_GIVEN,
        1, false);
    for (int i = 0; i < apt.allFields.size(); i++) {
      Object[] aptFields = (Object[]) apt.allFields.get(i);
      int accNumToFind = ((Integer) aptFields[apt.FIELD_ACCOUNTNUM]).intValue();
      for (int j = 0; j < reportRows.size(); j++) {
        Object[] oldRow = (Object[]) reportRows.get(j);
        if (accNumToFind == ((Integer) oldRow[INFIELD_ACCOUNTNUM]).intValue()) {
          oldRow[INFIELD_INCOMMINGAMOUNT] = aptFields[apt.FIELD_AMOUNT];
          break;
        }
      }
    }
    //now get the periods balances
    apt = new AccountPeriodTable(view,
        compId, startDateIn,
        stopDateIn, AccountPeriodTable.PERIOD_GIVEN,
        1, false);
    //merge with the previously loaded array
    for (int i = 0; i < apt.allFields.size(); i++) {
View Full Code Here

                (String) aValue);
          }
        }//}}}
      };

    sorter = new TableSorter(dataModel);
    // Create the table
    JTable table = new JTable(sorter);
    // Use a scrollbar, in case there are many columns.
    table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
View Full Code Here

          -1, true);
      jTextArea.append(sbRow.toString());
      jTextArea.append(newline);
      double fDebitTotal = 0;
      double fCreditTotal = 0;
      IntHolder iType = new IntHolder();
      do {
        initializeRow(fieldAccSize, 8);

        addField(db.getObject("Amount.Account", iType),
            fieldAccSize, 2, iType.iValue, false);
View Full Code Here

        }//}}}
      };
    fileDialog.setFileFilter(filter);
    if (fileDialog.showOpenDialog(view) == JFileChooser.APPROVE_OPTION) {
      if (fileDialog.getSelectedFile().exists()) {
        WorkingDialog workDialog = new WorkingDialog(view);
        workDialog.setVisible(true);
        workDialog.SetProgress(0);
        try {
          ReadInFile(fileDialog.getSelectedFile());
          workDialog.dispose();
          //final adjustments
          JOptionPane.showMessageDialog(null,
              Translator.getTranslation("Successful"),
              "",
              JOptionPane.PLAIN_MESSAGE);
        } catch (Exception e) {
          e.printStackTrace();
          workDialog.dispose();
          JOptionPane.showMessageDialog(null,
              Translator.getTranslation("Failed to import") + " : " + e,
              "",
              JOptionPane.PLAIN_MESSAGE);
        }
View Full Code Here

    getContentPane().add(ps, BorderLayout.CENTER);
    m_monitor.setText("");
    m_monitor.replaceSelection(Translator.getTranslation("Enter the accounting period you want to work with.  This is usually from the beginning of the year to the end of the year.") + "\n" +
        Translator.getTranslation("Press NEXT to continue."));

    dateField1 = new DateField("From", "periodform", frameParent);
    dateField2 = new DateField("To", "periodform", frameParent);

    rightButton = new JButton(Translator.getTranslation("Next"));

    rightButton.addActionListener(
      new java.awt.event.ActionListener() {
View Full Code Here

    jPanel1.add(textField4);

    jPanel1.add(new JLabel());

    button1 = new HelpedButton(Translator.getTranslation("Cancel"),
        "Cancel", "dataconn", view);

    button1.addActionListener(
      new java.awt.event.ActionListener() {
        //{{{ +actionPerformed(java.awt.event.ActionEvent) : void
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          isAbort = true;
          DataConnectDialog.this.setVisible(false);
        }//}}}
      }
        );

    jPanel1.add(button1);

    JButton button4 = new HelpedButton(Translator.getTranslation("OK"),
        "ok", "dataconn", view);

    button4.addActionListener(
      new java.awt.event.ActionListener() {
        //{{{ +actionPerformed(java.awt.event.ActionEvent) : void
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          buttonOK();
        }//}}}
      }
        );
    jPanel1.add(button4);

    JButton button5 = new HelpedButton(Translator.getTranslation("Help"),
        "help", "dataconn", view);

    button5.addActionListener(
      new java.awt.event.ActionListener() {
        //{{{ +actionPerformed(java.awt.event.ActionEvent) : void
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          buttonHelp();
        }//}}}
View Full Code Here

TOP

Related Classes of nu.lazy8.ledger.port.AccountPeriodTable

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.