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

Prevent superusers when they make a transaction with a non-member user

This commit is contained in:
Yohann D'ANELLO
2020-08-05 20:40:30 +02:00
parent 2851d7764c
commit 018ca84e2d
5 changed files with 45 additions and 9 deletions

View File

@ -218,6 +218,9 @@ function consume(source, source_alias, dest, quantity, amount, reason, type, cat
addMsg("Attention, La transaction depuis la note " + source_alias + " a été réalisée avec " +
"succès, mais la note émettrice " + source_alias + " est en négatif.",
"warning", 30000);
if (source.note.membership && source.note.membership.date_end > new Date().toISOString())
addMsg("Attention : la note émettrice " + source.name + " n'est plus adhérente.",
"danger", 30000);
}
reset();
}).fail(function (e) {