mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-22 15:32:22 +00:00
🐛 Invert membership date inequalities
This commit is contained in:
parent
6dcb82855d
commit
252ddb832d
@ -218,7 +218,7 @@ 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())
|
||||
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);
|
||||
}
|
||||
|
@ -260,10 +260,10 @@ $("#btn_transfer").click(function() {
|
||||
"destination": dest.note.id,
|
||||
"destination_alias": dest.name
|
||||
}).done(function () {
|
||||
if (source.note.membership && source.note.membership.date_end > new Date().toISOString())
|
||||
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);
|
||||
if (dest.note.membership && dest.note.membership.date_end > new Date().toISOString())
|
||||
if (dest.note.membership && dest.note.membership.date_end < new Date().toISOString())
|
||||
addMsg("Attention : la note destination " + dest.name + " n'est plus adhérente.",
|
||||
"danger", 30000);
|
||||
|
||||
@ -373,7 +373,7 @@ $("#btn_transfer").click(function() {
|
||||
"bank": $("#bank").val()
|
||||
}).done(function () {
|
||||
addMsg("Le crédit/retrait a bien été effectué !", "success", 10000);
|
||||
if (user_note.membership && user_note.membership.date_end > new Date().toISOString())
|
||||
if (user_note.membership && user_note.membership.date_end < new Date().toISOString())
|
||||
addMsg("Attention : la note " + alias + " n'est plus adhérente.", "danger", 10000);
|
||||
reset();
|
||||
}).fail(function (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user