# quick hack to display total payment amounts per-milestone
for milestone, payments in budget_graph.milestone_payments.items():
print (milestone)
- print ()
total = 0
+ total_requested = 0
+ total_req_or_paid = 0
+ total_paid = 0
for payment in payments:
print("\t", payment)
total += payment.amount
- print ("\t", total)
+ if payment.submitted is not None:
+ total_requested += payment.amount
+ if payment.paid is not None:
+ total_paid += payment.amount
+ if payment.submitted or payment.paid is not None:
+ total_req_or_paid += payment.amount
+
+ print ("\t %-9s" % total,
+ "submitted %-9s" % total_requested,
+ "paid %-9s" % total_paid,
+ "submitted or paid %-9s" % total_req_or_paid)
+ print ()
if __name__ == "__main__":
main()