Commit c196b494 authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: Subscription Request categories were inverted

parent 828c00ed
......@@ -37,8 +37,8 @@ if (subscription_request.getSourceValue() is None) or \
}
deposit_amount = portal.portal_simulation.getInventoryAssetPrice(
section_uid= subscription_request.getSourceSectionUid(),
mirror_section_uid= subscription_request.getDestinationSectionUid(),
section_uid= subscription_request.getDestinationSectionUid(),
mirror_section_uid= subscription_request.getSourceSectionUid(),
mirror_node_uid=portal.restrictedTraverse('account_module/deposit').getUid(),
#node_category_strict_membership=['account_type/income'],
simulation_state= ('stopped', 'delivered'),
......@@ -47,8 +47,8 @@ if (subscription_request.getSourceValue() is None) or \
)
#return deposit_amount
payable_amount = portal.portal_simulation.getInventoryAssetPrice(
mirror_section_uid= subscription_request.getSourceSectionUid(),
section_uid= subscription_request.getDestinationSectionUid(),
mirror_section_uid= subscription_request.getDestinationSectionUid(),
section_uid= subscription_request.getSourceSectionUid(),
node_category_strict_membership=['account_type/asset/receivable',
'account_type/liability/payable'],
grouping_reference=None,
......@@ -64,7 +64,7 @@ if (subscription_request.getSourceValue() is None) or \
#pass
return markHistory(subscription_request,
'Not enough deposit from user')
# return 'NO deposit_amount %s\npayable_amount %s\ntotal_price %s' % (deposit_amount, payable_amount, total_price)
# raise NotImplementedError('NO deposit_amount %s\npayable_amount %s\ntotal_price %s' % (deposit_amount, payable_amount, total_price))
#return 'YES deposit_amount %s\npayable_amount %s\ntotal_price %s' % (deposit_amount, payable_amount, total_price)
subscription_request.SubscriptionRequest_createOpenSaleOrder()
......
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