Ignore:
Timestamp:
27 Feb 2015, 21:56:34 (10 years ago)
Author:
Henrik Bettermann
Message:

Show validity period on contract pages and slips.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py

    r12633 r12634  
    5151from waeup.ikoba.mandates.mandate import PasswordMandate
    5252from waeup.ikoba.widgets.hrefwidget import HREFDisplayWidget
    53 from waeup.ikoba.utils.helpers import get_current_principal, to_timezone, now
     53from waeup.ikoba.utils.helpers import (
     54    get_current_principal, to_timezone, now, format_date)
    5455from waeup.ikoba.customers.interfaces import (
    5556    ICustomer, ICustomersContainer, ICustomerRequestPW, ICustomersUtils,
     
    15931594
    15941595    @property
     1596    def validity_period(self):
     1597        if self.context.valid_from or self.context.valid_to:
     1598            return "%s - %s" % (format_date(self.context.valid_from, self.request),
     1599                                format_date(self.context.valid_to, self.request))
     1600        return
     1601
     1602    @property
    15951603    def label(self):
    15961604        portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
Note: See TracChangeset for help on using the changeset viewer.