Browse Source

renamed 'accounts' to 'funds'

funding-tag
Holger Frey 7 months ago
parent
commit
9b31af67aa
  1. BIN
      ordr3.sqlite
  2. 1
      ordr3/schemas/orders.py
  3. 4
      ordr3/views/orders.py
  4. 10
      tests/functional/test_order.py

BIN
ordr3.sqlite

Binary file not shown.

1
ordr3/schemas/orders.py

@ -217,6 +217,7 @@ class AddOrderSchema(CSRFSchema): @@ -217,6 +217,7 @@ class AddOrderSchema(CSRFSchema):
item = OrderItem()
pricing = OrderPricing()
funding = OrderFunding()
optional = OrderOptionals()
@classmethod

4
ordr3/views/orders.py

@ -75,6 +75,7 @@ def get_form_data_from_order(order): @@ -75,6 +75,7 @@ def get_form_data_from_order(order):
def update_order_with_form_data(order, form_data):
form_item = form_data["item"]
form_pricing = form_data["pricing"]
form_funding = form_data["funding"]
form_optional = form_data["optional"]
order.cas_description = form_item["cas_description"]
@ -87,7 +88,8 @@ def update_order_with_form_data(order, form_data): @@ -87,7 +88,8 @@ def update_order_with_form_data(order, form_data):
order.currency = form_pricing["unit_price"]["currency"]
order.amount = form_pricing["quantity"]
order.account = form_optional["funds"]
order.account = form_funding["funds"]
order.comment = form_optional["comment"]

10
tests/functional/test_order.py

@ -53,7 +53,7 @@ def test_add_order_ok(testapp, login_as, contains): @@ -53,7 +53,7 @@ def test_add_order_ok(testapp, login_as, contains):
form["vendor"] = "Carl Roth"
form["package_size"] = "25 l"
form["quantity"] = "5"
form["account"] = "DFG"
form["funds"] = "DFG"
form["comment"] = "Ein Kommentar!"
form.fields["amount"][0].value = "5.67"
form.fields["amount"][1].value = "5.67"
@ -140,7 +140,7 @@ def test_add_order_cancel(testapp, login_as, contains): @@ -140,7 +140,7 @@ def test_add_order_cancel(testapp, login_as, contains):
form["vendor"] = "Carl Roth"
form["package_size"] = "25 l"
form["quantity"] = "5"
form["account"] = "DFG"
form["funds"] = "DFG"
form["comment"] = "Ein Kommentar!"
form.fields["amount"][0].value = "5.67"
form.fields["amount"][1].value = "5.67"
@ -185,7 +185,7 @@ def test_edit_order_ok(testapp, login_as, contains, parse_latest_mail): @@ -185,7 +185,7 @@ def test_edit_order_ok(testapp, login_as, contains, parse_latest_mail):
form["vendor"] = "Carl Roth"
form["package_size"] = "25 l"
form["quantity"] = "5"
form["account"] = "DFG"
form["funds"] = "DFG"
form["comment"] = "Ein Kommentar!"
form.fields["amount"][0].value = "5.67"
form.fields["amount"][1].value = "5.67"
@ -238,7 +238,7 @@ def test_edit_order_form_error(testapp, login_as, contains): @@ -238,7 +238,7 @@ def test_edit_order_form_error(testapp, login_as, contains):
form["vendor"] = "Carl Roth"
form["package_size"] = "25 l"
form["quantity"] = "5"
form["account"] = "DFG"
form["funds"] = "DFG"
form["comment"] = "Ein Kommentar!"
form.fields["amount"][0].value = "5.67"
form.fields["amount"][1].value = "5.67"
@ -276,7 +276,7 @@ def test_edit_order_cancel(testapp, login_as, contains): @@ -276,7 +276,7 @@ def test_edit_order_cancel(testapp, login_as, contains):
form["vendor"] = "Carl Roth"
form["package_size"] = "25 l"
form["quantity"] = "5"
form["account"] = "DFG"
form["funds"] = "DFG"
form["comment"] = "Ein Kommentar!"
form.fields["amount"][0].value = "5.67"
form.fields["amount"][1].value = "5.67"

Loading…
Cancel
Save