Skip to content

Commit

Permalink
Merge branch 'main' into sites
Browse files Browse the repository at this point in the history
* main:
  📝 Update release notes
  Always fetch the whole previous year and all of this year so far (TampereHacklab#444)
  📝 Update release notes
  Bump werkzeug from 2.2.3 to 2.3.8 (TampereHacklab#454)
  📝 Update release notes
  Bump pygments from 2.14.0 to 2.15.0 (TampereHacklab#451)
  📝 Update release notes
  feat: add in-app settings panel using django-constance (TampereHacklab#433)
  • Loading branch information
braaar committed Dec 4, 2023
2 parents 0dfe603 + 431c368 commit 86ace31
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 86 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

* Always fetch the whole previous year and all of this year so far. PR [#444](https://github.com/TampereHacklab/mulysa/pull/444) by [@tswfi](https://github.com/tswfi).
* Bump werkzeug from 2.2.3 to 2.3.8. PR [#454](https://github.com/TampereHacklab/mulysa/pull/454) by [@dependabot[bot]](https://github.com/apps/dependabot).
* Bump pygments from 2.14.0 to 2.15.0. PR [#451](https://github.com/TampereHacklab/mulysa/pull/451) by [@dependabot[bot]](https://github.com/apps/dependabot).
* feat: add in-app settings panel using django-constance. PR [#433](https://github.com/TampereHacklab/mulysa/pull/433) by [@braaar](https://github.com/braaar).
* remove pyup from readme. PR [#442](https://github.com/TampereHacklab/mulysa/pull/442) by [@tswfi](https://github.com/tswfi).
* remove pyup, using dependabot now. PR [#440](https://github.com/TampereHacklab/mulysa/pull/440) by [@tswfi](https://github.com/tswfi).
* Small changes to custominvoice texts suggested on tampere channels. PR [#438](https://github.com/TampereHacklab/mulysa/pull/438) by [@tswfi](https://github.com/tswfi).
Expand Down
128 changes: 70 additions & 58 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions www/static/www/graphs.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
async function renderTransactionsGraph() {
// for now default to fetching data 1 year back from now
// this fetches the data aggregated per day
// for now default to fetching all of last years data and this year untill today

// today
let startDate = new Date();
// one year back
startDate.setFullYear(startDate.getFullYear() - 1);
// january
startDate.setMonth(0);
// and from the first day of the month
startDate.setDate(1);

const queryParams = {
date__gte: startDate.toISOString().slice(0, 10),
};
Expand Down
46 changes: 20 additions & 26 deletions www/templates/www/banktransaction.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% extends "www/base.html" %}
{% load i18n %}
{% load bootstrap4 %}
{% block content %}
{% load verbose_names %}
{% extends "www/base.html" %} {% load i18n %} {% load bootstrap4 %} {% block
content %} {% load verbose_names %}

<h2>{% trans 'Bank Transaction' %}</h2>

Expand All @@ -13,42 +10,39 @@ <h2>{% trans 'Bank Transaction' %}</h2>
{% trans 'Business ID' %}: {{config.RECEIPT_REGID}}<br />
</p>
<p>
{% get_verbose_field_name banktransaction "date" %}: {{ banktransaction.date }}<br />
{% get_verbose_field_name banktransaction "date" %}: {{ banktransaction.date
}}<br />
{% trans 'Transaction id' %}: {{ banktransaction.id }}<br />
{% get_verbose_field_name banktransaction "reference_number" %}: {{ banktransaction.reference_number }}<br />
{% get_verbose_field_name banktransaction "archival_reference" %}: {{ banktransaction.archival_reference }}<br />
{% get_verbose_field_name banktransaction "sender" %}: {{ banktransaction.sender }}<br />
{% get_verbose_field_name banktransaction "reference_number" %}: {{
banktransaction.reference_number }}<br />
{% get_verbose_field_name banktransaction "archival_reference" %}: {{
banktransaction.archival_reference }}<br />
{% get_verbose_field_name banktransaction "sender" %}: {{
banktransaction.sender }}<br />
{% trans 'User' %}: {{ banktransaction.user }}
</p>

<ul>
{% for servicesubscription in banktransaction.servicesubscription_set.all %}
<li>{{servicesubscription.service.name}}</li>
{% endfor %}
{% for custominvoice in banktransaction.custominvoice_set.all %}
<li>{{custominvoice.subscription.service.name}}</li>
<li>{{servicesubscription.service.name}}</li>
{% endfor %} {% for custominvoice in banktransaction.custominvoice_set.all
%}
<li>{{custominvoice.subscription.service.name}}</li>
{% endfor %}
</ul>
<p>
{% trans 'Grand total' %}: {{ banktransaction.amount }}€
</p>
<p>{% trans 'Grand total' %}: {{ banktransaction.amount }}€</p>
</div>

<div id="vatinfo">
{# This might require tweaking... for now it seems to be #}
{# enough that it is mentioned that everything is VAT 0% #}
<p>
{% blocktrans %}
Seller not VAT-liable
{% endblocktrans %}
</p>
{# This might require tweaking... for now it seems to be #} {# enough that it
is mentioned that everything is VAT 0% #}
<p>{% blocktrans %} Seller not VAT-liable {% endblocktrans %}</p>
</div>

<div id="promoinfo">
<p>
{% blocktrans with name=site.name %}
Thank you and please tell your friends about {{ name }} :)
{% endblocktrans %}
{% blocktrans with name=site.name %} Thank you and please tell your friends
about {{ name }} :) {% endblocktrans %}
</p>
</div>

Expand Down

0 comments on commit 86ace31

Please sign in to comment.