Changeset 9774 for main


Ignore:
Timestamp:
6 Dec 2012, 08:39:26 (12 years ago)
Author:
Henrik Bettermann
Message:

Add function to write csv 'messages' into payments.log. The helper function is tested in custom packages.

Add payment attributes which store split amount values.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py

    r9747 r9774  
    106106    notify(grok.ObjectModifiedEvent(payment))
    107107    return True, msg, log
     108
     109def write_payments_log(id, payment):
     110    payment.logger.info(
     111        '%s,%s,%s,%s,%s,%s,%s,%s,,,' % (
     112        id, payment.p_id, payment.p_category,
     113        payment.amount_auth, payment.r_code,
     114        payment.provider_amt, payment.gateway_amt,
     115        payment.thirdparty_amt))
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/payments/interfaces.py

    r9468 r9774  
    8282        )
    8383
     84    provider_amt = schema.Float(
     85        title = _(u'BT Amount'),
     86        default = 0.0,
     87        required = False,
     88        readonly = False,
     89        )
     90
     91    gateway_amt = schema.Float(
     92        title = _(u'Gateway Amount'),
     93        default = 0.0,
     94        required = False,
     95        readonly = False,
     96        )
     97
     98    thirdparty_amt = schema.Float(
     99        title = _(u'Third Party Amount'),
     100        default = 0.0,
     101        required = False,
     102        readonly = False,
     103        )
     104
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py

    r9704 r9774  
    169169    """
    170170    grok.context(INigeriaStudentOnlinePayment)
    171     form_fields = grok.AutoFields(INigeriaStudentOnlinePayment)
     171    form_fields = grok.AutoFields(INigeriaStudentOnlinePayment).omit(
     172        'provider_amt', 'gateway_amt', 'thirdparty_amt')
    172173    form_fields[
    173174        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     
    197198    """
    198199    grok.context(INigeriaStudentOnlinePayment)
    199     form_fields = grok.AutoFields(INigeriaStudentOnlinePayment)
     200    form_fields = grok.AutoFields(INigeriaStudentOnlinePayment).omit(
     201        'provider_amt', 'gateway_amt', 'thirdparty_amt')
    200202    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    201203    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
Note: See TracChangeset for help on using the changeset viewer.