Bug 72

Summary: payment subject switch from company to voucher does not reset payment_status
Product: RTWBB frontend app Reporter: Šimon Macek <simon.macek>
Component: Challenge registration processAssignee: Admin <tomas.zigo>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Hardware: Macintosh   
OS: Mac OS   
Web browser: ---

Description Šimon Macek 2025-01-20 12:25:14 CET
Challenge registration

- Select payment "company"
- Select organization, subsidiary and team to save company payment
- Refresh page and change payment type from "company" to "voucher"
- Complete the rest of the registration
- Registration cannot be completed

---

Debug:

- submitting "discount_coupon" field does not changed returned "payment_status"
- "payment_status" value = "waiting" and so the registration-completed check returns "false"

register-challenge GET request returns

```
"discount_coupon": "ZD-CZBGSD",
"payment_subject": "voucher",
"payment_type": "fc",
"payment_status": "waiting",
"payment_amount": 390,
"payment_category": "entry_fee"
```

---

Proposed solution:
change "payment_status" to done when "discount_coupon" with 100% discount is submitted