mirror of
https://github.com/ae-utbm/sith.git
synced 2025-11-22 20:56:59 +00:00
make Refilling.payment_method a SmallIntegerField
This commit is contained in:
@@ -253,7 +253,7 @@ class Invoice(models.Model):
|
||||
customer=customer,
|
||||
operator=self.user,
|
||||
amount=i.product_unit_price * i.quantity,
|
||||
payment_method="CARD",
|
||||
payment_method=Refilling.PaymentMethod.CARD,
|
||||
date=self.date,
|
||||
)
|
||||
new.save()
|
||||
|
||||
@@ -275,7 +275,9 @@ class EbouticPayWithSith(CanViewMixin, SingleObjectMixin, View):
|
||||
return redirect("eboutic:payment_result", "failure")
|
||||
|
||||
eboutic = get_eboutic()
|
||||
sales = basket.generate_sales(eboutic, basket.user, Selling.PaymentMethod.SITH_ACCOUNT)
|
||||
sales = basket.generate_sales(
|
||||
eboutic, basket.user, Selling.PaymentMethod.SITH_ACCOUNT
|
||||
)
|
||||
try:
|
||||
with transaction.atomic():
|
||||
# Selling.save has some important business logic in it.
|
||||
|
||||
Reference in New Issue
Block a user