Commit 66576f4a authored by Romain Courteaud's avatar Romain Courteaud

slapos_*: change subscription price. Do not defined it as ttc

Try to understand why price is not always copied

slapos_accounting: restore original price
parent 31421135
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>base_price</string> </key>
<value> <float>1.0</float> </value>
<value> <float>0.83</float> </value>
</item>
<item>
<key> <string>base_price_per_slice</string> </key>
......@@ -36,7 +36,9 @@
</item>
<item>
<key> <string>comment</string> </key>
<value> <string>Price is an TCC (20% included)</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -71,21 +71,9 @@ for movement in movement_list:
destination_decision=movement.getDestination(),
specialise=specialise,
price_currency=movement.getPriceCurrency(),
start_date=movement.getStartDate())
# XXX Shamefully hardcoded values
# XXX TODO Drop hardcoded values
if movement.getResource() == 'service_module/slapos_instance_subscription':
if movement.getPriceCurrency() == "currency_module/CNY":
# reduce tax from there directly
temp_movement.edit(price=movement.getPrice(0.0)/1.01)
else:
# reduce tax from there directly
temp_movement.edit(price=movement.getPrice(0.0)/1.2)
elif movement.getResource() == 'service_module/slapos_reservation_refund':
temp_movement.edit(price=movement.getPrice(0.0))
else:
temp_movement.edit(price=0.0)
start_date=movement.getStartDate(),
price=movement.getPrice(0.0)
)
instance_tree = movement.getAggregateValue(portal_type="Instance Tree")
......
......@@ -128,7 +128,7 @@ class testSlapOSSubscriptionPerUserTradeConditionScenarioDetaxed(TestSlapOSSubsc
)
user_trade_condition.newContent(
portal_type="Sale Supply Line",
base_price=self.expected_individual_price_with_tax,
base_price=self.expected_individual_price_without_tax,
resource='service_module/slapos_instance_subscription',
)
......
......@@ -251,8 +251,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
)
sale_trade_condition.newContent(
portal_type="Sale Supply Line",
comment='Price is an TCC (20% included)',
base_price=self.expected_zh_individual_price_with_tax,
base_price=self.expected_zh_individual_price_without_tax,
resource='service_module/slapos_instance_subscription',
)
sale_trade_condition.newContent(
......@@ -296,8 +295,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
# XXX TODO clarify the with / without tax
sale_trade_condition.newContent(
portal_type="Sale Supply Line",
comment='Price is an TCC (20% included)',
base_price=self.expected_individual_price_with_tax,
base_price=self.expected_individual_price_without_tax,
resource='service_module/slapos_instance_subscription',
)
sale_trade_condition.newContent(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment