mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Invoice exporter: Ignore failed/canceled payments when filtering by provider
This commit is contained in:
@@ -103,7 +103,9 @@ class InvoiceExporterMixin:
|
|||||||
qs = qs.annotate(
|
qs = qs.annotate(
|
||||||
has_payment_with_provider=Exists(
|
has_payment_with_provider=Exists(
|
||||||
OrderPayment.objects.filter(
|
OrderPayment.objects.filter(
|
||||||
Q(order=OuterRef('order_id')) & Q(provider=form_data.get('payment_provider'))
|
Q(order=OuterRef('order_id')) & Q(provider=form_data.get('payment_provider')),
|
||||||
|
state__in=(OrderPayment.PAYMENT_STATE_CONFIRMED, OrderPayment.PAYMENT_STATE_REFUNDED,
|
||||||
|
OrderPayment.PAYMENT_STATE_PENDING, OrderPayment.PAYMENT_STATE_CREATED),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user