Commit 6789bf51 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: if the payment is done by an organisation, skip the user payment process

parent d82bf16b
......@@ -75,7 +75,8 @@ subscription_request = request_instance_tree.Item_createSubscriptionRequest(temp
# Check if we could create the Subscription Request
if subscription_request is not None:
price = subscription_request.getPrice(None)
if price is not None and price != 0:
# If the payment is done by an Organisation, skip user payment process
if (price is not None) and (price != 0) and (subscription_request.getDestinationSection() == person.getRelativeUrl()):
balance = person.Entity_getDepositBalanceAmount([subscription_request])
if balance < price:
instance = web_site.restrictedTraverse(request_instance_tree.getRelativeUrl())
......
......@@ -38,7 +38,8 @@ if aggregate_uid is None:
is_future_balance_negative = 0
price_information = None
if price is not None and price != 0:
# If the payment is done by an Organisation, skip user payment process
if (price is not None) and (price != 0) and (subscription_request.getDestinationSection() == destination_value.getRelativeUrl()):
price_information = '%s %s/%s' % (price,
subscription_request.getPriceCurrencyTitle(),
subscription_request.getQuantityUnitTitle())
......
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