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);