Skip to content

Commit

Permalink
fix: integration to financial manager
Browse files Browse the repository at this point in the history
  • Loading branch information
igobranco committed Apr 15, 2024
1 parent 5d09c69 commit 66874a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions nau_extensions/financial_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def _convert_order_lines(order):
"description": line.title,
"quantity": line.quantity,
"vat_tax": vat_tax,
"unit_price_excl_tax": unit_price_excl_tax,
"unit_price_incl_tax": unit_price_incl_tax,
"unit_price_excl_vat": unit_price_excl_tax,
"unit_price_incl_vat": unit_price_incl_tax,
"organization_code": organization_code,
"product_code": product_code,
"product_id": course_id,
Expand Down
24 changes: 12 additions & 12 deletions nau_extensions/tests/test_financial_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def test_financial_manager_sync_data_basic(self):
"items": [
# verified
{
"unit_price_excl_tax": Decimal("10.00"),
"unit_price_incl_tax": Decimal("10.00"),
"unit_price_excl_vat": Decimal("10.00"),
"unit_price_incl_vat": Decimal("10.00"),
"description": "Seat in edX Demonstration Course with verified certificate",
'discount_excl_tax': Decimal('0.00'),
'discount_incl_tax': Decimal('0.00'),
Expand All @@ -111,8 +111,8 @@ def test_financial_manager_sync_data_basic(self):
},
# honor
{
"unit_price_excl_tax": Decimal("0.00"),
"unit_price_incl_tax": Decimal("0.00"),
"unit_price_excl_vat": Decimal("0.00"),
"unit_price_incl_vat": Decimal("0.00"),
"description": "Seat in edX Demonstration Course with honor certificate",
'discount_excl_tax': Decimal('0.00'),
'discount_incl_tax': Decimal('0.00'),
Expand Down Expand Up @@ -200,8 +200,8 @@ def test_financial_manager_sync_data_with_tax_rate(self):
"items": [
# verified
{
"unit_price_excl_tax": Decimal("10.00"),
"unit_price_incl_tax": Decimal("12.99"),
"unit_price_excl_vat": Decimal("10.00"),
"unit_price_incl_vat": Decimal("12.99"),
"description": "Seat in edX Demonstration Course with verified certificate",
'discount_excl_tax': Decimal('0.00'),
'discount_incl_tax': Decimal('0.00'),
Expand All @@ -213,8 +213,8 @@ def test_financial_manager_sync_data_with_tax_rate(self):
},
# honor
{
"unit_price_excl_tax": Decimal("0.00"),
"unit_price_incl_tax": Decimal("0.00"),
"unit_price_excl_vat": Decimal("0.00"),
"unit_price_incl_vat": Decimal("0.00"),
"description": "Seat in edX Demonstration Course with honor certificate",
'discount_excl_tax': Decimal('0.00'),
'discount_incl_tax': Decimal('0.00'),
Expand Down Expand Up @@ -287,8 +287,8 @@ def test_financial_manager_sync_data_without_bbi(self):
"items": [
# verified
{
"unit_price_excl_tax": Decimal("10.00"),
"unit_price_incl_tax": Decimal("10.00"),
"unit_price_excl_vat": Decimal("10.00"),
"unit_price_incl_vat": Decimal("10.00"),
"description": "Seat in edX Demonstration Course with verified certificate",
"discount_excl_tax": Decimal("0.00"),
"discount_incl_tax": Decimal("0.00"),
Expand All @@ -300,8 +300,8 @@ def test_financial_manager_sync_data_without_bbi(self):
},
# honor
{
"unit_price_excl_tax": Decimal("0.00"),
"unit_price_incl_tax": Decimal("0.00"),
"unit_price_excl_vat": Decimal("0.00"),
"unit_price_incl_vat": Decimal("0.00"),
"description": "Seat in edX Demonstration Course with honor certificate",
"discount_excl_tax": Decimal("0.00"),
"discount_incl_tax": Decimal("0.00"),
Expand Down

0 comments on commit 66874a2

Please sign in to comment.