Skip to content

Commit

Permalink
Fix add-on page meal calculations
Browse files Browse the repository at this point in the history
Since the prices for meal plans are strings for Reasons, the page was multiple a string. Now it multiplies it as a number.
  • Loading branch information
kitsuta committed Apr 3, 2024
1 parent 77e7eb1 commit a8f3107
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions magstock/templates/magstock/addons.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h2 class="center">MAGStock Add-Ons Summary</h2>

<div class="card">
<div class="card-heading">Camping Type and Cabins</div>
<div class="card-header">Camping Type and Cabins</div>
<div class="card-body">
<table class="table table-striped">
<thead>
Expand Down Expand Up @@ -46,9 +46,9 @@ <h2 class="center">MAGStock Add-Ons Summary</h2>
</table>
</div>
</div>

<br/>
<div class="card card-default">
<div class="card-heading">Meal Plans</div>
<div class="card-header">Meal Plans</div>
<div class="card-body">
<table class="table table-striped">
<thead>
Expand All @@ -64,13 +64,13 @@ <h2 class="center">MAGStock Add-Ons Summary</h2>
<td>Beverage Plan</td>
<td>{{ c.MEAL_PLAN_PRICES[c.BEVERAGE]|format_currency }}</td>
<td>{{ beverage_plan_count }}</td>
<td>{{ (beverage_plan_count * c.MEAL_PLAN_PRICES[c.BEVERAGE])|format_currency }}</td>
<td>{{ (beverage_plan_count * c.MEAL_PLAN_PRICES[c.BEVERAGE]|int)|format_currency }}</td>
</tr>
<tr>
<td>Full Meal Plan</td>
<td>{{ c.MEAL_PLAN_PRICES[c.FULL_FOOD]|format_currency }}</td>
<td>{{ full_plan_count }}</td>
<td>{{ (full_plan_count * c.MEAL_PLAN_PRICES[c.FULL_FOOD])|format_currency }}</td>
<td>{{ (full_plan_count * c.MEAL_PLAN_PRICES[c.FULL_FOOD]|int)|format_currency }}</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit a8f3107

Please sign in to comment.