forked from DGNum/gestioCOF
Page Historique
- Reprise du JS d'historique dans `kfet/static/kfet/js/history.js` - Adapatation de K-Psul pour l'utiliser - Création page historique avec filtres (dates, caisses, comptes)
This commit is contained in:
parent
b380984a1e
commit
3b7c690f0b
9 changed files with 328 additions and 153 deletions
|
@ -975,13 +975,13 @@ def kpsul_cancel_operations(request):
|
|||
# Need refresh from db cause we used update on querysets
|
||||
opegroups_pk = [ opegroup.pk for opegroup in to_groups_amounts ]
|
||||
opegroups = (OperationGroup.objects
|
||||
.values('id','amount','on_acc__cofprofile__is_cof').filter(pk__in=opegroups_pk))
|
||||
.values('id','amount','is_cof').filter(pk__in=opegroups_pk))
|
||||
for opegroup in opegroups:
|
||||
websocket_data['opegroups'].append({
|
||||
'cancellation': True,
|
||||
'id': opegroup['id'],
|
||||
'amount': opegroup['amount'],
|
||||
'on_acc__is_cof': opegroup['on_acc__cofprofile__is_cof'],
|
||||
'is_cof': opegroup['is_cof'],
|
||||
})
|
||||
canceled_by__trigramme = canceled_by and canceled_by.trigramme or None
|
||||
for ope in opes:
|
||||
|
@ -1088,6 +1088,16 @@ def kpsul_articles_data(request):
|
|||
.filter(is_sold=True))
|
||||
return JsonResponse({ 'articles': list(articles) })
|
||||
|
||||
@permission_required('kfet.is_team')
|
||||
def history(request):
|
||||
data = {
|
||||
'filter_form': FilterHistoryForm(),
|
||||
'settings': {
|
||||
'subvention_cof': Settings.SUBVENTION_COF(),
|
||||
}
|
||||
}
|
||||
return render(request, 'kfet/history.html', data)
|
||||
|
||||
# -----
|
||||
# Settings views
|
||||
# -----
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue