forked from CGM_Public/pretix_original
Remove some irregularities in 8abfbba9
This commit is contained in:
@@ -8,8 +8,7 @@ from django.db import migrations, models
|
|||||||
|
|
||||||
def change_refunded_to_canceled(apps, schema_editor):
|
def change_refunded_to_canceled(apps, schema_editor):
|
||||||
Order = apps.get_model('pretixbase', 'Order')
|
Order = apps.get_model('pretixbase', 'Order')
|
||||||
Order.objects.filter(status='r').update(status='c', total=0)
|
Order.objects.filter(status='r').update(status='c')
|
||||||
Order.objects.filter(status='c').update(total=0)
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ class Order(LockModel, LoggedModel):
|
|||||||
return (
|
return (
|
||||||
self.status == Order.STATUS_PENDING
|
self.status == Order.STATUS_PENDING
|
||||||
or (self.status == Order.STATUS_PAID and self.total == Decimal('0.00'))
|
or (self.status == Order.STATUS_PAID and self.total == Decimal('0.00'))
|
||||||
) and self.event.settings.cancel_allow_user and cancelable
|
) and self.event.settings.cancel_allow_user and cancelable and self.positions.exists()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_expired_by_time(self):
|
def is_expired_by_time(self):
|
||||||
|
|||||||
@@ -1173,7 +1173,7 @@ class OrderChangeManager:
|
|||||||
return payment_sum - refund_sum
|
return payment_sum - refund_sum
|
||||||
|
|
||||||
def _recalculate_total_and_payment_fee(self):
|
def _recalculate_total_and_payment_fee(self):
|
||||||
total = sum([p.price for p in self.order.positions.all() if not p.canceled]) + sum([f.value for f in self.order.fees.all()])
|
total = sum([p.price for p in self.order.positions.all()]) + sum([f.value for f in self.order.fees.all()])
|
||||||
payment_fee = Decimal('0.00')
|
payment_fee = Decimal('0.00')
|
||||||
if self.open_payment:
|
if self.open_payment:
|
||||||
current_fee = Decimal('0.00')
|
current_fee = Decimal('0.00')
|
||||||
|
|||||||
Reference in New Issue
Block a user