Skip to content
This repository
Browse code

Merge pull request #67 from annttu/unpaid_paper_reminders

Unpaid paper reminders
  • Loading branch information...
commit ede8146d47e2a51b93572186f50ff43c1e8ae3ab 2 parents f2c459c + 1417675
Antti Jaakkola annttu authored
5 membership/models.py
@@ -414,8 +414,9 @@ def paper_reminder_sent_unpaid_after(cls, days=14):
414 414 unpaid_filter = Q(billingcycle__is_paid=False)
415 415 type_filter = Q(type='P')
416 416 date_filter = Q(due_date__lt=datetime.now() - timedelta(days=days))
417   -
418   - bill_qs = Bill.objects.filter(unpaid_filter, type_filter, date_filter)
  417 + not_deleted_filter = Q(billingcycle__membership__status__exact='A')
  418 + bill_qs = Bill.objects.filter(unpaid_filter, type_filter, date_filter,
  419 + not_deleted_filter)
419 420
420 421 membership_ids = set()
421 422 for bill in bill_qs:
5 membership/urls.py
@@ -92,6 +92,11 @@
92 92 'template_name': 'membership/membership_list.html',
93 93 'template_object_name': 'member',
94 94 'paginate_by': ENTRIES_PER_PAGE}, name='unpaid_paper_reminded_memberships'),
  95 + url(r'memberships/unpaid_paper_reminded-plain/$', 'membership.views.member_object_list',
  96 + {'queryset': Membership.paper_reminder_sent_unpaid_after().order_by('id'),
  97 + 'template_name': 'membership/membership_list_plaintext.html',
  98 + 'template_object_name': 'member'},
  99 + name='unpaid_paper_reminded_memberships_plain'),
95 100 url(r'memberships/deleted/$', 'membership.views.member_object_list',
96 101 {'queryset': Membership.objects.filter(status__exact='D').order_by('-id'),
97 102 'template_name': 'membership/membership_list.html',
20 sikteeri/locale/fi/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
7 7 msgstr ""
8 8 "Project-Id-Version: PACKAGE VERSION\n"
9 9 "Report-Msgid-Bugs-To: \n"
10   -"POT-Creation-Date: 2013-02-18 22:51+0200\n"
  10 +"POT-Creation-Date: 2013-04-07 19:29+0300\n"
11 11 "PO-Revision-Date: 2013-02-18 22:58+0300\n"
12 12 "Last-Translator: Atte Hinkka <gua@kapsi.fi>\n"
13 13 "MIME-Version: 1.0\n"
@@ -110,37 +110,37 @@ msgstr "Lista avoimista laskuista"
110 110
111 111 #: templates/menu.html:40
112 112 msgid "Unpaid paper reminders"
113   -msgstr "Maksamattomat, paperimuistutetut"
  113 +msgstr "Maksamattomat paperimuistutukset"
114 114
115   -#: templates/menu.html:41
  115 +#: templates/menu.html:42
116 116 msgid "All bills"
117 117 msgstr "Kaikki laskut"
118 118
119   -#: templates/menu.html:42
  119 +#: templates/menu.html:43
120 120 msgid "Unknown payments"
121 121 msgstr "Tunnistamattomat maksut"
122 122
123   -#: templates/menu.html:43
  123 +#: templates/menu.html:44
124 124 msgid "Ignored payments"
125 125 msgstr "Huomiotta jätetyt maksut"
126 126
127   -#: templates/menu.html:44
  127 +#: templates/menu.html:45
128 128 msgid "All payments"
129 129 msgstr "Kaikki maksut"
130 130
131   -#: templates/menu.html:45
  131 +#: templates/menu.html:46
132 132 msgid "Print reminders"
133 133 msgstr "Tulosta muistutukset"
134 134
135   -#: templates/menu.html:47
  135 +#: templates/menu.html:48
136 136 msgid "Import payments"
137 137 msgstr "Tuo maksut"
138 138
139   -#: templates/menu.html:52
  139 +#: templates/menu.html:53
140 140 msgid "Send test e-mail"
141 141 msgstr "Lähetä testisähköposti"
142 142
143   -#: templates/menu.html:57
  143 +#: templates/menu.html:58
144 144 msgid "Admin"
145 145 msgstr "Ylläpito"
146 146
3  sikteeri/templates/menu.html
@@ -37,7 +37,8 @@
37 37 {% if perms.membership.read_bills %}
38 38 <ul>
39 39 <li><a href="{% url unpaid_cycle_list %}">{% trans "List of unpaid bills" %}</a></li>
40   - <li><a href="{% url unpaid_paper_reminded_memberships %}">{% trans "Unpaid paper reminders" %}</a></li>
  40 + <li><a href="{% url unpaid_paper_reminded_memberships %}">{% trans "Unpaid paper reminders" %}</a>
  41 + <small><a href="{% url unpaid_paper_reminded_memberships_plain %}">txt</a></small></li>
41 42 <li><a href="{% url cycle_list %}">{% trans "All bills" %}</a></li>
42 43 <li><a href="{% url unknown_payment_list %}">{% trans "Unknown payments" %}</a></li>
43 44 <li><a href="{% url ignored_payment_list %}">{% trans "Ignored payments" %}</a></li>

0 comments on commit ede8146

Please sign in to comment.
Something went wrong with that request. Please try again.