Skip to content

Commit

Permalink
♻️(backend) create main invoice in order create endpoint
Browse files Browse the repository at this point in the history
As a main invoice is created at the first payment scgedule installment,
we create it at order creation, and use it to store the billing address.
  • Loading branch information
kernicPanel authored and jonathanreveille committed Jun 26, 2024
1 parent 123a29a commit 2553366
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ and this project adheres to

### Changed

- Rework order statuses
- Update certificate template to render logo of organization if
it has a value.
- Add `currency` field to `OrderPaymentSerializer` serializer
Expand Down
2 changes: 1 addition & 1 deletion src/backend/joanie/core/flows/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _can_be_assigned(self):
target=enums.ORDER_STATE_ASSIGNED,
conditions=[_can_be_assigned],
)
def assign(self):
def assign(self, billing_address=None):
"""
Transition order to assigned state.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/backend/joanie/tests/payment/test_backend_lyra.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
PaymentProviderAPIException,
RegisterPaymentFailed,
)
from joanie.payment.factories import CreditCardFactory
from joanie.payment.factories import BillingAddressDictFactory, CreditCardFactory
from joanie.payment.models import CreditCard, Transaction
from joanie.tests.base import BaseLogMixinTestCase
from joanie.tests.payment.base_payment import BasePaymentTestCase
Expand Down

0 comments on commit 2553366

Please sign in to comment.