Changeset a838ee3
- Timestamp:
- Mar 27, 2010, 10:54:50 PM (15 years ago)
- Branches:
- master, client
- Children:
- 1c178d5
- Parents:
- d1692e8
- git-author:
- Alex Dehnert <adehnert@…> (03/27/10 22:54:50)
- git-committer:
- Alex Dehnert <adehnert@…> (03/27/10 22:54:50)
- Location:
- remit/finance_core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
remit/finance_core/reporting.py
rd1692e8 ra838ee3 106 106 } 107 107 108 def append_totals(table): 109 # Row totals 110 for row in table: 111 row.append(sum(row)) 112 # Column totals 113 if len(table) > 0: 114 totalrow = [None]*len(table[0]) 115 for col in xrange(len(table[0])): 116 totalrow[col] = sum([row[col] for row in table]) 117 table.append(totalrow) -
remit/finance_core/views.py
rd1692e8 ra838ee3 95 95 raise Http404("Unknown compute_method selected") 96 96 table = build_table(line_items, primary_field, secondary_field, primary_axis, secondary_axis, ) 97 finance_core.reporting.append_totals(table) 98 primary_labels.append("Total") 99 secondary_labels.append("Total") 97 100 98 101 debug = True
Note: See TracChangeset
for help on using the changeset viewer.