1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Credit note for new memberships

This commit is contained in:
Yohann D'ANELLO
2020-04-05 18:37:04 +02:00
parent 5b61db8821
commit 515edc4459
4 changed files with 78 additions and 2 deletions

View File

@ -17,5 +17,13 @@
{% block extrajavascript %}
<script>
function autocompleted(user) {
$("#id_last_name").val(user.last_name);
$("#id_first_name").val(user.first_name);
$.getJSON("/api/members/profile/" + user.id + "/", function(profile) {
let fee = profile.paid ? {{ club.membership_fee_paid }} : {{ club.membership_fee_unpaid }};
$("#id_credit_amount").val((fee / 100).toFixed(2));
});
}
</script>
{% endblock %}