- Timestamp:
- 7 Mar 2015, 04:18:42 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/contracts.py
r12681 r12683 32 32 IContractSelectProduct, ICustomersUtils, ISampleContract, 33 33 ISampleContractProcess, ISampleContractEdit, ISampleContractOfficialUse) 34 from waeup.ikoba.payments.interfaces import IPaymentItem 35 from waeup.ikoba.payments.payment import PaymentItem 34 36 from waeup.ikoba.utils.helpers import attrs_to_fields 35 37 … … 56 58 57 59 ContractsContainer = attrs_to_fields(ContractsContainer) 60 61 62 def payment_items_from_contract(contract): 63 """Turn contract product options into payment items. 64 """ 65 result = [] 66 for num, option in enumerate(contract.product_options): 67 item = PaymentItem() 68 item.item_id = u'%s' % num 69 item.title = option.title 70 item.amount = option.fee 71 result.append(item) 72 return result 58 73 59 74
Note: See TracChangeset for help on using the changeset viewer.