diff --git a/kfet/static/kfet/js/kfet.js b/kfet/static/kfet/js/kfet.js
index f0e7a316..8236b3e9 100644
--- a/kfet/static/kfet/js/kfet.js
+++ b/kfet/static/kfet/js/kfet.js
@@ -86,6 +86,12 @@ function getErrorsHtml(data) {
content += '
Montant invalide';
content += '';
}
+ if ('account' in data['errors']) {
+ content += 'Général';
+ content += '';
+ content += '- Opération invalide sur le compte '+data['errors']['account']+'
';
+ content += '
';
+ }
return content;
}
diff --git a/kfet/views.py b/kfet/views.py
index 23d3c703..e87dde9b 100644
--- a/kfet/views.py
+++ b/kfet/views.py
@@ -1017,7 +1017,8 @@ def kpsul_perform_operations(request):
to_articles_stocks[operation.article] -= operation.article_nb
else:
if operationgroup.on_acc.is_cash:
- data['errors']['account'] = 'Charge et retrait impossible sur LIQ'
+ data['errors']['account'] = 'LIQ'
+ return JsonResponse(data, status=400)
if operation.type != Operation.EDIT:
to_checkout_balance += operation.amount
operationgroup.amount += operation.amount