Commit c3c004e4 authored by Rafael Monnerat's avatar Rafael Monnerat

WIP WIP slapos_panel: Fixup to allow us to pay deposit

parent 8cb9e739
...@@ -55,7 +55,7 @@ for currency_uid, secure_service_relative_url in [ ...@@ -55,7 +55,7 @@ for currency_uid, secure_service_relative_url in [
""" % { """ % {
'total_price': deposit_price, 'total_price': deposit_price,
'currency': currency_uid, 'currency': currency_uid,
'payment_url': '%s/SaleInvoiceTransaction_createExternalPaymentTransactionFromAmountAndRedirect' % entity.absolute_url() 'payment_url': '%s/SaleInvoiceTransaction_createExternalPaymentTransactionFromAmountAndRedirect' % subscription_request.absolute_url()
} }
if html_content: if html_content:
......
...@@ -23,6 +23,13 @@ for accepted_resource_uid, accepted_payment_mode, is_activated in [ ...@@ -23,6 +23,13 @@ for accepted_resource_uid, accepted_payment_mode, is_activated in [
assert payment_mode is not None assert payment_mode is not None
def wrapWithShadow(entity, outstanding_amount): def wrapWithShadow(entity, outstanding_amount):
# In case of "Subscription Request"
if outstanding_amount.getPortalType() == 'Subscription Request':
return entity.Person_addDepositPayment(
outstanding_amount.getTotalPrice(),
outstanding_amount.getPriceCurrency(),
batch=1
)
return entity.Entity_createPaymentTransaction( return entity.Entity_createPaymentTransaction(
entity.Entity_getOutstandingAmountList( entity.Entity_getOutstandingAmountList(
section_uid=outstanding_amount.getSourceSectionUid(), section_uid=outstanding_amount.getSourceSectionUid(),
......
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