added actif_edit template
This commit is contained in:
@@ -24,12 +24,20 @@ class PFService(object):
|
||||
query = request.dbsession.query(Allocation).filter(Allocation.no_cat == no_cat).first()
|
||||
return query
|
||||
|
||||
@classmethod
|
||||
def get_allocation_byType(cls, request, type):
|
||||
# lire une allocation par le no_id
|
||||
query = request.dbsession.query(Allocation).filter(Allocation.type == type).all()
|
||||
return query
|
||||
|
||||
@classmethod
|
||||
def get_histo(cls, request, no_id):
|
||||
if no_id == '0':
|
||||
items = request.dbsession.query(Histo).order_by(sa.asc(Histo.date)).all()
|
||||
elif no_id == '-1':
|
||||
items = request.dbsession.query(Histo).order_by(sa.desc(Histo.date)).all()
|
||||
else:
|
||||
# lire le histo par le no_id
|
||||
# lire le histo par le no_id
|
||||
items = request.dbsession.query(Histo).filter(Histo.no_id == no_id).first()
|
||||
return items
|
||||
|
||||
@@ -74,7 +82,6 @@ class PFService(object):
|
||||
|
||||
def delete_actif(request, no_id):
|
||||
request.dbsession.query(Actifs).filter(Actifs.no_id == no_id).delete(synchronize_session=False)
|
||||
request.dbsession.commit()
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user