stats: fix begin of balances graphs

- graph begin at first operation or later
This commit is contained in:
Aurélien Delobelle 2017-04-03 03:15:07 +02:00
parent c01de558e1
commit d97a7be819

View file

@ -2185,23 +2185,8 @@ class AccountStatBalance(PkUrlMixin, JSONDetailView):
# sera mis à jour lors d'une # sera mis à jour lors d'une
# autre passe) # autre passe)
# } # }
actions = []
if begin_date is not None:
actions.append({
'at': begin_date.isoformat(),
'amount': 0,
'label': "début",
'balance': 0,
})
if end_date is not None:
actions.append({
'at': end_date.isoformat(),
'amount': 0,
'label': "actuel",
'balance': 0,
})
actions += [ actions = [
{ {
'at': ope_grp.at.isoformat(), 'at': ope_grp.at.isoformat(),
'amount': ope_grp.amount, 'amount': ope_grp.amount,