Changeset 71ca9e6 for remit


Ignore:
Timestamp:
Jun 1, 2010, 5:39:20 AM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
33cb144
Parents:
0671644
git-author:
Alex Dehnert <adehnert@…> (06/01/10 05:39:17)
git-committer:
Alex Dehnert <adehnert@…> (06/01/10 05:39:20)
Message:

Display total amount on summary sheet (Trac: #31)

Location:
remit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • remit/remit_templates/vouchers/vouchers.tex

    ra875cb6 r71ca9e6  
    1111\section{Summary Table}
    1212
    13 The following {{vouchers|length}} vouchers are included in this run:\\
     13The following {{vouchers|length}} vouchers (total: \${{total}}) are included in this run:\\
    1414\begin{tabular}{r|l|l|r|p{2in}}
    1515Account & Name & Email & Amount & Description \\
  • remit/vouchers/views.py

    r5e6ab71 r71ca9e6  
    1818from django.template.loader import get_template
    1919from django.views.generic import list_detail
     20
     21import decimal
    2022
    2123import settings
     
    308310        lst = lst.filter(processed=False)
    309311
     312    total = decimal.Decimal('0.00')
     313    for voucher in lst:
     314        total = total + voucher.amount
     315
    310316    context = {
    311317        'vouchers': lst,
     318        'total': total,
    312319        'MEDIA_ROOT': settings.MEDIA_ROOT,
    313320    }
Note: See TracChangeset for help on using the changeset viewer.