Ignore:
Timestamp:
28 Dec 2022, 09:57:26 (21 months ago)
Author:
Henrik Bettermann
Message:

Add p_currency field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/payments/interfaces.py

    r17242 r17246  
    1818from zope.interface import Attribute
    1919from zope import schema
    20 from waeup.kofa.interfaces import SimpleKofaVocabulary
     20from waeup.kofa.interfaces import (
     21    SimpleKofaVocabulary, ContextualDictSourceFactoryBase)
    2122from waeup.kofa.payments.interfaces import IPayment
    2223from kofacustom.nigeria.interfaces import MessageFactory as _
     24
     25class CurrencySymbolSource(ContextualDictSourceFactoryBase):
     26    """A payment category source delivers all categories of payments.
     27
     28    """
     29    DICT_NAME = 'CURRENCY_DICT'
    2330
    2431class INigeriaOnlinePayment(IPayment):
     
    5663
    5764    # Only defined in kofacustom.nigeria package
     65
     66    p_currency = schema.Choice(
     67        title = _(u'Currency'),
     68        source = CurrencySymbolSource(),
     69        required = False,
     70        default = 'NGN',
     71        )
    5872
    5973    r_pay_reference = schema.TextLine(
     
    125139INigeriaOnlinePayment['net_amt'].order = INigeriaOnlinePayment[
    126140    'amount_auth'].order
     141INigeriaOnlinePayment['p_currency'].order = INigeriaOnlinePayment[
     142    'amount_auth'].order
Note: See TracChangeset for help on using the changeset viewer.