Event.parse_and_raise(source)
source.owner(OrgUtil.get_org_unit(source.owner())) # flesh the owner
- r.ctx.acq.fund_source.value = source
- return r.render('acq/financial/view_fund_source.html')
+ r.ctx.acq.funding_source.value = source
+ return r.render('acq/financial/view_funding_source.html')
def list(self):
r = RequestMgr()
r.ctx.core.authtoken.value, None, {"flesh_summary":1}).recv().content()
Event.parse_and_raise(sources)
- r.ctx.acq.fund_source_list.value = sources
+ r.ctx.acq.funding_source_list.value = sources
for source in sources:
source.owner(OrgUtil.get_org_unit(source.owner()))
- return r.render('acq/financial/list_fund_sources.html')
+ return r.render('acq/financial/list_funding_sources.html')
def create(self):
r = RequestMgr()
fund_mgr = oilsweb.lib.acq.fund.FundMgr(r)
- if r.ctx.acq.fund_source_name.value:
+ if r.ctx.acq.funding_source_name.value:
source = osrf.net_obj.NetworkObject.acqfs()
- source.name(r.ctx.acq.fund_source_name.value)
- source.owner(r.ctx.acq.fund_source_owner.value)
- source.currency_type(r.ctx.acq.fund_source_currency_type.value)
- source_id = fund_mgr.create_fund_source(source)
- return redirect_to(controller='acq/fund_source', action='view', id=source_id)
+ source.name(r.ctx.acq.funding_source_name.value)
+ source.owner(r.ctx.acq.funding_source_owner.value)
+ source.currency_type(r.ctx.acq.funding_source_currency_type.value)
+ source_id = fund_mgr.create_funding_source(source)
+ return redirect_to(controller='acq/funding_source', action='view', id=source_id)
perm_orgs = ClientSession.atomic_request(
'open-ils.actor',
r.ctx.core.perm_tree.value['CREATE_FUNDING_SOURCE'] = OrgUtil.get_union_tree(perm_orgs)
r.ctx.core.high_perm_orgs.value['CREATE_FUNDING_SOURCE'] = perm_orgs
r.ctx.acq.currency_types.value = fund_mgr.fetch_currency_types()
- return r.render('acq/financial/create_fund_source.html')
+ return r.render('acq/financial/create_funding_source.html')
def create_credit(self):
r = RequestMgr()
ses = ClientSession(oils.const.OILS_APP_ACQ)
- if r.ctx.acq.fund_source_credit_amount.value:
+ if r.ctx.acq.funding_source_credit_amount.value:
credit = osrf.net_obj.NetworkObject.acqfscred()
- credit.funding_source(r.ctx.acq.fund_source_id.value)
- credit.amount(r.ctx.acq.fund_source_credit_amount.value)
- credit.note(r.ctx.acq.fund_source_credit_note.value)
+ credit.funding_source(r.ctx.acq.funding_source_id.value)
+ credit.amount(r.ctx.acq.funding_source_credit_amount.value)
+ credit.note(r.ctx.acq.funding_source_credit_note.value)
status = ses.request(
'open-ils.acq.funding_source_credit.create',
r.ctx.core.authtoken.value, credit).recv().content()
status = Event.parse_and_raise(status)
- return redirect_to(controller='acq/fund_source', action='view', id=r.ctx.acq.fund_source_id.value)
+ return redirect_to(controller='acq/funding_source', action='view', id=r.ctx.acq.funding_source_id.value)
source = ses.request('open-ils.acq.funding_source.retrieve',
- r.ctx.core.authtoken.value, r.ctx.acq.fund_source_id.value, {"flesh_summary":1}).recv().content()
- r.ctx.acq.fund_source.value = Event.parse_and_raise(source)
+ r.ctx.core.authtoken.value, r.ctx.acq.funding_source_id.value, {"flesh_summary":1}).recv().content()
+ r.ctx.acq.funding_source.value = Event.parse_and_raise(source)
source.owner(OrgUtil.get_org_unit(source.owner()))
return r.render('acq/financial/create_funding_source_credit.html')