Commit 31e0cc04 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 b064580a
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>base_price</string> </key> <key> <string>base_price</string> </key>
<value> <float>1.0</float> </value> <value> <float>0.83</float> </value>
</item> </item>
<item> <item>
<key> <string>base_price_per_slice</string> </key> <key> <string>base_price_per_slice</string> </key>
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
<value> <string>Price is an TCC (20% included)</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
......
...@@ -71,21 +71,9 @@ for movement in movement_list: ...@@ -71,21 +71,9 @@ for movement in movement_list:
destination_decision=movement.getDestination(), destination_decision=movement.getDestination(),
specialise=specialise, specialise=specialise,
price_currency=movement.getPriceCurrency(), price_currency=movement.getPriceCurrency(),
start_date=movement.getStartDate()) start_date=movement.getStartDate(),
price=movement.getPrice(0.0)
# 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))
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)
instance_tree = movement.getAggregateValue(portal_type="Instance Tree") instance_tree = movement.getAggregateValue(portal_type="Instance Tree")
......
...@@ -128,7 +128,7 @@ class testSlapOSSubscriptionPerUserTradeConditionScenarioDetaxed(TestSlapOSSubsc ...@@ -128,7 +128,7 @@ class testSlapOSSubscriptionPerUserTradeConditionScenarioDetaxed(TestSlapOSSubsc
) )
user_trade_condition.newContent( user_trade_condition.newContent(
portal_type="Sale Supply Line", 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', resource='service_module/slapos_instance_subscription',
) )
......
...@@ -251,8 +251,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -251,8 +251,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
) )
sale_trade_condition.newContent( sale_trade_condition.newContent(
portal_type="Sale Supply Line", portal_type="Sale Supply Line",
comment='Price is an TCC (20% included)', base_price=self.expected_zh_individual_price_without_tax,
base_price=self.expected_zh_individual_price_with_tax,
resource='service_module/slapos_instance_subscription', resource='service_module/slapos_instance_subscription',
) )
sale_trade_condition.newContent( sale_trade_condition.newContent(
...@@ -296,8 +295,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -296,8 +295,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
# XXX TODO clarify the with / without tax # XXX TODO clarify the with / without tax
sale_trade_condition.newContent( sale_trade_condition.newContent(
portal_type="Sale Supply Line", portal_type="Sale Supply Line",
comment='Price is an TCC (20% included)', base_price=self.expected_individual_price_without_tax,
base_price=self.expected_individual_price_with_tax,
resource='service_module/slapos_instance_subscription', resource='service_module/slapos_instance_subscription',
) )
sale_trade_condition.newContent( 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