forked from DGNum/gestioCOF
Add error when editing LIQ
This commit is contained in:
parent
14e0d8090f
commit
f645121fb1
2 changed files with 8 additions and 1 deletions
|
@ -86,6 +86,12 @@ function getErrorsHtml(data) {
|
|||
content += '<li>Montant invalide</li>';
|
||||
content += '</ul>';
|
||||
}
|
||||
if ('account' in data['errors']) {
|
||||
content += 'Général';
|
||||
content += '<ul>';
|
||||
content += '<li>Opération invalide sur le compte '+data['errors']['account']+'</li>';
|
||||
content += '</ul>';
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue