(WIP) Ex-60 As an EdX finance employee, I can “invalidate” unpaid purchases.

1) @cdodge Here i am just sharing the change set related to instructor dashboard where a fincance admin can invalidate or re-validate the sales. Currently I am only updating the "is_valid" field in the "invoice" model that will be helpful in identification of valid and invalid registration codes + some UI changes. 

2) The second part of this story as mentioned below is in pending state as waiting from the UX organization for the message pattern and any mockups. 

---- [ First-order implementation: when a student with an invalidated enrollment tries to access the courseware, they cannot access the courseware, and are instead presented with the message: "Payment for your place in this course is overdue. Please contact the person responsible for payment." Student messaging will be determined by UX (https://openedx.atlassian.net/browse/UX-835) ] 

3) @cdodge with reference to your email, you were saying that  we should also set the is_active flag to False on the courseware registration table. Are you pointing to [student_courseenrollment] model ? if YES then i was observing that when we set that flag to false then it redirects the user to course about page.

I will wait for your suggestions in order to complete this story. @Lyla-Fischer 

Thanks.

You're conflating too many possible exceptions into one try/except block, and you're returning the wrong error message here. It should be more like:
```python
try:
    invoice_number = request.POST["invoice_number"]
except KeyError:
    return HttpResponseBadRequest("Missing required invoice_number parameter")
try:
    event_type = request.POST["event_type"]
except KeyError:
    return HttpResponseBadRequest("Missing required event_type parameter")
course_id = SlashSeparatedCourseKey.from_deprecated_string(course_id)
try:
    obj_invoice = Invoice.objects.select_related('is_valid').get(id=invoice_number, course_id=course_id)
except Invoice.DoesNotExist:
    return HttpResponseNotFound(_("Invoice number '{0}' does not exist.".format(invoice_number)))
```
You see how we keep the contents of the `try` block as small as possible?