Commit 049004dc authored by Rafael Monnerat's avatar Rafael Monnerat

WIP WIP slapos_panel: Fixup to allow us to pay deposit

parent a4e08915
......@@ -55,7 +55,7 @@ for currency_uid, secure_service_relative_url in [
""" % {
'total_price': deposit_price,
'currency': currency_uid,
'payment_url': '%s/SaleInvoiceTransaction_createExternalPaymentTransactionFromAmountAndRedirect' % entity.absolute_url()
'payment_url': '%s/SaleInvoiceTransaction_createExternalPaymentTransactionFromAmountAndRedirect' % subscription_request.absolute_url()
}
if html_content:
......
......@@ -23,6 +23,13 @@ for accepted_resource_uid, accepted_payment_mode, is_activated in [
assert payment_mode is not None
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(
entity.Entity_getOutstandingAmountList(
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