Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 13155)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 13156)
@@ -4,4 +4,6 @@
 1.3.2.dev0 (unreleased)
 =======================
+
+* Include 'end day' when searching for payments in a given period.
 
 * Do not create special application payment tickets with zero amount.
Index: /main/waeup.kofa/trunk/docs/source/userdocs/documents.rst
===================================================================
--- /main/waeup.kofa/trunk/docs/source/userdocs/documents.rst	(revision 13155)
+++ /main/waeup.kofa/trunk/docs/source/userdocs/documents.rst	(revision 13156)
@@ -1,6 +1,6 @@
 .. _documents:
 
-Public Documents :sup:`in progress`
-***********************************
+Public Documents
+****************
 
 The documents section of Kofa is a tiny built-in content management
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 13155)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 13156)
@@ -20,5 +20,5 @@
 import os
 import grok
-from datetime import datetime
+from datetime import datetime, timedelta
 from zope.component import getUtility
 from waeup.kofa.interfaces import (
@@ -99,5 +99,5 @@
         tz = getUtility(IKofaUtils).tzinfo
         payments_start = tz.localize(payments_start)
-        payments_end = tz.localize(payments_end)
+        payments_end = tz.localize(payments_end) + timedelta(days=1)
         if p_state:
             # Only paid or unpaid tickets in payment period are considered
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 13155)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 13156)
@@ -849,9 +849,10 @@
             payments_start='nonsense', payments_end='nonsense')
         # If they match the format they are ignored by get_filtered and the
-        # exporter works properly
+        # exporter works properly.
+        # Attention: End day is included!
         exporter.export_filtered(
             self.app, self.outfile,
             current_session=None, current_level=None,
-            payments_start='01/04/2012', payments_end='02/04/2012')
+            payments_start='01/04/2012', payments_end='01/04/2012')
         result = open(self.outfile, 'rb').read()
         self.assertEqual(
@@ -865,9 +866,10 @@
             'r-code,,A111111,created,2012\r\n'
             )
-        # no results if payment_date is outside the given period
+        # Payment date is 2012-04-01, 14:12:01.
+        # No results if payment_date is outside the given period.
         exporter.export_filtered(
             self.app, self.outfile,
             current_session=None, current_level=None,
-            payments_start='31/03/2012', payments_end='01/04/2012')
+            payments_start='30/03/2012', payments_end='31/03/2012')
         result = open(self.outfile, 'rb').read()
         self.assertEqual(
@@ -888,12 +890,17 @@
             'r_code,r_desc,student_id,state,current_session\r\n'
             )
-        # no results if payment_date is not set
+        # No results if payment_date is not set
         self.payment.payment_date = None
         exporter.export_filtered(
             self.app, self.outfile,
             current_session=None, current_level=None,
-            payments_start='01/04/2012', payments_end='02/04/2012')
-        result = open(self.outfile, 'rb').read()
-        
+            payments_start='31/03/2012', payments_end='02/04/2012')
+        result = open(self.outfile, 'rb').read()
+        self.assertEqual(
+            result,
+            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
+            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
+            'r_code,r_desc,student_id,state,current_session\r\n'
+            )
         return
 
