bugfix
This commit is contained in:
parent
d1f5095837
commit
db19ea505c
@ -54,12 +54,14 @@ async def pricing_program_charging(sor, pricing_program_id, data):
|
|||||||
cnt = data.get(spec.count_name, 1)
|
cnt = data.get(spec.count_name, 1)
|
||||||
if spec.pricing_spec_mode == 'spec_name':
|
if spec.pricing_spec_mode == 'spec_name':
|
||||||
if d == item.spec_value:
|
if d == item.spec_value:
|
||||||
|
change[spec.count_name] = cnt
|
||||||
charge.amount = item.pricing_amount * cnt
|
charge.amount = item.pricing_amount * cnt
|
||||||
charges.append(charge)
|
charges.append(charge)
|
||||||
elif spec.pricing_spec_mode == 'spec_amount':
|
elif spec.pricing_spec_mode == 'spec_amount':
|
||||||
if charge.pricing_unit is None or charge.pricing_unit < 1:
|
if charge.pricing_unit is None or charge.pricing_unit < 1:
|
||||||
charge.pricing_unit = 1
|
charge.pricing_unit = 1
|
||||||
charge.amount = d * charge.pricing_amount / charge.pricing_unit
|
charge.amount = d * charge.pricing_amount / charge.pricing_unit
|
||||||
|
charge[spec.spec_name] = d
|
||||||
charges.append(charge)
|
charges.append(charge)
|
||||||
elif spec.pricing_spec_mode == 'remote_pricing':
|
elif spec.pricing_spec_mode == 'remote_pricing':
|
||||||
charge.amount = await get_remote_pricing(sor, charge, params=d)
|
charge.amount = await get_remote_pricing(sor, charge, params=d)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user