bugfix
This commit is contained in:
parent
438dd6042f
commit
e6862e1f57
@ -4,20 +4,20 @@
|
||||
"params": {
|
||||
"sortby": "name",
|
||||
"browserfields": {
|
||||
"exclouded": ["id", "ppid"],
|
||||
"exclouded": ["id", "pptid"],
|
||||
"alters": {
|
||||
"psid":{
|
||||
"dataurl":"{{entire_url('../pi_get_all_specs.dspy')}}",
|
||||
"textField": "name",
|
||||
"valueField": "id",
|
||||
"params": {
|
||||
"ppid":"{{params_kw.ppid}}"
|
||||
"pptid":"{{params_kw.pptid}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"editexclouded": [
|
||||
"id", "ppid"
|
||||
"id", "pptid"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,14 +50,19 @@ where enabled_date >= ${biz_date}$
|
||||
return recs[0]
|
||||
return None
|
||||
|
||||
async def get_pricing_specs_by_ppid(ppid):
|
||||
async def get_pricing_specs_by_pptid(pptid):
|
||||
env = ServerEnv()
|
||||
dbname = env.get_module_dbname('pricing')
|
||||
db = DBPools()
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
pp = PricingProgram(ppid, sor)
|
||||
await pp.init()
|
||||
return await pp.get_specs()
|
||||
sql = """select d.*
|
||||
from pricing_program_timing a, pricing_program b, pricing_type c, pricing_spec d
|
||||
where a.ppid = b.id
|
||||
and b.ptid = c.id
|
||||
and d.ptid = c.id
|
||||
and a.id = ${pptid}$"""
|
||||
recs = await sor.sqlExe(sql, {'pptid': pptid})
|
||||
return recs
|
||||
return []
|
||||
|
||||
async def get_remote_pricing(sor, charge, data):
|
||||
|
||||
@ -1 +1 @@
|
||||
return await get_pricing_specs_by_ppid(params_kw.ppid)
|
||||
return await get_pricing_specs_by_pptid(params_kw.pptid)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user