Changeset 2907


Ignore:
Timestamp:
10 Dec 2007, 14:18:55 (17 years ago)
Author:
joachim
Message:

fix

Location:
WAeUP_SRP/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Payment.py

    r2905 r2907  
    9090                p_type = "sc"
    9191                p_status = "paid"
     92                if type(doc.order_id) != type(''):
     93                    d['order_id'] = str(doc.order_id)
    9294                break
    9395            if doc.resp_code in ("00","IP","AP"):
     
    108110        d['item'] = getattr(student_record,'course','')
    109111        d['status'] = p_status
    110         d['resp_approved_amount'] = getattr(doc,'resp_approved_amount',None)
    111         d['resp_pay_reference'] = doc.resp_pay_reference
    112         d['resp_desc'] = doc.resp_desc
    113         d['resp_code'] = doc.resp_code
    114         d['resp_card_num'] = doc.resp_card_num
    115         d['date'] = getattr(doc,'date',None)
     112        # d['resp_approved_amount'] = getattr(doc,'resp_approved_amount',None)
     113        # d['resp_pay_reference'] = doc.resp_pay_reference
     114        # d['resp_desc'] = doc.resp_desc
     115        # d['resp_code'] = doc.resp_code
     116        # d['resp_card_num'] = doc.resp_card_num
     117        # d['date'] = getattr(doc,'date',None)
    116118
    117119        review_state = wftool.getInfoFor(self.aq_parent,'review_state',None)
  • WAeUP_SRP/base/WAeUPTables.py

    r2904 r2907  
    14701470        student_id = rpl[-4]
    14711471        data['student_id'] = student_id
     1472        modified = False
    14721473        try:
    14731474            self.modifyRecord(**data)
     1475            modified = True
    14741476        except KeyError:
    1475             self.addRecord(**data)
    1476         except:
    14771477            logger = logging.getLogger('WAeUPTables.PaymentsCatalog.%s' % self.__name__)
    1478             logger.info("could not add or modify entry for %(order_id)s" % data)
    1479     ###)
     1478            logger.info("could not modify entry for %(student_id)s with %(order_id)s" % data)
     1479        if not modified:
     1480            try:
     1481                self.addRecord(**data)
     1482            except:
     1483                logger = logging.getLogger('WAeUPTables.PaymentsCatalog.%s' % self.__name__)
     1484                logger.info("could not add or modify entry for %(student_id)s with %(order_id)s" % data)
     1485        ###)
    14801486
    14811487
Note: See TracChangeset for help on using the changeset viewer.