Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #67 from annttu/unpaid_paper_reminders

Unpaid paper reminders
  • Loading branch information...
commit ede8146d47e2a51b93572186f50ff43c1e8ae3ab 2 parents f2c459c + 1417675
@annttu annttu authored
View
5 membership/models.py
@@ -414,8 +414,9 @@ def paper_reminder_sent_unpaid_after(cls, days=14):
unpaid_filter = Q(billingcycle__is_paid=False)
type_filter = Q(type='P')
date_filter = Q(due_date__lt=datetime.now() - timedelta(days=days))
-
- bill_qs = Bill.objects.filter(unpaid_filter, type_filter, date_filter)
+ not_deleted_filter = Q(billingcycle__membership__status__exact='A')
+ bill_qs = Bill.objects.filter(unpaid_filter, type_filter, date_filter,
+ not_deleted_filter)
membership_ids = set()
for bill in bill_qs:
View
5 membership/urls.py
@@ -92,6 +92,11 @@
'template_name': 'membership/membership_list.html',
'template_object_name': 'member',
'paginate_by': ENTRIES_PER_PAGE}, name='unpaid_paper_reminded_memberships'),
+ url(r'memberships/unpaid_paper_reminded-plain/$', 'membership.views.member_object_list',
+ {'queryset': Membership.paper_reminder_sent_unpaid_after().order_by('id'),
+ 'template_name': 'membership/membership_list_plaintext.html',
+ 'template_object_name': 'member'},
+ name='unpaid_paper_reminded_memberships_plain'),
url(r'memberships/deleted/$', 'membership.views.member_object_list',
{'queryset': Membership.objects.filter(status__exact='D').order_by('-id'),
'template_name': 'membership/membership_list.html',
View
20 sikteeri/locale/fi/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-18 22:51+0200\n"
+"POT-Creation-Date: 2013-04-07 19:29+0300\n"
"PO-Revision-Date: 2013-02-18 22:58+0300\n"
"Last-Translator: Atte Hinkka <gua@kapsi.fi>\n"
"MIME-Version: 1.0\n"
@@ -110,37 +110,37 @@ msgstr "Lista avoimista laskuista"
#: templates/menu.html:40
msgid "Unpaid paper reminders"
-msgstr "Maksamattomat, paperimuistutetut"
+msgstr "Maksamattomat paperimuistutukset"
-#: templates/menu.html:41
+#: templates/menu.html:42
msgid "All bills"
msgstr "Kaikki laskut"
-#: templates/menu.html:42
+#: templates/menu.html:43
msgid "Unknown payments"
msgstr "Tunnistamattomat maksut"
-#: templates/menu.html:43
+#: templates/menu.html:44
msgid "Ignored payments"
msgstr "Huomiotta jätetyt maksut"
-#: templates/menu.html:44
+#: templates/menu.html:45
msgid "All payments"
msgstr "Kaikki maksut"
-#: templates/menu.html:45
+#: templates/menu.html:46
msgid "Print reminders"
msgstr "Tulosta muistutukset"
-#: templates/menu.html:47
+#: templates/menu.html:48
msgid "Import payments"
msgstr "Tuo maksut"
-#: templates/menu.html:52
+#: templates/menu.html:53
msgid "Send test e-mail"
msgstr "Lähetä testisähköposti"
-#: templates/menu.html:57
+#: templates/menu.html:58
msgid "Admin"
msgstr "Ylläpito"
View
3  sikteeri/templates/menu.html
@@ -37,7 +37,8 @@
{% if perms.membership.read_bills %}
<ul>
<li><a href="{% url unpaid_cycle_list %}">{% trans "List of unpaid bills" %}</a></li>
- <li><a href="{% url unpaid_paper_reminded_memberships %}">{% trans "Unpaid paper reminders" %}</a></li>
+ <li><a href="{% url unpaid_paper_reminded_memberships %}">{% trans "Unpaid paper reminders" %}</a>
+ <small><a href="{% url unpaid_paper_reminded_memberships_plain %}">txt</a></small></li>
<li><a href="{% url cycle_list %}">{% trans "All bills" %}</a></li>
<li><a href="{% url unknown_payment_list %}">{% trans "Unknown payments" %}</a></li>
<li><a href="{% url ignored_payment_list %}">{% trans "Ignored payments" %}</a></li>
Please sign in to comment.
Something went wrong with that request. Please try again.