Changeset 1243 for WAeUP_SRP


Ignore:
Timestamp:
8 Jan 2007, 17:39:17 (18 years ago)
Author:
joachim
Message:

more fixes

Location:
WAeUP_SRP/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Payment.py

    r1239 r1243  
    3030        return "Payments"
    3131
    32 ###)
    33 
    3432InitializeClass(PaymentsFolder)
    3533
     
    5250        """compose title"""
    5351        content = self.getContent()
    54         heading = getattr(content,'heading',None)
    55         if heading is None:
    56             return self.title
    57         return heading
    58 
    59 ###)
     52        description = getattr(content,'type_description','')
     53        d = getattr(content,'date','')
     54        #pay_date = "%s.%s.%s %s:%s:%s" %(d[:2],d[2:4],d[4:6],d[6:8],d[8:10],d[10:])
     55        pay_date = d.strftime("%d.%m.%y. %H:%M:%S")
     56        amount = getattr(content,'amount','')
     57        if not (description or pay_date or amount):
     58            return self.getId()
     59        return "%(description)s %(amount)s N %(pay_date)s" % vars()
     60    ###)
    6061
    6162InitializeClass(Payment)
  • WAeUP_SRP/trunk/Widgets.py

    r1189 r1243  
    394394            for field in self.check_fields:
    395395                cv = getattr(record,field).upper()
    396                 cvs.append(cv)
     396                if len(cv.split()) > 1:
     397                    for splited in cv.split():
     398                        cvs.append(splited)
     399                else:
     400                    cvs.append(cv)
    397401                if cv  == value.upper():
    398402                    found = True
  • WAeUP_SRP/trunk/skins/waeup_epayment/epayment_cb.py

    r1229 r1243  
    3737              )
    3838pd = {}
    39 from Products.zdb import set_trace;set_trace()
     39#from Products.zdb import set_trace;set_trace()
    4040for rc,pdk in resp_codes:
    4141    pd[pdk] = request.get(rc)
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py

    r1235 r1243  
    2424student = getattr(students,student_id)
    2525sbrain = context.students_catalog(id=student_id)[0]
    26 res = context.portal_catalog(portal_type="Certificate",
    27                                      id = sbrain.course)
    28 if not res:
    29     logger.info('"%s","certificate not found", "%s"' % (student_id,course))
    30     sfc = "ART"
    31 else:   
    32     sfc = res[0].getPath().split('/')[-4]
     26amount,description = context.getSchoolFee(sbrain.faculty)
     27##res = context.portal_catalog(portal_type="Certificate",
     28##                                     id = sbrain.course)
     29##
     30##if not res:
     31##    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
     32##    sfc = "ART"
     33##else:   
     34##    sfc = res[0].getPath().split('/')[-4]
    3335info = {}
    34 info['amount'] = "75000"
    35 info['type_code'] = sfc
    36 info['type_description'] = "Schoolfee %s for 2006/2007 Session" % sfc
     36info['amount'] = amount
     37info['type_code'] = sbrain.faculty
     38info['type_description'] = description
    3739info['pay_bill_to'] = sbrain.name
    3840info['pay_ship_to'] = "University of Benin"
     
    4143info['student_email'] = sbrain.email
    4244now = DateTime.DateTime()
    43 info['pay_date'] = now.strftime("%d%m%y%H%M%S")
     45info['date'] = now
    4446order_id = info['order_id'] = "%d" % int(now.timeTime()*1000)
    4547info['order_id'] = "%s%s" % (student_id[1:],order_id)
     
    4850    payments = getattr(student,'payments')
    4951    d = {}
    50     d['Title'] = 'Online Payments'
     52    d['Title'] = 'Payments'
    5153    payments.getContent().edit(mapping=d)
     54    wftool.doActionFor(payments,'open')
    5255else:
    5356    payments = getattr(student,'payments')
    5457p_id = "p%s" % order_id
    5558payments.invokeFactory('Payment', p_id)
    56 #from Products.zdb import set_trace;set_trace()
    5759payment = getattr(payments,p_id)
    5860d = {}
    5961d.update(info)
    60 d['Title'] = "%(type_description)s %(pay_date) %(amount)s N" % info
     62#from Products.zdb import set_trace;set_trace()
    6163payment.getContent().edit(mapping=d)
    6264info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
    63 if context.portal_url().find('uniben-demo.waeup.org') >-1:
     65if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
     66   context.portal_url().find('uniben.waeup.org') >-1:
    6467    info['action'] = "http://www.wemaonlinepayments.biz/payment.aspx"
    6568else:
  • WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt

    r1238 r1243  
    2323      </metal:block>
    2424      <metal:main fill-slot="main">
    25         <table class="contentListing" width="100%">     
     25        <div>
     26          <a href="" tal:attributes="href string:${context/absolute_url}/pay_online">Pay Your Schoolfee online</a>
     27        </div>
     28        <table class="contentListing" width="100%">
    2629          <tr tal:repeat="row rows"
    2730              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
  • WAeUP_SRP/trunk/skins/waeup_epayment/simulate_callback.py

    r1235 r1243  
    1616args['x_RespCode'] = '00'
    1717args['x_CardNum'] = '0114'
    18 args['x_ApprAmt'] = '75000.00'
     18args['x_ApprAmt'] = REQUEST.get('x_amt')
    1919
    2020from urllib import urlencode
  • WAeUP_SRP/trunk/skins/waeup_epayment/wema_form.pt

    r1235 r1243  
    4848            Amount:
    4949            </td>
    50             <td> Naira <span tal:content="info/amount" /></td>
     50            <td> Naira <span tal:content="info/amount" />.00</td>
    5151          </tr>
    5252        </table>
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentFolderInfo.py

    r1214 r1243  
    2626info = {}
    2727member_id = str(member)
    28 #from Products.zdb import set_trace
    29 #set_trace()
     28#from Products.zdb import set_trace;set_trace()
    3029is_student = info['is_student'] = context.isStudent()
    3130is_staff = info['is_staff'] = context.isStaff()
     
    6867              'StudentPersonal': 'personal_view',
    6968              'StudentStudyCourse': 'study_course_view',
     69              'PaymentsFolder': 'payments_view',
    7070              'StudentPume': 'pume_view',
    7171              }
  • WAeUP_SRP/trunk/skins/waeup_student/student_index.py

    r1238 r1243  
    2626    elif context.portal_type == 'StudentClearance':
    2727        return context.clearance_view()
    28     elif context.portal_type == 'PaymentsFolder':
    29         return context.payments_view()
    3028    elif context.portal_type == 'Student':
    3129        return redirect("%s/student_view" % context.absolute_url())
    3230    return redirect("%s/waeup_document_view" % context.absolute_url())
    3331if context.isStudent():
     32    if context.portal_type == 'PaymentsFolder':
     33        return context.payments_view()
    3434    students_url = "%s/campus/students" % (context.portal_url())
    3535    id = str(member)
Note: See TracChangeset for help on using the changeset viewer.