Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refunded orders show up as "Comp" status in onsite admin search #280

Open
rechner opened this issue Dec 30, 2022 · 1 comment
Open

Refunded orders show up as "Comp" status in onsite admin search #280

rechner opened this issue Dec 30, 2022 · 1 comment

Comments

@rechner
Copy link
Member

rechner commented Dec 30, 2022

Though quizzically also prompt for them to pay again, so maybe that isn't such a big deal

image

@Syfaro
Copy link

Syfaro commented Nov 14, 2024

Looks like this is caused by the abandoned method not checking if the order was refunded, and assuming any badge with a paidTotal of 0 and any effectiveLevel should be considered comped.

APIS/registration/models.py

Lines 490 to 496 in 8c664e1

if self.paidTotal() > 0:
return Badge.PAID
level = self.effectiveLevel()
if level == Badge.UNPAID:
return Badge.UNPAID
if level:
return Badge.COMP

Looking at both the paidTotal and effectiveLevel methods, it seems like they only consider UNPAID orders as unpaid, and doesn't consider the order status at all.

APIS/registration/models.py

Lines 503 to 504 in 8c664e1

if oi.order.billingType == Order.UNPAID:
return Badge.UNPAID

Could this check be updated to something that uses the order status?

if oi.order.billingType == Order.UNPAID or oi.order.status not in (Order.CAPTURED, Order.COMPLETED):
    return Badge.UNPAID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants