Private
Public Access
1
0

credits seem to work

This commit is contained in:
Sander Roosendaal
2021-11-11 11:37:01 +01:00
parent 4785beca1f
commit db1f10368a
4 changed files with 15 additions and 6 deletions

View File

@@ -32,6 +32,10 @@
{% else %}
<p>Price: {{ plan.price }}&euro;</p>
{% endif %}
{% if rower.eurocredits and plan.price > 0 %}
<p>Your discount: {{ plan.price|discount:rower }}&euro;</p>
<p>You pay: {{ plan.price|discounted:rower }}&euro;</p>
{% endif %}
</li>
{% if form %}
<li class="grid_2">
@@ -47,7 +51,7 @@
If you have <a href="/rowers/createplan/">set a training target</a>, you can also ask to plan by that target. Select the
target from the targets list, and select "plan by target".
</p>
{% if plan.price == 0 %}
{% if plan.price|discounted:rower == 0 %}
<form enctype="multipart/form-data" action="" method="post">
{% else %}
<form enctype="multipart/form-data" action="/rowers/buyplan/{{ plan.id }}/" method="post">
@@ -56,7 +60,7 @@
{{ form.as_table }}
</table>
{% csrf_token %}
{% if plan.price == 0 %}
{% if plan.price|discounted:rower == 0 %}
<p><input class="button" type="submit" value="Create Plan and Add Sessions"></p>
{% else %}
<p><input class="button" type="submit" action="/rowers/buyplan/{{ plan.id }}/" value="BUY NOW and Add Sessions"></p>