Skip to content

Commit

Permalink
Merge pull request #792 from hyanwong/fix-setprices
Browse files Browse the repository at this point in the history
Fix #791
  • Loading branch information
hyanwong authored Apr 15, 2024
2 parents 0e513c9 + 2296a01 commit 55d12da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def SET_PRICES():

response.flash = DIV(
f"SET THE FOLLOWING DEFAULT PRICE STRUCTURE for {n_leaves} species:", BR(),PRE(*output),
f"Total revenue: {fmt_pounds(revenue)}!\nNow overriding the following special exclusions (and setting banned):", BR(),
f"Total revenue: {OZfunc.fmt_pounds(revenue)}!\nNow overriding the following special exclusions (and setting banned):", BR(),
f"{bespoke_spp}"
)

Expand Down
3 changes: 2 additions & 1 deletion views/manage/SET_PRICES.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<div class="col-md-12">
<h1>Set the prices from the pre-calculated popularities</h1>
{{=form.custom.begin}}
{{if pop_min is not None and pop_max is not None:}}
Popularity ranges from {{=int(round(pop_min,0))}} to {{=int(round(pop_max,0))}}. As a guide, here are the popularities of a few species:

{{pass}}
<ul>
{{for name, val, quant in example_spp:}}
<li>{{=name}} = {{=f"{val:.0f}"}} (quantile = {{=f"{quant:.2f}"}}%)</li>
Expand Down

0 comments on commit 55d12da

Please sign in to comment.