From b3db90545c5bd76d4acb6abfe5356e87b0f0cdcf Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Thu, 10 Mar 2011 02:37:21 +0000 Subject: initial import --- templates/add_bill.html | 20 ++++++++++++++++++++ templates/compute_bills.html | 26 ++++++++++++++++++++++++++ templates/layout. | 0 templates/layout.html | 34 ++++++++++++++++++++++++++++++++++ templates/layout.txt | 2 ++ templates/list_bills.html | 25 +++++++++++++++++++++++++ 6 files changed, 107 insertions(+) create mode 100644 templates/add_bill.html create mode 100644 templates/compute_bills.html create mode 100644 templates/layout. create mode 100644 templates/layout.html create mode 100644 templates/layout.txt create mode 100644 templates/list_bills.html (limited to 'templates') diff --git a/templates/add_bill.html b/templates/add_bill.html new file mode 100644 index 0000000..37ecfa3 --- /dev/null +++ b/templates/add_bill.html @@ -0,0 +1,20 @@ +{% extends "layout.html" %} + +{% block content %} +

Let's add a bill

+ +{% if form.errors %} +

Your form contains errors.

+ +{% endif %} + +
+ {{ form.hidden_tag() }} + +

{{ form.payer.label }}
{{ form.payer }}

+

{{ form.what.label }}
{{ form.what }}

+

{{ form.amount.label }}
{{ form.amount }}

+

{{ form.payed_for.label }}
{{ form.payed_for(multiple=True) }}

+

{{ form.submit }}

+
+{% endblock %} diff --git a/templates/compute_bills.html b/templates/compute_bills.html new file mode 100644 index 0000000..d1cad15 --- /dev/null +++ b/templates/compute_bills.html @@ -0,0 +1,26 @@ +{% extends "layout.html" %} +{% block content %} +

Computations

+ +
+
    +
  1. For each person, get the list of bills he have to pay
  2. +
  3. Increase the amount this person have to pay
  4. +
  5. At the same time, increase what the payer of the bill have to receive
  6. +
  7. At the end, for each person, substract what he have to pay to what he have to receive
  8. +
+
+ +
+ Mark this as payed / processed +
+ + + + +{% for name, balance in balances.items() %} + +{% endfor %} + +
NameBalance
{{ name }}{{ balance }}
+{% endblock %} diff --git a/templates/layout. b/templates/layout. new file mode 100644 index 0000000..e69de29 diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..50f1884 --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,34 @@ + + + +Account manager + + + + +
+ +
+
+ + {% for message in get_flashed_messages() %} +
{{ message }}
+ {% endfor %} + + {% block content %} + {% endblock %} + +
+ +
+ + diff --git a/templates/layout.txt b/templates/layout.txt new file mode 100644 index 0000000..c6afe66 --- /dev/null +++ b/templates/layout.txt @@ -0,0 +1,2 @@ +{% block content %} +{% endblock %} \ No newline at end of file diff --git a/templates/list_bills.html b/templates/list_bills.html new file mode 100644 index 0000000..fba328e --- /dev/null +++ b/templates/list_bills.html @@ -0,0 +1,25 @@ +{% extends "layout.html" %} +{% block content %} +{% if bills.count() > 0 %} + + + +{% for bill in bills %} + + + + + + + +{% endfor %} + +
When ?Who paid?for what ?OwersHow much ?
{{ bill.date }}{{ bill.payer }}{{ bill.what }}{% for ower in bill.owers %}{{ ower.name }} {% endfor %}{{ bill.amount }} ({{ bill.pay_each() }} each)
+ +Compute bills +

Periodically (probably at the end of each month, you can compute the balance of each people, in order to reset all the debts. You can also let this "as-is" and try to find a good balance, that's up to you

+ +{% else %} +

Nothing to list yet. You probably want to add a bill ?

+{% endif %} +{% endblock %} -- cgit v1.1