+ for order in qs:
+ payments.append({
+ 'timestamp': order.completed_at,
+ 'amount': order.get_amount(),
+ })
+
+ fundings = Funding.objects.filter(
+ email=email,
+ payed_at__year=year
+ ).order_by('payed_at')
+ for funding in fundings:
+ payments.append({
+ 'timestamp': funding.payed_at,
+ 'amount': funding.amount,
+ })
+
+ if not payments: return
+
+ payments.sort(key=lambda x: x['timestamp'])
+