Skip to content

Commit

Permalink
Change separate three month timestamp to calculation.valid_until
Browse files Browse the repository at this point in the history
  • Loading branch information
indigane committed Jan 10, 2025
1 parent 348c73a commit 84a2f78
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion backend/hitas/services/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def render_confirmed_max_price_calculation_pdf(
"body_parts": pdf_body.texts,
"title": filename,
"date_today": datetime.date.strftime(timezone.now().date(), "%d.%m.%Y"),
"three_months_after_date_today": (timezone.now() + datetime.timedelta(days=90)).date(),
}
pdf = render_to_pdf(template="confirmed_maximum_price.jinja", context=context)
return filename, pdf
Expand Down
2 changes: 1 addition & 1 deletion backend/hitas/templates/confirmed_maximum_price.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
{% if is_surface_area_maximum %}
Enimmäismyyntihinta on vahvistettu rajahinnan perusteella ja laskelma on voimassa {{ maximum_price_calculation.valid_until|format_date }} asti.
{% else %}
Enimmäismyyntihinta on voimassa {{ three_months_after_date_today|format_date }} asti.
Enimmäismyyntihinta on voimassa {{ maximum_price_calculation.valid_until|format_date }} asti.
{% endif %}
</p>
<div class="plain-text">{{ body_parts.0|linebreaks }}</div>
Expand Down
1 change: 0 additions & 1 deletion backend/hitas/views/apartment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ def download_latest_confirmed_prices(self, request, **kwargs) -> HttpResponse:
"maximum_price_calculation": mpc,
"user": request.user,
"body_parts": body_parts,
"three_months_after_date_today": (timezone.now() + datetime.timedelta(days=90)).date(),
}
pdf = get_pdf_response(filename=filename, template="confirmed_maximum_price.jinja", context=context)

Expand Down

0 comments on commit 84a2f78

Please sign in to comment.