def getHouseholdAssets(self,projectid,selectedHNumbers): ''' get lists of household members for selected households''' householdAssets = [] connector = HouseholdBudget() householdAssets = connector.getHouseholdMembership(projectid,selectedHNumbers) return householdAssets
def getReportData(self): ''' get households that meet the combined criteria of household and personal characteristics''' projectid = self.getProjectID() if self.cmbHouseholds.currentText() =='All Households': allhid = [] row = 0 while (self.listViewHNumbers.model().item(row,0)): val = self.listViewHNumbers.model().item(row,0).text() allhid.append(str(val)) row = row + 1 selectedHNumbers = allhid else: selectedHNumbers = self.getSelectedHouseholdNumbers() connector = HouseholdBudget() householdMembership = connector.getHouseholdMembership(projectid,selectedHNumbers) householdAssets = connector.getAssets(projectid,selectedHNumbers) householdFoodIncome = connector.getFoodIncome(projectid,selectedHNumbers) householdCashIncome = connector.getCashIncome(projectid,selectedHNumbers) householdBudgetSummary = connector.householdBudgetSummaries(projectid,selectedHNumbers) return (selectedHNumbers,householdMembership,householdAssets,householdCashIncome,householdFoodIncome,householdBudgetSummary)